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:31:27 +0100
branchRCL_3
changeset 37 870918037e16
parent 36 1fc85118c3ae
child 40 bb72030f01c5
Revert incorrect RCL_3 drop: Revision: 201033 Kit: 201035
basiclocationinfodisplay/blid/cenrep/101F85A0.txt
basiclocationinfodisplay/blid/cenrep/keys_odometersettings.xls
basiclocationinfodisplay/blid/conf/odometersettings.confml
basiclocationinfodisplay/blid/conf/odometersettings_101F85A0.crml
basiclocationinfodisplay/blid/data/backup_registration.xml
basiclocationinfodisplay/blid/engine/bwins/BlidEngu.def
basiclocationinfodisplay/blid/engine/eabi/BlidEngu.def
basiclocationinfodisplay/blid/engine/group/BlidEng.mmp
basiclocationinfodisplay/blid/engine/group/bld.inf
basiclocationinfodisplay/blid/engine/inc/BlidModelFactory.h
basiclocationinfodisplay/blid/engine/inc/BlidUID.h
basiclocationinfodisplay/blid/engine/inc/CBlidEng.h
basiclocationinfodisplay/blid/engine/inc/CBlidLocation.h
basiclocationinfodisplay/blid/engine/inc/CBlidMeasurementSettingListener.h
basiclocationinfodisplay/blid/engine/inc/CBlidRouter.h
basiclocationinfodisplay/blid/engine/inc/CBlidSettings.h
basiclocationinfodisplay/blid/engine/inc/Debug.h
basiclocationinfodisplay/blid/engine/inc/DllMain.h
basiclocationinfodisplay/blid/engine/inc/MBlidEngObserver.h
basiclocationinfodisplay/blid/engine/inc/MBlidLocation.h
basiclocationinfodisplay/blid/engine/inc/MBlidMeasurementSettings.h
basiclocationinfodisplay/blid/engine/inc/MBlidRouter.h
basiclocationinfodisplay/blid/engine/inc/MBlidSettings.h
basiclocationinfodisplay/blid/engine/inc/TNamedCoordinate.h
basiclocationinfodisplay/blid/engine/inc/blidcommonconsts.h
basiclocationinfodisplay/blid/engine/inc/blidengconsts.h
basiclocationinfodisplay/blid/engine/inc/cblidmoduleinfoobserver.h
basiclocationinfodisplay/blid/engine/src/BlidModelFactory.cpp
basiclocationinfodisplay/blid/engine/src/CBlidEng.cpp
basiclocationinfodisplay/blid/engine/src/CBlidLocation.cpp
basiclocationinfodisplay/blid/engine/src/CBlidMeasurementSettingListener.cpp
basiclocationinfodisplay/blid/engine/src/CBlidRouter.cpp
basiclocationinfodisplay/blid/engine/src/CBlidSettings.cpp
basiclocationinfodisplay/blid/engine/src/Debug.cpp
basiclocationinfodisplay/blid/engine/src/DllMain.cpp
basiclocationinfodisplay/blid/engine/src/TNamedCoordinate.cpp
basiclocationinfodisplay/blid/engine/src/cblidmoduleinfoobserver.cpp
basiclocationinfodisplay/blid/group/bld.inf
basiclocationinfodisplay/blid/help/data/xhtml.zip
basiclocationinfodisplay/blid/help/group/bld.inf
basiclocationinfodisplay/blid/help/inc/blid.hlp.hrh
basiclocationinfodisplay/blid/help/rom/blidhelps_variant.iby
basiclocationinfodisplay/blid/install/Blid.pkg
basiclocationinfodisplay/blid/install/Blid.sis
basiclocationinfodisplay/blid/install/Blid.sisX
basiclocationinfodisplay/blid/install/blidstub.pkg
basiclocationinfodisplay/blid/loc/Blid.loc
basiclocationinfodisplay/blid/rom/blid.iby
basiclocationinfodisplay/blid/rom/blid_resources.iby
basiclocationinfodisplay/blid/rom/blidstub.iby
basiclocationinfodisplay/blid/ui/data/101F85A0.txt
basiclocationinfodisplay/blid/ui/data/Blid.rss
basiclocationinfodisplay/blid/ui/data/blid_reg.rss
basiclocationinfodisplay/blid/ui/data/blidstub.sis
basiclocationinfodisplay/blid/ui/group/Blid.mmp
basiclocationinfodisplay/blid/ui/group/bld.inf
basiclocationinfodisplay/blid/ui/inc/Blid.hlp.hrh
basiclocationinfodisplay/blid/ui/inc/Blid.hrh
basiclocationinfodisplay/blid/ui/inc/BlidNotes.h
basiclocationinfodisplay/blid/ui/inc/BlidSettingsCrkeys.h
basiclocationinfodisplay/blid/ui/inc/BlidUID.h
basiclocationinfodisplay/blid/ui/inc/Blidutils.h
basiclocationinfodisplay/blid/ui/inc/CBlidApp.h
basiclocationinfodisplay/blid/ui/inc/CBlidAppUi.h
basiclocationinfodisplay/blid/ui/inc/CBlidArrivedTonePayerUtility.h
basiclocationinfodisplay/blid/ui/inc/CBlidBaseContainer.h
basiclocationinfodisplay/blid/ui/inc/CBlidBaseView.h
basiclocationinfodisplay/blid/ui/inc/CBlidCurrentPositionDlg.h
basiclocationinfodisplay/blid/ui/inc/CBlidDocument.h
basiclocationinfodisplay/blid/ui/inc/CBlidLocSettingLauncher.h
basiclocationinfodisplay/blid/ui/inc/CBlidMainControl.h
basiclocationinfodisplay/blid/ui/inc/CBlidMainView.h
basiclocationinfodisplay/blid/ui/inc/CBlidNavigationView.h
basiclocationinfodisplay/blid/ui/inc/CBlidOwnPosLBModel.h
basiclocationinfodisplay/blid/ui/inc/CBlidSatelliteControl.h
basiclocationinfodisplay/blid/ui/inc/CBlidSatelliteView.h
basiclocationinfodisplay/blid/ui/inc/CBlidSavedWayptsContainer.h
basiclocationinfodisplay/blid/ui/inc/CBlidSavedWayptsLBModel.h
basiclocationinfodisplay/blid/ui/inc/CBlidSavedWayptsView.h
basiclocationinfodisplay/blid/ui/inc/CBlidSettingsContainer.h
basiclocationinfodisplay/blid/ui/inc/CBlidSettingsLBModel.h
basiclocationinfodisplay/blid/ui/inc/CBlidSettingsView.h
basiclocationinfodisplay/blid/ui/inc/CBlidTripMeterView.h
basiclocationinfodisplay/blid/ui/inc/CHtkNavigationControl.h
basiclocationinfodisplay/blid/ui/inc/CHtkTripMeterControl.h
basiclocationinfodisplay/blid/ui/inc/Debug.h
basiclocationinfodisplay/blid/ui/inc/FileSystemInfo.h
basiclocationinfodisplay/blid/ui/inc/MKeyProcessor.h
basiclocationinfodisplay/blid/ui/inc/bliduiconsts.h
basiclocationinfodisplay/blid/ui/inc/cblidnotedialog.h
basiclocationinfodisplay/blid/ui/src/BlidNotes.cpp
basiclocationinfodisplay/blid/ui/src/Blidutils.cpp
basiclocationinfodisplay/blid/ui/src/CBlidApp.cpp
basiclocationinfodisplay/blid/ui/src/CBlidAppUi.cpp
basiclocationinfodisplay/blid/ui/src/CBlidArrivedTonePayerUtility.cpp
basiclocationinfodisplay/blid/ui/src/CBlidBaseContainer.cpp
basiclocationinfodisplay/blid/ui/src/CBlidBaseView.cpp
basiclocationinfodisplay/blid/ui/src/CBlidCurrentPositionDlg.cpp
basiclocationinfodisplay/blid/ui/src/CBlidDocument.cpp
basiclocationinfodisplay/blid/ui/src/CBlidLocSettingLauncher.cpp
basiclocationinfodisplay/blid/ui/src/CBlidMainControl.cpp
basiclocationinfodisplay/blid/ui/src/CBlidMainView.cpp
basiclocationinfodisplay/blid/ui/src/CBlidNavigationView.cpp
basiclocationinfodisplay/blid/ui/src/CBlidOwnPosLBModel.cpp
basiclocationinfodisplay/blid/ui/src/CBlidSatelliteControl.cpp
basiclocationinfodisplay/blid/ui/src/CBlidSatelliteView.cpp
basiclocationinfodisplay/blid/ui/src/CBlidSavedWayptsContainer.cpp
basiclocationinfodisplay/blid/ui/src/CBlidSavedWayptsLBModel.cpp
basiclocationinfodisplay/blid/ui/src/CBlidSavedWayptsView.cpp
basiclocationinfodisplay/blid/ui/src/CBlidSettingsContainer.cpp
basiclocationinfodisplay/blid/ui/src/CBlidSettingsLBModel.cpp
basiclocationinfodisplay/blid/ui/src/CBlidSettingsView.cpp
basiclocationinfodisplay/blid/ui/src/CBlidTripMeterView.cpp
basiclocationinfodisplay/blid/ui/src/CHtkNavigationControl.cpp
basiclocationinfodisplay/blid/ui/src/CHtkTripMeterControl.cpp
basiclocationinfodisplay/blid/ui/src/Debug.cpp
basiclocationinfodisplay/blid/ui/src/FileSystemInfo.cpp
basiclocationinfodisplay/blid/ui/src/cblidnotedialog.cpp
basiclocationinfodisplay/blid/ui/src/uid.cpp
basiclocationinfodisplay/group/bld.inf
eventsui/cenrep/2001E66D.cre
eventsui/cenrep/2001E66D.txt
eventsui/cenrep/keys_evtstorage.xls
eventsui/conf/evtstorage.confml
eventsui/conf/evtstorage_2001E66D.crml
eventsui/data/backup_registration.xml
eventsui/eventseditor/bwins/evteditoru.def
eventsui/eventseditor/data/evtmgmteditorui.rss
eventsui/eventseditor/eabi/evteditoru.def
eventsui/eventseditor/group/bld.inf
eventsui/eventseditor/group/evteditor.mmp
eventsui/eventseditor/inc/evteditor.h
eventsui/eventseditor/inc/evteditorconsts.h
eventsui/eventseditor/inc/evteditoruid.hrh
eventsui/eventseditor/inc/evteventsdlg.h
eventsui/eventseditor/inc/evtmgmteditorui.hrh
eventsui/eventseditor/inc/evtmgmtuidesccomponent.h
eventsui/eventseditor/inc/evtmgmtuieditorcmdhandler.h
eventsui/eventseditor/inc/evtmgmtuilocationserviceadapter.h
eventsui/eventseditor/inc/evtmgmtuilocsettinglauncher.h
eventsui/eventseditor/inc/evtmgmtuilocsettinglauncherobserver.h
eventsui/eventseditor/inc/evtmgmtuimapnavigationadapter.h
eventsui/eventseditor/inc/evtmgmtuiplacecomponent.h
eventsui/eventseditor/inc/evtmgmtuiringtonecomponent.h
eventsui/eventseditor/inc/evtmgmtuisysofmeasurement.h
eventsui/eventseditor/inc/evtmgmtuiwaitdlglauncher.h
eventsui/eventseditor/src/evteditor.cpp
eventsui/eventseditor/src/evteventsdlg.cpp
eventsui/eventseditor/src/evtmgmtuidesccomponent.cpp
eventsui/eventseditor/src/evtmgmtuieditorcmdhandler.cpp
eventsui/eventseditor/src/evtmgmtuilocationserviceadapter.cpp
eventsui/eventseditor/src/evtmgmtuilocsettinglauncher.cpp
eventsui/eventseditor/src/evtmgmtuimapnavigationadapter.cpp
eventsui/eventseditor/src/evtmgmtuiplacecomponent.cpp
eventsui/eventseditor/src/evtmgmtuiringtonecomponent.cpp
eventsui/eventseditor/src/evtmgmtuisysofmeasurement.cpp
eventsui/eventseditor/src/evtmgmtuiwaitdlglauncher.cpp
eventsui/eventsengine/bwins/evtengineu.def
eventsui/eventsengine/eabi/evtengineu.def
eventsui/eventsengine/group/bld.inf
eventsui/eventsengine/group/evtengine.mmp
eventsui/eventsengine/inc/evtaction.h
eventsui/eventsengine/inc/evtbasiceventinfo.h
eventsui/eventsengine/inc/evtconsts.h
eventsui/eventsengine/inc/evtdatabase.h
eventsui/eventsengine/inc/evtdbnotifier.h
eventsui/eventsengine/inc/evtdbobserver.h
eventsui/eventsengine/inc/evtdefs.h
eventsui/eventsengine/inc/evtengineuid.hrh
eventsui/eventsengine/inc/evtevent.h
eventsui/eventsengine/inc/evteventmanager.h
eventsui/eventsengine/inc/evtmgmtuiengine.h
eventsui/eventsengine/inc/evtmgmtuilbtadapter.h
eventsui/eventsengine/inc/evtmgmtuilbtobserver.h
eventsui/eventsengine/inc/evtstoragedbobserver.h
eventsui/eventsengine/inc/evtstoragedomaincrkeys.h
eventsui/eventsengine/inc/evttoneaction.h
eventsui/eventsengine/src/evtaction.cpp
eventsui/eventsengine/src/evtbasiceventinfo.cpp
eventsui/eventsengine/src/evtdatabase.cpp
eventsui/eventsengine/src/evtdbnotifier.cpp
eventsui/eventsengine/src/evtevent.cpp
eventsui/eventsengine/src/evteventmanager.cpp
eventsui/eventsengine/src/evtmgmtuiengine.cpp
eventsui/eventsengine/src/evtmgmtuilbtadapter.cpp
eventsui/eventsengine/src/evttoneaction.cpp
eventsui/eventshandlerui/eventshandler/group/bld.inf
eventsui/eventshandlerui/eventshandler/group/evthandler.mmp
eventsui/eventshandlerui/eventshandler/inc/evthandler.h
eventsui/eventshandlerui/eventshandler/inc/evthandlerclient.h
eventsui/eventshandlerui/eventshandler/src/evthandler.cpp
eventsui/eventshandlerui/eventshandler/src/evthandlerclient.cpp
eventsui/eventshandlerui/eventshandlerapp/data/evthandlerapp.rss
eventsui/eventshandlerui/eventshandlerapp/data/evthandlerapp_reg.rss
eventsui/eventshandlerui/eventshandlerapp/group/bld.inf
eventsui/eventshandlerui/eventshandlerapp/group/evthandlerapp.mmp
eventsui/eventshandlerui/eventshandlerapp/inc/evtdlglauncher.h
eventsui/eventshandlerui/eventshandlerapp/inc/evthandlerapp.h
eventsui/eventshandlerui/eventshandlerapp/inc/evthandlerappdocument.h
eventsui/eventshandlerui/eventshandlerapp/inc/evthandlerappui.h
eventsui/eventshandlerui/eventshandlerapp/inc/evthandlerappuid.hrh
eventsui/eventshandlerui/eventshandlerapp/inc/evtrequest.h
eventsui/eventshandlerui/eventshandlerapp/inc/evtrequesttype.h
eventsui/eventshandlerui/eventshandlerapp/src/evtdlglauncher.cpp
eventsui/eventshandlerui/eventshandlerapp/src/evthandlerapp.cpp
eventsui/eventshandlerui/eventshandlerapp/src/evthandlerappdocument.cpp
eventsui/eventshandlerui/eventshandlerapp/src/evthandlerappui.cpp
eventsui/eventshandlerui/eventshandlerapp/src/evtrequest.cpp
eventsui/eventshandlerui/eventshandlerserver/group/bld.inf
eventsui/eventshandlerui/eventshandlerserver/group/evthandlerserver.mmp
eventsui/eventshandlerui/eventshandlerserver/inc/evteventinfo.h
eventsui/eventshandlerui/eventshandlerserver/inc/evtglobalquery.h
eventsui/eventshandlerui/eventshandlerserver/inc/evthandlerserver.h
eventsui/eventshandlerui/eventshandlerserver/inc/evthandlerserverpanic.h
eventsui/eventshandlerui/eventshandlerserver/inc/evthandlerserversession.h
eventsui/eventshandlerui/eventshandlerserver/inc/evthandlerserversession.inl
eventsui/eventshandlerui/eventshandlerserver/inc/evthandlerserverstartup.h
eventsui/eventshandlerui/eventshandlerserver/inc/evthandlerserveruid.hrh
eventsui/eventshandlerui/eventshandlerserver/inc/evthandlershutdowntimer.h
eventsui/eventshandlerui/eventshandlerserver/inc/evthandlershutdowntimer.inl
eventsui/eventshandlerui/eventshandlerserver/inc/evtnotifierhandler.h
eventsui/eventshandlerui/eventshandlerserver/inc/evtnotifierobserver.h
eventsui/eventshandlerui/eventshandlerserver/inc/evtserverapp.h
eventsui/eventshandlerui/eventshandlerserver/inc/evtserverappdocument.h
eventsui/eventshandlerui/eventshandlerserver/inc/evtserverappui.h
eventsui/eventshandlerui/eventshandlerserver/inc/evtsnoozehandler.h
eventsui/eventshandlerui/eventshandlerserver/src/evtglobalquery.cpp
eventsui/eventshandlerui/eventshandlerserver/src/evthandlerserver.cpp
eventsui/eventshandlerui/eventshandlerserver/src/evthandlerserversession.cpp
eventsui/eventshandlerui/eventshandlerserver/src/evthandlerserverstartup.cpp
eventsui/eventshandlerui/eventshandlerserver/src/evthandlershutdowntimer.cpp
eventsui/eventshandlerui/eventshandlerserver/src/evtnotifierhandler.cpp
eventsui/eventshandlerui/eventshandlerserver/src/evtserverapp.cpp
eventsui/eventshandlerui/eventshandlerserver/src/evtserverappdocument.cpp
eventsui/eventshandlerui/eventshandlerserver/src/evtserverappui.cpp
eventsui/eventshandlerui/eventshandlerserver/src/evtsnoozehandler.cpp
eventsui/eventshandlerui/eventsnotifier/ecom/data/2001E66A.rss
eventsui/eventshandlerui/eventsnotifier/ecom/group/bld.inf
eventsui/eventshandlerui/eventsnotifier/ecom/group/evtnotifierplugin.mmp
eventsui/eventshandlerui/eventsnotifier/ecom/inc/evtnotifierpluginuid.hrh
eventsui/eventshandlerui/eventsnotifier/ecom/src/evtnotifierplugin.cpp
eventsui/eventshandlerui/eventsnotifier/evtinfonote/bwins/evtinfonoteu.def
eventsui/eventshandlerui/eventsnotifier/evtinfonote/data/evtinfonote.rss
eventsui/eventshandlerui/eventsnotifier/evtinfonote/eabi/evtinfonoteu.def
eventsui/eventshandlerui/eventsnotifier/evtinfonote/group/bld.inf
eventsui/eventshandlerui/eventsnotifier/evtinfonote/group/evtinfonote.mmp
eventsui/eventshandlerui/eventsnotifier/evtinfonote/inc/evtinfonote.h
eventsui/eventshandlerui/eventsnotifier/evtinfonote/inc/evtinfonoteconsts.hrh
eventsui/eventshandlerui/eventsnotifier/evtinfonote/inc/evtinfonoteimpl.h
eventsui/eventshandlerui/eventsnotifier/evtinfonote/inc/evtinfonoteinterface.h
eventsui/eventshandlerui/eventsnotifier/evtinfonote/inc/evtinfonoteuid.hrh
eventsui/eventshandlerui/eventsnotifier/evtinfonote/src/evtinfonote.cpp
eventsui/eventshandlerui/eventsnotifier/evtinfonote/src/evtinfonoteimpl.cpp
eventsui/eventshandlerui/eventsnotifier/evtinfonote/src/evtinfonoteinterface.cpp
eventsui/eventshandlerui/eventsnotifier/group/bld.inf
eventsui/eventshandlerui/eventsnotifier/inc/evtinfonoteinterface.h
eventsui/eventshandlerui/group/bld.inf
eventsui/eventshandlerui/inc/evthandlerclientserver.h
eventsui/eventshandlerui/inc/evthandlerserverconsts.h
eventsui/eventsmgmtui/data/eventsuistub.sis
eventsui/eventsmgmtui/data/evtmgmtui.rss
eventsui/eventsmgmtui/data/evtmgmtui_reg.rss
eventsui/eventsmgmtui/group/bld.inf
eventsui/eventsmgmtui/group/evtmgmtui.mmp
eventsui/eventsmgmtui/inc/evtmgmtui.hrh
eventsui/eventsmgmtui/inc/evtmgmtuiapp.h
eventsui/eventsmgmtui/inc/evtmgmtuiappui.h
eventsui/eventsmgmtui/inc/evtmgmtuicmdhdlr.h
eventsui/eventsmgmtui/inc/evtmgmtuidocument.h
eventsui/eventsmgmtui/inc/evtmgmtuifiltermodel.h
eventsui/eventsmgmtui/inc/evtmgmtuilegalnote.h
eventsui/eventsmgmtui/inc/evtmgmtuilistbox.h
eventsui/eventsmgmtui/inc/evtmgmtuilistboxmodel.h
eventsui/eventsmgmtui/inc/evtmgmtuilocsettinglauncher.h
eventsui/eventsmgmtui/inc/evtmgmtuimapnavigationadapter.h
eventsui/eventsmgmtui/inc/evtmgmtuimodel.h
eventsui/eventsmgmtui/inc/evtmgmtuistartupcontainer.h
eventsui/eventsmgmtui/inc/evtmgmtuistartupview.h
eventsui/eventsmgmtui/inc/evtmgmtuiuid.hrh
eventsui/eventsmgmtui/src/evtmgmtuiapp.cpp
eventsui/eventsmgmtui/src/evtmgmtuiappui.cpp
eventsui/eventsmgmtui/src/evtmgmtuidocument.cpp
eventsui/eventsmgmtui/src/evtmgmtuifiltermodel.cpp
eventsui/eventsmgmtui/src/evtmgmtuilegalnote.cpp
eventsui/eventsmgmtui/src/evtmgmtuilistbox.cpp
eventsui/eventsmgmtui/src/evtmgmtuilistboxmodel.cpp
eventsui/eventsmgmtui/src/evtmgmtuilocsettinglauncher.cpp
eventsui/eventsmgmtui/src/evtmgmtuimapnavigationadapter.cpp
eventsui/eventsmgmtui/src/evtmgmtuimodel.cpp
eventsui/eventsmgmtui/src/evtmgmtuistartupcontainer.cpp
eventsui/eventsmgmtui/src/evtmgmtuistartupview.cpp
eventsui/eventsutils/bwins/evtutilsu.def
eventsui/eventsutils/eabi/evtutilsu.def
eventsui/eventsutils/group/bld.inf
eventsui/eventsutils/group/evtutils.mmp
eventsui/eventsutils/inc/evtcallhandler.h
eventsui/eventsutils/inc/evtdebug.h
eventsui/eventsutils/inc/evtdebugconfig.hrh
eventsui/eventsutils/inc/evtinfonoteparams.h
eventsui/eventsutils/inc/evtkeylockhandler.h
eventsui/eventsutils/inc/evtprofilehandler.h
eventsui/eventsutils/inc/evttoneplayer.h
eventsui/eventsutils/inc/evttoneutils.h
eventsui/eventsutils/inc/evtutilsconsts.h
eventsui/eventsutils/inc/evtutilsuid.hrh
eventsui/eventsutils/src/evtcallhandler.cpp
eventsui/eventsutils/src/evtenginedebug.cpp
eventsui/eventsutils/src/evtinfonoteparams.cpp
eventsui/eventsutils/src/evtkeylockhandler.cpp
eventsui/eventsutils/src/evtprofilehandler.cpp
eventsui/eventsutils/src/evttoneplayer.cpp
eventsui/eventsutils/src/evttoneutils.cpp
eventsui/group/bld.inf
eventsui/help/data/xhtml.zip
eventsui/help/group/bld.inf
eventsui/help/inc/loc.hlp.hrh
eventsui/help/rom/eventsuihelps_variant.iby
eventsui/loc/evtui.loc
eventsui/rom/eventsui.iby
eventsui/rom/eventsui_resources.iby
eventsui/rom/eventsuistub.iby
group/bld.inf
landmarksui/app/data/Landmarks.rss
landmarksui/app/data/LandmarksAif.rss
landmarksui/app/data/Landmarks_caption.rss
landmarksui/app/data/Landmarks_reg.rss
landmarksui/app/data/eposlmintservices.rss
landmarksui/app/data/landmarksstub.sis
landmarksui/app/group/bld.inf
landmarksui/app/group/landmarks.mmp
landmarksui/app/inc/CLmkApp.h
landmarksui/app/inc/CLmkAppUi.h
landmarksui/app/inc/CLmkBaseContainer.h
landmarksui/app/inc/CLmkBaseView.h
landmarksui/app/inc/CLmkByCategoryContainer.h
landmarksui/app/inc/CLmkByCategoryView.h
landmarksui/app/inc/CLmkByLmContainer.h
landmarksui/app/inc/CLmkByLmView.h
landmarksui/app/inc/CLmkCategoryContentsContainer.h
landmarksui/app/inc/CLmkCategoryContentsView.h
landmarksui/app/inc/CLmkCategorySettingsContainer.h
landmarksui/app/inc/CLmkCategorySettingsView.h
landmarksui/app/inc/CLmkDocument.h
landmarksui/app/inc/CLmkLbWithFilterContainer.h
landmarksui/app/inc/Debug.h
landmarksui/app/inc/MLmkKeyProcessor.h
landmarksui/app/src/CLmkApp.cpp
landmarksui/app/src/CLmkAppUi.cpp
landmarksui/app/src/CLmkBaseContainer.cpp
landmarksui/app/src/CLmkBaseView.cpp
landmarksui/app/src/CLmkByCategoryContainer.cpp
landmarksui/app/src/CLmkByCategoryView.cpp
landmarksui/app/src/CLmkByLmContainer.cpp
landmarksui/app/src/CLmkByLmView.cpp
landmarksui/app/src/CLmkCategoryContentsContainer.cpp
landmarksui/app/src/CLmkCategoryContentsView.cpp
landmarksui/app/src/CLmkCategorySettingsContainer.cpp
landmarksui/app/src/CLmkCategorySettingsView.cpp
landmarksui/app/src/CLmkDocument.cpp
landmarksui/app/src/CLmkLbWithFilterContainer.cpp
landmarksui/app/src/Debug.cpp
landmarksui/commonui/bwins/LMKCOMMONUIu.def
landmarksui/commonui/bwins/LmkCommonUiStubu.def
landmarksui/commonui/eabi/LMKCOMMONUIu.def
landmarksui/commonui/eabi/LmkCommonUiStubu.def
landmarksui/commonui/group/LmkCommonUi.mmp
landmarksui/commonui/group/LmkCommonUiStub.mmp
landmarksui/commonui/group/bld.inf
landmarksui/commonui/src/CLmkCategorySelectorDlg.cpp
landmarksui/commonui/src/CLmkEditorDlg.cpp
landmarksui/commonui/src/CLmkLandmarkSelectorDlg.cpp
landmarksui/commonui/src/TLmkItemIdDbCombiInfo.cpp
landmarksui/commonui/srcstub/CLmkCategorySelectorDlg.cpp
landmarksui/commonui/srcstub/CLmkEditorDlg.cpp
landmarksui/commonui/srcstub/CLmkLandmarkSelectorDlg.cpp
landmarksui/commonui/srcstub/TLmkItemIdDbCombiInfo.cpp
landmarksui/engine/bwins/LMKENGU_32u.def
landmarksui/engine/bwins/LMKENGUu.def
landmarksui/engine/eabi/LMKENGU_32u.def
landmarksui/engine/eabi/LMKENGUu.def
landmarksui/engine/group/LmkEng.mmp
landmarksui/engine/group/bld.inf
landmarksui/engine/inc/CLmkAOOperation.h
landmarksui/engine/inc/CLmkAddToCatOperation.h
landmarksui/engine/inc/CLmkCategoryListProvider.h
landmarksui/engine/inc/CLmkCategoryUiItem.h
landmarksui/engine/inc/CLmkDbEventListener.h
landmarksui/engine/inc/CLmkDbInitializer.h
landmarksui/engine/inc/CLmkDbUtils.h
landmarksui/engine/inc/CLmkEncodeUnsavedLandmarksOp.h
landmarksui/engine/inc/CLmkEncoder.h
landmarksui/engine/inc/CLmkEventListenerSingleton.h
landmarksui/engine/inc/CLmkFieldData.h
landmarksui/engine/inc/CLmkFields.h
landmarksui/engine/inc/CLmkIconOperation.h
landmarksui/engine/inc/CLmkLandMarkCategoriesName.h
landmarksui/engine/inc/CLmkLandmark.h
landmarksui/engine/inc/CLmkLandmarkListProvider.h
landmarksui/engine/inc/CLmkLandmarkUiItem.h
landmarksui/engine/inc/CLmkListProviderBase.h
landmarksui/engine/inc/CLmkLmItemListProvider.h
landmarksui/engine/inc/CLmkLocationService.h
landmarksui/engine/inc/CLmkParseAllWrapper.h
landmarksui/engine/inc/CLmkParsedLmListProvider.h
landmarksui/engine/inc/CLmkParser.h
landmarksui/engine/inc/CLmkSearchedLmListProvider.h
landmarksui/engine/inc/CLmkUiItemBase.h
landmarksui/engine/inc/Debug.h
landmarksui/engine/inc/DllMain.h
landmarksui/engine/inc/LmkFileUtils.h
landmarksui/engine/inc/LmkListProviderFactory.h
landmarksui/engine/inc/MLmkAOOperationObserver.h
landmarksui/engine/inc/MLmkDbObserver.h
landmarksui/engine/inc/MLmkFieldData.h
landmarksui/engine/inc/MLmkListProviderObserver.h
landmarksui/engine/inc/MLmkLocationObserver.h
landmarksui/engine/inc/MLmkSelectorIconMgr.h
landmarksui/engine/inc/MLmkUiItemProximityExt.h
landmarksui/engine/inc/clmkdbsearchutils.h
landmarksui/engine/inc/mlmkdbsearchutilsobserver.h
landmarksui/engine/src/CLmkAOOperation.cpp
landmarksui/engine/src/CLmkAddToCatOperation.cpp
landmarksui/engine/src/CLmkCategoryListProvider.cpp
landmarksui/engine/src/CLmkCategoryUiItem.cpp
landmarksui/engine/src/CLmkDbEventListener.cpp
landmarksui/engine/src/CLmkDbInitializer.cpp
landmarksui/engine/src/CLmkDbUtils.cpp
landmarksui/engine/src/CLmkEncodeUnsavedLandmarksOp.cpp
landmarksui/engine/src/CLmkEncoder.cpp
landmarksui/engine/src/CLmkEventListenerSingleton.cpp
landmarksui/engine/src/CLmkFieldData.cpp
landmarksui/engine/src/CLmkFields.cpp
landmarksui/engine/src/CLmkIconOperation.cpp
landmarksui/engine/src/CLmkLandMarkCategoriesName.cpp
landmarksui/engine/src/CLmkLandmark.cpp
landmarksui/engine/src/CLmkLandmarkListProvider.cpp
landmarksui/engine/src/CLmkLandmarkUiItem.cpp
landmarksui/engine/src/CLmkListProviderBase.cpp
landmarksui/engine/src/CLmkLmItemListProvider.cpp
landmarksui/engine/src/CLmkLocationService.cpp
landmarksui/engine/src/CLmkParseAllWrapper.cpp
landmarksui/engine/src/CLmkParsedLmListProvider.cpp
landmarksui/engine/src/CLmkParser.cpp
landmarksui/engine/src/CLmkSearchedLmListProvider.cpp
landmarksui/engine/src/CLmkUiItemBase.cpp
landmarksui/engine/src/Debug.cpp
landmarksui/engine/src/DllMain.cpp
landmarksui/engine/src/LmkFileUtils.cpp
landmarksui/engine/src/LmkListProviderFactory.cpp
landmarksui/engine/src/clmkdbsearchutils.cpp
landmarksui/group/bld.inf
landmarksui/help/data/xhtml.zip
landmarksui/help/group/bld.inf
landmarksui/help/inc/lm.hlp.hrh
landmarksui/help/inc/lmmes.hlp.hrh
landmarksui/help/rom/landmarksuihelps_variant.iby
landmarksui/inc/LmkConsts.h
landmarksui/inc/LmkDebugConfig.h
landmarksui/inc/LmkUID.h
landmarksui/inc/landmarks.hrh
landmarksui/install/landmarksstub.pkg
landmarksui/install/landmarksupgrade.pkg
landmarksui/loc/landmarks.loc
landmarksui/loc/lmkmsgviewer.loc
landmarksui/msgviewer/data/LmkMsgViewer.rss
landmarksui/msgviewer/data/LmkMsgViewerAif.rss
landmarksui/msgviewer/data/LmkMsgViewer_caption.rss
landmarksui/msgviewer/data/LmkMsgViewer_reg.rss
landmarksui/msgviewer/group/LmkMsgViewer.mmp
landmarksui/msgviewer/group/bld.inf
landmarksui/msgviewer/inc/CLmkMsgViewerApp.h
landmarksui/msgviewer/inc/CLmkMsgViewerAppUi.h
landmarksui/msgviewer/inc/CLmkMsgViewerAppView.h
landmarksui/msgviewer/inc/CLmkMsgViewerDocument.h
landmarksui/msgviewer/src/CLmkMsgViewerApp.cpp
landmarksui/msgviewer/src/CLmkMsgViewerAppUi.cpp
landmarksui/msgviewer/src/CLmkMsgViewerAppView.cpp
landmarksui/msgviewer/src/CLmkMsgViewerDocument.cpp
landmarksui/rom/LocationLandmarksUi.iby
landmarksui/rom/LocationLandmarksUiStub.iby
landmarksui/rom/LocationLandmarksUi_resources.iby
landmarksui/uicontrols/bwins/LMKUIU_32u.def
landmarksui/uicontrols/bwins/LMKUIUu.def
landmarksui/uicontrols/data/LmkEditor.rss
landmarksui/uicontrols/data/LmkMessaging.rss
landmarksui/uicontrols/data/lmkui.rss
landmarksui/uicontrols/eabi/LMKUIU_32u.def
landmarksui/uicontrols/eabi/LMKUIUu.def
landmarksui/uicontrols/group/LmkUi.mmp
landmarksui/uicontrols/group/bld.inf
landmarksui/uicontrols/inc/CLmkAppCategorySelectorImpl.h
landmarksui/uicontrols/inc/CLmkAppCategorySettingsImpl.h
landmarksui/uicontrols/inc/CLmkAppLmItemSelectorImpl.h
landmarksui/uicontrols/inc/CLmkAppLmSelectorImpl.h
landmarksui/uicontrols/inc/CLmkAppSelectorImplBase.h
landmarksui/uicontrols/inc/CLmkCoordinateEditor.h
landmarksui/uicontrols/inc/CLmkDecimalEditor.h
landmarksui/uicontrols/inc/CLmkDistanceEditor.h
landmarksui/uicontrols/inc/CLmkDlgCategorySelectorImpl.h
landmarksui/uicontrols/inc/CLmkDlgCombiSelectorImpl.h
landmarksui/uicontrols/inc/CLmkDlgLmSelectorImpl.h
landmarksui/uicontrols/inc/CLmkDlgPackageSelectorImpl.h
landmarksui/uicontrols/inc/CLmkDlgSelectorImplBase.h
landmarksui/uicontrols/inc/CLmkDoubleGraphicLBModel.h
landmarksui/uicontrols/inc/CLmkEditorCoordinateField.h
landmarksui/uicontrols/inc/CLmkEditorFieldArray.h
landmarksui/uicontrols/inc/CLmkEditorFieldBase.h
landmarksui/uicontrols/inc/CLmkEditorImpl.h
landmarksui/uicontrols/inc/CLmkEditorListField.h
landmarksui/uicontrols/inc/CLmkEditorNumberField.h
landmarksui/uicontrols/inc/CLmkEditorTextField.h
landmarksui/uicontrols/inc/CLmkEmptyDialog.h
landmarksui/uicontrols/inc/CLmkFloatEditor.h
landmarksui/uicontrols/inc/CLmkIconSelectorPopup.h
landmarksui/uicontrols/inc/CLmkLmItemListMemento.h
landmarksui/uicontrols/inc/CLmkLocSettingLauncher.h
landmarksui/uicontrols/inc/CLmkMfneFloat.h
landmarksui/uicontrols/inc/CLmkMfneSeparator.h
landmarksui/uicontrols/inc/CLmkMultiSelectionLBModel.h
landmarksui/uicontrols/inc/CLmkMultiSelectorDialog.h
landmarksui/uicontrols/inc/CLmkPackageEditorImpl.h
landmarksui/uicontrols/inc/CLmkPkgFindNewCatOp.h
landmarksui/uicontrols/inc/CLmkSaveLandmarkUtils.h
landmarksui/uicontrols/inc/CLmkSelectorCache.h
landmarksui/uicontrols/inc/CLmkSelectorDialog.h
landmarksui/uicontrols/inc/CLmkSelectorIconMgr.h
landmarksui/uicontrols/inc/CLmkSelectorImplBase.h
landmarksui/uicontrols/inc/CLmkSelectorLBModelBase.h
landmarksui/uicontrols/inc/CLmkSender.h
landmarksui/uicontrols/inc/CLmkSingleGraphicLBModel.h
landmarksui/uicontrols/inc/CLmkUiUtils.h
landmarksui/uicontrols/inc/Debug.h
landmarksui/uicontrols/inc/DllMain.h
landmarksui/uicontrols/inc/LmkEditorFieldFactory.h
landmarksui/uicontrols/inc/LmkNotes.h
landmarksui/uicontrols/inc/MLmkDlgMenuObserver.h
landmarksui/uicontrols/inc/MLmkEditorField.h
landmarksui/uicontrols/inc/MLmkEditorUiBuilder.h
landmarksui/uicontrols/inc/MLmkListMemento.h
landmarksui/uicontrols/inc/MLmkMapAndNavigationObServer.h
landmarksui/uicontrols/inc/MLmkMskObserver.h
landmarksui/uicontrols/inc/MLmkNavigationObserver.h
landmarksui/uicontrols/inc/TLmkDeletionHelper.h
landmarksui/uicontrols/inc/clmkcallcmd.h
landmarksui/uicontrols/inc/clmkcentralrepository.h
landmarksui/uicontrols/inc/clmkgotourlcmd.h
landmarksui/uicontrols/inc/clmkmapnavigationinterface.h
landmarksui/uicontrols/inc/lmkicondialog.h
landmarksui/uicontrols/inc/lmkiconmap.h
landmarksui/uicontrols/inc/lmkwaitdlglauncher.h
landmarksui/uicontrols/inc/mlmkcentralrepositoryobserver.h
landmarksui/uicontrols/src/CLmkAppCategorySelectorImpl.cpp
landmarksui/uicontrols/src/CLmkAppCategorySettingsImpl.cpp
landmarksui/uicontrols/src/CLmkAppLmItemSelectorImpl.cpp
landmarksui/uicontrols/src/CLmkAppLmSelectorImpl.cpp
landmarksui/uicontrols/src/CLmkAppSelectorImplBase.cpp
landmarksui/uicontrols/src/CLmkCallCmd.cpp
landmarksui/uicontrols/src/CLmkCoordinateEditor.cpp
landmarksui/uicontrols/src/CLmkDecimalEditor.cpp
landmarksui/uicontrols/src/CLmkDistanceEditor.cpp
landmarksui/uicontrols/src/CLmkDlgCategorySelectorImpl.cpp
landmarksui/uicontrols/src/CLmkDlgCombiSelectorImpl.cpp
landmarksui/uicontrols/src/CLmkDlgLmSelectorImpl.cpp
landmarksui/uicontrols/src/CLmkDlgPackageSelectorImpl.cpp
landmarksui/uicontrols/src/CLmkDlgSelectorImplBase.cpp
landmarksui/uicontrols/src/CLmkDoubleGraphicLBModel.cpp
landmarksui/uicontrols/src/CLmkEditorCoordinateField.cpp
landmarksui/uicontrols/src/CLmkEditorFieldArray.cpp
landmarksui/uicontrols/src/CLmkEditorFieldBase.cpp
landmarksui/uicontrols/src/CLmkEditorImpl.cpp
landmarksui/uicontrols/src/CLmkEditorListField.cpp
landmarksui/uicontrols/src/CLmkEditorNumberField.cpp
landmarksui/uicontrols/src/CLmkEditorTextField.cpp
landmarksui/uicontrols/src/CLmkEmptyDialog.cpp
landmarksui/uicontrols/src/CLmkFloatEditor.cpp
landmarksui/uicontrols/src/CLmkGoToUrlCmd.cpp
landmarksui/uicontrols/src/CLmkIconSelectorPopup.cpp
landmarksui/uicontrols/src/CLmkLmItemListMemento.cpp
landmarksui/uicontrols/src/CLmkLocSettingLauncher.cpp
landmarksui/uicontrols/src/CLmkMfneFloat.cpp
landmarksui/uicontrols/src/CLmkMfneSeparator.cpp
landmarksui/uicontrols/src/CLmkMultiSelectionLBModel.cpp
landmarksui/uicontrols/src/CLmkMultiSelectorDialog.cpp
landmarksui/uicontrols/src/CLmkPackageEditorImpl.cpp
landmarksui/uicontrols/src/CLmkPkgFindNewCatOp.cpp
landmarksui/uicontrols/src/CLmkSaveLandmarkUtils.cpp
landmarksui/uicontrols/src/CLmkSelectorCache.cpp
landmarksui/uicontrols/src/CLmkSelectorDialog.cpp
landmarksui/uicontrols/src/CLmkSelectorIconMgr.cpp
landmarksui/uicontrols/src/CLmkSelectorImplBase.cpp
landmarksui/uicontrols/src/CLmkSelectorLBModelBase.cpp
landmarksui/uicontrols/src/CLmkSender.cpp
landmarksui/uicontrols/src/CLmkSingleGraphicLBModel.cpp
landmarksui/uicontrols/src/CLmkUiUtils.cpp
landmarksui/uicontrols/src/Debug.cpp
landmarksui/uicontrols/src/DllMain.cpp
landmarksui/uicontrols/src/LmkEditorFieldFactory.cpp
landmarksui/uicontrols/src/LmkNotes.cpp
landmarksui/uicontrols/src/TLmkDeletionHelper.cpp
landmarksui/uicontrols/src/cLmkcentralrepository.cpp
landmarksui/uicontrols/src/clmkmapnavigationinterface.cpp
landmarksui/uicontrols/src/lmkicondialog.cpp
landmarksui/uicontrols/src/lmkiconmap.cpp
landmarksui/uicontrols/src/lmkwaitdlglauncher.cpp
layers.sysdef.xml
loc_plat/group/bld.inf
loc_pub/group/bld.inf
loc_pub/landmarks_ui_addedit_api/group/bld.inf
loc_pub/landmarks_ui_addedit_api/inc/CLmkEditorDlg.h
loc_pub/landmarks_ui_addedit_api/landmarks_ui_addedit_api.metaxml
loc_pub/landmarks_ui_addedit_api/tsrc/bc/bcapplmkeditor/bmarm/bcapplmkaddeditu.def
loc_pub/landmarks_ui_addedit_api/tsrc/bc/bcapplmkeditor/bwins/bcapplmkaddeditu.def
loc_pub/landmarks_ui_addedit_api/tsrc/bc/bcapplmkeditor/bwins/bcapplmkeddeditu.def
loc_pub/landmarks_ui_addedit_api/tsrc/bc/bcapplmkeditor/data/bcapplmkeditor.rss
loc_pub/landmarks_ui_addedit_api/tsrc/bc/bcapplmkeditor/data/bcapplmkeditor_loc.rss
loc_pub/landmarks_ui_addedit_api/tsrc/bc/bcapplmkeditor/data/bcapplmkeditor_reg.rss
loc_pub/landmarks_ui_addedit_api/tsrc/bc/bcapplmkeditor/data/context_pane_icon.bmp
loc_pub/landmarks_ui_addedit_api/tsrc/bc/bcapplmkeditor/data/context_pane_icon_mask.bmp
loc_pub/landmarks_ui_addedit_api/tsrc/bc/bcapplmkeditor/data/list_icon.bmp
loc_pub/landmarks_ui_addedit_api/tsrc/bc/bcapplmkeditor/data/list_icon_mask.bmp
loc_pub/landmarks_ui_addedit_api/tsrc/bc/bcapplmkeditor/eabi/bcapplmkaddeditu.def
loc_pub/landmarks_ui_addedit_api/tsrc/bc/bcapplmkeditor/group/bcapplmkaddedit.mmp
loc_pub/landmarks_ui_addedit_api/tsrc/bc/bcapplmkeditor/group/bld.inf
loc_pub/landmarks_ui_addedit_api/tsrc/bc/bcapplmkeditor/group/lmae_c.bat
loc_pub/landmarks_ui_addedit_api/tsrc/bc/bcapplmkeditor/group/lmae_z.bat
loc_pub/landmarks_ui_addedit_api/tsrc/bc/bcapplmkeditor/group/tclmkaddedit.cfg
loc_pub/landmarks_ui_addedit_api/tsrc/bc/bcapplmkeditor/group/testframework.ini
loc_pub/landmarks_ui_addedit_api/tsrc/bc/bcapplmkeditor/group/ui_lmkaddedit.cfg
loc_pub/landmarks_ui_addedit_api/tsrc/bc/bcapplmkeditor/inc/bcapplmkaddedit.h
loc_pub/landmarks_ui_addedit_api/tsrc/bc/bcapplmkeditor/inc/bcapplmkeditorcontainer.h
loc_pub/landmarks_ui_addedit_api/tsrc/bc/bcapplmkeditor/inc/bcapplmkeditorengine.h
loc_pub/landmarks_ui_addedit_api/tsrc/bc/bcapplmkeditor/sis/50_loc_addedit.pkg
loc_pub/landmarks_ui_addedit_api/tsrc/bc/bcapplmkeditor/sis/50_loc_addedit.sis
loc_pub/landmarks_ui_addedit_api/tsrc/bc/bcapplmkeditor/src/bcapplmkaddedit.cpp
loc_pub/landmarks_ui_addedit_api/tsrc/bc/bcapplmkeditor/src/bcapplmkaddeditblocks.cpp
loc_pub/landmarks_ui_addedit_api/tsrc/bc/bcapplmkeditor/src/bcapplmkeditorcontainer.cpp
loc_pub/landmarks_ui_addedit_api/tsrc/bc/bcapplmkeditor/src/bcapplmkeditorengine.cpp
loc_pub/landmarks_ui_addedit_api/tsrc/bc/group/bld.inf
loc_pub/landmarks_ui_addedit_api/tsrc/bmarm/UTapplmkaddeditu.def
loc_pub/landmarks_ui_addedit_api/tsrc/bwins/UTapplmkaddeditu.def
loc_pub/landmarks_ui_addedit_api/tsrc/bwins/UTapplmkeddeditu.def
loc_pub/landmarks_ui_addedit_api/tsrc/conf/UTlmkaddedit.cfg
loc_pub/landmarks_ui_addedit_api/tsrc/conf/ui_lmkaddedit.cfg
loc_pub/landmarks_ui_addedit_api/tsrc/data/UTapplmkeditor.rss
loc_pub/landmarks_ui_addedit_api/tsrc/data/UTapplmkeditor_loc.rss
loc_pub/landmarks_ui_addedit_api/tsrc/data/UTapplmkeditor_reg.rss
loc_pub/landmarks_ui_addedit_api/tsrc/data/context_pane_icon.bmp
loc_pub/landmarks_ui_addedit_api/tsrc/data/context_pane_icon_mask.bmp
loc_pub/landmarks_ui_addedit_api/tsrc/data/list_icon.bmp
loc_pub/landmarks_ui_addedit_api/tsrc/data/list_icon_mask.bmp
loc_pub/landmarks_ui_addedit_api/tsrc/eabi/UTapplmkaddeditu.def
loc_pub/landmarks_ui_addedit_api/tsrc/group/UTapplmkaddedit.mmp
loc_pub/landmarks_ui_addedit_api/tsrc/group/bld.inf
loc_pub/landmarks_ui_addedit_api/tsrc/group/test_addedit.pkg
loc_pub/landmarks_ui_addedit_api/tsrc/inc/UTapplmkaddedit.h
loc_pub/landmarks_ui_addedit_api/tsrc/inc/UTapplmkeditorcontainer.h
loc_pub/landmarks_ui_addedit_api/tsrc/inc/UTapplmkeditorengine.h
loc_pub/landmarks_ui_addedit_api/tsrc/init/testframework.ini
loc_pub/landmarks_ui_addedit_api/tsrc/sis/test_addedit.pkg
loc_pub/landmarks_ui_addedit_api/tsrc/src/UTapplmkaddedit.cpp
loc_pub/landmarks_ui_addedit_api/tsrc/src/UTapplmkaddeditblocks.cpp
loc_pub/landmarks_ui_addedit_api/tsrc/src/UTapplmkeditorcontainer.cpp
loc_pub/landmarks_ui_addedit_api/tsrc/src/UTapplmkeditorengine.cpp
loc_pub/landmarks_ui_selector_api/group/bld.inf
loc_pub/landmarks_ui_selector_api/inc/CLmkCategorySelectorDlg.h
loc_pub/landmarks_ui_selector_api/inc/CLmkLandmarkSelectorDlg.h
loc_pub/landmarks_ui_selector_api/inc/TLmkItemIdDbCombiInfo.h
loc_pub/landmarks_ui_selector_api/inc/lmkerrors.h
loc_pub/landmarks_ui_selector_api/landmarks_ui_selector_api.metaxml
loc_pub/landmarks_ui_selector_api/tsrc/bc/bcapplmkitemiddbcombiinfo/bmarm/landmarksitemiddbcombiinfou.def
loc_pub/landmarks_ui_selector_api/tsrc/bc/bcapplmkitemiddbcombiinfo/bwins/landmarksitemiddbcombiinfou.def
loc_pub/landmarks_ui_selector_api/tsrc/bc/bcapplmkitemiddbcombiinfo/eabi/landmarksitemiddbcombiinfou.def
loc_pub/landmarks_ui_selector_api/tsrc/bc/bcapplmkitemiddbcombiinfo/group/bld.inf
loc_pub/landmarks_ui_selector_api/tsrc/bc/bcapplmkitemiddbcombiinfo/group/landmarksitemiddbcombiinfo.mmp
loc_pub/landmarks_ui_selector_api/tsrc/bc/bcapplmkitemiddbcombiinfo/group/lmdb_c.bat
loc_pub/landmarks_ui_selector_api/tsrc/bc/bcapplmkitemiddbcombiinfo/group/lmdb_z.bat
loc_pub/landmarks_ui_selector_api/tsrc/bc/bcapplmkitemiddbcombiinfo/group/tclmkitemiddbcombiinfo.cfg
loc_pub/landmarks_ui_selector_api/tsrc/bc/bcapplmkitemiddbcombiinfo/group/testframework.ini
loc_pub/landmarks_ui_selector_api/tsrc/bc/bcapplmkitemiddbcombiinfo/group/ui_lmkitemiddbcombiinfo.cfg
loc_pub/landmarks_ui_selector_api/tsrc/bc/bcapplmkitemiddbcombiinfo/inc/landmarksitemiddbcombiinfo.h
loc_pub/landmarks_ui_selector_api/tsrc/bc/bcapplmkitemiddbcombiinfo/sis/50_loc_itemdbci.pkg
loc_pub/landmarks_ui_selector_api/tsrc/bc/bcapplmkitemiddbcombiinfo/sis/50_loc_itemdbci.sis
loc_pub/landmarks_ui_selector_api/tsrc/bc/bcapplmkitemiddbcombiinfo/src/landmarksitemiddbcombiinfo.cpp
loc_pub/landmarks_ui_selector_api/tsrc/bc/bcapplmkitemiddbcombiinfo/src/landmarksitemiddbcombiinfoblocks.cpp
loc_pub/landmarks_ui_selector_api/tsrc/bc/bcapplmkselector/bmarm/lmkselectoru.def
loc_pub/landmarks_ui_selector_api/tsrc/bc/bcapplmkselector/bwins/lmkselectoru.def
loc_pub/landmarks_ui_selector_api/tsrc/bc/bcapplmkselector/eabi/lmkselectoru.def
loc_pub/landmarks_ui_selector_api/tsrc/bc/bcapplmkselector/group/bld.inf
loc_pub/landmarks_ui_selector_api/tsrc/bc/bcapplmkselector/group/lmkselector.mmp
loc_pub/landmarks_ui_selector_api/tsrc/bc/bcapplmkselector/group/lmsl_c.bat
loc_pub/landmarks_ui_selector_api/tsrc/bc/bcapplmkselector/group/lmsl_z.bat
loc_pub/landmarks_ui_selector_api/tsrc/bc/bcapplmkselector/group/tclmkselector.cfg
loc_pub/landmarks_ui_selector_api/tsrc/bc/bcapplmkselector/group/testframework.ini
loc_pub/landmarks_ui_selector_api/tsrc/bc/bcapplmkselector/group/ui_lmkselector.cfg
loc_pub/landmarks_ui_selector_api/tsrc/bc/bcapplmkselector/inc/bcapplmkselectorengine.h
loc_pub/landmarks_ui_selector_api/tsrc/bc/bcapplmkselector/inc/lmkengine.h
loc_pub/landmarks_ui_selector_api/tsrc/bc/bcapplmkselector/inc/lmkselector.h
loc_pub/landmarks_ui_selector_api/tsrc/bc/bcapplmkselector/sis/50_loc_selector.pkg
loc_pub/landmarks_ui_selector_api/tsrc/bc/bcapplmkselector/sis/50_loc_selector.sis
loc_pub/landmarks_ui_selector_api/tsrc/bc/bcapplmkselector/src/bcapplmkselectorengine.cpp
loc_pub/landmarks_ui_selector_api/tsrc/bc/bcapplmkselector/src/lmkengine.cpp
loc_pub/landmarks_ui_selector_api/tsrc/bc/bcapplmkselector/src/lmkselector.cpp
loc_pub/landmarks_ui_selector_api/tsrc/bc/bcapplmkselector/src/lmkselectorblocks.cpp
loc_pub/landmarks_ui_selector_api/tsrc/bc/group/bld.inf
loc_pub/landmarks_ui_selector_api/tsrc/bmarm/testlmuiselectoru.def
loc_pub/landmarks_ui_selector_api/tsrc/bwins/testlmuiselectoru.def
loc_pub/landmarks_ui_selector_api/tsrc/conf/UTlmkselector.cfg
loc_pub/landmarks_ui_selector_api/tsrc/conf/ui_lmkselector.cfg
loc_pub/landmarks_ui_selector_api/tsrc/eabi/testlmuiselectoru.def
loc_pub/landmarks_ui_selector_api/tsrc/group/bld.inf
loc_pub/landmarks_ui_selector_api/tsrc/group/landmarks_ui_selector_api_test.pkg
loc_pub/landmarks_ui_selector_api/tsrc/group/testlmuiselector.mmp
loc_pub/landmarks_ui_selector_api/tsrc/inc/testlmkengine.h
loc_pub/landmarks_ui_selector_api/tsrc/inc/testlmkitemiddbcombiinf.h
loc_pub/landmarks_ui_selector_api/tsrc/inc/testlmuiselector.h
loc_pub/landmarks_ui_selector_api/tsrc/init/testframework.ini
loc_pub/landmarks_ui_selector_api/tsrc/src/testlmkengine.cpp
loc_pub/landmarks_ui_selector_api/tsrc/src/testlmkitemiddbcombiinf.cpp
loc_pub/landmarks_ui_selector_api/tsrc/src/testlmuiselector.cpp
loc_pub/landmarks_ui_selector_api/tsrc/src/testlmuiselectorblocks.cpp
location.pro
location_plat/location_data_harvester_api/inc/locationdatalookupdb.h
location_plat/location_data_harvester_api/inc/locationservicedefines.h
location_plat/location_data_harvester_api/inc/maptilegeocoderplugin.h
location_plat/location_data_harvester_api/inc/maptilegeocoderplugin.inl
location_plat/location_data_harvester_api/location_data_harvester_api.pri
location_plat/location_picker_service_api/inc/qlocationpickeritem.h
location_plat/location_picker_service_api/location_picker_service_api.pri
location_plat/location_plat.pro
locationdataharvester/bwins/geocodeupdateu.def
locationdataharvester/bwins/locationdatalookupdbu.def
locationdataharvester/bwins/maptileserviceu.def
locationdataharvester/bwins/mylocationsdatabasemanageru.def
locationdataharvester/eabi/geocodeupdateu.def
locationdataharvester/eabi/locationdatalookupdbu.def
locationdataharvester/eabi/maptileserviceu.def
locationdataharvester/eabi/mylocationsdatabasemanageru.def
locationdataharvester/geocodeupdate/geocodeupdate.pro
locationdataharvester/geocodeupdate/inc/geocodeupdate.h
locationdataharvester/geocodeupdate/src/geocodeupdate.cpp
locationdataharvester/inc/mylocationsdefines.h
locationdataharvester/inc/notification.h
locationdataharvester/locationdataharvester.pro
locationdataharvester/locationdatalookupdb/locationdatalookupdb.cpp
locationdataharvester/locationdatalookupdb/locationdatalookupdb.pro
locationdataharvester/maptileservice/conf/2002E6E8.txt
locationdataharvester/maptileservice/conf/maptilecalpublisher.qcrml
locationdataharvester/maptileservice/conf/maptilecontactpublisher.qcrml
locationdataharvester/maptileservice/conf/maptileservice.confml
locationdataharvester/maptileservice/conf/maptileservice_2002E6E8.crml
locationdataharvester/maptileservice/inc/maptiledblookuptable.h
locationdataharvester/maptileservice/inc/maptileservice.h
locationdataharvester/maptileservice/maptileservice.pro
locationdataharvester/maptileservice/src/maptiledblookuptable.cpp
locationdataharvester/maptileservice/src/maptileservice.cpp
locationdataharvester/mylocationlogger/inc/mylocationlogger.h
locationdataharvester/mylocationlogger/inc/mylocloggingconfiguration.h
locationdataharvester/mylocationsdatabasemanager/inc/mylocationsdatabasemanager.h
locationdataharvester/mylocationsdatabasemanager/mylocationsdatabasemanager.pro
locationdataharvester/mylocationsdatabasemanager/src/mylocationsdatabasemanager.cpp
locationdataharvester/mylocationsengine/conf/maptilestatuspublisher.qcrml
locationdataharvester/mylocationsengine/inc/appmain.h
locationdataharvester/mylocationsengine/inc/calendarsubscriber.h
locationdataharvester/mylocationsengine/inc/calendernotification.h
locationdataharvester/mylocationsengine/inc/contactsubscriber.h
locationdataharvester/mylocationsengine/inc/lookupmaptiledb.h
locationdataharvester/mylocationsengine/inc/maptileinterface.h
locationdataharvester/mylocationsengine/inc/mylocationgeotagtimerao.h
locationdataharvester/mylocationsengine/inc/mylocationsengine.h
locationdataharvester/mylocationsengine/mylocationsengine.pro
locationdataharvester/mylocationsengine/src/appmain.cpp
locationdataharvester/mylocationsengine/src/calendarsubscriber.cpp
locationdataharvester/mylocationsengine/src/calendernotification.cpp
locationdataharvester/mylocationsengine/src/contactsubscriber.cpp
locationdataharvester/mylocationsengine/src/lookupmaptiledb.cpp
locationdataharvester/mylocationsengine/src/maptileinterface.cpp
locationdataharvester/mylocationsengine/src/mylocationgeotagtimerao.cpp
locationdataharvester/mylocationsengine/src/mylocationsengine.cpp
locationdataharvester/rom/mylocations.iby
locationlandmarksrefappfors60/Data/LmRefApp.rss
locationlandmarksrefappfors60/Data/LmRefApp_reg.rss
locationlandmarksrefappfors60/Data/category_global.bmp
locationlandmarksrefappfors60/Data/category_global_mask_soft.bmp
locationlandmarksrefappfors60/Data/category_user.bmp
locationlandmarksrefappfors60/Data/category_user_mask_soft.bmp
locationlandmarksrefappfors60/Data/default_lm.bmp
locationlandmarksrefappfors60/Data/default_lm_mask_soft.bmp
locationlandmarksrefappfors60/Inc/LandmarksAppUi.h
locationlandmarksrefappfors60/Inc/LandmarksApplication.h
locationlandmarksrefappfors60/Inc/LandmarksApplicationEngine.h
locationlandmarksrefappfors60/Inc/LandmarksCategoriesContainer.h
locationlandmarksrefappfors60/Inc/LandmarksCategoriesDialog.h
locationlandmarksrefappfors60/Inc/LandmarksCategoriesEngine.h
locationlandmarksrefappfors60/Inc/LandmarksCategoriesModel.h
locationlandmarksrefappfors60/Inc/LandmarksCategoriesView.h
locationlandmarksrefappfors60/Inc/LandmarksCommonData.h
locationlandmarksrefappfors60/Inc/LandmarksContainer.h
locationlandmarksrefappfors60/Inc/LandmarksContainerBase.h
locationlandmarksrefappfors60/Inc/LandmarksDbEventHandler.h
locationlandmarksrefappfors60/Inc/LandmarksDbObserver.h
locationlandmarksrefappfors60/Inc/LandmarksDocument.h
locationlandmarksrefappfors60/Inc/LandmarksEditDialog.h
locationlandmarksrefappfors60/Inc/LandmarksEngine.h
locationlandmarksrefappfors60/Inc/LandmarksEngineBase.h
locationlandmarksrefappfors60/Inc/LandmarksInfoContainer.h
locationlandmarksrefappfors60/Inc/LandmarksInfoModel.h
locationlandmarksrefappfors60/Inc/LandmarksInfoView.h
locationlandmarksrefappfors60/Inc/LandmarksListBoxModel.h
locationlandmarksrefappfors60/Inc/LandmarksListbox.h
locationlandmarksrefappfors60/Inc/LandmarksLmCategoriesModel.h
locationlandmarksrefappfors60/Inc/LandmarksLmOpWrapper.h
locationlandmarksrefappfors60/Inc/LandmarksModel.h
locationlandmarksrefappfors60/Inc/LandmarksOperationObserver.h
locationlandmarksrefappfors60/Inc/LandmarksPositionRequest.h
locationlandmarksrefappfors60/Inc/LandmarksUtils.h
locationlandmarksrefappfors60/Inc/LandmarksView.h
locationlandmarksrefappfors60/Inc/LmRefApp.hrh
locationlandmarksrefappfors60/Inc/LmRefApp.rls
locationlandmarksrefappfors60/Src/Landmarks.cpp
locationlandmarksrefappfors60/Src/LandmarksAppUi.cpp
locationlandmarksrefappfors60/Src/LandmarksApplication.cpp
locationlandmarksrefappfors60/Src/LandmarksApplicationEngine.cpp
locationlandmarksrefappfors60/Src/LandmarksCategoriesContainer.cpp
locationlandmarksrefappfors60/Src/LandmarksCategoriesDialog.cpp
locationlandmarksrefappfors60/Src/LandmarksCategoriesEngine.cpp
locationlandmarksrefappfors60/Src/LandmarksCategoriesModel.cpp
locationlandmarksrefappfors60/Src/LandmarksCategoriesView.cpp
locationlandmarksrefappfors60/Src/LandmarksContainer.cpp
locationlandmarksrefappfors60/Src/LandmarksContainerBase.cpp
locationlandmarksrefappfors60/Src/LandmarksDbEventHandler.cpp
locationlandmarksrefappfors60/Src/LandmarksDocument.cpp
locationlandmarksrefappfors60/Src/LandmarksEditDialog.cpp
locationlandmarksrefappfors60/Src/LandmarksEngine.cpp
locationlandmarksrefappfors60/Src/LandmarksEngineBase.cpp
locationlandmarksrefappfors60/Src/LandmarksInfoContainer.cpp
locationlandmarksrefappfors60/Src/LandmarksInfoModel.cpp
locationlandmarksrefappfors60/Src/LandmarksInfoView.cpp
locationlandmarksrefappfors60/Src/LandmarksListBox.cpp
locationlandmarksrefappfors60/Src/LandmarksListBoxModel.cpp
locationlandmarksrefappfors60/Src/LandmarksLmCategoriesModel.cpp
locationlandmarksrefappfors60/Src/LandmarksLmOpWrapper.cpp
locationlandmarksrefappfors60/Src/LandmarksModel.cpp
locationlandmarksrefappfors60/Src/LandmarksPositionRequest.cpp
locationlandmarksrefappfors60/Src/LandmarksUtils.cpp
locationlandmarksrefappfors60/Src/LandmarksView.cpp
locationlandmarksrefappfors60/gfx/qgn_menu_lmrefappfors60.svg
locationlandmarksrefappfors60/group/LmRefApp.mmp
locationlandmarksrefappfors60/group/bld.inf
locationlandmarksrefappfors60/group/icons_bitmaps_dc.miflist
locationlandmarksrefappfors60/group/lmrefapp_icons_bitmaps_dc.mk
locationlandmarksrefappfors60/group/lmrefapp_icons_scalable_dc.mk
locationlandmarksrefappfors60/sis/LmRefApp_armv5.pkg
locationlandmarksrefappfors60/sis/LmRefApp_armv5_abiv2.pkg
locationlandmarksrefappfors60/sis/LmRefApp_gcce.pkg
locationlandmarksrefappfors60/sis/backup_registration.xml
locationlandmarksuirefapp/data/lmuirefapp.rss
locationlandmarksuirefapp/data/lmuirefapp_reg.rss
locationlandmarksuirefapp/gfx/qgn_menu_lluirefapp.svg
locationlandmarksuirefapp/group/LmUiRefAppUID.h
locationlandmarksuirefapp/group/bld.inf
locationlandmarksuirefapp/group/lmuirefapp.mmp
locationlandmarksuirefapp/inc/LmUiRefApp.h
locationlandmarksuirefapp/inc/LmUiRefAppContainer.h
locationlandmarksuirefapp/inc/LmUiRefAppDocument.h
locationlandmarksuirefapp/inc/LmUiRefAppUi.h
locationlandmarksuirefapp/inc/LmUiRefAppView.h
locationlandmarksuirefapp/inc/lmuirefapp.hrh
locationlandmarksuirefapp/inc/lmuirefapp.rls
locationlandmarksuirefapp/sis/LmUiRefApp_ARMV5.pkg
locationlandmarksuirefapp/sis/LmUiRefApp_ARMV5_abiv2.pkg
locationlandmarksuirefapp/sis/LmUiRefApp_GCCE.pkg
locationlandmarksuirefapp/sis/backup_registration.xml
locationlandmarksuirefapp/src/LmUiRefApp.cpp
locationlandmarksuirefapp/src/LmUiRefAppContainer.cpp
locationlandmarksuirefapp/src/LmUiRefAppDocument.cpp
locationlandmarksuirefapp/src/LmUiRefAppUi.cpp
locationlandmarksuirefapp/src/LmUiRefAppView.cpp
locationpickerservice/inc/hgwidgetdatamodel.h
locationpickerservice/inc/locationpickerappwindow.h
locationpickerservice/inc/locationpickercollectioncontent.h
locationpickerservice/inc/locationpickercollectionlistcontent.h
locationpickerservice/inc/locationpickercontent.h
locationpickerservice/inc/locationpickerdatamanager.h
locationpickerservice/inc/locationpickerdatamanager_p.h
locationpickerservice/inc/locationpickerdocumentloader.h
locationpickerservice/inc/locationpickerproxymodel.h
locationpickerservice/inc/locationpickersearchview.h
locationpickerservice/inc/locationpickerservice.h
locationpickerservice/inc/locationpickertypes.h
locationpickerservice/inc/locationpickerview.h
locationpickerservice/locationpickerservice.pro
locationpickerservice/resources/location.hgmediawall.css
locationpickerservice/resources/location.hgmediawall.widgetml
locationpickerservice/resources/locationpicker.qrc
locationpickerservice/resources/locationpickersearchview.docml
locationpickerservice/resources/locationpickerview.docml
locationpickerservice/resources/popupdialog.docml
locationpickerservice/rom/locationpickerservice.iby
locationpickerservice/service_conf.xml
locationpickerservice/src/hgwidgetdatamodel.cpp
locationpickerservice/src/locationpickerappwindow.cpp
locationpickerservice/src/locationpickercollectioncontent.cpp
locationpickerservice/src/locationpickercollectionlistcontent.cpp
locationpickerservice/src/locationpickercontent.cpp
locationpickerservice/src/locationpickerdatamanager.cpp
locationpickerservice/src/locationpickerdatamanager_p.cpp
locationpickerservice/src/locationpickerdocumentloader.cpp
locationpickerservice/src/locationpickerproxymodel.cpp
locationpickerservice/src/locationpickersearchview.cpp
locationpickerservice/src/locationpickerservice.cpp
locationpickerservice/src/locationpickerview.cpp
locationpickerservice/src/main.cpp
locationsatviewrefapp/data/SatelliteReference.rss
locationsatviewrefapp/data/SatelliteReference_reg.rss
locationsatviewrefapp/gfx/qgn_menu_lsatviewrefapp.svg
locationsatviewrefapp/group/SatelliteReference.mmp
locationsatviewrefapp/group/bld.inf
locationsatviewrefapp/inc/SatelliteReference.hrh
locationsatviewrefapp/inc/SatelliteReference.rls
locationsatviewrefapp/inc/SatelliteReferenceApp.h
locationsatviewrefapp/inc/SatelliteReferenceAppUi.h
locationsatviewrefapp/inc/SatelliteReferenceContainer.h
locationsatviewrefapp/inc/SatelliteReferenceDocument.h
locationsatviewrefapp/sis/LocationSatViewRefApp_ARMV5.pkg
locationsatviewrefapp/sis/LocationSatViewRefApp_armv5_abiv2.pkg
locationsatviewrefapp/sis/LocationSatViewRefApp_gcce.pkg
locationsatviewrefapp/sis/backup_registration.xml
locationsatviewrefapp/src/SatelliteReferenceApp.cpp
locationsatviewrefapp/src/SatelliteReferenceAppUi.cpp
locationsatviewrefapp/src/SatelliteReferenceContainer.cpp
locationsatviewrefapp/src/SatelliteReferenceDocument.cpp
mapnavproviderrefapp/BWINS/mnrefproviderengine.50u.def
mapnavproviderrefapp/data/default_lm.bmp
mapnavproviderrefapp/data/default_lm_mask_soft.bmp
mapnavproviderrefapp/data/mnrefprovider.rss
mapnavproviderrefapp/data/mnrefprovider_reg.rss
mapnavproviderrefapp/data/mnrefproviderback.rss
mapnavproviderrefapp/data/mnrefproviderback_reg.rss
mapnavproviderrefapp/data/mnrefproviderengine.rss
mapnavproviderrefapp/data/mnrefproviderplugin.rss
mapnavproviderrefapp/eabi/mnrefproviderengine.50u.def
mapnavproviderrefapp/group/bld.inf
mapnavproviderrefapp/group/mnrefengine.mmp
mapnavproviderrefapp/group/mnrefprovider.mmp
mapnavproviderrefapp/group/mnrefproviderback.mmp
mapnavproviderrefapp/group/mnrefproviderplugin.mmp
mapnavproviderrefapp/inc/debug.h
mapnavproviderrefapp/inc/mnrp.hrh
mapnavproviderrefapp/inc/mnrpappcontrol.h
mapnavproviderrefapp/inc/mnrpapplication.h
mapnavproviderrefapp/inc/mnrpapplicationback.h
mapnavproviderrefapp/inc/mnrpappserver.h
mapnavproviderrefapp/inc/mnrpappserverback.h
mapnavproviderrefapp/inc/mnrpappui.h
mapnavproviderrefapp/inc/mnrpappuiback.h
mapnavproviderrefapp/inc/mnrpappview.h
mapnavproviderrefapp/inc/mnrpcoordconverter.h
mapnavproviderrefapp/inc/mnrpdocument.h
mapnavproviderrefapp/inc/mnrpdocumentback.h
mapnavproviderrefapp/inc/mnrpengine.h
mapnavproviderrefapp/inc/mnrpgeocodingservice.h
mapnavproviderrefapp/inc/mnrpmapcontrol.h
mapnavproviderrefapp/inc/mnrpmapimageservice.h
mapnavproviderrefapp/inc/mnrpmapmodel.h
mapnavproviderrefapp/inc/mnrpmapview.h
mapnavproviderrefapp/inc/mnrpmapviewservice.h
mapnavproviderrefapp/inc/mnrpnavicontrol.h
mapnavproviderrefapp/inc/mnrpnavigationservice.h
mapnavproviderrefapp/inc/mnrpnavimodel.h
mapnavproviderrefapp/inc/mnrpnaviview.h
mapnavproviderrefapp/inc/mnrppositionrequest.h
mapnavproviderrefapp/inc/mnrputils.h
mapnavproviderrefapp/sis/mnrefprovider_armv5.pkg
mapnavproviderrefapp/sis/mnrefprovider_bitmap_armv5.pkg
mapnavproviderrefapp/src/mnrefprovider.cpp
mapnavproviderrefapp/src/mnrefproviderback.cpp
mapnavproviderrefapp/src/mnrefproviderplugin.cpp
mapnavproviderrefapp/src/mnrpappcontrol.cpp
mapnavproviderrefapp/src/mnrpapplication.cpp
mapnavproviderrefapp/src/mnrpapplicationback.cpp
mapnavproviderrefapp/src/mnrpappserver.cpp
mapnavproviderrefapp/src/mnrpappserverback.cpp
mapnavproviderrefapp/src/mnrpappui.cpp
mapnavproviderrefapp/src/mnrpappuiback.cpp
mapnavproviderrefapp/src/mnrpappview.cpp
mapnavproviderrefapp/src/mnrpcoordconverter.cpp
mapnavproviderrefapp/src/mnrpdocument.cpp
mapnavproviderrefapp/src/mnrpdocumentback.cpp
mapnavproviderrefapp/src/mnrpengine.cpp
mapnavproviderrefapp/src/mnrpgeocodingservice.cpp
mapnavproviderrefapp/src/mnrpmapcontrol.cpp
mapnavproviderrefapp/src/mnrpmapimageservice.cpp
mapnavproviderrefapp/src/mnrpmapmodel.cpp
mapnavproviderrefapp/src/mnrpmapview.cpp
mapnavproviderrefapp/src/mnrpmapviewservice.cpp
mapnavproviderrefapp/src/mnrpnavicontrol.cpp
mapnavproviderrefapp/src/mnrpnavigationservice.cpp
mapnavproviderrefapp/src/mnrpnavimodel.cpp
mapnavproviderrefapp/src/mnrpnaviview.cpp
mapnavproviderrefapp/src/mnrppositionrequest.cpp
mapnavproviderrefapp/src/mnrputils.cpp
simpsyconfigurator/data/simpsyui.rss
simpsyconfigurator/data/simpsyui_reg.rss
simpsyconfigurator/group/bld.inf
simpsyconfigurator/group/nmea.nme
simpsyconfigurator/group/simpsyuiapp.mmp
simpsyconfigurator/group/simu_move_const.sps
simpsyconfigurator/group/simu_move_speed.sps
simpsyconfigurator/inc/simpsyfileselector.h
simpsyconfigurator/inc/simpsyfileselectormodel.h
simpsyconfigurator/inc/simpsyui.hrh
simpsyconfigurator/inc/simpsyuiao.h
simpsyconfigurator/inc/simpsyuiapp.h
simpsyconfigurator/inc/simpsyuiappui.h
simpsyconfigurator/inc/simpsyuiconsts.h
simpsyconfigurator/inc/simpsyuicontainer.h
simpsyconfigurator/inc/simpsyuidocument.h
simpsyconfigurator/inc/simpsyuilbmodel.h
simpsyconfigurator/inc/simpsyuiloc.h
simpsyconfigurator/install/simpsyconfigurator.pkg
simpsyconfigurator/src/simpsyfileselector.cpp
simpsyconfigurator/src/simpsyfileselectormodel.cpp
simpsyconfigurator/src/simpsyuiao.cpp
simpsyconfigurator/src/simpsyuiapp.cpp
simpsyconfigurator/src/simpsyuiappui.cpp
simpsyconfigurator/src/simpsyuicontainer.cpp
simpsyconfigurator/src/simpsyuidocument.cpp
simpsyconfigurator/src/simpsyuilbmodel.cpp
sysdef_1_5_1.dtd
tsrc/group/bld.inf
Binary file basiclocationinfodisplay/blid/cenrep/101F85A0.txt has changed
Binary file basiclocationinfodisplay/blid/cenrep/keys_odometersettings.xls has changed
Binary file basiclocationinfodisplay/blid/conf/odometersettings.confml has changed
Binary file basiclocationinfodisplay/blid/conf/odometersettings_101F85A0.crml has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/basiclocationinfodisplay/blid/data/backup_registration.xml	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,5 @@
+<?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/basiclocationinfodisplay/blid/engine/bwins/BlidEngu.def	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,21 @@
+EXPORTS
+	??0TNamedCoordinate@@QAE@ABN0ABVTDesC16@@@Z @ 1 NONAME ; TNamedCoordinate::TNamedCoordinate(double const &, double const &, class TDesC16 const &)
+	??0TNamedCoordinate@@QAE@ABN0MABVTDesC16@@M@Z @ 2 NONAME ; TNamedCoordinate::TNamedCoordinate(double const &, double const &, float, class TDesC16 const &, float)
+	??0TNamedCoordinate@@QAE@XZ @ 3 NONAME ; TNamedCoordinate::TNamedCoordinate(void)
+	?Accuracy@TNamedCoordinate@@QBEMXZ @ 4 NONAME ; float TNamedCoordinate::Accuracy(void) const
+	?AppMode@CBlidEng@@QAE?AW4TAppMode@1@XZ @ 5 NONAME ; enum CBlidEng::TAppMode CBlidEng::AppMode(void)
+	?CreateModelL@CBlidEng@@QAEXW4TBlidModelType@1@@Z @ 6 NONAME ; void CBlidEng::CreateModelL(enum CBlidEng::TBlidModelType)
+	?GetDistanceToDestination@CBlidEng@@QAEHAAM@Z @ 7 NONAME ; int CBlidEng::GetDistanceToDestination(float &)
+	?HasArrivedToDestination@CBlidEng@@QAEHXZ @ 8 NONAME ; int CBlidEng::HasArrivedToDestination(void)
+	?LocationModel@CBlidEng@@QBEPAVMBlidLocation@@XZ @ 9 NONAME ; class MBlidLocation * CBlidEng::LocationModel(void) const
+	?Name@TNamedCoordinate@@QBEPAVHBufC16@@XZ @ 10 NONAME ; class HBufC16 * TNamedCoordinate::Name(void) const
+	?NewL@CBlidEng@@SAPAV1@XZ @ 11 NONAME ; class CBlidEng * CBlidEng::NewL(void)
+	?RestoreL@CBlidEng@@QAEXABVCStreamStore@@VTStreamId@@@Z @ 12 NONAME ; void CBlidEng::RestoreL(class CStreamStore const &, class TStreamId)
+	?RouterModel@CBlidEng@@QBEPAVMBlidRouter@@XZ @ 13 NONAME ; class MBlidRouter * CBlidEng::RouterModel(void) const
+	?SetAccuracy@TNamedCoordinate@@QAEXABM@Z @ 14 NONAME ; void TNamedCoordinate::SetAccuracy(float const &)
+	?SetAppMode@CBlidEng@@QAEXW4TAppMode@1@@Z @ 15 NONAME ; void CBlidEng::SetAppMode(enum CBlidEng::TAppMode)
+	?SetBackLightStateL@CBlidEng@@QAEXW4TBacklightState@1@@Z @ 16 NONAME ; void CBlidEng::SetBackLightStateL(enum CBlidEng::TBacklightState)
+	?SetName@TNamedCoordinate@@QAEXABVTDesC16@@@Z @ 17 NONAME ; void TNamedCoordinate::SetName(class TDesC16 const &)
+	?SettingsModel@CBlidEng@@QBEPAVMBlidSettings@@XZ @ 18 NONAME ; class MBlidSettings * CBlidEng::SettingsModel(void) const
+	?StoreL@CBlidEng@@QAE?AVTStreamId@@AAVCStreamStore@@0@Z @ 19 NONAME ; class TStreamId CBlidEng::StoreL(class CStreamStore &, class CStreamStore &)
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/basiclocationinfodisplay/blid/engine/eabi/BlidEngu.def	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,32 @@
+EXPORTS
+	_ZN16TNamedCoordinate11SetAccuracyERKf @ 1 NONAME
+	_ZN16TNamedCoordinate7SetNameERK7TDesC16 @ 2 NONAME
+	_ZN16TNamedCoordinateC1ERKdS1_RK7TDesC16 @ 3 NONAME
+	_ZN16TNamedCoordinateC1ERKdS1_fRK7TDesC16f @ 4 NONAME
+	_ZN16TNamedCoordinateC1Ev @ 5 NONAME
+	_ZN16TNamedCoordinateC2ERKdS1_RK7TDesC16 @ 6 NONAME
+	_ZN16TNamedCoordinateC2ERKdS1_fRK7TDesC16f @ 7 NONAME
+	_ZN16TNamedCoordinateC2Ev @ 8 NONAME
+	_ZN8CBlidEng10SetAppModeENS_8TAppModeE @ 9 NONAME
+	_ZN8CBlidEng12CreateModelLENS_14TBlidModelTypeE @ 10 NONAME
+	_ZN8CBlidEng18SetBackLightStateLENS_15TBacklightStateE @ 11 NONAME
+	_ZN8CBlidEng23HasArrivedToDestinationEv @ 12 NONAME
+	_ZN8CBlidEng24GetDistanceToDestinationERf @ 13 NONAME
+	_ZN8CBlidEng4NewLEv @ 14 NONAME
+	_ZN8CBlidEng6StoreLER12CStreamStoreS1_ @ 15 NONAME
+	_ZN8CBlidEng7AppModeEv @ 16 NONAME
+	_ZN8CBlidEng8RestoreLERK12CStreamStore9TStreamId @ 17 NONAME
+	_ZNK16TNamedCoordinate4NameEv @ 18 NONAME
+	_ZNK16TNamedCoordinate8AccuracyEv @ 19 NONAME
+	_ZNK8CBlidEng11RouterModelEv @ 20 NONAME
+	_ZNK8CBlidEng13LocationModelEv @ 21 NONAME
+	_ZNK8CBlidEng13SettingsModelEv @ 22 NONAME
+	_ZTI11CBlidRouter @ 23 NONAME ; #<TI>#
+	_ZTI13CBlidLocation @ 24 NONAME ; #<TI>#
+	_ZTI13CBlidSettings @ 25 NONAME ; #<TI>#
+	_ZTI8CBlidEng @ 26 NONAME ; #<TI>#
+	_ZTV11CBlidRouter @ 27 NONAME ; #<VT>#
+	_ZTV13CBlidLocation @ 28 NONAME ; #<VT>#
+	_ZTV13CBlidSettings @ 29 NONAME ; #<VT>#
+	_ZTV8CBlidEng @ 30 NONAME ; #<VT>#
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/basiclocationinfodisplay/blid/engine/group/BlidEng.mmp	Wed Sep 01 12:31:27 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: Project definition file for BLID Engine
+*
+*/
+
+
+
+// INCLUDES
+#include <platform_paths.hrh>
+#include "../inc/BlidUID.h"         // Common Blid UID definitions
+#include <bldvariant.hrh>
+
+VENDORID	VID_DEFAULT
+
+// Target information
+TARGET  BlidEng.dll
+TARGETTYPE  dll
+UID  KAPPUID2 KBLIDENGUID3
+
+CAPABILITY CAP_GENERAL_DLL
+
+// Project source directory
+SOURCEPATH ../src
+
+// Source files
+SOURCE 	CBlidEng.cpp
+SOURCE 	DllMain.cpp
+SOURCE 	BlidModelFactory.cpp
+SOURCE 	CBlidSettings.cpp
+SOURCE 	CBlidLocation.cpp
+SOURCE 	CBlidRouter.cpp
+SOURCE 	TNamedCoordinate.cpp
+SOURCE 	CBlidMeasurementSettingListener.cpp
+SOURCE	cblidmoduleinfoobserver.cpp
+SOURCE 	Debug.cpp
+
+// Language
+LANG            SC
+
+// Userincludes
+USERINCLUDE . ../inc ../../../inc
+
+// Dependencies to system components
+APP_LAYER_SYSTEMINCLUDE
+
+LIBRARY EUSER.LIB
+LIBRARY EFSRV.LIB
+LIBRARY ESTOR.LIB
+LIBRARY LBS.LIB
+LIBRARY SYSUTIL.LIB
+LIBRARY flogger.lib
+LIBRARY eposlandmarks.lib
+LIBRARY HWRMLightClient.lib
+LIBRARY CentralRepository.lib
+LIBRARY PlatformEnv.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/basiclocationinfodisplay/blid/engine/group/bld.inf	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,37 @@
+/*
+* 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
+*    whole of a location application.
+*
+*/
+
+#include <platform_paths.hrh>
+PRJ_PLATFORMS  
+DEFAULT
+
+// Export the Blid API files
+PRJ_EXPORTS
+../inc/MBlidLocation.h 			|../../../inc/MBlidLocation.h
+../inc/CBlidEng.h	  		  	|../../../inc/CBlidEng.h
+../inc/MBlidRouter.h	  		|../../../inc/MBlidRouter.h
+../inc/MBlidSettings.h 			|../../../inc/MBlidSettings.h
+../inc/MBlidEngObserver.h 	|../../../inc/MBlidEngObserver.h
+../inc/TNamedCoordinate.h 	|../../../inc/TNamedCoordinate.h
+../inc/blidcommonconsts.h 	|../../../inc/blidcommonconsts.h
+
+PRJ_MMPFILES
+BlidEng.mmp
+
+//  End of File  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/basiclocationinfodisplay/blid/engine/inc/BlidModelFactory.h	Wed Sep 01 12:31:27 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:  A factory class which can create instances of
+*                MBlidSettings
+*
+*/
+
+
+
+#ifndef __CBLIDMODELFACTORY_H__
+#define __CBLIDMODELFACTORY_H__
+
+//  INCLUDES
+#include <e32base.h>
+#include <lbspositioninfo.h>
+#include <lbs.h>
+
+// FORWARD DECLARATIONS
+class MBlidSettings;
+class MBlidLocation;
+class MBlidRouter;
+class CBlidEng;
+// CLASS DECLARATION
+
+/**
+*  A factory class which creates needed models.
+*  This factory class creates instances of
+*  MBlidSettings.
+*
+*/
+class BlidModelFactory
+    {
+    public: // new functions
+        /**
+         * Factory method for Setting model creation.
+         * @return Pointer to settings model.
+         */
+        static MBlidSettings* SettingsL();
+
+        /**
+         * Factory method for Location model creation.
+         * @param aServer RPositionServer variable
+         * @return Pointer to location model.
+         */
+        static MBlidLocation* LocationL( RPositionServer& aServer, CBlidEng& aEngine );
+
+        /**
+         * Factory method for Router model creation.
+         * @return Pointer to router model.
+         */
+        static MBlidRouter* RouterL(); 
+    };
+
+#endif      // __BLIDMODELFACTORY_H__
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/basiclocationinfodisplay/blid/engine/inc/BlidUID.h	Wed Sep 01 12:31:27 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:  Common header for blid application UIDs.
+*
+*/
+
+
+#ifndef __BLIDUID_H__
+#define __BLIDUID_H__
+
+//  MACROS
+
+/// Blid application engine UID3
+#define KBLIDENGUID3 0x101F859F
+
+//
+// Common system UIDs
+//
+#define KAPPUID2 0x0
+
+#endif // __BLIDUID_H__
+
+// End of File
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/basiclocationinfodisplay/blid/engine/inc/CBlidEng.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,232 @@
+/*
+* 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: 
+*     Implements interface for Blid Engine.
+*
+*/
+
+
+#ifndef BLID_ENG_H__
+#define BLID_ENG_H__
+
+//  INCLUDES
+#include <e32base.h>
+#include <s32std.h>
+#include <lbspositioninfo.h>
+#include <lbs.h>
+#include <hwrmlight.h>
+
+
+// FORWARD DECLARATION
+class MBlidSettings;
+class MBlidLocation;
+class MBlidRouter;
+class TNamedCoordinate;
+
+
+// CLASS DECLARATION
+/**
+ *  Implements entry point class to BlidEng.dll
+ */
+class CBlidEng : public CBase
+    {
+    public:
+        /**
+        * Enumerations for model creation
+        */
+        enum TBlidModelType
+            {
+            EBlidSettings,
+            EBlidLocation,
+            EBlidRouter
+            };
+       
+       enum TAppMode
+			{
+			EAppForeground = 1,
+			EAppBackground
+			};
+			
+	   enum	TBacklightState
+		   {
+		   EBlidBacklightAlwaysOn,
+		   EBlidBacklightNormal
+		   };
+
+    public:
+        /**
+         * Two-phased constructor.
+         *
+         * @return CBlidEng object.
+         */
+        IMPORT_C static CBlidEng* NewL();
+
+        /**
+         * Destructor.
+         */
+        virtual ~CBlidEng();
+
+    private:
+        /**
+         * By default Symbian 2nd phase constructor is private.
+         */
+        void ConstructL();
+
+        /**
+         * C++ default constructor.
+         */
+        CBlidEng();
+
+    public: //new functions
+        /**
+         * Create stream
+         * @param aStore A reference to CStreamStore
+         * @param aRestore A reference to CStreamStore
+         * @return TStreamId
+         */ 
+        IMPORT_C TStreamId StoreL(CStreamStore& aStore,
+                                  CStreamStore& aRestore);
+
+        /**
+         * Open Stream
+         * @param aStore A reference to CStreamStore
+         * @param aStreamId 
+         */
+        IMPORT_C void RestoreL( const CStreamStore& aStore,
+                        TStreamId aStreamId );
+
+        /**
+         * Settings model getter.
+         * Ownership not transferred.
+         *
+         * @return pointer to the settings model
+         */
+        IMPORT_C MBlidSettings* SettingsModel() const;
+
+        /**
+         * Location model getter.
+         * Ownership not transferred.
+         *
+         * @return pointer to the location model
+         */
+        IMPORT_C MBlidLocation* LocationModel() const;
+
+        /**
+         * Router model getter.
+         * Ownership not transferred.
+         *
+         * @return pointer to the router model
+         */
+        IMPORT_C MBlidRouter* RouterModel() const;
+
+        /**
+         * Model creator.
+         *
+         * @param aModel model identificator.
+         */
+        IMPORT_C void CreateModelL( TBlidModelType aModel );
+        
+        /**
+         * Returns the distance to the currently set destination
+         *
+         * @param aDistance. Holds the distance to the destination 
+         * on return.
+         */
+        IMPORT_C TInt GetDistanceToDestination(TReal32& aDistance);
+        
+        /**
+         * Determines if user has arrived to the 
+         * set destination using an algorithm described in the
+         * defination. 
+         *
+         * @ return value
+         * Returns ETrue if current position is in vicinity of the 
+         * set destination 
+         * 
+         * EFalse otherwise.         
+         */
+        IMPORT_C TBool HasArrivedToDestination();
+        
+        /**
+         * Sets the application mode (i.e Background or Foreground)
+         *
+         * @param aMode. 
+         * EAppBackground if Background, 
+         * EAppForeground if Foreground                 
+         */
+        IMPORT_C void SetAppMode(TAppMode aMode);
+        
+        /**
+         * Sets the Backlight state
+         *
+         * @param aState. 
+         * EBlidBacklightAlwaysOn if backlight should always be on
+		 * EBlidBacklightNormal if backlight should be as per general settings 
+         */
+        IMPORT_C void SetBackLightStateL(TBacklightState aState);
+    
+        /**
+         * Returns the application mode
+         * 
+         * @return value
+         * EAppForeground if application in foreground
+         * EAppBackground if application in background
+         */
+        IMPORT_C TAppMode AppMode();
+
+    private: // new functions
+        /**
+         * Save engine's data to file
+         * @param aStream A reference to RWriteStream
+         */ 
+        void ExternalizeL( RWriteStream& aStream ) const;  
+
+        /**
+         * Load initial data from file 
+         * @param aSteam A reference to RReadStream
+         */
+        void InternalizeL( RReadStream& aStream );
+
+        /**
+         * Load initial data from file 
+         * @param aSteam A reference to RReadStream
+         */
+        void InternalizeV1L( RReadStream& aStream );
+
+    private:    // data
+        /// Own: Settings model
+        MBlidSettings* iSettings;
+
+        /// Own: Location model
+        MBlidLocation* iLocation;
+
+        /// Own: Router model
+        MBlidRouter* iRouter;
+
+        /// Own: iServer
+        RPositionServer iServer; 
+        
+        /// stream id
+        mutable TStreamId iStreamId;   
+                
+        //Application mode (foreground/background)
+        TAppMode iAppMode;
+        
+        //Own: Pointer to Backlight resource class
+        CHWRMLight*     iHWRMLight;
+    };
+
+#endif // BLID_ENG_H__
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/basiclocationinfodisplay/blid/engine/inc/CBlidLocation.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,496 @@
+/*
+* 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:  Provides access to Blid location.
+*
+*/
+
+
+
+#ifndef CBLIDLOCATION_H
+#define CBLIDLOCATION_H
+
+//  INCLUDES
+#include <e32base.h>
+#include <lbspositioninfo.h>
+#include <lbs.h>
+#include <lbssatellite.h>
+#include "MBlidLocation.h"
+#include "CBlidEng.h"
+
+// CLASS DECLARATION
+class CBlidModuleinfoObserver;
+
+
+/**
+*  A Blid engine API for blid application.
+*  Provides access to blid location.
+*  This class implements the MBlidLocation interface provided by this dll.
+*
+*/
+class CBlidLocation : public CActive, public MBlidLocation
+    {
+    public:  // Constructors and destructor
+        /**
+         * Two-phased constructor.
+         * @param aServer RPositionServer variable
+         */
+        static CBlidLocation* NewL( RPositionServer& aServer, CBlidEng& aEngine );
+
+        /**
+         * Destructor.
+         */
+        virtual ~CBlidLocation();
+        
+        void TimerCallBackL();
+
+    private:
+        /**
+         * C++ default constructor.
+         * @param aServer RPosition variable
+         */
+        CBlidLocation( RPositionServer& aServer,CBlidEng& aEngine );
+
+        /**
+         * By default Symbian 2nd phase constructor is private.
+         */
+        void ConstructL();
+
+    private: // From MBlidLocation
+        //Current view Id needed to set the update options accordingly.
+        void SetObserver(MBlidEngObserver& aObserver, TInt aViewId);
+        void RemoveModelObserver();
+        void InitialLocationRequestL( const TDesC& aSrvName );
+        TPosition& GetCurrentPosition();
+        TCourse& GetCourse();
+        void CancelRequest();
+        void StopRequesting();
+        void StartRequesting();
+        TBool IsOnline();
+        TBool SatelliteCapability();
+        TReal SpeedAverage();
+        TInt GetPositionInfoStatus() ;
+        TReal MaxSpeed();
+        void ResetMaxSpeed();
+        void ResetAvgSpeed();
+        void GetModuleInfoStatus(TPositionModuleStatusBase& aPosModuleStatus);
+        void GetNumOfSatellitesL(TInt& anumSatellites);
+        TReal32 GetHeading();
+        void CalculateCourse();        
+
+        TBool WasGPSAvailableOnTripStop();
+        TBool CheckIfWaitingGPSData();
+        TInt GetRegisteredViewId();
+        void GetModuleInfoNotificationL();
+        void SetNavigationStart( TBool aNavigationStart );
+        void ResetOdometerValue();
+        TBool IsSatCapablePsyAvailable();
+        TInt NumberOfSatellitesVisible();
+        TBool IsSatellitesUsed( TInt aIndex );
+        TInt GetSatelliteSignalStrength( TInt aIndex );
+        TInt GetSatelliteNo( TInt aIndex );
+
+    private: // From CActive
+        void RunL();
+        void DoCancel();
+        TInt RunError(TInt aError);
+        CPeriodic *iTimer;
+        
+    private: //New functions
+    
+        // Indicates the connection status to GPS device
+        enum TDeviceConStatus
+            {
+            EDeviceConnected,
+            EDeviceNotFound,
+            EDeviceUnderConnection
+            };
+        /**
+         * Update request interval time
+         * @param aIntervalTime time in microseconds
+         */
+        void UpdateIntervalL( const TInt aIntervalTime );
+        
+        /**
+         * Sets the update options based 
+         * on the view and its conditions
+         */
+        void SetUpdateOptions();
+
+        /**
+         * Check if satellite information is available
+         * @return TBool, ETrue if is capability and EFalse if not
+         */
+        TBool IsSatelliteCapabilityL();  
+        
+        /**
+         * Calculates all the data for current trip
+         *
+         */
+        void UpdateTripData();  
+
+        /**
+         * Calculate trip time
+         * 
+         */
+
+        void CalculateTripTimeL( );
+        
+        /**
+         * Calculate total time
+         * 
+         */
+
+        void CalculateTotalTimeL( ); 
+        
+        /**
+         * Gets the trip time
+         */        
+        void GetTripTime(  TTimeIntervalSeconds& aTime );  
+        
+        /**
+         * Gets the total view time 
+         */
+        void GetTotalTime( TTimeIntervalSeconds& aTime );  
+        
+        /**
+         * Check to see if any distance
+         * is travelled
+         */
+        TBool IsTripDistanceTravelled(); 
+        
+        /**
+         * Check to see if any distance
+         * is travelled
+         */
+        TBool IsTotalDistanceTravelled(); 
+        
+        /**
+         * Gets the trip
+         * distance
+         */
+        void GetTripDistance( TReal32& aDistance ); 
+        
+        /**
+         * Gets the total distance
+         */
+        void GetTotalDistance( TReal32& aDistance ); 
+        
+        /**
+         * Set the trip start variable
+         */
+        void SetTripStartL() ;
+        
+        /**
+         * Return the iIsTripStart variable
+         */
+        TBool HasTripStarted() ;
+        
+        /**
+         * Set the trip stop variable
+         */
+        void SetTripStop() ;
+        
+        /**
+         * Return the iIsTripNotStart variable
+         */
+        TBool HasTripNotStarted() ;
+
+    	/**
+    	 * All the display for the current trip are
+    	 * reset
+    	 */
+        void ResetTrip();
+
+        /**
+    	 * Resets only the trip 
+    	 *
+    	 */
+        void SetTripResumeL();
+        
+        /**
+         * Set the trip clear variable
+         */
+        void SetTripClear( ) ;
+        
+        /**
+         * Return the iIsTripClear variable
+         */
+        TBool IsTripCleared( ) ;
+        
+        /**
+         * To set the iIsTripClear variable to false
+         */
+        void ResetTripClear();
+        
+        /**
+         * Function to check if trip
+         * is stopped and is reset
+         */
+        TBool IsTripReset();
+        
+        /**
+         * Function to check if GPS
+         * device is paired 
+         */
+        TInt CheckGPSAvailability();
+        
+        /**
+         * Function to check if GPS
+         * data is available. i.e 
+         * if satellites are visible
+         */
+        TBool IsGPSDataAvailable();
+        
+        /**
+         * Trip meter function to get the
+         * average speed in the trip
+         */
+        TReal32 GetTripAverageSpeed();
+        
+        /**
+         * Trip meter function to get the
+         * maximum speed in the trip
+         */
+        TReal32 GetTripMaxSpeed();
+        
+        /**
+         * Trip meter function to determine
+         * if GPS data was lost when trip was running
+         */
+        TBool WasGPSDataLost();
+        
+        /**
+         * Set function for trip meter GPS data
+         * availability
+         */
+        void SetGPSDataAvailability(TBool aAvailability);
+        
+        /**
+         * Function to get the current update
+         * interval set
+         */
+        void GetCurrentUpdateInterval(TInt& aInterval);
+        
+        /**
+         * Function to check if GPS data is awaited.
+         * Returns true if connection to the GPS device is 
+         * being established or if connection is being established
+         * and some satellites are visible but fix not available
+         */
+        TBool WaitingGPSData();
+        
+        /**
+         * Function to get the current PSY status
+         * @return TBool, ETrue if is connected and EFalse if not
+         */        
+        TBool IsGPSDeviceConnected();
+        
+		TInt GetSatelliteData( TUint aIndex, TSatelliteData& aSatelliteData); 
+		
+		void SortSatelliteDataL();       
+                
+    private: // Data
+        /// Ref: Observer interface to Blid application engine
+        MBlidEngObserver* iObserver;
+
+        ///  RPositioner
+        RPositioner iPositioner;
+
+        ///  TPosition
+        TPosition iPosition;
+
+        ///  TCource
+        TCourse iCourse;
+
+        ///  TPositionCourseInfo
+        TPositionSatelliteInfo iPositionInfo;
+                
+        /// Ref: iServer
+        RPositionServer& iServer;
+
+        ///  Update interval time
+        TBool iUpdateInterval;
+
+        ///  Start and stop requesting
+        TBool iRequesting;
+
+        ///  Online / Offline mode
+        TBool iOnlineMode;
+
+        ///  Capable of returning satellite information
+        TBool iSatelliteCapability;
+
+        /// TReal variable
+        TReal iSpeedAverage;
+
+        /// TReal variable
+        TReal iMaxSpeed;
+
+        /// TReal array
+        RArray<TReal> iSpeedArray;
+
+        /// TInt variable 
+        TInt iCount;
+        
+        /// Bearing variable
+        TInt iBearing;
+
+        /// Is bearing data available
+        TBool iIsBearing;
+
+        /// Is Heading data available
+        TBool iIsHeading;
+
+        /// distance variable
+        TReal32 iDistance;
+
+        /// Is Distance data available
+        TBool iIsDistanceTravelled;
+
+        /// Is Distance data available
+        TBool iIsDistance;
+
+        /// duration variable
+        TTime iDuration;
+
+        /// duration in seconds
+        TReal64 iDurationInSeconds;
+
+         /// duration in seconds
+        TReal64 iTotalDurationInSeconds;
+        
+        /// Speed variable
+        TReal iSpeed;
+
+        /// Is speed data available
+        TBool iIsSpeed;
+
+        /// Distance travelled variable
+        TReal32 iDistanceTravelled;
+
+        ///Total Distance travelled variable
+        TReal32 iTotalDistanceTravelled;
+
+        /// Trip time variable
+        TTime iTripTime;
+
+        /// Trip time variable
+        TTime iTotalTime;
+
+        /// Own: A pointer to TLocale object
+        TLocale* iLocale;
+        
+        /// Holds the previously recorded position
+        TPosition iPrevPosition; 
+        
+        /// Holds the previous position for course calculations
+        TPosition iPrevCoursePosition;
+        
+        /// Holds the time at which trip meter was started
+        TTime iInitTripTime;
+        
+         /// Is Trip Started available
+        TBool iIsTripStart;
+
+		/// Is Trip Not Started available
+        TBool iIsTripNotStart;
+        
+        /// Holds the time at which trip meter has started
+        TTime iInitViewTime;
+        
+        /// Holds the trip meter timing
+        TTimeIntervalSeconds iTripInterval;
+        
+        /// Holds the total time
+        TTimeIntervalSeconds iTotalInterval;
+        
+        /// Is speed data available
+        TBool iIsTripClear;
+        
+        /// Holds the time when Trip has stopped
+        TTime iStoppedTime;
+        
+        // Boolean to determine if trip has been reset       
+        TBool iIsTripReset;
+        
+        /// Request status from Location FW
+        TRequestStatus iPosStatus;
+        
+        /// Holds the heading angle
+        TReal32 iHeading;
+        
+        /// Boolean to detrmine if GPS data is available
+        TBool iGPSDataAvailable;
+        
+        /// Boolean to determine if GPS data was available when
+        /// trip meter was stopped
+        TBool iWasGPSDataAvailableOnTripStop;
+        
+        // Average speed of the trip
+        TReal32 iTripAverageSpeed;
+        
+        // Maximum speed in the trip
+        TReal32 iTripMaxSpeed;
+        
+        // Boolean to determine if GPS data was lost when
+        // trip meter was running
+        TBool iTripGPSDataLost;
+        
+        // Id of the view registered by the
+        // SetObserver API
+        TInt iRegisteredViewId;
+                
+        // Pointer to the engine. Needed to 
+        // get pointer to the router
+        CBlidEng& iEngine;
+        
+        // Value of the current
+        // update interval set
+        TInt iCurrentUpdateInterval;
+        
+        /// Boolean to detrmine if variable iPrevPosition 
+        /// was updated to hold the appropriate previous position
+        TBool iIsPreviousPositionUpdated;
+        
+        /// Boolean to determine if the system is waiting for GPS data
+        TBool iWaitingGpsData;
+        
+        // Boolean to determine if the first update has been received or not
+        TBool iUpdateReceived;
+        
+        TUint iModuleCount;
+        
+        RArray<TPositionModuleInfo> iModuleInfoArray;
+    	
+    	CBlidModuleinfoObserver*	iModuleInfoObserv;
+    	
+    	
+    #ifdef _DEBUG
+    private:
+        // for testing
+        friend class T_CBLIDLOCATION;
+    #endif
+        
+        //Variable holds the PSY status.
+        TDeviceConStatus iDeviceStatus;
+        
+        TTime            iLastGoodFixTime;
+
+    	RArray<TSatelliteData> iSortedSatData;        
+    };
+
+
+#endif      // CBLIDLOCATION_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/basiclocationinfodisplay/blid/engine/inc/CBlidMeasurementSettingListener.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,117 @@
+/*
+* 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:  Provides Update Measurement Settings Value from Central
+*                repository
+*
+*/
+
+
+#ifndef CBLIDMEASUREMENTSETTINGLISTENER_H
+#define CBLIDMEASUREMENTSETTINGLISTENER_H
+
+//  System Includes
+#include <e32base.h>
+
+// User Includes
+#include "MBlidMeasurementSettings.h"
+
+// Forward Declarations
+class CRepository;
+
+// Constant Declarations
+
+// Class Definition
+/**
+ * Listener for getting the System of Measurement settings
+ */
+NONSHARABLE_CLASS( CBlidMeasurementSettingListener ) : public CActive
+	{
+	public:
+		/**
+         * Creates new System of Measurement Listener
+         *
+         * @param  aListenerObsrv                   Observer to the Settings Listener
+		 * @return CBlidMeasurementSettingListener*	Pointer to the CBlidSettings
+         */                                                 
+        static CBlidMeasurementSettingListener* NewL( 
+                            MBlidMeasurementSettings&	aListenerObsrv );
+
+
+		/**
+         * Creates new System of Measurement Listener
+         * Leaves the object on the Clean up stack         
+         *
+         * @param  aListenerObsrv			            Observer to the Settings adapter
+		 * @return CBlidMeasurementSettingListener*	    Pointer to the CBlidSettings
+         */                                                 
+        static CBlidMeasurementSettingListener* NewLC( 
+                            MBlidMeasurementSettings&	aListenerObsrv );	
+
+ 
+		/**
+		 * Destructor
+		 */
+		~CBlidMeasurementSettingListener ();
+
+		/**
+		 * Returns the current value of the System of measurements settings
+		 *
+		 * @return TReal32  Current value of the System of measurements settings
+		 */
+		TReal32 SysofMeasurementL();
+        
+    protected:
+        /**
+         * Inherited from CActive
+         */
+        void RunL();
+        
+        /**
+         * Inherited from CActive
+         */
+        void DoCancel();
+                		
+	private:
+		/**
+ 		 * Constructor
+		 */
+		CBlidMeasurementSettingListener( MBlidMeasurementSettings&	aListenerObsrv );
+
+		/**
+		 * Second Phase Constructor
+		 */
+		void ConstructL();
+	
+		/**
+		 * Start notification from the Central repository server for any changes in the
+		 * System of measurements key value
+		 */
+		void StartNotification();
+				
+	private:
+	    /**
+	     * Reference to the Settings observer
+	     */
+		MBlidMeasurementSettings&     iObserver;
+	
+		/**
+		 * Reference to the Central repository object
+		 *
+		 * Owns
+		 */
+		CRepository*                    iRepository; 		
+	};			
+
+
+#endif //CBLIDMEASUREMENTSETTINGLISTENER_H
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/basiclocationinfodisplay/blid/engine/inc/CBlidRouter.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,107 @@
+/*
+* 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:  Provides access to Blid router
+*
+*/
+
+
+#ifndef CBLIDROUTER_H
+#define CBLIDROUTER_H
+
+//  INCLUDES
+#include <e32base.h>
+#include <e32std.h>
+#include <f32file.h> // RFs
+#include <EPos_CPosLandmark.h>
+
+#include "MBlidRouter.h"
+
+
+// CLASS DECLARATION
+
+/**
+*  A Blid engine API for blid application.
+*  Provides access to blid router.
+*  This class implements the MBlidRouter interface provided by this dll.
+*
+*/
+class CBlidRouter : public CBase, public MBlidRouter
+    {
+    public:  // Constructors and destructor
+        /**
+         * Two-phased constructor.
+         */
+        static CBlidRouter* NewL();
+
+        /**
+         * Destructor.
+         */
+        virtual ~CBlidRouter();
+
+    private:
+        /**
+         * C++ default constructor.
+         */
+        CBlidRouter();
+
+        /**
+         * By default Symbian 2nd phase constructor is private.
+         */
+        void ConstructL();
+
+    private: // From MBlidRouter
+    	TNamedCoordinate& At( TInt aIndex );
+		TInt AppendL( TNamedCoordinate* aCoordinate, TBool aCheckForMemory );
+		TInt RemoveL( TInt aIndex );
+        void ResetAndDestroy();
+		TInt Count();
+        TNamedCoordinate* Waypoint();
+        TInt IndexOfWaypoint() const;
+        void SetWaypoint( const TInt aIndex );
+        void RemoveWaypoint();
+        void ExternalizeL( RWriteStream& aStream );
+        void InternalizeV1L( RReadStream& aStream );
+        CPosLandmark* Landmark() const;
+        void SetLandmark(CPosLandmark* aLandmark);
+        TBool IsWaypointSet();
+        TBool IsAnyPointSet();
+        void  ClearSetPoints();
+        void SetManualWaypoint(TReal latitude, TReal longitude, TDesC& aName);        
+        TInt FindWaypointIndex( TNamedCoordinate* aCoordinate );
+        
+    private:
+        ///Own: array variable
+      	RPointerArray<TNamedCoordinate> iRoute;
+
+        ///Ref: Current set waypoint
+        TNamedCoordinate iWaypoint;
+
+        ///index of waypoint
+        TInt iWaypointIndex;
+        
+        ///to determine waypoint, landmark or none set
+        TBool iIsWaypoint;
+        
+        ///Own:Landmark
+        CPosLandmark* iLandmark;
+        
+        ///Own: manual waypoint set
+        TNamedCoordinate iManualWaypoint;
+        
+    };
+
+
+#endif      // CBLIDROUTER_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/basiclocationinfodisplay/blid/engine/inc/CBlidSettings.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,107 @@
+/*
+* 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:  Provides access to Blid settings.
+*
+*/
+
+
+
+#ifndef CBLIDSETTINGS_H
+#define CBLIDSETTINGS_H
+
+//  INCLUDES
+#include <e32base.h>
+#include "MBlidSettings.h"
+#include "MBlidMeasurementSettings.h"
+
+/// FORWARD DECLARATION
+class MBlidEngObserver;
+class CBlidMeasurementSettingListener;
+class CRepository;
+
+// CLASS DECLARATION
+
+/**
+*  A Blid engine API for blid application.
+*  Provides access to blid settings.
+*  This class implements the MBlidSettings interface provided by this dll.
+*
+*/
+class CBlidSettings : public CBase, public MBlidSettings,public MBlidMeasurementSettings
+    {
+    public:  // Constructors and destructor
+        /**
+         * Two-phased constructor.
+         */
+        static CBlidSettings* NewL();
+
+        /**
+         * Destructor.
+         */
+        virtual ~CBlidSettings();
+
+    private:
+        /**
+         * C++ default constructor.
+         */
+        CBlidSettings();
+
+        /**
+         * By default Symbian 2nd phase constructor is private.
+         */
+        void ConstructL();
+
+    private: // From MBlidSettings
+        void SetAltCalibration( const TReal32 aAltCalibration );
+        TReal32 AltCalibration();
+        TReal32 UnitOfMeasurement();
+        void SetBacklightOption( const TReal32 aBacklightOption );
+        TReal32 GetBacklightOption();
+        void SetArrivedToneName( const TDesC8& aArrivedToneName );
+        TDesC8& GetArrivedToneName();
+        void SetResetOdometerOption( const TReal32 aIsOdoReset );
+        TReal32 GetResetOdometerOption();
+        void SetArrivedDistance( TReal32 aDistance );
+        TReal32 GetArrivedDistance( );
+        
+    private: //From MBlidMeasurementSettings
+        void HandleSysMeasureValueL( );        
+
+    private:        
+        // Own: altitude calibration
+        TReal32 iAltCalibration;
+        
+        //Own:  Measurement Unit
+        TReal32 iMeasurementUnit;
+        
+        //Own:  Backlight Settings Option
+        TReal32 iBacklightOption;
+
+		TReal32	iIsOdoReset;
+		
+		HBufC8*	iArrivedToneName;
+		/**
+		 * System of measurements settings handle
+		 * Owns
+		 */ 
+        CBlidMeasurementSettingListener*    iSysofMeasSettings;
+        
+        TReal32 iArrivedDistance;
+        
+        CRepository* iRepository;
+    };
+
+#endif      // CBLIDSETTINGS_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/basiclocationinfodisplay/blid/engine/inc/Debug.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,34 @@
+/*
+* 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:  Debug contains debug macros.
+*
+*/
+
+
+#ifndef DEBUG_H
+#define DEBUG_H
+// INCLUDES
+#include <e32std.h>
+
+// MACROS
+#ifdef _DEBUG
+#define DEBUG(TEXT) Debug( _L(#TEXT) );
+#define DEBUG1(TEXT, ARG1) Debug( _L(#TEXT), (ARG1) );
+#define DEBUG2(TEXT, ARG1, ARG2) Debug( _L(#TEXT), (ARG1), (ARG2) );
+#define DEBUG3(TEXT, ARG1, ARG2, ARG3) Debug( _L(#TEXT), (ARG1), (ARG2), (ARG3) );
+
+void Debug( TRefByValue<const TDesC> aText, ...);
+#endif
+
+#endif /* DEBUG_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/basiclocationinfodisplay/blid/engine/inc/DllMain.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,45 @@
+/*
+* 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:  Dll entry point
+*
+*/
+
+
+#ifndef __BLIDENG_DLLMAIN_H__
+#define __BLIDENG_DLLMAIN_H__
+
+//  INCLUDES
+#include <e32std.h>
+
+// DATA TYPES
+/// Basic Location info display application's engine panic codes.
+enum TBlidEnginePanicCode
+    {
+    ELCEModelTypeNotSupported= 0
+    };
+
+// FUNCTION PROTOTYPES
+/**
+ * Stop the program execution with module specific text and error code.
+ * Call if an unrecoverable error occurs in this module's code.
+ *
+ * @param aCode     error code
+ *
+ * @see TBlidEngPanicCode
+ */
+void BlidEngPanic(TInt aCode);
+
+#endif // __BLIDENG_DLLMAIN_H__
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/basiclocationinfodisplay/blid/engine/inc/MBlidEngObserver.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,48 @@
+/*
+* 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:  Provides an observer interface to blid application engine.
+*
+*/
+
+
+
+#ifndef __MBLIDENGOBSERVER_H__
+#define __MBLIDENGOBSERVER_H__
+
+// CLASS DECLARATIONS
+/**
+*  Engine provides this API only for Blid application.
+*
+*/
+class MBlidEngObserver
+    {
+    public: // New functions
+        /**
+         * Notifies the engine observer about occured event.
+         * Engine observer has to update its data when this function is called.
+         * @param aOnlineMode if ETrue application is online and if
+         * EFalse application is offline.
+         */
+        virtual void NotifyL( const TBool aOnlineMode ) = 0;
+
+        /**
+         * Called if occured event causes a leave in previous NotifyL method.
+         * @param aErrorCode Occured general errorcode.
+         */
+        virtual void NotifyErrorL( TInt aErrorCode ) = 0;
+    };
+
+#endif      // __MBLIDENGOBSERVER_H__
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/basiclocationinfodisplay/blid/engine/inc/MBlidLocation.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,313 @@
+/*
+* 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:  Blid Location can be requested.
+*
+*/
+
+
+
+#ifndef __MBLIDLOCATION_H__
+#define __MBLIDLOCATION_H__
+
+// INCLUDES
+#include <lbspositioninfo.h>
+#include <lbs.h>
+
+// FORWARD DECLARATIONS
+class MBlidEngObserver;
+class TPosition;
+class TCourse;
+class RPositionServer;
+// CLASS DECLARATION
+
+/**
+*  This Blid application engine API is only used by Blid application.
+*  Blid location can be requested with help of this API.
+*
+*/
+class MBlidLocation
+    {
+    public:  // Constructors and destructor
+        /**
+         * Destructor.
+         */
+        virtual ~MBlidLocation(){};
+
+    public: // New functions
+        /**
+         * Sets location observer
+		 *
+         * @param aObserver A reference to observer
+         */
+        virtual void SetObserver(MBlidEngObserver& aObserver, TInt aViewId) = 0;
+
+        /**
+         * Removes location observer
+         *
+         */
+        virtual void RemoveModelObserver() = 0;
+
+        /**
+         * Initialize location request, must call StartRequesting()
+         * method after this.
+         */
+        virtual void InitialLocationRequestL( const TDesC& aSrvName ) = 0;
+
+        /**
+         * Get current position
+         *
+         */
+        virtual TPosition& GetCurrentPosition() = 0;
+
+        /**
+         * Get position course info
+         *
+         */
+        virtual TCourse& GetCourse() = 0;
+
+        /**
+         * Cancel request
+         */
+        virtual void CancelRequest() = 0;
+
+        /**
+         * Stop requesting
+         */
+        virtual void StopRequesting() = 0;
+
+        /**
+         * Start requesting
+         */
+        virtual void StartRequesting() = 0;
+
+        /**
+         * Is application online or offline mode
+         * ETrue = online, EFalse = offline
+         */
+        virtual TBool IsOnline() = 0;
+
+        /**
+         * Is PSY capable of returning satellite information
+         * ETrue if can, EFalse id can't
+         */
+        virtual TBool SatelliteCapability() = 0;
+
+        /**
+         * Return speed average
+         * @return speed average
+         */
+        virtual TReal SpeedAverage() = 0;
+
+        /**
+         * Return status of position query
+         * @return istatus
+         */
+        virtual TInt GetPositionInfoStatus() = 0;
+
+        /**
+         * Return status of the PSY
+         * @return istatus
+         */
+        virtual void GetModuleInfoStatus(TPositionModuleStatusBase& aPosModuleStatus) = 0;
+
+        /**
+         * Returns number of satellites
+         * @return istatus
+         */
+        virtual void GetNumOfSatellitesL(TInt& anumSatellites) = 0;
+        
+        /**
+         * Return max speed
+         * @returns max speed
+         */
+        virtual TReal MaxSpeed() = 0;
+
+	    /**
+         * Resets max speed variable
+         * 
+         */
+        virtual void ResetMaxSpeed() = 0;
+
+	    /**
+         * Resets avg speed variable
+         * 
+         */
+        virtual void ResetAvgSpeed()=0;
+        
+        /**
+         * Set the trip start variable
+         */
+        virtual void SetTripStartL( )=0 ;
+        
+        /**
+         * Return the iIsTripStart variable
+         */
+        virtual TBool HasTripStarted( )=0 ;
+        
+        /**
+         * Set the trip stop variable
+         */
+        virtual void SetTripStop()=0 ;
+        
+        /**
+         * Return the iIsTripNotStart variable
+         */
+        virtual TBool HasTripNotStarted( ) =0 ;
+
+    	/**
+    	 * All the display for the current trip are
+    	 * reset
+    	 */
+         virtual void ResetTrip() = 0;
+
+         virtual void GetTripTime(  TTimeIntervalSeconds& aTime )=0;  
+            
+         virtual void GetTotalTime( TTimeIntervalSeconds& aTime )=0;  
+            
+         virtual TBool IsTripDistanceTravelled()=0; 
+            
+         virtual TBool IsTotalDistanceTravelled() = 0; 
+            
+         virtual void GetTripDistance( TReal32& aDistance ) = 0; 
+            
+         virtual void GetTotalDistance( TReal32& aDistance ) = 0; 
+            
+         virtual void SetTripResumeL()=0;     
+         
+         /**
+          * Set the trip clear variable
+          */
+         virtual void SetTripClear( ) = 0 ;
+            
+         /**
+          * Return the iIsTripClear variable
+          */
+         virtual TBool IsTripCleared( ) = 0 ;
+            
+         /**
+          * To set the iIsTripClear variable to false
+          */
+         virtual void ResetTripClear() = 0;  
+         
+         /**
+         * Function to check if trip
+         * is stopped and is reset
+         */
+         virtual TBool IsTripReset() = 0;
+         
+         /**
+         * Function to return the recorded 
+         * heading
+         *
+         */
+         virtual TReal32 GetHeading() = 0;
+         
+         /**
+         * Function to check if GPS
+         * device is paired and if available
+         */
+         virtual TInt CheckGPSAvailability() = 0;
+         
+         /**
+         * Function to check if GPS
+         * data is available. i.e 
+         * if satellites are visible
+         */
+         virtual TBool IsGPSDataAvailable() = 0;
+         
+         /**
+         * Trip meter function to get the
+         * average speed in the trip
+         */
+         virtual TReal32 GetTripAverageSpeed() = 0;
+         
+         /**
+         * Trip meter function to get the
+         * maximum speed in the trip
+         */
+         virtual TReal32 GetTripMaxSpeed() = 0;
+         
+         /**
+         * Trip meter function to determine
+         * if GPS data was lost when trip was running
+         */
+         virtual TBool WasGPSDataLost() = 0;
+        
+         /**
+         * Set function for trip meter GPS data
+         * availability
+         */
+         virtual void SetGPSDataAvailability(TBool aAvailability) = 0;
+         
+         /**
+         * Function to get the current update
+         * interval set
+         */
+         virtual void GetCurrentUpdateInterval(TInt& aInterval) = 0;
+         
+         /**
+         * Function to determine if GPS data was available
+         * when trip was stopped
+         */
+         virtual TBool WasGPSAvailableOnTripStop() = 0;
+         
+         /**
+         * Function to check if GPS data is awaited.
+         * Returns true if connection to the GPS device is 
+         * being established or if connection is being established
+         * and some satellites are visible but fix not available
+         */
+         virtual TBool WaitingGPSData() = 0;
+         
+         /**
+         * Function to get the PSY connection status
+         */         
+         virtual TBool IsGPSDeviceConnected() = 0;
+         
+         /**
+         * Function to get the Registered View ID
+         */         
+         virtual TInt GetRegisteredViewId() = 0;
+         
+         /**
+         * Function to get the PSY module status
+         * notification event to CBlidLocation //added for TSW error.
+         */         
+         virtual void GetModuleInfoNotificationL() = 0;
+
+        /**
+         * Set the Navigation start variable
+         */
+        virtual void SetNavigationStart( TBool aNavigationStart )=0 ;
+        
+        /**
+         * Reset Odometer Valye
+         */
+        virtual void ResetOdometerValue()=0 ;
+        
+        virtual TBool IsSatCapablePsyAvailable() = 0;
+        
+        virtual TInt NumberOfSatellitesVisible() = 0;
+        
+        virtual TBool IsSatellitesUsed( TInt aIndex ) = 0;
+        
+        virtual TInt GetSatelliteSignalStrength( TInt aIndex ) = 0;
+        
+        virtual TInt GetSatelliteNo( TInt aIndex ) = 0;
+         
+    };
+
+#endif      // __MBLIDLOCATION_H__
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/basiclocationinfodisplay/blid/engine/inc/MBlidMeasurementSettings.h	Wed Sep 01 12:31:27 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:  Blid measurement settings can be modified
+*                and read with help of this API.
+*
+*/
+
+
+
+#ifndef __MBLIDMEASUREMENTSETTINGS_H__
+#define __MBLIDMEASUREMENTSETTINGS_H__
+
+// CLASS DECLARATION
+
+/**
+*  This Blid application engine API is only used by Blid application.
+*  Blid settings can be modified and read with help of this API.
+*
+*/
+class MBlidMeasurementSettings
+    {
+    public: // New functions
+
+        /**
+         * Set the Measurement Settings Vaue 
+         *
+         * @return None 
+         */
+        virtual void HandleSysMeasureValueL( ) = 0;
+    };
+
+#endif      // __MBLIDMEASUREMENTSETTINGS_H__
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/basiclocationinfodisplay/blid/engine/inc/MBlidRouter.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,173 @@
+/*
+* 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:  Blid route can be modified
+*                and read with help of this API.
+*
+*/
+
+
+
+#ifndef __MBLIDROUTER_H__
+#define __MBLIDROUTER_H__
+
+// INCLUDES
+#include <lbsposition.h> // TPositionModuleId
+#include <s32strm.h>
+#include <EPos_CPosLandmark.h>
+#include "TNamedCoordinate.h"
+
+// FORWARD DECLARATIONS
+class TNamedCoordinate;
+
+// CLASS DECLARATION
+
+/**
+*  This Blid application engine API is only used by Blid application.
+*  Blid route can be modified and read with help of this API.
+*
+*/
+class MBlidRouter
+    {
+    public:  // Constructors and destructor
+        /**
+         * Destructor.
+         */
+        virtual ~MBlidRouter(){};
+
+    public: // New functions
+		/**
+		 * Get coordinates
+		 *
+		 * @param aIndex of coordinates
+		 * @return reference to coordinates
+		 */
+		virtual TNamedCoordinate& At( TInt aIndex ) = 0;
+
+		/**
+		 * Append coordinates
+		 *
+		 * @param aCoordinates
+         * @return Error value
+		 */
+		virtual TInt AppendL( TNamedCoordinate* aCoordinate, TBool aCheckForMemory ) = 0;
+
+		/**
+		 * Delete coordinates
+		 *
+		 * @param aIndex of coordinates
+		 */
+		virtual TInt RemoveL( TInt aIndex ) = 0;
+
+        /**
+         * Delete all item from coordinate array
+         */
+        virtual void ResetAndDestroy() = 0;
+
+		/**
+		 * Get count of coordinates
+		 *
+		 * @return number of objects
+		 */
+		virtual TInt Count() = 0;
+
+        /**
+         * Waypoint getter
+         * Ownership not transferred
+         * 
+         * @return reference to the waypoint
+         */
+        virtual TNamedCoordinate* Waypoint() = 0;
+
+        /**
+         * Get waypoint's index in waypoint array
+         * @return index
+         */
+        virtual TInt IndexOfWaypoint() const = 0;
+            
+        /**
+         * Set waypoint 
+         *
+         * @param index of RouterModel array
+         */
+        virtual void SetWaypoint( const TInt aIndex ) = 0;
+        
+        /**
+         * Remove waypoint
+         *
+         */
+        virtual void RemoveWaypoint() = 0;
+
+        /**
+         * Save engine's data to file
+         * @param aStream A reference to RWriteStream
+         */ 
+        virtual void ExternalizeL( RWriteStream& aStream ) = 0;
+
+        /**
+         * Load initial data from file 
+         * @param aSteam A reference to RReadStream
+         */
+        virtual void InternalizeV1L( RReadStream& aStream ) = 0;
+        
+        /**
+         * Landmark data getter
+         * Ownership not transferred
+         * 
+         * @return reference to CPosLandmark
+         */
+        virtual CPosLandmark* Landmark() const = 0;
+        
+        /**
+         * Set Landmark. Router takes ownership
+         * 
+         * @param of type CPosLandmark
+         */
+        virtual void SetLandmark(CPosLandmark* aLandmark) = 0;
+
+        /**
+         * To check if waypoint or landmark is currently set
+         * 
+         * @return ETrue if set EFalse otherwise
+         */
+		virtual TBool IsWaypointSet() = 0;
+		
+		/**
+         * To check if any one waypoint or landmark is set
+         * 
+         * @return ETrue if set EFalse otherwise
+         */
+		virtual TBool IsAnyPointSet() = 0;
+		
+		/**
+         * Sets the latitude and longitude for manual waypoint
+         *          
+         */
+		virtual void SetManualWaypoint(TReal latitude, TReal longitude, TDesC& aName) = 0;
+		
+		/**
+         * Clears if Landmark or waypoint is set
+         * 
+         */
+		virtual void ClearSetPoints() = 0;
+		
+		/**
+         * Give waypoints index
+         * 
+         */
+        virtual TInt FindWaypointIndex( TNamedCoordinate* aCoordinate ) = 0;
+    };
+
+#endif      // __MBLIDROUTER_H__
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/basiclocationinfodisplay/blid/engine/inc/MBlidSettings.h	Wed Sep 01 12:31:27 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:  Blid settings can be modified
+*                and read with help of this API.
+*
+*/
+
+
+
+#ifndef __MBLIDSETTINGS_H__
+#define __MBLIDSETTINGS_H__
+
+// CLASS DECLARATION
+
+/**
+*  This Blid application engine API is only used by Blid application.
+*  Blid settings can be modified and read with help of this API.
+*
+*/
+class MBlidSettings
+    {
+    public:  // Constructors and destructor
+        /**
+         * Destructor.
+         */
+        virtual ~MBlidSettings(){};
+
+    public: // New functions
+        /**
+         * Set altitude calibration 
+         *
+         * @param aAltCalibration
+         */
+        virtual void SetAltCalibration( const TReal32 aAltCalibration ) = 0;
+        
+        /**
+         * Get altitude calibration
+         *
+         * @return altitude calibration
+         */
+        virtual TReal32 AltCalibration() = 0;
+        
+        /**
+         * Get Unit of Measurement 
+         *
+         * @return measurement unit 
+         */
+        virtual TReal32 UnitOfMeasurement() = 0;
+        
+        /**
+         * Set Index of selected Backlight settings option
+         *
+         * @param aBacklightOption
+         */
+        virtual void SetBacklightOption( const TReal32 aBacklightOption ) = 0;
+        
+        /**
+         * Get backlight option selected index
+         *
+         * @return backlight option selected index 
+         */
+        virtual TReal32 GetBacklightOption() = 0;        
+        
+        virtual void SetArrivedToneName( const TDesC8& aArrivedToneName ) = 0;
+        virtual TDesC8& GetArrivedToneName() = 0;
+        virtual void SetResetOdometerOption( const TReal32 aIsOdoReset ) = 0;
+        virtual TReal32 GetResetOdometerOption() = 0;
+        
+
+        /**
+         * Set the arrived distance
+         */
+        virtual void SetArrivedDistance( TReal32 aDistance )=0 ;
+
+        /**
+         * Get the arrived distance
+         */
+        virtual TReal32 GetArrivedDistance( ) = 0 ;
+        
+        
+    };
+
+#endif      // __MBLIDSETTINGS_H__
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/basiclocationinfodisplay/blid/engine/inc/TNamedCoordinate.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,83 @@
+/*
+* 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:  Provides named coordinates
+*
+*/
+
+
+
+#ifndef TNAMEDCOORDINATE_H
+#define TNAMEDCOORDINATE_H
+
+// INCLUDES
+#include <lbsposition.h>
+#include "blidcommonconsts.h"
+
+// CLASS DECLARATION
+
+/**
+*  TNamedCoordinate is used to hold the named coordinates of a location 
+*  (latitude, longitude and altitude).
+*/
+class TNamedCoordinate : public TCoordinate
+    {
+    public:
+    	/**
+		 * C++ default constructors
+		 */
+        IMPORT_C TNamedCoordinate();
+
+		IMPORT_C TNamedCoordinate(const TReal64& aLatitude,
+						 const TReal64& aLongitude, const TDesC& aName );
+        
+		IMPORT_C TNamedCoordinate(const TReal64& aLatitude,
+						 const TReal64& aLongitude,
+						 TReal32 aAltitude, const TDesC& aName,TReal32 aAccuracy);
+
+    public: //new functions
+        /**
+         * 
+         * @return pointer to iName 
+         */
+		IMPORT_C HBufC* Name() const;
+     
+        /**
+         * Set Coordinate plot's name
+         *
+         * @param aName
+         */
+		IMPORT_C void SetName( const TDesC& aName );
+		
+		/**
+         * Set destination accuracy
+         *
+         * @param aAccuracy
+         */
+		IMPORT_C void SetAccuracy( const TReal32& aAccuracy );
+		
+		/**
+         * 
+         * @return destination accuracy 
+         */
+		IMPORT_C TReal32 Accuracy() const;
+
+    private:
+        /// Own: Coordinate plot's name
+		TBuf<KBlidWaypointNameMaxLen> iName;
+        TReal32 iAccuracy;
+    };
+
+#endif      // TNAMEDCOORDINATE_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/basiclocationinfodisplay/blid/engine/inc/blidcommonconsts.h	Wed Sep 01 12:31:27 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: 
+*     Contains common constants
+*
+*/
+
+
+#ifndef BLID_COMMON_CONSTS_H__
+#define BLID_COMMON_CONSTS_H__
+
+#include <data_caging_path_literals.hrh>
+
+const TInt KBlidWaypointNameMaxLen( 35 );
+const TInt KUpdateIntervalTimeOut( 120000000 ); //2 Min
+//const TInt KUpdateIntervalTimeOut( 15000000 ); //15 seconds
+const TInt KMaxNumberOfWaypoints( 30 );
+
+#endif // BLID_COMMON_CONSTS_H__
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/basiclocationinfodisplay/blid/engine/inc/blidengconsts.h	Wed Sep 01 12:31:27 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: 
+*     Contains common constants
+*
+*/
+
+
+#ifndef BLID_ENG_CONSTS_H__
+#define BLID_ENG_CONSTS_H__
+
+#include <data_caging_path_literals.hrh>
+#include "blidcommonconsts.h"
+
+//////////////////////////////////////////
+// Blid engine's constants
+//////////////////////////////////////////
+const TInt KStartIntervalTime( 5000000 ); //1s
+const TInt KMinArrivalDist(10); // Minimum arrival distance 10 meters
+const TInt KMaxHorAccLimit(50); // Maximum horzontal accuracy 50 meters
+
+const TInt KMaxItemsInArray( 5 );
+const TInt KStartUpdateIntervalTimeOut( 5000001 ); //5 seconds
+
+const TInt KManualWaypointIndex(KMaxNumberOfWaypoints + 1);
+
+// Blid's user data document versions.
+const TInt KBlidDocVersion1( 1 );
+const TInt KBlidHundredMeters( 100 );    //100 m
+const TInt KBlidHundredOneMeters( 101 ); //101 m
+const TInt KBlidOneKilometer( 1000 );    //1 km
+
+const TReal KBlidCutOffSpeed(0.8); 
+
+//////////////////////////////////////////
+// Blid engine's constants for 
+// Update Intervals
+//////////////////////////////////////////
+const TInt KShortIntervalTime( 1000000 ); //1s
+const TInt KMidIntervalTime( 3000000 ); //3s
+const TInt KMaxIntervalTime( 5000000 ); //3s
+
+const TInt KBlidLeaveExit( -1003 );
+
+const TInt KMaxSatelliteSignalStrength( 40 );
+
+const TInt KMidSatelliteSignalStrength( 20 );
+
+const TInt KMinSatelliteSignalStrength( 5 );
+
+
+#endif // BLID_ENG_CONSTS_H__
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/basiclocationinfodisplay/blid/engine/inc/cblidmoduleinfoobserver.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,73 @@
+/*
+* 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:  Blid engine object.
+*
+*/
+
+
+
+#ifndef CBLIDMODULEINFOOBSERVER_H
+#define CBLIDMODULEINFOOBSERVER_H
+
+//  INCLUDES
+#include <e32base.h>
+
+// CLASS DECLARATION
+class RPositionServer;
+class MBlidLocation;   
+
+/**
+* An active object that handles the note dialog execution
+*/
+
+NONSHARABLE_CLASS( CBlidModuleinfoObserver ) : public CActive
+    {
+    public:  // Constructors and destructor
+        /**
+         * Two-phased constructor.
+         */
+        static CBlidModuleinfoObserver* NewL( RPositionServer& 	aServer,
+								 			  MBlidLocation&	aObserver );
+
+        /**
+         * Destructor.
+         */
+        virtual ~CBlidModuleinfoObserver();
+        
+    private:
+        /**
+         * C++ default constructor.
+         */
+        CBlidModuleinfoObserver( RPositionServer& 	aServer,
+								 MBlidLocation&	aObserver );
+
+        /**
+         * By default Symbian 2nd phase constructor is private.
+         */
+        void ConstructL();  
+
+    private: // From CActive
+        void RunL();
+        void DoCancel();
+    
+    public:
+        void StartNotification();   
+
+    private:
+		RPositionServer& iServer;
+		MBlidLocation&	iObserver;   
+    };
+
+
+#endif  // CBLIDMODULEINFOOBSERVER_H
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/basiclocationinfodisplay/blid/engine/src/BlidModelFactory.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,54 @@
+/*
+* 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:  A factory class which can create instances of
+*                MBlidSettings.
+*
+*/
+
+
+// INCLUDE FILES
+#include "BlidModelFactory.h"
+#include "CBlidSettings.h"
+#include "CBlidLocation.h"
+#include "CBlidRouter.h"
+
+// ============================ MEMBER FUNCTIONS ==============================
+// ----------------------------------------------------------------------------
+// BlidModelFactory::SettingsL
+// ----------------------------------------------------------------------------
+//
+MBlidSettings* BlidModelFactory::SettingsL()
+    {
+    return CBlidSettings::NewL();
+    }
+
+// ----------------------------------------------------------------------------
+// BlidModelFactory::LocationL
+// ----------------------------------------------------------------------------
+//
+MBlidLocation* BlidModelFactory::LocationL( RPositionServer& aServer, CBlidEng& aEngine )
+    {
+    return CBlidLocation::NewL(aServer, aEngine);
+    }
+
+// ----------------------------------------------------------------------------
+// BlidModelFactory::RouterL
+// ----------------------------------------------------------------------------
+//
+MBlidRouter* BlidModelFactory::RouterL()
+    {
+    return CBlidRouter::NewL();
+    }
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/basiclocationinfodisplay/blid/engine/src/CBlidEng.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,365 @@
+/*
+* 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: 
+*     Implements interface for Blid event
+*
+*/
+
+
+// INCLUDE FILES
+#include <sysutil.h>
+#include <f32file.h>
+#include <EPos_CPosLandmark.h>
+#include <driveinfo.h>
+
+#include "CBlidEng.h"
+#include "BlidModelFactory.h"
+#include "DllMain.h" // panic codes
+#include "MBlidSettings.h" // MBlidSettings
+#include "MBlidLocation.h" //MBlidLocation
+#include "MBlidRouter.h" //MBlidRouter
+#include "lbsposition.h"
+#include "TNamedCoordinate.h"
+#include "blidengconsts.h"
+
+// ============================ MEMBER FUNCTIONS ==============================
+// ----------------------------------------------------------------------------
+// CBlidEng::NewL
+// Two-phased constructor.
+// ----------------------------------------------------------------------------
+//
+EXPORT_C CBlidEng* CBlidEng::NewL()
+    {
+    CBlidEng* self = new( ELeave ) CBlidEng;
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop(self); // self
+    return self;
+    }
+
+// ---------------------------------------------------------
+// CBlidEng::ConstructL
+// ---------------------------------------------------------
+//
+void CBlidEng::ConstructL()
+    {
+    User::LeaveIfError(iServer.Connect());
+    CreateModelL( EBlidSettings );
+    CreateModelL( EBlidRouter );
+    iAppMode = EAppForeground;
+    iHWRMLight = CHWRMLight::NewL();    
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidEng::CBlidEng
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// ----------------------------------------------------------------------------
+//
+CBlidEng::CBlidEng()
+    {
+    }
+
+// ---------------------------------------------------------
+// CBlidEng::~CBlidEng
+// ---------------------------------------------------------
+//
+CBlidEng::~CBlidEng()
+    {
+    delete iSettings;
+    delete iLocation;
+    delete iRouter;
+    delete iHWRMLight;
+    iServer.Close();    
+    }
+
+// ---------------------------------------------------------
+// CBlidEng::StoreL
+// ---------------------------------------------------------
+//
+EXPORT_C TStreamId CBlidEng::StoreL( CStreamStore& aStore,
+                                     CStreamStore& aRestore )
+    {
+    RFs fs;
+    User::LeaveIfError(fs.Connect()); 
+    CleanupClosePushL( fs ); 
+
+    if ( SysUtil::DiskSpaceBelowCriticalLevelL( &fs, 0, DriveInfo::EDefaultPhoneMemory ) )
+        {
+        const_cast<CBlidEng*>(this)->RestoreL( aRestore, iStreamId );
+        User::Leave( KErrDiskFull );
+		}
+	CleanupStack::PopAndDestroy(); // fs
+    
+    RStoreWriteStream stream;
+    iStreamId = stream.CreateLC( aStore );
+    ExternalizeL( stream );
+    stream.CommitL();
+    CleanupStack::PopAndDestroy(); //stream
+    return iStreamId;
+    }
+
+// ---------------------------------------------------------
+// CBlidEng::RestoreL
+// ---------------------------------------------------------
+//
+EXPORT_C void CBlidEng::RestoreL( const CStreamStore& aStore,
+                TStreamId aStreamId )
+    {
+    iStreamId = aStreamId;
+    RStoreReadStream stream;
+    stream.OpenLC(aStore,iStreamId);
+    InternalizeL(stream);
+    CleanupStack::PopAndDestroy(); //stream
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidEng::SettingsModel()
+// Settings model getter.
+// ----------------------------------------------------------------------------
+//
+EXPORT_C MBlidSettings* CBlidEng::SettingsModel() const
+    {
+    return iSettings;
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidEng::LocationModel()
+// Location model getter.
+// ----------------------------------------------------------------------------
+//
+EXPORT_C MBlidLocation* CBlidEng::LocationModel() const
+    {
+    return iLocation;
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidEng::RouterModel()
+// Router model getter.
+// ----------------------------------------------------------------------------
+//
+EXPORT_C MBlidRouter* CBlidEng::RouterModel() const
+    {
+    return iRouter;
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidEng::CreateModelL()
+// Creates a given model type.
+// ----------------------------------------------------------------------------
+//
+EXPORT_C void CBlidEng::CreateModelL( TBlidModelType aModel )
+    {
+    switch( aModel )
+        {
+        case EBlidSettings:
+            {
+            if ( !iSettings )
+                {
+                iSettings = BlidModelFactory::SettingsL();
+                }
+            break;
+            }
+        case EBlidLocation:
+            {
+            if ( !iLocation )
+                {
+                iLocation = BlidModelFactory::LocationL(iServer, *this);                
+                }
+            break;
+            }
+        case EBlidRouter:
+            {
+            if ( !iRouter )
+            	{
+                iRouter = BlidModelFactory::RouterL();
+                }
+            break;
+            }
+        default:
+            {
+            // Not supported model type
+            __ASSERT_DEBUG(EFalse, BlidEngPanic(ELCEModelTypeNotSupported));
+            break;
+            }            
+        }
+    }
+    
+// ---------------------------------------------------------
+// CBlidEng::GetDistanceToDestination
+// ---------------------------------------------------------
+//
+EXPORT_C TInt CBlidEng::GetDistanceToDestination(TReal32& aDistance)
+    {
+    if(iRouter->IsAnyPointSet())
+        {
+        TInt retVal;
+        TPosition& currentPosition = iLocation->GetCurrentPosition();
+        if(iRouter->IsWaypointSet())
+            {
+            TNamedCoordinate* destination = iRouter->Waypoint();
+            retVal = destination->Distance(currentPosition, aDistance);
+            }
+        else
+            {
+            CPosLandmark* landmark = iRouter->Landmark();
+            TPosition destination;
+            landmark->GetPosition(destination);
+            retVal = currentPosition.Distance(destination, aDistance);            
+            }
+        
+        return retVal;
+        }
+    else
+        {
+        return KErrNotFound;
+        }        
+    }
+
+// ---------------------------------------------------------
+// CBlidEng::HasArrivedToDestination
+// ---------------------------------------------------------
+//
+EXPORT_C TBool CBlidEng::HasArrivedToDestination()
+	{
+	if(iRouter->IsAnyPointSet())
+		{
+		TPosition& currentPosition = iLocation->GetCurrentPosition();
+		TReal32 distanceToDestination(0);
+		
+		if(iRouter->IsWaypointSet())
+	        {
+	        TNamedCoordinate* destination = iRouter->Waypoint();
+	        if(destination->Distance(currentPosition, distanceToDestination) != KErrNone)
+	        	{
+	        	return EFalse;
+	        	}
+	        }
+	    else
+	        {
+	        TPosition destination;
+	        CPosLandmark* landmark = iRouter->Landmark();	        
+	        landmark->GetPosition(destination);
+	        if(currentPosition.Distance(destination, distanceToDestination) != KErrNone)
+	        	{
+	        	return EFalse;
+	        	}
+	        }	    
+	    
+	    if(distanceToDestination <= KMinArrivalDist)
+	    	{
+	    	iSettings->SetArrivedDistance( KMinArrivalDist );
+	    	return ETrue;
+	    	}
+	    
+	    TReal tempHorizontalAccuracy = currentPosition.HorizontalAccuracy();
+	    
+	    if(tempHorizontalAccuracy > KMaxHorAccLimit)
+	    	{
+	    	tempHorizontalAccuracy = KMaxHorAccLimit;
+	    	}
+	    
+	    if(distanceToDestination <= tempHorizontalAccuracy)
+	    	{
+	    	iSettings->SetArrivedDistance( tempHorizontalAccuracy );
+	    	return ETrue;
+	    	}
+		}	
+	return EFalse;		
+	}
+// ----------------------------------------------------------------------------
+// CBlidEng::SetAppMode
+// ----------------------------------------------------------------------------
+//
+EXPORT_C void CBlidEng::SetAppMode(TAppMode aMode)
+    {
+    iAppMode = aMode;
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidEng::SetBackLightStateL
+// It's allocate the Backlight resource for the client and deallocate also depends
+// Upon the choise of backlight option from the settings view
+// ----------------------------------------------------------------------------
+//
+EXPORT_C void CBlidEng::SetBackLightStateL(TBacklightState aState)
+	{
+	if(aState == EBlidBacklightAlwaysOn)
+		{
+		TRAPD( error, iHWRMLight->ReserveLightL(CHWRMLight::EPrimaryDisplay, EFalse, EFalse); 
+		              iHWRMLight->LightOnL(CHWRMLight::EPrimaryDisplay); );
+        if( error != KErrNone )
+            {
+            // do something if necessary.
+            }
+		}
+	else
+		{
+		iHWRMLight->ReleaseLight(CHWRMLight::EPrimaryDisplay);
+		}		
+	}	
+
+// ---------------------------------------------------------
+// CBlidEng::ExternalizeL
+// ---------------------------------------------------------
+//
+void CBlidEng::ExternalizeL( RWriteStream& aStream ) const
+    {
+    aStream.WriteInt32L( KBlidDocVersion1 );
+	iRouter->ExternalizeL( aStream );
+    }
+
+// ---------------------------------------------------------
+// CBlidEng::InternalizeL
+// ---------------------------------------------------------
+//
+void CBlidEng::InternalizeL( RReadStream& aStream )
+    {
+    switch( aStream.ReadInt32L() )
+        {
+        case KBlidDocVersion1:        
+            {
+            InternalizeV1L( aStream );
+            break;
+            }
+        default:
+            {
+            User::Leave( KErrNotSupported );
+            break;
+            }
+        }
+    }
+
+// ---------------------------------------------------------
+// CBlidEng::InternalizeLV1
+// ---------------------------------------------------------
+//
+void CBlidEng::InternalizeV1L( RReadStream& aStream )
+    {    
+    if ( iRouter->Count() )
+        {
+        iRouter->ResetAndDestroy();
+        }
+    iRouter->InternalizeV1L( aStream );
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidEng::AppMode
+// ----------------------------------------------------------------------------
+//
+EXPORT_C CBlidEng::TAppMode CBlidEng::AppMode()
+    {
+    return iAppMode;
+    }
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/basiclocationinfodisplay/blid/engine/src/CBlidLocation.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,1474 @@
+/*
+* 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: Implemenation of CBlidLocation class which provides access to blid location and satellite information
+*
+*/
+
+
+
+// INCLUDE FILES
+#include <lbs.h>
+#include <lbscommon.h>
+#include <inetprottextutils.h>
+#include <lbsposition.h>
+#include <lbssatellite.h>
+
+#include "CBlidLocation.h"
+#include "MBlidEngObserver.h"
+#include "blidengconsts.h"
+#include "blidcommonconsts.h"
+#include "Blid.hrh"
+#include "cblidmoduleinfoobserver.h"
+
+#ifdef _DEBUG
+#include "Debug.h"
+#endif
+
+// FORWARD DECLARATION
+TInt TimerCallBackFunctionL(TAny* aPtr);
+TInt SortCriteria(const TSatelliteData& aCurrent, const TSatelliteData& aNext);
+
+// ============================ MEMBER FUNCTIONS ==============================
+// ----------------------------------------------------------------------------
+// CBlidLocation::CBlidLocation
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// ----------------------------------------------------------------------------
+//
+CBlidLocation::CBlidLocation(RPositionServer& aServer, CBlidEng& aEngine )
+                            : CActive(EPriorityStandard)
+							,iServer( aServer ), iRequesting( EFalse ),
+							iOnlineMode( EFalse ),iIsDistance(ETrue),
+							iDistanceTravelled(0),iIsTripStart(EFalse),
+							iIsTripNotStart(ETrue),iIsTripClear(EFalse),
+							iIsTripReset(EFalse),iEngine(aEngine)
+
+    {
+    CActiveScheduler::Add( this );    
+    }
+   
+
+// ----------------------------------------------------------------------------
+// CBlidLocation::ConstructL
+// Symbian 2nd phase constructor can leave.
+// ----------------------------------------------------------------------------
+//
+void CBlidLocation::ConstructL( )
+    {
+    iSatelliteCapability = IsSatelliteCapabilityL();
+    //User::LeaveIfError(iPositioner.Open( iServer ));
+    // get the number of modules
+    GetModuleInfoNotificationL();
+    // and registered for notification
+	iModuleInfoObserv = CBlidModuleinfoObserver::NewL( iServer, *this );
+	iModuleInfoObserv->StartNotification();    
+    
+    //initialize iSpeedAverage
+    TRealX temp;
+    temp.SetNaN();
+    iSpeedAverage = temp;
+    iHeading = 0;    
+    iGPSDataAvailable = EFalse;
+    iTripAverageSpeed = 0.0;
+    iTripMaxSpeed = 0.0;
+    iIsPreviousPositionUpdated = EFalse;
+    iWaitingGpsData = ETrue;
+    iIsDistanceTravelled = ETrue;
+    iRegisteredViewId = EBlidMainView;
+    iUpdateReceived = EFalse;
+    iDeviceStatus = EDeviceUnderConnection;
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidLocation::NewL
+// Two-phased constructor.
+// ----------------------------------------------------------------------------
+//
+CBlidLocation* CBlidLocation::NewL( RPositionServer& aServer, CBlidEng& aEngine )
+    {
+    CBlidLocation* self = new( ELeave ) CBlidLocation(aServer, aEngine);    
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop( self ); //self
+    return self;
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidLocation::~CBlidLocation
+// ----------------------------------------------------------------------------
+//
+CBlidLocation::~CBlidLocation()
+    {
+    Cancel();
+    iPositioner.Close();    
+    iSpeedArray.Close();
+    if(iTimer)
+        {
+        delete iTimer;
+        iTimer = NULL;
+        }
+    iModuleInfoArray.Reset();        
+    delete iModuleInfoObserv;
+    iSortedSatData.Reset();
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidLocation::SetObserver
+// ----------------------------------------------------------------------------
+//
+void CBlidLocation::SetObserver(MBlidEngObserver& aObserver, TInt aViewId)
+    {
+    iObserver = &aObserver;
+    iRegisteredViewId = aViewId;
+    // added to fix TSW error 
+    iLastGoodFixTime.UniversalTime();
+
+    if(iUpdateReceived)
+        {
+        SetUpdateOptions();
+        }    
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidLocation::RemoveModelObserver
+// ----------------------------------------------------------------------------
+//
+void CBlidLocation::RemoveModelObserver()
+    {
+    iObserver = NULL;
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidLocation::InitialLocationRequestL
+// ----------------------------------------------------------------------------
+//
+void CBlidLocation::InitialLocationRequestL( const TDesC& aSrvName )
+    {
+    User::LeaveIfError(iPositioner.Open( iServer ));
+    
+    User::LeaveIfError(iPositioner.SetRequestor( 
+                             CRequestor::ERequestorService,
+                             CRequestor::EFormatApplication,
+                             aSrvName ));
+	SetUpdateOptions();
+    iRequesting = ETrue;
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidLocation::CurrentPosition
+// ----------------------------------------------------------------------------
+//
+TPosition& CBlidLocation::GetCurrentPosition()
+    {
+    return iPosition;  
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidLocation::IsSatelliteCapability
+// ----------------------------------------------------------------------------
+//
+TBool CBlidLocation::IsSatelliteCapabilityL()
+    {  
+    TUint count = 0;  
+    User::LeaveIfError( iServer.GetNumModules(count) );
+    TPositionModuleInfo moduleInfo;
+    
+    for( TUint i = 0; i < count; i++ )
+        {
+        User::LeaveIfError( iServer.GetModuleInfoByIndex( i, moduleInfo ) );
+        if ( moduleInfo.Capabilities() &  
+             TPositionModuleInfo::ECapabilitySatellite )
+            {
+            return ETrue;
+            }
+        }
+   
+    return EFalse;
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidLocation::GetCourseInfo
+// ----------------------------------------------------------------------------
+//
+TCourse& CBlidLocation::GetCourse()
+    {
+    return iCourse;
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidLocation::CancelRequest
+// ----------------------------------------------------------------------------
+//
+void CBlidLocation::CancelRequest()
+    {
+    Cancel();
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidLocation::StopRequesting
+// ----------------------------------------------------------------------------
+//
+void CBlidLocation::StopRequesting()
+    {
+    iOnlineMode = EFalse;
+    iRequesting = EFalse;
+    }
+    
+
+// ----------------------------------------------------------------------------
+// CBlidLocation::StartRequesting
+// ----------------------------------------------------------------------------
+// 
+void CBlidLocation::StartRequesting()
+    {
+    if ( !IsActive() )
+        {
+        SetUpdateOptions();        
+        }
+    iRequesting = ETrue;    
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidLocation::IsOnline
+// ----------------------------------------------------------------------------
+//
+TBool CBlidLocation::IsOnline()
+    {
+    return iOnlineMode;
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidLocation::SatelliteCapability
+// ----------------------------------------------------------------------------
+//
+TBool CBlidLocation::SatelliteCapability()
+    {
+    return iSatelliteCapability;
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidLocation::SpeedAverage
+// ----------------------------------------------------------------------------
+//
+TReal CBlidLocation::SpeedAverage()
+    {
+    return iSpeedAverage;
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidLocation::MaxSpeed
+// ----------------------------------------------------------------------------
+//
+TReal CBlidLocation::MaxSpeed()
+    {
+    return iMaxSpeed;
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidLocation::WaitingGPSData
+// ----------------------------------------------------------------------------
+//
+TBool CBlidLocation::WaitingGPSData()
+	{
+	return iWaitingGpsData;
+	}
+
+// ----------------------------------------------------------------------------
+// CBlidLocation::IsGPSDeviceConnected
+// ----------------------------------------------------------------------------
+//
+TBool CBlidLocation::IsGPSDeviceConnected()
+    {
+    return (iDeviceStatus == EDeviceConnected);
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidLocation::RunL
+// ----------------------------------------------------------------------------
+//
+void CBlidLocation::RunL()
+    {
+    iPosStatus = iStatus;
+
+    iDeviceStatus = EDeviceConnected;
+    SortSatelliteDataL();
+
+    switch (iStatus.Int())
+        {
+        //case KPositionPartialUpdate:
+        case KErrNone: // Success
+            {
+            iOnlineMode = ETrue;
+            iUpdateReceived = ETrue;
+            iGPSDataAvailable = ETrue;
+            iPositionInfo.GetPosition(iPosition);
+            iPositionInfo.GetCourse(iCourse);
+            iLastGoodFixTime.UniversalTime();
+
+            CalculateCourse();
+
+            if (iIsTripStart)
+                {
+                if (!iIsPreviousPositionUpdated)
+                    {
+                    iIsPreviousPositionUpdated = ETrue;
+                    iPrevPosition = GetCurrentPosition();
+                    }
+                UpdateTripData();
+                }
+            if (iObserver)
+                {
+                iObserver->NotifyL(iOnlineMode);
+                }
+            if (iRequesting)
+                {
+                //DEBUG("KErrNone : NotifyPositionUpdate");
+                iPositioner.NotifyPositionUpdate(iPositionInfo, iStatus);
+                SetActive();
+                }
+            break;
+            }
+        case KErrAccessDenied:
+            /*
+             Happens if we don't specify requestor information.
+             This condition should not be encountered.
+             */
+            {
+            iPositionInfo.ClearSatellitesInView();
+            iRequesting = EFalse;
+            User::Leave(KErrAccessDenied);
+            break;
+            }
+        case KErrCancel: // Postion update request cancelled
+            {
+            // We canceled the request so do nothing
+            iPositionInfo.ClearSatellitesInView();
+            break;
+            }
+        case KPositionPartialUpdate: // Incomplete position information   
+            {
+ 
+            TTime now;
+            now.UniversalTime();
+            TTimeIntervalSeconds secondsSinceLastGoodFix;
+            now.SecondsFrom(iLastGoodFixTime, secondsSinceLastGoodFix);
+            if (secondsSinceLastGoodFix.Int() > 15)
+                {
+                iLastGoodFixTime.UniversalTime();
+                if (iObserver)
+                    {
+                    iObserver->NotifyErrorL(KErrTimedOut);
+                    }
+                }
+
+            else
+                {
+                iLastGoodFixTime.UniversalTime();
+                }
+            // end of addition for TSW error
+
+            iGPSDataAvailable = EFalse;
+            iUpdateReceived = ETrue;
+
+            // All cases are errors and hence go to offline mode
+            iOnlineMode = EFalse;
+            if (iObserver)
+                {
+                iObserver->NotifyErrorL(iStatus.Int());
+                }
+            if (iRequesting)
+                {
+                iPositioner.NotifyPositionUpdate(iPositionInfo, iStatus);
+                SetActive();
+                }
+            break;
+            }
+
+        case KErrTimedOut: // Position update timed out
+        case KPositionQualityLoss: //GPS not connected
+            {
+            iPositionInfo.ClearSatellitesInView();
+            iUpdateReceived = ETrue;
+            iGPSDataAvailable = EFalse;
+            if (iIsTripStart && !iIsTripClear)
+                {
+                iTripGPSDataLost = ETrue;
+                }
+            // Leaving break is intentional
+            }
+            //-fallthrough
+        case KErrNotFound: // No PSY selected.
+        case KErrUnknown: // This will be returned by MLFW        
+        case KErrArgument:
+
+            /*
+             PSY does not support the information type specified
+             by BLID.
+             */
+        default:
+            {
+            iDeviceStatus = EDeviceNotFound;
+            iWaitingGpsData = EFalse;
+            if (iObserver)
+                {
+                iObserver->NotifyErrorL(KErrNotFound);
+                }
+            if (iRequesting)
+                {
+                iPositioner.NotifyPositionUpdate(iPositionInfo, iStatus);
+                SetActive();
+                }
+             }
+            break;
+        }
+    /*if( iStatus.Int() != KErrCancel )
+     {
+     //DEBUG("RUNL  : SetUpdateOptions");
+     SetUpdateOptions();
+     }*/
+    if (iStatus.Int() != KPositionPartialUpdate)
+        {
+        iWaitingGpsData = CheckIfWaitingGPSData();
+        }
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidLocation::SetUpdateOptions
+// ----------------------------------------------------------------------------
+//
+void CBlidLocation::SetUpdateOptions()
+    {
+    if(IsActive())
+        {
+        Cancel();
+        }
+    // update interval
+    TInt intervalTime = KMidIntervalTime;
+    
+    if(iEngine.AppMode() == CBlidEng::EAppBackground) // If application is in background mode
+        {
+        TRAP_IGNORE(UpdateIntervalL( KMaxIntervalTime ));
+        if ( iRequesting )
+            {
+            iPositioner.NotifyPositionUpdate( iPositionInfo, iStatus );
+            SetActive();
+            }
+        return;
+        }
+    
+    switch(iRegisteredViewId)
+        {
+        case EBlidNavigationView:
+            {
+            TReal32 distance;
+            TInt retVal;
+            retVal = iEngine.GetDistanceToDestination(distance);
+            if(retVal == KErrNone)
+                {
+                if(distance <= KBlidHundredMeters)
+                    {
+                    intervalTime = KShortIntervalTime;
+                    }
+                else if(distance > KBlidHundredMeters && 
+                        distance < KBlidOneKilometer)
+                    {
+                    intervalTime = KMidIntervalTime;
+                    }
+                else
+                    {
+                    intervalTime = KMaxIntervalTime;
+                    }
+                }
+            else
+                {
+                intervalTime = KShortIntervalTime;
+                }
+            break;
+            }
+        case EBlidTripMeterView:
+            {
+            if(iDistanceTravelled < KBlidHundredMeters)
+                {
+                intervalTime = KShortIntervalTime;
+                }
+            else if(iDistanceTravelled > KBlidHundredMeters && 
+                    iDistanceTravelled < KBlidOneKilometer)
+                {
+                intervalTime = KMidIntervalTime;
+                }
+            else
+                {
+                intervalTime = KMaxIntervalTime;
+                }
+            break;
+            }        
+        case EBlidMainView: 
+        default:
+            {
+            intervalTime = KMidIntervalTime;
+            break;
+            }                        
+        }
+    TRAP_IGNORE(UpdateIntervalL( intervalTime ));
+    if ( iRequesting )
+        {
+        iPositioner.NotifyPositionUpdate( iPositionInfo, iStatus );
+        SetActive();
+        }
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidLocation::DoCancel
+// ----------------------------------------------------------------------------
+//
+void CBlidLocation::DoCancel()
+    {
+    iPositioner.CancelRequest( EPositionerNotifyPositionUpdate );
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidLocation::RunError
+// ----------------------------------------------------------------------------
+//
+TInt CBlidLocation::RunError(TInt aError)
+    {
+    if ( iObserver && aError != KBlidLeaveExit )
+        {
+        TRAPD(error,iObserver->NotifyErrorL( aError ));
+        if(error != KErrNone)
+        	{
+        	return error;
+        	}
+        }
+    return aError;
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidLocation::UpdateIntervalL
+// ----------------------------------------------------------------------------
+//
+void CBlidLocation::UpdateIntervalL( const TInt aIntervalTime )
+    {
+    iCurrentUpdateInterval = aIntervalTime;
+    TPositionUpdateOptions updateOptions;    
+    updateOptions.SetUpdateInterval(TTimeIntervalMicroSeconds(aIntervalTime));    
+    updateOptions.SetAcceptPartialUpdates( ETrue );
+    if(iUpdateReceived)
+    	{
+    	updateOptions.SetUpdateTimeOut( TTimeIntervalMicroSeconds(KUpdateIntervalTimeOut));
+    	}
+    else
+    	{
+    	updateOptions.SetUpdateTimeOut( TTimeIntervalMicroSeconds(KStartUpdateIntervalTimeOut));
+    	}    
+    User::LeaveIfError( iPositioner.SetUpdateOptions(updateOptions) );    
+    }
+
+
+// ----------------------------------------------------------------------------
+// CBlidLocation::GetCurrentUpdateInterval
+// ----------------------------------------------------------------------------
+//
+void CBlidLocation:: GetCurrentUpdateInterval(TInt& aInterval)
+	{
+	aInterval = iCurrentUpdateInterval;
+	}
+
+// ----------------------------------------------------------------------------
+// CBlidLocation::GetPositionInfoStatus
+// ----------------------------------------------------------------------------
+//
+TInt CBlidLocation::GetPositionInfoStatus()
+    {
+    return iPosStatus.Int();
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidLocation::CheckIfWaitingGPSData
+// ----------------------------------------------------------------------------
+//
+TBool CBlidLocation::CheckIfWaitingGPSData()
+	{
+	if(iDeviceStatus == EDeviceUnderConnection)
+	    {
+	    return ETrue;
+	    }
+	    
+	// If none of the above then check satellite status
+    TInt num = iPositionInfo.NumSatellitesInView();
+    if(num > 0)
+    	{
+    	return ETrue;
+    	}
+    return EFalse;
+	}
+
+// ----------------------------------------------------------------------------
+// CBlidLocation::GetRegisteredViewId
+// ----------------------------------------------------------------------------
+//
+TInt CBlidLocation::GetRegisteredViewId()
+    {
+    return iRegisteredViewId;
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidLocation::GetModuleInfoStatus
+// ----------------------------------------------------------------------------
+//
+void CBlidLocation::GetModuleInfoStatus(TPositionModuleStatusBase& aPosModuleStatus)
+	{
+	// This function scan through the all satellite and selected PSY
+	// and check the status of those PSY's if those are in Device err state.
+	//
+	TUint numberOfModules;    
+	TPositionModuleInfo moduleInfo;
+	numberOfModules = iModuleInfoArray.Count();
+
+	if( numberOfModules > 0)
+		{
+		for( TInt i = 0; i < numberOfModules; i++ )
+			{
+			moduleInfo = iModuleInfoArray[i];
+			if ( (moduleInfo.Capabilities() &  
+			TPositionModuleInfo::ECapabilitySatellite )  && 
+			moduleInfo.IsAvailable())
+				{
+				TPositionModuleId moduleId = moduleInfo.ModuleId();
+				iServer.GetModuleStatus(aPosModuleStatus, moduleId);
+
+				TPositionModuleStatus lPosModuleStatus;
+				iServer.GetModuleStatus(lPosModuleStatus, moduleId);
+				TInt resulterr = lPosModuleStatus.DeviceStatus();
+
+				if( (resulterr == TPositionModuleStatus::EDeviceError ) ||
+				(resulterr == TPositionModuleStatus::EDeviceInactive ) ||
+				(resulterr == TPositionModuleStatus::EDeviceStandBy ) )
+					{
+					continue;
+					}
+				else
+					{
+					break;
+					}                        
+				}
+			}
+		}
+	}
+
+// ----------------------------------------------------------------------------
+// CBlidLocation::GetNumOfSatellitesL
+// ----------------------------------------------------------------------------
+//
+void CBlidLocation::GetNumOfSatellitesL(TInt& aNumSatellites)
+    {
+    TSatelliteData tempSatelliteData;
+    TPosition CurrentPosition;
+    TInt totalStrength = 0;
+    TInt noOfSatUsed = iPositionInfo.NumSatellitesUsed();
+    TInt noOfSatInView = iPositionInfo.NumSatellitesInView();
+    iPositionInfo.GetPosition( CurrentPosition );
+    TBool isLat = Math::IsNaN( CurrentPosition.Latitude() );
+    TBool isLong = Math::IsNaN( CurrentPosition.Longitude () );
+    TBool isAlt = Math::IsNaN( CurrentPosition.Altitude () );
+    
+    if( noOfSatUsed >= 4 && noOfSatInView > 4 )
+	    {
+		for(TInt i = 0;i < noOfSatUsed ;i++ )
+			{
+			User::LeaveIfError(iPositionInfo.GetSatelliteData(i,tempSatelliteData));
+			totalStrength += tempSatelliteData.SignalStrength();
+			}
+		TInt avgStrength = 	totalStrength / noOfSatUsed;
+		if( avgStrength >= 40 &&
+			!isLat &&
+			!isLong &&
+			!isAlt  )
+			{
+			aNumSatellites = 4;				
+			}
+		else
+			{
+			aNumSatellites = 3;				
+			}			
+	    }
+	else if ( noOfSatUsed < 4  &&  noOfSatInView >= 4 )	    
+		{
+		aNumSatellites = 2;	
+		}
+	else if ( noOfSatUsed < 4  &&  noOfSatInView < 4 )
+		{
+		aNumSatellites = 1;			
+		}
+	else
+		{
+		aNumSatellites = 0;
+		}		
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidLocation::ResetMaxSpeed
+// ----------------------------------------------------------------------------
+//
+void CBlidLocation::ResetMaxSpeed()
+	{
+    iMaxSpeed = 0.0;
+    }
+
+
+// ----------------------------------------------------------------------------
+// CBlidLocation::ResetAvgSpeed
+// ----------------------------------------------------------------------------
+//
+void CBlidLocation::ResetAvgSpeed()
+	{
+    iSpeedAverage= 0.0;
+    }
+    
+
+// ----------------------------------------------------------------------------
+// CBlidLocation::CalculateTripTimeL
+// ----------------------------------------------------------------------------
+//
+void CBlidLocation::CalculateTripTimeL()
+    {
+    TTime curTime;
+    curTime.UniversalTime();
+    curTime.SecondsFrom(iInitTripTime,iTripInterval);    
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidLocation::CalculateTotalTimeL
+// ----------------------------------------------------------------------------
+//
+void CBlidLocation::CalculateTotalTimeL()
+    {
+    TTime curTime;
+    curTime.UniversalTime();
+    if( iIsTripStart )
+        {
+        curTime.SecondsFrom(iInitViewTime,iTotalInterval);
+        }
+    }
+
+
+// ----------------------------------------------------------------------------
+// CBlidLocation::UpdateTripData
+// ----------------------------------------------------------------------------
+//
+void CBlidLocation::UpdateTripData( )
+    {
+    if( iIsTripStart )
+    	{
+    	TReal32 distance;
+      	TPosition& pos = GetCurrentPosition();
+      	TReal32 max = Max(pos.HorizontalAccuracy(), iPrevPosition.HorizontalAccuracy());
+      		
+   	  	if(iPrevPosition.Distance(pos, distance) == KErrNone)
+    		{
+    		TBool fixConsidered = EFalse;
+    		if( distance > max )
+    		    {
+    		    iDistanceTravelled += distance;
+    		    iTotalDistanceTravelled += distance;
+    		    iPrevPosition = TPosition(pos);
+    		    fixConsidered = ETrue;
+    		    }
+    		else
+    			{
+    			TReal32 speed = iCourse.Speed();
+    			if(speed > KBlidCutOffSpeed)
+    				{
+    				iDistanceTravelled += distance;
+    				iTotalDistanceTravelled += distance;
+    				iPrevPosition = TPosition(pos);
+    				fixConsidered = ETrue;
+    				}
+    			}
+    	    if(fixConsidered)
+    	        {
+    	        // Evaluated Trip Speeds if fix considered
+    	        TReal32 currentSpeed = iCourse.Speed();
+                if( currentSpeed > iTripMaxSpeed)
+                    {
+                    iTripMaxSpeed = currentSpeed;
+                    }
+                
+                TInt time = iTripInterval.Int();
+            	iTripAverageSpeed = iDistanceTravelled / time;
+            	
+            	if(iTripAverageSpeed > iTripMaxSpeed)
+            		{
+            		iTripAverageSpeed = iTripMaxSpeed;
+            		}
+    	        }
+	        }
+    	else
+    		{
+        	iDistanceTravelled = 0;
+        	iTotalDistanceTravelled = 0;
+           	} 
+    	
+	    iIsDistanceTravelled = ETrue;
+    	}    
+    }
+   
+// ----------------------------------------------------------------------------
+// CBlidLocation::GetTripTime
+// ----------------------------------------------------------------------------
+//
+void CBlidLocation::GetTripTime( TTimeIntervalSeconds& aTime )
+    {
+    aTime = iTripInterval;
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidLocation::GetTripTime
+// ----------------------------------------------------------------------------
+//
+void CBlidLocation::GetTotalTime( TTimeIntervalSeconds& aTime )
+    {
+    aTime = iTotalInterval;
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidLocation::IsTripDistanceTravelled
+// ----------------------------------------------------------------------------
+//
+TBool CBlidLocation::IsTripDistanceTravelled( )
+    {
+    return iIsDistanceTravelled;
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidLocation::GetTripDistance
+// ----------------------------------------------------------------------------
+//
+void CBlidLocation::GetTripDistance(TReal32& aDistance )
+    {
+    aDistance = iDistanceTravelled;
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidLocation::GetTotalDistance
+// ----------------------------------------------------------------------------
+//
+void CBlidLocation::GetTotalDistance(TReal32& aDistance )
+    {
+    aDistance = iTotalDistanceTravelled;
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidLocation::IsTotalDistanceTravelled
+// ----------------------------------------------------------------------------
+//
+TBool CBlidLocation::IsTotalDistanceTravelled( )
+    {
+    return iIsDistance;
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidLocation::SetTripStartL
+// ----------------------------------------------------------------------------
+//
+void CBlidLocation::SetTripStartL()
+	{
+	if( !iIsTripStart )
+		{
+		iIsTripStart = ETrue;
+		iIsTripNotStart = EFalse;
+		iIsTripClear = EFalse;
+		iInitTripTime.UniversalTime();
+		iInitViewTime.UniversalTime();
+		iDistanceTravelled = 0.0;
+		if(iOnlineMode)
+			{
+			iPrevPosition = GetCurrentPosition();
+			iIsPreviousPositionUpdated = ETrue;
+			}
+		else
+			{
+			iIsPreviousPositionUpdated = EFalse;
+			}	
+		
+		if(iTimer)
+		    {
+		    delete iTimer;
+		    iTimer = NULL;
+		    }
+		
+		iTimer = CPeriodic::NewL(CActive::EPriorityHigh);
+		TCallBack callback(TimerCallBackFunctionL, this);
+		iTimer->Start( TTimeIntervalMicroSeconds32(1000000),
+		               TTimeIntervalMicroSeconds32(1000000),
+		               callback );
+		}
+	}
+
+// ----------------------------------------------------------------------------
+// CBlidLocation::HasTripStarted
+// ----------------------------------------------------------------------------
+//
+TBool CBlidLocation::HasTripStarted()
+	{
+	return iIsTripStart;
+	}
+
+// ----------------------------------------------------------------------------
+// CBlidLocation::SetTripStop
+// ----------------------------------------------------------------------------
+//
+void CBlidLocation::SetTripStop()
+	{
+	iIsTripStart = EFalse;
+	//iIsTripNotStart = EFalse;
+	if(iOnlineMode)
+		{
+		iWasGPSDataAvailableOnTripStop = ETrue;
+		}	
+    else
+    	{
+    	iWasGPSDataAvailableOnTripStop = EFalse;
+    	}
+	iStoppedTime.UniversalTime();
+	if(iTimer)
+	    {
+	    delete iTimer;
+	    iTimer = NULL;
+	    }
+	}
+
+// ----------------------------------------------------------------------------
+// CBlidLocation::HasTripStarted
+// ----------------------------------------------------------------------------
+//
+TBool CBlidLocation::HasTripNotStarted()
+	{
+	return iIsTripNotStart;
+	}
+
+// ----------------------------------------------------------------------------
+// CBlidLocation::HasTripStarted
+// ----------------------------------------------------------------------------
+//
+TBool CBlidLocation::WasGPSAvailableOnTripStop()
+	{
+	return iWasGPSDataAvailableOnTripStop;
+	}
+
+// ----------------------------------------------------------------------------
+// CBlidLocation::ResetTrip
+// ----------------------------------------------------------------------------
+//
+void CBlidLocation::ResetTrip()
+	{
+	if(iIsTripStart == EFalse)
+	    {
+	    iIsTripReset = ETrue;	    
+	    }
+	else
+	    {
+	    iIsTripReset = EFalse;
+	    }
+	
+	iDurationInSeconds = 0.0;	
+	iDistanceTravelled = 0.0;
+	iTripTime = 0;
+	iTripInterval = 0;
+	iInitTripTime.UniversalTime();
+	iTripAverageSpeed = 0.0;
+	iTripMaxSpeed = 0.0;	
+	}
+
+// ----------------------------------------------------------------------------
+// CBlidLocation::Restart
+// ----------------------------------------------------------------------------
+//
+/*void CBlidLocation::Restart()
+	{
+	iDurationInSeconds = 0.0;
+	iDistanceTravelled = 0.0;
+	//iTotalDistanceTravelled = 0.0;
+	iTotalDurationInSeconds = 0.0;
+	iWasGPSDataAvailableOnTripStop = EFalse;
+	iTripTime = 0;
+	iTotalTime = 0;
+	iTripInterval = 0;
+	iTotalInterval = 0;
+	iInitViewTime.UniversalTime();
+	iInitTripTime.UniversalTime();
+	iIsTripNotStart = EFalse;
+    iTripAverageSpeed = 0.0;
+	iTripMaxSpeed = 0.0;	
+	}*/
+	
+// ----------------------------------------------------------------------------
+// CBlidLocation::SetTripResumeL
+// ----------------------------------------------------------------------------
+//
+void CBlidLocation::SetTripResumeL()
+	{
+	iIsTripStart = ETrue;
+	iIsTripNotStart = EFalse;
+	iWasGPSDataAvailableOnTripStop = EFalse;
+	iTimer = CPeriodic::NewL(CActive::EPriorityHigh);
+	TCallBack callback(TimerCallBackFunctionL, this);
+	iTimer->Start( TTimeIntervalMicroSeconds32(1000000),
+	               TTimeIntervalMicroSeconds32(1000000),
+	               callback );
+	TTime curTime;
+	curTime.UniversalTime();    
+	TTimeIntervalMicroSeconds interval;
+    interval = curTime.MicroSecondsFrom(iStoppedTime);
+    
+	if(iStoppedTime > iInitViewTime )
+	    {	    	    
+    	iInitViewTime = iInitViewTime + interval;  	    	
+	    }
+	
+	if(iIsTripReset)
+	    {
+	    iInitTripTime.UniversalTime();
+	    iIsTripReset = EFalse;
+	    }
+	else if(iStoppedTime > iInitTripTime )
+	    {
+	    iInitTripTime = iInitTripTime + interval;
+	    }	
+
+    if(iIsTripStart)
+        {       
+        CalculateTripTimeL();
+        }
+    CalculateTotalTimeL();
+    
+    if(iObserver)
+        {
+        if(iOnlineMode)
+            {
+            iObserver->NotifyL(iOnlineMode);
+            }
+        else
+            {
+            iObserver->NotifyErrorL(KErrUnknown);
+            }        
+        }    
+	}
+	
+// ----------------------------------------------------------------------------
+// CBlidLocation::SetTripClear
+// ----------------------------------------------------------------------------
+//
+void CBlidLocation::SetTripClear()
+	{
+	iIsTripClear = ETrue;
+	iIsTripStart = EFalse;
+    iIsTripReset = EFalse;
+    iIsDistance = ETrue;    
+    iWasGPSDataAvailableOnTripStop = EFalse;
+    iTripAverageSpeed = 0.0;
+    iTripMaxSpeed = 0.0;
+	iTripGPSDataLost = EFalse;
+	iIsTripNotStart = ETrue;
+
+	iDurationInSeconds = 0.0;
+	iDistanceTravelled = 0.0;
+	iTotalDurationInSeconds = 0.0;
+	iTripTime = 0;
+	iTotalTime = 0;
+	iTripInterval = 0;
+	iTotalInterval = 0;
+	iInitViewTime.UniversalTime();
+	iInitTripTime.UniversalTime();
+	}
+	
+// ----------------------------------------------------------------------------
+// CBlidLocation::IsTripCleared
+// ----------------------------------------------------------------------------
+//
+TBool CBlidLocation::IsTripCleared()
+	{
+	return iIsTripClear;
+	}
+
+// ----------------------------------------------------------------------------
+// CBlidLocation::ResetTripClear
+// ----------------------------------------------------------------------------
+//
+void CBlidLocation::ResetTripClear()
+	{
+	iIsTripClear = EFalse;
+	iInitTripTime.UniversalTime();
+	iInitViewTime.UniversalTime();
+	}
+
+
+// ----------------------------------------------------------------------------
+// CBlidLocation::ResetTripClear
+// ----------------------------------------------------------------------------
+//
+TBool CBlidLocation::IsTripReset()
+    {
+    return iIsTripReset;
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidLocation::TimerCallBackL
+// ----------------------------------------------------------------------------
+//    
+void CBlidLocation::TimerCallBackL()
+    {
+    if(iIsTripStart)
+       {       
+       CalculateTripTimeL();
+       }
+    CalculateTotalTimeL();
+    
+    if(iObserver)
+        {
+        if(iOnlineMode)
+            {
+            iObserver->NotifyL(iOnlineMode);
+            }
+        else
+            {
+            iObserver->NotifyErrorL(KErrUnknown);
+            }        
+        }    
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidLocation::GetHeading
+// ----------------------------------------------------------------------------
+//
+TReal32 CBlidLocation::GetHeading()
+    {
+    return iHeading;
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidLocation::CalculateCourse
+// ----------------------------------------------------------------------------
+//
+void CBlidLocation::CalculateCourse()
+    {
+    TReal32 distance;
+    TPosition& pos = GetCurrentPosition();	
+   	TReal32 max = Max(pos.HorizontalAccuracy(), iPrevPosition.HorizontalAccuracy());
+   	   	
+   	if(iPrevCoursePosition.Distance(pos, distance) == KErrNone)
+    	{    	
+    	if( distance > 0.2 * max )
+    	    {	        
+	        iHeading = iCourse.Heading();
+	        iPrevCoursePosition = TPosition(pos);	     
+    	    }
+	    }
+	else
+	    {
+	    iPrevCoursePosition = TPosition(pos);	
+	    }
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidLocation::CheckGPSAvailability
+// ----------------------------------------------------------------------------
+//
+TInt CBlidLocation::CheckGPSAvailability()
+    {
+    TPositionModuleStatus lPosModuleStatus;
+    GetModuleInfoStatus(lPosModuleStatus);
+    TInt retVal = lPosModuleStatus.DeviceStatus();    
+    
+    
+    if ((retVal == TPositionModuleStatus::EDeviceError) ||
+        (retVal == TPositionModuleStatus::EDeviceStandBy) ||
+        (retVal == TPositionModuleStatus::EDeviceUnknown) )
+        {
+        // GPS device unavailable        
+        return 0;
+        }
+    else if( (retVal == TPositionModuleStatus::EDeviceReady) ||
+             (retVal == TPositionModuleStatus::EDeviceActive) ||
+             (retVal == TPositionModuleStatus::EDeviceInactive) )
+        {        
+        // GPS device is paired and available
+        return 1;
+        }
+    // GPS device connections is being established
+    return -1;
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidLocation::IsGPSDataAvailable
+// ----------------------------------------------------------------------------
+//
+TBool CBlidLocation::IsGPSDataAvailable()
+    {
+    return iGPSDataAvailable;
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidLocation::WasGPSDataLost
+// ----------------------------------------------------------------------------
+//
+TBool CBlidLocation::WasGPSDataLost()
+    {
+    return iTripGPSDataLost;
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidLocation::SetGPSDataAvailability
+// ----------------------------------------------------------------------------
+//
+void CBlidLocation::SetGPSDataAvailability(TBool aAvailability)
+    {
+    iTripGPSDataLost = aAvailability;
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidLocation::GetTripAverageSpeed
+// ----------------------------------------------------------------------------
+//
+TReal32 CBlidLocation::GetTripAverageSpeed()
+    {
+    return iTripAverageSpeed;    
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidLocation::GetTripAverageSpeed
+// ----------------------------------------------------------------------------
+//
+TReal32 CBlidLocation::GetTripMaxSpeed()
+    {
+    TReal32 currentSpeed = iCourse.Speed();
+    return currentSpeed;    
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidLocation::GetModuleInfoNotification
+// ----------------------------------------------------------------------------
+//
+void CBlidLocation::GetModuleInfoNotificationL()
+	{
+	iModuleInfoArray.Reset();
+    User::LeaveIfError( iServer.GetNumModules(iModuleCount) );
+    TPositionModuleInfo moduleInfo;
+	    
+    for( TUint i = 0; i < iModuleCount; i++ )
+        {
+        User::LeaveIfError( iServer.GetModuleInfoByIndex( i, moduleInfo ) );
+        iModuleInfoArray.Append(moduleInfo);
+        }
+	}
+
+// ----------------------------------------------------------------------------
+// CBlidLocation::SetNavigationStart
+// ----------------------------------------------------------------------------
+//
+void CBlidLocation::SetNavigationStart( TBool aNavigationStart )
+	{
+	if( !aNavigationStart )
+		{
+		iIsTripStart = EFalse;
+		}
+	else
+		{
+		iIsTripStart = ETrue;		
+		}
+	
+	if( !iIsTripStart )
+		{
+		// delete the timer because the stop trip will not be get called
+		// or else it will leads to memory leak
+		if(iTimer)
+		    {
+		    delete iTimer;
+		    iTimer = NULL;
+		    }				
+		}
+	}	
+
+// ----------------------------------------------------------------------------
+// CBlidLocation::ResetOdometerValue
+// ----------------------------------------------------------------------------
+//
+void CBlidLocation::ResetOdometerValue()
+	{
+	iTotalDistanceTravelled = 0.0;	
+	}
+
+
+// ----------------------------------------------------------------------------
+// CBlidLocation::IsSatCapablePsyAvailable
+// ----------------------------------------------------------------------------
+//
+TBool CBlidLocation::IsSatCapablePsyAvailable()
+	{
+	TUint numberOfModules;    
+	TPositionModuleInfo moduleInfo;
+	numberOfModules = iModuleInfoArray.Count();
+
+	if( numberOfModules > 0)
+		{
+		moduleInfo = iModuleInfoArray[ 1 ];
+		if ( (moduleInfo.Capabilities() &  
+		TPositionModuleInfo::ECapabilitySatellite )  && 
+		!moduleInfo.IsAvailable() )
+			{
+			return ETrue;	
+			}
+		}
+	return EFalse;		
+	}
+
+// ----------------------------------------------------------------------------
+// CBlidLocation::NumberOfSatellitesVisible
+// ----------------------------------------------------------------------------
+//
+TInt CBlidLocation::NumberOfSatellitesVisible()
+    {
+	return iPositionInfo.NumSatellitesInView();	
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidLocation::IsSatellitesUsed
+// ----------------------------------------------------------------------------
+//
+TBool CBlidLocation::IsSatellitesUsed( TInt aIndex )
+    {
+    TBool lResult = EFalse;
+    TSatelliteData satData;
+    
+	if( GetSatelliteData( aIndex, satData ) != KErrNotFound)
+		{
+		lResult = satData.IsUsed();	
+		}
+	return lResult;		
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidLocation::SortSatelliteDataL
+// ----------------------------------------------------------------------------
+//
+void CBlidLocation::SortSatelliteDataL()
+	{
+	TSatelliteData tempSatelliteData;
+	TLinearOrder<TSatelliteData> order(SortCriteria);
+	iSortedSatData.Reset();
+	TInt satellitesInView = iPositionInfo.NumSatellitesInView();
+	for(TInt i = 0;i < satellitesInView ;i++ )
+		{
+		User::LeaveIfError(iPositionInfo.GetSatelliteData(i,tempSatelliteData));
+		TInt signalsth = tempSatelliteData.SignalStrength();
+    	iSortedSatData.InsertInOrderAllowRepeats(tempSatelliteData, order);                
+		}
+	}
+	
+// ----------------------------------------------------------------------------
+// CBlidLocation::GetSatelliteSignalStrength
+// ----------------------------------------------------------------------------
+//
+TInt CBlidLocation::GetSatelliteSignalStrength( TInt aIndex )
+    {
+	TSatelliteData satData;
+	
+	if( GetSatelliteData( aIndex, satData ) != KErrNotFound )
+		{
+		if( satData.SignalStrength() < KMinSatelliteSignalStrength )
+        	{
+        	return 0;
+        	}
+		else if( satData.SignalStrength() == KMinSatelliteSignalStrength )
+        	{
+        	return 1;
+        	}        
+		else if( satData.SignalStrength() > KMinSatelliteSignalStrength &&
+				 satData.SignalStrength() < KMidSatelliteSignalStrength )
+        	{
+        	return 2;
+        	}        
+		else if( satData.SignalStrength() > KMidSatelliteSignalStrength &&
+				 satData.SignalStrength() < KMaxSatelliteSignalStrength )
+        	{
+        	return 3;
+        	}        
+		else if( satData.SignalStrength() > KMaxSatelliteSignalStrength )
+        	{
+        	return 4;
+        	}        
+		}
+	return 0;		
+    }
+    
+// ----------------------------------------------------------------------------
+// CBlidLocation::GetSatelliteData
+// ----------------------------------------------------------------------------
+//
+TInt CBlidLocation::GetSatelliteData( TUint aIndex, 
+                                      TSatelliteData& aSatelliteData)
+    {
+    if( aIndex >= iSortedSatData.Count() )
+    	{
+    	return KErrNotFound;
+    	}    
+    aSatelliteData = iSortedSatData[aIndex];
+    return KErrNone;
+    }    
+
+// ----------------------------------------------------------------------------
+// CBlidLocation::GetSatelliteNo
+// ----------------------------------------------------------------------------
+//
+TInt CBlidLocation::GetSatelliteNo( TInt aIndex )
+    {
+	TSatelliteData satData;
+	
+	if( GetSatelliteData( aIndex, satData ) != KErrNotFound)
+		{
+		return satData.SatelliteId();
+		}
+	return 0;		
+    }    
+
+// ----------------------------------------------------------------------------
+// SortCriteria  
+// ----------------------------------------------------------------------------
+//	
+TInt SortCriteria(const TSatelliteData& aFirst, const TSatelliteData& aNext)
+	{
+	if(aFirst.SatelliteId() > aNext.SatelliteId())
+		{
+		return 1;
+		}
+	else if(aFirst.SatelliteId() < aNext.SatelliteId())
+		{
+		return -1;
+		}
+	return 0;
+	}
+	        
+// ----------------------------------------------------------------------------
+// TimerCallBackFunctionL
+// ----------------------------------------------------------------------------
+//
+TInt TimerCallBackFunctionL(TAny* aPtr)
+    {
+    CBlidLocation* ptr = static_cast<CBlidLocation*>(aPtr);
+    ptr->TimerCallBackL();
+    return 1;
+    }
+
+//  End of File
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/basiclocationinfodisplay/blid/engine/src/CBlidMeasurementSettingListener.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,169 @@
+/*
+* 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: Listner for getting the System of measurment settings using cRepository
+*
+*/
+
+
+
+// System Include
+#include <centralrepository.h>
+#include <locnotprefplugindomaincrkeys.h>
+
+// INCLUDE FILES
+#include "CBlidMeasurementSettingListener.h"
+
+// CONSTANTS
+
+
+// ============================ MEMBER FUNCTIONS ==============================
+
+// ---------------------------------------------------------------------------
+// CBlidMeasurementSettingListener::CBlidMeasurementSettingListener
+// Overloaded Constructor
+//
+// ---------------------------------------------------------------------------
+//	
+CBlidMeasurementSettingListener::CBlidMeasurementSettingListener(  
+                                MBlidMeasurementSettings&	aListenerObsrv )
+	:CActive(EPriorityStandard),
+	iObserver(aListenerObsrv)
+	{
+	}
+
+// ---------------------------------------------------------------------------
+// CBlidMeasurementSettingListener::~CBlidMeasurementSettingListener
+// Destructor
+//
+// ---------------------------------------------------------------------------
+//
+CBlidMeasurementSettingListener::~CBlidMeasurementSettingListener()
+	{
+	Cancel();
+	
+	delete iRepository;
+	iRepository = NULL;	
+	}
+	
+// ---------------------------------------------------------------------------
+// CBlidMeasurementSettingListener* CBlidMeasurementSettingListener::NewL
+// Creates new Systen of Measurement adapter
+// ---------------------------------------------------------------------------
+//    
+CBlidMeasurementSettingListener* CBlidMeasurementSettingListener::NewL( 
+                            MBlidMeasurementSettings&	aListenerObsrv )
+	{	
+    CBlidMeasurementSettingListener* self = 
+                        CBlidMeasurementSettingListener::NewLC( aListenerObsrv );
+	CleanupStack::Pop(self);
+	return self;
+	}
+
+// ---------------------------------------------------------------------------
+// CBlidMeasurementSettingListener* CBlidMeasurementSettingListener::NewLC
+// Creates new Systen of Measurement Listener. Leaves the object on the clean-up
+// stack
+// ---------------------------------------------------------------------------
+// 
+CBlidMeasurementSettingListener* CBlidMeasurementSettingListener::NewLC( 
+                            MBlidMeasurementSettings&	aListenerObsrv )
+	{	
+    CBlidMeasurementSettingListener* self = 
+                        new(ELeave) CBlidMeasurementSettingListener( aListenerObsrv );
+	CleanupStack::PushL(self);
+	self->ConstructL();
+	return self;
+	}
+	
+// ---------------------------------------------------------------------------
+// void CBlidMeasurementSettingListener::ConstructL
+// Second Phase Constructor
+//
+// ---------------------------------------------------------------------------
+//
+void CBlidMeasurementSettingListener::ConstructL()
+	{
+	CActiveScheduler::Add( this );
+	
+	// Create the Central repository object for manipulating Avkon Central
+	// repository for System of measurements settings
+	iRepository = CRepository::NewL(TUid::Uid( KCRUidLocNotationPref ));
+	
+	StartNotification();	
+	}
+
+// ---------------------------------------------------------------------------
+// TReal32 CBlidMeasurementSettingListener::SysofMeasurementL
+// Returns the current value of the System of measurements settings
+//
+// @return TReal32  Current value of the System of measurements settings
+// ---------------------------------------------------------------------------
+//
+TReal32 CBlidMeasurementSettingListener::SysofMeasurementL()
+    {
+    
+    TInt settingsValue = 0;
+    User::LeaveIfError( iRepository->Get( KLocSystemofMeasurements,
+                                          settingsValue ));  
+    return ( static_cast<TReal32>( settingsValue ));
+    }
+
+	    
+// --------------------------------------------------------------------------
+// void CBlidMeasurementSettingListener::RunL
+// Inherited from CActive
+//
+// ---------------------------------------------------------------------------
+//
+void CBlidMeasurementSettingListener::RunL()
+    {
+    // Issue Notification
+    iObserver.HandleSysMeasureValueL();
+    
+    // Schedule for listening to change events again
+    StartNotification();
+    }
+
+// --------------------------------------------------------------------------
+// void CBlidMeasurementSettingListener::DoCancel
+// Inherited from CActive
+//
+// ---------------------------------------------------------------------------
+//
+void CBlidMeasurementSettingListener::DoCancel()
+    {
+    // Cancel the outstanding CR notification request
+    iRepository->NotifyCancel( KLocSystemofMeasurements );
+    }
+    
+// --------------------------------------------------------------------------
+// void CBlidMeasurementSettingListener::StartNotification
+// Start notification from the Central repository server for any changes in the
+// System of measurements key value
+//
+// ---------------------------------------------------------------------------
+//
+void CBlidMeasurementSettingListener::StartNotification()
+    {
+    if( !IsActive())
+        {
+        iStatus = KRequestPending;
+        // Request for notification
+        iRepository->NotifyRequest( KLocSystemofMeasurements, iStatus);
+        SetActive();          
+        }  
+    }
+	
+// End of File
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/basiclocationinfodisplay/blid/engine/src/CBlidRouter.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,418 @@
+/*
+* 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 CBlidRouter class which provides access to blid router. Blid route can be modified and read using this class
+*
+*/
+
+
+
+// INCLUDE FILES
+#include <f32file.h> // RFs
+#include <e32math.h>
+#include <sysutil.h>
+#include <driveinfo.h>
+
+#include "CBlidRouter.h"
+#include "TNamedCoordinate.h"
+#include "blidengconsts.h"
+
+// CONSTANTS
+const TInt KBlidInvalidWaypointIndex( -1 );
+
+//Forward declaration. Function for sorted ordering of waypoints
+TInt WaypointOrdering(const TNamedCoordinate& aCoordinate1, const TNamedCoordinate& aCoordinate2);
+
+_LIT(KPanicText, "CBlidRouter");
+enum TPanicCode
+    {
+    EBlidReadOutOfRange = 1
+    };
+
+// ============================ MEMBER FUNCTIONS ==============================
+// ----------------------------------------------------------------------------
+// CBlidRouter::CBlidRouter
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// ----------------------------------------------------------------------------
+//
+CBlidRouter::CBlidRouter()
+    {
+    iWaypointIndex = -1;    
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidRouter::ConstructL
+// Symbian 2nd phase constructor can leave.
+// ----------------------------------------------------------------------------
+//
+void CBlidRouter::ConstructL()
+    {
+    iLandmark = NULL;
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidRouter::NewL
+// Two-phased constructor.
+// ----------------------------------------------------------------------------
+//
+CBlidRouter* CBlidRouter::NewL()
+    {
+    CBlidRouter* self = new( ELeave ) CBlidRouter;
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidRouter::~CBlidRouter
+// ----------------------------------------------------------------------------
+//
+CBlidRouter::~CBlidRouter()
+    {
+    iRoute.ResetAndDestroy();
+    iRoute.Close();
+    if( iLandmark )
+	    {
+	    delete iLandmark;
+	    }
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidRouter::At
+// ----------------------------------------------------------------------------
+//
+TNamedCoordinate& CBlidRouter::At( TInt aIndex )
+	{
+    __ASSERT_ALWAYS(aIndex >= 0 && aIndex < iRoute.Count(),
+        			User::Panic(KPanicText,EBlidReadOutOfRange));
+    return *iRoute[aIndex];
+	}
+
+// ----------------------------------------------------------------------------
+// CBlidRouter::AppendL
+// ----------------------------------------------------------------------------
+//
+TInt CBlidRouter::AppendL( TNamedCoordinate* aCoordinate, TBool aCheckForMemory )
+	{
+	RFs fs;
+    User::LeaveIfError(fs.Connect()); 
+    CleanupClosePushL( fs ); 
+    
+    if(aCheckForMemory)
+    	{
+    	if ( SysUtil::DiskSpaceBelowCriticalLevelL( &fs, sizeof(aCoordinate), DriveInfo::EDefaultPhoneMemory ) )
+		    {
+		    CleanupStack::PopAndDestroy(); // fs
+		    return KErrDiskFull;        
+			}
+    	}    
+	CleanupStack::PopAndDestroy(); // fs
+	TInt retVal;
+	TLinearOrder<TNamedCoordinate> order(WaypointOrdering);    		
+    retVal = iRoute.InsertInOrder(aCoordinate, order);    
+    return retVal;
+	}
+
+
+// ----------------------------------------------------------------------------
+// CBlidRouter::RemoveL
+// ----------------------------------------------------------------------------
+//
+TInt CBlidRouter::RemoveL( TInt aIndex )
+	{
+    __ASSERT_ALWAYS(aIndex >= 0 && aIndex < iRoute.Count(),
+            User::Panic(KPanicText,EBlidReadOutOfRange));
+    RFs fs;
+    User::LeaveIfError(fs.Connect()); 
+    CleanupClosePushL( fs ); 
+
+    if ( SysUtil::DiskSpaceBelowCriticalLevelL( &fs, 0, DriveInfo::EDefaultPhoneMemory ) )
+        {
+        CleanupStack::PopAndDestroy(); // fs
+        return KErrDiskFull;        
+		}
+	CleanupStack::PopAndDestroy(); // fs
+    TNamedCoordinate* plot = iRoute[aIndex];
+    iRoute.Remove( aIndex );
+    delete plot;
+    return KErrNone;
+	}
+
+// ----------------------------------------------------------------------------
+// CBlidRouter::ResetAndDestroy
+// ----------------------------------------------------------------------------
+//
+void CBlidRouter::ResetAndDestroy()
+    {
+    iRoute.ResetAndDestroy();
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidRouter::Count
+// ----------------------------------------------------------------------------
+//
+TInt CBlidRouter::Count()
+	{
+    return iRoute.Count();
+	}
+
+// ----------------------------------------------------------------------------
+// CBlidRouter::Waypoint()
+// Waypoint getter
+// ----------------------------------------------------------------------------
+//
+TNamedCoordinate* CBlidRouter::Waypoint()
+    {
+    if(!iIsWaypoint || iWaypointIndex == KBlidInvalidWaypointIndex)
+	    {
+	    return NULL;
+	    }
+	else if( iWaypointIndex == KManualWaypointIndex )
+	    {
+	    return &iManualWaypoint;
+	    }
+    else
+	    {
+	    return &iWaypoint;	
+	    }
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidRouter::IndexOfWaypoint
+// ----------------------------------------------------------------------------
+//
+TInt CBlidRouter::IndexOfWaypoint() const
+    {
+    return iWaypointIndex;
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidRouter::SetWaypoint( const TInt aIndex )
+// Waypoint setter
+// ----------------------------------------------------------------------------
+//
+void CBlidRouter::SetWaypoint( const TInt aIndex )
+    {
+    iWaypoint = At( aIndex );  
+    iWaypointIndex = aIndex;
+    iIsWaypoint = ETrue;
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidRouter::RemoveWaypoint()
+// ----------------------------------------------------------------------------
+//
+void CBlidRouter::RemoveWaypoint()
+    {
+    iWaypointIndex = -1;
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidRouter::ClearSetPoints()
+// ----------------------------------------------------------------------------
+//
+void CBlidRouter::ClearSetPoints()
+	{
+	RemoveWaypoint();
+	if(iLandmark)
+		{
+		delete iLandmark;
+		iLandmark = NULL;			
+		}
+	}
+
+// ----------------------------------------------------------------------------
+// CBlidRouter::ExternalizeL
+// ----------------------------------------------------------------------------
+//
+void CBlidRouter::ExternalizeL( RWriteStream& aStream ) 
+    {
+    TDesC *name;
+    TInt count( Count() );
+    aStream.WriteInt32L( count );
+    for (TInt i = 0; i < count; i++ )
+        {
+        name = At( i ).Name();
+        if ( name )
+            {
+            CleanupStack::PushL( name );
+            aStream.WriteInt32L( name->Length() );
+            aStream.WriteL( *name );
+            CleanupStack::PopAndDestroy(); //name
+            name = NULL;
+            
+            if (  !Math::IsNaN(At( i ).Latitude()) )
+                {
+                aStream.WriteReal64L( At( i ).Latitude() );
+                }
+            else 
+                {
+                aStream.WriteReal64L( 0 );
+                }
+
+            if (  !Math::IsNaN(At( i ).Longitude()) )
+                {
+                aStream.WriteReal64L( At( i ).Longitude() );
+                }
+            else 
+                {
+                aStream.WriteReal64L( 0 );
+                }
+
+            if (  !Math::IsNaN(At( i ).Altitude()) )
+                {
+                aStream.WriteReal32L( At( i ).Altitude() );
+                }
+            else 
+                {
+                aStream.WriteReal32L( 0 );
+                }
+			if (  !Math::IsNaN(At( i ).Accuracy()) )
+                {
+                aStream.WriteReal32L( At( i ).Accuracy() );
+                }
+            else 
+                {
+                aStream.WriteReal32L( 0 );
+                }
+            }
+        }   
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidRouter::InternalizeV1L
+// ----------------------------------------------------------------------------
+//
+void CBlidRouter::InternalizeV1L( RReadStream& aStream )
+    {
+    TInt i;
+    TInt count( aStream.ReadInt32L() );    
+    TInt length(0);
+    TBuf<KBlidWaypointNameMaxLen> name;
+    for ( i = 0; i < count; i++ )
+        {
+        length = aStream.ReadInt32L();
+        aStream.ReadL( name, length );
+        TReal64 latitude = aStream.ReadReal64L();
+        TReal64 longitude = aStream.ReadReal64L();
+        TReal32 altitude = aStream.ReadReal32L();
+        TReal32 accuracy = aStream.ReadReal32L();
+        TNamedCoordinate* plot = new(ELeave)TNamedCoordinate(
+                            latitude, 
+                            longitude,
+                            altitude,
+                            name,accuracy);
+        CleanupStack::PushL( plot );
+        //iRouter takes ownership of plot
+        User::LeaveIfError( AppendL( plot, EFalse ) );
+        CleanupStack::Pop(); //plot
+        name.Zero();
+        }
+    }
+	
+// ----------------------------------------------------------------------------
+// CBlidRouter::Landmark
+// ----------------------------------------------------------------------------
+//	
+CPosLandmark* CBlidRouter::Landmark() const
+	{
+	if( iLandmark && !iIsWaypoint  )
+		{
+		return iLandmark;	
+		}		
+	else
+		{
+		return NULL;	
+		}	
+	}
+
+// ----------------------------------------------------------------------------
+// CBlidRouter::SetLandmark
+// ----------------------------------------------------------------------------
+//    
+void CBlidRouter::SetLandmark(CPosLandmark* aLandmark) 
+	{
+	if( iLandmark )
+		{
+		delete iLandmark;	
+		}
+	
+	iLandmark = aLandmark;
+	iIsWaypoint = EFalse;
+	}
+	
+// ----------------------------------------------------------------------------
+// CBlidRouter::IsWaypointSet
+// ----------------------------------------------------------------------------
+//
+TBool CBlidRouter::IsWaypointSet()
+	{
+	return iIsWaypoint;
+	}
+
+// ----------------------------------------------------------------------------
+// CBlidRouter::IsAnyPointSet
+// ----------------------------------------------------------------------------
+//
+TBool CBlidRouter::IsAnyPointSet()
+	{
+	if( iLandmark || (iWaypointIndex != -1) )
+		{
+		return ETrue;	
+		}
+	else
+		{
+		return EFalse;	
+		}	
+	}
+// ----------------------------------------------------------------------------
+// CBlidRouter::SetManualWaypoint
+// ----------------------------------------------------------------------------
+//
+void CBlidRouter::SetManualWaypoint(TReal latitude, TReal longitude, TDesC& aName)
+    {
+    iWaypointIndex = KManualWaypointIndex;
+    iIsWaypoint = ETrue;
+    iManualWaypoint.SetCoordinate(latitude, longitude);
+    iManualWaypoint.SetName(aName);
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidRouter::FindWaypointIndex
+// ----------------------------------------------------------------------------
+//
+TInt CBlidRouter::FindWaypointIndex( TNamedCoordinate* aCoordinate )
+    {
+    TLinearOrder<TNamedCoordinate> order(WaypointOrdering); 
+    iRoute.Sort( order );
+    TInt lReturn = iRoute.Find( aCoordinate );
+    return lReturn;
+    }
+// ----------------------------------------------------------------------------
+// WaypointOrdering() : Function used for ordering of waypoints
+// ----------------------------------------------------------------------------
+//
+TInt WaypointOrdering(const TNamedCoordinate& aCoordinate1, const TNamedCoordinate& aCoordinate2)
+    {
+    HBufC* name1 = aCoordinate1.Name();
+    HBufC* name2 = aCoordinate2.Name();
+    TInt retVal = name1->Compare(name2->Des());
+    delete name1;
+    delete name2;
+    return retVal;
+    }
+//  End of File
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/basiclocationinfodisplay/blid/engine/src/CBlidSettings.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,230 @@
+/*
+* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies 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 CBlidSettings class which provide access to Blid settings. Blid Setting can be read and modified using this class
+*
+*/
+
+// INCLUDE FILES
+#include <f32file.h> // RFs
+#include <centralrepository.h>
+#include <blid.rsg>
+#include <eikenv.h>
+
+#include "CBlidSettings.h"
+#include "MBlidEngObserver.h"
+#include "CBlidMeasurementSettingListener.h"
+#include "BlidSettingsCrkeys.h"
+#include "Blid.hrh"
+
+// CONSTANTS
+
+// ============================ MEMBER FUNCTIONS ==============================
+// ----------------------------------------------------------------------------
+// CBlidSettings::CBlidSettings
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// ----------------------------------------------------------------------------
+//
+CBlidSettings::CBlidSettings() 
+    : iAltCalibration(0)
+    ,iBacklightOption(0)
+    ,iIsOdoReset( EFalse )
+    {
+    iArrivedDistance = -1;
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidSettings::ConstructL
+// Symbian 2nd phase constructor can leave.
+// ----------------------------------------------------------------------------
+//
+void CBlidSettings::ConstructL()
+    {
+    iSysofMeasSettings = CBlidMeasurementSettingListener::NewL( * this );
+    iArrivedToneName = HBufC8::NewL( KMaxFileName );
+    HandleSysMeasureValueL();
+    iRepository = CRepository::NewL( KCRUidBlidOdometerSettings );
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidSettings::NewL
+// Two-phased constructor.
+// ----------------------------------------------------------------------------
+//
+CBlidSettings* CBlidSettings::NewL()
+    {
+    CBlidSettings* self = new( ELeave ) CBlidSettings;
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidSettings::~CBlidSettings
+// ----------------------------------------------------------------------------
+//
+CBlidSettings::~CBlidSettings()
+    {
+    delete iSysofMeasSettings;
+    delete iArrivedToneName;
+    delete iRepository;
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidSettings::SetAltCalibration
+// ----------------------------------------------------------------------------
+//
+void CBlidSettings::SetAltCalibration( const TReal32 aAltCalibration )
+    {
+    TReal altCalibration = aAltCalibration;
+    iRepository->Set( KBlidAltCalibrationValue, altCalibration );
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidSettings::AltCalibration
+// ----------------------------------------------------------------------------
+//
+TReal32 CBlidSettings::AltCalibration()
+    {
+    TReal altCalibration;
+    TInt error = iRepository->Get( KBlidAltCalibrationValue, altCalibration );
+    if( error == KErrNone )
+        {
+        iAltCalibration = altCalibration;
+        }    
+    return iAltCalibration;
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidSettings::UnitOfMeasurement
+// ----------------------------------------------------------------------------
+//
+TReal32 CBlidSettings::UnitOfMeasurement()
+    {
+    return iMeasurementUnit;
+    }
+    
+// ----------------------------------------------------------------------------
+// CBlidSettings::HandleSysMeasureVlueL
+// ----------------------------------------------------------------------------
+//
+void CBlidSettings::HandleSysMeasureValueL()
+    {
+    iMeasurementUnit = iSysofMeasSettings->SysofMeasurementL();    
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidSettings::SetBacklightOption
+// ----------------------------------------------------------------------------
+//
+void CBlidSettings::SetBacklightOption( const TReal32 aBacklightOption )
+    {
+    TReal backlightOption = aBacklightOption;
+    iRepository->Set( KBlidBacklightOptionValue, backlightOption );
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidSettings::GetBacklightOption
+// ----------------------------------------------------------------------------
+//
+TReal32 CBlidSettings::GetBacklightOption()
+    {
+    TReal backlightOption;
+    TInt error = iRepository->Get( KBlidBacklightOptionValue, backlightOption );
+    if( error == KErrNone )
+        {
+        iBacklightOption = backlightOption;
+        }    
+    return iBacklightOption;
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidSettings::SetArrivedToneName
+// ----------------------------------------------------------------------------
+//
+void CBlidSettings::SetArrivedToneName( const TDesC8& aArrivedToneName )
+    {
+    iRepository->Set( KBlidArrivedToneNameString, aArrivedToneName );
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidSettings::GetArrivedToneName
+// ----------------------------------------------------------------------------
+//
+TDesC8& CBlidSettings::GetArrivedToneName()
+    {
+    TPtr8 des = iArrivedToneName->Des();    
+    TInt error = iRepository->Get( KBlidArrivedToneNameString, des );
+    if( error != KErrNone )
+        {
+	    if( iArrivedToneName->Length() <= 0 )
+		    {
+		    des.Copy( _L8( " Off " ) );	
+		    }
+		}
+    return ( *iArrivedToneName );
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidSettings::SetResetOdometerOption
+// ----------------------------------------------------------------------------
+//
+void CBlidSettings::SetResetOdometerOption( const TReal32 aIsOdoReset )
+    {    
+    TReal isOdoReset = aIsOdoReset;
+    iRepository->Set( KBlidDoResetValue, isOdoReset );
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidSettings::GetResetOdometerOption
+// ----------------------------------------------------------------------------
+//
+TReal32 CBlidSettings::GetResetOdometerOption()
+    {
+    TReal isOdoReset;
+    TInt error = iRepository->Get( KBlidDoResetValue, isOdoReset );
+    if( error != KErrNone )
+        {
+        iIsOdoReset = isOdoReset;
+        }
+    return iIsOdoReset;
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidSettings::SetResetOdometerOption
+// ----------------------------------------------------------------------------
+//
+void CBlidSettings::SetArrivedDistance( TReal32 aDistance )
+    {
+    TReal arrivedDistance = aDistance;
+    iRepository->Set( KBlidOdometerSettingsValue, arrivedDistance );
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidSettings::GetResetOdometerOption
+// ----------------------------------------------------------------------------
+//
+TReal32 CBlidSettings::GetArrivedDistance()
+    {
+    TReal arrivedDistance;
+    TInt error = iRepository->Get( KBlidOdometerSettingsValue, arrivedDistance );
+    if( error == KErrNone )
+        {
+        iArrivedDistance = arrivedDistance;
+        }
+    return iArrivedDistance;
+    }    
+    
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/basiclocationinfodisplay/blid/engine/src/Debug.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,88 @@
+/*
+* 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:  Contains debugging functions
+*
+*/
+
+
+
+// INCLUDE FILES
+#include "Debug.h"
+#include <flogger.h>
+#include <e32svr.h>
+
+// CONSTANTS
+#ifdef _DEBUG
+/// Folder where the log resides
+_LIT( KLogFolder, "BLID" );
+
+/// The name of the log file
+_LIT( KLogFileName, "BLID" );
+
+/// The format in which the time is formatted in log
+_LIT( KLogTimeFormat, "%02d.%02d:%02d:%06d ");
+
+/// The length of the string produced by KLocLogTimeFormat
+const TInt KLogTimeFormatLength = 16;
+
+/// How many characters a log line can contain
+const TInt KLogLineLength = 256;
+
+// ========================== OTHER EXPORTED FUNCTIONS =========================
+
+
+// -----------------------------------------------------------------------------
+// Debug
+// Generates a log file if c:\logs\BLID\ folder exists
+// -----------------------------------------------------------------------------
+//
+void Debug( TRefByValue<const TDesC> aText, ... )
+    {
+  
+    RDebug::Print(aText);
+
+    VA_LIST args;
+    VA_START( args, aText );
+
+    TBuf<KLogLineLength> buf;
+    buf.FormatList( aText, args );
+
+    RFileLogger logger;
+    TInt ret=logger.Connect();
+    if (ret==KErrNone)
+        {
+        logger.SetDateAndTime( EFalse,EFalse );
+        logger.CreateLog( KLogFolder, KLogFileName, EFileLoggingModeAppend );
+        TBuf<KLogTimeFormatLength> timeStamp;
+        TTime now;
+        now.HomeTime();
+        TDateTime dateTime;
+        dateTime = now.DateTime();
+        timeStamp.Format( KLogTimeFormat,
+            dateTime.Hour(), dateTime.Minute(),
+            dateTime.Second(), dateTime.MicroSecond() );
+        buf.Insert( 0, timeStamp );
+
+        logger.Write(buf);
+        }
+
+    logger.Close();
+
+    VA_END( args );
+
+    }
+    
+#endif // _DEBUG
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/basiclocationinfodisplay/blid/engine/src/DllMain.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,33 @@
+/*
+* 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:  Dll entry point
+*
+*/
+
+
+// INCLUDE FILES
+#include "DllMain.h"
+
+// ================= MEMBER FUNCTIONS =======================
+// ----------------------------------------------------------------------------
+// BlidEngPanic
+// ----------------------------------------------------------------------------
+//
+void BlidEngPanic( TInt aCode ) // panic code
+    {
+    _LIT( KPanicText, "BlidEng" );
+    User::Panic( KPanicText, aCode );
+    }
+    
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/basiclocationinfodisplay/blid/engine/src/TNamedCoordinate.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,95 @@
+/*
+* 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 TNamedCoordinate cllass. This class holds the named coordinates of a location (lat, long and altitude)
+*
+*/
+
+
+
+// INCLUDE FILES
+#include "TNamedCoordinate.h"
+
+// ============================ MEMBER FUNCTIONS ==============================
+// ----------------------------------------------------------------------------
+// TNamedCoordinate::TNamedCoordinate
+// ----------------------------------------------------------------------------
+//
+EXPORT_C TNamedCoordinate::TNamedCoordinate()
+    {
+    iAccuracy = 0;
+    }
+// ----------------------------------------------------------------------------
+// TNamedCoordinate::TNamedCoordinate
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// ----------------------------------------------------------------------------
+//
+EXPORT_C TNamedCoordinate::TNamedCoordinate( const TReal64& aLatitude,
+	     const TReal64& aLongitude, const  TDesC& aName ) :
+	     TCoordinate( aLatitude, aLongitude ), iName(aName)
+	{
+	iAccuracy = 0;
+	}
+
+// ----------------------------------------------------------------------------
+// TNamedCoordinate::TNamedCoordinate
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// ----------------------------------------------------------------------------
+//
+EXPORT_C TNamedCoordinate::TNamedCoordinate( const TReal64& aLatitude,
+			                                 const TReal64& aLongitude, 
+                                                   TReal32 aAltitude, 
+                                             const  TDesC& aName,TReal32 aAccuracy) :
+			      TCoordinate( aLatitude, aLongitude, aAltitude ), iName(aName),iAccuracy(aAccuracy)
+	{
+
+	}
+
+// ----------------------------------------------------------------------------
+// TNamedCoordinate::Name
+// ----------------------------------------------------------------------------
+//
+EXPORT_C HBufC* TNamedCoordinate::Name() const
+    {
+    return iName.Alloc();
+    }
+
+// ----------------------------------------------------------------------------
+// TNamedCoordinate::SetName
+// ----------------------------------------------------------------------------
+//
+EXPORT_C void TNamedCoordinate::SetName( const TDesC& aName )
+    {
+    iName = aName;
+    }
+
+// ----------------------------------------------------------------------------
+// TNamedCoordinate::Accuracy
+// ----------------------------------------------------------------------------
+//
+EXPORT_C TReal32 TNamedCoordinate::Accuracy() const
+    {
+    return iAccuracy;
+    }
+
+// ----------------------------------------------------------------------------
+// TNamedCoordinate::SetAccuracy
+// ----------------------------------------------------------------------------
+//
+EXPORT_C void TNamedCoordinate::SetAccuracy( const TReal32& aAccuracy )
+    {
+    iAccuracy = aAccuracy;
+    }
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/basiclocationinfodisplay/blid/engine/src/cblidmoduleinfoobserver.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,128 @@
+/*
+* 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:  Blid engine object.
+*
+*/
+
+
+
+// SYSTEM INCLUDE
+#include <lbs.h>
+#include <lbscommon.h>
+
+//USER INCLUDE
+#include "cblidmoduleinfoobserver.h"
+#include "MBlidLocation.h"
+
+//CONSTANTS
+
+
+// ============================ MEMBER FUNCTIONS ==============================
+// ----------------------------------------------------------------------------
+// CBlidModuleinfoObserver::CBlidModuleinfoObserver
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// ----------------------------------------------------------------------------
+//
+CBlidModuleinfoObserver::CBlidModuleinfoObserver( RPositionServer& 	aServer,
+												  MBlidLocation&	aObserver )
+    :CActive(EPriorityStandard)
+	,iServer( aServer )
+	,iObserver( aObserver )
+    {
+    CActiveScheduler::Add( this );    
+    }
+    
+    
+// ----------------------------------------------------------------------------
+// CBlidModuleinfoObserver::ConstructL
+// Symbian 2nd phase constructor can leave.
+// ----------------------------------------------------------------------------
+//
+void CBlidModuleinfoObserver::ConstructL( )
+    {
+
+    }
+    
+    
+// ----------------------------------------------------------------------------
+// CBlidModuleinfoObserver::NewL
+// Two-phased constructor.
+// ----------------------------------------------------------------------------
+//
+CBlidModuleinfoObserver* CBlidModuleinfoObserver::NewL( RPositionServer& aServer,
+												  MBlidLocation&	aObserver )
+    {
+    CBlidModuleinfoObserver* self = new( ELeave ) CBlidModuleinfoObserver( aServer, aObserver);    
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop( self );
+    return self;
+    }    
+    
+    
+// ----------------------------------------------------------------------------
+// CBlidModuleinfoObserver::~CBlidModuleinfoObserver
+// ----------------------------------------------------------------------------
+//
+CBlidModuleinfoObserver::~CBlidModuleinfoObserver()
+    {
+    Cancel();
+    }  
+    
+    
+// ----------------------------------------------------------------------------
+// CBlidModuleinfoObserver::RunL
+// ----------------------------------------------------------------------------
+//
+void CBlidModuleinfoObserver::RunL()
+    {
+    switch( iStatus.Int() ) 
+        {
+        case KErrNone:
+            {
+            StartNotification();
+            iObserver.GetModuleInfoNotificationL();
+            break;
+            }
+        default:
+            {
+            break;
+            }            
+        }
+    }
+    
+
+// ----------------------------------------------------------------------------
+// CBlidModuleinfoObserver::DoCancel
+// ----------------------------------------------------------------------------
+//
+void CBlidModuleinfoObserver::DoCancel()
+    {
+    iServer.CancelRequest(EPositionServerNotifyModuleStatusEvent);
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidModuleinfoObserver::StartNotification
+// ----------------------------------------------------------------------------
+//
+void CBlidModuleinfoObserver::StartNotification()
+    {
+    SetActive();  
+    TPositionModuleStatusEvent aStatusEvent;
+    iServer.NotifyModuleStatusEvent(aStatusEvent,iStatus);  
+    }
+    
+//End of File
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/basiclocationinfodisplay/blid/group/bld.inf	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,47 @@
+/*
+* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies 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 location application.
+*
+*/
+
+#include <platform_paths.hrh>
+
+PRJ_PLATFORMS  
+DEFAULT
+
+// Export the Blid API files
+PRJ_EXPORTS
+
+// Export the IBY file
+../rom/blid.iby CORE_APP_LAYER_IBY_EXPORT_PATH(blid.iby)
+../rom/blid_resources.iby LANGUAGE_APP_LAYER_IBY_EXPORT_PATH(blid_resources.iby)
+../rom/blidstub.iby CORE_APP_LAYER_IBY_EXPORT_PATH(blidstub.iby)
+
+// Export the Blid.loc file
+../loc/Blid.loc                        APP_LAYER_LOC_EXPORT_PATH(Blid.loc)
+
+// Export Configuration Markup language and Central Repository Mark up language files
+../conf/odometersettings.confml          APP_LAYER_CONFML(odometersettings.confml)     
+../conf/odometersettings_101F85A0.crml   APP_LAYER_CRML(odometersettings_101F85A0.crml)
+
+// Backup CenRep Settings
+../data/backup_registration.xml     Z:/private/101F85A0/backup_registration.xml
+
+#include "../engine/group/bld.inf"
+#include "../ui/group/bld.inf"
+#include "../help/group/bld.inf"
+
+//  End of File  
Binary file basiclocationinfodisplay/blid/help/data/xhtml.zip has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/basiclocationinfodisplay/blid/help/group/bld.inf	Wed Sep 01 12:31:27 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/blid.hlp.hrh	MW_LAYER_PLATFORM_EXPORT_PATH(csxhelp/blid.hlp.hrh)
+../rom/blidhelps_variant.iby		CUSTOMER_APP_LAYER_IBY_EXPORT_PATH(blidhelps_variant.iby)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/basiclocationinfodisplay/blid/help/inc/blid.hlp.hrh	Wed Sep 01 12:31:27 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:
+*
+*/
+	
+//
+// blid.hlp.hrh generated by CSXHelp Utilities.
+//           
+
+#ifndef __BLID_HLP_HRH__
+#define __BLID_HLP_HRH__
+
+_LIT(KHLP_BLID_NAVIGATION, "HLP_BLID_NAVIGATION"); // 
+_LIT(KBLID_HLP_WAYPOINTS, "BLID_HLP_WAYPOINTS"); // 
+_LIT(KBLID_HLP_SETTINGS, "BLID_HLP_SETTINGS"); // 
+_LIT(KHLP_BLID_TRIPMETER, "HLP_BLID_TRIPMETER"); // 
+
+#endif 
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/basiclocationinfodisplay/blid/help/rom/blidhelps_variant.iby	Wed Sep 01 12:31:27 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: 
+*
+*/
+
+#ifndef __BASIC_LOCATION_INFO_DISPLAYHELPS_VARIANT_IBY__
+#define __BASIC_LOCATION_INFO_DISPLAYHELPS_VARIANT_IBY__
+
+#if defined(FF_S60_HELPS_IN_USE) && defined(__BASIC_LOCATION_INFO_DISPLAY)
+    data=LOCALISE(DATAZ_\resource\xhtml\%02d\0x101F85A0\contents.zip, RESOURCE_FILES_DIR\xhtml\%02d\0x101F85A0\contents.zip)
+    data=LOCALISE(DATAZ_\resource\xhtml\%02d\0x101F85A0\index.xml, RESOURCE_FILES_DIR\xhtml\%02d\0x101F85A0\index.xml)
+    data=LOCALISE(DATAZ_\resource\xhtml\%02d\0x101F85A0\keywords.xml, RESOURCE_FILES_DIR\xhtml\%02d\0x101F85A0\keywords.xml)
+    data=LOCALISE(DATAZ_\resource\xhtml\%02d\0x101F85A0\meta.xml, RESOURCE_FILES_DIR\xhtml\%02d\0x101F85A0\meta.xml)
+#endif
+
+#endif
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/basiclocationinfodisplay/blid/install/Blid.pkg	Wed Sep 01 12:31:27 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: Package file for BLID
+;
+&EN
+;
+; UID is the app's UID
+;
+#{"BLID"},(0x101F85A0),1,1,0,TYPE=SA,RU
+
+;
+;Supports Series 60 v 3.0
+[0x101f7961], 0, 0, 0, {"Series60ProductID"}
+;
+; eight files to install
+
+
+; Localised Vendor name
+%{"Nokia-EN"}
+
+; Unique Vendor name
+:"Nokia"
+
+;
+;EXE
+"\epoc32\RELEASE\armv5\UREL\Blid.exe"         	                -"!:\sys\bin\Blid.exe"
+;DLL's
+"\epoc32\RELEASE\armv5\UREL\SatInfo.dll"  		                -"!:\sys\bin\SatInfo.dll"
+"\epoc32\RELEASE\armv5\UREL\SatInfoStub.dll"  		            -"!:\sys\bin\SatInfoStub.dll"
+"\epoc32\RELEASE\armv5\UREL\BlidEng.dll"      	                -"!:\sys\bin\BlidEng.dll"
+;Resource Files
+"\epoc32\data\z\resource\apps\Blid.RSC"        	                -"!:\resource\apps\Blid.RSC"
+"\epoc32\data\z\resource\apps\blid.mif"         	            -"!:\resource\apps\blid.mif"
+"\epoc32\data\z\resource\apps\blid_aif.mif"         	        -"!:\resource\apps\blid_aif.mif"
+"\epoc32\data\z\resource\apps\satellite.mif"         	        -"!:\resource\apps\satellite.mif"
+"\epoc32\data\Z\resource\SatInfo.RSC"        			        -"!:\resource\SatInfo.RSC"
+"\epoc32\data\Z\private\10003a3f\apps\blid_reg.RSC"		        -"!:\private\10003a3f\import\apps\blid_reg.RSC"
+
+
Binary file basiclocationinfodisplay/blid/install/Blid.sis has changed
Binary file basiclocationinfodisplay/blid/install/Blid.sisX has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/basiclocationinfodisplay/blid/install/blidstub.pkg	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,51 @@
+;
+; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of "Eclipse Public License v1.0"
+; which accompanies this distribution, and is available
+; at the URL "http://www.eclipse.org/legal/epl-v10.html".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description: Package file for BLID Stub
+;
+&EN
+;
+; UID is the app's UID
+;
+#{"BLID"},(0x101F85A0),1,0,0,TYPE=SA, RU
+;
+; Localised Vendor name
+%{"Nokia"}
+
+; Unique Vendor name
+:"Nokia"
+
+;Supports Series 60 v 3.0
+;This line indicates that this installation is for the Series 60 platform v0.9
+;This line must appear _exactly_ as shown below in the sis file
+;If this line is missing or incorrect, the sis file will not be able
+;to be installed on Series 60 v3.0 platforms
+;(0x101F7961), 0, 0, 0, {"Series60ProductID"}
+;
+;
+
+; BLID Ui exe
+""                              - "Z:\sys\bin\Blid.exe"
+
+; BLID engine and satellite dll
+""                              - "Z:\sys\bin\SatInfo.dll"
+""                              - "Z:\sys\bin\SatInfoStub.dll"
+""                              - "Z:\sys\bin\BlidEng.dll"
+
+; resource files
+""         	                    - "Z:\resource\apps\Blid.RSC"
+""                              - "Z:\resource\apps\blid.mif"
+""                              - "Z:\resource\apps\blid_aif.mif"
+""                              - "Z:\resource\apps\satellite.mif"
+""                              - "Z:\resource\SatInfo.RSC"
+""                              - "Z:\private\10003a3f\import\apps\blid_reg.RSC"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/basiclocationinfodisplay/blid/loc/Blid.loc	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,646 @@
+/*
+* 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: 
+*
+*/
+
+
+/**
+ *  Default (implementation English) Resource localisation file.
+ */
+
+// LOCALISATION STRINGS
+
+//d:Blid application name
+//d:in the App Shell list
+//l: list_single_large_graphic_pane_t1
+//r: 3.0
+//
+#define qtn_blid_caption_string 		"GPS Data"
+
+//d:Blid application name
+//d:in the App Shell grid
+//l: cell_app_pane_t1
+//r: 3.0
+//
+#define qtn_blid_short_caption_string	"GPS Data"
+//d:Title pane text for application's
+//d:Navigation view
+//l:title_pane_t2/opt9
+//r: 3.0
+//
+#define qtn_blid_title_navigation		"Navigation"
+
+
+//d:Title pane text for application's
+//d:Trip meter Data View
+//l: title_pane_t2/opt9
+//r: 3.0
+//
+#define qtn_blid_title_tripmeter		"Trip Meter"
+
+//d:Title pane text for application's
+//d:Settings View
+//l:title_pane_t2/opt9
+//r: 3.0
+//
+#define qtn_blid_title_settings			"Settings"
+
+//d:Title pane text for application's
+//d:Saved waypts View
+//l:title_pane_t2/opt9
+//r: 3.0
+//
+#define qtn_blid_title_waypoints		"Waypoints"
+
+//d:Options menu item for 
+//d:open satellites status view
+//l:list_single_pane_t1_cp2
+//r: 3.0
+//
+#define qtn_blid_opt_satellite_signals		"Satellite signals"
+
+//d:Options menu item for 
+//d:start navigate
+//l:list_single_pane_t1_cp2/opt3
+//r: 3.0
+//
+#define qtn_blid_opt_set_destination		"Set destination"
+
+//d:Options menu item for 
+//d:saved waypoints
+//l:list_single_pane_t1_cp2
+//r: 3.0
+//
+#define qtn_blid_opt_saved_waypoints		"Saved waypoints"
+
+//d:Options menu item for 
+//d:stop navigation
+//l:list_single_pane_t1_cp2
+//r: 3.0
+//
+#define qtn_blid_opt_clear_destination		"Clear destination"
+
+//d:Options menu item for 
+//d:save waypt as landmark
+//l:list_single_pane_t1_cp2
+//r: 3.0
+//
+#define qtn_blid_opt_save_as_lm				"Save as landmark"
+
+//d:Options menu item for 
+//d:rename waypt
+//l:list_single_pane_t1_cp2
+//r: 3.0
+//
+#define qtn_blid_opt_rename_waypoint					"Rename"
+
+//d:Options menu item for 
+//d:delete waypt
+//l:list_single_pane_t1_cp2
+//r: 3.0
+//
+#define qtn_blid_opt_delete_waypoint		"Delete"
+
+//d:Heading text for 
+//d:SettingView's item
+//l:list_double_graphic_pane_t1
+//r: 3.0
+//
+#define qtn_blid_altitude_calibration		"Altitude calibration"
+
+//d:Format text for 
+//d:SettingPage's
+//l:setting_code_pane_t1
+//r: 3.0
+//
+#define qtn_blid_metric_meter			"%0N m"
+
+//d:Format text for 
+//d:SettingPage's
+//l:setting_code_pane_t1
+//r: 3.0
+//
+#define qtn_blid_imperial_foot			"%0N ft"
+
+//d:Format text for NaviDataView's item
+//d:and OwnLocView's item
+//l:list_single_heading_pane_t1
+//r: 3.0
+//
+#define qtn_blid_metric_speed				"%0U km/h"
+
+//d:Format text for NaviDataView's item
+//d:and OwnLocView's item
+//l:list_single_heading_pane_t1
+//r: 3.0
+//
+#define qtn_blid_imperial_speed				"%0U mph"
+
+
+//d:Heading pane for select 
+//d:waypoint pop-up window
+//l:heading_pane_t1
+//r: 3.0
+//
+#define qtn_blid_query_waypoint				"Waypoint:"
+
+//d:Calculating indicator text for
+//d:OwnPos View's item
+//l:list_single_heading_pane_t1
+//r: 3.0
+//
+#define qtn_blid_calculating_list			"(Calculating)"
+
+
+//d:Default waypoint name for
+//d:waypoint name query
+//l:list_single_popup_submenu_pane_t1
+//r: 3.0
+//
+#define  qtn_blid_opt_set_waypoint			"Waypoint"
+
+//d:Default waypoint name for
+//d:waypoint name query
+//l:query_popup_data_pane_t1/opt4
+//r: 3.0
+//
+#define qtn_blid_waypoint_name				"Waypoint"
+
+//d:Blid application's logical
+//d:service name for rule
+//l:list_single_heading_pane_t1
+//r: 3.0
+//
+#define qtn_blid_logical_rule_name				"Blid App"
+
+//d:Information note displayed when user is saving
+//d:a waypoint and all waypoint slots are used.
+//l:popup_note_window
+//r: 3.0
+//
+#define qtn_blid_error_max_waypoints			"Maximum number of waypoints is %N. Delete old waypoints before creating new."
+
+//d:Calculating indicator text for
+//d:View's item
+//l:main_location2_pane_t1
+//r: 3.0
+//
+#define qtn_blid_blank		"-"
+
+//d:Item text for Navigation,Trip meter 
+//d: and My Position View's item
+//l:text_secondary_cp61
+//l:list_single_heading_pane_t1
+//r: 3.0
+//
+#define qtn_blid_connect_gps					"(No GPS data)"
+
+//d:Heading text for TripMeterOption's item
+//l:list_single_pane_t1_cp2
+//r: 3.0
+//
+#define qtn_blid_tripmeter_opt_start			"Start"
+
+//d:Heading text for TripMeterOption's item
+//l:list_single_pane_t1_cp2
+//r: 3.0
+//
+#define qtn_blid_tripmeter_opt_stop				"Stop"
+
+//d:Heading text for TripMeterOption's item
+//l:list_single_pane_t1_cp2
+//r: 3.0
+//
+#define qtn_blid_tripmeter_opt_resume			"Resume"
+
+//d:Heading text for TripMeterOption's item
+//l:list_single_pane_t1_cp2
+//r: 3.0
+//
+#define qtn_blid_tripmeter_opt_reset			"Reset trip"
+
+//d:Heading text for TripMeterOption's item
+//l:list_single_pane_t1_cp2
+//r: 3.0
+//
+#define qtn_blid_tripmeter_opt_clear			"Clear"
+//d:Heading text for TripMeter note string
+//l:popup_note_window
+//r: 3.0
+//
+#define qtn_blid_note_trip_resume				"GPS data was unavailable for sometime. Distances may not be accurate."
+
+//d:Heading text for menu option.
+//l:list_single_popup_submenu_pane_t1
+//r:3.2
+//
+#define qtn_blid_opt_set_landmark			"Landmark"
+
+//d:Heading text for Navigation Data format
+//l:list_single_heading_pane_t1
+//r: 3.0
+//
+#define qtn_blid_nav_distance_m			"m"
+
+//d:Heading text for Navigation Data format
+//l:list_single_heading_pane_t1
+//r: 3.0
+//
+#define qtn_blid_nav_distance_km		"km"
+
+//d:Heading text for Navigation Data format
+//l:list_single_heading_pane_t1
+//r: 3.0
+//
+#define qtn_blid_nav_distance_mi		"mi"
+
+//d:Heading text for Navigation Data format
+//l:list_single_heading_pane_t1
+//r: 3.0
+//
+#define qtn_blid_nav_distance_ft		"ft"
+
+//d:Heading text for Speed string
+//l:list_single_heading_pane_t2
+//r: 3.2
+//
+#define qtn_blid_navigation_speed			"Speed:"
+
+//d:Text saving a already
+//d: existing waypoint
+//l:popup_note_window
+//r: 3.0
+//
+#define qtn_blid_query_waypoint_name_exists		"%U already exists. Replace?"
+
+//d:Confirmation text for deletion of waypoint
+//l:popup_note_window
+//r: 3.0
+//
+#define qtn_blid_query_delete_waypoint			"Delete %U?"
+
+//d:Confirmation text for deletion 
+//d:of multiple waypoints
+//l:popup_note_window
+//r: 3.0
+//
+#define qtn_blid_query_delete_waypoints			"Delete %N waypoints?"
+//d:Heading text for error condition when
+//d:gps data is poor
+//l:popup_note_window
+//r: 3.0
+//
+#define qtn_blid_infonote_poor_gps	"GPS positioning works best outdoors away from closed areas"
+
+//d:Not available indicator text for
+//d:View's item
+//l:list_single_heading_pane_t1
+//r: 3.0
+//
+#define qtn_blid_not_available		"(Not available)"
+
+//d:option for manual destination
+//d:setting using coordinates
+//l:list_single_heading_pane_t1
+//r: 3.0
+//
+#define qtn_blid_opt_set_coordinates	"Coordinates"
+
+//d:Submenu option for co-oridnates
+//l:list_single_heading_pane_t1
+//r: 3.0
+//
+#define qtn_blid_destination_coordinates		"Coordinates"
+
+//d:Text for saved waypoints view
+//d:when no waypoints saved
+//l:list_single_heading_pane_t1
+//r: 3.0
+//
+#define qtn_blid_no_waypoints				"(No saved waypoints)"
+
+//d:Text for saved waypoints view
+//d:when no waypoints saved
+//l:list_single_heading_pane_t1
+//
+#define qtn_blid_coordinate_latitude	"Latitude:"
+
+//d:Text for saved waypoints view
+//d:when no waypoints saved
+//l:list_single_heading_pane_t1
+//
+#define qtn_blid_coordinate_longitude	"Longitude:"
+
+//d:Text for gps data available
+//l:popup_note_window
+//
+#define qtn_blid_note_gps_data			"GPS data might take a while to calculate"
+
+//d:Text when empty landmark is selected
+//l:popup_note_window
+//
+#define qtn_blid_empty_landmark_destination		"%U has no coordinate data available."
+
+//d:Heading pane for select 
+//d:waypoint pop-up window
+//l:heading_pane_t1
+//r: 3.0
+//
+#define qtn_blid_query_waypoint_name	"Waypoint name:"
+
+//d:Set Destination indicator text for
+//d:Navigation View's Destination item
+//l: list_single_heading_pane_t1
+//r: 3.0
+//
+#define qtn_blid_set_destination		"(Set destination)"
+
+//d:Poor accuracy indication query when Landmark 
+//set distination selected for destinaion
+//l:popup_note_window
+//r: 3.0
+//
+#define qtn_blid_conf_dest_inaccurate		"Destination accuracy poor. Continue anyway?"
+
+//d:Format text for Trip Meters and
+//d:My Position view's item
+//d:when satellite are not clearly visible
+//l:list_single_heading_pane_t1
+//r: 3.1
+//
+#define qtn_blid_view_indicator_waiting				"Waiting for GPS data"
+
+//d:Navigation view's item
+//d:when satellite are not clearly visible
+//l:list_single_heading_pane_t1
+//r: 3.1
+//
+
+#define qtn_loc_options_pos_settings				"Positioning settings"
+
+
+//d:Heading text for Backlight settings option
+//d:setting item
+//l:list_set_graphic_pane_t1
+//r: 3.2
+//
+#define qtn_blid_backlight_normal					"Normal"
+
+
+//d:Heading text as Backlight in the Settings view
+//d:choosing the backlight option 
+//l:list_setting_pane_t1
+//r: 3.2
+//
+#define qtn_blid_backlight				"Backlight"
+
+//d:Menu item for stylus pop-up menu
+//l:list_single_pane_t1_cp2
+//r: 3.2
+//
+#define qtn_blid_stylus_clear				"Clear"
+
+//d:Menu item for stylus pop-up menu
+//l:list_single_pane_t1_cp2
+//r: 3.2
+//
+#define qtn_blid_stylus_waypoint				"Waypoint"
+
+//d:Menu item for stylus pop-up menu
+//l:list_single_pane_t1_cp2
+//r: 3.2
+//
+#define qtn_blid_stylus_landmark				"Landmark"
+
+//d:Menu item for stylus pop-up menu
+//l:list_single_pane_t1_cp2
+//r: 3.2
+//
+#define qtn_blid_stylus_coordinates				"Coordinates"
+
+//d:Item text for Navigation,Trip meter 
+//d: and My Position View's item
+//l:list_single_heading_pane_t1
+//r: 3.2
+//
+#define qtn_blid_view_indicator_not_found					"GPS data not found"
+
+//d:Main view option menu item
+//l:list_single_pane_t1_cp2
+//r: 3.2
+//
+#define qtn_blid_opt_settings			"Settings"
+
+
+//d:Message query text
+//l:popup_info_list_pane_t1
+//r: 5.0.1
+//
+#define qtn_blid_msgquery_device_connection_lost			"GPS device not available. Connection to GPS device lost. Try reconnection."
+
+//d:Custom visual pop-up text
+//l:popup_blid2_search_window_t1
+//r: 5.0.1
+//
+#define qtn_blid_gps_device_unavailable_note			"GPS device unavailable"
+
+
+//d:MSK label
+//l:control_pane_t3/opt7
+//r: 5.0.1
+//
+#define text_softkey_info			"Info"
+
+//d:Custom visual pop-up text
+//l:popup_blid2_search_window_t1
+//r: 5.0.1
+//
+#define qtn_blid_waitnote_searching_gps_satellites			"Searching GPS satellites"
+
+//d:Options menu item
+//l:list_single_pane_t1_cp2
+//r: 5.0.1
+//
+#define qtn_options_reset			"Reset"
+
+//d:Confirmation query text
+//l:popup_note_window
+//r: 5.0.1
+//
+#define qtn_blid_reset_odometer_query			"This action will reset total odometer value. Continue?"
+
+//d:Arrival tone off
+//l:set_value_pane_t1
+//r: 5.0.1
+//
+#define qtn_blid_arrival_tone_off			"Off"
+
+//d:Setting alternative
+//l:set_value_pane_t1
+//r: 5.0.1
+//
+#define qtn_blid_backlight_always_on			"Always on"
+
+//d:MSK label
+//l:control_pane_t3/opt7
+//r: 5.0.1
+//
+#define qtn_msk_reset			"Reset"
+
+//d:Setting item header
+//l:list_setting_pane_t1
+//r: 5.0.1
+//
+#define qtn_blid_reset_odometer			"Reset odometer"
+
+//d:Setting item header
+//l:list_setting_pane_t1
+//r: 5.0.1
+//
+#define qtn_blid_arrival_tone			"Arrival tone"
+
+//d:Location details list item
+//l:list_single_heading_pane_t2_cp2
+//r: 5.0.1
+//
+#define qtn_blid_location_details_altitude_accuracy			"Altitude accuracy"
+
+//d:Location details list item
+//l:list_single_heading_pane_t2_cp2
+//r: 5.0.1
+//
+#define qtn_blid_location_details_altitude			"Altitude"
+
+//d:Location details list item
+//l:list_single_heading_pane_t2_cp2
+//r: 5.0.1
+//
+#define qtn_blid_location_details_accuracy			"Accuracy"
+
+//d:Location details list item
+//l:list_single_heading_pane_t2_cp2
+//r: 5.0.1
+//
+#define qtn_blid_location_details_longitude			"Longitude"
+
+//d:Location details list item
+//l:list_single_heading_pane_t2_cp2
+//r: 5.0.1
+//
+#define qtn_blid_location_details_latitude			"Latitude"
+
+//d:Location details header
+//l:heading_pane_t1
+//r: 5.0.1
+//
+#define qtn_blid_location_details_header			"Current location"
+
+//d:Options menu item
+//l:list_single_pane_t1_cp2
+//r: 5.0.1
+//
+#define qtn_blid_opt_current_location_save			"Save"
+
+//d:Options menu item
+//l:list_single_pane_t1_cp2
+//r: 5.0.1
+//
+#define qtn_blid_opt_current_location_details			"Details"
+
+//d:Options menu item
+//l:list_single_pane_t1_cp2
+//r: 5.0.1
+//
+#define qtn_blid_opt_current_location			"Current location"
+
+//d:Unit for speed in navigation view
+//l:blid2_speed_pane_t1
+//r: 5.0.1
+//
+#define qtn_blid_navigation_speed_mph			"mph"
+
+//d:Unit for speed in navigation view
+//l:blid2_speed_pane_t1
+//r: 5.0.1
+//
+#define qtn_blid_navigation_speed_kmph			"km/h"
+
+//d:Navi text
+//l:navi_text_pane_t1
+//r: 5.0.1
+//
+#define qtn_blid_startup_navitext_gps_pos_available			"GPS positioning available"
+
+//d:Navi text
+//l:navi_text_pane_t1
+//r: 5.0.1
+//
+#define qtn_blid_startup_navitext_searching_gps_satellites			"Searching GPS satellites"
+
+//d:Message query text
+//l:popup_info_list_pane_t1
+//r: 5.0.1
+//
+#define qtn_blid_msgquery_accessory_device_needed			"An accessory GPS device is needed for full functionality."
+
+//d:Message query text
+//l:popup_info_list_pane_t1
+//r: 5.0.1
+//
+#define qtn_blid_msgquery_check_positioning_settings			"Check positioning settings"
+
+//d:Message query title
+//l:heading_pane_t1
+//r: 5.0.1
+//
+#define qtn_blid_msgquery_header_nogpsdevice			"No GPS device found"
+
+//d:SK1 label
+//l:control_pane_t1/opt7
+//r: 5.0.1
+//
+#define text_softkey_retry			"Retry"
+
+//d:Functional link on message query
+//l:list_single_touch_info_pane_t2/opt1
+//r: 5.0.1
+//
+#define qtn_blid_msgquery_link_positioning_settings			"Positioning settings"
+
+//d:Message query text
+//l:popup_info_list_pane_t1
+//r: 5.0.1
+//
+#define qtn_blid_msgquery_no_method_enabled			"No satellite capable positioning method enabled. Check positioning settings."
+
+//d:Message query title
+//l:heading_pane_t1
+//r: 5.0.1
+//
+#define qtn_blid_msgquery_no_satellite_methods			"No GPS enabled"
+
+//d:Label in title pane for Searching for GPS and Searching for GPS device views
+//l:title_pane_t1/opt7
+//r: 5.0.1
+//
+#define qtn_blid_title_gps_data			"GPS data"
+
+//d:Custom text in searching device view's main pane
+//l:blid2_search_pane_t1
+//r: 5.0.1
+//
+#define qtn_blid_startup_navitext_searching_gps_device			"Searching GPS device..."
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/basiclocationinfodisplay/blid/rom/blid.iby	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,54 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies 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 BLID
+*
+*/
+
+
+#ifndef __BLID_IBY__
+#define __BLID_IBY__
+
+#include <bldvariant.hrh>
+
+// Blid application's satellite info UI
+#ifdef __LOCATIONFRAMEWORKCORE
+
+file=ABI_DIR\BUILD_DIR\SatInfo.dll		SHARED_LIB_DIR\SatInfo.dll
+
+SCALABLE_IMAGE(resource\apps,resource\apps,satellite)
+
+#if defined(__BASIC_LOCATION_INFO_DISPLAY)
+
+SCALABLE_IMAGE(resource\apps,resource\apps,BLID)
+
+S60_APP_AIF_ICONS(BLID)
+S60_UPGRADABLE_APP_REG_RSC(blid)
+
+// Blid application engine
+file=ABI_DIR\BUILD_DIR\BlidEng.dll		SHARED_LIB_DIR\BlidEng.dll
+
+// Blid Application exe
+file=ABI_DIR\BUILD_DIR\Blid.exe            PROGRAMS_DIR\Blid.exe
+
+
+#endif // __BASIC_LOCATION_INFO_DISPLAY
+
+#else
+file=ABI_DIR\BUILD_DIR\SatInfoStub.dll		SHARED_LIB_DIR\SatInfo.dll
+#endif // __LOCATIONFRAMEWORKCORE
+
+// backup-restore registration file to take backup
+data=DATAZ_\private\101F85A0\backup_registration.xml    private\101F85A0\backup_registration.xml
+
+#endif // __Blid_IBY__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/basiclocationinfodisplay/blid/rom/blid_resources.iby	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,42 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies 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 BLID resource
+*
+*/
+
+
+#ifndef __BLID_RESOURCES_IBY__
+#define __BLID_RESOURCES_IBY__
+
+#include <bldvariant.hrh>
+
+				///////////////////////
+			        // *** BLID UI*** //
+				///////////////////////
+
+
+/// Blid dll resources 
+
+data=DATAZ_\RESOURCE_FILES_DIR\satinfo.rsC	RESOURCE_FILES_DIR\satinfo.rsc
+
+#if defined(__BASIC_LOCATION_INFO_DISPLAY) 
+
+/// BLid Application Resources 
+
+data=ZRESOURCE\apps\Blid.rsc               APP_RESOURCE_DIR\Blid.rsc
+
+#endif // __BASIC_LOCATION_INFO_DISPLAY
+#endif // __BLID_RESOURCES_IBY__
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/basiclocationinfodisplay/blid/rom/blidstub.iby	Wed Sep 01 12:31:27 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: IBY file for BLID Stub
+*
+*/
+
+
+#ifndef __BLIDSTUB_IBY__
+#define __BLIDSTUB_IBY__
+
+#if defined(__BASIC_LOCATION_INFO_DISPLAY)
+
+// export blidstub sis file
+data=ZSYSTEM\install\blidstub.sis    system\install\blidstub.sis
+
+
+#endif // __BASIC_LOCATION_INFO_DISPLAY
+
+#endif // __BLIDSTUB_IBY__
Binary file basiclocationinfodisplay/blid/ui/data/101F85A0.txt has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/basiclocationinfodisplay/blid/ui/data/Blid.rss	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,2105 @@
+/*
+* 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 all the resources for the blid.
+*
+*/
+
+#include <appinfo.rh>
+#include <data_caging_paths_strings.hrh>
+#include <bldvariant.hrh>
+
+//  RESOURCE IDENTIFIER
+NAME    BLID // 4 letter ID
+
+//  INCLUDES
+#include <eikon.rh>
+#include "Blid.hrh"
+#include <blid.loc>
+#include <avkon.rh>
+#include <avkon.rsg>
+#include <avkon.hrh>
+#include <avkon.loc>
+#include <avkon.mbg>
+#include <uikon.hrh>
+#include <eikctl.rsg>
+
+
+//  CONSTANTS  
+#define BLID_QUERY_EDWIN_WIDTH 5
+#define BLID_QUERY_EDWIN_LINES 5
+#define BLID_QUERY_EDWIN_MAXLENGTH 35
+
+//  RESOURCE DEFINITIONS 
+
+RESOURCE RSS_SIGNATURE { }
+
+RESOURCE TBUF { buf="\\private\\101F85A0\\BLID.ini"; }
+
+RESOURCE EIK_APP_INFO
+    {    
+    }
+
+//----------------------------------------------------
+//   
+//    r_blid_hotkeys
+//    ?description
+//
+//----------------------------------------------------
+//
+RESOURCE HOTKEYS r_blid_hotkeys
+    {
+    control=
+        {
+		//None
+        };
+    }
+
+//----------------------------------------------------
+//   
+//    r_blid_home_view
+//    Home view
+//
+//----------------------------------------------------
+//
+RESOURCE AVKON_VIEW r_blid_main_view
+    {    
+    cba=R_AVKON_SOFTKEYS_EXIT;    
+    }
+
+//----------------------------------------------------
+//   
+//    r_blid_navigation_view
+//    Home view
+//
+//----------------------------------------------------
+//
+RESOURCE AVKON_VIEW r_blid_navigation_view
+    {    
+    menubar=r_blid_view_menubar; 
+    cba=r_blid_softkeys_options_exit__contextoptions;    
+    }
+
+//----------------------------------------------------
+//   
+//    r_blid_mainsat_view
+//    Home view
+//
+//----------------------------------------------------
+//
+RESOURCE AVKON_VIEW r_blid_mainsat_view
+    {    
+    cba=R_AVKON_SOFTKEYS_EXIT;    
+    }
+
+//----------------------------------------------------
+//   
+//    r_blid_tripmeter_view
+//    Trip Meter view
+//
+//----------------------------------------------------
+//
+RESOURCE AVKON_VIEW r_blid_tripmeter_view
+    {    
+    menubar=r_blid_tripmeter_menubar;  
+    cba=r_blid_softkeys_options_exit__contextoptions;    
+    }
+
+//----------------------------------------------------
+//   
+//    r_blid_settings_view
+//    Settings view
+//
+//----------------------------------------------------
+//
+RESOURCE AVKON_VIEW r_blid_settings_view
+    {    
+    menubar=r_blid_settings_menubar; 
+    cba=R_AVKON_SOFTKEYS_OPTIONS_BACK;    
+    }
+//----------------------------------------------------
+//   
+//    r_blid_settings_view
+//    Settings view
+//
+//----------------------------------------------------
+//
+RESOURCE AVKON_VIEW r_blid_savedwaypts_view
+    {    
+    menubar=r_blid_savedwaypts_menubar; 
+    cba=r_blid_softkeys_options_back__contextoptions;    
+    }
+
+//----------------------------------------------------
+//   
+//    r_blid_localisable_app_info
+// Add a new resource definition
+//
+//----------------------------------------------------
+//
+RESOURCE LOCALISABLE_APP_INFO r_blid_localisable_app_info
+    {
+    short_caption = qtn_blid_short_caption_string;
+    caption_and_icon = 
+    CAPTION_AND_ICON_INFO
+        {
+        caption = qtn_blid_caption_string;
+        number_of_icons = 1; 
+        icon_file = APP_BITMAP_DIR"\\blid_aif.mif";
+        };
+    }
+//
+//----------------------------------------------------
+//
+RESOURCE MENU_BAR r_blid_main_menubar
+    {
+    titles=
+        {
+        MENU_TITLE { menu_pane=r_blid_main_menu; txt="File"; },
+		MENU_TITLE { menu_pane=r_blid_main_menu2; txt="File"; }
+        };
+    }
+
+//----------------------------------------------------
+//   
+//    r_blid_view_menubar
+//
+//----------------------------------------------------
+//
+RESOURCE MENU_BAR r_blid_view_menubar
+    {
+    titles=
+        {
+        MENU_TITLE { menu_pane=r_blid_main_menu; txt="File"; },
+		MENU_TITLE { menu_pane=r_blid_main_menu2; txt="File"; },
+		MENU_TITLE { menu_pane=r_blid_view_menu; txt="File"; }
+        };
+    }
+    
+//----------------------------------------------------
+//   
+//    r_blid_ownpos_view_menubar
+//
+//----------------------------------------------------
+//
+RESOURCE MENU_BAR r_blid_ownpos_view_menubar
+    {
+    titles=
+        {
+        MENU_TITLE { menu_pane=r_blid_main_menu; txt="File"; },
+		MENU_TITLE { menu_pane=r_blid_ownpos_view_menu; txt="File"; }
+        };
+    }
+
+//----------------------------------------------------
+//   
+//    r_blid_view_ok_menubar
+//    ?description
+//
+//----------------------------------------------------
+//
+RESOURCE MENU_BAR r_blid_view_ok_menubar
+    {
+    titles=
+        {
+		MENU_TITLE { menu_pane=r_blid_view_ok_menu; txt="File"; }
+        };
+    }
+
+//----------------------------------------------------
+//   
+//    r_blid_settings_menubar
+//    ?description
+//
+//----------------------------------------------------
+//
+RESOURCE MENU_BAR r_blid_settings_menubar
+    {
+    titles=
+        {
+        MENU_TITLE { menu_pane=r_blid_main_menu; txt="File"; },
+		MENU_TITLE { menu_pane=r_blid_settings_menu; txt="File"; }
+        };
+    }
+ 
+//----------------------------------------------------
+//   
+//    r_blid_savedwaypts_menubar
+//    ?description
+//
+//----------------------------------------------------
+//
+RESOURCE MENU_BAR r_blid_savedwaypts_menubar
+    {
+    titles=
+        {
+        MENU_TITLE { menu_pane=r_blid_main_menu; txt="File"; },        
+        MENU_TITLE { menu_pane=R_AVKON_MENUPANE_MARKABLE_LIST; txt=qtn_options_list;},        
+		MENU_TITLE { menu_pane=r_blid_savedwaypts_menu; txt="File"; }		
+		};
+    }
+ 
+//----------------------------------------------------
+//   
+//    r_blid_tripmeter_menubar
+//    ?description
+//
+//----------------------------------------------------
+//
+RESOURCE MENU_BAR r_blid_tripmeter_menubar
+    {
+    titles=
+        {
+        MENU_TITLE { menu_pane=r_blid_main_menu; txt="File"; },
+        MENU_TITLE { menu_pane=r_blid_main_menu2; txt="File"; },
+        MENU_TITLE { menu_pane=r_blid_trip_view_menu; txt="File"; },
+		MENU_TITLE { menu_pane=r_blid_tripmeter_menu; txt="File"; }
+		};
+    }
+
+
+//----------------------------------------------------
+//   
+//    r_blid_main_menu
+//    ?description
+//
+//----------------------------------------------------
+//
+RESOURCE MENU_PANE r_blid_main_menu
+    {
+    items=
+        {		
+		MENU_ITEM { command=EAknCmdHelp; txt=qtn_options_help; },
+		MENU_ITEM { command=EAknCmdExit; txt=qtn_options_exit; }
+        };
+    }
+
+//----------------------------------------------------
+//   
+//    r_blid_main_menu2
+//    ?description
+//
+//----------------------------------------------------
+//
+RESOURCE MENU_PANE r_blid_main_menu2
+    {
+    items=
+        {
+		MENU_ITEM { command=EBlidCmdLaunchPositionSettings; txt=qtn_loc_options_pos_settings; },		
+		MENU_ITEM { command=EBlidCmdSettings; txt=qtn_blid_opt_settings; }
+        };
+    }
+
+//----------------------------------------------------
+//   
+//    r_blid_set_destination_menu
+//    ?description
+//
+//----------------------------------------------------
+//
+RESOURCE MENU_PANE r_blid_set_destination_menu
+    {
+    items=
+        {
+		MENU_ITEM { command=EBlidCmdWaypoint; txt=qtn_blid_opt_set_waypoint; },
+		MENU_ITEM { command=EBlidCmdLmk; txt=qtn_blid_opt_set_landmark; },
+		MENU_ITEM { command=EBlidCmdManualWaypoint; txt=qtn_blid_opt_set_coordinates; }
+        };
+    }
+
+
+//----------------------------------------------------
+//   
+//    r_blid_view_menu
+//    ?description
+//
+//----------------------------------------------------
+//
+RESOURCE MENU_PANE r_blid_view_menu
+    {
+    items=
+        {
+		MENU_ITEM { command=EBlidCmdNavigate; 
+					txt=qtn_blid_opt_set_destination;
+					cascade = r_blid_set_destination_menu; 
+				  },
+		MENU_ITEM { command=EBlidCmdStopNavigation; 
+					txt=qtn_blid_opt_clear_destination; 
+				  },
+	    MENU_ITEM { command=EBlidCmdCurrentLocation;
+					txt=qtn_blid_opt_current_location;
+					cascade = r_blid_save_current_location_menu;
+				  },
+		MENU_ITEM { command=EBlidCmdSatelliteStatus;
+					txt=qtn_blid_opt_satellite_signals; 
+				  },
+		MENU_ITEM { command=EBlidCmdSavedWaypoints;
+					txt=qtn_blid_opt_saved_waypoints; 
+				  }
+        };
+    }
+    
+//----------------------------------------------------
+//   
+//    r_blid_ownpos_view_menu
+//    ?description
+//
+//----------------------------------------------------
+//
+RESOURCE MENU_PANE r_blid_ownpos_view_menu
+    {
+    items=
+        {
+	    MENU_ITEM { command=EBlidCmdSaveLocation;
+					txt=qtn_blid_opt_current_location;					
+				  },
+		MENU_ITEM { command=EBlidCmdSatelliteStatus;
+					txt=qtn_blid_opt_satellite_signals; 
+				  },
+		MENU_ITEM { command=EBlidCmdSavedWaypoints;
+					txt=qtn_blid_opt_saved_waypoints; 
+				  }		
+        };
+    }
+ 
+//----------------------------------------------------
+//   
+//    r_blid_trip_view_menu
+//    ?description
+//
+//----------------------------------------------------
+//
+RESOURCE MENU_PANE r_blid_trip_view_menu
+    {
+    items=
+        {
+	    MENU_ITEM { command=EBlidCmdCurrentLocation;
+					txt=qtn_blid_opt_current_location;
+					cascade = r_blid_save_current_location_menu;
+				  },
+		MENU_ITEM { command=EBlidCmdSatelliteStatus;
+					txt=qtn_blid_opt_satellite_signals; 
+				  },
+		MENU_ITEM { command=EBlidCmdSavedWaypoints;
+					txt=qtn_blid_opt_saved_waypoints; 
+				  }
+        };
+    }
+
+//----------------------------------------------------
+//   
+//    r_blid_view_ok_menu
+//    ?description
+//
+//----------------------------------------------------
+//
+RESOURCE MENU_PANE r_blid_view_ok_menu
+    {
+    items=
+        {
+		MENU_ITEM { command=EBlidCmdNavigate; 
+					txt=qtn_blid_opt_set_destination;
+					cascade = r_blid_set_destination_menu; 
+				  },
+		MENU_ITEM { command=EBlidCmdStopNavigation;
+					txt=qtn_blid_opt_clear_destination; 
+				  }
+        };
+    }
+
+//----------------------------------------------------
+//   
+//    r_blid_settings_menu
+//    ?description
+//
+//----------------------------------------------------
+//
+RESOURCE MENU_PANE r_blid_settings_menu
+    {
+    items=
+        {
+		MENU_ITEM 
+			{ 
+			command=EBlidCmdChangeSetting; 
+			txt=qtn_options_change; 
+			flags = EEikMenuItemAction;
+			},
+		MENU_ITEM 
+			{ 
+			command=EBlidCmdResetSetting; 
+			txt=qtn_options_reset; 
+			flags = EEikMenuItemAction;
+			}			
+        };
+    }
+ 
+//----------------------------------------------------
+//   
+//    r_blid_savedwaypts_menu
+//    ?description
+//
+//----------------------------------------------------
+//
+RESOURCE MENU_PANE r_blid_savedwaypts_menu
+    {
+    items=
+        {
+		MENU_ITEM 
+			{ 
+			command=EBlidCmdRenameWaypt; 
+			txt=qtn_blid_opt_rename_waypoint; 
+			},
+		MENU_ITEM 
+			{ 
+			command=EBlidCmdDeleteWaypt; 
+			txt=qtn_blid_opt_delete_waypoint; 
+			}		
+		};
+    }
+    
+//----------------------------------------------------
+//   
+//    r_blid_tripmeter_menu
+//    ?description
+//
+//----------------------------------------------------
+//
+RESOURCE MENU_PANE r_blid_tripmeter_menu
+    {
+    items=
+        {
+		MENU_ITEM 
+			{ 
+			command=EBlidCmdTripStart; 
+			txt=qtn_blid_tripmeter_opt_start; 
+			},
+		MENU_ITEM 
+			{ 
+			command=EBlidCmdTripStop; 
+			txt=qtn_blid_tripmeter_opt_stop; 
+			},
+		MENU_ITEM 
+			{ 
+			command=EBlidCmdTripResume; 
+			txt=qtn_blid_tripmeter_opt_resume; 
+			},
+		MENU_ITEM 
+			{ 
+			command=EBlidCmdTripReset; 
+			txt=qtn_blid_tripmeter_opt_reset; 
+			},
+		MENU_ITEM 
+			{ 
+			command=EBlidCmdTripClear; 
+			txt=qtn_blid_tripmeter_opt_clear; 
+			}
+		
+		};
+    }
+
+//----------------------------------------------------
+//   
+//    r_blid_main_title
+//    Title for application's main view
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_blid_title_main
+    {
+    buf = qtn_blid_title_gps_data;
+    }
+
+//----------------------------------------------------
+//   
+//    r_blid_title_navigation
+//    Title for application's navigation view
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_blid_title_navigation
+    {
+    buf = qtn_blid_title_navigation;
+    }
+
+//----------------------------------------------------
+//   
+//    r_blid_title_position
+//    Title for application's ownpos view
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_blid_title_position
+    {
+    buf = qtn_blid_location_details_header;
+    }
+
+//----------------------------------------------------
+//   
+//    r_blid_title_tripmeter
+//    Title for application's tripmeter view
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_blid_title_tripmeter
+    {
+    buf = qtn_blid_title_tripmeter;
+    }
+//----------------------------------------------------
+//   
+//    r_blid_title_waypoints
+//    Title for application's savedwaypts view
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_blid_title_waypoints
+    {
+    buf = qtn_blid_title_waypoints;
+    }
+/*
+//----------------------------------------------------
+//   
+//    r_blid_tripmeter_title
+//    List item for application's main view
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_blid_tripmeter_title
+    {
+    buf = qtn_blid_title_tripmeter;
+    }
+*/
+//----------------------------------------------------
+//   
+//    r_blid_title_settings
+//    Title for application's settings view
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_blid_title_settings
+    {
+    buf = qtn_blid_title_settings;
+    }
+
+//----------------------------------------------------
+//   
+//    r_blid_position_latitude
+//    Title for ownposview's list pane
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_blid_position_latitude
+    {
+    buf = qtn_blid_location_details_latitude;
+    }
+
+//----------------------------------------------------
+//   
+//    r_blid_position_longitude	
+//    Title for ownposview's list pane
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_blid_position_longitude
+    {
+    buf = qtn_blid_location_details_longitude;
+    }
+
+//----------------------------------------------------
+//   
+//    r_blid_position_altitude
+//    Title for ownposview's list pane
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_blid_position_altitude
+    {
+    buf = qtn_blid_location_details_altitude;
+    }
+
+//----------------------------------------------------
+//   
+//    r_blid_position_accuracy
+//    Title for ownposview's list pane
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_blid_position_accuracy
+    {
+    buf = qtn_blid_location_details_accuracy;
+    }
+
+//----------------------------------------------------
+//   
+//    r_blid_position_altitude_accuracy
+//    Title for ownposview's list pane
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_blid_position_altitude_accuracy
+    {
+    buf = qtn_blid_location_details_altitude_accuracy;
+    }
+
+//----------------------------------------------------
+//   
+//    r_blid_navidata_duration_title
+//    Title for ownposview's list pane
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_blid_navidata_duration_title
+    {
+    buf = qtn_blid_label_duration;
+    }
+
+//----------------------------------------------------
+//   
+//    r_blid_altitude_calibration
+//    Title for settingview's list pane
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_blid_altitude_calibration
+    {
+    buf = qtn_blid_altitude_calibration;
+    }
+
+//----------------------------------------------------
+//   
+//    r_blid_altitude_calibration_settings_page
+//    Interger settings page to altitude calibration
+//
+//----------------------------------------------------
+//
+RESOURCE AVKON_SETTING_PAGE r_blid_altitude_calibration_metric_settings_page
+    { 
+    label = qtn_blid_altitude_calibration;
+    softkey_resource = R_AVKON_SOFTKEYS_OK_CANCEL;
+    type = EAknCtIntegerEdwin;
+    editor_resource_id = r_blid_settings_metric_edwin;
+    }
+
+//----------------------------------------------------
+//   
+//    r_blid_altitude_calibration_settings_page
+//    Interger settings page to altitude calibration
+//
+//----------------------------------------------------
+//
+RESOURCE AVKON_SETTING_PAGE r_blid_altitude_calibration_imperial_settings_page
+    { 
+    label = qtn_blid_altitude_calibration;
+    softkey_resource = R_AVKON_SOFTKEYS_OK_CANCEL;
+    type = EAknCtIntegerEdwin;
+    editor_resource_id = r_blid_settings_imperial_edwin;
+    }
+
+//----------------------------------------------------
+//   
+//    r_blid_settings_integer_imperial_edwin
+//    Interger edwin
+//
+//----------------------------------------------------
+//
+RESOURCE AVKON_INTEGER_EDWIN r_blid_settings_imperial_edwin
+    {
+    min = -1640;
+    max = 1640;
+    }
+
+//----------------------------------------------------
+//   
+//    r_blid_settings_integer_metric_edwin
+//    Interger edwin
+//
+//----------------------------------------------------
+//
+RESOURCE AVKON_INTEGER_EDWIN r_blid_settings_metric_edwin
+    {
+    min = -500;
+    max = 500;
+    }
+
+//----------------------------------------------------
+//   
+//    r_blid_metric_meter
+//    List item's format
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_blid_metric_meter
+    {
+    buf = qtn_blid_metric_meter;
+    }
+
+//----------------------------------------------------
+//   
+//    r_blid_imperial_foot
+//    List item's format
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_blid_imperial_foot
+    {
+    buf = qtn_blid_imperial_foot;
+    }
+
+//----------------------------------------------------
+//   
+//    r_blid_longitude_format_east
+//    List item's format
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_blid_longitude_format_east
+    {
+    buf = qtn_blid_longitude_format_east;
+    }
+
+//----------------------------------------------------
+//   
+//    r_blid_metric_speed
+//    List item's format
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_blid_metric_speed
+    {
+    buf = qtn_blid_metric_speed;
+    }
+
+//----------------------------------------------------
+//   
+//    r_blid_imperial_speed	
+//    List item's format
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_blid_imperial_speed
+    {
+    buf = qtn_blid_imperial_speed;
+    }
+
+//----------------------------------------------------
+//   
+//    r_blid_waypoint_query
+//    Waypoint name query
+//
+//----------------------------------------------------
+//
+RESOURCE DIALOG r_blid_waypoint_query
+  {
+  flags = EGeneralQueryFlags;
+  buttons = R_AVKON_SOFTKEYS_OK_CANCEL;
+  items =
+    {
+    DLG_LINE
+      {
+      type = EAknCtQuery;
+      id = EGeneralQuery;
+      control = AVKON_DATA_QUERY
+        {
+        label = qtn_blid_query_waypoint_name;
+		layout = EDataLayout;
+        control = EDWIN
+          {
+          flags = EEikEdwinNoHorizScrolling | EEikEdwinResizable;
+          width = BLID_QUERY_EDWIN_WIDTH;
+          lines = BLID_QUERY_EDWIN_LINES;
+          maxlength = BLID_QUERY_EDWIN_MAXLENGTH;
+          };
+        };
+      }
+    };
+  }
+
+//----------------------------------------------------
+//   
+//    r_blid_query_waypoint
+//    Select waypoint's title
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_blid_query_waypoint
+    {
+    buf = qtn_blid_query_waypoint;
+    }
+
+//----------------------------------------------------
+//   
+//    r_blid_waypoint_name
+//    Default waypoint name
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_blid_waypoint_name
+    {
+    buf = qtn_blid_waypoint_name;
+    }
+
+//----------------------------------------------------
+//   
+//    r_blid_service_rule_name
+//    Logical service rule name
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_blid_service_rule_name
+    {
+    buf = qtn_blid_logical_rule_name;
+    }
+
+//----------------------------------------------------
+//   
+//    r_blid_error_max_waypoints
+//    Max waypoint note when all slots are used.
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_blid_error_max_waypoints  
+    {
+    buf = qtn_blid_error_max_waypoints;
+    }
+
+
+//----------------------------------------------------
+//   
+//    r_blid_calculating_list
+//    Calculating data indicator
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_blid_calculating_list
+    {
+    buf = qtn_blid_calculating_list;
+    }
+
+
+//----------------------------------------------------
+//   
+//    r_blid_blank
+//    Null string
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_blid_blank
+    {
+    buf = qtn_blid_blank;
+    }
+    
+//------------------------------------------------------------------------------
+//   
+//    r_blid_opt_set_destination
+//    Set destination text
+//
+//------------------------------------------------------------------------------
+//
+RESOURCE TBUF r_blid_opt_set_destination
+    {
+    buf = qtn_blid_opt_set_destination;
+    }
+    
+//------------------------------------------------------------------------------
+//   
+//    r_blid_settings_sysmeasurement_page
+//    Set sysmeasurement text
+//
+//------------------------------------------------------------------------------
+//
+RESOURCE AVKON_SETTING_PAGE r_blid_settings_sysmeasurement_page
+    { 
+    label = qtn_blid_system_measurement;
+    softkey_resource = R_AVKON_SOFTKEYS_OK_CANCEL;
+    type = EAknSetListBox;
+    editor_resource_id = r_blid_settings_listbox;
+    }
+//------------------------------------------------------------------------------
+//   
+//    r_blid_settings_listbox 
+//    Set Settings text
+//
+//------------------------------------------------------------------------------
+//
+RESOURCE LISTBOX r_blid_settings_listbox 
+    {
+    flags = EEikListBoxMultipleSelection;
+    }
+
+//------------------------------------------------------------------------------
+//   
+//    r_blid_connect_gps
+//    Connect gps text
+//
+//------------------------------------------------------------------------------
+//
+RESOURCE TBUF r_blid_connect_gps
+    {
+    buf=qtn_blid_connect_gps;
+    }
+  
+//----------------------------------------------------
+//   
+//    r_blid_navigation_speed
+//    Speed string
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_blid_navigation_speed
+    {
+    buf = qtn_blid_navigation_speed;
+    }
+    
+//----------------------------------------------------
+//   
+//    r_blid_query_waypoint_name_exists
+//    Waypoint confirmation
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_blid_query_waypoint_name_exists
+    { 
+    buf = qtn_blid_query_waypoint_name_exists;
+    }
+    
+//----------------------------------------------------
+//   
+//    r_blid_confirmation_query
+//    Waypoint confirmation
+//
+//----------------------------------------------------
+//
+RESOURCE DIALOG r_blid_confirmation_query
+    {
+    flags = EGeneralQueryFlags;
+    buttons = R_AVKON_SOFTKEYS_YES_NO;
+    items = 
+        {
+        DLG_LINE {
+            type = EAknCtQuery;
+            id = EGeneralQuery;
+            control = AVKON_CONFIRMATION_QUERY {
+                layout = EConfirmationQueryLayout;                
+                };
+            }
+        };
+    }
+
+//----------------------------------------------------
+//   
+//    r_blid_query_delete_waypoint
+//    Waypoint confirmation
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_blid_query_delete_waypoint
+    { 
+    buf = qtn_blid_query_delete_waypoint;
+    }
+
+//----------------------------------------------------
+//   
+//    r_blid_trip_meter_view_ok_menubar
+//    ?description
+//
+//----------------------------------------------------
+//
+RESOURCE MENU_BAR r_blid_trip_meter_view_ok_menubar
+    {
+    titles=
+        {
+		MENU_TITLE { menu_pane=r_blid_trip_meter_view_ok_menu; txt="File"; }
+        };
+    }
+
+//----------------------------------------------------
+//   
+//    r_blid_trip_meter_view_ok_menu
+//    ?description
+//
+//----------------------------------------------------
+//
+RESOURCE MENU_PANE r_blid_trip_meter_view_ok_menu
+    {
+    items=
+        {
+		MENU_ITEM 
+			{ 
+			command=EBlidCmdTripStart; 
+			txt=qtn_blid_tripmeter_opt_start; 
+			},
+		MENU_ITEM 
+			{ 
+			command=EBlidCmdTripStop; 
+			txt=qtn_blid_tripmeter_opt_stop; 
+			},
+		MENU_ITEM 
+			{ 
+			command=EBlidCmdTripResume; 
+			txt=qtn_blid_tripmeter_opt_resume; 
+			},
+		MENU_ITEM 
+			{ 
+			command=EBlidCmdTripReset; 
+			txt=qtn_blid_tripmeter_opt_reset; 
+			}
+        };
+    }
+    
+//----------------------------------------------------
+//   
+//    r_blid_own_pos_view_ok_menubar
+//    ?description
+//
+//----------------------------------------------------
+//
+RESOURCE MENU_BAR r_blid_own_pos_view_ok_menubar
+    {
+    titles=
+        {
+		MENU_TITLE { menu_pane=r_blid_own_pos_view_ok_menu; txt="File"; }
+        };
+    }
+
+//----------------------------------------------------
+//   
+//    r_blid_own_pos_view_ok_menu
+//    ?description
+//
+//----------------------------------------------------
+//
+RESOURCE MENU_PANE r_blid_own_pos_view_ok_menu
+    {
+    items=
+        {
+	    MENU_ITEM { command=EBlidCmdSaveLocation;
+					txt=qtn_blid_opt_current_location;					
+				  }
+        };
+    }
+
+//----------------------------------------------------
+//   
+//    r_blid_savedwaypts_view_ok_menubar
+//    ?description
+//
+//----------------------------------------------------
+//
+RESOURCE MENU_BAR r_blid_savedwaypts_view_ok_menubar
+    {
+    titles=
+        {
+		MENU_TITLE { menu_pane=R_AVKON_MENUPANE_MARKABLE_LIST; txt=qtn_options_list;},
+		MENU_TITLE { menu_pane=r_blid_savedwaypts_view_ok_menu; txt="File"; }
+        };
+    }
+
+//----------------------------------------------------
+//   
+//    r_blid_savedwaypts_view_ok_menu
+//    ?description
+//
+//----------------------------------------------------
+//
+RESOURCE MENU_PANE r_blid_savedwaypts_view_ok_menu
+    {
+    items=
+        {
+		MENU_ITEM 
+			{ 
+			command=EBlidCmdRenameWaypt; 
+			txt=qtn_blid_opt_rename_waypoint; 
+			},
+		MENU_ITEM 
+			{ 
+			command=EBlidCmdDeleteWaypt; 
+			txt=qtn_blid_opt_delete_waypoint; 
+			}
+        };
+    }
+
+//----------------------------------------------------
+//   
+//    r_blid_query_delete_waypoints
+//    Waypoint confirmation
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_blid_query_delete_waypoints
+    { 
+    buf = qtn_blid_query_delete_waypoints;
+    }
+
+//----------------------------------------------------
+//   
+//    r_blid_gps_timeout_note
+//    Poor GPS Data note
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_blid_gps_timeout_note
+    {
+    buf = qtn_blid_infonote_poor_gps;
+    }
+
+//----------------------------------------------------
+//   
+//    r_blid_not_available
+//    Not available indicator
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_blid_not_available
+    {
+    buf = qtn_blid_not_available;
+    }
+
+//------------------------------------------------------------------------------
+//   
+//    r_blid_manual_location_query_dialog
+//    For Giving the Manual waypoint
+//
+//------------------------------------------------------------------------------
+//
+RESOURCE DIALOG r_blid_manual_location_query_dialog
+    {
+    flags=EGeneralQueryFlags;
+    buttons=R_AVKON_SOFTKEYS_OK_CANCEL;
+    items=
+        {
+        DLG_LINE
+            {
+            type=EAknCtMultilineQuery;
+            id=EMultilineFirstLine;
+            control = AVKON_DATA_QUERY
+                {
+                    layout = EMultiDataFirstLocationEd;
+                    label = qtn_blid_coordinate_latitude;
+                    control = LATITUDE_EDITOR
+                        {
+						flags = ELocationEdFlagLatitude;
+						latlongresourceid = R_EIK_LATITUDE_AND_LONGITUDE;
+                        };
+                };
+            },
+        DLG_LINE
+            {
+            type=EAknCtMultilineQuery;
+            id=EMultilineSecondLine;
+            control= AVKON_DATA_QUERY
+                {
+                    layout = EMultiDataSecondLocationEd;
+                    label = qtn_blid_coordinate_longitude;
+                    control = LONGITUDE_EDITOR
+                    {
+					flags = ELocationEdFlagLongitude;
+					latlongresourceid = R_EIK_LATITUDE_AND_LONGITUDE;
+                    };
+                };
+            }
+        };
+    }
+      
+//----------------------------------------------------
+//   
+//    r_blid_cardinal_point_n
+//    Editor's cardinal point 
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_blid_cardinal_point_n
+    {
+    buf = qtn_blid_coordinate_editor_cardinal_point_n;
+    }
+
+//----------------------------------------------------
+//   
+//    r_blid_cardinal_point_s
+//    Editor's cardinal point 
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_blid_cardinal_point_s
+    {
+    buf = qtn_blid_coordinate_editor_cardinal_point_s;
+    }
+
+//----------------------------------------------------
+//   
+//    r_blid_cardinal_point_w
+//    Editor's cardinal point 
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_blid_cardinal_point_w
+    {
+    buf = qtn_blid_coordinate_editor_cardinal_point_w;
+    }
+
+//----------------------------------------------------
+//   
+//    r_blid_cardinal_point_e
+//    Editor's cardinal point 
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_blid_cardinal_point_e
+    {
+    buf = qtn_blid_coordinate_editor_cardinal_point_e;
+    }
+
+//----------------------------------------------------
+//   
+//    r_blid_destination_coordinates
+//    Default wanual waypoint name
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_blid_destination_coordinates
+    {
+    buf = qtn_blid_destination_coordinates;
+    }
+
+//----------------------------------------------------
+//   
+//    r_blid_no_waypoints
+//    Default wanual waypoint name
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_blid_no_waypoints
+    {
+    buf = qtn_blid_no_waypoints;
+    }
+
+//----------------------------------------------------
+//   
+//    r_blid_error_no_psy
+//    Default wanual waypoint name
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_blid_error_no_psy
+    {
+    buf = qtn_blid_msgquery_no_method_enabled;
+    }
+
+ //----------------------------------------------------
+//   
+//    r_blid_waitnote_searching_gps_satellites
+//    Searching GPS note
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_blid_waitnote_searching_gps_satellites
+    {
+    buf = qtn_blid_waitnote_searching_gps_satellites;
+    }
+ 
+ //----------------------------------------------------
+//   
+//    r_blid_startup_navitext_searching_gps_satellites
+//    Searching GPS note
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_blid_startup_navitext_searching_gps_satellites
+    {
+    buf = qtn_blid_startup_navitext_searching_gps_satellites;
+    }
+ 
+//----------------------------------------------------
+//   
+//    r_blid_note_gps_data
+//    GPS data note
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_blid_note_gps_data
+    {
+    buf = qtn_blid_note_gps_data;
+    }
+
+//----------------------------------------------------
+//   
+//    r_blid_nav_distance_m
+//    GPS data note
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_blid_nav_distance_m
+    {
+    buf = qtn_blid_nav_distance_m;
+    }
+
+//----------------------------------------------------
+//   
+//    r_blid_nav_distance_km
+//    GPS data note
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_blid_nav_distance_km
+    {
+    buf = qtn_blid_nav_distance_km;
+    }
+
+//----------------------------------------------------
+//   
+//    r_blid_nav_distance_mi
+//    GPS data note
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_blid_nav_distance_mi
+    {
+    buf = qtn_blid_nav_distance_mi;
+    }
+
+//----------------------------------------------------
+//   
+//    r_blid_nav_distance_ft
+//    GPS data note
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_blid_nav_distance_ft
+    {
+    buf = qtn_blid_nav_distance_ft;
+    }
+
+//----------------------------------------------------
+//   
+//    r_blid_error_no_gps_device
+//    GPS not available note
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_blid_error_no_gps_device
+    {
+    buf = qtn_blid_gps_device_unavailable_note;
+    }
+
+//----------------------------------------------------
+//   
+//    r_blid_empty_landmark_destination
+//    Empty landmark coordinate note
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_blid_empty_landmark_destination
+    {
+    buf = qtn_blid_empty_landmark_destination;
+    }
+
+//----------------------------------------------------
+//   
+//    r_blid_set_destination
+//    Set Destination string for Navigation view
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_blid_set_destination
+    {
+    buf = qtn_blid_set_destination;
+    }
+
+//----------------------------------------------------
+//   
+//    r_memlo_not_enough_memory
+//    Out of memory note
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_memlo_not_enough_memory
+	{
+	buf = qtn_memlo_not_enough_memory;
+	}
+
+//----------------------------------------------------
+//   
+//    r_blid_conf_dest_inaccurate
+//    Landmark accuracy poor string
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_blid_conf_dest_inaccurate
+	{
+	buf = qtn_blid_conf_dest_inaccurate;
+	}
+	
+
+//----------------------------------------------------
+//   
+//    r_trip_resume_confirmation_note
+//    Out of memory note
+//
+//----------------------------------------------------
+//
+RESOURCE DIALOG r_trip_resume_confirmation_note
+    {
+    flags = EAknGeneralQueryFlags;
+    buttons=R_AVKON_SOFTKEYS_OK_EMPTY;
+    items=
+        {
+        DLG_LINE
+            {
+            type=EAknCtNote;  
+            id = EBlidLat;
+            control= AVKON_NOTE
+                {
+                layout = EGeneralLayout;
+                singular_label = qtn_blid_note_trip_resume;                    
+                animation = R_QGN_NOTE_INFO_ANIM;
+                };
+            }
+        };
+    }
+	
+//--------------------------------------------------------
+//   
+//    r_blid_waiting_gps_list
+//    Trip meter's and My position views string
+//
+//--------------------------------------------------------
+//
+RESOURCE TBUF r_blid_waiting_gps_list
+	{
+	buf = qtn_blid_view_indicator_waiting;
+	}
+
+//------------------------------------------------------------------------------
+//   
+//    r_blid_msk_open
+//    Main view MSK label "Open" text
+//
+//------------------------------------------------------------------------------
+//
+RESOURCE TBUF r_blid_msk_open
+    {
+    buf = qtn_msk_open;
+    }
+    
+//------------------------------------------------------------------------------
+//   
+//    r_blid_msk_change
+//    Settings view MSK label "Change" text
+//
+//------------------------------------------------------------------------------
+//
+RESOURCE TBUF r_blid_msk_change
+    {
+    buf = qtn_msk_change;
+    }
+
+//----------------------------------------------------
+//   
+//    r_blid_softkeys_options_back__contextoptions
+//    Navigation and Trip meter View's default CBA options  
+//
+//----------------------------------------------------
+//
+RESOURCE CBA r_blid_softkeys_options_back__contextoptions
+    {
+    buttons =
+        {
+        CBA_BUTTON 
+            {
+            id=EAknSoftkeyOptions;
+            txt = text_softkey_option;
+            },
+        CBA_BUTTON 
+            {
+            id=EAknSoftkeyBack; 
+            txt = text_softkey_back; 
+            },
+        CBA_BUTTON 
+            {
+            id=EAknSoftkeyContextOptions; 
+            txt = text_softkey_option;
+            }
+        };
+    }
+//----------------------------------------------------
+//   
+//    r_blid_softkeys_options_exit__contextoptions
+//    All Saved waypoints View's default CBA options  
+//
+//----------------------------------------------------
+//
+RESOURCE CBA r_blid_softkeys_options_exit__contextoptions
+    {
+    buttons =
+        {
+        CBA_BUTTON 
+            {
+            id=EAknSoftkeyOptions;
+            txt = text_softkey_option;
+            },
+        CBA_BUTTON 
+            {
+            id=EAknSoftkeyExit; 
+            txt = text_softkey_exit; 
+            },
+        CBA_BUTTON 
+            {
+            id=EAknSoftkeyContextOptions; 
+            txt = text_softkey_option;
+            }
+        };
+    }
+//------------------------------------------------------------------------------
+//   
+//    r_blid_backlight_normal
+//    Settings view Backlight settings selection text
+//
+//------------------------------------------------------------------------------
+//
+RESOURCE TBUF r_blid_backlight_normal
+    {
+    buf = qtn_blid_backlight_normal;
+    }
+
+
+//------------------------------------------------------------------------------
+//   
+//    r_blid_backlight_on
+//    Settings view Backlight settings selection text
+//
+//------------------------------------------------------------------------------
+//
+RESOURCE TBUF r_blid_backlight_on
+    {
+    buf = qtn_blid_backlight_always_on;
+    }
+
+//------------------------------------------------------------------------------
+//   
+//    r_blid_settings_backlight_page
+//    Set backlight text
+//
+//------------------------------------------------------------------------------
+//
+RESOURCE AVKON_SETTING_PAGE r_blid_settings_backlight_page
+    { 
+    label = qtn_blid_backlight;
+    softkey_resource = R_AVKON_SOFTKEYS_OK_CANCEL;
+    type = EAknSetListBox;
+    editor_resource_id = r_blid_backlight_settings_listbox;
+    }
+//------------------------------------------------------------------------------
+//   
+//    r_blid_backlight_settings_listbox 
+//    Set Settings text
+//
+//------------------------------------------------------------------------------
+//
+RESOURCE LISTBOX r_blid_backlight_settings_listbox 
+    {
+    flags = EEikListBoxMultipleSelection;
+    }
+
+//------------------------------------------------------------------------------
+//   
+//    r_blid_backlight
+//    Settings view Backlight text
+//
+//------------------------------------------------------------------------------
+//
+RESOURCE TBUF r_blid_backlight
+    {
+    buf = qtn_blid_backlight;
+    }
+
+// ---------------------------------------------------------
+//   
+//   r_blid_destination_stylus_menu
+//   Stylus popup menu
+//
+// ---------------------------------------------------------
+//
+RESOURCE STYLUS_POPUP_MENU r_blid_destination_stylus_menu
+    {
+    items =
+        {
+        STYLUS_POPUP_MENU_ITEM { command = EBlidCmdStopNavigation; txt = qtn_blid_stylus_clear; },
+				STYLUS_POPUP_MENU_ITEM { command = EBlidCmdWaypoint; txt=qtn_blid_stylus_waypoint; },
+				STYLUS_POPUP_MENU_ITEM { command = EBlidCmdLmk; txt=qtn_blid_stylus_landmark; },
+				STYLUS_POPUP_MENU_ITEM { command = EBlidCmdManualWaypoint; txt=qtn_blid_stylus_coordinates; }
+        };
+    }
+
+//------------------------------------------------------------------------------
+//   
+//    r_blid_connect_gps_list
+//    Connect gps text
+//
+//------------------------------------------------------------------------------
+//
+RESOURCE TBUF r_blid_connect_gps_list
+    {
+    buf=qtn_blid_view_indicator_not_found;
+    }     
+    
+//----------------------------------------------------
+//   Added for Taco
+//    r_blid_main_embeded_view
+//    Home view
+//
+//----------------------------------------------------
+//
+RESOURCE AVKON_VIEW r_blid_main_embeded_view
+    {    
+    menubar=r_blid_main_menubar;  
+    cba=R_AVKON_SOFTKEYS_OPTIONS_BACK;    
+    }
+
+// Adition for taco
+//----------------------------------------------------
+//   
+//    r_blid_save_current_location_menu
+//    ?description
+//
+//----------------------------------------------------
+//
+RESOURCE MENU_PANE r_blid_save_current_location_menu
+    {
+    items=
+        {
+		MENU_ITEM { command=EBlidCmdShowDetails; txt=qtn_blid_opt_current_location_details; },
+		MENU_ITEM { command=EBlidCmdSaveLocation; txt=qtn_blid_opt_current_location_save; }
+        };
+    }
+
+//----------------------------------------------------
+//   
+//    r_blid_currentlocation_softkeys_save__exit
+//    Current location softkey options  
+//
+//----------------------------------------------------
+//
+RESOURCE CBA r_blid_currentlocation_softkeys_save__exit
+    {
+    buttons =
+        {
+        CBA_BUTTON 
+            {
+            id=EAknSoftkeySave;
+            txt = text_softkey_save;
+            },
+        CBA_BUTTON 
+            {
+            id=EAknSoftkeyExit; 
+            txt = text_softkey_exit; 
+            }
+        };
+    }
+
+//----------------------------------------------------
+//   
+//    r_blid_metric_speed_format
+//    List item's format
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_blid_metric_speed_format
+    {
+    buf = qtn_blid_navigation_speed_kmph;
+    }
+
+//----------------------------------------------------
+//   
+//    r_blid_imperial_speed_format	
+//    List item's format
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_blid_imperial_speed_format
+    {
+    buf = qtn_blid_navigation_speed_mph;
+    }
+
+//----------------------------------------------------
+//   
+//    r_blid_message_query_dialog
+//
+//
+//----------------------------------------------------
+//
+RESOURCE DIALOG r_blid_message_query_dialog
+    {
+    flags = EGeneralQueryFlags | EEikDialogFlagNoBorder | EEikDialogFlagNoShadow;
+    //buttons = R_AVKON_SOFTKEYS_EXIT;
+    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
+                {
+                };
+            }
+        };
+    }
+
+//----------------------------------------------------
+//   
+//    r_blid_nogps_found	
+//    Infopopup header format
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_blid_nogps_found
+    {
+    buf = qtn_blid_msgquery_header_nogpsdevice;
+    } 
+
+//----------------------------------------------------
+//   
+//    r_blid_nopsy_enabled	
+//    Infopopup header format
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_blid_nopsy_enabled
+    {
+    buf = qtn_blid_msgquery_no_satellite_methods;
+    }
+        
+//----------------------------------------------------
+//   
+//    r_blid_nogps_found_text	
+//    infopop up note text
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_blid_nogps_found_text
+    {
+    buf = qtn_blid_msgquery_check_positioning_settings;
+    }
+    
+//----------------------------------------------------
+//   
+//    r_blid_nogps_available_text	
+//    infopop up note text
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_blid_nogps_available_text
+    {
+    buf = qtn_blid_msgquery_accessory_device_needed;
+    }  
+    
+//----------------------------------------------------
+//   
+//    r_blid_select_positioning_method	
+//    infopop up note text
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_blid_select_positioning_method
+    {
+    buf = qtn_blid_msgquery_link_positioning_settings;
+    }  
+    
+//----------------------------------------------------
+//   
+//    r_blid_softkeys_info_exit
+//    All View's default CBA options  
+//
+//----------------------------------------------------
+//
+RESOURCE CBA r_blid_softkeys_info_exit
+    {
+    buttons =
+        {
+        CBA_BUTTON 
+            {
+            id=EBlidSoftkeyInfo;
+            txt = text_softkey_info;
+            },
+        CBA_BUTTON 
+            {
+            id=EAknSoftkeyExit; 
+            txt = text_softkey_exit; 
+            }
+        };
+    }
+
+//----------------------------------------------------
+//   
+//    r_blid_note_searching_animation	
+//    Start up view searching animation text
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_blid_note_searching_animation
+    {
+    buf = qtn_blid_startup_navitext_searching_gps_device;
+    } 
+    
+//----------------------------------------------------
+//   
+//    r_blid_infopopup_softkeys_retry__exit
+//    Current location softkey options  
+//
+//----------------------------------------------------
+//
+RESOURCE CBA r_blid_infopopup_softkeys_retry__exit
+    {
+    buttons =
+        {
+        CBA_BUTTON 
+            {
+            id=EBlidSoftkeyRetry;
+            txt = text_softkey_retry;
+            },
+        CBA_BUTTON 
+            {
+            id=EAknSoftkeyOk; 
+            txt = text_softkey_exit; 
+            }
+        };
+    }
+
+//------------------------------------------------------------------------------
+//   
+//    r_blid_arrival_ringing_tone
+//    Settings view arrival tone
+//
+//------------------------------------------------------------------------------
+//
+RESOURCE TBUF r_blid_arrival_ringing_tone
+    {
+    buf = qtn_blid_arrival_tone;
+    }
+    
+//------------------------------------------------------------------------------
+//   
+//    r_blid_reset_odometer
+//    Settings view reset odometer
+//
+//------------------------------------------------------------------------------
+//
+RESOURCE TBUF r_blid_reset_odometer
+    {
+    buf = qtn_blid_reset_odometer;
+    }
+    
+//------------------------------------------------------------------------------
+//   
+//    r_blid_arrival_tone_off
+//    Settings view arrival tone option
+//
+//------------------------------------------------------------------------------
+//
+RESOURCE TBUF r_blid_arrival_tone_off
+    {
+    buf = qtn_blid_arrival_tone_off;
+    }
+    
+//----------------------------------------------------
+//   
+//    r_settings_odometer_reset_confirmation_note
+//    Confirmation note for reseting odometer.
+//
+//----------------------------------------------------
+//
+RESOURCE DIALOG r_settings_odometer_reset_confirmation_note
+    {
+    flags = EAknGeneralQueryFlags;
+    buttons=R_AVKON_SOFTKEYS_YES_NO;
+    items=
+        {
+        DLG_LINE
+            {
+            type=EAknCtNote;  
+            id = EBlidResetOdo;
+            control= AVKON_NOTE
+                {
+                layout = EGeneralLayout;
+                singular_label = qtn_blid_reset_odometer_query;                    
+                animation = R_QGN_NOTE_INFO_ANIM;
+                };
+            }
+        };
+    }
+
+
+//----------------------------------------------------
+//   
+//    r_blid_infopopup_softkeys_ok__exit
+//    Current location softkey options  
+//
+//----------------------------------------------------
+//
+RESOURCE CBA r_blid_infopopup_softkeys_ok__exit
+    {
+    buttons =
+        {
+        CBA_BUTTON 
+            {
+            id=EAknSoftkeyOk;
+            txt = text_softkey_ok;
+            },
+        CBA_BUTTON 
+            {
+            id=EAknSoftkeyExit; 
+            txt = text_softkey_exit; 
+            }
+        };
+    }
+
+//----------------------------------------------------
+//   
+//    r_blid_infopopup_softkeys__exit
+//    Accessory Required
+//
+//----------------------------------------------------
+//
+RESOURCE CBA r_blid_infopopup_softkeys_exit
+    {
+    buttons =
+        {
+        CBA_BUTTON 
+            {
+
+            },
+        CBA_BUTTON 
+            {
+            id=EAknSoftkeyExit; 
+            txt = text_softkey_exit; 
+            }
+        };
+    }
+    
+        
+//----------------------------------------------------
+//   
+//    r_info_popup_msg_query
+//    Information message.
+//
+//----------------------------------------------------
+//
+RESOURCE DIALOG r_info_popup_msg_query
+    {
+    flags = EAknGeneralQueryFlags;
+    buttons=r_blid_infopopup_softkeys_ok__exit;
+    items=
+        {
+        DLG_LINE
+            {
+            type=EAknCtNote;  
+            id = EBlidResetOdo;
+            control= AVKON_NOTE
+                {
+                layout = EGeneralLayout;
+                singular_label = qtn_blid_msgquery_device_connection_lost;                    
+                animation = R_QGN_NOTE_INFO_ANIM;
+                };
+            }
+        };
+    }
+    
+//----------------------------------------------------
+//   
+//    r_blid_softkeys_options_stop
+//    View's CBA options  
+//
+//----------------------------------------------------
+//
+RESOURCE CBA r_blid_softkeys_options_stop
+    {
+    buttons =
+        {
+        CBA_BUTTON 
+            {
+            id=EAknSoftkeyOptions;
+            txt = text_softkey_option;
+            },
+        CBA_BUTTON 
+            {
+            id=EBlidSoftKeyStop; 
+            txt = text_softkey_stop;
+            },
+        CBA_BUTTON 
+            {
+            id=EAknSoftkeyContextOptions; 
+            txt = text_softkey_option;
+            }            
+        };
+    }
+
+//------------------------------------------------------------------------------
+//   
+//    r_blid_msk_reset
+//    Settings view MSK label "Reset" text
+//
+//------------------------------------------------------------------------------
+//
+RESOURCE TBUF r_blid_msk_reset
+    {
+    buf = qtn_msk_reset;
+    }
+
+//----------------------------------------------------
+//   
+//    r_blid_note_gps_positioning_available
+//    GPS positioning available note
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_blid_note_gps_positioning_available
+    {
+    buf = qtn_blid_startup_navitext_gps_pos_available;
+    }
+            
+//----------------------------------------------------
+//   
+//    R_BLID_OPTION_INFO_EXIT
+//    All View's default CBA options  
+//
+//----------------------------------------------------
+//
+RESOURCE CBA r_blid_option_info_exit
+    {
+    buttons =
+        {
+        CBA_BUTTON 
+            {
+            id=EAknSoftkeyOptions;
+            txt = text_softkey_option;
+            },
+        CBA_BUTTON 
+            {
+            id=EAknSoftkeyExit; 
+            txt = text_softkey_exit; 
+            },
+        CBA_BUTTON 
+            {
+            id=EBlidNavigationMskInfo; 
+            txt = text_softkey_info;
+            }
+        };
+    }                            
+// End of File
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/basiclocationinfodisplay/blid/ui/data/blid_reg.rss	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,32 @@
+/*
+* Copyright (c) 2005-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:  Contains all the resources for the blid.
+*
+*/
+
+#include <appinfo.rh>
+#include <blid.rsg>
+#include "BlidUID.h"
+#include <data_caging_paths_strings.hrh>
+
+UID2 KUidAppRegistrationResourceFile
+UID3 KBLIDUID3
+
+RESOURCE APP_REGISTRATION_INFO
+    {
+    app_file = "Blid"; 
+    localisable_resource_file = APP_RESOURCE_DIR"\\Blid"; 
+    localisable_resource_id = R_BLID_LOCALISABLE_APP_INFO;
+    }
+
Binary file basiclocationinfodisplay/blid/ui/data/blidstub.sis has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/basiclocationinfodisplay/blid/ui/group/Blid.mmp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,119 @@
+/*
+* 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:  Project file for blid application.
+*
+*/
+
+
+// INCLUDES
+#include <platform_paths.hrh>
+#include "../inc/BlidUID.h"  	//Common Blid UID definitions
+#include "data_caging_paths.hrh"
+#include <bldvariant.hrh>
+
+TARGET  Blid.exe
+TARGETTYPE  exe
+
+// Needed in exe-apps
+epocstacksize 0x5000
+
+UID  KAPPUID2 KBLIDUID3 
+
+TARGETPATH /system/apps/Blid
+
+VENDORID	VID_DEFAULT
+CAPABILITY CAP_APPLICATION
+
+SOURCEPATH	../src
+SOURCE	CBlidApp.cpp 
+SOURCE	CBlidAppUi.cpp
+SOURCE	CBlidDocument.cpp
+SOURCE	CBlidBaseContainer.cpp
+SOURCE	CBlidBaseView.cpp
+SOURCE	CBlidNavigationView.cpp
+SOURCE  CHtkNavigationControl.cpp
+SOURCE  CBlidArrivedTonePayerUtility.cpp
+SOURCE	CBlidTripMeterView.cpp
+SOURCE  CHtkTripMeterControl.cpp
+SOURCE  CBlidMainView.cpp
+SOURCE  CBlidMainControl.cpp
+SOURCE  CBlidSatelliteView.cpp
+SOURCE  CBlidSatelliteControl.cpp
+SOURCE  CBlidOwnPosLBModel.cpp
+SOURCE	CBlidCurrentPositionDlg.cpp
+SOURCE	CBlidSettingsView.cpp
+SOURCE	CBlidSettingsContainer.cpp
+SOURCE	CBlidSettingsLBModel.cpp
+SOURCE	BlidNotes.cpp
+SOURCE	Blidutils.cpp
+SOURCE	CBlidSavedWayptsView.cpp
+SOURCE	CBlidSavedWayptsContainer.cpp
+SOURCE	CBlidSavedWayptsLBModel.cpp
+SOURCE	CBlidLocSettingLauncher.cpp
+SOURCE  cblidnotedialog.cpp
+SOURCE  FileSystemInfo.cpp
+SOURCE  Debug.cpp
+
+START RESOURCE ../data/Blid.rss
+HEADER
+TARGETPATH  APP_RESOURCE_DIR
+LANGUAGE_IDS
+END
+
+START RESOURCE ../data/blid_reg.rss
+DEPENDS blid.rsg
+	TARGETPATH /private/10003a3f/apps
+END
+
+USERINCLUDE .   ../../../inc ../inc ../data
+
+APP_LAYER_SYSTEMINCLUDE
+
+SYSTEMINCLUDE   /epoc32/include/kernel
+
+
+LIBRARY hlplch.lib
+LIBRARY euser.lib apparc.lib cone.lib eikcore.lib 
+LIBRARY eikcoctl.lib avkon.lib eikctl.lib		
+LIBRARY egul.lib
+LIBRARY bafl.lib
+LIBRARY commonengine.lib // StringLoader
+LIBRARY FeatMgr.lib // Feature manager API
+LIBRARY estor.lib
+LIBRARY	BlidEng.lib
+LIBRARY lbs.lib
+LIBRARY efsrv.lib 
+LIBRARY AknSkins.lib
+LIBRARY SatInfo.lib
+LIBRARY CdlEngine.lib //AknLayout
+LIBRARY AknIcon.lib
+LIBRARY flogger.lib
+LIBRARY AknLayout2Scalable.lib
+LIBRARY LmkCommonUI.lib
+LIBRARY eposlandmarks.lib
+LIBRARY eikdlg.lib
+LIBRARY FBSCLI.lib BITGDI.lib gdi.lib
+LIBRARY numberconversion.lib
+LIBRARY SYSUTIL.LIB
+LIBRARY locsettingsuiclient.lib
+LIBRARY CentralRepository.lib
+LIBRARY platformenv.lib
+LIBRARY ws32.lib
+LIBRARY     apgrfx.lib
+// Include for Alfred library usage
+LIBRARY     alfclient.lib
+LIBRARY filelist.lib
+LIBRARY mediaclientaudio.lib // for CMdaAudioToneUtility
+LIBRARY HWRMLightClient.lib
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/basiclocationinfodisplay/blid/ui/group/bld.inf	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,54 @@
+/*
+* 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
+*    whole of a location application.
+*
+*/
+
+
+#include <platform_paths.hrh>
+
+PRJ_PLATFORMS  
+DEFAULT
+
+// Export the Blid API files
+PRJ_EXPORTS
+../inc/Blid.hrh		|../../../inc/Blid.hrh
+../inc/BlidSettingsCrkeys.h	|../../../inc/BlidSettingsCrkeys.h
+
+
+// Export blidstub.sis file
+../data/blidstub.sis  /epoc32/data/z/system/install/blidstub.sis
+
+
+PRJ_MMPFILES
+Blid.mmp
+
+
+PRJ_EXTENSIONS
+START EXTENSION s60/mifconv
+OPTION TARGETFILE blid.mif
+OPTION HEADERFILE blid.mbg
+OPTION SOURCES -c8,1 qgn_prop_blid_trip_tab3 -c8,1 qgn_prop_blid_location_tab3 -c8,1 qgn_prop_blid_navigation_tab3 -c8,8 qgn_graf_blid_compass -c8,8 qgn_graf_blid_flag -c8,8 qgn_graf_blid_info -c8,8 qgn_graf_blid_north -c8,8 qgn_graf_blid_sat_signal_01 -c8,8 qgn_graf_blid_sat_signal_02 -c8,8 qgn_graf_blid_sat_signal_03 -c8,8 qgn_graf_blid_sat_signal_04 -c8,8 qgn_graf_blid_sat_signal_05 -c8,8 qgn_graf_blid_searching -c8,8 qgn_graf_blid_searching_small -c8,8 qgn_graf_blid_signal_bar_01 -c8,8 qgn_graf_blid_signal_bar_02 -c8,8 qgn_graf_blid_signal_bar_03 -c8,8 qgn_graf_blid_signal_bar_04 -c8,8 qgn_graf_blid_signal_bar_05 -c8,8 qgn_graf_blid_spwatch -c8,8 qgn_graf_blid_startup -c8,8 qgn_graf_blid_time -c8,8 qgn_graf_blid_tp_pointer -c8,8 qgn_graf_blid_tpmeter -c8,8 qgn_graf_blid_unavail -c8,8 qgn_graf_blid_flag_01 -c8,8 qgn_graf_blid_flag_02 -c8,8 qgn_graf_blid_flag_03 -c8,8 qgn_graf_blid_flag_04 -c8,8 qgn_graf_blid_flag_05 -c8,8 qgn_graf_blid_ring.svg \
+-c8,8 qgn_graf_blid_searching_01 -c8,8 qgn_graf_blid_searching_02 -c8,8 qgn_graf_blid_searching_03 -c8,8 qgn_graf_blid_searching_04 -c8,8 qgn_graf_blid_searching_05 -c8,8 qgn_graf_blid_searching_06 -c8,8 qgn_graf_blid_searching_07 -c8,8 qgn_graf_blid_searching_08 \
+-c8,8 qgn_graf_blid_startup_01 -c8,8 qgn_graf_blid_startup_02 -c8,8 qgn_graf_blid_startup_03 -c8,8 qgn_graf_blid_startup_04 -c8,8 qgn_graf_blid_startup_05 -c8,8 qgn_graf_blid_startup_06 -c8,8 qgn_graf_blid_startup_07 -c8,8 qgn_graf_blid_startup_08 -c8,8 qgn_graf_blid_det_circle
+END
+
+PRJ_EXTENSIONS
+START EXTENSION s60/mifconv
+OPTION TARGETFILE blid_aif.mif
+OPTION SOURCES -c8,8 qgn_menu_blid.svg
+END
+//  End of File  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/basiclocationinfodisplay/blid/ui/inc/Blid.hlp.hrh	Wed Sep 01 12:31:27 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: Resource header for BLID help
+*
+*/
+
+
+//
+// blid.hlp.hrh
+//
+
+//
+// File generated by cshlpcmp Version 011
+//
+
+#ifndef __BLID_HLP_HRH__
+#define __BLID_HLP_HRH__
+
+
+_LIT(KHLP_BLID_MAIN,"HLP_BLID_MAIN"); //Main view of Basic Loc. Info Display
+_LIT(KHLP_BLID_NAVIGATION,"HLP_BLID_NAVIGATION"); //Navigation view
+_LIT(KHLP_BLID_POSITION,"HLP_BLID_POSITION"); //My position view
+_LIT(KHLP_BLID_TRIPMETER,"HLP_BLID_TRIPMETER"); //Trip meter view
+_LIT(KHLP_BLID_WAYPOINTS,"HLP_BLID_WAYPOINTS"); //Waypoints list
+_LIT(KBLID_HLP_SETTINGS,"BLID_HLP_SETTINGS"); //BLID settings
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/basiclocationinfodisplay/blid/ui/inc/Blid.hrh	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,120 @@
+/*
+* 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 declarations for constants of location.
+*                This file can be included in C++ or resource file.
+*
+*/
+
+#ifndef BLID_HRH
+#define BLID_HRH
+
+#include <avkon.hrh>
+
+enum TBlidCommandIds
+    {
+    EBlidCmdSaveLocation = 0x6000,
+	EBlidCmdSatelliteStatus,
+	EBlidCmdNavigate,
+	EBlidCmdStopNavigation,
+	EBlidCmdSettings,
+	EBlidCmdChangeSetting,
+	EBlidCmdChangeMeasurementSetting,
+	EBlidCmdSaveAsLandmark,
+	EBlidCmdSavedWaypoints,
+	EBlidCmdRenameWaypt,
+	EBlidCmdDeleteWaypt,
+	EBlidCmdMarkUnmarkWaypt,
+	EBlidCmdTripStart,
+	EBlidCmdTripStop,
+	EBlidCmdTripResume,
+	EBlidCmdTripReset,
+	EBlidCmdTripClear,
+	EBlidCmdLmk,
+	EBlidCmdWaypoint,
+	EBlidCmdSaveAsLmk,
+	EBlidCmdSaveAsWaypoint,
+	EBlidCmdManualWaypoint,
+	EBlidCmdLaunchPositionSettings,
+	EBlidCmdMskChangeSetting,
+	EBlidCmdCurrentLocation,
+	EBlidCmdShowDetails,
+	EBlidSoftkeyInfo,
+	EBlidSoftkeyRetry,
+	EBlidSoftKeyStop,
+	EBlidCmdMskResetSetting,
+	EBlidCmdResetSetting,
+	EBlidNavigationMskInfo
+	};
+
+enum TBlidViewIds
+    {
+	EBlidMainView = 1,
+    EBlidNavigationView,
+	EBlidTripMeterView,
+	EBlidSettingsView,
+	EBlidSavedWayptsView,
+	EBlidMainSatelliteView
+    };
+
+/// Settings view listbox item's enumerations.
+enum TBlidSettingsItemId
+    {
+    EBlidSettingsBacklight = 0,
+    EBlidSettingsArrivalTone,
+    EBlidSettingsCalibration,
+    EBlidSettingsResetOdometer    
+    };
+
+enum TBlidMainViewsItemId
+	{
+	EBlidNavigationViewId = 0,
+	EBlidTripMeterViewId 
+	};
+
+enum TBlidLocationViewsItemId
+	{
+	ELocLatitudeItemId=0,
+	ELocLongitudeItemId,
+	ELocAccuracyItemId,
+	ELocAltitudeItemId,
+	ELocAltAccuracyItemId
+	};
+
+enum TBlidTripMeterViewsItemId
+	{
+	ENaviTripMeterItemId = 0,
+	ENaviTripTimeItemId,
+	ENaviAvgSpeedItemId,
+	ENaviMaxSpeedItemId,
+	ENaviOdometerItemId,
+	ENaviTotalTimeItemId
+	};
+
+enum TBlidManualWaypointDialogId
+    {
+    EBlidLatitude = (KAknCtLastControlId + 1),
+    EBlidLongitude,
+    EBlidLat,
+    EBlidLong,
+    EBlidLabel1,
+    EBlidLabel2,
+    EBlidResetOdo
+    };
+
+enum TBlidBacklightSettingsItemId
+    {
+    EBlidBackLightNormal = 0,
+    EBlidBackLightOnDuringNavigation
+    };    
+#endif      // LOCATION_HRH
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/basiclocationinfodisplay/blid/ui/inc/BlidNotes.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,115 @@
+/*
+* 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:  Blid application note class definition
+*
+*/
+
+
+#ifndef BLIDNOTES_H
+#define BLIDNOTES_H
+
+// CLASS DECLARATION
+class CEikonEnv;
+/**
+*  BlidNotes application class.
+*/
+class BlidNotes 
+    {
+    public:
+        /**
+         * Enumerations for model creation
+         */
+        enum TBlidNotes
+            {            
+            EBlidOverWriteWaypointNote,
+            EBlidGPSConnectionNotAccurate
+            };
+    public: // new functions        
+        /** 
+         * Notify user that when user is saving a waypoint 
+         * and all waypoint slots are used.
+         */
+        static void OverWriteWaypointNoteL();
+
+         /** 
+         * Notify user if GPS device is not sending proper data
+         * i.e. when less than 3 satellites in view.
+         */
+        static void PoorGPSDataNoteL();
+        
+        /** 
+         * Notifies user that no PSY has been enabled 
+         *
+         */
+        static void NoPsyConnectedNoteL();
+        
+        /** 
+         * Notifies user that GPS data is being searched and 
+         * located
+         *
+         */
+        static void SearchingGPSDDataNoteL();
+        
+        /** 
+         * Notifies user that GPS data is being searched and 
+         * located         
+         */
+        static void GPSDataAvailableL();
+        
+        /** 
+         * Notifies user that GPS data is being searched and 
+         * located         
+         */
+        static void GPSDeviceUnavailableNoteL();
+        
+        /** 
+         * Notifies user that the landmark set as destination
+         * is empty and does not have coordinate data
+         *
+         */
+        static void EmptyLandmarkNoteL(const TDesC& landmarkName);        
+        
+        /** 
+         * Notifies user that the system is out of memory
+         *
+         */
+        static void OutOfMemoryNoteL();
+        
+        /** 
+         * Displays the "No GPS data" note
+         *
+         */
+        static void NoGPSDeviceL();
+        
+    public: //Data    
+        /*
+         Boolean to check if the GPSDataAvailableL has
+         already been displayed.
+        */
+        static TBool iNoteDisplayed;
+        
+        /**
+         * Boolean to check if the GPS unavailable note is 
+         * displayed or not
+         */
+        static TBool iGPSUnavailableDisplayed;
+        
+        //environment variable
+        static CEikonEnv* iEnv;
+
+    };
+
+#endif // BLIDNOTES_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/basiclocationinfodisplay/blid/ui/inc/BlidSettingsCrkeys.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,36 @@
+/*
+* 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:  Central Repository Key defintion for storing the odometer value.
+*
+*/
+
+
+#ifndef BLIDSETTINGSCRKEYS_H
+#define BLIDSETTINGSCRKEYS_H
+
+#include <e32base.h>
+
+//
+// 
+const TUid KCRUidBlidOdometerSettings       = {0x101F85A0};
+const TUint32 KBlidOdometerSettingsValue    = 0x00000001;
+const TUint32 KBlidBacklightOptionValue     = 0x00000002;
+const TUint32 KBlidAltCalibrationValue      = 0x00000003;
+const TUint32 KBlidDoResetValue             = 0x00000004;
+const TUint32 KBlidArrivedToneNameString    = 0x00000005;
+
+//
+
+
+#endif  // BLIDSETTINGSCRKEYS_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/basiclocationinfodisplay/blid/ui/inc/BlidUID.h	Wed Sep 01 12:31:27 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:  Common header for blid application UIDs.
+*
+*/
+
+
+#ifndef __BLIDUID_H__
+#define __BLIDUID_H__
+
+//  MACROS
+
+/// Blid application UID3
+#define KBLIDUID3 0x101F85A0
+
+//
+// Common system UIDs
+//
+#define KAPPUID2 0x0
+
+#endif // __BLIDUID_H__
+
+// End of File
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/basiclocationinfodisplay/blid/ui/inc/Blidutils.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,100 @@
+/*
+* 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:  Blid application utils class definition
+*
+*/
+
+
+#ifndef BLIDUTILS_H
+#define BLIDUTILS_H
+
+// INCLUDES
+#include <e32std.h>
+
+// CLASS DECLARATION
+/**
+* BlidUtils application class.
+* Convert seconds to time string
+* Convert seconds to days
+* Formating distance string
+* Find BLID application bitmap file
+*/
+class BlidUtils
+    {
+
+    public: // new functions
+        /**
+         * Convert TReal to TInt
+         * @param aSrc
+         * @param aResult
+         * @return error code
+         */
+        static TInt TRealToTInt( const TReal aSrc, TInt& aResult );
+
+        /**
+         * Convert seconds to time string
+         * If the resulting length of text in this descriptor 
+         * exceeds its maximum length, then the function raises
+         * a USER 11 panic.
+         * @param aTimeString
+         * @param aSeconds
+         * @return error code
+         */
+        static TInt FormatStringToTime( TDes& aTimeString,
+                                        const TReal aSeconds );
+
+        /** 
+         * Convert seconds to days
+         * @param aSrc Time in seconsds 
+         * @param aResult amount of days
+         * @return error code
+         */
+        static TInt SecondsToDays( const TReal aSrc, TInt& aResult );
+
+        /**
+         * Formating distance string
+         * If the resulting length of text in this descriptor
+         * exceeds its maximum length, then the function raises 
+         * a USER 11 panic.
+         * @param aDistanceString
+         * @param aDistance
+         */
+        static void DistanceFormat( TDes& aDistanceString,
+                                    const TReal aDistance,
+                                    TBool aIstobeDecimal = EFalse );
+
+        /** 
+         * Find BLID application bitmap file
+         * @return full filename ( path + name )
+         */
+        static HBufC* GetBitmapFilenameLC();
+        
+        /**
+         * Convert seconds to time string
+         * If the resulting length of text in this descriptor 
+         * exceeds its maximum length, then the function raises
+         * a USER 11 panic.
+         * @param aTimeString
+         * @param aSeconds
+         * @return error code
+         */
+        static TInt FormatTimeToString( TDes& aTimeString,
+                                        const TReal aSeconds );
+
+
+    };
+
+#endif // BLIDUTILS_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/basiclocationinfodisplay/blid/ui/inc/CBlidApp.h	Wed Sep 01 12:31:27 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:  Blid application class definition.
+*
+*/
+
+
+#ifndef BLIDAPP_H
+#define BLIDAPP_H
+
+// INCLUDES
+#include <aknapp.h>
+
+// CLASS DECLARATION
+
+/**
+* CBlidApp application class.
+* Provides factory to create concrete document object.
+* 
+*/
+class CBlidApp : public CAknApplication
+    {
+    private:
+
+        /**
+         * From CApaApplication, creates CBlidDocument document object.
+         * @return A pointer to the created document object.
+         */
+        CApaDocument* CreateDocumentL();
+        
+        /**
+         * From CApaApplication, returns application's UID (KBLIDUID3).
+         * @return The value of KBLIDUID3.
+         */
+        TUid AppDllUid() const;
+    };
+
+#endif // BLIDAPP_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/basiclocationinfodisplay/blid/ui/inc/CBlidAppUi.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,177 @@
+/*
+* 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:  Blid application UI class definition.
+*
+*/
+
+
+
+#ifndef BLIDAPPUI_H
+#define BLIDAPPUI_H
+
+// INCLUDES
+#include <aknViewAppUi.h>
+#include <akntabgrp.h>
+#include <aknnavide.h>
+#include <AknTabObserver.h>
+// included for Huitk impl
+#include <alf/alfenv.h>
+
+// USER INCLUDE
+#include "MKeyProcessor.h"
+#include "BlidNotes.h"
+
+// FORWARD DECLARATIONS
+//class CBlidMainContainer;
+class CBlidDocument;
+class CSatelliteInfoUI;
+
+// CLASS DECLARATION
+
+/**
+* Application UI class. 
+*/
+class CBlidAppUi : public CAknViewAppUi, public MAknTabObserver, 
+                   public MKeyProcessor
+    {
+    public: // Constructors and destructor
+        /**        
+         * Second phase constructor        
+         */      
+        void ConstructL();
+
+        /**
+         * Destructor.
+         * Frees reserved resources
+         */      
+        ~CBlidAppUi();
+        
+    public: // New functions
+        /**
+         * Returns the Blid document object.
+         * @return CBlidDocument
+         */
+        CBlidDocument* BlidDocument() const;
+
+        /**
+         * Show BLID application's dialogs
+         * @param aNoteId Id of Note
+         */
+        void ShowDialogL( const BlidNotes::TBlidNotes aNoteId );
+
+        /**
+         * Skin changed
+         *
+         */
+        void SkinChange();
+
+        /**
+         * Checks if App is in foreground
+         */
+        TBool IsForeground();
+        
+        /**
+         * Set satellite view active or inactive
+         * @param aActive To set active or inactive
+         */        
+        void SetSatelliteViewActive( TBool aActive );
+        
+        /**
+         * Check if Satellite view is active
+         *
+         */        
+        TBool IsSatelliteViewActive( );
+        
+        /**
+         * Resets the odometer value
+         *
+         */        
+        void ResetOdoMeterValueL();
+        
+        /**
+         * Launches Satellite info dialog
+         *
+         */        
+        void LaunchSatelliteInfoDlgL();
+
+    public: // From MAknTabObserver
+        /**
+         * Called when Tab is changed, activates appropriate view
+         * @param aIndex
+         */    
+        void TabChangedL(TInt aIndex);
+
+    public: // From  MKeyProcessor
+        /**
+         * Process key event
+         * @param aKeyEvent
+         * @param aType
+         */    
+        TBool ProcessKeyEventL( const TKeyEvent& aKeyEvent,TEventCode aType );
+        
+        /**
+         * Retruns CBlidAppUi pointer, which is Tab observer
+         *
+         */        
+        MAknTabObserver* TabObserver();
+    
+    public: // from MBlidEngObserver
+        void NotifyL( const TBool aOnlineMode );
+        void NotifyErrorL( TInt aErrorCode );
+
+    protected: // from CCoeAppUi
+        /**
+         * Called whenever app goes to background or comes to foreground
+         * @param aForeground
+         */    
+	    void HandleForegroundEventL(TBool aForeground);
+	    
+        /**
+         * Handles a change to the resources
+         * @param aType
+         */	    
+		void HandleResourceChangeL( TInt aType );
+		
+    public: // From CEikAppUi
+        /**
+         * From CEikAppUi, takes care of command handling.
+         * @param aCommand command to be handled
+         */
+        void HandleCommandL(TInt aCommand);
+
+    private: // new functions
+        /**
+         * Launch Landmarks
+         */
+        void LaunchLandmarksDialogL();
+        
+    private: //Data
+        /// Ref: A pointer to CSatelliteInfoUI
+        CSatelliteInfoUI* iSatelliteInfo;
+
+        /// Own: TBool variable
+        TBool iContextPane;
+        
+        /// Own: State to hole app state (foreground/background)
+        TBool iForeground;
+    
+		/*! @var HUIToolkit environment. */
+    	CAlfEnv* iAlfEnv;
+    	
+    	TBool iIsSatViewActive;
+    };
+
+#endif // BLIDAPPUI_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/basiclocationinfodisplay/blid/ui/inc/CBlidArrivedTonePayerUtility.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,95 @@
+/*
+* 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:  Blid application arrived tone player utility class declaration.
+*
+*/
+
+
+
+#ifndef __CBLIDARRIVEDTONEPLAYERUTILITY_H__
+#define __CBLIDARRIVEDTONEPLAYERUTILITY_H__
+
+// SYSTEM INCLUDES
+#include <mdaaudiosampleplayer.h>
+// USER INCLUDES
+
+// FORWARD DECLARATION
+
+/*
+* @description
+*
+*/
+class CBlidArrivedTonePlayerUtility : public CBase,
+                        			 public MMdaAudioPlayerCallback
+    {
+    public:
+        /**
+        * Two-phased constructor.
+        */
+        static CBlidArrivedTonePlayerUtility* NewL( );
+        
+        /**
+        * Destructor.
+        */
+        ~CBlidArrivedTonePlayerUtility();
+
+	public: // 	from MMdaAudioPlayerCallback	        
+        /**
+        * From MMdaAudioPlayerCallback Called when audio clip initialization completes.
+        *
+        * @since 2.0
+        *
+        * @param aError    IN  Resulting error code.
+        * @param aDuration IN Audio clip duration.
+        *
+        * @return void
+        */
+        void MapcInitComplete( TInt aError,
+                               const TTimeIntervalMicroSeconds& aDuration );
+        
+        /**
+        * From MMdaAudioPlayerCallback Called when audio clip playback completes.
+        *
+        * @since 2.0
+        *
+        * @param aError    IN  Resulting error code.
+        *
+        * @return void
+        */
+        void MapcPlayComplete( TInt aError );
+                
+
+     private:
+        /**
+        * C++ default constructor.
+        */
+        CBlidArrivedTonePlayerUtility();
+
+        /**
+        * By default Symbian 2nd phase constructor is private.
+        */
+        void ConstructL( );
+
+	public:
+		void PlayToneL( const TFileName& aFileName );
+		void CanclePayer(); 
+		
+	private:
+		// Audio player utility.
+        CMdaAudioPlayerUtility* 	iAudioPlayer;
+        TFileName 					iFileName;
+        TTimeIntervalMicroSeconds	iAudioDuration;			    
+    };
+
+#endif // __CBLIDARRIVEDTONEPLAYERUTILITY_H__
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/basiclocationinfodisplay/blid/ui/inc/CBlidBaseContainer.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,131 @@
+/*
+* 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:  Blid application location request view's container 
+*                class definition.
+*
+*/
+
+#ifndef CBLIDBASECONTAINER_H
+#define CBLIDBASECONTAINER_H
+
+// INCLUDES
+#include <coecntrl.h>
+ 
+// FORWARD DECLARATIONS
+class MKeyProcessor;
+class CAknNavigationDecorator;
+class CAknIconArray;
+class CEikStatusPane;
+class CEikListBox;
+class CAknNavigationControlContainer;
+class TAknsItemID;
+class CAknTabGroup;
+
+// CLASS DECLARATION
+/**
+*  CBlidBaseContainer  container control class.
+*  
+*/
+class CBlidBaseContainer : public CCoeControl
+    {
+    public: // Constructors and destructor   
+        /**
+        * Destructor.
+        */
+        ~CBlidBaseContainer();
+
+    protected: // construction
+        CBlidBaseContainer( MKeyProcessor& aKeyProcessor, 
+                            const TDesC& aHelpContext );
+
+    public: // new functions
+        /**
+         * Activate navigation decorator.
+         * Method can called if tab needs to be refreshed.
+         * @param aNaviDecorator    navigation decorator
+         * @param aTabId            activated tabulator id             
+         */
+        void ActivateTabL( CAknNavigationDecorator& aNaviDecorator, 
+                            TInt aTabId );
+
+    public: // from CCoeControl
+        void GetHelpContext( TCoeHelpContext& aContext ) const;
+        TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent,
+                                    TEventCode aType);
+        void HandleResourceChange(TInt aType);
+       
+    protected: // new functions
+        /**
+         * Create CAknNavigationDecorator, ownership passed to caller.
+         * @param aDefaultNaviPane, ETrue if default, EFalse if tabgroup
+         * @return new instance of object. NULL, if something fails
+         */
+        CAknNavigationDecorator* CreateNaviPaneL( TBool aDefaultNaviPane );
+        
+        /**
+         *  Append icon to icon array. CAknIconArray owns icons so it is 
+         *  easier to it leave safely.
+         *
+         *  @param aIcons                 Icon array
+         *  @param aSkinID                TAknsItemID
+         *  @param aIconFileWithPath      Icon file name with path
+         *  @param aIconGraphicsIndex     Picture index.
+         *  @param aIconGraphicsMaskIndex Mask index.
+         */
+        void AddIconL( CAknIconArray* aIcons,
+                       const TAknsItemID aSkinID,
+                       const TDesC& aIconFileWithPath,
+                       TInt aIconGraphicsIndex,
+                       TInt aIconGraphicsMaskIndex );
+
+        /**
+         * Make title
+         * @param aResourceText resource to create title
+         */
+        void MakeTitleL( TInt aResourceText );
+        
+        /**
+         * Make title
+         * @param aListbox, listbox instance
+         * @param aResourceText, resourse id
+         */
+        void MakeEmptyTextListBoxL( 
+                CEikListBox* aListBox,
+                TInt aResourceText );
+
+        /**
+         * Appui's status pane getter
+         * @return Statuspane pointer
+         */
+        CEikStatusPane* StatusPane();
+
+        /** 
+         * Add new tabs to tabgroup
+         * @param aTabGroup
+         */
+        void AddTabsL(CAknTabGroup& aTabGroup);
+        
+    public:        
+        static void SetGPSAvailability(const TBool aAvailability);
+        static TBool IsGPSAvailable();
+        
+    protected: //data
+        MKeyProcessor& iKeyProcessor;
+        TCoeContextName iContextName;
+        static TBool iGPSAvailability;
+    };
+#endif // CBLIDBASECONTAINER_H
+
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/basiclocationinfodisplay/blid/ui/inc/CBlidBaseView.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,286 @@
+/*
+* 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:  Declares main view for blid application.
+*
+*/
+
+
+#ifndef CBLIDBASEVIEW_H
+#define CBLIDBASEVIEW_H
+
+// INCLUDES
+#include <aknview.h>
+#include <featmgr.h>
+#include <bldvariant.hrh>
+
+#ifdef RD_SCALABLE_UI_V2
+#include <eikclb.h>
+#endif // RD_SCALABLE_UI_V2
+
+#include "MKeyProcessor.h"
+#include "MBlidEngObserver.h"
+#include "CLmkLandmarkSelectorDlg.h"
+#include "blidcommonconsts.h"
+
+// FORWARD DECLARATIONS
+class CEikonEnv;
+class CBlidBaseContainer;
+class CEikMenuPane;
+class MBlidRouter;
+class MBlidLocation;
+class CBlidEng;
+class CBlidCurrentPositionDlg;
+class CBlidDocument;
+class CAlfImageLoaderUtil;
+
+// CLASS DECLARATION
+/**
+*  Base view class.
+* 
+*/
+class CBlidBaseView : public CAknView, public MKeyProcessor, 
+                                       public MBlidEngObserver
+                                       #ifdef RD_SCALABLE_UI_V2                                       
+                                       ,public MEikListBoxObserver
+                                       #endif // RD_SCALABLE_UI_V2
+    {
+    public: // Constructors and destructor
+        /**
+         * C++ constructor
+         * @param aKeyProcessor A pointer to MKeyProcessor
+         */
+        CBlidBaseView( MKeyProcessor& aKeyProcessor );
+
+        /**
+         * By default Symbian 2nd phase constructor is private.
+         * @param aResId Resource id
+         */
+        void BaseConstructL( TInt aResId );
+
+        /**
+         * Destructor.
+         */
+        ~CBlidBaseView();
+
+    public: // From MKeyProcessor
+        TBool ProcessKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType );
+        MAknTabObserver* TabObserver();
+
+    public: // From MEikMenuObserver
+        void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane );
+
+    public: //From MBlidEngObserver
+        void NotifyL( const TBool aOnlineMode );
+        void NotifyErrorL( TInt aErrorCode );
+        void Update(CBlidBaseContainer* aContainer);
+        CEikButtonGroupContainer* CBAPtr() const;
+        
+    protected: // New methods  
+        /**
+         * Handle help requests
+         *
+         * @param aMenuPane A pointer to CEikMenuPane
+         */
+        void HandleHelpFeatureL( CEikMenuPane* aMenuPane ) const;
+
+        /**
+        * Insert waypoint to MBlidRouter's array
+        * @return ETrue if waypoint inserted,
+        *         EFalse if waypoint not inserted
+        */
+        TBool InsertWaypointL();
+
+        /**
+        * Select waypoint from the list
+        *
+        * @return index of list
+        */
+        TInt SelectWaypointL();
+
+        /**
+         * Check if waypoint name exist
+         * @param aName 
+         * @return TBool 
+         */
+        TBool CheckIfExistL( const TDes& aName, TInt& aErrorCode, TInt& aRemovedIndex );
+        
+        /**
+         * Launches the Landmark Dialog
+         * 
+         */
+        TInt LaunchLandmarksDialogL();
+        
+        /**
+         * Launches confirmation dialog
+         * 
+         */
+        TInt NotifyUserErrorL(TInt resourceId);
+        
+        void SaveCurrentPositionAsLandmarkL();
+        
+        TInt LaunchManualWaypointDialogL();
+        
+        /**
+         * Make visible Middle Soft Key Label/Icon.
+         * 
+         */
+        void SetMSKVisible(); 
+        
+        #ifdef RD_SCALABLE_UI_V2        
+        /**
+        * From MEikListBoxObserver.
+        * Handles listbox events.
+        * @param aListBox Listbox where the event occurred.
+        * @param aEventType Event type.
+        */
+        void HandleListBoxEventL( CEikListBox* aListBox, 
+            TListBoxEvent aEventType );
+
+        /**
+        * Called by HandleListBoxEventL to handles list box selections.
+        * This is Pure virtual function so every derived view class
+        * need defination for this function
+        */
+        virtual void HandleListBoxSelectionL() = 0;                                   
+        #endif // RD_SCALABLE_UI_V2        
+        
+        void ShowCurrentPositionInfoL();
+    
+    public: //New Method
+        /**
+         * Changes the MSK visibility option depending upon some condition.
+         * 
+         */
+        void SetMSKNotVisible();
+        
+        /**
+         * Update Middle Soft Key label/Icon depending upon GPS data Availability
+         * 
+         */
+        void UpdateMskStateL();
+        
+        void SaveCurrentPositionL();
+        
+        CBlidDocument* BlidDocument();
+        
+        void ActivateSatelliteViewL( );
+        
+        TBool IsSatViewActive( );
+        
+        TBool IsForeGroundApp( );
+        
+        void ExitMainApplicationL( TInt aButtonId );
+        
+        void LaunchTripContextMenuL();
+        
+        void LaunchNavigationContextMenuL();
+        
+        void LaunchSatelliteInfoDlgL();
+        
+        /**
+         * Sets the Middle Soft Key label after reding from the resource ID.
+         * @param aResourceId
+         * @param aCommandId
+         */        
+        void SetMiddleSoftKeyLabelL(const TInt aResourceId, const TInt aCommandId );
+        
+        void RemoveMiddleSoftKeyLabel( const TInt aCommandId );
+        
+        void ActivateNavigationViewL( );
+        
+        void ChangeViewSoftKeyL( );
+        
+        TRect ApplicationRect() const;
+        
+        CAlfImageLoaderUtil* ImageLoaderUtils( ) const;
+        
+        TFileName ImagePathName( ) const;
+
+        
+    #ifdef RD_SCALABLE_UI_V2        
+    public:
+       /**
+        * Depends upon the Lm feature availability
+        * return ETrue or EFalse
+        * @return Tbool
+        */
+        TBool IsLmFeatureAvailable();
+        
+       /**
+        * Depends upon the Lm availability in DB
+        * return ETrue or EFalse
+        * @return Tbool
+        */
+        TBool IsLmAvailableL();
+        
+       /**
+        * Depends upon saved Waypoint availability
+        * return ETrue or EFalse
+        * @return Tbool
+        */
+        TBool IsWpAvailable();
+        
+    #endif // RD_SCALABLE_UI_V2    
+    
+	public://new function added for HTK        
+		void ActivateCorrectViewL( TInt aIndex );
+		
+        TBool IsSettingsViewActive();        		
+        
+        CCoeEnv* CoeEnv();        		
+    
+
+    protected: // Data
+        /// Not owned: reference to key processor
+        MKeyProcessor& iKeyProcessor;
+
+        // Not owned: A pointer to location model
+        MBlidLocation* iLocation;
+
+        // Not owned: A pointer to router model
+        MBlidRouter* iRouter;
+
+        // Not owned: A pointer to blid's engine
+        CBlidEng* iEngine;
+        
+        /// Own: Landmark Dialog
+        CLmkLandmarkSelectorDlg* iLandmarkInfo;
+        
+        ///Own: count for 30 sec PSY unavailaility
+        static TInt iPSYTimeoutCount;
+        
+        ///Own: Manual waypoint default name
+        TBuf<KBlidWaypointNameMaxLen> iManualWaypointName;
+        
+        static TBool iOnline;
+        
+        TInt iGPSTimeoutCount;
+        
+        //Own: Boolean value holds whether the MSK is visible or not.
+        TBool iMSKVisible;
+        
+        TBool	iIsSettingsViewActive;                 
+        
+	private:
+		CBlidCurrentPositionDlg* iPopupDialog;
+		
+        TFileName iConFileName;
+        
+        CAlfImageLoaderUtil* iImageLoaderUtil;  
+		
+    };
+
+#endif //CBLIDBASEVIEW_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/basiclocationinfodisplay/blid/ui/inc/CBlidCurrentPositionDlg.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,98 @@
+/*
+* 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: 
+*     Current Position info pop-up.
+*
+*/
+
+
+#ifndef __CBLIDCURRENTPOSITIONDLG_H__
+#define __CBLIDCURRENTPOSITIONDLG_H__
+
+//  INCLUDES
+#include <aknPopup.h>   // CAknPopupList
+
+// FORWARD DECLARATIONS
+class CAknSingleHeadingPopupMenuStyleListBox;
+class CBlidBaseView;
+class MBlidLocation;
+class CBlidEng;
+
+// CLASS DECLARATION
+
+/**
+ * @internal Only Blid application internal use supported!
+ *
+ * Current location info dialog.
+ */
+class CBlidCurrentPositionDlg : public CAknPopupList
+    {
+    public:
+        /**
+         * Creates a new instance of this class.
+         */
+        static CBlidCurrentPositionDlg* NewL( CBlidBaseView& aView,
+        									  MBlidLocation* aLoc,
+        									  CBlidEng* aEng );
+
+        /**
+         * Run the dialog.
+         */
+        void ExecuteLD();
+    
+        /**
+         * Destructor.
+         * Also cancels and dismisses this popup list, in other words makes
+         * ExecuteLD return as if cancel was pressed.
+         */
+        ~CBlidCurrentPositionDlg();
+        
+	public: // new function
+		void ChangeDlgSoftKey();        
+
+    private: // from CAknPopupList
+		/*!
+		@function CBlidCurrentPositionDlg
+
+		@discussion Perform the first phase of two phase construction 
+		*/
+		CBlidCurrentPositionDlg( CBlidBaseView& aView,
+							   MBlidLocation* aLoc,
+							   CBlidEng* aEng );
+		    						   
+        /**
+         * By default Symbian 2nd phase constructor is private.
+         */
+		void ConstructL();
+
+		void ProcessCommandL(TInt aCommandId);
+		
+    private: // data members
+        /// Own: default selection listbox
+        CAknSingleHeadingPopupMenuStyleListBox* iListBox;
+        CBlidBaseView& iView;
+        // Not owned: A pointer to location model
+        MBlidLocation* iLoc;
+        // Not owned: A pointer to blid's engine
+        CBlidEng* iEng;
+        
+        TBool isDlgExited;
+        
+        TBool isLmSaved;
+        
+    };
+
+#endif // __CBLIDCURRENTPOSITIONDLG_H__
+            
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/basiclocationinfodisplay/blid/ui/inc/CBlidDocument.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,102 @@
+/*
+* 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:  Blid application document class definition.
+*
+*/
+
+
+#ifndef CBLIDDOCUMENT_H
+#define CBLIDDOCUMENT_H
+
+// INCLUDES
+#include <AknDoc.h>
+   
+
+// FORWARD DECLARATIONS
+class CEikAppUi;
+class CBlidEng;
+// CLASS DECLARATION
+
+/**
+*  CBlidDocument application class.
+*/
+class CBlidDocument : public CAknDocument
+    {
+    public: // Constructors and destructor
+        /**
+         * Two-phased constructor.
+         */
+        static CBlidDocument* NewL(CEikApplication& aApp);
+
+        /**
+         * Destructor.
+         */
+        virtual ~CBlidDocument();
+
+    private:
+
+        /**
+         * C++ default constructor.
+         */
+        CBlidDocument(CEikApplication& aApp);
+
+        /**
+         * By default Symbian 2nd phase constructor is private.
+         */        
+        void ConstructL();
+
+    public: // New functions
+        /**
+         * Creates the Blid engine owned by this object.
+         *
+         */
+        void CreateEngineL();
+
+        /**
+         * Returns a pointer to blid application engine.
+         */
+        CBlidEng* Engine();
+
+    private: //From CAknDocument
+        /**
+         * Stores the document of application.
+         */
+        void StoreL( CStreamStore& aStore, 
+            CStreamDictionary& aStreamDic ) const;
+        /**
+         * Restores the document of application
+         */
+        void RestoreL( const CStreamStore& aStore,
+            const CStreamDictionary& aStreamDic );
+            
+        /**
+         * Restores the document's state from the specified file, 
+         * or creates a new default document
+         */
+        CFileStore* OpenFileL(TBool aDoOpen, const TDesC& aFileName, RFs& aFs);
+
+    private: // From CEikDocument
+        /**
+         * From CEikDocument, create CLocAppUi "App UI" object.
+         */
+        CEikAppUi* CreateAppUiL();
+
+    private: // Data
+        /// Own: A pointer to Blid's engine
+        CBlidEng* iEngine; 
+    };
+
+#endif // CBLIDDOCUMENT_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/basiclocationinfodisplay/blid/ui/inc/CBlidLocSettingLauncher.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,77 @@
+/*
+* 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:  Responsible for launching positioning settings
+*
+*/
+
+#ifndef CBLIDLOCSETTINGSLAUNCHER_H
+#define CBLIDLOCSETTINGSLAUNCHER_H
+
+// INCLUDES
+#include <e32base.h>
+#include <locsettingsuiclient.h>
+
+// CLASS DECLARATION
+class CBlidMainControl;
+/**
+*  CBlidLocSettingsLauncher class
+*  This class is a wrapper for launching Position settings
+*/
+class CBlidLocSettingsLauncher : public CActive
+	{
+	private : // Constructors and destructor
+	      /**
+	       * C++ default constructor.
+	       */
+	      CBlidLocSettingsLauncher();
+	      
+	public:
+	      /**
+	       * Destructor.
+	       */
+	      ~CBlidLocSettingsLauncher();		
+	
+	public:	
+		/**
+         * Two-phased constructor.
+         *
+         */
+	     static CBlidLocSettingsLauncher* NewL();
+			      
+	private: 
+		 /**
+          * Second phase of construction.
+          */
+	      void ConstructL();
+	      
+	public: // new functions
+	      void LaunchL();
+	      void SetControl( CBlidMainControl* aControl );	      
+	      	      
+	protected: // from CActive
+	      void RunL();
+	      
+	      void DoCancel();
+	      
+	      void CancelRequest();
+	      
+	private:
+	    // Pointer to Location setings client library
+        CLocSettingsUiClient*       iClientLibrary;
+        CBlidMainControl*			iControl;
+	};
+	
+#endif // CBLIDLOCSETTINGSLAUNCHER_H
+
+// End of file
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/basiclocationinfodisplay/blid/ui/inc/CBlidMainControl.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,236 @@
+/*
+* 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:  Blid application startup view's control class definition.
+*
+*/
+
+
+
+#ifndef __CBLIDMAINCONTROL_H__
+#define __CBLIDMAINCONTROL_H__
+
+// SYSTEM INCLUDES
+#include <alf/alfcontrol.h>
+
+// USER INCLUDE
+// INCLUDES
+//#include "CBlidBaseContainer.h"
+//#include "CBlidBaseView.h"
+
+//FORWARD DCLERATION
+class CEikStatusPane;
+class CAlfEnv;
+class CBlidBaseView;
+class CAlfAnchorLayout;
+class CAlfTextVisual;
+class MBlidLocation;
+class CBlidLocSettingsLauncher;
+class CAknMessageQueryDialog;
+class CAlfImageLoaderUtil;
+class CAlfImageVisual;
+class CAlfTexture;
+
+/*! 
+  @class CBlidMainControl
+  
+  @discussion 
+  */
+class CBlidMainControl : public CAlfControl
+    {
+	public:
+		 /*!
+		  @function NewL
+		   
+		  @discussion Create a CBlidMainControl object, which will draw itself to aRect
+          * Two-phased constructor
+    	  * @param aKeyProcessor
+		  * @param aParent
+		  * @param aRect A rectangle for drawing.
+		  * @return The newly created object.
+
+		  @result a pointer to the created instance of CBlidMainControl
+		  */
+		    static CBlidMainControl* NewL( CAlfEnv& aEnv,
+		                                const TRect& aRect,
+		                                CBlidBaseView& aView );
+
+		 /*!
+		  @function ~CBlidMainControl
+		  
+		  @discussion Destroy the object and release all memory objects
+		  */
+		     ~CBlidMainControl();
+
+	  
+	private:
+		 /*!
+		  @function CBlidMainControl
+		  
+		  @discussion Perform the first phase of two phase construction 
+		  */
+		    CBlidMainControl(  CAlfEnv& aEnv,
+		    				   CBlidBaseView& aView );
+
+		 /*!
+		  @function ConstructL
+		  
+		  @discussion  Perform the second phase construction of a CBlidMainControl object
+		  */
+		    void ConstructL( const TRect& aRect );
+		    
+	public:    
+		/*!
+		@function UpdateL
+		  
+		@discussion  Called by Location model to update the current location
+		*/
+		void UpdateL();
+		
+		/*!
+		@function MakeTitleL
+		  
+		@discussion  Set the title
+		@param aResourceText
+		*/
+		void MakeTitleL( TInt aResourceText );
+		
+		/*!
+		@function SetErrorCode
+		  
+		@discussion  Sets the error code
+		@param aErrorCode  
+		*/
+		void SetErrorCode( TInt aErrorCode );
+		
+		/*!
+		@function SetOnlineMode
+		 
+		@discussion  Sets the online mode
+		@param aOnlineMode
+		*/
+		void SetOnlineMode( TBool aOnlineMode );
+		
+		/*!
+		@function CreateNaviPaneL
+		  
+		@discussion  Create the navigation pane
+		*/
+		void CreateNaviPaneL();
+		
+		/*!
+		@function LaunchPositioningSettingsViewL
+		  
+		@discussion  Launches the positioning settings view
+		*/
+		void LaunchPositioningSettingsViewL( );
+		
+		/*!
+		@function DeleteDialogResource
+		  
+		@discussion  Delete the dialog resources
+		*/
+		void DeleteDialogResource( );
+		
+		/*!
+		@function UpdateDisplayLayoutL
+		  
+		@discussion  Update the diaply layout when there is achange in app resource
+		*/
+		void UpdateDisplayLayoutL();	
+		
+	private:
+		/*!
+		@function StatusPane
+		  
+		@discussion  Retruns the status pane
+		*/
+		CEikStatusPane* StatusPane() const;
+		
+		/*!
+		@function DispMsgQueryWithLinkL
+		  
+		@discussion  Displays a message query with a link
+		@param aHeadingText
+		@param aMsgQueryText
+		@param aLinkText
+		@param aLinkShow
+		@param aCallBack
+		*/
+		TInt DispMsgQueryWithLinkL(TInt aHeadingText,
+								 TInt aMsgQueryText,
+								 TInt aLinkText,
+								 TBool aLinkShow,
+								 TCallBack aCallBack );
+		
+		/*!
+		@function CreateSearchingTextL
+		  
+		@discussion  Creates the searching text visual
+		*/
+		void CreateSearchingTextL();
+		
+		/*!
+		@function CreateAnimationL
+		  
+		@discussion  Creates the image visuals for animation
+		*/
+		void CreateAnimationL();
+		
+		/*!
+		@function UpdateAnimation
+		  
+		@discussion  Changes the image visual in orser to animate
+		*/
+		void UpdateAnimation();
+		
+		/*!
+		@function Tick
+		  
+		@discussion  Timer callback
+		@param aObject
+		*/
+        static TInt Tick(TAny* aObject); // functions for TCallBack protocol
+
+	private:
+        /// Reference to the view to handle resource change
+        CAlfEnv& iEnv;
+        CBlidBaseView& iView;
+		CAlfAnchorLayout* iMainLayout;
+		CAlfTextVisual* iSearchTextVisual;
+		TInt  iErrorCode;
+		TBool  iOnlineMode;	
+		MBlidLocation* iLocation;
+        ///Own: count for 30 sec PSY unavailaility
+        static TInt iPSYTimeoutCount;
+        TInt iButtonId;       
+        CBlidLocSettingsLauncher*	iLauncher;
+        TBool isSettingsLaunched;
+        HBufC* iHeadPaneText;
+        HBufC* iMsgQueryText;
+        HBufC* iLinkText;
+        HBufC* iMsgQText;
+        TBool isDialogLaunched;
+
+	    CPeriodic* iPeriodic; // periodic timer active object
+        TInt iDisplayIcon;    // Current svg animation icon
+        CAlfImageVisual* iAnimationVisual;
+	    TRect iAnimationRect;
+	    RPointerArray<CAlfTexture> iTextures;
+	    TBool isAccessoryRequired;
+	    
+	public:        
+        CAknMessageQueryDialog*		iDialog;
+    };
+
+#endif // __CBLIDMAINCONTROL_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/basiclocationinfodisplay/blid/ui/inc/CBlidMainView.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,107 @@
+/*
+* 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:  Declares main view for Blid application.
+*
+*/
+
+#ifndef CBLIDMAINVIEW_H
+#define CBLIDMAINVIEW_H
+
+// INCLUDES
+#include "CBlidBaseView.h"
+#include "CBlidLocSettingLauncher.h"
+#include "CBlidMainControl.h"
+
+
+// FORWARD DECLARATIONS
+class CBlidMainControl;
+class CAlfEnv;
+class CAlfControlGroup;
+class CAlfDisplay;
+
+// CLASS DECLARATION
+
+/**
+*  CBlidMainView view class.
+*
+*/
+class CBlidMainView : public CBlidBaseView
+    {
+    public: // Constructors and destructor
+        /**
+         * C++ default constructor.
+         * @param aKeyProcessor 
+         * @return Created CBlidMainView object
+         */
+        static CBlidMainView* NewLC( MKeyProcessor& aKeyProcessor,CAlfEnv& aEnv );
+
+        /**
+         * Destructor.
+         */
+        ~CBlidMainView();
+        
+        /**
+         * View Getter
+         */
+        CBlidMainControl* GetControl();
+
+    private: // constructor
+        /**
+         * C++ constructor
+         * @param aKeyProcessor
+         */
+        CBlidMainView( MKeyProcessor& aKeyProcessor,CAlfEnv& aEnv );
+
+        /**
+         * By default Symbian 2nd phase constructor is private.
+         */
+        void ConstructL();
+
+    public: // From MKeyProcessor
+		TBool ProcessKeyEventL( const TKeyEvent& aKeyEvent,
+                                TEventCode aType );
+
+    public: // CAknView
+        TUid Id() const;
+        void HandleCommandL(TInt aCommand);
+        void HandleResourceChangeL( TInt aType );        
+
+		#ifdef RD_SCALABLE_UI_V2
+		void HandleListBoxSelectionL();
+		#endif //RD_SCALABLE_UI_V2
+		
+    public: //From MBlidEngObserver
+        void NotifyL( const TBool aOnlineMode );
+        void NotifyErrorL( TInt aErrorCode );
+		            
+
+    private: //From CAknView
+        void DoActivateL(const TVwsViewId& aPrevViewId,TUid aCustomMessageId,
+            const TDesC8& aCustomMessage);
+        void DoDeactivate();
+    
+    private: // Data
+		//own:navigationcontrol class
+		CBlidMainControl*  iMainCtrl;
+		
+		CAlfEnv& iEnv;
+
+		CAlfControlGroup* iMainCtrlGroup;
+		
+		CAlfDisplay*		iCtrlDisplay;
+    };
+
+#endif  // CBLIDMAINVIEW_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/basiclocationinfodisplay/blid/ui/inc/CBlidNavigationView.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,160 @@
+/*
+* Copyright (c) 2005-2008 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Declares compass view for Blid application.
+*
+*/
+
+#ifndef BLIDNAVIGATIONVIEW_H
+#define BLIDNAVIGATIONVIEW_H
+
+// SYSTEM INCLUDES
+#include "CBlidBaseView.h"
+#include "MBlidLocation.h"
+#include "MBlidRouter.h"
+
+
+// FORWARD DECLARATIONS
+class CHtkNavigationControl;
+class CAlfEnv;
+class CBlidLocSettingsLauncher;
+class CAlfControlGroup;
+class CAlfDisplay;
+
+// CLASS DECLARATION
+
+/**
+*  CBlidNavigationView view class.
+*
+*/
+class CBlidNavigationView : public CBlidBaseView
+    {
+    public: // Constructors and destructor
+        /**
+         * C++ default constructor.
+         * @param aKeyProcessor
+         * @return A pointer to CBlidNavigationView
+         */
+        static CBlidNavigationView* NewLC( MKeyProcessor& aKeyProcessor,CAlfEnv& aEnv );
+
+        /**
+         * Destructor.
+         */
+        ~CBlidNavigationView();
+
+    private: // constructor
+        /**
+         * C++ constructor
+         * @param aKeyProcessor
+         */
+        CBlidNavigationView( MKeyProcessor& aKeyProcessor,CAlfEnv& aEnv );
+
+        /**
+         * By default Symbian 2nd phase constructor is private.
+         */
+        void ConstructL();
+    
+    public: //From MBlidEngObserver
+    	/**
+         * From MBlidEngObserver, called when a position update is received.
+         */
+        void NotifyL( const TBool aOnlineMode );
+        /**
+         * From MBlidEngObserver, called when there is an error in receiving position update
+         */
+        void NotifyErrorL( TInt aErrorCode );
+
+    public: // From MKeyProcessor
+    	/**
+         * Process the key event
+         */
+		TBool ProcessKeyEventL( const TKeyEvent& aKeyEvent,
+                                TEventCode aType );
+
+    public: // From CAknView
+    	/**
+         * From CAknView, returns the view id
+         */
+        TUid Id() const;
+        /**
+         * From CAknView, takes care of command handling.
+         */
+        void HandleCommandL(TInt aCommand);
+        /**
+         * From CAknView, handles a change to the resources
+         */
+        void HandleResourceChangeL( TInt aType );
+    public:
+    	/**
+         * Retruns the navigation control
+         */
+        CHtkNavigationControl* GetControl();        
+
+    private: // From CAknView
+    	/**
+         * From CAknView, called when view is activated
+         */
+        void DoActivateL(const TVwsViewId& aPrevViewId,TUid aCustomMessageId,
+            const TDesC8& aCustomMessage);
+        /**
+         * From CAknView, called when view is deactivated
+         */    
+        void DoDeactivate();
+
+    #ifdef RD_SCALABLE_UI_V2
+    private:
+       /**
+        * From CBlidBaseView.
+        */
+        void HandleListBoxSelectionL();
+    #endif // RD_SCALABLE_UI_V2
+    
+    private: 
+    	/**
+         * Selects a waypoint
+         */
+        TInt SelectWaypointL();
+        /**
+         * Launches landmarks selector dialogs
+         */
+        TInt LaunchLandmarksDialogL();
+        /**
+         * Launches waypoint dialog
+         */
+        TInt LaunchManualWaypointDialogL();
+        /**
+         * Inserts a waypoint
+         */
+        TBool InsertWaypointL();
+        /**
+         * Save current position, launches landmarks add/edit dialog
+         */
+        void SaveCurrentPositionAsLandmarkL();
+    
+    private: // Data
+		
+		CHtkNavigationControl*  iNavigationCtrl;
+		
+		CAlfEnv& iEnv;
+
+		CAlfControlGroup* iNavigationCtrlGroup;
+		
+        // Own: Pointer to Location Settings Launcher
+        CBlidLocSettingsLauncher* iLauncher;
+        
+        CAlfDisplay*		iCtrlDisplay;
+    };
+
+#endif
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/basiclocationinfodisplay/blid/ui/inc/CBlidOwnPosLBModel.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,180 @@
+/*
+* 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:  Provides OwnPosView's details
+*
+*/
+
+#ifndef CBLIDOWNPOSLBMODEL_H
+#define CBLIDOWNPOSLBMODEL_H
+
+// INCLUDES
+#include <e32base.h>    // CBase
+#include <bamdesca.h>  // MDesCArray
+
+
+// FORWARD DECLARATIONS
+class MBlidLocation;
+class MBlidSettings;
+class TPosition;
+class TCourse;
+// CLASS DECLARATION
+
+/**
+*  CBlidOwnPosLBModel
+*
+*/
+class CBlidOwnPosLBModel : public CBase, public MDesCArray
+    {
+    public: // Constructors and destructor
+
+        /**
+         * Two-phased constructor.
+         * @param aLocationModel A pointer to Location model
+         * @param aSettingsModel A pointer to Blid settings API
+         * @return CBlidEng object.
+         */
+		static CBlidOwnPosLBModel* NewLC( MBlidLocation* aLocationModel,
+                                          MBlidSettings* aSettings );
+
+        /**
+         * Destructor.
+         */
+        ~CBlidOwnPosLBModel();
+
+    private: //
+        /**
+         * Second phase of construction.
+         */
+        void ConstructL();
+
+        /**
+         * c++ default constructor.
+         * @param aLocationModel A pointer to Location model
+         * @param aSettingsModel A pointer to Blid settings API
+         */
+        CBlidOwnPosLBModel( MBlidLocation* aLocationModel,
+                            MBlidSettings* aSettings );
+
+    private: // From MDesCArray
+        TInt MdcaCount() const;
+        TPtrC16 MdcaPoint(TInt aIndex) const;
+
+    private: //new functions
+        /**
+         * Format latitude string
+         * @param aLatitudeString
+         * @param aPosition
+         */
+        void LatitudeFormat( TDes& aLatitudeString,
+                             TPosition aPosition ) const;
+
+        /**
+         * Format longitude string
+         * @param aLongitudeString
+         * @param aPosition
+         */
+        void LongitudeFormat( TDes& aLongitudeString,
+                              TPosition aPosition  ) const;
+
+        /**
+         * Format accuracy string
+         * @param aAccuracyString
+         * @param aPosition
+         */
+        void AccuracyFormat( TDes& aAccuracyString,
+                             TPosition aPosition ) const;
+
+        /**
+         * Format altitude string
+         * @param aAltitudeString
+         * @param aPosition
+         */
+        void AltitudeFormat( TDes& aAltitudeString,
+                             TPosition aPosition  ) const;
+        /**
+         * Format Altitude accuracy string
+         * @param aAccuracyString
+         * @param aPosition
+         */
+
+        void altAccuracyFormat( TDes& aAltAccuracyString ) const;
+
+    private: //data
+        /// Own: conversion buffer
+        HBufC* iBuffer;
+
+        // Own: connect GPS indicator
+        HBufC* iConnectGPS;
+
+        /// Ref: Blid location model API
+        MBlidLocation* iLocationModel;
+
+        /// Ref: Blid settings model API
+        MBlidSettings* iSettingsModel;
+
+        /// Own: Latitude's title text string
+        HBufC* iBlidLatitude;
+
+        /// Own: Longitude's title text string
+        HBufC* iBlidLongitude;
+
+        /// Own: Accuracy's title text string
+        HBufC* iBlidAccuracy;
+
+        /// Own: Heading's title text string
+        HBufC* iBlidAltAccuracy;
+
+        /// Own: Speed's title text string
+        HBufC* iBlidSpeed;
+
+        /// Own: Altitude's title text string
+        HBufC* iBlidAltitude;
+        
+        /// Own: Metric accuracy's format text string
+        HBufC* iAccuraryFormatM;
+
+        /// Own: Imperial accuracy's format text string
+        HBufC* iAccuraryFormatFt;
+
+        /// Own: Metric speed's format text string
+        HBufC* iSpeedFormatKmph;
+
+        /// Own: Imperial speed's format text string
+        HBufC* iSpeedFormatMph;
+
+        /// Own: Metric altitude's format text string
+        HBufC* iAltitudeFormatM;
+
+        /// Own: Imperial altitude's format text string
+        HBufC* iAltitudeFormatFt;
+
+        /// Own: Heading's format text string
+        HBufC* iDataBeingCalculated;
+
+        /// Own: A Pointer to TLocale
+        TLocale* iLocale;
+        
+        // Own: Not Available indicator
+        HBufC* iNotAvailable;
+        
+        /// Own: Data blank text string
+        HBufC* iDataBlank;
+        
+        /// Own: Waiting GPS data text string
+        HBufC* iWaitingGpsData;
+    };
+
+#endif // CBLIDOWNPOSLBMODEL_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/basiclocationinfodisplay/blid/ui/inc/CBlidSatelliteControl.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,165 @@
+/*
+* 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:  Blid application startup view's control class definition.
+*
+*/
+
+
+
+#ifndef __CBlidSatelliteControl_H__
+#define __CBlidSatelliteControl_H__
+
+// SYSTEM INCLUDES
+#include <alf/alfcontrol.h>
+
+// USER INCLUDE
+// INCLUDES
+//#include "CBlidBaseContainer.h"
+//#include "CBlidBaseView.h"
+
+//FORWARD DCLERATION
+class CAlfEnv;
+class CBlidBaseView;
+class MBlidLocation;
+class CAlfAnchorLayout;
+class CAlfTextVisual;
+class CAlfDeckLayout;
+class CAlfTextStyle;
+class CAknNavigationDecorator;
+class CAlfImageLoaderUtil;
+class CAlfImageVisual;
+class CAlfTexture;
+
+/*! 
+  @class CBlidSatelliteControl
+  
+  @discussion 
+  */
+class CBlidSatelliteControl : public CAlfControl
+    {
+	public:
+		 /*!
+		  @function NewL
+		   
+		  @discussion Create a CBlidSatelliteControl object, which will draw itself to aRect
+          * Two-phased constructor
+    	  * @param aKeyProcessor
+		  * @param aParent
+		  * @param aRect A rectangle for drawing.
+		  * @return The newly created object.
+
+		  @result a pointer to the created instance of CBlidSatelliteControl
+		  */
+		    static CBlidSatelliteControl* NewL( CAlfEnv& aEnv,
+		                                const TRect& aRect,
+		                                CBlidBaseView& aView );
+
+		 /*!
+		  @function ~CBlidSatelliteControl
+		  
+		  @discussion Destroy the object and release all memory objects
+		  */
+		     ~CBlidSatelliteControl();
+
+	  
+	private:
+		 /*!
+		  @function CBlidSatelliteControl
+		  
+		  @discussion Perform the first phase of two phase construction 
+		  */
+		    CBlidSatelliteControl(  CAlfEnv& aEnv,
+		    				   CBlidBaseView& aView );
+
+		 /*!
+		  @function ConstructL
+		  
+		  @discussion  Perform the second phase construction of a CBlidSatelliteControl object
+		  */
+		    void ConstructL( const TRect& aRect );
+		    
+        /**
+        * Enumerations for signal strength
+        */
+        enum TBlidSignalStrength
+            {
+            EBlidSignalStrengthZero,
+            EBlidSignalStrengthOne,
+            EBlidSignalStrengthTwo,
+            EBlidSignalStrengthThree,
+            EBlidSignalStrengthFour
+            };  
+		            
+	public:    
+		void UpdateL();
+		void MakeTitleL( TInt aResourceText );
+		void SetErrorCode( TInt aErrorCode );
+		void SetOnlineMode( TBool aOnlineMode );
+		void CreateNaviPaneL( const TDesC& aText );
+		void ChangeNavigationViewL();
+		void UpdateDisplayLayoutL();
+		
+		
+	private:		
+		void CreateGlobeVisualL( );
+		void CreateSatelliteSignalVisualsL(  );
+		void CreateSignalLayoutL( CAlfTextStyle* aStyle, TRgb aRgb );
+		void DisplaySatellitesRowL( const TDesC& aSatNo,
+						   		    CAlfImageVisual* aImageVisual,
+									CAlfTextVisual* aTextVisual,
+									TInt aIndex );
+									
+		void ChangeSoftKeyL();
+		void CalculateRects();
+		void SetAnchors();		
+        static TInt Tick(TAny* aObject); // functions for TCallBack protocol
+        void UpdateGlobeVisual();							
+		
+	private:
+		CEikStatusPane* StatusPane();		
+		
+	private:
+        /// Reference to the view to handle resource change
+		CAlfEnv& 						iEnv;
+        CBlidBaseView& 					iView;
+		TInt  							iErrorCode;
+		TBool  							iOnlineMode;
+		CAlfAnchorLayout* 				iMainAnchorLayout;
+		CAlfDeckLayout*					iGlobeDeckLayout;
+		CAlfDeckLayout*					iSatelliteBarDeckLayout;
+		CAlfDeckLayout* 				iFlowDeckOne;
+		CAlfDeckLayout* 				iFlowDeckTwo;
+		CAlfImageVisual* 				iSatelliteVisual[8];
+		CAlfImageVisual* 				iSignalStrengthRowOne[17];
+		CAlfTextVisual* 				iSatNoRowOne[17];
+		CAknNavigationDecorator*		iNavimessage;
+		MBlidLocation* 					iLocation;
+		HBufC*							iImagePath;
+		CPeriodic* 						iTimer;
+		HBufC*							iAvailableNoteText;
+		HBufC*							iSearchNoteText;
+		
+		RArray<TRect>					iSignalBarRects;
+		RArray<TRect>					iSatelliteNumberRects;
+
+	    CPeriodic* iPeriodic; // periodic timer active object
+        TInt iDisplayIcon;    // Current svg animation icon
+        CAlfImageVisual* iAnimationVisual;
+	    RPointerArray<CAlfTexture> iTextures;
+    	    
+		TRect							iGlobeRect;
+		TRect							iSatGridRect;														
+    };	
+
+#endif // __CBlidSatelliteControl_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/basiclocationinfodisplay/blid/ui/inc/CBlidSatelliteView.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,102 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Declares main satellite view for Blid application.
+*
+*/
+
+#ifndef CBLIDSATELLITEVIEW_H
+#define CBLIDSATELLITEVIEW_H
+
+// INCLUDES
+#include "CBlidBaseView.h"
+#include "CBlidLocSettingLauncher.h"
+
+// FORWARD DECLARATIONS
+class CBlidSatelliteControl;
+class CAlfEnv;
+class CAlfControlGroup;
+
+// CLASS DECLARATION
+
+/**
+*  CBlidSatelliteView view class.
+*
+*/
+class CBlidSatelliteView : public CBlidBaseView
+    {
+    public: // Constructors and destructor
+        /**
+         * C++ default constructor.
+         * @param aKeyProcessor 
+         * @return Created CBlidSatelliteView object
+         */
+        static CBlidSatelliteView* NewLC( MKeyProcessor& aKeyProcessor,CAlfEnv& aEnv );
+
+        /**
+         * Destructor.
+         */
+        ~CBlidSatelliteView();
+        
+        /**
+         * Control Getter
+         */
+        CBlidSatelliteControl* GetControl();
+
+    private: // constructor
+        /**
+         * C++ constructor
+         * @param aKeyProcessor
+         */
+        CBlidSatelliteView( MKeyProcessor& aKeyProcessor,CAlfEnv& aEnv );
+
+        /**
+         * By default Symbian 2nd phase constructor is private.
+         */
+        void ConstructL();
+
+    public: // From MKeyProcessor
+		TBool ProcessKeyEventL( const TKeyEvent& aKeyEvent,
+                                TEventCode aType );
+
+    public: // CAknView
+        TUid Id() const;
+        void HandleCommandL(TInt aCommand);
+        void HandleResourceChangeL( TInt aType );
+
+		#ifdef RD_SCALABLE_UI_V2
+		void HandleListBoxSelectionL();
+		#endif //RD_SCALABLE_UI_V2
+		
+    public: //From MBlidEngObserver
+        void NotifyL( const TBool aOnlineMode );
+        void NotifyErrorL( TInt aErrorCode );
+		            
+
+    private: //From CAknView
+        void DoActivateL(const TVwsViewId& aPrevViewId,TUid aCustomMessageId,
+            const TDesC8& aCustomMessage);
+        void DoDeactivate();
+    
+    private: // Data
+		//own:navigationcontrol class
+		CBlidSatelliteControl*  iMainSatelliteCtrl;
+		
+		CAlfEnv& iEnv;
+
+		CAlfControlGroup* iMainSatelliteCtrlGroup;
+    };
+
+#endif // CBLIDSATELLITEVIEW_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/basiclocationinfodisplay/blid/ui/inc/CBlidSavedWayptsContainer.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,139 @@
+/*
+* 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:  Blid application main view's container class definition.
+*
+*/
+
+
+
+#ifndef BLIDSAVEDWAYPTSCONTAINER_H
+#define BLIDSAVEDWAYPTSCONTAINER_H
+
+// INCLUDES
+#include "CBlidBaseContainer.h"
+#include "CBlidBaseView.h"
+#include "coecobs.h"
+
+
+// FORWARD DECLARATIONS
+class CAknSingleGraphicStyleListBox;
+class CEikColumnListBox;
+class MBlidLocation;
+class MBlidSettings;
+class MBlidRouter;
+// CLASS DECLARATION
+
+/**
+*  CBlidMainContainer  container control class.
+*
+*/
+class CBlidSavedWayptsContainer : public CBlidBaseContainer
+    {
+    public: // Constructors and destructor
+        /**
+         * Two-phased constructor
+		 * @param aKeyProcessor
+		 * @param aParent
+		 * @param aRect A rectangle for drawing.
+         * @param aLocation A pointer to Location model
+         * @param aSettings A pointer to Settings model
+		 * @return The newly created object.
+		 */
+		static CBlidSavedWayptsContainer* NewL( MKeyProcessor& aKeyProcessor,
+                                        MObjectProvider* aParent,
+		                                const TRect& aRect,
+                                        MBlidLocation* aLocation,
+                                        MBlidSettings* aSettings,
+                                        MBlidRouter* aRouter,
+                                        CBlidBaseView& aView);
+        /**
+         * Destructor.
+         */
+        ~CBlidSavedWayptsContainer();
+
+    private:
+        /**
+         * By default Symbian 2nd phase constructor is private.
+         * @param aRect Frame rectangle for container.
+         * @param aLocation A pointer to Location model
+         * @param aSettings A pointer to Settings model
+         */
+        void ConstructL( const TRect& aRect, 
+                        MBlidLocation* aLocation,
+                        MBlidSettings* aSettings,MBlidRouter* aRouter );
+
+        /**
+         * C++ default constructor.
+         * @param aKeyProcessor
+         */
+        CBlidSavedWayptsContainer( MKeyProcessor& aKeyProcessor, CBlidBaseView& aView );
+
+    public: // New functions
+        /**
+         * Update listbox
+         */ 
+        void UpdateL();
+        
+        #ifdef RD_SCALABLE_UI_V2 
+       /**
+        * Sets listbox observer.
+        * @param aObserver observer object.
+        */
+        void SetListBoxObserver( MEikListBoxObserver* aObserver );
+        #endif // RD_SCALABLE_UI_V2         
+
+    public: // from CCoeControl
+        TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent,
+                                     TEventCode aType);
+        void HandleMarkCommandL(TInt aCommand);
+        TInt SelectedRow() const;
+        void FocusChanged(TDrawNow aDrawNow);
+
+    private: // From CCoeControl
+        void SizeChanged();
+        TInt CountComponentControls() const;
+        CCoeControl* ComponentControl(TInt aIndex) const;
+        void HandleResourceChange(TInt aType);
+        void UpdateIconsL();
+        
+        void SetSelectedRow(TInt aIndex) const;
+        void MakeEmptyTextListBoxL( TInt aResourceText );
+        
+    private: // New functions
+        /**
+         * Creates owned list box.
+         * @param aLocation A pointer to Location model
+         * @param aSettings a pointer to Settings model
+         */
+        void CreateListboxL( MBlidLocation* aLocation, 
+                             MBlidSettings* aSettings,MBlidRouter* aRouter );
+        
+        
+    private: //data
+    
+        /// Own: Decorator class for navigation pane controls.
+        CAknNavigationDecorator* iDecoratedTabGroup;
+        
+        CBlidBaseView& iView;
+
+    public:
+            /// Own: List box.
+        CAknSingleGraphicStyleListBox* iListBox;
+
+        
+    };
+
+#endif
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/basiclocationinfodisplay/blid/ui/inc/CBlidSavedWayptsLBModel.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,200 @@
+/*
+* 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:  Provides SavedWayptsView's details
+*
+*/
+
+#ifndef CBLIDSAVEDWAYPTSLBMODEL_H
+#define CBLIDSAVEDWAYPTSLBMODEL_H
+
+// INCLUDES
+#include <e32base.h>    // CBase
+#include <bamdesca.h>  // MDesCArray
+
+// FORWARD DECLARATIONS
+class MBlidLocation;
+class MBlidSettings;
+class MBlidRouter;
+class TPosition;
+class TCourse;
+// CLASS DECLARATION
+
+/**
+*  CBlidSavedWayptsLBModel
+*
+*/
+class CBlidSavedWayptsLBModel : public CBase, public MDesCArray
+    {
+    public: // Constructors and destructor
+
+        /**
+         * Two-phased constructor.
+         * @param aLocationModel A pointer to Location model
+         * @param aSettingsModel A pointer to Blid settings API
+         * @return CBlidEng object.
+         */
+		static CBlidSavedWayptsLBModel* NewLC( MBlidLocation* aLocationModel,
+                                          MBlidSettings* aSettings,MBlidRouter* aRouter );
+
+        /**
+         * Destructor.
+         */
+        ~CBlidSavedWayptsLBModel();
+
+    private: //
+        /**
+         * Second phase of construction.
+         */
+        void ConstructL();
+
+        /**
+         * c++ default constructor.
+         * @param aLocationModel A pointer to Location model
+         * @param aSettingsModel A pointer to Blid settings API
+         */
+        CBlidSavedWayptsLBModel( MBlidLocation* aLocationModel,
+                            MBlidSettings* aSettings,MBlidRouter* aRouter );
+
+    private: // From MDesCArray
+        TInt MdcaCount() const;
+        TPtrC16 MdcaPoint(TInt aIndex) const;
+
+    private: //new functions
+        /**
+         * Format latitude string
+         * @param aLatitudeString
+         * @param aPosition
+         */
+        void LatitudeFormat( TDes& aLatitudeString,
+                             TPosition aPosition ) const;
+
+        /**
+         * Format longitude string
+         * @param aLongitudeString
+         * @param aPosition
+         */
+        void LongitudeFormat( TDes& aLongitudeString,
+                              TPosition aPosition  ) const;
+
+        /**
+         * Format accuracy string
+         * @param aAccuracyString
+         * @param aPosition
+         */
+        void AccuracyFormat( TDes& aAccuracyString,
+                             TPosition aPosition ) const;
+
+        /**
+         * Format speed string
+         * @param aSpeedString
+         * @param aCourse
+         */
+        void SpeedFormat( TDes& aSpeedString,
+                          TCourse aCourse ) const;
+
+        /**
+         * Format altitude string
+         * @param aAltitudeString
+         * @param aPosition
+         */
+        void AltitudeFormat( TDes& aAltitudeString,
+                             TPosition aPosition  ) const;
+        /**
+         * Format Altitude accuracy string
+         * @param aAccuracyString
+         * @param aPosition
+         */
+
+        void altAccuracyFormat( TDes& aAltAccuracyString ) const;
+
+    private: //data
+        /// Own: conversion buffer
+        HBufC* iBuffer;
+
+        // Own: No Data indicator
+        HBufC* iNoData;
+
+        // Own: connect GPS indicator
+        HBufC* iConnectGPS;
+
+        /// Ref: Blid location model API
+        MBlidLocation* iLocationModel;
+
+        /// Ref: Blid settings model API
+        MBlidSettings* iSettingsModel;
+
+        /// Own: Latitude's title text string
+        HBufC* iBlidLatitude;
+
+        /// Own: Longitude's title text string
+        HBufC* iBlidLongitude;
+
+        /// Own: Accuracy's title text string
+        HBufC* iBlidAccuracy;
+
+        /// Own: Heading's title text string
+        HBufC* iBlidAltAccuracy;
+
+        /// Own: Speed's title text string
+        HBufC* iBlidSpeed;
+
+        /// Own: Altitude's title text string
+        HBufC* iBlidAltitude;
+        
+        /// Own: Latitude's format text string
+        HBufC* iLatitudeFormatNorth;
+
+        /// Own: Latitude's format text string
+        HBufC* iLatitudeFormatSouth;
+
+        /// Own: Longitude's format text string
+        HBufC* iLongitudeFormatWest;
+
+        /// Own: Longitude's format text string
+        HBufC* iLongitudeFormatEast;
+
+        /// Own: Metric accuracy's format text string
+        HBufC* iAccuraryFormatM;
+
+        /// Own: Imperial accuracy's format text string
+        HBufC* iAccuraryFormatFt;
+
+        /// Own: Metric speed's format text string
+        HBufC* iSpeedFormatKmph;
+
+        /// Own: Imperial speed's format text string
+        HBufC* iSpeedFormatMph;
+
+        /// Own: Metric altitude's format text string
+        HBufC* iAltitudeFormatM;
+
+        /// Own: Imperial altitude's format text string
+        HBufC* iAltitudeFormatFt;
+
+        /// Own: Heading's format text string
+        HBufC* iAltAccuracyFormat;
+
+        /// Own: Heading's format text string
+        HBufC* iDataBeingCalculated;
+
+        /// Own: A Pointer to TLocale
+        TLocale* iLocale;
+
+        ///Pointer to router model
+        MBlidRouter* iRouter;
+    };
+
+#endif // CBLIDSAVEDWAYPTSLBMODEL_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/basiclocationinfodisplay/blid/ui/inc/CBlidSavedWayptsView.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,101 @@
+/*
+* 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:  Declares main view for Blid application.
+*
+*/
+
+#ifndef BLIDSAVEDWAYPTSVIEW_H
+#define BLIDSAVEDWAYPTSVIEW_H
+
+// INCLUDES
+#include "CBlidBaseView.h"
+#include "MBlidRouter.h"
+
+// FORWARD DECLARATIONS
+class CBlidSavedWayptsContainer;
+class MBlidSettings;
+
+
+// CLASS DECLARATION
+
+/**
+*  CBlidSavedWayptsView view class.
+*
+*/
+class CBlidSavedWayptsView : public CBlidBaseView
+    {
+    public: // Constructors and destructor
+
+        /**
+         * C++ default constructor.
+         * @param aKeyProcessor A pointer to MKeyProcessor
+         * @return Created view object
+         */
+        static CBlidSavedWayptsView* NewLC( MKeyProcessor& aKeyProcessor );
+
+        /**
+         * Destructor.
+         */
+        ~CBlidSavedWayptsView();
+
+    private: // constructor
+        /**
+         * C++ constructor
+         * @param aKeyProcessor A pointer  to MKeyProcessor
+         */
+        CBlidSavedWayptsView( MKeyProcessor& aKeyProcessor );
+
+        /**
+         * By default Symbian 2nd phase constructor is private.
+         */
+        void ConstructL();
+
+    public: //From MBlidEngObserver
+        void NotifyL( const TBool aOnlineMode );
+        //From CBlidBaseView
+        void DynInitMenuPaneL(TInt aResourceId, CEikMenuPane* aMenuPane);
+        void HandleWaypointsDeletionL();
+
+    public: // From CAknView
+        TUid Id() const;
+        void HandleCommandL(TInt aCommand);
+
+    #ifdef RD_SCALABLE_UI_V2
+    private:
+       /**
+        * From CBlidBaseView.
+        */
+        void HandleListBoxSelectionL();
+    #endif // RD_SCALABLE_UI_V2
+            
+    private: // From CAknView
+        void DoActivateL(const TVwsViewId& aPrevViewId,TUid aCustomMessageId,
+            const TDesC8& aCustomMessage);
+        void DoDeactivate();
+        TBool RenameWaypointL();
+        TBool DeleteWaypointL(TInt aIndex);
+        TBool DeleteWaypointsL(const CArrayFix<TInt>& aIndexes);
+
+    private: // Data
+        /// Own: A pointer to container 
+        CBlidSavedWayptsContainer* iContainer;
+    
+        /// Not owned: A pointer to settings model
+        MBlidSettings* iSettings;
+        
+        TVwsViewId iPreviousViewid;
+        
+    };
+
+#endif // End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/basiclocationinfodisplay/blid/ui/inc/CBlidSettingsContainer.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,113 @@
+/*
+* 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:  Blid application settings view's container
+*                class definition.
+*
+*/
+
+#ifndef BLIDSETTINGSCONTAINER_H
+#define BLIDSETTINGSCONTAINER_H
+
+// INCLUDES
+#include "CBlidBaseContainer.h"
+#include "CBlidBaseView.h"
+
+// FORWARD DECLARATIONS
+class CAknNavigationDecorator;
+class CAknSettingStyleListBox;
+class CBlidSettingsView;
+class MBlidSettings;
+class CBlidEng;
+// CLASS DECLARATION
+
+/**
+*  CBlidSettingsContainer  container control class.
+*
+*/
+class CBlidSettingsContainer : public CBlidBaseContainer
+    {
+    public: // Constructors and destructor
+
+        /**
+         * Two-phased constructor
+         * @param aKeyProcessor A pointer to MKeyProcessor
+         * @param aParent A pointer to MObjectProvider
+         * @param aRect A rectangle for drawing.
+         * @param aSettingsModel A pointer to Settings model
+         * @return The newly created object.
+         */
+        static CBlidSettingsContainer* NewL( MKeyProcessor& aKeyProcessor,
+                                        MObjectProvider* aParent,
+                                        const TRect& aRect,
+                                        MBlidSettings* aSettingsModel,
+                                        CBlidBaseView& aView);
+
+        /**
+         * Destructor.
+         */
+        ~CBlidSettingsContainer();
+
+    private:
+        /**
+         * By default Symbian 2nd phase constructor is private.
+         * @param aRect Frame rectangle for container.
+         * @param aLocSettingsModel A pointer to settings model
+         */
+        void ConstructL(const TRect& aRect, MBlidSettings* aSettingsModel);
+
+        /**
+         * C++ default constructor.
+         * @param aKeyProcessor A pointer to MKeyProcessor
+         */
+        CBlidSettingsContainer( MKeyProcessor& aKeyProcessor, CBlidBaseView& aView );
+    
+    public: // from CoeControl
+        void FocusChanged(TDrawNow aDrawNow);
+		TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent,
+		                             TEventCode aType);        
+
+    public: // new functions
+       /**
+        * Returns the iListBox.
+        * @return A pointer to settings listbox
+        */
+        CAknSettingStyleListBox* ListBox() const;
+         
+        #ifdef RD_SCALABLE_UI_V2 
+       /**
+        * Sets listbox observer.
+        * @param aObserver observer object.
+        */
+        void SetListBoxObserver( MEikListBoxObserver* aObserver );
+        #endif // RD_SCALABLE_UI_V2          
+
+    private: // From CCoeControl
+        void SizeChanged();
+        TInt CountComponentControls() const;
+        CCoeControl* ComponentControl(TInt aIndex) const;
+        void HandleResourceChange(TInt aType);
+
+    private: //data
+        /// Own: Decorator class for navigation pane controls.
+        CAknNavigationDecorator* iDecoratedTabGroup;
+
+        /// Own: listbox
+        CAknSettingStyleListBox* iListBox;
+        
+        CBlidBaseView& iView;
+    };
+
+#endif //BLIDSETTINGSCONTAINER_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/basiclocationinfodisplay/blid/ui/inc/CBlidSettingsLBModel.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,121 @@
+/*
+* 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:  Provides Blid request detail view listbox model.
+*
+*/
+
+#ifndef CBLIDSETTINGSLBMODEL_H
+#define CBLIDSETTINGSLBMODEL_H
+
+// INCLUDES
+#include <e32base.h>    // CBase
+#include <bamdesca.h>  // MDesCArray
+
+
+// FORWARD DECLARATIONS
+class MBlidSettings;
+// CLASS DECLARATION
+
+/**
+*  CBlidSettingsLBModel
+*
+*/
+class CBlidSettingsLBModel : public CBase, public MDesCArray
+    {
+    public: // Constructors and destructor
+        /**
+         * Two-phased constructor.
+         * @param aSettingsModel A pointer to Blid settings API
+         * @return created object
+         */
+		static CBlidSettingsLBModel* NewLC( MBlidSettings* aSettingsModel);
+
+        /**
+         * Destructor.
+         */
+        ~CBlidSettingsLBModel();
+
+    private: 
+        /**
+         * Second phase of construction.
+         */
+        void ConstructL();
+
+        /**
+         * c++ default constructor.
+         * @param aSettingsModel A pointer to Blid settings API
+         */
+        CBlidSettingsLBModel( MBlidSettings* aSettingsModel );
+
+    private: // From MDesCArray
+        TInt MdcaCount() const;
+        TPtrC16 MdcaPoint(TInt aIndex) const;
+
+    private: // new functions
+        /**
+         * Format calibration string
+         * @param aCalibrationString contains the calibration value given by user
+         */
+        void CalibrationFormat( TDes& aCalibrationString ) const;
+
+        /**
+         * Format Backlight string
+         * @param aBacklightString Contains the selected option string
+         */
+        void BacklightFormat( TDes& aBacklightString ) const;
+        
+        void ArrivalToneFormat( TDes& aRrivalTone ) const;
+
+    private: //data
+        /// Own: conversion buffer
+        HBufC* iBuffer;
+
+        /// Ref: Blid settings model API
+        MBlidSettings* iSettingsModel;
+
+        /// Own: Latitude functionality text string
+        HBufC* iBlidAltitude;
+
+        /// Own: Altitude functionality text string
+        HBufC* iAltitudeFormatM;
+
+        /// Own: Altitude functionality text string
+        HBufC* iAltitudeFormatFt;
+
+        /// Own: A pointer to TLocale
+        TLocale* iLocale;
+        
+        /// Own: Settings view backlight text string
+        HBufC* iBlidBacklight;
+
+        /// Own: Settings view backlight selection normal text 
+	    HBufC* iBlidBacklightNormal;
+	
+    	/// Own: Settings view backlight selection On text 
+    	HBufC* iBlidBacklightOn;
+
+	    HBufC* iBlidArrivalTone;
+	
+    	HBufC* iBlidResetOdom;
+    	
+    	HBufC* iBlidArrivalToneOff;
+        
+        HBufC* iBlidArrivalToneName;
+        //Environment Variable
+        CEikonEnv* iEnv;
+    };
+
+#endif //CBLIDSETTINGSLBMODEL_H 
+// End of File
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/basiclocationinfodisplay/blid/ui/inc/CBlidSettingsView.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,134 @@
+/*
+* 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:  Blid application settings view class definition.
+*
+*/
+
+
+#ifndef BLIDSETTINGSVIEW_H
+#define BLIDSETTINGSVIEW_H
+
+// INCLUDES
+#include "CBlidBaseView.h"
+
+// FORWARD DECLARATIONS
+class CBlidSettingsContainer;
+class MBlidSettings;
+class CEikMenuPane;
+class CBlidEng;
+// CLASS DECLARATION
+
+/**
+*  CBlidSettingsView view class.
+*
+*/
+class CBlidSettingsView : public CBlidBaseView
+    {
+    public: // Constructors and destructor
+
+        /**
+         * Symbian default constructor.
+         * @param aKeyProcessor A pointer to MKeyProcessor
+         */
+        static CBlidSettingsView* NewLC( MKeyProcessor& aKeyProcessor );
+
+        /**
+         * Destructor.
+         */
+        ~CBlidSettingsView();
+
+    private:
+        /**
+         * C++ constructor
+         * @param aKeyProcessor A pointer to MKeyProcessor
+         */
+        CBlidSettingsView( MKeyProcessor& aKeyProcessor );
+
+        /**
+        * Symbian default constructor.
+        */
+        void ConstructL();
+
+    public: // from CAknView
+        TUid Id() const;
+        void HandleCommandL(TInt aCommand);
+
+    public:  // From MEikMenuObserver
+        void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane );
+
+    public: // From MLogsKeyProcessor
+        TBool ProcessKeyEventL( const TKeyEvent& aKeyEvent,
+                                TEventCode aType );
+
+    private: // From CAknView
+        void DoActivateL(const TVwsViewId& aPrevViewId,TUid aCustomMessageId,
+            const TDesC8& aCustomMessage);
+        void DoDeactivate();
+
+    #ifdef RD_SCALABLE_UI_V2
+    private:
+       /**
+        * From CBlidBaseView.
+        */
+        void HandleListBoxSelectionL();
+    #endif // RD_SCALABLE_UI_V2
+    
+    private: // new functions
+        /** 
+         * Change current altitude calibration
+         */
+        void ChangeAltitudeCalibrationL();
+
+        /** 
+         * Change Backlight settings Options
+         * 1.Normal
+         * 2.On During Navigation
+         */
+        void ChangeBacklightSettingsL();
+
+        /** 
+         * Change Backlight settings Options for Double tapping of stylus
+         * on the item
+         * 1.Normal
+         * 2.On During Navigation
+         */        
+        void ChangeBacklightSettingsValueL(TInt aValue);
+        
+        void CheckResetOdometerOptionL( );
+        
+        void OpenArrivalToneDialogL( );
+
+    private: // Data
+        /// Own: A pointer to container
+        CBlidSettingsContainer* iContainer;
+
+        /// Ref: A pointer to Settings model
+        MBlidSettings* iSettingsModel; 
+
+        /// Own: previous view's id
+        TInt iPrevViewId;
+
+        /// Own: A pointer to TLocale
+        TLocale* iLocale;
+        
+        // Own: Settings view backlight selection as Normal 
+	    HBufC* iBlidBacklightNormal;
+        
+        // Own: Settings view backlight selection as On During Navigation
+        HBufC* iBlidBacklightOn;
+    };
+
+#endif  // LOCSETTINGSVIEW_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/basiclocationinfodisplay/blid/ui/inc/CBlidTripMeterView.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,151 @@
+/*
+* Copyright (c) 2005-2008 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Declares main view for Blid application.
+*
+*/
+
+#ifndef BLIDTRIPMETERVIEW_H
+#define BLIDTRIPMETERVIEW_H
+
+// INCLUDES
+#include "CBlidBaseView.h"
+#include <eikmenub.h> // CEikMenuBar
+
+// FORWARD DECLARATIONS
+class CHtkTripMeterControl;
+class CBlidNoteDialog;
+class CAlfEnv;
+class CAlfControlGroup;
+class CBlidLocSettingsLauncher;
+class CAlfDisplay;
+
+// CLASS DECLARATION
+
+/**
+*  CBlidTripMeterView view class.
+*
+*/
+class CBlidTripMeterView : public CBlidBaseView
+    {
+    public: // Constructors and destructor
+        /**
+         * C++ default constructor.
+         * @param aKeyProcessor
+         * @return Created view object
+         */
+        static CBlidTripMeterView* NewLC( MKeyProcessor& aKeyProcessor,CAlfEnv& aEnv );
+
+        /**
+         * Destructor.
+         */
+        ~CBlidTripMeterView();
+
+    private: // constructor
+        /**
+         * C++ constructor
+         * @param aKeyProcessor
+         */
+        CBlidTripMeterView( MKeyProcessor& aKeyProcessor,CAlfEnv& aEnv );
+
+        /**
+         * By default Symbian 2nd phase constructor is private.
+         */
+        void ConstructL();
+
+    public: //from MBlidEngObserver
+    	/**
+         * From MBlidEngObserver, called when a position update is received.
+         * @param aOnlineMode
+         */
+        void NotifyL( const TBool aOnlineMode );
+        /**
+         * From MBlidEngObserver, called when there is an error in receiving position update
+         * @param aErrorCode 
+         */
+        void NotifyErrorL( TInt aErrorCode );
+
+    public: // from CAknView
+    	/**
+         * From CAknView, returns the view id
+         * @param None
+         */
+        TUid Id() const;
+        /**
+         * From CAknView, takes care of command handling.
+         * @param aCommand command to be handled
+         */
+        void HandleCommandL(TInt aCommand);
+        /**
+         * From CAknView, handles a change to the resources
+         * @param aType 
+         */
+        void HandleResourceChangeL( TInt aType );
+        
+    #ifdef RD_SCALABLE_UI_V2
+    private:
+       /**
+        * From CBlidBaseView.
+        */
+        void HandleListBoxSelectionL();
+    #endif // RD_SCALABLE_UI_V2
+    
+    private: // From CAknView
+    	/**
+         * From CAknView, called when view is activated
+         * @param aPrevViewId
+         * @param aCustomMessageId
+         * @param aCustomMessage
+         */
+        void DoActivateL(const TVwsViewId& aPrevViewId,TUid aCustomMessageId,
+            const TDesC8& aCustomMessage);
+        /**
+         * From CAknView, called when view is deactivated
+         * 
+         */    
+        void DoDeactivate();
+
+    public:  // From MEikMenuObserver
+    	/**
+         * From MEikMenuObserver, dynamically intializes the menu
+         * @param aResourceId
+         * @param aMenuPane
+         */
+        void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane );
+        
+	public:
+		/**
+         * Retruns the tripmeter control
+         * 
+         */
+		CHtkTripMeterControl* GetControl();        
+
+    private: // Data
+		//own:tripmetercontrol class
+		CHtkTripMeterControl*  iTripCtrl;
+		
+		CAlfEnv& iEnv;
+
+        CBlidNoteDialog* iNoteDialog;
+        
+        CAlfControlGroup* iTripCtrlGroup;
+        // Own: Pointer to Location Settings Launcher
+        CBlidLocSettingsLauncher* iLauncher;
+        
+        CAlfDisplay*		iCtrlDisplay;
+
+    };
+
+#endif
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/basiclocationinfodisplay/blid/ui/inc/CHtkNavigationControl.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,566 @@
+/*
+* Copyright (c) 2005-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:  Blid application compass view's compass control class definition.
+*
+*/
+
+
+
+#ifndef __CHTKNAVIGATIONCONTROL_H__
+#define __CHTKNAVIGATIONCONTROL_H__
+
+// SYSTEM INCLUDES
+#include <lbspositioninfo.h>
+#include <EPos_CPosLandmark.h>
+#include <alf/alfcontrol.h>
+
+//#ifdef RD_SCALABLE_UI_V2
+#include <barsread.h>
+#include <StringLoader.h>
+#include <aknstyluspopupmenu.h>
+//#endif // RD_SCALABLE_UI_V2
+
+// USER INCLUDE
+#include "CBlidBaseView.h"
+
+//FORWARD DCLERATION
+class MBlidLocation;
+class MBlidRouter;
+class MBlidEngObserver;
+class MBlidSettings;
+class CBlidEng;
+class CEikonEnv;
+class MKeyProcessor;
+class CAlfEnv;
+class CAlfImageVisual;
+class CAlfTextVisual;
+class CAlfBorderBrush;
+class CAlfAnchorLayout;
+class CAlfLayout;
+class CAlfCurvePath;
+class CAlfCurvePathLayout;
+class CAlfDeckLayout;
+class CAlfTextStyle;
+class CBlidArrivedTonePlayerUtility;
+class CAlfFrameBrush;
+class CAlfImageLoaderUtil;
+class CAlfTexture;
+
+const TInt KNumTexts = 3;
+
+/*! 
+  @class CHtkNavigationControl
+  
+  @discussion 
+  */
+class CHtkNavigationControl : public CAlfControl
+    {
+	public:
+		 /*!
+		  @function NewL
+		   
+		  @discussion Create a CHtkNavigationControl object, which will draw itself to aRect
+		  @param aRect the rectangle this view will be drawn to
+		  @result a pointer to the created instance of CHtkNavigationControl
+		  */
+		    static CHtkNavigationControl* NewL(CAlfEnv& aEnv,
+					                           MObjectProvider* aParent,
+							                   const TRect& aRect,
+					                           MBlidLocation& aLocation,
+					                           MBlidRouter& aRouter,
+					                           CBlidEng& aEngine,
+					                           CBlidBaseView& aView);
+
+		 /*!
+		  @function NewLC
+		   
+		  @discussion Create a CHtkNavigationControl object, which will draw itself to aRect
+		  @param aRect the rectangle this view will be drawn to
+		  @result a pointer to the created instance of CHtkNavigationControl
+		  */
+		    static CHtkNavigationControl* NewLC(CAlfEnv& aEnv,
+					                            MObjectProvider* aParent,
+							                    const TRect& aRect,
+					                            MBlidLocation& aLocation,
+					                            MBlidRouter& aRouter,
+					                            CBlidEng& aEngine,
+					                            CBlidBaseView& aView);
+
+
+		 /*!
+		  @function ~CHtkNavigationControl
+		  
+		  @discussion Destroy the object and release all memory objects
+		  */
+		     ~CHtkNavigationControl();
+
+	  
+	private:
+		 /*!
+		  @function CHtkNavigationControl
+		  
+		  @discussion Perform the first phase of two phase construction 
+		  */
+		    CHtkNavigationControl(CAlfEnv& aEnv,
+                                  MBlidLocation& aLocation,
+                                  CBlidBaseView& aView,
+                                  CBlidEng& aEngine );
+
+		 /*!
+		  @function ConstructL
+		  
+		  @discussion  Perform the second phase construction of a CHtkNavigationControl object
+		  */
+		    void ConstructL(CAlfEnv& aEnv,
+		                    const TRect& aRect,
+                            MBlidRouter& aRouter,
+                            CBlidEng& aEngine);
+
+	private:    
+        /** 
+         * Add new tabs to tabgroup
+         * @param aTabGroup
+         */
+        void AddTabsL(CAknTabGroup& aTabGroup);
+        
+        /**
+         * Appui's status pane getter
+         * @return Statuspane pointer
+         */
+        CEikStatusPane* StatusPane();
+        /**
+         * Creates navigation visuals
+         */
+        void CreateNavigationVisualsL( );
+        /**
+         * Creates navigation text visuals
+         */						     
+		void CreateNavigationTextVisualsL( CAlfTextStyle* aStyle1 );
+		/**
+         * Creates disstance visuals
+         */
+		void CreateDistanceVisualL( CAlfTextStyle* aStyle1 );
+		/**
+         * Play arrived tone
+         */
+		void PlayArrivedToneL();
+		/**
+         * Calculate if user has arrived to destination
+         */
+		void CalculateIfArrivedL();
+		/**
+         * Creates application strings
+         */
+		void CreateApplicationStringsL( );
+		/**
+         * Converts durtion into descriptor
+         */
+		void DurationFormat( TDes& aDurationString );
+		/**
+         * Converts distance unit into descriptor
+         */
+		void DistanceUnit( TDes& aUnitString );
+		/**
+         * Converts distance into descriptor
+         */
+		void DistanceFormat( TDes& aDistanceString );
+		/**
+         * Calculates durtion
+         */
+		void CalculateDurationL( TCourse aCourse );
+		/**
+         * Calculates distance
+         */
+		void CalculateDistanceL( TPosition aPosition );
+		/**
+         * Converts speed format into descriptor
+         */
+		void SpeedFormat( TDes& aSpeedString, TDes& aSpeedFormatString);
+		/**
+         * Creates speed visuals
+         */
+		void CreateSpeedVisualL( CAlfTextStyle* aStyle1 );
+		/**
+         * Prepares for dynamic move
+         */
+		void PrepareDynamicMoveL( );
+		/**
+         * Sets the landmark name
+         */                             
+		void SetLandMarksNameL();
+		/**
+         * Displays the current signal strength
+         */
+		void DisplaySatelliteSignalStrength( TInt aSatCount );
+		/**
+         * Creates textures for signal images
+         */
+		void CreateSignalTexturesL();
+		/**
+         * Create popup image texture
+         */
+		void CreatePopupImgTextureL();
+		/**
+         * Creates accuracy ring texture
+         */
+		void CreateAccTextureL();
+
+       /*
+        * This function checks wheather
+        * distance to destination is less than 10 meter
+        * and return ETrue or EFalse depends upon the condition.
+        */        
+        TBool IsInArrivedZone();
+		/**
+         * Creates indicator visual
+         */      
+        void CreateIndicatorVisualL();
+        /**
+         * Launches device not available note
+         */
+        void LaunchDeviceNotAvlNoteL();
+        /**
+         * Launches infor query dialog
+         */
+        void LaunchInfoQueryDlgL();
+		/**
+         * Creates animation
+         */
+        void CreateAnimationL();
+        /**
+         * Creates popup visuals
+         */
+        void CreatePopUpVisualL();
+        /**
+         * Updates visual image when timer is expired
+         */
+        void UpdateVisualImage();
+        /**
+         * Called when timer is expired
+         */
+        static TInt Tick(TAny* aObject); // functions for TCallBack protocol
+        /**
+         * Launches stylus activated popup
+         */
+        void LaunchStylusPopupMenuL( TPointerEvent aPointerEvent );
+        /**
+         * Calculate the Layout Rects
+         */
+        void CalculateRects();
+        /**
+         * Set Anchors for Visuals
+         */
+        void SetAnchors();
+        
+	public:	    //from CAlfControl
+		/**
+         * Handles the key events
+         */
+		TBool OfferEventL( const TAlfEvent& aEvent );
+		/**
+         * Notify about control visibility
+         */
+		void NotifyControlVisibility( TBool aIsVisible, 
+		       						  CAlfDisplay& aDisplay );
+					
+		
+	public:
+        /**
+         * Update controls
+         */ 
+        void UpdateL();
+        /**
+         * Clears the navigation info
+         */
+        void ClearNavigationInfoL();
+		/**
+         * Set update option
+         */
+		void SetUpdateOptionL( TBool aIsDestSet );        
+		/**
+         * Draw curves
+         */
+		void DrawCurvesL( );
+		/**
+         * Sets the flag visual
+         */
+		void SetFlagVisualL();
+		/**
+         * Sets the accuracy visual
+         */
+		void SetAccRacyVisualL();
+
+        /**
+         * Create CAknNavigationDecorator, ownership passed to caller.
+         * @param aDefaultNaviPane, ETrue if default, EFalse if tabgroup
+         * @return new instance of object. NULL, if something fails
+         */
+        void CreateNaviPaneL( TBool aDefaultNaviPane );
+
+
+        /**
+         * Activate navigation decorator.
+         * Method can called if tab needs to be refreshed.
+         * @param aNaviDecorator    navigation decorator
+         * @param aTabId            activated tabulator id             
+         */
+        void ActivateTabL( CAknNavigationDecorator& aNaviDecorator, 
+                            TInt aTabId );
+		/**
+         * Retruns the navi decorator
+         */
+		CAknNavigationDecorator* GetNiviDecorator( );
+		/**
+         * Change the flag visual image when reaching destination
+         */
+        void ChangeFlagVisualImageL();
+        /**
+         * Check if user has arrived to the destination
+         */
+        TBool HasArrivedDestination();        
+        /**
+         * Make title
+         * @param aResourceText resource to create title
+         */
+        void MakeTitleL( TInt aResourceText );
+        /**
+         * Stop the arrrival tone player
+         */
+        void StopPlayerL(  ); 
+        /**
+         * Update the layout
+         */
+        void UpdateLayoutL();
+        /**
+         * Displays the info popup msg
+         */
+        void DisplayInfoPopUpMsgL();
+        
+	private:
+		
+        /// Ref: A reference to MBlidLocation model
+        MBlidLocation& iLocationModel;
+
+        /// Ref: A pointer to MBlidRouter model
+        MBlidRouter* iRouter;
+
+        /// Reference to the view to handle resource change
+        CBlidBaseView& iView;
+        
+        /// Reference to the engine
+        CBlidEng& iEngine;
+
+        /// Own: Decorator class for navigation pane controls.
+        CAknNavigationDecorator* iDecoratedTabGroup;        
+        
+		//Own: Layout for all the visuals.
+		CAlfAnchorLayout* iLayout;
+
+		//Own: Text visuals. 
+		CAlfTextVisual* iLabel;
+		
+		//Own: Text visuals. 
+		CAlfTextVisual* iDistanceLabel;
+
+		//Own: Text visuals. 
+		CAlfTextVisual* iSpeedLabel;
+
+		//Own: Text visuals. 
+		CAlfTextVisual* iSpeedFormatLabel;
+
+		CAlfEnv& iEnv;
+		
+		CAlfImageVisual* iImageVisual;
+		
+        TInt iIndex;
+        
+        /// Own: Position information 
+        TPosition iPositionInfo;
+
+        /// Own: Course information
+        TCourse iCourse;
+        
+        /// Ref: A pointer to MBlidSettings model
+        MBlidSettings* iSettings;        
+        
+        // To determine if user has arrived to destination
+        static TBool iHasArrived;
+        
+        //variable to check wheather user arrived to destination
+        TBool iTimeFirstArrived;
+        
+        //Boolean to determine whether the arrived tone has palyed/not         
+        static TBool       iHasToPlayArrivedTone;
+
+        /// Own: Metric distance functionality text string 
+        HBufC* iDistanceFormatKm;
+
+        /// Own: Metric distance functionality text string 
+        HBufC* iDistanceFormatM;
+
+        /// Own: Imperial distance functionality text string 
+        HBufC* iDistanceFormatMiles;
+
+        /// Own: Imperial distance functionality text string 
+        HBufC* iDistanceFormatFt;
+
+        /// Own: Duration functionality text string 
+        HBufC* iDurationFormatLong;
+
+        /// Distance variable
+        TReal32 iDistance;
+
+        /// Duration variable
+        TTime iDuration;
+
+        /// Duration in days
+        TInt iDurationInDays;
+
+        /// Duration in seconds
+        TReal64 iDurationInSeconds;
+
+        /// Own: Speed's title text string
+        HBufC* iBlidSpeed;
+        
+        /// Speed variable
+        TReal iSpeed;
+
+        /// Is speed data available
+        TBool iIsSpeed;
+
+        /// Own: Metric speed's format text string
+        HBufC* iSpeedFormatKmph;
+
+        /// Own: Imperial speed's format text string
+        HBufC* iSpeedFormatMph;
+
+        // Own: No Data indicator
+        HBufC* iDataBeingCalculated;
+
+       // Own: No Data indicator
+        HBufC* iDataBlank;
+        
+		
+		TBool iIsDestinationSet;
+		
+		CAlfCurvePath* iCurvePath;		
+		
+		CAlfCurvePathLayout* iCurveLayout;
+		
+		HBufC8* iFlagText;
+		HBufC8* iAccText;
+		
+		CAlfImageVisual*  iFlagVisual;
+		
+		CAlfImageVisual*  iAccVisual;		
+		
+		CAlfImageVisual*  iNorthVisual;
+		
+		CAlfDeckLayout*  idecLayout;
+		
+		CAlfDeckLayout*  iNdecLayout;
+		
+		TReal iHeading;
+		
+		TRect iAccuracyRingRect;
+		
+		TPoint* iCharPoint;
+		
+		CAlfDeckLayout* iAccLayout;
+		
+        CPeriodic* iTimer;
+        
+        TInt iIsFirstDistance;
+        TReal32 iFirstDistance;
+    	HBufC*	iImagePath;
+    	TSize iCurveSize;
+    	TSize iFlagSize;
+    	TSize iAccuracyringcurveSize;   
+        
+        CAlfDeckLayout* iCurveDecLyt;
+        
+        CAlfAnchorLayout* iIndiAccAnchor;
+        
+        CAlfImageVisual* iIndicatorVisual;
+        
+        CAlfDeckLayout* iFlagdeck;
+        
+        CAlfDeckLayout* iActualNdeck;
+		
+		CBlidArrivedTonePlayerUtility* iToneUtility;
+		
+		TBool isStopUpdate;
+		
+		CAlfAnchorLayout* iPopUpLayout;
+		
+		CAlfTextVisual* iPopUpMsg;
+		
+		CAlfImageVisual* iPopImage;
+		
+		TBool isSatelliteInfoLaunch;
+		
+		CAlfDeckLayout* iPopupDeck;
+		
+		CAlfFrameBrush* iFrameBrush;
+		
+		CAlfAnchorLayout* iPopUpAnchor;
+
+		TRgb	iVisualColor;
+		
+		TBool iMskInfoVisible;
+		
+		CAlfImageVisual* iNavigationRing;
+
+	    CPeriodic* iPeriodic; // periodic timer active object
+        TInt iDisplayIcon;    // Current svg animation icon
+	    RPointerArray<CAlfTexture> iTextures;
+	    RPointerArray<CAlfTexture> iPopupTextures;
+	    RPointerArray<CAlfTexture> iSignalTextures;
+	    CAlfTexture* iAccTexture;
+	    CAlfTexture* iPopupImgTexture;
+				
+		MAlfBitmapProvider* iProvider;
+		
+		TRect iSignalStrengthRect;
+		
+		TRect iLmkNameRect;
+		
+		TRect iDistanceRect;
+		
+		TRect iSpeedBgRect;
+		
+		TRect iSpeedRect;
+		
+		TRect iSpdFormatRect;
+		
+		TRect iNavRingBgRect;
+		
+		TRect iAccRingRect;
+		
+		TRect iDirectionIndRect;
+		
+		TRect iNorthRect;
+
+		TRect iFlagRect;
+
+		CAknStylusPopUpMenu* iMenu;
+		
+		TBool isDeviceUnavailableDisplayed;
+    public:        
+        TBool iTimerComplete;
+        static TBool       iInArrivedZone;
+        TBool iIsDownPressed;
+    };
+
+#endif // __CHTKNAVIGATIONCONTROL_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/basiclocationinfodisplay/blid/ui/inc/CHtkTripMeterControl.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,436 @@
+/*
+* Copyright (c) 2007-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:  Blid application Tripmeter view's control class definition.
+*
+*/
+
+
+
+#ifndef __CHTKTRIPMETERCONTROL_H__
+#define __CHTKTRIPMETERCONTROL_H__
+
+// SYSTEM INCLUDES
+#include <alf/alfcontrol.h>
+
+// USER INCLUDE
+
+//FORWARD DCLERATION
+class MBlidLocation;
+class MBlidRouter;
+class MBlidSettings;
+class MKeyProcessor;
+class CAlfEnv;
+class CBlidEng;
+class CAknNavigationDecorator;
+class CAknTabGroup;
+class CEikStatusPane;
+class CBlidBaseView;
+class CAlfImageVisual;
+class CAlfTextVisual;
+class CAlfAnchorLayout;
+class CAlfDeckLayout;
+class CAlfCurvePathLayout;
+class CRepository;
+class CAlfTextStyle;
+class CAlfFrameBrush;
+class CAlfImageLoaderUtil;
+class CAlfTexture;
+
+/*! 
+  @class CHtkTripMeterControl
+  
+  @discussion HUITK-based control that displays the text "Hello World".
+  */
+class CHtkTripMeterControl : public CAlfControl
+    {
+	public:
+		 /*!
+		  @function NewL
+		   
+		  @discussion Create a CHtkTripMeterControl object, which will draw itself to aRect
+		  @param aRect the rectangle this view will be drawn to
+		  @result a pointer to the created instance of CHtkTripMeterControl
+		  */
+	    static CHtkTripMeterControl* NewL(CAlfEnv& aEnv,
+		    							MKeyProcessor& aKeyProcessor,
+                                        MObjectProvider* aParent,
+		                                const TRect& aRect,
+                                        MBlidLocation* aLocation,
+                                        MBlidRouter* aRouter,
+                                        CBlidEng& aEngine,
+                                        CBlidBaseView& aView);
+
+		 /*!
+		  @function ~CHtkTripMeterControl
+		  
+		  @discussion Destroy the object and release all memory objects
+		  */
+		~CHtkTripMeterControl();
+
+	  
+	private:
+		 /*!
+		  @function CHtkTripMeterControl
+		  
+		  @discussion Perform the first phase of two phase construction 
+		  */
+	    CHtkTripMeterControl(CAlfEnv& aEnv,
+	    					MKeyProcessor& aKeyProcessor,
+                            MBlidRouter& aRouter,
+                            CBlidBaseView& aView,
+                            CBlidEng& aEngine );
+
+		 /*!
+		  @function ConstructL
+		  
+		  @discussion  Perform the second phase construction of a CHtkTripMeterControl object
+		  */
+		void ConstructL(CAlfEnv& aEnv,
+						const TRect& aRect,
+                        MBlidLocation* aLocation,
+                        CBlidEng& aEngine );
+                        
+                        
+	public:	    //from CAlfControl
+		/**
+         * Handle key event
+         */
+		TBool OfferEventL( const TAlfEvent& aEvent );
+		/**
+         * Process command
+         */	
+		void ProcessCommandL(TInt aCommand);
+		
+    public: // New functions
+        /**
+         * Update the display, called whenever a position update is received
+         */
+        void UpdateL();
+        
+    public: 
+    	/**
+         * Retruns ETrue if trip is started
+         */
+	    TBool HasTripStarted();
+	    /**
+         * Checks if GPS Data was lost
+         */
+	    TBool WasGPSDataLost();
+	    /**
+         * Sets GPS Data availability
+         */
+	    void SetGPSDataAvailability(TBool aAvailability);
+
+        /**
+         * Make title
+         * @param aResourceText resource to create title
+         */
+        void MakeTitleL( TInt aResourceText );
+		
+		/**
+         * Returns Navigation decorator
+         */
+		CAknNavigationDecorator* GetNiviDecorator( );
+
+        /**
+         * Create CAknNavigationDecorator, ownership passed to caller.
+         * @param aDefaultNaviPane, ETrue if default, EFalse if tabgroup
+         */
+        void CreateNaviPaneL( TBool aDefaultNaviPane );
+
+        /**
+         * Activate navigation decorator.
+         * Method can called if tab needs to be refreshed.
+         * @param aNaviDecorator    navigation decorator
+         * @param aTabId            activated tabulator id             
+         */
+        void ActivateTabL( CAknNavigationDecorator& aNaviDecorator, 
+                            TInt aTabId );
+		/**
+         * Saves the odometer value
+         */
+		void SaveOdometerValue();
+		/**
+         * Reset Odometer Distance
+         */
+		void ResetOdometerDistanceL( );
+		/**
+         * Change trip focus
+         */
+		void ChangeTripFocus( TBool aSTripDimmed );
+		/**
+         * Rechange trip focus
+         */
+		void ReChangeTripFocus( );
+		/**
+         * Update layout
+         */
+		void UpdateLayoutL( );
+		/**
+         * Displays info popup
+         */
+		void DisplayInfoPopUpMsgL();
+		
+	private:    
+        /** 
+         * Add new tabs to tabgroup
+         * @param aTabGroup
+         */
+        void AddTabsL(CAknTabGroup& aTabGroup);
+        
+        /**
+         * Appui's status pane getter
+         * @return Statuspane pointer
+         */
+        CEikStatusPane* StatusPane();
+        /**
+         * Creates the trip visuals
+         */
+        void CreateTripVisualsL( );
+		/**
+         * Returns tripmeter value as descriptor
+         */
+		void TripmeterFormatL( TDes& aTripmeterString );
+		/**
+         * Returns total trip time as descriptor
+         */
+		void TotalTimeFormat( TDes& aTotalTimeString );
+		/**
+         * Returns odometer value as descriptor
+         */
+		void OdometerFormat( TDes& aOdometerString );
+		/**
+         * Returns current trip time as descriptor
+         */
+		void TripTimeFormat( TDes& aTripTimeString );
+		/**
+         * Set the value of tripmeter
+         */
+		void SetTRipMeterValueL( );
+		/**
+         * Set the value of odometer
+         */
+		void SetOdoMeterValueL( );
+		/**
+         * Set the trip time
+         */
+		void SetTripTimeL( );
+		/**
+         * Set the trip speed
+         */
+		void SetTripSpeed( );
+		/**
+         * Create speed visuals
+         */
+		void CreateSpeedVisualsL();
+		/**
+         * Rotates the speed dial
+         */
+		void RotateSpeedDialL( int aThetaPrevious, int aThetaFinal );
+		/**
+         * Ceates the speeed format
+         */
+		void CreateSpeedFormatsL();
+		/**
+         * Change the speedmeter scale
+         */
+		void ChangeSpeedometerScaleL();
+		/**
+         * Formats the odometer distance
+         */
+		void FormatOdometerDistance( TReal aLastodometerValue );
+		/**
+         * Launches device not available note
+         */
+		void LaunchDeviceNotAvlNoteL();
+		/**
+         * Displays the current signal strength
+         */
+		void DisplaySatelliteSignalStrength( TInt aSatCount );
+		/**
+         * Launches info query dialog
+         */
+		void LaunchInfoQueryDlgL();		
+		/**
+         * Update visual image
+         */
+        void UpdateVisualImage();
+        /**
+         * Create Popup visuals
+         */
+        void CreatePopUpVisualL();
+        /**
+         * Create all signal textures
+         */
+		void CreateSignalTexturesL();
+		/**
+         * Create popup image tesxture
+         */
+		void CreatePopupImgTextureL();		 
+        /**
+         * Called when timer is expired
+         */
+        static TInt Tick(TAny* aObject); // functions for TCallBack protocol
+        /**
+         * Calculate the Layout Rects
+         */
+        void CalculateRects();
+        /**
+         * Set Anchors for Visuals
+         */
+        void SetAnchors();
+	private:
+        /// Ref: aRouter
+        MBlidRouter& iRouter;
+        
+        MBlidLocation* iLocation;
+
+        /// Own: Decorator class for navigation pane controls.
+        CAknNavigationDecorator* iDecoratedTabGroup;        
+
+        /// Reference to the view to handle resource change
+        CBlidBaseView& iView;
+        
+        /// Reference to the engine
+        CBlidEng& iEngine;
+                
+		//Own: Layout for all the visuals.
+		CAlfAnchorLayout* iTripLayout;
+		
+		CAlfEnv& iEnv;
+		
+		CAlfImageVisual* iTripDeckVisual;
+		CAlfImageVisual* iOdoDeckVisual;
+		CAlfImageVisual* iBigTripVisual;
+		CAlfDeckLayout* iTripDistLayout;
+		CAlfDeckLayout* iOdoLayout;
+		CAlfImageVisual* iTripDialVisual;
+		CAlfImageVisual* iTripTimeVisual;
+		//CAlfDeckLayout* iTripTimeLayout;
+		CAlfDeckLayout* iBigTripDecLayout;
+    	/// Ref: A pointer to MBlidSettings model
+        MBlidSettings* iSettingsModel;
+        
+        HBufC* iDurationFormatLong;
+        
+        HBufC* iSpeedFormatKmph;
+        
+        HBufC* iSpeedFormatMph;
+        
+        HBufC* iDataBlank;
+        
+        HBufC* iTripDistance;
+        
+        HBufC* iOdometerDistance;
+        
+		//CAlfCurvePathLayout* iSpeedCurve;
+		//CAlfDeckLayout* iMileLayout;
+		CAlfTextVisual* iMileVisual[9];
+		TInt iSpeedCount;
+		TReal32 iPrevSpeed;
+		TInt iMaxScale;
+		TInt iPrevAngle;
+		TInt iNextAngle;
+		
+		CAlfAnchorLayout* iPointerLayout;
+		
+		CAlfTextVisual* iTripMeter;
+		
+		CAlfTextVisual* iOdoMeter;
+		
+		CAlfTextVisual* iTriptime;
+		
+		CAlfTextVisual* iSpeedFormatVisual;
+		
+		TReal32 iCurrSpeed;
+		
+		TBool iIsLessThanInitial;
+		
+		CRepository* iRepository;
+		
+		TReal iLastodometerValue;
+		
+		TReal iOdoValueToStore;
+		
+		CAlfTextStyle* iStyle1;
+		
+		CAlfAnchorLayout* iPopUpLayout;
+		
+		CAlfTextVisual* iPopUpMsg;
+		
+		CAlfImageVisual* iPopImage;
+		
+		TBool isSatelliteInfoLaunch;
+		
+		CAlfDeckLayout* iPopupDeck;
+		
+		CAlfFrameBrush* iFrameBrush;
+		
+		CAlfImageVisual* iImageVisual;
+		
+	    CPeriodic* iPeriodic; // periodic timer active object
+        TInt iDisplayIcon;    // Current svg animation icon
+	    RPointerArray<CAlfTexture> iPopupTextures;
+	    RPointerArray<CAlfTexture> iSignalTextures;
+	    CAlfTexture* iPopupImgTexture;	    	    
+		
+		HBufC*	iImagePath;
+		
+		TBool iSTripDimmed;
+		
+		CAlfAnchorLayout* iPopUpAnchor;
+		
+		TRect iBigTripRect;
+		
+		TRect iTripDialRect;
+		
+		TRect iTripDeckRect;
+		
+		TRect iTripMeterRect;
+		
+		TRect iOdoDeckRect;
+		
+		TRect iOdoMeterRect;
+		
+		TRect iSpeedFormatRect;
+		
+		TRect iTripTimeRect;
+		
+		TRect iClockImageRect;
+		
+		TRect iValueRect1;
+		
+		TRect iValueRect2;
+		
+		TRect iValueRect3;
+		
+		TRect iValueRect4;
+		
+		TRect iValueRect5;
+		
+		TRect iValueRect6;
+		
+		TRect iValueRect7;
+		
+		TRect iValueRect8;
+		
+		TRect iValueRect9;		
+		
+		TRect iSignalStrengthRect;												
+		
+		TBool isDeviceUnavailableDisplayed;											
+		TBool iIsDownPressed;										;
+    };
+
+#endif // __CHTKTRIPMETERCONTROL_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/basiclocationinfodisplay/blid/ui/inc/Debug.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,34 @@
+/*
+* 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:  Debug contains debug macros.
+*
+*/
+
+
+#ifndef DEBUG_H
+#define DEBUG_H
+// INCLUDES
+#include <e32std.h>
+
+// MACROS
+//#ifdef _DEBUG
+#define DEBUG(TEXT) Debug( _L(#TEXT) );
+#define DEBUG1(TEXT, ARG1) Debug( _L(#TEXT), (ARG1) );
+#define DEBUG2(TEXT, ARG1, ARG2) Debug( _L(#TEXT), (ARG1), (ARG2) );
+#define DEBUG3(TEXT, ARG1, ARG2, ARG3) Debug( _L(#TEXT), (ARG1), (ARG2), (ARG3) );
+
+void Debug( TRefByValue<const TDesC> aText, ...);
+//#endif
+
+#endif /* DEBUG_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/basiclocationinfodisplay/blid/ui/inc/FileSystemInfo.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,84 @@
+/*
+* 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: Declaration of CFileSystemInfo class which is convenience class that is able to provide application private path information1
+*
+*/
+
+
+ 
+#ifndef FILE_SYSTEM_INFO_H
+#define FILE_SYSTEM_INFO_H
+
+// INCLUDES
+#include <e32base.h>
+
+// CLASS DECLARATION
+
+/**
+* CFileSystemInfo is a convenience class that is able to provide
+* application private path information.
+*/
+class CFileSystemInfo : public CBase
+    {
+    public:
+    	/**
+	     * Constructs new instance of CFileSystemInfo class.
+	     * 
+	     * @return Pointer to a new CFileSystemInfo object.
+	     * @leave KErrNotFound If multimediamenu application is not installed.
+	     */
+	    static CFileSystemInfo* NewL(const TUid & aApplicationUid);
+
+	    /**
+	     * Constructs new instance of CFileSystemInfo class and leaves it in the cleanup stack.
+	     * 
+	     * @return Pointer to a new CFileSystemInfo object.
+	     * @leave KErrNotFound If multimediamenu application is not installed.
+	     */    
+	    static CFileSystemInfo* NewLC(const TUid & aApplicationUid);
+
+	    /**
+	     * Default destructor.
+	     */
+	    virtual ~CFileSystemInfo();
+	               	
+		/**
+		 * Returns the application private path. The returned path will have a trailing backslash.
+		 */
+		TFileName PrivatePath() const;
+	               	
+   	private:
+
+	    /**
+	    * Default constructor
+	    */
+	    CFileSystemInfo();
+			
+	    /**
+	     * Second phase constructor.
+	     * 
+	     * @leave KErrNotFound If multimediamenu application is not installed.
+	     */
+	    void ConstructL(const TUid & aApplicationUid);
+   	
+   	private:
+   	
+   		/** Current private path */
+   		TFileName iPrivatePath;
+   		   	
+    };
+    
+#endif // FILE_SYSTEM_INFO_H
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/basiclocationinfodisplay/blid/ui/inc/MKeyProcessor.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,62 @@
+/*
+* 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: 
+*     Interface which allows subscribers to consume key event or pass the event
+*     to other view class.
+*       
+*
+*/
+
+
+#ifndef MKEYPROCESSOR_H
+#define MKEYPROCESSOR_H
+
+// INCLUDES
+#include <w32std.h>
+
+// FORWARD DECLARATIONS
+class MAknTabObserver;
+
+// ===========================================================================
+// MKeyProcessor
+// ===========================================================================
+
+/**
+*	An interface a CCoeControl class can implement to forward the keyevents 
+*   before the actual control gets the key events. This is useful in 
+*   situations where the control consumes keys which you need.
+*/
+class MKeyProcessor
+    {
+    public:
+    /**
+     * process the keyevent befor it reaches the control
+     * @param aKeyEvent the event fired
+     * @param aType the type of event
+     * @return ETrue if key event was consumed, otherwise EFalse
+     */
+    virtual TBool ProcessKeyEventL( const TKeyEvent& aKeyEvent,
+                                    TEventCode aType ) = 0;
+
+	/**
+     * returns the pointer to MAknTabObserver interface
+     * @return pointer to the MAknTabObserver interface
+     */
+    virtual MAknTabObserver* TabObserver() = 0;
+    };
+
+            
+#endif //MKEYPROCESSOR_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/basiclocationinfodisplay/blid/ui/inc/bliduiconsts.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,125 @@
+/*
+* 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 common constants
+*
+*/
+
+
+#ifndef __BLID_BLIDCONSTS_H__
+#define __BLID_BLIDCONSTS_H__
+
+#include <data_caging_path_literals.hrh>
+
+// CONSTANTS
+
+// These own literals are used because platform's literals are insufficient:
+_LIT( KBlidSystemMbmPath, "\\resource\\apps\\" ); // KDC_APP_BITMAP_DIR
+// Filename of bitmaps
+_LIT( KBlidBitmapFileName, "Blid.mbm" );
+
+// Blid UI's constants
+const TInt KZeroResourceId(0);
+
+const TUint KAsterixKey( 42 );
+const TUint KNegativeSignKey( 45 );
+
+// listbox strings lenght
+const TInt KBlidLBItemMaxLen( 50 );
+const TInt KBlidLBLineMaxLen( 100 );
+
+// CStreamDictionary ID
+const TUid KBlidUI = { 0x101F85A0 };
+
+//distance converters
+const TReal KMetreToFoot( 3.280839895013123 );
+const TReal KKilometreToMiles( 0.6213711922373338 );
+
+// size of arrays
+const TInt KNumberOfTriangePoints( 3 );
+const TInt KNumberOfSquarePoints( 4 );
+const TInt KNumberOfCardinalPoints( 4 );
+
+// Compass's consts
+const TInt KRadiusOfCircle( 47 );
+const TInt KRightAngle( 90 );
+const TReal KDivisor( 2.0 );
+const TInt KSquared( 2 );
+const TInt KRound( 1 );
+
+// dataControl's consts
+const TInt KDayToSeconds( 86400 );
+const TInt KHourToSeconds( 3600 );
+const TInt KMinuteToSeconds( 60 );
+const TInt KDecimals3( 3 );
+const TInt KMaxDestinationDist(10);
+const TInt KMaxPostiontAccuracy(50);
+
+// compassControl's consts
+const TInt KBlidDirectionPaneWidth( 16 );
+const TInt KBlidDirectionPaneHeight( 16 );
+const TInt KBlidDirPaneCenterWidth( 8 );
+const TInt KBlidDirPaneCenterHeight( 8 );
+
+const TInt KAccuracyLevel1( 1000 );
+const TInt KAccuracyLevel2( 500 );
+const TInt KAccuracyLevel3( 250 );
+const TInt KAccuracyLevel4( 100 );
+const TInt KAccuracyLevel5( 50 );
+const TInt KAccuracyLevel6( 10 );
+const TInt KAccuracyLevel7( 0 );
+
+const TInt KKilometerToMeters( 1000 );
+const TInt KMileToFeets( 5280 );
+const TInt KDayToHours( 24 );
+const TReal KSpeedConvertion( 3.6 ); // m/s => km/h
+const TInt KBlidPoorAccuracy(200); // Poor Landmark accuracy of 200m
+
+//////////////////////////////////////////
+// Blid engine's constants
+//////////////////////////////////////////
+const TInt KIntervalTime( 3000000 ); //3s
+const TInt KTimeOutRate( 5 );
+const TInt KMinArrivalTime(30000000); // Minumum time untill which arrived note to be displayed
+
+const TInt KNotesTimeOut( 30000000 ); //30 seconds
+
+//Coordinate Editors contants
+const TInt KMaxLongitude(180);
+
+const TInt KBlidTripSpeedTimeOut(10); //10 seconds
+
+// Identifier for the primary control group.
+const TInt KPrimaryTripGroup( 2 );
+
+// Identifier for the primary control group.
+const TInt KPrimaryGroup( 1 );
+
+// Identifier for the primary control group.
+const TInt KBlidMainGroup( 3 );
+
+// Identifier for the primary control group.
+const TInt KBlidMainSatelliteGroup( 4 );
+
+// Path to find the mbm file
+_LIT( KBlidSystemIconPath, ":\\resource\\apps\\blid.mif" );
+
+// Number of Icons in Flag Animation
+const TInt KNumOfFlagIcon = 5;
+const TInt KNumOfStartUpIcon = 8;
+const TInt KNumOfSearchIcon = 8;
+
+#endif // __BLID_BLIDCONSTS_H__
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/basiclocationinfodisplay/blid/ui/inc/cblidnotedialog.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,68 @@
+/*
+* 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:  execute the note dialog.
+*
+*/
+
+
+#ifndef CBLIDNOTEDIALOG_H
+#define CBLIDNOTEDIALOG_H
+
+//  INCLUDES
+#include <e32base.h>
+
+// CLASS DECLARATION
+
+/**
+* An active object that handles the note dialog execution
+*/
+
+class CBlidNoteDialog : public CActive
+    {
+    public:  // Constructors and destructor
+        /**
+         * Two-phased constructor.
+         */
+        static CBlidNoteDialog* NewL();
+
+        /**
+         * Destructor.
+         */
+        virtual ~CBlidNoteDialog();
+        
+    private:
+        /**
+         * C++ default constructor.
+         */
+        CBlidNoteDialog();
+
+        /**
+         * By default Symbian 2nd phase constructor is private.
+         */
+        void ConstructL();  
+
+    private: // From CActive
+        void RunL();
+        void DoCancel();
+    
+    public:
+        void ExecuteNoteDialog();   
+
+    private:
+        TBool iIsNoteDisplayed;             
+   
+    };
+
+
+#endif  //CBLIDNOTEDIALOGOBJECT_H
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/basiclocationinfodisplay/blid/ui/src/BlidNotes.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,176 @@
+/*
+* 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:  Provides blid note class methods.
+*
+*/
+
+
+// INCLUDE FILES
+#include <StringLoader.h>
+#include <aknnotewrappers.h> 
+#include <blid.rsg>
+#include <aknstaticnotedialog.h> 
+#include "BlidNotes.h"
+#include "blidcommonconsts.h"
+
+TBool BlidNotes::iNoteDisplayed = EFalse;
+TBool BlidNotes::iGPSUnavailableDisplayed = EFalse;
+CEikonEnv* BlidNotes::iEnv = CEikonEnv::Static();
+
+// ================= MEMBER FUNCTIONS =======================
+//-----------------------------------------------------------------------
+// BlidNotes::OverWriteWaypointNoteL
+// ----------------------------------------------------------------------------
+//
+void BlidNotes::OverWriteWaypointNoteL()
+    {
+    HBufC* noteText = StringLoader::LoadL( R_BLID_ERROR_MAX_WAYPOINTS, 
+                                           KMaxNumberOfWaypoints,
+                                           iEnv );
+    CleanupStack::PushL(noteText);
+    CAknInformationNote* dialog = 
+        new(ELeave)CAknInformationNote( R_AKN_INFORMATION_NOTE_WAIT );
+    dialog->ExecuteLD( *noteText );
+
+    CleanupStack::PopAndDestroy(noteText); //noteText
+    }
+    
+//-----------------------------------------------------------------------
+// BlidNotes::OutOfMemoryNoteL
+// ----------------------------------------------------------------------------
+//
+void BlidNotes::OutOfMemoryNoteL()
+	{
+    HBufC* noteText = StringLoader::LoadL( R_MEMLO_NOT_ENOUGH_MEMORY, iEnv );
+    CleanupStack::PushL(noteText);    
+    CAknErrorNote* dialog = 
+        new(ELeave)CAknErrorNote(ETrue);    
+    dialog->SetTone(CAknNoteDialog::EErrorTone);
+    dialog->ExecuteLD( *noteText );
+    
+    CleanupStack::PopAndDestroy(noteText); //noteText	
+	}
+
+//-----------------------------------------------------------------------
+// BlidNotes::EmptyLandmarkNoteL
+// ----------------------------------------------------------------------------
+//
+void BlidNotes::EmptyLandmarkNoteL(const TDesC& landmarkName)
+	{
+    HBufC* noteText = StringLoader::LoadL( R_BLID_EMPTY_LANDMARK_DESTINATION, 
+                                           landmarkName,
+                                           iEnv );
+    CleanupStack::PushL(noteText);
+    CAknInformationNote* dialog = 
+        new(ELeave)CAknInformationNote( R_AKN_INFORMATION_NOTE_WAIT );
+    dialog->ExecuteLD( *noteText );
+
+    CleanupStack::PopAndDestroy(noteText); //noteText
+	}
+
+//-----------------------------------------------------------------------
+// BlidNotes::PoorGPSDataNoteL
+//-----------------------------------------------------------------------
+//
+void BlidNotes::PoorGPSDataNoteL()
+    {
+    HBufC* noteText = StringLoader::LoadLC( R_BLID_GPS_TIMEOUT_NOTE, iEnv );
+
+    CAknInformationNote* dialog = 
+        new(ELeave)CAknInformationNote( R_AKN_INFORMATION_NOTE_WAIT );
+    dialog->ExecuteLD( *noteText );
+
+    CleanupStack::PopAndDestroy(noteText); //noteText
+    }
+    
+//-----------------------------------------------------------------------
+// BlidNotes::NoPsyConnectedNoteL
+//-----------------------------------------------------------------------
+//
+void BlidNotes::NoPsyConnectedNoteL()
+    {
+    HBufC* noteText = StringLoader::LoadLC( R_BLID_ERROR_NO_PSY, iEnv );
+
+    CAknInformationNote* dialog = 
+        new(ELeave)CAknInformationNote( R_AKN_INFORMATION_NOTE_WAIT );
+    dialog->ExecuteLD( *noteText );
+
+    CleanupStack::PopAndDestroy(noteText); //noteText
+    }
+    
+//-----------------------------------------------------------------------
+// BlidNotes::SearchingGPSDataNoteL
+//-----------------------------------------------------------------------
+//
+void BlidNotes::SearchingGPSDDataNoteL()
+    {
+    HBufC* noteText = StringLoader::LoadLC( R_BLID_WAITNOTE_SEARCHING_GPS_SATELLITES, iEnv );
+	   
+    CAknInformationNote* dialog = 
+        new(ELeave)CAknInformationNote( R_AKN_INFORMATION_NOTE_WAIT );
+    dialog->ExecuteLD( *noteText );    
+    CleanupStack::PopAndDestroy(noteText); //noteText
+    }
+
+//-----------------------------------------------------------------------
+// BlidNotes::GPDDataAvailableL
+//-----------------------------------------------------------------------
+//
+void BlidNotes::GPSDataAvailableL()
+    {
+    if(!iNoteDisplayed)
+        {
+        iNoteDisplayed = ETrue;
+        iGPSUnavailableDisplayed = ETrue;
+        HBufC* noteText = StringLoader::LoadLC( R_BLID_NOTE_GPS_DATA, iEnv );	   
+        CAknInformationNote* dialog = 
+        new(ELeave)CAknInformationNote( R_AKN_INFORMATION_NOTE_WAIT );
+        dialog->ExecuteLD( *noteText );    
+        CleanupStack::PopAndDestroy(noteText); //noteText        
+        }
+    }
+    
+//-----------------------------------------------------------------------
+// BlidNotes::GPSDeviceUnavailableNoteL
+//-----------------------------------------------------------------------
+//
+void BlidNotes::GPSDeviceUnavailableNoteL()
+    {
+    if(!iGPSUnavailableDisplayed)
+        {
+        iGPSUnavailableDisplayed = ETrue;
+        iNoteDisplayed = ETrue;
+        HBufC* noteText = StringLoader::LoadLC( R_BLID_ERROR_NO_GPS_DEVICE, iEnv );	   
+        CAknInformationNote* dialog = 
+        new(ELeave)CAknInformationNote( R_AKN_INFORMATION_NOTE_WAIT );
+        dialog->ExecuteLD( *noteText );    
+        CleanupStack::PopAndDestroy(noteText); //noteText        
+        }
+    }
+
+//-----------------------------------------------------------------------
+// BlidNotes::NoGPSDeviceL
+//-----------------------------------------------------------------------
+//
+void BlidNotes::NoGPSDeviceL()
+	{
+    iNoteDisplayed = ETrue;
+    HBufC* noteText = StringLoader::LoadLC( R_BLID_ERROR_NO_GPS_DEVICE, iEnv );	   
+    CAknInformationNote* dialog = 
+    new(ELeave)CAknInformationNote( R_AKN_INFORMATION_NOTE_WAIT );
+    dialog->ExecuteLD( *noteText );    
+    CleanupStack::PopAndDestroy(noteText); //noteText
+	}
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/basiclocationinfodisplay/blid/ui/src/Blidutils.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,273 @@
+/*
+* 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:  Provides blid utils class methods.
+*
+*/
+
+
+// INCLUDE FILES
+#include <StringLoader.h> 
+#include <e32math.h>
+#include <f32file.h>
+#include <eikenv.h>
+#include <aknViewAppUi.h>
+#include <apparc.h>
+#include <eikapp.h>
+#include "bliduiconsts.h"
+#include "Blidutils.h"
+
+//CONSTANTS
+_LIT( KTimeFormatString,":%02d%02d%02d." );
+_LIT( KDistanceFormatTReal1, "%.1f" );
+_LIT( KDistanceFormatInt, "%d" );
+
+
+// ================= MEMBER FUNCTIONS =======================
+// ----------------------------------------------------------------------------
+// BlidUtils::TRealToTInt
+// ----------------------------------------------------------------------------
+//
+TInt BlidUtils::TRealToTInt( const TReal aSrc, TInt& aResult )
+    {
+    TReal resultTReal(0);    
+    TInt error(0);
+
+    error = Math::Round( resultTReal, aSrc, 0 );
+    if ( error != KErrNone )
+    	{
+        aResult = 0;
+        return error;
+        }
+
+    TInt32 resultTInt(0);
+    error = Math::Int( resultTInt, resultTReal );  
+    if ( error != KErrNone )
+        {        
+        aResult = 0;
+        return error;
+        }    
+    aResult = resultTInt;
+    return error;
+    }
+
+// ----------------------------------------------------------------------------
+// BlidUtils::FormatStringToTime
+// ----------------------------------------------------------------------------
+//
+TInt BlidUtils::FormatStringToTime( TDes& aTimeString,
+                                        const TReal aSeconds )
+    {    
+    TInt tempInt(0);
+    TReal tempTReal(0);
+    TInt32 timeHours(0);
+    TInt32 timeMinutes(0);
+    TInt32 timeSeconds(0);
+    TInt error(0);
+    TInt seconds;
+
+    error = TRealToTInt( aSeconds, seconds );
+    if ( error != KErrNone )
+        {
+        aTimeString.Zero();
+        return error;
+        }
+    
+    if ( (seconds < KDayToSeconds) && (seconds >= 0)) // less than day
+        {
+        // calculate hours
+        error = Math::Int(timeHours,( seconds / KHourToSeconds ));    
+        if ( error != KErrNone )
+            {
+            aTimeString.Zero();
+            return error;
+            }
+
+        // calculate minutes
+        tempInt = seconds - (timeHours*KHourToSeconds);
+        error = Math::Int(timeMinutes, ( tempInt / KMinuteToSeconds ));
+        if ( error != KErrNone )
+            {
+            aTimeString.Zero();
+            return error;
+            }
+
+        // calculate seconds
+        error = Math::Mod( tempTReal, seconds, KMinuteToSeconds );
+        if ( error != KErrNone )
+            {
+            aTimeString.Zero();
+            return error;
+            }
+        
+        // convert TReal to TInt
+        error = Math::Int( timeSeconds, tempTReal );
+        if ( error != KErrNone )
+            {
+            aTimeString.Zero();
+            return error;
+            }
+
+        }
+    
+    aTimeString.Format( KTimeFormatString, 
+	                    timeHours, 
+	                    timeMinutes, 
+	                    timeSeconds );    
+    return error;
+    }
+
+// ----------------------------------------------------------------------------
+// BlidUtils::SecondsToDays
+// ----------------------------------------------------------------------------
+//
+TInt BlidUtils::SecondsToDays( const TReal aSrc, TInt& aResult )
+    {        
+    TInt error(0);
+    TInt seconds;
+    
+    error = TRealToTInt( aSrc, seconds );
+    if ( error != KErrNone )
+        {
+        aResult = 0;
+        return error;
+        }
+
+    TInt32 days(0);
+    error = Math::Int( days, (seconds / KDayToSeconds) );
+    if ( error != KErrNone )
+    	{
+        aResult = 0;
+        return error;
+        }
+    aResult = days;
+    return error;
+    }
+
+// ----------------------------------------------------------------------------
+// BlidUtils::DistanceFormat
+// ----------------------------------------------------------------------------
+//
+void BlidUtils::DistanceFormat( TDes& aDistanceString,
+                                const TReal aDistance,
+                                TBool aIstobeDecimal )
+    {
+    TReal distance( aDistance );
+    
+    if( aIstobeDecimal )
+	    {
+	    aDistanceString.Format( KDistanceFormatTReal1, distance );	
+	    }
+	else
+		{
+		aDistanceString.Format( KDistanceFormatInt, ( TInt )distance );	
+		}	    
+    }
+
+// ----------------------------------------------------------------------------
+// BlidUtils::GetBitmapFilenameL
+// ----------------------------------------------------------------------------
+//
+HBufC* BlidUtils::GetBitmapFilenameLC()
+    {
+    // Path and file name:
+    TFileName* file = new( ELeave ) TFileName;
+    CleanupStack::PushL( file );
+    file->Append( KBlidSystemMbmPath ); // always safe
+    file->Append( KBlidBitmapFileName ); // always safe   
+    
+    // Drive:    
+    TBuf<10> aApp;
+    CEikAppUi *appUi = (CEikAppUi *)(CEikonEnv::Static()->AppUi());
+    TFileName full = appUi->Application()->AppFullName();
+        
+    TParsePtr ptr(full); 
+    aApp.Copy(ptr.Drive()); 
+
+
+    // Add drive to path & file name:
+    TParse parse;
+    User::LeaveIfError( parse.Set( *file, &aApp, NULL ) );
+    CleanupStack::PopAndDestroy(); // file
+
+    return parse.FullName().AllocLC();
+    }
+    
+// ----------------------------------------------------------------------------
+// BlidUtils::FormatTimeToString
+// ----------------------------------------------------------------------------
+//
+TInt BlidUtils::FormatTimeToString( TDes& aTimeString,
+                                        const TReal aSeconds )
+    {    
+    TInt tempInt(0);
+    TReal tempTReal(0);
+    TInt32 timeHours(0);
+    TInt32 timeMinutes(0);
+    TInt32 timeSeconds(0);
+    TInt error(0);
+    TInt seconds;
+
+    error = TRealToTInt( aSeconds, seconds );
+    if ( error != KErrNone )
+        {
+        aTimeString.Zero();
+        return error;
+        }
+    
+    if (seconds >= 0) 
+        {
+        // calculate hours
+        error = Math::Int(timeHours,( seconds / KHourToSeconds ));    
+        if ( error != KErrNone )
+            {
+            aTimeString.Zero();
+            return error;
+            }
+
+        // calculate minutes
+        tempInt = seconds - (timeHours*KHourToSeconds);
+        error = Math::Int(timeMinutes, ( tempInt / KMinuteToSeconds ));
+        if ( error != KErrNone )
+            {
+            aTimeString.Zero();
+            return error;
+            }
+
+        // calculate seconds
+        error = Math::Mod( tempTReal, seconds, KMinuteToSeconds );
+        if ( error != KErrNone )
+            {
+            aTimeString.Zero();
+            return error;
+            }
+        
+        // convert TReal to TInt
+        error = Math::Int( timeSeconds, tempTReal );
+        if ( error != KErrNone )
+            {
+            aTimeString.Zero();
+            return error;
+            }
+
+        }
+    
+    aTimeString.Format( KTimeFormatString, 
+	                    timeHours, 
+	                    timeMinutes, 
+	                    timeSeconds );    
+    return error;
+    }
+
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/basiclocationinfodisplay/blid/ui/src/CBlidApp.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,59 @@
+/*
+* Copyright (c) 2005-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:  Provides Blid Application class methods.
+*
+*/
+
+
+// INCLUDE FILES
+#include <eikstart.h>
+#include "CBlidApp.h"
+#include "CBlidDocument.h"
+#include "BlidUID.h"
+
+// ================= MEMBER FUNCTIONS =======================
+
+// ---------------------------------------------------------
+// CBlidApp::AppDllUid()
+// Returns application UID
+// ---------------------------------------------------------
+//
+TUid CBlidApp::AppDllUid() const
+    {
+    return TUid::Uid(KBLIDUID3);
+    }
+   
+// ---------------------------------------------------------
+// CBlidApp::CreateDocumentL()
+// Creates CBlidDocument object
+// ---------------------------------------------------------
+//
+CApaDocument* CBlidApp::CreateDocumentL()
+    {
+    return CBlidDocument::NewL( *this );
+    }
+
+// ================= OTHER EXPORTED FUNCTIONS ==============
+
+LOCAL_C CApaApplication* NewApplication()
+    {
+    return new CBlidApp;
+    }
+
+GLDEF_C TInt E32Main()
+    {
+    return EikStart::RunApplication( NewApplication );
+    }
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/basiclocationinfodisplay/blid/ui/src/CBlidAppUi.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,434 @@
+/*
+* Copyright (c) 2005-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:  Provides Blid UI class methods.
+*
+*/
+
+
+// INCLUDE FILES
+#include <AknsUtils.h>
+#include <blid.rsg>
+#include <akncontext.h> 
+#include <hlplch.h>
+#include <StringLoader.h>
+#include <blid.mbg>
+#include <CSatelliteInfoUI.h>
+
+#include "CBlidAppUi.h"
+#include "Blid.hrh"
+#include "CBlidDocument.h"
+#include "CBlidMainView.h"
+#include "CBlidNavigationView.h"
+#include "CBlidTripMeterView.h"
+#include "CBlidSettingsView.h"
+#include "CBlidSavedWayptsView.h"
+#include "CBlidSatelliteView.h"
+#include "CBlidEng.h"
+#include "Blidutils.h"
+#include "CHtkNavigationControl.h"
+#include "CHtkTripMeterControl.h"
+#include "FileSystemInfo.h"
+#include "BlidUID.h"
+#include "CBlidSatelliteControl.h"
+
+#ifdef _DEBUG
+_LIT( KPanicMsg, "CBlidAppUi::TabChangedL");
+	
+enum TPanicCode
+    {
+    KBlidNullPointer = 1
+    };
+#endif
+    
+// ================= MEMBER FUNCTIONS =======================
+//
+// ----------------------------------------------------------
+// CBlidAppUi::ConstructL
+// Second phase construction
+// ----------------------------------------------------------
+//
+void CBlidAppUi::ConstructL()
+
+    {
+    RDebug::Print(_L("CBlidAppUi::ConstructL() called"));
+    
+    TLocale locale;    
+    locale.SetUnitsGeneral(EUnitsMetric);    
+    locale.Set();
+    
+
+    BaseConstructL( EAknEnableSkin | EAknEnableMSK | EAknSingleClickCompatible);
+    
+    //Code added for HTK tool kit support    
+    // Create the environment
+    iAlfEnv = CAlfEnv::NewL();
+    
+    // assign private path to the texture manager
+    CFileSystemInfo* fileSystemInfo = CFileSystemInfo::NewLC(TUid::Uid(KBLIDUID3));
+    TFileName path = fileSystemInfo->PrivatePath();    
+    CleanupStack::PopAndDestroy(fileSystemInfo);
+    
+    iAlfEnv->TextureManager().SetImagePathL( path );
+    
+    //End of addition.
+    iContextPane = ETrue;
+    iIsSatViewActive = EFalse;
+
+    CBlidBaseView* navigationView = CBlidNavigationView::NewLC( *this, *iAlfEnv ); 
+    AddViewL( navigationView );      // transfer ownership to CAknViewAppUi
+    CleanupStack::Pop( navigationView );    // navigationView 
+
+    CBlidBaseView* tripMeterView = CBlidTripMeterView::NewLC( *this, *iAlfEnv );
+    AddViewL( tripMeterView );
+    CleanupStack::Pop( tripMeterView ); // tripMeterView
+
+    CBlidBaseView* settingsView = CBlidSettingsView::NewLC(*this);
+    AddViewL( settingsView );
+    CleanupStack::Pop( settingsView ); // settingsView
+
+    CBlidBaseView* savedwayptsView = CBlidSavedWayptsView::NewLC(*this);
+    AddViewL( savedwayptsView );
+    CleanupStack::Pop( savedwayptsView ); // savedwayptsView
+
+    CBlidMainView* mainview = CBlidMainView::NewLC( *this, *iAlfEnv );
+    AddViewL( mainview );
+    CleanupStack::Pop( mainview ); // mainview
+
+    CBlidSatelliteView* mainSatview = CBlidSatelliteView::NewLC( *this, *iAlfEnv );
+    AddViewL( mainSatview );
+    CleanupStack::Pop( mainSatview ); // mainSatview
+
+    SetDefaultViewL( *mainview );
+    
+	//start requesting
+    CBlidEng* engine = BlidDocument()->Engine();
+
+	if( engine->LocationModel() )
+		{
+	    HBufC* srvName = StringLoader::LoadLC( 
+	                      R_BLID_SERVICE_RULE_NAME, iCoeEnv );
+
+	    engine->LocationModel()->InitialLocationRequestL( *srvName );
+	    CleanupStack::PopAndDestroy(srvName); //srvName
+	    engine->LocationModel()->StartRequesting();
+		}
+    }
+
+// ----------------------------------------------------
+// CBlidAppUi::~CBlidAppUi
+// Destructor
+// Frees reserved resources
+// ----------------------------------------------------
+//
+CBlidAppUi::~CBlidAppUi()
+    {
+    delete iAlfEnv;
+    }
+
+// ----------------------------------------------------
+// CBlidAppUi::LocDocument
+// Returns the Location document object.
+// ----------------------------------------------------
+//
+CBlidDocument* CBlidAppUi::BlidDocument() const
+    {
+    // Explicit cast: the document must always be of type CBlidDocument
+    return static_cast<CBlidDocument*>(Document());
+    }
+
+// ----------------------------------------------------
+// CBlidAppUi::ShowDialog
+// Displayes Overwrite waypoint note
+// ----------------------------------------------------
+//
+void CBlidAppUi::ShowDialogL( const BlidNotes::TBlidNotes /*aNoteId*/ )
+    {
+    BlidNotes::OverWriteWaypointNoteL();
+    }
+
+
+
+// ----------------------------------------------------
+// CBlidAppUi::SkinChange
+// Handle skin change
+// ----------------------------------------------------
+//
+void CBlidAppUi::SkinChange()
+    {
+    iContextPane = !iContextPane;
+    }
+
+// ----------------------------------------------------
+// CBlidAppUi::HandleCommandL
+// Handle options menu commands
+// ----------------------------------------------------
+//
+void CBlidAppUi::HandleCommandL(TInt aCommand)
+    {
+    switch ( aCommand )
+        {
+        case EAknCmdHelp:
+            {
+            HlpLauncher::LaunchHelpApplicationL(iCoeEnv->WsSession(), 
+            AppHelpContextL());            
+            break;
+            }
+        // these all are same: save & exit
+        case EAknSoftkeyBack:
+        case EAknSoftkeyExit:
+        case EEikCmdExit:
+            {
+			CBlidTripMeterView* view = static_cast<CBlidTripMeterView*>( View( TUid::Uid( EBlidTripMeterView ) ) );
+			if( view )
+				{
+				view->GetControl()->SaveOdometerValue();					
+				}
+			//////////////////////////////////////
+            RWsSession& ws = iCoeEnv->WsSession();
+            TApaTaskList taskList(ws);
+            TUid appUid = { KBLIDUID3 };
+            TApaTask task = taskList.FindApp( appUid );
+            if ( task.Exists() )
+                {
+                // stop any task runing for this application.
+                task.EndTask();
+                }
+			////////////////////////////////////////                
+            Exit();
+            break;
+            }
+        case EBlidCmdSettings:
+            {
+            ActivateLocalViewL( TUid::Uid(EBlidSettingsView) );
+            break;
+            }
+        case EBlidCmdSatelliteStatus:
+            {            
+            TRAPD( error, LaunchSatelliteInfoDlgL() );
+            if ( error != KErrNone )
+                {
+                // need to be NULL, before leave
+                iSatelliteInfo = NULL;
+                User::Leave( error );
+                }
+            break;
+            }
+        default:
+            break;
+        }
+    }
+
+// ----------------------------------------------------
+// CBlidAppUi::TabChangedL
+// Called when Tab is changed, activates appropriate view
+// ----------------------------------------------------
+//
+void CBlidAppUi::TabChangedL(TInt aIndex)
+    {
+    // Gets a subpane control by ID
+    CAknNavigationControlContainer* naviCtrlContainer =
+            static_cast<CAknNavigationControlContainer*>
+            ( StatusPane()->ControlL( TUid::Uid( EEikStatusPaneUidNavi ) ) );
+    __ASSERT_DEBUG( naviCtrlContainer, 
+        User::Panic(KPanicMsg, KBlidNullPointer) );
+
+    // Return topmost object from navigation pane's object stack.
+    CAknNavigationDecorator* decorator = naviCtrlContainer->Top();
+    __ASSERT_DEBUG( decorator && decorator->ControlType() == 
+        CAknNavigationDecorator::ETabGroup, 
+        User::Panic( KPanicMsg, KBlidNullPointer ) );
+
+    CAknTabGroup* tabGroup = 
+        static_cast< CAknTabGroup* > ( decorator->DecoratedControl() );
+    __ASSERT_DEBUG( tabGroup && aIndex >= 0 && aIndex < tabGroup->TabCount(),
+        User::Panic(KPanicMsg, KBlidNullPointer));
+    ActivateLocalViewL(TUid::Uid(tabGroup->TabIdFromIndex(aIndex)));
+    }
+
+// ----------------------------------------------------
+// CBlidAppUi::HandleForegroundEventL
+// Called whenever app goes to background or comes to foreground
+// ----------------------------------------------------
+//
+void CBlidAppUi::HandleForegroundEventL(TBool aForeground)
+    {
+    CAknAppUi::HandleForegroundEventL( aForeground );  
+    iForeground = aForeground;
+
+    CBlidEng* engine = BlidDocument()->Engine();
+    if (aForeground)
+        {
+        engine->SetAppMode(CBlidEng::EAppForeground);
+        if (engine->LocationModel())
+            {
+            if (engine->LocationModel()->GetRegisteredViewId()
+                    == EBlidNavigationView)
+                {
+                CBlidNavigationView* view =
+                        static_cast<CBlidNavigationView*> (View(TUid::Uid(
+                                EBlidNavigationView)));
+                view->GetControl()->UpdateL();
+                }
+            if (engine->LocationModel()->GetRegisteredViewId()
+                    == EBlidTripMeterView)
+                {
+                CBlidTripMeterView* view =
+                        static_cast<CBlidTripMeterView*> (View(TUid::Uid(
+                                EBlidTripMeterView)));
+                view->GetControl()->UpdateL();
+                }
+            if (engine->LocationModel()->GetRegisteredViewId()
+                    == EBlidMainSatelliteView)
+                {
+                CBlidSatelliteView* view = static_cast<CBlidSatelliteView*> (View(
+                        TUid::Uid(EBlidMainSatelliteView)));
+                view->GetControl()->UpdateL();
+                }
+            if (engine->LocationModel()->GetRegisteredViewId()
+                    == EBlidMainView)
+                {
+                CBlidMainView* view = static_cast<CBlidMainView*> (View(
+                        TUid::Uid(EBlidMainView)));
+                view->GetControl()->UpdateL();
+                }        
+            }
+        }
+    else
+        {
+        engine->SetAppMode(CBlidEng::EAppBackground);
+        engine->SetBackLightStateL(CBlidEng::EBlidBacklightNormal);
+        if (engine->LocationModel()->GetRegisteredViewId()
+                == EBlidNavigationView)
+            {
+            CBlidNavigationView* view =
+                    static_cast<CBlidNavigationView*> (View(TUid::Uid(
+                            EBlidNavigationView)));
+            view->GetControl()->StopPlayerL();
+            }
+        }
+
+    if (iSatelliteInfo)
+        {
+        iSatelliteInfo->HandleForegroundEventL( aForeground );
+        }
+    
+    }
+
+// ----------------------------------------------------
+// CBlidAppUi::ProcessKeyEventL
+// Process key event
+// ----------------------------------------------------
+//
+TBool CBlidAppUi::ProcessKeyEventL( const TKeyEvent& /*aKeyEvent*/,
+    TEventCode /*aType*/ )
+    {    
+    return EKeyWasNotConsumed; 
+    }
+
+// ----------------------------------------------------
+// CBlidAppUi::TabObserver
+// Retruns CBlidAppUi pointer, which is Tab observer
+// ----------------------------------------------------
+//
+MAknTabObserver* CBlidAppUi::TabObserver()
+    {
+    return this;
+    }
+
+// ----------------------------------------------------
+// CBlidAppUi::LaunchSatelliteInfoDlgL
+// Launches Satellite info dialog
+// ----------------------------------------------------
+//
+void CBlidAppUi::LaunchSatelliteInfoDlgL()
+    {
+    HBufC* srvName = StringLoader::LoadLC( 
+                              R_BLID_SERVICE_RULE_NAME, 
+                              iCoeEnv );                
+    iSatelliteInfo = CSatelliteInfoUI::NewL();
+    iSatelliteInfo->ExecuteLD( *srvName );
+    CleanupStack::PopAndDestroy(srvName); //srvName
+    iSatelliteInfo = NULL;
+    }
+
+// ----------------------------------------------------
+// CBlidAppUi::IsForeground
+// Checks if App is in foreground
+// ----------------------------------------------------
+//
+TBool CBlidAppUi::IsForeground()
+    {
+    return iForeground; 
+    }
+
+// ----------------------------------------------------
+// CBlidAppUi::HandleResourceChangeL
+// Handles a change to the resources
+// ----------------------------------------------------
+//
+void CBlidAppUi::HandleResourceChangeL( TInt aType )    
+	{
+	CAknAppUi::HandleResourceChangeL( aType );
+    CBlidEng* engine = BlidDocument()->Engine();
+
+	if( engine->LocationModel() )
+		{
+		CBlidNavigationView* NavView = static_cast<CBlidNavigationView*>(View(TUid::Uid(EBlidNavigationView)));
+    	NavView->HandleResourceChangeL( aType );
+
+		CBlidTripMeterView* TripView = static_cast<CBlidTripMeterView*>(View(TUid::Uid(EBlidTripMeterView)));
+		TripView->HandleResourceChangeL( aType );
+
+		CBlidMainView* MainView = static_cast<CBlidMainView*>(View(TUid::Uid(EBlidMainView)));
+	    MainView->HandleResourceChangeL( aType );
+
+		CBlidSatelliteView* SatView = static_cast<CBlidSatelliteView*>(View(TUid::Uid(EBlidMainSatelliteView)));
+		SatView->HandleResourceChangeL( aType );
+		}
+	}
+
+// ----------------------------------------------------
+// CBlidAppUi::SetSatelliteViewActive
+// Set satellite view active or inactive
+// ----------------------------------------------------
+//
+void CBlidAppUi::SetSatelliteViewActive( TBool aActive )    
+	{
+	iIsSatViewActive = aActive;
+	}
+
+// ----------------------------------------------------
+// CBlidAppUi::IsSatelliteViewActive
+// Check if Satellite view is active
+// ----------------------------------------------------
+//
+TBool CBlidAppUi::IsSatelliteViewActive( )
+	{
+	return iIsSatViewActive;	
+	}
+
+// ----------------------------------------------------
+// CBlidAppUi::ResetOdoMeterValueL
+// Resets the odometer value
+// ----------------------------------------------------
+//
+void CBlidAppUi::ResetOdoMeterValueL()
+	{
+	CBlidTripMeterView* view = static_cast<CBlidTripMeterView*>(View(TUid::Uid(EBlidTripMeterView)));
+	if( view )
+		{
+		view->GetControl()->ResetOdometerDistanceL();			
+		}
+	}
+// End of File  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/basiclocationinfodisplay/blid/ui/src/CBlidArrivedTonePayerUtility.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,156 @@
+/*
+* 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:  Blid application arrived tone player utility.
+*
+*/
+
+
+// SYSTEM INCLUDES
+
+// USER INCLUDES
+#include "CBlidArrivedTonePayerUtility.h"
+#include "bliduiconsts.h"
+#include "Debug.h"
+
+
+// ============================= LOCAL FUNCTIONS ===============================
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CBlidArrivedTonePlayerUtility::CBlidArrivedTonePlayerUtility
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+CBlidArrivedTonePlayerUtility::CBlidArrivedTonePlayerUtility( )
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CBlidArrivedTonePlayerUtility::ConstructL
+// Symbian 2nd phase constructor can leave.
+// -----------------------------------------------------------------------------
+//
+void CBlidArrivedTonePlayerUtility::ConstructL()
+    {
+    iAudioPlayer = CMdaAudioPlayerUtility::NewL(
+        *this,
+        EMdaPriorityNormal,
+        EMdaPriorityPreferenceTimeAndQuality );
+    }
+
+// -----------------------------------------------------------------------------
+// CBlidArrivedTonePlayerUtility::NewL
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+CBlidArrivedTonePlayerUtility* CBlidArrivedTonePlayerUtility::NewL( )
+    {
+    CBlidArrivedTonePlayerUtility* self = new( ELeave ) CBlidArrivedTonePlayerUtility( );
+    
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop();
+
+    return self;
+    }
+
+
+// ---------------------------------------------------------------------------
+// CBlidArrivedTonePlayerUtility::~CBlidArrivedTonePlayerUtility
+// Destructor
+// ---------------------------------------------------------------------------
+//
+CBlidArrivedTonePlayerUtility::~CBlidArrivedTonePlayerUtility()
+	{
+    if ( iAudioPlayer )
+        {
+        iAudioPlayer->Stop();
+        iAudioPlayer->Close();
+        }
+    delete iAudioPlayer;
+    iAudioPlayer = NULL;	
+	}
+  
+  
+// ---------------------------------------------------------
+// CBlidArrivedTonePlayerUtility::PlayToneL
+// Plays the appropriate tone
+// ---------------------------------------------------------
+//
+void CBlidArrivedTonePlayerUtility::PlayToneL( const TFileName& aFileName )
+    {
+    iFileName = aFileName;
+    CanclePayer();
+    iAudioPlayer->OpenFileL( aFileName );        
+    }
+
+// ---------------------------------------------------------------------------
+// From MMdaAudioPlayerCallback
+// Callback when an attempt to open and initialise an audio sample 
+// has completed.
+// ---------------------------------------------------------------------------
+//
+void CBlidArrivedTonePlayerUtility::MapcInitComplete(
+    TInt aError,
+    const TTimeIntervalMicroSeconds& aDuration )
+    {
+    if( aError == KErrNone )
+	    {
+	    iAudioDuration = aDuration;
+        if ( iAudioPlayer )        
+            {
+    	    iAudioPlayer->Play();	
+            }
+	    }
+	// Do nothing
+    }
+
+// ---------------------------------------------------------------------------
+// From MMdaAudioPlayerCallback
+// Callback when an attempt to playback an audio sample has completed.
+// ---------------------------------------------------------------------------
+//
+void CBlidArrivedTonePlayerUtility::MapcPlayComplete(
+    TInt aError )
+    {
+    if( aError == KErrNone )
+	    {
+	    TInt duration = I64INT( iAudioDuration.Int64() );
+        if( duration < KMinArrivalTime )
+	        {
+	        if ( iAudioPlayer )        
+	            {
+	            CanclePayer();
+	    	    TRAP_IGNORE( iAudioPlayer->OpenFileL( iFileName ) );	
+	            }
+	        }
+	    }
+    }
+
+// ---------------------------------------------------------------------------
+// CBlidArrivedTonePlayerUtility::CanclePayer().
+// ---------------------------------------------------------------------------
+//
+void CBlidArrivedTonePlayerUtility::CanclePayer()
+	{
+    if ( iAudioPlayer )
+        {
+        iAudioPlayer->Stop();
+        iAudioPlayer->Close();
+        }
+	}
+//End Of file
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/basiclocationinfodisplay/blid/ui/src/CBlidBaseContainer.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,328 @@
+/*
+* 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:  Provides Blid request container class methods.
+*
+*/
+
+
+// INCLUDE FILES
+#include <akncontext.h> 
+#include <aknnavide.h> 
+#include <eikspane.h> 
+#include <barsread.h> 
+#include <akntabgrp.h>
+#include <AknIconArray.h>
+#include <gulicon.h>
+#include <StringLoader.h> 
+#include <akntitle.h> 
+#include <eiklbx.h> 
+#include <avkon.hrh>
+#include <coehelp.h>
+#include <AknsUtils.h>
+#include <akntabgrp.h>
+#include <blid.mbg>
+#include "CBlidBaseContainer.h"
+#include "MKeyProcessor.h"
+#include "BlidUID.h"
+#include "bliduiconsts.h"
+#include "Blidutils.h"
+#include "Blid.hrh"
+#include "CBlidAppUi.h"
+
+TBool CBlidBaseContainer::iGPSAvailability = EFalse;
+// ================= MEMBER FUNCTIONS =======================
+// ----------------------------------------------------
+// CBlidBaseContainer::CBlidBaseContainer
+// First phase constructor, can not leave
+// ----------------------------------------------------
+//
+CBlidBaseContainer::CBlidBaseContainer(
+    MKeyProcessor& aKeyProcessor,
+    const TDesC& aHelpContext )
+    :iKeyProcessor(aKeyProcessor)
+    {
+    iContextName = aHelpContext;
+    }
+
+// ----------------------------------------------------
+// CBlidBaseContainer::~CBlidBaseContainer
+// Destructor, frees allocated resources
+// ----------------------------------------------------
+//
+CBlidBaseContainer::~CBlidBaseContainer()
+    {
+    }
+
+// ----------------------------------------------------
+// CBlidBaseContainer::ActivateTabL
+// Activates a tab specified bt tab id
+// ----------------------------------------------------
+//
+void CBlidBaseContainer::ActivateTabL( 
+                         CAknNavigationDecorator& aNaviDecorator,
+                         TInt aTabId )
+    {
+    CEikStatusPane* sp = iEikonEnv->AppUiFactory()->StatusPane();    
+    CAknNavigationControlContainer* naviPane =
+        static_cast<CAknNavigationControlContainer*>(
+        sp->ControlL(TUid::Uid(EEikStatusPaneUidNavi)));
+    CAknTabGroup* tabGroup = static_cast<CAknTabGroup*>( 
+        aNaviDecorator.DecoratedControl() );
+    tabGroup->SetActiveTabById( aTabId );
+    naviPane->PushL( aNaviDecorator );
+    }
+
+
+// ----------------------------------------------------
+// CBlidBaseContainer::GetHelpContext
+// Get the help context for the application
+// ----------------------------------------------------
+//
+void CBlidBaseContainer::GetHelpContext( TCoeHelpContext& aContext ) const
+    {
+    aContext.iContext = iContextName;
+    aContext.iMajor = TUid::Uid(KBLIDUID3);
+    }
+
+// ----------------------------------------------------
+// CBlidBaseContainer::OfferKeyEventL
+// Handles the key event
+// ----------------------------------------------------
+//
+TKeyResponse CBlidBaseContainer::OfferKeyEventL(
+                    const TKeyEvent& aKeyEvent,
+                    TEventCode aType)
+    {
+    CEikStatusPane* sp = StatusPane();
+    // Fetch pointer to the default navi pane control
+    CAknNavigationControlContainer* naviPane = 
+        static_cast<CAknNavigationControlContainer*>(sp->ControlL( 
+        TUid::Uid(EEikStatusPaneUidNavi)));
+    CAknNavigationDecorator* naviDecorator = naviPane->Top();
+
+    // Check if navigation pane controls exists, because decorator does 
+    // not exist in every cases. E.g. after contact fetch in "new rule" 
+    // command operation naviDecorator is null. 
+    if ( naviDecorator && naviDecorator->ControlType() == 
+        CAknNavigationDecorator::ETabGroup )
+        {
+        if ( naviDecorator->DecoratedControl()->OfferKeyEventL( 
+            aKeyEvent, aType ) == EKeyWasConsumed )
+            {
+            return EKeyWasConsumed;
+            }
+        }    
+
+    if ( iKeyProcessor.ProcessKeyEventL( aKeyEvent, aType ) == 
+        EKeyWasConsumed )
+        {
+        return EKeyWasConsumed;
+        }
+
+    for ( TInt i = 0; i < CountComponentControls(); i++ )
+        {
+        if ( ComponentControl(i)->OfferKeyEventL( aKeyEvent, aType ) == 
+            EKeyWasConsumed )
+            {
+            return EKeyWasConsumed;
+            }
+        }
+    
+    return EKeyWasNotConsumed;    
+    }
+
+// ----------------------------------------------------
+// CBlidBaseContainer::HandleResourceChange
+// Handles the change in app resource
+// ----------------------------------------------------
+//
+void CBlidBaseContainer::HandleResourceChange(TInt aType)
+    {
+    CCoeControl::HandleResourceChange(aType);
+    if( aType == KAknsMessageSkinChange )
+        {        
+        static_cast<CBlidAppUi*>(iCoeEnv->AppUi())->SkinChange();
+        }
+    }
+
+// ----------------------------------------------------
+// CBlidBaseContainer::CreateNaviPaneL
+// Creates the navigation pane
+// ----------------------------------------------------
+//
+CAknNavigationDecorator* CBlidBaseContainer::CreateNaviPaneL( 
+                                             TBool aDefaultNaviPane )
+    {    
+    CEikStatusPane* sp = StatusPane();
+    if( !sp )
+    	{
+    	User::Leave( KErrGeneral );
+    	}
+    // Fetch pointer to the default navi pane control
+    CAknNavigationControlContainer* naviPane = 
+        static_cast<CAknNavigationControlContainer*>(sp->ControlL( 
+        TUid::Uid(EEikStatusPaneUidNavi)));
+    if( !naviPane )
+    	{
+    	User::Leave( KErrGeneral );
+    	}
+    CAknNavigationDecorator* decorator = NULL;
+    if ( aDefaultNaviPane ) // dummy tab
+        {        
+        naviPane->PushDefaultL(EFalse);
+        }
+    else
+        {              
+        decorator = naviPane->CreateTabGroupL(iKeyProcessor.TabObserver());
+        decorator->SetControlType( CAknNavigationDecorator::ETabGroup );
+        CAknTabGroup* tabGroup = 
+        static_cast< CAknTabGroup* > ( decorator->DecoratedControl() );        
+        AddTabsL( *tabGroup );        
+        }
+    return decorator;
+    }
+
+// ----------------------------------------------------
+// CBlidBaseContainer::AddIconL
+// Add icon
+// ----------------------------------------------------
+//
+void CBlidBaseContainer::AddIconL
+        ( CAknIconArray* aIcons,
+          const TAknsItemID aSkinID,
+          const TDesC& aIconFileWithPath,
+          TInt aIconGraphicsIndex,
+          TInt aIconGraphicsMaskIndex )
+    {
+    CFbsBitmap *bitmap = NULL;    
+    CFbsBitmap* mask = NULL; 
+    MAknsSkinInstance* skin = AknsUtils::SkinInstance();
+    AknsUtils::CreateIconLC( skin,
+                            aSkinID,
+                            bitmap,
+                            mask,
+                            aIconFileWithPath,
+                            aIconGraphicsIndex,
+                            aIconGraphicsMaskIndex );
+    
+    // Append it to icons array
+	CGulIcon* icon = CGulIcon::NewL( bitmap, mask );
+    CleanupStack::Pop( 2 ); // mask, bitmap. icon has now ownership
+	CleanupStack::PushL( icon );
+	aIcons->AppendL( icon );
+    CleanupStack::Pop( ); // icon
+
+    }
+
+// ----------------------------------------------------
+// CBlidBaseContainer::MakeTitleL
+// Sets the title to text specified by a resource
+// ----------------------------------------------------
+//
+void CBlidBaseContainer::MakeTitleL( TInt aResourceText )
+    {
+    HBufC* buf = StringLoader::LoadLC(aResourceText);       
+    CAknTitlePane* title = static_cast<CAknTitlePane*>( StatusPane()->
+                            ControlL( TUid::Uid( EEikStatusPaneUidTitle ) ) );
+    CleanupStack::Pop(); //buf
+    title->SetText(buf); // Takes ownership of buf
+    }
+
+// ----------------------------------------------------
+// CBlidBaseContainer::MakeEmptyTextListBoxL
+// 
+// ----------------------------------------------------
+//
+void CBlidBaseContainer::MakeEmptyTextListBoxL( 
+                CEikListBox* aListBox,
+                TInt aResourceText )
+    {
+    HBufC* textFromResourceFile;
+    textFromResourceFile = 
+        StringLoader::LoadLC( aResourceText, iCoeEnv );        
+    aListBox->View()->SetListEmptyTextL( *textFromResourceFile );
+    CleanupStack::PopAndDestroy();  // textFromResourceFile.
+    }
+
+// ----------------------------------------------------
+// CBlidBaseContainer::StatusPane
+// Returns the status pane
+// ----------------------------------------------------
+//
+CEikStatusPane* CBlidBaseContainer::StatusPane()
+    {
+    return iEikonEnv->AppUiFactory()->StatusPane();
+    }
+
+// ----------------------------------------------------
+// CBlidBaseContainer::AddTabsL
+// Adds the tabs
+// ----------------------------------------------------
+//
+void CBlidBaseContainer::AddTabsL(CAknTabGroup& aTabGroup)
+    {
+    aTabGroup.SetTabFixedWidthL(EAknTabWidthWithTwoTabs);
+	MAknsSkinInstance* skin = AknsUtils::SkinInstance(); 
+    HBufC* filename = BlidUtils::GetBitmapFilenameLC();        
+    CFbsBitmap* bitmap = NULL;
+    CFbsBitmap* bitmapMask = NULL;
+        
+    //Add tab icon 1
+    AknsUtils::CreateIconLC( skin,
+                            KAknsIIDQgnPropBlidNavigationTab3,
+                            bitmap,
+                            bitmapMask,
+                            *filename,
+                            EMbmBlidQgn_prop_blid_navigation_tab3,
+                            EMbmBlidQgn_prop_blid_navigation_tab3_mask );             
+    aTabGroup.AddTabL( EBlidNavigationView, bitmap, bitmapMask );
+    CleanupStack::Pop(2); //bitmap, bitmapmask
+
+    //Add tab icon 2
+    AknsUtils::CreateIconLC( skin,
+                            KAknsIIDQgnPropBlidTripTab3,
+                            bitmap,
+                            bitmapMask,
+                            *filename,
+                            EMbmBlidQgn_prop_blid_trip_tab3,
+                            EMbmBlidQgn_prop_blid_trip_tab3_mask );             
+    aTabGroup.AddTabL( EBlidTripMeterView, bitmap, bitmapMask );
+    CleanupStack::Pop(2); //bitmap, bitmapmask
+
+    
+    
+    CleanupStack::PopAndDestroy(); //filename
+    }
+
+// ---------------------------------------------------------
+// CBlidBaseContainer::SetGPSAvailability
+// Sets the GPS availability to ETrue or EFalse
+// ---------------------------------------------------------
+//
+void CBlidBaseContainer::SetGPSAvailability(const TBool aAvailability)
+    {
+    iGPSAvailability = aAvailability;
+    }
+
+// ---------------------------------------------------------
+// CBlidBaseContainer::IsGPSAvailable
+// Checks if GPS is available
+// ---------------------------------------------------------
+//
+TBool CBlidBaseContainer::IsGPSAvailable() 
+    {
+    return iGPSAvailability;
+    }
+
+// End of File  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/basiclocationinfodisplay/blid/ui/src/CBlidBaseView.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,1070 @@
+/*
+* 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:  Provides Blid main view class methods.
+*
+*/
+
+// INCLUDE FILES
+#include <aknlists.h>
+#include <AknQueryDialog.h> 
+#include <StringLoader.h>
+#include <eikmenub.h> // CEikMenuBar
+#include <blid.rsg>
+#include <EPos_CPosLandmarkDatabase.h>
+#include <EPos_CPosLmItemIterator.h>
+#include <e32std.h>
+#include <CLmkEditorDlg.h>
+#include <TLmkItemIdDbCombiInfo.h>
+#include <alf/alfimageloaderutil.h>
+
+#include "CBlidBaseView.h"
+#include "CBlidAppUi.h"
+#include "CBlidBaseContainer.h"
+#include "MBlidRouter.h"
+#include "MBlidSettings.h"
+#include "MBlidLocation.h"
+#include "CBlidEng.h"
+#include "CBlidDocument.h"
+#include "Blid.hrh"
+#include "bliduiconsts.h"
+#include "CBlidCurrentPositionDlg.h"
+
+#include <locationvariationdomaincrkeys.h>
+#include <centralrepository.h>
+
+enum TPanicCode
+    {
+    KBlidNullPointer = 1
+    };
+
+// Start with the assumption that PSY is not connected
+TInt CBlidBaseView::iPSYTimeoutCount = 0;
+TBool CBlidBaseView::iOnline = EFalse;
+
+const TInt KMiddleSKId = 3;
+
+
+// ================= MEMBER FUNCTIONS =======================
+
+// ---------------------------------------------------------
+// CBlidBaseView::CBlidBaseView
+// First phase constructor, should not leave
+// ---------------------------------------------------------
+//
+CBlidBaseView::CBlidBaseView( MKeyProcessor& aKeyProcessor )
+        : iKeyProcessor(aKeyProcessor)
+    {
+    StringLoader::Load( iManualWaypointName, R_BLID_DESTINATION_COORDINATES, iCoeEnv );
+    }
+
+// ---------------------------------------------------------
+// CBlidBaseView::BaseConstructL
+// Symbian 2nd phase constructor can leave.
+// ---------------------------------------------------------
+//
+void CBlidBaseView::BaseConstructL( TInt aResId )
+    {
+    FeatureManager::InitializeLibL();
+    CAknView::BaseConstructL( aResId ); 
+
+    iEngine = static_cast<CBlidDocument*>(AppUi()->Document())->Engine();
+    
+    if( !iEngine->LocationModel() )
+	    {
+    	iEngine->CreateModelL( CBlidEng::EBlidLocation );	    	
+	    }
+    iLocation = iEngine->LocationModel();
+    __ASSERT_DEBUG( iLocation, User::Panic(_L("CBlidOwnPosView"),
+        KBlidNullPointer));
+
+    iRouter = iEngine->RouterModel(); 
+    
+    iImageLoaderUtil = new (ELeave) CAlfImageLoaderUtil();
+    
+	iConFileName.Zero();
+	iConFileName.Append( _L("z") );
+	iConFileName.Append( KBlidSystemIconPath );
+
+	iIsSettingsViewActive = EFalse;   
+    
+    __ASSERT_DEBUG( iRouter, User::Panic(_L("CBlidOwnPosView"),
+        KBlidNullPointer));
+    }
+
+// ---------------------------------------------------------
+// CBlidBaseView::~CLocBaseView()
+// Destructor, frees allocated resources
+// ---------------------------------------------------------
+//
+CBlidBaseView::~CBlidBaseView()
+    {
+    FeatureManager::UnInitializeLib();
+    delete iImageLoaderUtil;
+    }
+
+// ---------------------------------------------------------
+// CBlidBaseView::ProcessKeyEventL
+// Processes the key event
+// ---------------------------------------------------------
+//
+TBool CBlidBaseView::ProcessKeyEventL( const TKeyEvent& aKeyEvent,
+                                      TEventCode aType )
+    {
+    return iKeyProcessor.ProcessKeyEventL( aKeyEvent, aType );
+    }
+
+// ---------------------------------------------------------
+// CBlidBaseView::TabObserver()
+// Returns the tab observer
+// ---------------------------------------------------------
+//
+MAknTabObserver* CBlidBaseView::TabObserver()
+    {
+    return iKeyProcessor.TabObserver();
+    }
+
+// ---------------------------------------------------------
+// CBlidBaseView::DynInitMenuPaneL
+// Called to initialize the menu pane at run time
+// ---------------------------------------------------------
+//
+void CBlidBaseView::DynInitMenuPaneL(
+    TInt aResourceId, CEikMenuPane* aMenuPane )
+    {
+    #ifdef _DEBUG
+    RDebug::Print(_L("CBlidCompassView::DynInitMenuPaneL() called"));
+    #endif
+    switch( aResourceId )
+        { 
+        case R_BLID_VIEW_MENU:
+        {
+            if ( !(iLocation->IsGPSDataAvailable() && 
+                   iLocation->SatelliteCapability()) )
+                {                
+                aMenuPane->SetItemDimmed( EBlidCmdSatelliteStatus, ETrue );                
+                }
+             if ( (!iRouter->Count()) || FeatureManager::FeatureSupported( KFeatureIdLandmarks ) )
+                {
+                aMenuPane->SetItemDimmed( EBlidCmdSavedWaypoints, ETrue );
+                }
+                             
+            // hide the save position.
+            if(!iLocation->IsOnline())
+                {
+                aMenuPane->SetItemDimmed( EBlidCmdCurrentLocation, ETrue );
+                }
+            
+                
+            
+        }
+                //-fallthrough
+        case R_BLID_VIEW_OK_MENU:        
+            {      
+            if ( !iRouter->IsAnyPointSet() )
+                {
+                aMenuPane->SetItemDimmed( EBlidCmdStopNavigation, ETrue );
+                }                
+            break;
+            }
+        case R_BLID_MAIN_MENU:
+            {
+            CBlidBaseView::HandleHelpFeatureL( aMenuPane );
+            break;
+            }
+            
+        case R_BLID_SET_DESTINATION_MENU:
+			{
+			if ( iRouter->Count() <= 0 )
+				{
+				aMenuPane->SetItemDimmed( EBlidCmdWaypoint, ETrue );
+				}                
+			else
+				{
+				aMenuPane->SetItemDimmed( EBlidCmdWaypoint, EFalse );	
+				}
+				
+			// Features manager checks for waypoint/landmarks variation
+			if ( FeatureManager::FeatureSupported( KFeatureIdLandmarks ) )
+				{
+				aMenuPane->SetItemDimmed( EBlidCmdWaypoint, ETrue );				
+				}
+			else
+				{
+				aMenuPane->SetItemDimmed( EBlidCmdLmk, ETrue );
+				}
+			
+			if ( FeatureManager::FeatureSupported( KFeatureIdLandmarks ) )
+			    {
+    			if( IsLmAvailableL() )
+    				{
+    				aMenuPane->SetItemDimmed( EBlidCmdLmk, EFalse );
+    				}
+    			else
+    				{
+    				aMenuPane->SetItemDimmed( EBlidCmdLmk, ETrue );
+    				}		
+    			}
+    			break;
+    	
+			} 
+        case R_BLID_SAVE_CURRENT_LOCATION_MENU:
+        {
+        	TInt settingsValue = 0;
+            CRepository* repository = CRepository::NewL( TUid::Uid( KCRUidLocLocalVariation) );
+            CleanupStack::PushL( repository );
+            User::LeaveIfError( repository->Get( KLocHideCoordinates,
+                                                      settingsValue ));  
+            CleanupStack::PopAndDestroy( repository );
+            
+            if ( ELocCoordinatesHidden == settingsValue )
+            {
+            	 aMenuPane->SetItemDimmed( EBlidCmdShowDetails, ETrue );
+            }
+            else
+            {
+             	 aMenuPane->SetItemDimmed( EBlidCmdShowDetails, EFalse );
+            }
+            
+            break;
+        } 
+        default:
+            {
+            break;
+            }
+        }
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidBaseView::NotifyL
+// Called by location model to notify about updates in location
+// ----------------------------------------------------------------------------
+//
+void CBlidBaseView::NotifyL( const TBool /*aOnlineMode*/ )
+    {  
+    if( iPopupDialog )
+	    {
+		iPopupDialog->ChangeDlgSoftKey();	    	
+	    }      
+    // GPS available    
+    CBlidBaseContainer::SetGPSAvailability(ETrue);
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidBaseView::NotifyError
+// Called by location model to notify about error in location
+// ----------------------------------------------------------------------------
+//
+void CBlidBaseView::NotifyErrorL( TInt /*aErrorCode*/ )
+    {
+    if( iPopupDialog )
+	    {
+		iPopupDialog->ChangeDlgSoftKey();	    	
+	    }
+    }
+
+// ---------------------------------------------------------
+// CBlidBaseView::HandleHelpFeatureL
+// Handles the Help option command
+// ---------------------------------------------------------
+//
+void CBlidBaseView::HandleHelpFeatureL( CEikMenuPane* aMenuPane ) const
+    {
+    //implementation for req 406-917. Hide position view based on feature variation flag
+    TInt helpSettingValue = ELocHelpNotHidden;
+    CRepository* repository = CRepository::NewL( TUid::Uid( KCRUidLocLocalVariation) );
+    CleanupStack::PushL( repository );
+     User::LeaveIfError( repository->Get( KLocHideHelp,
+                                              helpSettingValue ));  
+    CleanupStack::PopAndDestroy( repository );
+	
+	  
+    if ( FeatureManager::FeatureSupported( KFeatureIdHelp ) && !helpSettingValue)
+        {
+        aMenuPane->SetItemDimmed( EAknCmdHelp, EFalse );
+        }
+    else
+        {
+        aMenuPane->SetItemDimmed( EAknCmdHelp, ETrue );
+        }
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidBaseView::InsertWaypointL
+// Insers a waypoint
+// ----------------------------------------------------------------------------
+//
+TBool CBlidBaseView::InsertWaypointL()
+    {
+    TBuf<KBlidWaypointNameMaxLen> textData;
+    StringLoader::Load( textData, R_BLID_WAYPOINT_NAME, iCoeEnv );
+    TInt errorCode(KErrNone);	
+    TBool returnValue(ETrue);
+    TInt removedIndex;
+    
+    do
+        {
+        if(errorCode != KErrNone)
+        	{
+        	return EFalse;
+        	}
+        	
+        CAknTextQueryDialog* dlg = new(ELeave) CAknTextQueryDialog(textData,
+                                                    CAknQueryDialog::ENoTone);
+        
+        if (!dlg->ExecuteLD(R_BLID_WAYPOINT_QUERY))
+            {
+            return EFalse;           
+            }
+            
+        }while( CheckIfExistL( textData, errorCode, removedIndex ) );
+        
+		if(errorCode != KErrNone)
+				{
+				return EFalse;
+				}
+
+		/// if KMaxNumberOfWaypoints or more than that is already present
+		/// display note.
+		if ( iRouter->Count() >= KMaxNumberOfWaypoints )
+		    {
+		    static_cast<CBlidAppUi*>(AppUi()
+		        )->ShowDialogL( BlidNotes::EBlidOverWriteWaypointNote );            
+		    return EFalse;            
+		    }    
+
+		TNamedCoordinate* waypoint = new(ELeave)TNamedCoordinate();
+		CleanupStack::PushL( waypoint );
+		waypoint->SetName( textData );
+		TPosition position = iLocation->GetCurrentPosition();
+		waypoint->SetCoordinate( position.Latitude(),
+		                         position.Longitude(),
+		                         position.Altitude() );
+		position.SetHorizontalAccuracy(position.HorizontalAccuracy());
+		waypoint->SetAccuracy(position.HorizontalAccuracy());
+		//iRouter takes waypoint's ownership
+		TInt retVal = iRouter->AppendL( waypoint, ETrue);
+		if(retVal == KErrDiskFull)
+				{
+				delete waypoint;
+				BlidNotes::OutOfMemoryNoteL();
+				returnValue = EFalse;
+				}
+		CleanupStack::Pop(); //waypoint
+
+		return returnValue;
+		}
+
+// ----------------------------------------------------------------------------
+// CBlidBaseView::SelectWaypoint
+// Select a waypoint
+// ----------------------------------------------------------------------------
+//
+TInt CBlidBaseView::SelectWaypointL()
+    {
+    TInt index(KErrCancel);   
+    TInt currentIndex(0);     
+    CEikFormattedCellListBox* listBox = 
+        new(ELeave)CAknSinglePopupMenuStyleListBox;
+    CleanupStack::PushL( listBox );    
+    
+    HBufC* name = NULL;
+    TInt count( iRouter->Count() );
+    TNamedCoordinate* waypoint = iRouter->Waypoint();
+
+    CDesCArray* array = new(ELeave)CDesCArrayFlat(KMaxNumberOfWaypoints);
+    CleanupStack::PushL( array );
+
+    TInt waypointAdditionCount = 0;
+	// fill up the array with waypoint's names from the engine.
+	for ( TInt i = 0; i < count; i++ )
+        {
+        name = iRouter->At(i).Name();
+        if ( name )
+            {
+            CleanupStack::PushL( name );
+		    array->AppendL( *name );
+		    waypointAdditionCount ++;
+		    CleanupStack::PopAndDestroy(name); //name
+            }
+        else
+        	{
+        	currentIndex = i;
+        	}
+        }
+
+
+    CAknPopupList* popupList = CAknPopupList::NewL( listBox,
+        R_AVKON_SOFTKEYS_OK_CANCEL,
+        AknPopupLayouts::EPopupSNotePopupWindow);
+    CleanupStack::PushL(popupList);
+
+    HBufC* title = iCoeEnv->AllocReadResourceLC( R_BLID_QUERY_WAYPOINT );
+    popupList->SetTitleL( *title );
+    CleanupStack::PopAndDestroy(title); //title    
+    title = NULL;
+    
+    listBox->ConstructL( popupList, 
+        EAknListBoxSelectionList | EAknListBoxLoopScrolling);
+    
+    listBox->CreateScrollBarFrameL(ETrue); 
+    listBox->ScrollBarFrame()->SetScrollBarVisibilityL( 
+                                CEikScrollBarFrame::EAuto, 
+                                CEikScrollBarFrame::EAuto);
+    
+    //listbox's model take ownership of array
+    listBox->Model()->SetItemTextArray(array);
+    
+    CleanupStack::Pop(popupList); // popupList
+    CleanupStack::Pop(array); //array 
+    TBool isEmpty = array->Count() == 0;
+        
+    if ( popupList->ExecuteLD()  ) 
+        {
+        index = listBox->CurrentItemIndex();
+        }
+    CleanupStack::PopAndDestroy(listBox); //listBox
+    
+    if(isEmpty)
+    	{
+    	return KErrCancel;
+    	}
+    
+    if(waypoint && waypointAdditionCount != iRouter->Count())   
+    	{
+    	if(index >= currentIndex)
+    		{
+    		index += 1;    				
+    		}        
+    	}
+    if ( index != KErrCancel )
+    	{
+    	TNamedCoordinate waypoint = iRouter->At(index);
+    	if(waypoint.Accuracy() >= KBlidPoorAccuracy)
+    		{
+    		HBufC* noteText = StringLoader::LoadLC( R_BLID_CONF_DEST_INACCURATE , iCoeEnv );	        		
+    		CAknQueryDialog* dlg = CAknQueryDialog::NewL(CAknQueryDialog::ENoTone);
+    		if(dlg->ExecuteLD(R_BLID_CONFIRMATION_QUERY, *noteText))
+    			{
+    			CleanupStack::PopAndDestroy( noteText );
+    			return index;
+    			}
+    		else
+    			{
+    			CleanupStack::PopAndDestroy( noteText );
+    			return KErrCancel;
+    			}
+    		}
+    	}
+    return index;
+    }
+
+// ---------------------------------------------------------
+// CBlidBaseView::CheckIfExist
+// Checks if a waypoint exists
+// ---------------------------------------------------------
+//
+TBool CBlidBaseView::CheckIfExistL( const TDes& aName, TInt& aErrorCode, TInt& aRemovedIndex )
+    {
+    TInt i(0);
+    TInt count( iRouter->Count() );
+    HBufC* name = NULL;
+    TBool retVal;
+	aRemovedIndex = KErrNotFound;
+
+    for ( i = 0; i < count; i++ )
+        {
+        name = iRouter->At( i ).Name();
+        if ( name && name->Compare( aName ) == 0 )
+            {
+            CleanupStack::PushL(name);
+            HBufC* text;
+            text = StringLoader::LoadLC(R_BLID_QUERY_WAYPOINT_NAME_EXISTS,
+                                       *name,
+                                       iCoeEnv);
+                                    
+            CAknQueryDialog* dlg = CAknQueryDialog::NewL();
+            CleanupStack::PushL(dlg);
+            dlg->SetPromptL( *text ); 
+            CleanupStack::Pop( dlg );           
+            retVal = dlg->ExecuteLD(R_BLID_CONFIRMATION_QUERY);            
+            
+            if(retVal)
+                {
+                TInt retVal = iRouter->RemoveL(i);
+				aRemovedIndex = i;
+                if(retVal == KErrDiskFull)
+		        	{
+		        	aErrorCode = KErrDiskFull;
+		        	BlidNotes::OutOfMemoryNoteL();
+		        	}
+                }
+            CleanupStack::PopAndDestroy(2); //name and text
+            return !retVal;
+            }
+        delete name;
+        name = NULL;
+        }
+    return EFalse;
+    }
+
+// ----------------------------------------------------
+// CBlidBaseView::LaunchLandmarksDialogL
+// Launch the landmarks dialog
+// ----------------------------------------------------
+//
+TInt CBlidBaseView::LaunchLandmarksDialogL()
+    {
+    CPosLandmarkDatabase* lDb = NULL;
+    TPosLmItemId selectedItem;
+    iLandmarkInfo = CLmkLandmarkSelectorDlg::NewL();    
+    iLandmarkInfo->SetMopParent(this);
+    TLmkItemIdDbCombiInfo* selected = new (ELeave) TLmkItemIdDbCombiInfo();
+    CleanupStack::PushL(selected);
+    TInt retVal = iLandmarkInfo->ExecuteLD( *selected );
+    if( retVal != KErrNone )
+	    {	       	
+	    selectedItem = selected->GetItemId();
+	    lDb = selected->GetLmDb();
+	    if(lDb)
+	    	{
+	    	CleanupStack::PushL( lDb );
+	    	CPosLandmark *landmarkInfo = lDb->ReadLandmarkLC(selectedItem);
+	        CleanupStack::PushL( landmarkInfo );
+	        CPosLandmark* landMark = CPosLandmark::NewL(*landmarkInfo);
+	        CleanupStack::Pop( landmarkInfo );
+	        TLocality lmkPosition;
+	        TInt error = landMark->GetPosition(lmkPosition);
+	        if( Math::IsNaN(lmkPosition.Latitude()) || 
+	        	Math::IsNaN(lmkPosition.Longitude()) )
+	        	{
+	        	TPtrC landmarkname;
+	        	landMark->GetLandmarkName(landmarkname);
+                // Fix done for TSW error EPZO-75PBW8
+                HBufC* lmkName = NULL;
+                lmkName = HBufC::NewL( landmarkname.Length() );
+                lmkName->Des().Copy( landmarkname );
+                TPtr lmkActualName( lmkName->Des() );
+                TBuf<1> charsToRemove;
+                charsToRemove.Append(TChar(TInt(CEditableText::EParagraphDelimiter)));
+                AknTextUtils::ReplaceCharacters( lmkActualName, charsToRemove, TChar(TInt(CEditableText::ESpace)));
+	        	BlidNotes::EmptyLandmarkNoteL( *lmkName );
+	        	delete lmkName;
+                // end of error fix.
+	        	delete landMark;
+	        	retVal = 0;
+	        	}
+	        else
+	        	{
+	            TLocality lmkPosition;
+	        	landMark->GetPosition(lmkPosition);
+	        	TReal accuracy = lmkPosition.HorizontalAccuracy();
+	        	if(accuracy >= KBlidPoorAccuracy)
+	        		{	        		
+	        		HBufC* noteText = StringLoader::LoadLC( R_BLID_CONF_DEST_INACCURATE , iCoeEnv );	        		
+	        		CAknQueryDialog* dlg = CAknQueryDialog::NewL(CAknQueryDialog::ENoTone);
+	        		if(dlg->ExecuteLD(R_BLID_CONFIRMATION_QUERY, *noteText))
+	        			{
+	        			iRouter->SetLandmark(landMark);	        			
+	        			}
+	        		else
+	        			{
+	        			delete landMark;
+	        			}
+	        		CleanupStack::PopAndDestroy(noteText);
+	        		}
+	        	else
+	        		{
+	        		iRouter->SetLandmark(landMark);
+	        		}	        	
+
+	        	}
+	    	CleanupStack::PopAndDestroy(1); // ReadLandmarkLC
+	    	landMark = NULL;
+	    	landmarkInfo = NULL;
+	    	CleanupStack::PopAndDestroy( lDb );
+	    	}
+	    }
+	CleanupStack::Pop(1); //selectedItem
+	iLandmarkInfo = NULL;
+	delete selected;
+	return retVal;	
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidBaseView::SaveCurrentPositionAsLandmarkL
+// Called to save the current location as a landmark in landmark database
+// ----------------------------------------------------------------------------
+//
+void CBlidBaseView::SaveCurrentPositionAsLandmarkL()
+    {
+    CLmkEditorDlg::TLmkEditorParams editParams; 
+	editParams.iAttributes = CLmkEditorDlg::ELmkAll;
+	editParams.iEditorMode = CLmkEditorDlg::ELmkEditor;
+	
+	TPosition position = iLocation->GetCurrentPosition();
+    
+    CPosLandmark* landmark = CPosLandmark::NewLC();
+    TLocality location;
+    location.SetCoordinate(position.Latitude(),
+    					   position.Longitude(),
+    					   position.Altitude());
+    location.SetHorizontalAccuracy(position.HorizontalAccuracy());
+    location.SetVerticalAccuracy(position.VerticalAccuracy());
+    
+    landmark->SetPositionL(location);
+    CPosLandmarkDatabase* db = CPosLandmarkDatabase::OpenL();
+    CleanupStack::PushL(db);
+    
+    CPosLmOperation* operation = db->InitializeL();
+	CleanupStack::PushL(operation);
+	operation->ExecuteL();	
+    CLmkEditorDlg *dlg = CLmkEditorDlg::NewL(*db, 
+                                             *landmark, 
+                                             editParams);
+	dlg->ExecuteLD();
+	CleanupStack::PopAndDestroy(3); // landmark, operation and db
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidBaseView::LaunchManualWaypointDialogL
+// Launches the manual waypoint dialog
+// ----------------------------------------------------------------------------
+//    
+TInt CBlidBaseView::LaunchManualWaypointDialogL()
+    {    
+    TInt retVal;    
+    TCoordinate coord(0,0);
+    TLocality loc(coord,0);    
+    TTime time;
+    time.HomeTime();
+    TPosition pos(loc, time); 
+
+    CAknMultiLineDataQueryDialog* dlg = CAknMultiLineDataQueryDialog::NewL(pos);
+    retVal = dlg->ExecuteLD(R_BLID_MANUAL_LOCATION_QUERY_DIALOG);
+    if( retVal )
+	    {	    
+	    iRouter->SetManualWaypoint(pos.Latitude(), pos.Longitude(), iManualWaypointName);	
+	    }
+    return retVal;
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidBaseView::Update
+// ----------------------------------------------------------------------------
+//    
+void CBlidBaseView::Update(CBlidBaseContainer* aContainer)
+    {
+    aContainer->SetRect(ClientRect());
+    aContainer->DrawNow();
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidBaseView::CBAPtr
+// Returns the current CBA
+// ----------------------------------------------------------------------------
+//    
+CEikButtonGroupContainer* CBlidBaseView::CBAPtr() const
+    {
+    return (Cba());
+    }
+    
+// ----------------------------------------------------------------------------
+// CBlidBaseView::SetMiddleSoftKeyLabelL
+// Sets the Middle Soft Key label.
+// ----------------------------------------------------------------------------
+//    
+void CBlidBaseView::SetMiddleSoftKeyLabelL(
+    const TInt aResourceId,
+    const TInt aCommandId )   
+    {
+    CEikButtonGroupContainer* cbaGroup = Cba();
+    if ( cbaGroup )
+        {
+        HBufC* middleSKText = StringLoader::LoadLC( aResourceId );
+        cbaGroup->AddCommandToStackL(KMiddleSKId, 
+                                     aCommandId, 
+                                     *middleSKText );
+        CleanupStack::PopAndDestroy( middleSKText );
+        }
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidBaseView::RemoveMiddleSoftKeyLabel
+// Remove the Middle Soft Key label.
+// ----------------------------------------------------------------------------
+//    
+void CBlidBaseView::RemoveMiddleSoftKeyLabel( const TInt aCommandId )   
+    {
+    CEikButtonGroupContainer* cbaGroup = Cba();
+    if ( cbaGroup )
+        {
+        cbaGroup->RemoveCommandFromStack(KMiddleSKId, 
+                                     aCommandId );
+        }
+    }
+    
+// ----------------------------------------------------------------------------
+// CBlidBaseView::SetMSKDimmed
+// Sets the Middle Soft Key as not visible.
+// ----------------------------------------------------------------------------
+//     
+void CBlidBaseView::SetMSKNotVisible()    
+    {
+    CEikButtonGroupContainer* cbaGroup = Cba();
+    if ( cbaGroup )
+        {
+        cbaGroup->MakeCommandVisible(EAknSoftkeyContextOptions, EFalse);
+        iMSKVisible = EFalse;
+        }
+    }
+    
+// ----------------------------------------------------------------------------
+// CBlidBaseView::SetMSKVisible
+// Sets the Middle Soft Key as visible.
+// ----------------------------------------------------------------------------
+//     
+void CBlidBaseView::SetMSKVisible()    
+    {
+    CEikButtonGroupContainer* cbaGroup = Cba();
+    if ( cbaGroup )
+        {
+        cbaGroup->MakeCommandVisible(EAknSoftkeyContextOptions, ETrue);
+        iMSKVisible = ETrue;
+        }
+    }   
+
+// ----------------------------------------------------------------------------
+// CBlidBaseView::UpdateMskStateL
+// Update Middle Soft Key label/Icon.
+// ----------------------------------------------------------------------------
+// 
+void CBlidBaseView::UpdateMskStateL()    
+    {
+    if (!iLocation->IsGPSDataAvailable())        
+        {
+        SetMSKNotVisible();
+        }
+    else
+        {
+        if(!iMSKVisible)
+            {
+            SetMSKVisible(); 
+            MenuBar()->SetContextMenuTitleResourceId(
+                                                     R_BLID_OWN_POS_VIEW_OK_MENUBAR);               
+            }
+        }
+    }
+
+#ifdef RD_SCALABLE_UI_V2    
+// ---------------------------------------------------------------------------
+// CBlidBaseView::HandleListBoxEventL
+// Handles listbox item selection
+// ---------------------------------------------------------------------------
+//
+void CBlidBaseView::HandleListBoxEventL(
+    CEikListBox* /*aListBox*/, TListBoxEvent aEventType)
+    {
+    switch ( aEventType )
+        {
+        case EEventEnterKeyPressed:
+        case EEventItemSingleClicked:
+            HandleListBoxSelectionL();
+            break;
+        default:
+           break;
+        }
+    }  
+    
+#endif //RD_SCALABLE_UI_V2      
+// ---------------------------------------------------------------------------
+// CBlidBaseView::IsLmFeatureAvailable
+// Checks if Landmarks feature i available
+// ---------------------------------------------------------------------------
+//
+TBool CBlidBaseView::IsLmFeatureAvailable()    
+    {
+    return FeatureManager::FeatureSupported( KFeatureIdLandmarks );
+    } 
+    
+// ---------------------------------------------------------------------------
+// CBlidBaseView::IsLmAvailableL
+// Checks if there are any landmarks in the default database
+// ---------------------------------------------------------------------------
+//
+TBool CBlidBaseView::IsLmAvailableL()    
+    {
+    TBool lResult = ETrue;
+	// Check if there are any landmarks present. If not the
+	// dim the landmark item from the set destination menu pane
+	CPosLandmarkDatabase* lmkDb;
+	lmkDb = CPosLandmarkDatabase::OpenL();			
+	CleanupStack::PushL(lmkDb);
+	// Initialize Landmarks data base if required			
+	CPosLmOperation* operation = lmkDb->InitializeL();
+	CleanupStack::PushL(operation);			
+	operation->ExecuteL();
+	CPosLmItemIterator* iterator = lmkDb->LandmarkIteratorL();
+	CleanupStack::PushL(iterator);
+	
+	if( iterator->NumOfItemsL() == 0 )
+        {
+        lResult = EFalse;        
+        }
+    else
+        {
+        lResult = ETrue;
+        }
+    CleanupStack::PopAndDestroy(3); //lmkDb, iterator and operation                
+    return lResult;        
+    } 
+    
+// ---------------------------------------------------------------------------
+// CBlidBaseView::IsWpAvailable
+// Checks if waypoints are available
+// ---------------------------------------------------------------------------
+//
+TBool CBlidBaseView::IsWpAvailable()    
+    {
+    if ( iRouter->Count() <= 0 )
+        {
+        return EFalse;        
+        }
+    return ETrue;
+    }         
+       
+
+// ----------------------------------------------------------------------------
+// CBlidBaseView::ActivateCorrectViewL
+// Activates the view
+// ----------------------------------------------------------------------------
+//
+void CBlidBaseView::ActivateCorrectViewL( TInt aIndex )
+	{
+    switch( aIndex )
+        {
+        case EBlidNavigationViewId:
+            {
+            AppUi()->ActivateLocalViewL( TUid::Uid( EBlidNavigationView ) );
+            break;
+            }
+        case EBlidTripMeterViewId:
+            {
+            AppUi()->ActivateLocalViewL( TUid::Uid( EBlidTripMeterView ) );
+            break;
+            }
+        default:
+            break;
+        }
+	}
+
+
+// ----------------------------------------------------------------------------
+// CBlidBaseView::ShowCurrentPositionInfoL
+// Launches the current position dialog
+// ----------------------------------------------------------------------------
+//
+void CBlidBaseView::ShowCurrentPositionInfoL()
+	{
+	iPopupDialog = CBlidCurrentPositionDlg::NewL( *this, iLocation, iEngine );
+	iPopupDialog->ExecuteLD();
+	iPopupDialog = NULL;
+	}
+
+// ----------------------------------------------------------------------------
+// CBlidBaseView::SaveCurrentPositionL
+// Saves current position as landmark or as waypoint
+// ----------------------------------------------------------------------------
+//
+void CBlidBaseView::SaveCurrentPositionL()
+	{
+	if ( !FeatureManager::FeatureSupported( KFeatureIdLandmarks ) )
+		{
+		if ( InsertWaypointL() )
+            {
+            static_cast<CBlidDocument*>(AppUi()->Document())->SaveL();
+            }
+		}
+	else
+		{
+		SaveCurrentPositionAsLandmarkL();
+		}
+	}
+
+// ----------------------------------------------------
+// CBlidBaseView::BlidDocument
+// Returns the Location document object.
+// ----------------------------------------------------
+//
+CBlidDocument* CBlidBaseView::BlidDocument()
+    {
+    // Explicit cast: the document must always be of type CBlidDocument
+    return static_cast<CBlidDocument*>(AppUi()->Document());
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidBaseView::ActivateSatelliteViewL
+// Activates the Satellite view
+// ----------------------------------------------------------------------------
+//
+void CBlidBaseView::ActivateSatelliteViewL( )
+	{
+	AppUi()->ActivateLocalViewL( TUid::Uid( EBlidMainSatelliteView ) );
+	}
+	
+// ----------------------------------------------------------------------------
+// CBlidBaseView::IsSatViewActive
+// Checks if Satellite view is active
+// ----------------------------------------------------------------------------
+//
+TBool CBlidBaseView::IsSatViewActive( )
+	{
+	return (static_cast<CBlidAppUi*>(AppUi()))->IsSatelliteViewActive();
+	}
+
+// ----------------------------------------------------------------------------
+// CBlidBaseView::IsForeGroundApp
+// Checks if Blid app is in foreground
+// ----------------------------------------------------------------------------
+//
+TBool CBlidBaseView::IsForeGroundApp( )
+	{
+	return ( static_cast<CBlidAppUi*>(AppUi())->IsForeground() );
+	}
+	
+// ----------------------------------------------------------------------------
+// CBlidBaseView::ExitMainApplicationL
+// Exit the application
+// ----------------------------------------------------------------------------
+//
+void CBlidBaseView::ExitMainApplicationL( TInt aButtonId )
+	{
+	static_cast<CBlidAppUi*>(AppUi())->HandleCommandL( aButtonId );
+	}
+	
+// ----------------------------------------------------------------------------
+// CBlidBaseView::LaunchTripContextMenuL
+// Launches the context menu for tripmeter view
+// ----------------------------------------------------------------------------
+//
+void CBlidBaseView::LaunchTripContextMenuL()
+	{
+    CEikMenuBar* menubar = static_cast<CAknViewAppUi*>
+        (iAvkonAppUi)->View(TUid::Uid( EBlidTripMeterView ))->MenuBar();
+    if ( menubar )
+        {
+        menubar->SetContextMenuTitleResourceId(R_BLID_TRIP_METER_VIEW_OK_MENUBAR);
+        menubar->TryDisplayContextMenuBarL();
+        }
+	}
+
+// ----------------------------------------------------------------------------
+// CBlidBaseView::LaunchNavigationContextMenuL
+// Launches the context menu for Navigation view
+// ----------------------------------------------------------------------------
+//
+void CBlidBaseView::LaunchNavigationContextMenuL()
+	{
+    CEikMenuBar* menubar = static_cast<CAknViewAppUi*>
+        (iAvkonAppUi)->View(TUid::Uid( EBlidNavigationView ))->MenuBar();
+        
+    if ( menubar )
+        {
+        menubar->SetContextMenuTitleResourceId(R_BLID_VIEW_OK_MENUBAR);
+        menubar->StopDisplayingMenuBar();
+        menubar->TryDisplayContextMenuBarL();                         
+        }
+	}
+
+// ----------------------------------------------------------------------------
+// CBlidBaseView::LaunchSatelliteInfoDlgL
+// Launches the Satellite info dialog
+// ----------------------------------------------------------------------------
+//
+void CBlidBaseView::LaunchSatelliteInfoDlgL()
+	{
+	static_cast<CBlidAppUi*>(AppUi())->LaunchSatelliteInfoDlgL( );
+	}
+	
+// ----------------------------------------------------------------------------
+// CBlidBaseView::ActivateNavigationViewL
+// Activates the navigation view
+// ----------------------------------------------------------------------------
+//
+void CBlidBaseView::ActivateNavigationViewL( )
+	{
+	AppUi()->ActivateLocalViewL( TUid::Uid( EBlidNavigationView ) );
+	}
+	
+// ----------------------------------------------------------------------------
+// CBlidBaseView::ChangeViewSoftKeyL
+// Changes the soft key
+// ----------------------------------------------------------------------------
+//
+void CBlidBaseView::ChangeViewSoftKeyL( )
+	{
+	CBAPtr()->SetCommandSetL( R_BLID_SOFTKEYS_INFO_EXIT );
+	CBAPtr()->DrawDeferred();
+	}	
+
+// ----------------------------------------------------------------------------
+// CBlidBaseView::ApplicationRect
+// Returns the application rect
+// ----------------------------------------------------------------------------
+//
+TRect CBlidBaseView::ApplicationRect( ) const
+	{
+	return AppUi()->ApplicationRect();
+	}	
+
+// ----------------------------------------------------------------------------
+// CBlidBaseView::ImageLoaderUtils
+// Returns the image loader utils
+// ----------------------------------------------------------------------------
+//
+CAlfImageLoaderUtil* CBlidBaseView::ImageLoaderUtils( ) const
+	{
+	return iImageLoaderUtil;
+	}
+	
+// ----------------------------------------------------------------------------
+// CBlidBaseView::ImagePathName
+// Returns the image path
+// ----------------------------------------------------------------------------
+//
+TFileName CBlidBaseView::ImagePathName( ) const
+	{
+	return iConFileName;
+	}	
+
+// ----------------------------------------------------------------------------
+// CBlidBaseView::IsSettingsViewActive
+// Checks if settings view is active
+// ----------------------------------------------------------------------------
+//
+TBool CBlidBaseView::IsSettingsViewActive()
+	{
+	return iIsSettingsViewActive;
+	}
+
+// ----------------------------------------------------------------------------
+// CBlidBaseView::CoeEnv
+// Returns the control environment
+// ----------------------------------------------------------------------------
+//
+CCoeEnv* CBlidBaseView::CoeEnv()
+	{
+	return iCoeEnv;
+	}
+// End of File
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/basiclocationinfodisplay/blid/ui/src/CBlidCurrentPositionDlg.cpp	Wed Sep 01 12:31:27 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:  Provides blid main view class methods.
+*
+*/
+
+
+//  SYSTEM INCLUDE FILES
+#include <aknlists.h>
+#include <blid.rsg>
+#include <avkon.hrh>
+#include <aknborders.h>
+
+//  USER INCLUDE FILES
+#include "CBlidCurrentPositionDlg.h"
+#include "CBlidBaseView.h"
+#include "CBlidOwnPosLBModel.h"
+#include "MBlidLocation.h"
+#include "CBlidEng.h"
+#include "CBlidDocument.h"
+
+
+// ================= MEMBER FUNCTIONS =======================
+// ----------------------------------------------------------------------------
+// CBlidCurrentPositionDlg::NewLC
+// Two-phased constructor.
+// ----------------------------------------------------------------------------
+//
+CBlidCurrentPositionDlg* CBlidCurrentPositionDlg::NewL( CBlidBaseView& aView,
+        						   						MBlidLocation* aLoc,
+        						   						CBlidEng* aEng )
+    {
+    CBlidCurrentPositionDlg* self = new(ELeave)
+        CBlidCurrentPositionDlg( aView, aLoc, aEng );
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    CleanupStack::Pop(); // self
+    return self;
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidCurrentPositionDlg::CBlidCurrentPositionDlg
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// ----------------------------------------------------------------------------
+//
+CBlidCurrentPositionDlg::CBlidCurrentPositionDlg(  CBlidBaseView& aView,
+        						   				   MBlidLocation* aLoc,
+        						   				   CBlidEng* aEng ):
+    iView(aView)
+    {
+    iLoc = aLoc;
+    iEng = aEng;
+    isDlgExited = EFalse;
+    isLmSaved = EFalse;
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidCurrentPositionDlg::ExecuteLD
+//
+// ----------------------------------------------------------------------------
+//    
+void CBlidCurrentPositionDlg::ExecuteLD()
+    {
+    CAknPopupList::ExecuteLD();
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidCurrentPositionDlg::~CBlidCurrentPositionDlg
+// 
+// ----------------------------------------------------------------------------
+//
+CBlidCurrentPositionDlg::~CBlidCurrentPositionDlg()
+    {
+    delete iListBox;
+    iLoc = NULL;
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidCurrentPositionDlg::ProcessCommandL
+// 
+// ----------------------------------------------------------------------------
+//
+void CBlidCurrentPositionDlg::ProcessCommandL(TInt aCommandId)
+    {
+    switch (aCommandId)
+        {
+        case EAknSoftkeySave:
+            {
+       		iView.SaveCurrentPositionL();
+            break;
+            }
+        default:
+            {
+            isDlgExited = ETrue;
+            CAknPopupList::ProcessCommandL(aCommandId);
+            break;
+            }
+        }
+    }    
+
+// ----------------------------------------------------------------------------
+// CBlidCurrentPositionDlg::ConstructL
+// Symbian 2nd phase constructor can leave.
+// ----------------------------------------------------------------------------
+//    
+void CBlidCurrentPositionDlg::ConstructL()
+    {
+    iListBox = new (ELeave) CAknSingleHeadingPopupMenuStyleListBox;
+
+    CAknPopupList::ConstructL(iListBox, 
+                              R_BLID_CURRENTLOCATION_SOFTKEYS_SAVE__EXIT,
+                              AknPopupLayouts::EDynMenuWindow );
+    
+    iListBox->ConstructL(this, EAknListBoxDisableHighlight |
+    								 EAknGenericListBoxFlags );
+    
+    SetBorder(AknBorderId::EAknBorderNotePopup);
+	
+	HBufC* textFromResourceFile;
+    CEikonEnv* env = CEikonEnv::Static();
+    textFromResourceFile = env->AllocReadResourceLC(R_BLID_TITLE_POSITION);
+    SetTitleL( *textFromResourceFile );
+    CleanupStack::PopAndDestroy();  // textFromResourceFile
+        
+    MDesCArray* model = CBlidOwnPosLBModel::NewLC( iLoc, iEng->SettingsModel());
+    iListBox->Model()->SetItemTextArray( model );
+    iListBox->Model()->SetOwnershipType(ELbmOwnsItemArray);
+    CleanupStack::Pop(); // model
+
+    // Make scroll arrows
+    iListBox->CreateScrollBarFrameL( ETrue );
+    iListBox->ScrollBarFrame()->SetScrollBarVisibilityL( 
+        CEikScrollBarFrame::EOff,CEikScrollBarFrame::EOn );      
+    }
+    
+// ---------------------------------------------------------
+// CBlidCurrentPositionDlg::ChangeDlgSoftKey
+// ---------------------------------------------------------
+//    
+void CBlidCurrentPositionDlg::ChangeDlgSoftKey( )
+	{
+	if( !isDlgExited )
+		{
+		if( iLoc != NULL )
+			{
+			if( iLoc->IsGPSDataAvailable() )
+				{
+				ButtonGroupContainer()->MakeCommandVisible( EAknSoftkeySave, ETrue );			
+				}
+			else
+				{
+				ButtonGroupContainer()->MakeCommandVisible( EAknSoftkeySave, EFalse );			
+				}
+			DrawNow();					
+			}
+		}
+	}
+// End Of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/basiclocationinfodisplay/blid/ui/src/CBlidDocument.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,160 @@
+/*
+* Copyright (c) 2005-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:  Provides blid document class methods.
+*
+*/
+
+
+// INCLUDE FILES
+#include <sysutil.h>
+#include <f32file.h>
+#include <pathinfo.h>
+#include <driveinfo.h>
+
+#include "CBlidDocument.h"
+#include "CBlidAppUi.h"
+#include "CBlidEng.h" 
+#include "bliduiconsts.h"
+
+// constants
+const TInt KBytesToWrite = 2*sizeof(TInt);
+
+// ================= MEMBER FUNCTIONS =======================
+// ----------------------------------------------------------------------------
+// CBlidDocument::CBlidDocument
+// First phase constructor, may not leave
+// ----------------------------------------------------------------------------
+//
+CBlidDocument::CBlidDocument(CEikApplication& aApp)
+: CAknDocument(aApp)    
+    {
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidDocument::~CBlidDocument
+// Destructor, frees allocated resources
+// ----------------------------------------------------------------------------
+//
+CBlidDocument::~CBlidDocument()
+    {
+    delete iEngine;
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidDocument::ConstructL
+// Symbian 2nd phase constructor can leave.
+// ----------------------------------------------------------------------------
+//
+void CBlidDocument::ConstructL()
+    {
+    CreateEngineL();
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidDocument::NewL
+// Two-phased constructor.
+// ----------------------------------------------------------------------------
+//
+CBlidDocument* CBlidDocument::NewL(
+        CEikApplication& aApp)     // CLocApp reference
+    {
+    CBlidDocument* self = new (ELeave) CBlidDocument( aApp );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop( self );
+    return self;
+    }
+    
+// ----------------------------------------------------
+// CBlidDocument::CreateAppUiL
+// constructs CBlidAppUi
+// ----------------------------------------------------
+//
+CEikAppUi* CBlidDocument::CreateAppUiL()
+    {
+    return new (ELeave) CBlidAppUi;
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidDocument::CreateEngineL
+// Create instance of CBlidEng
+// ----------------------------------------------------------------------------
+//
+void CBlidDocument::CreateEngineL()
+    {
+    iEngine = CBlidEng::NewL();
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidDocument::Engine
+// Returns the CBlidEng instance
+// ----------------------------------------------------------------------------
+//
+CBlidEng* CBlidDocument::Engine()
+    {
+    return iEngine;
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidDocument::StoreL
+// Stores the app's document
+// ----------------------------------------------------------------------------
+//
+void CBlidDocument::StoreL( CStreamStore& aStore, 
+            CStreamDictionary& aStreamDic ) const
+    {
+    TStreamId id = iEngine->StoreL( aStore, *EditStore() );
+    aStreamDic.AssignL( KBlidUI, id );
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidDocument::RestoreL
+// Restore the app's document
+// ----------------------------------------------------------------------------
+//
+void CBlidDocument::RestoreL( const CStreamStore& aStore,
+            const CStreamDictionary& aStreamDic )
+    {
+    TStreamId streamId = aStreamDic.At( KBlidUI );
+    iEngine->RestoreL( aStore, streamId );
+    SetChanged( EFalse );
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidDocument::OpenFileL
+// Restores the document's state from the specified file
+// ----------------------------------------------------------------------------
+//
+CFileStore* CBlidDocument::OpenFileL(TBool aDoOpen, 
+                      const TDesC& aFileName, 
+                      RFs& aFs)
+    {
+    // changes done for multiple drive support	   
+    TChar colon = ':';
+	TFileName wpFileName;
+	wpFileName.Append(PathInfo::PhoneMemoryRootPath()[0]);
+	wpFileName.Append(colon);
+	wpFileName.Append(aFileName);
+
+	if(!aDoOpen )
+	   {
+	   if ( SysUtil::DiskSpaceBelowCriticalLevelL( &aFs, KBytesToWrite, DriveInfo::EDefaultPhoneMemory ) )
+	       {
+	       User::Leave(KErrNoMemory);
+	       }
+	   }
+    return CEikDocument::OpenFileL( aDoOpen, wpFileName, aFs );
+    }
+
+// End of File  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/basiclocationinfodisplay/blid/ui/src/CBlidLocSettingLauncher.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,123 @@
+/*
+* 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:  Responsible for launching positioning settings
+*
+*/
+
+
+// INCLUDE FILES
+#include "CBlidLocSettingLauncher.h"
+#include "CBlidMainControl.h"
+
+// ================= MEMBER FUNCTIONS =======================
+// ----------------------------------------------------------------------------
+// CBlidLocSettingsLauncher::NewL
+// Two-phased constructor.
+// ----------------------------------------------------------------------------
+//
+CBlidLocSettingsLauncher* CBlidLocSettingsLauncher:: NewL()
+	{
+	CBlidLocSettingsLauncher* self = new (ELeave) CBlidLocSettingsLauncher();
+	CleanupStack::PushL(self);
+	self->ConstructL();
+	CleanupStack::Pop( self ); // self
+	return self;
+	}
+
+// ----------------------------------------------------------------------------
+// CBlidLocSettingsLauncher::CBlidLocSettingsLauncher
+// ----------------------------------------------------------------------------
+//
+CBlidLocSettingsLauncher::CBlidLocSettingsLauncher()
+	: CActive( EPriorityStandard )
+	{
+	iControl = NULL;
+	}
+
+// ----------------------------------------------------------------------------
+// CBlidLocSettingsLauncher::~CBlidLocSettingsLauncher
+// ----------------------------------------------------------------------------
+//
+CBlidLocSettingsLauncher::~CBlidLocSettingsLauncher()
+	{
+	Cancel();
+    delete iClientLibrary;
+	}
+
+// ----------------------------------------------------------------------------
+// CBlidLocSettingsLauncher::ConstructL
+// ----------------------------------------------------------------------------
+//
+void CBlidLocSettingsLauncher::ConstructL()
+	{
+	iClientLibrary  = CLocSettingsUiClient::NewL();    
+    CActiveScheduler::Add( this );
+	}
+
+// ----------------------------------------------------------------------------
+// CBlidLocSettingsLauncher::LaunchL
+// ----------------------------------------------------------------------------
+//
+void CBlidLocSettingsLauncher::LaunchL()
+	{
+	iClientLibrary->LaunchPosSettingsAsEmbeddedAppL( iStatus );
+	SetActive();
+	}
+
+// ----------------------------------------------------------------------------
+// CBlidLocSettingsLauncher::RunL
+// ----------------------------------------------------------------------------
+//
+void CBlidLocSettingsLauncher::RunL()
+    {
+    switch( iStatus.Int())
+        {
+        case KErrNone:
+            {
+            if( iControl )
+	            {
+	            iControl->UpdateL();	
+	            }
+            break;
+            }
+        case KErrCancel:
+            {
+            break;
+            }
+        default:
+            {
+            break;    
+            }
+        }
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidLocSettingsLauncher::DoCancel
+// ----------------------------------------------------------------------------
+//
+void CBlidLocSettingsLauncher::DoCancel()
+    {
+    iClientLibrary->ClosePosSettings();
+    }
+    
+// ----------------------------------------------------------------------------
+// CBlidLocSettingsLauncher::SetControl
+// ----------------------------------------------------------------------------
+//
+void CBlidLocSettingsLauncher::SetControl( CBlidMainControl* aControl )
+    {
+    iControl = aControl;
+    }    
+// End of File
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/basiclocationinfodisplay/blid/ui/src/CBlidMainControl.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,726 @@
+/*
+ * Copyright (c) 2007-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:  Provides blid startup view class methods.
+ *
+ */
+
+// SYSTEM INCLUDES
+#include <aknmessagequerydialog.h> //CAknMessageQueryDialog
+#include <StringLoader.h>
+#include <aknconsts.h>
+#include <blid.rsg>
+#include <akntitle.h> 
+#include <aknnavide.h>
+#include <eikspane.h>
+#include <aknlayoutscalable_apps.cdl.h>
+#include <layoutmetadata.cdl.h>
+#include <blid.mbg>
+
+// HTK includes
+#include <alf/alfenv.h>
+#include <alf/alfanchorlayout.h>
+#include <alf/alftextvisual.h>
+#include <alf/alftextstyle.h>
+#include <alf/alfborderbrush.h>
+#include <alf/alfbrusharray.h>
+#include <alf/alfevent.h>
+#include <alf/alftransformation.h>
+#include <alf/alftexture.h>
+#include <alf/alfdecklayout.h>
+#include <alf/alfutil.h>
+#include <alf/alfimageloaderutil.h>
+#include <alf/alfimagevisual.h>
+
+#include "Blid.hrh"
+
+// USER INCLUDES
+#include "CBlidMainControl.h"
+#include "CBlidEng.h"
+#include "CBlidDocument.h"
+#include "MBlidLocation.h"
+#include "CBlidBaseView.h"
+#include "CBlidBaseContainer.h"
+#include "bliduiconsts.h"
+#include "BlidNotes.h"
+#include "CBlidLocSettingLauncher.h"
+#include "Debug.h"
+
+TInt CBlidMainControl::iPSYTimeoutCount = 0;
+
+TInt MessageQueryCallBack(TAny* aPtr);
+
+const TInt KTimerValue = 200000;
+
+// ================= MEMBER FUNCTIONS =======================
+// ---------------------------------------------------------
+// CBlidMainControl::NewL()
+// Two phased constructor
+// ---------------------------------------------------------
+//
+CBlidMainControl* CBlidMainControl::NewL(CAlfEnv& aEnv, const TRect& aRect,
+        CBlidBaseView& aView)
+    {
+    CBlidMainControl* self = new (ELeave) CBlidMainControl(aEnv, aView);
+    CleanupStack::PushL(self);
+    self->ConstructL(aRect);
+    CleanupStack::Pop(self);
+    return self;
+    }
+
+// ---------------------------------------------------------
+//CBlidMainControl::CBlidMainControl()
+// First phase constructor, can not leave
+// ---------------------------------------------------------
+//
+CBlidMainControl::CBlidMainControl(CAlfEnv& aEnv, CBlidBaseView& aView) :
+    CAlfControl(), iEnv(aEnv), iView(aView), isAccessoryRequired(EFalse)
+    {
+    iOnlineMode = EFalse;
+    }
+
+// ---------------------------------------------------------
+// CBlidMainControl::ConstructL()
+// Second phase constructor, may leave
+// ---------------------------------------------------------
+//
+void CBlidMainControl::ConstructL(const TRect& /*aRect*/)
+    {
+    CAlfControl::ConstructL(iEnv);
+
+    iMainLayout = CAlfAnchorLayout::AddNewL(*this);
+    iSearchTextVisual = CAlfTextVisual::AddNewL(*this, iMainLayout);
+    iAnimationVisual = CAlfImageVisual::AddNewL(*this, iMainLayout);
+
+    iDisplayIcon = 1;
+    iPeriodic = CPeriodic::NewL(0); // neutral priority 
+    if (!iPeriodic->IsActive())
+        {
+        iPeriodic->Start(TTimeIntervalMicroSeconds32(KTimerValue),
+                TTimeIntervalMicroSeconds32(KTimerValue), TCallBack(Tick,
+                        this));
+        }
+
+    UpdateDisplayLayoutL();
+    CreateSearchingTextL();
+    CreateAnimationL();
+    UpdateAnimation();
+
+    iLauncher = NULL;
+    isSettingsLaunched = EFalse;
+
+    //start requesting
+    CBlidEng* engine = iView.BlidDocument()->Engine();
+    iLocation = engine->LocationModel();
+    }
+
+// ---------------------------------------------------------
+// CBlidMainControl::Tick()
+// Timer callback function, to update image in animation
+// ---------------------------------------------------------
+//
+TInt CBlidMainControl::Tick(TAny* aObject)
+    {
+    ((CBlidMainControl*) aObject)->UpdateAnimation(); // cast, and call non-static function
+    return KErrNone;
+    }
+
+// ---------------------------------------------------------
+// CBlidMainControl::CreateSearchingTextL()
+// Function to create search text visual
+// ---------------------------------------------------------
+//
+void CBlidMainControl::CreateSearchingTextL()
+    {
+    /* Layout Hierarchy
+     main_blid2_pane -> blid2_search_pane -> blid2_search_pane_t1
+     */
+
+    // Get the text font
+
+    TInt typefaceStyleId = iEnv.TextStyleManager().CreatePlatformTextStyleL(
+            EAknLogicalFontPrimarySmallFont, EAlfTextStyleNormal);
+    CAlfTextStyle* style1 =
+            iEnv.TextStyleManager().TextStyle(typefaceStyleId);
+    style1->SetBold(ETrue);
+    // Set the text font size in pixel
+    style1->SetTextPaneHeightInPixels(26, ETrue);
+
+    TRgb rgb;
+    // Fetch the skin color 
+    AknsUtils::GetCachedColor(AknsUtils::SkinInstance(), rgb,
+            KAknsIIDQsnTextColors, EAknsCIQsnTextColorsCG1);
+
+    iSearchTextVisual->SetColor(rgb);
+    HBufC* noteText = StringLoader::LoadLC(R_BLID_NOTE_SEARCHING_ANIMATION,
+            CEikonEnv::Static());
+    iSearchTextVisual->SetTextL(*noteText);
+    iSearchTextVisual->SetTextStyle(style1->Id());
+    iSearchTextVisual->SetAlign(EAlfAlignHCenter, EAlfAlignVCenter);
+    CleanupStack::PopAndDestroy(noteText); //noteText
+
+    }
+
+// ---------------------------------------------------------
+// CBlidMainControl::CreateAnimationL()
+// Creates image visuals for animation
+// ---------------------------------------------------------
+//
+void CBlidMainControl::CreateAnimationL()
+    {
+    /* Layout Hierarchy
+     main_blid2_pane -> blid2_search_pane -> blid2_search_pane_g1
+     */
+
+    // code to load svg icon
+    MAlfBitmapProvider* provider = NULL;
+
+    // first creste the image loader utils and then call SetSize.	
+    iView.ImageLoaderUtils()->SetSize(iAnimationRect.Size());
+
+    // then create the bitmap provider  
+    provider = iView.ImageLoaderUtils()->CreateImageLoaderL(
+            KAknsIIDQgnGrafBlidStartup, // svg icon skin constant id defiened in Aknsconstant.h file
+            iView.ImagePathName(), // mif file name with path.
+            EMbmBlidQgn_graf_blid_startup_01, // bitmap id defiened in mbg file
+            EMbmBlidQgn_graf_blid_startup_01_mask); // bitmap mask id defiened in mbg file
+    // now using that bitmap provider create the texture.
+    CAlfTexture & texture1 = iEnv.TextureManager().CreateTextureL(
+            KAlfAutoGeneratedTextureId, provider, EAlfTextureFlagDefault);
+    iTextures.Append(&texture1);
+
+    // then create the bitmap provider  
+    provider = iView.ImageLoaderUtils()->CreateImageLoaderL(
+            KAknsIIDQgnGrafBlidStartup, // svg icon skin constant id defiened in Aknsconstant.h file
+            iView.ImagePathName(), // mif file name with path.
+            EMbmBlidQgn_graf_blid_startup_02, // bitmap id defiened in mbg file
+            EMbmBlidQgn_graf_blid_startup_02_mask); // bitmap mask id defiened in mbg file
+    // now using that bitmap provider create the texture.
+    CAlfTexture & texture2 = iEnv.TextureManager().CreateTextureL(
+            KAlfAutoGeneratedTextureId, provider, EAlfTextureFlagDefault);
+    iTextures.Append(&texture2);
+
+    // then create the bitmap provider  
+    provider = iView.ImageLoaderUtils()->CreateImageLoaderL(
+            KAknsIIDQgnGrafBlidStartup, // svg icon skin constant id defiened in Aknsconstant.h file
+            iView.ImagePathName(), // mif file name with path.
+            EMbmBlidQgn_graf_blid_startup_03, // bitmap id defiened in mbg file
+            EMbmBlidQgn_graf_blid_startup_03_mask); // bitmap mask id defiened in mbg file
+    // now using that bitmap provider create the texture.
+    CAlfTexture & texture3 = iEnv.TextureManager().CreateTextureL(
+            KAlfAutoGeneratedTextureId, provider, EAlfTextureFlagDefault);
+    iTextures.Append(&texture3);
+
+    // then create the bitmap provider  
+    provider = iView.ImageLoaderUtils()->CreateImageLoaderL(
+            KAknsIIDQgnGrafBlidStartup, // svg icon skin constant id defiened in Aknsconstant.h file
+            iView.ImagePathName(), // mif file name with path.
+            EMbmBlidQgn_graf_blid_startup_04, // bitmap id defiened in mbg file
+            EMbmBlidQgn_graf_blid_startup_04_mask); // bitmap mask id defiened in mbg file
+    // now using that bitmap provider create the texture.
+    CAlfTexture & texture4 = iEnv.TextureManager().CreateTextureL(
+            KAlfAutoGeneratedTextureId, provider, EAlfTextureFlagDefault);
+    iTextures.Append(&texture4);
+
+    // then create the bitmap provider  
+    provider = iView.ImageLoaderUtils()->CreateImageLoaderL(
+            KAknsIIDQgnGrafBlidStartup, // svg icon skin constant id defiened in Aknsconstant.h file
+            iView.ImagePathName(), // mif file name with path.
+            EMbmBlidQgn_graf_blid_startup_05, // bitmap id defiened in mbg file
+            EMbmBlidQgn_graf_blid_startup_05_mask); // bitmap mask id defiened in mbg file
+    // now using that bitmap provider create the texture.
+    CAlfTexture & texture5 = iEnv.TextureManager().CreateTextureL(
+            KAlfAutoGeneratedTextureId, provider, EAlfTextureFlagDefault);
+    iTextures.Append(&texture5);
+
+    // then create the bitmap provider  
+    provider = iView.ImageLoaderUtils()->CreateImageLoaderL(
+            KAknsIIDQgnGrafBlidStartup, // svg icon skin constant id defiened in Aknsconstant.h file
+            iView.ImagePathName(), // mif file name with path.
+            EMbmBlidQgn_graf_blid_startup_06, // bitmap id defiened in mbg file
+            EMbmBlidQgn_graf_blid_startup_06_mask); // bitmap mask id defiened in mbg file
+    // now using that bitmap provider create the texture.
+    CAlfTexture & texture6 = iEnv.TextureManager().CreateTextureL(
+            KAlfAutoGeneratedTextureId, provider, EAlfTextureFlagDefault);
+    iTextures.Append(&texture6);
+
+    // then create the bitmap provider  
+    provider = iView.ImageLoaderUtils()->CreateImageLoaderL(
+            KAknsIIDQgnGrafBlidStartup, // svg icon skin constant id defiened in Aknsconstant.h file
+            iView.ImagePathName(), // mif file name with path.
+            EMbmBlidQgn_graf_blid_startup_07, // bitmap id defiened in mbg file
+            EMbmBlidQgn_graf_blid_startup_07_mask); // bitmap mask id defiened in mbg file
+    // now using that bitmap provider create the texture.
+    CAlfTexture & texture7 = iEnv.TextureManager().CreateTextureL(
+            KAlfAutoGeneratedTextureId, provider, EAlfTextureFlagDefault);
+    iTextures.Append(&texture7);
+
+    // then create the bitmap provider  
+    provider = iView.ImageLoaderUtils()->CreateImageLoaderL(
+            KAknsIIDQgnGrafBlidStartup, // svg icon skin constant id defiened in Aknsconstant.h file
+            iView.ImagePathName(), // mif file name with path.
+            EMbmBlidQgn_graf_blid_startup_08, // bitmap id defiened in mbg file
+            EMbmBlidQgn_graf_blid_startup_08_mask); // bitmap mask id defiened in mbg file
+    // now using that bitmap provider create the texture.
+    CAlfTexture & texture8 = iEnv.TextureManager().CreateTextureL(
+            KAlfAutoGeneratedTextureId, provider, EAlfTextureFlagDefault);
+    iTextures.Append(&texture8);
+
+    }
+
+// ---------------------------------------------------------
+// CBlidMainControl::UpdateAnimation
+// updates the animation image
+// ---------------------------------------------------------
+//
+void CBlidMainControl::UpdateAnimation()
+    {
+    if (KNumOfStartUpIcon > iDisplayIcon)
+        {
+        iDisplayIcon++;
+        }
+    else
+        {
+        iDisplayIcon = 1;
+        }
+    iAnimationVisual->SetImage(TAlfImage(*iTextures[iDisplayIcon - 1]));//N   
+    }
+
+// ----------------------------------------------------
+// CBlidMainControl::~CBlidMainControl
+// Destructor
+// Frees reserved resources
+// ----------------------------------------------------
+//
+CBlidMainControl::~CBlidMainControl()
+    {
+    iTextures.Reset();
+    iTextures.Close();
+    delete iLauncher;
+    delete iHeadPaneText;
+    delete iMsgQueryText;
+    delete iLinkText;
+    delete iMsgQText;
+    delete iPeriodic;
+    }
+
+// ---------------------------------------------------------
+// CBlidMainControl::UpdateL
+// Updates the view after getting update from location model
+// ---------------------------------------------------------
+//
+void CBlidMainControl::UpdateL()
+    {
+    TInt result = 0;
+    DEBUG1(" CBlidMainControl::UpdateL iErrorCode ::%d", iErrorCode );
+
+    if (!iView.IsSatViewActive() && iOnlineMode)
+        {
+
+        if (iView.IsForeGroundApp())
+            {
+            iView.ActivateSatelliteViewL();
+            }
+        }
+    TInt retVal = iLocation->CheckGPSAvailability();
+    // Check GPS device availability
+    DEBUG1(" CBlidMainControl::CheckGPSAvailability code ::%d", retVal );
+    switch (iErrorCode)
+        {
+        case KErrTimedOut:
+            {
+            if (retVal == 1)
+                {
+                /* 
+                 GPS device connected but position information
+                 available but not of good quality
+                 */
+                if (iView.IsForeGroundApp())
+                    {
+                    iView.ActivateSatelliteViewL();
+                    }
+                }
+            break;
+            }
+        case KErrNotFound:
+            // No module (PSY) selected or invalid PSY
+                {
+                iOnlineMode = EFalse;
+                if (iView.IsForeGroundApp())
+                    {
+                    iLocation->StopRequesting();
+                    TCallBack callback(MessageQueryCallBack, this);
+                    result
+                            = DispMsgQueryWithLinkL(R_BLID_NOGPS_FOUND,
+                                    R_BLID_NOGPS_FOUND_TEXT,
+                                    R_BLID_SELECT_POSITIONING_METHOD, ETrue,
+                                    callback);
+                    if (result == EBlidSoftkeyRetry)
+                        {
+                        iLocation->StartRequesting();
+                        }
+                    else if (result == EAknSoftkeyOk)
+                        {
+                        iView.ExitMainApplicationL(EEikCmdExit);
+                        }
+                    }
+                break;
+                }
+            case KPositionPartialUpdate:
+                {
+                if (iView.IsForeGroundApp())
+                    {
+                    iView.ActivateSatelliteViewL();
+                    }
+                break;
+                }
+            case KErrArgument:
+            // The positioning module is unable to support the requested type
+            default:
+                {
+                iOnlineMode = EFalse;
+
+                if (retVal == 0)
+                    {
+                    if (iLocation->IsSatCapablePsyAvailable())
+                        {
+                        iLocation->StopRequesting();
+                        iOnlineMode = EFalse;
+                        TCallBack callback(MessageQueryCallBack, this);
+                        result = DispMsgQueryWithLinkL(R_BLID_NOPSY_ENABLED,
+                                R_BLID_ERROR_NO_PSY,
+                                R_BLID_SELECT_POSITIONING_METHOD, ETrue,
+                                callback);
+                        if (result == EBlidSoftkeyRetry)
+                            {
+                            iLocation->StartRequesting();
+                            }
+                        else if (result == EAknSoftkeyOk)
+                            {
+                            iView.ExitMainApplicationL(EEikCmdExit);
+                            }
+                        }
+                    // no GPS device note
+                    // GPS un-available
+                    else if (iView.IsForeGroundApp())
+                        {
+                        iLocation->StopRequesting();
+                        TCallBack callback(MessageQueryCallBack, this);
+                        isAccessoryRequired = ETrue;
+                        result = DispMsgQueryWithLinkL(R_BLID_NOGPS_FOUND,
+                                R_BLID_NOGPS_AVAILABLE_TEXT,
+                                R_BLID_SELECT_POSITIONING_METHOD, EFalse,
+                                callback);
+                        if (result == EAknSoftkeyOk)
+                            {
+                            iView.ExitMainApplicationL(EEikCmdExit);
+                            }
+                        }
+                    else
+                        {
+                        BlidNotes::iGPSUnavailableDisplayed = ETrue;
+                        }
+                    CBlidBaseContainer::SetGPSAvailability(EFalse);
+                    }
+                break;
+
+            }
+        }
+    }
+
+// ----------------------------------------------------
+// CBlidMainControl::MakeTitleL
+// Sets the title to string represented by resource
+// ----------------------------------------------------
+//
+void CBlidMainControl::MakeTitleL(TInt aResourceText)
+    {
+    HBufC* buffer = StringLoader::LoadLC(aResourceText);
+    CAknTitlePane* title =
+            static_cast<CAknTitlePane*> (StatusPane()-> ControlL(TUid::Uid(
+                    EEikStatusPaneUidTitle)));
+    CleanupStack::Pop(); //buffer
+    title->SetText(buffer); // Takes ownership of buf
+    }
+
+// ----------------------------------------------------
+// CBlidMainControl::StatusPane
+// Returns the status pane
+// ----------------------------------------------------
+//
+CEikStatusPane* CBlidMainControl::StatusPane() const
+    {
+    return CEikonEnv::Static()->AppUiFactory()->StatusPane();
+    }
+
+// ----------------------------------------------------
+// CBlidMainControl::SetErrorCode
+// Sets the error code
+// ----------------------------------------------------
+//
+void CBlidMainControl::SetErrorCode(const TInt aErrorCode)
+    {
+    iErrorCode = aErrorCode;
+    }
+
+// ----------------------------------------------------
+// CBlidMainControl::SetOnlineMode
+// Sets the online mode
+// ----------------------------------------------------
+//
+void CBlidMainControl::SetOnlineMode(const TBool aOnlineMode)
+    {
+    iOnlineMode = aOnlineMode;
+    }
+
+// ----------------------------------------------------
+// CBlidMainControl::DispMsgQueryWithLinkL()
+// Displays the message query with a link
+// ----------------------------------------------------
+//
+TInt CBlidMainControl::DispMsgQueryWithLinkL(TInt aHeadingText,
+        TInt aMsgQueryText, TInt aLinkText, TBool aLinkShow,
+        TCallBack aCallBack)
+    {
+    CEikonEnv* env = CEikonEnv::Static();
+    if (!iHeadPaneText)
+        {
+        iHeadPaneText = env->AllocReadResourceL(aHeadingText);
+        }
+
+    if (!iMsgQueryText)
+        {
+        iMsgQueryText = env->AllocReadResourceL(aMsgQueryText);
+        }
+
+    if (!iLinkText)
+        {
+        iLinkText = env->AllocReadResourceL(aLinkText);
+        }
+    if (!iMsgQText)
+        {
+        if (aLinkShow != EFalse)
+            {
+            iMsgQText = HBufC::NewL(iMsgQueryText->Length()
+                    + KNewLine().Length() + KOpeningLinkTag().Length()
+                    + iLinkText->Length() + KClosingLinkTag().Length());
+            }
+        else
+            {
+            iMsgQText = HBufC::NewL(iMsgQueryText->Length()
+                    + KNewLine().Length() + KOpeningLinkTag().Length());
+            }
+        }
+
+    iMsgQText->Des().Copy(*iMsgQueryText);
+    iMsgQText->Des().Append(KNewLine);
+    if (!isAccessoryRequired)
+        {
+        iMsgQText->Des().Append(KOpeningLinkTag);
+        iMsgQText->Des().Append(*iLinkText);
+        iMsgQText->Des().Append(KClosingLinkTag);
+        }
+    else
+        {
+        iMsgQText->Des().Append(_L( " "));
+        }
+    //////////////////////////////////////////////////////
+    CAknMessageQueryDialog* msgDlg = CAknMessageQueryDialog::NewL(*iMsgQText);
+
+    // if we remove this if part it will give CONE8 panic
+    if (iDialog)
+        {
+        delete iDialog;
+        iDialog = NULL;
+        }
+
+    iDialog = msgDlg;
+
+    msgDlg->PrepareLC(R_BLID_MESSAGE_QUERY_DIALOG); // Pushed dialog is popped inside RunLD
+
+    msgDlg->Heading()->SetTextL(*iHeadPaneText);
+
+    msgDlg->SetLink(aCallBack);
+
+    if (!isAccessoryRequired)
+        {
+        msgDlg->ButtonGroupContainer().SetCommandSetL(
+                R_BLID_INFOPOPUP_SOFTKEYS_RETRY__EXIT);
+        }
+    else
+        {
+        msgDlg->ButtonGroupContainer().SetCommandSetL(
+                R_BLID_INFOPOPUP_SOFTKEYS_EXIT);
+        }
+    isDialogLaunched = ETrue;
+    TInt retval = msgDlg->RunLD();
+    if (isDialogLaunched)
+        {
+        msgDlg = NULL;
+        iDialog = NULL;
+        isDialogLaunched = EFalse;
+        return retval;
+        }
+    return -1;
+    }
+
+// ----------------------------------------------------
+// CBlidMainControl::CreateNaviPaneL
+// Creates navigation pane
+// ----------------------------------------------------
+//
+void CBlidMainControl::CreateNaviPaneL()
+    {
+    CEikStatusPane* sp = CEikonEnv::Static()->AppUiFactory()->StatusPane();
+    // Fetch pointer to the default navi pane control
+    CAknNavigationControlContainer* naviPane =
+            static_cast<CAknNavigationControlContainer*> (sp->ControlL(
+                    TUid::Uid(EEikStatusPaneUidNavi)));
+
+    naviPane->PushDefaultL(EFalse);
+    }
+
+// ----------------------------------------------------
+// CBlidMainControl::LaunchPositioningSettingsViewL
+// Launches positioning settings view
+// ----------------------------------------------------
+//
+void CBlidMainControl::LaunchPositioningSettingsViewL()
+    {
+    if (!iLauncher)
+        {
+        iLauncher = CBlidLocSettingsLauncher::NewL();
+        }
+    iLauncher->SetControl(this);
+    isSettingsLaunched = ETrue;
+    iLauncher->LaunchL();
+    }
+
+// ----------------------------------------------------
+// CBlidMainControl::DeleteDialogResource
+// Seletes the dialog resources
+// ----------------------------------------------------
+//
+void CBlidMainControl::DeleteDialogResource()
+    {
+    if (isSettingsLaunched)
+        {
+        delete iHeadPaneText;
+        iHeadPaneText = NULL;
+
+        delete iMsgQueryText;
+        iMsgQueryText = NULL;
+
+        delete iLinkText;
+        iLinkText = NULL;
+
+        delete iMsgQText;
+        iMsgQText = NULL;
+        }
+    }
+
+// ----------------------------------------------------
+// CBlidMainControl::UpdateDisplayLayoutL
+// Updates the display layout in response to a change in app resource
+// ----------------------------------------------------
+//
+void CBlidMainControl::UpdateDisplayLayoutL()
+    {
+    /* Layout Hierarchy
+     main_blid2_pane -> blid2_search_pane -> blid2_search_pane_t1
+     
+     main_blid2_pane -> blid2_search_pane -> blid2_search_pane_g1
+     */
+
+    TAknLayoutRect mainBlid2Pane;
+    TAknLayoutRect blid2SearchPane;
+    TAknLayoutRect blid2SearchPaneG1;
+    TAknLayoutText blid2SearchPaneT1;
+    //TRect animationRect;	
+    TInt variety;
+
+    if (Layout_Meta_Data::IsLandscapeOrientation())
+        {
+        variety = 1;
+        }
+    else
+        {
+        variety = 0;
+        }
+    /////////////// recalculate text rect /////////////////////////
+    TRect rect;
+    AknLayoutUtils::LayoutMetricsRect(AknLayoutUtils::EMainPane, rect);
+    mainBlid2Pane.LayoutRect(rect,
+            AknLayoutScalable_Apps::main_blid2_pane().LayoutLine());
+
+    blid2SearchPane.LayoutRect(mainBlid2Pane.Rect(),
+            AknLayoutScalable_Apps::blid2_search_pane(variety).LayoutLine());
+
+    blid2SearchPaneT1.LayoutText(
+            blid2SearchPane.Rect(),
+            AknLayoutScalable_Apps::blid2_search_pane_t1(variety).LayoutLine());
+
+    /////////////// recalculate animation rect /////////////////////////
+    blid2SearchPaneG1.LayoutRect(
+            blid2SearchPane.Rect(),
+            AknLayoutScalable_Apps::blid2_search_pane_g1(variety).LayoutLine());
+    iAnimationRect = blid2SearchPaneG1.Rect();
+
+    TAlfRealPoint topTextPoint(blid2SearchPaneT1.TextRect().iTl);
+    TAlfRealPoint bottomTextPoint(blid2SearchPaneT1.TextRect().iBr);
+
+    //Anchor for searching Text	
+    iMainLayout->SetAnchor(EAlfAnchorTopLeft, 0, EAlfAnchorOriginLeft,
+            EAlfAnchorOriginTop, EAlfAnchorMetricAbsolute,
+            EAlfAnchorMetricAbsolute, TAlfTimedPoint(topTextPoint.iX,
+                    topTextPoint.iY));
+    iMainLayout->SetAnchor(EAlfAnchorBottomRight, 0, EAlfAnchorOriginLeft,
+            EAlfAnchorOriginTop, EAlfAnchorMetricAbsolute,
+            EAlfAnchorMetricAbsolute, TAlfTimedPoint(bottomTextPoint.iX,
+                    bottomTextPoint.iY));
+
+    TAlfRealPoint topAnimationPoint(iAnimationRect.iTl);
+    TAlfRealPoint bottomAnimationPoint(iAnimationRect.iBr);
+
+    //Anchor for animation	
+    iMainLayout->SetAnchor(EAlfAnchorTopLeft, 1, EAlfAnchorOriginLeft,
+            EAlfAnchorOriginTop, EAlfAnchorMetricAbsolute,
+            EAlfAnchorMetricAbsolute, TAlfTimedPoint(topAnimationPoint.iX,
+                    topAnimationPoint.iY));
+    iMainLayout->SetAnchor(EAlfAnchorBottomRight, 1, EAlfAnchorOriginLeft,
+            EAlfAnchorOriginTop, EAlfAnchorMetricAbsolute,
+            EAlfAnchorMetricAbsolute, TAlfTimedPoint(bottomAnimationPoint.iX,
+                    bottomAnimationPoint.iY));
+
+    }
+
+// -----------------------------------------------------------------------------
+// CBlidMainControl::MessageQueryCallBack()
+// Called when link is clicked on message query dialog
+// -----------------------------------------------------------------------------
+//
+TInt MessageQueryCallBack(TAny* aPtr)
+    {
+    CBlidMainControl* ptr = static_cast<CBlidMainControl*> (aPtr);
+    if (ptr)
+        {
+        TRAP_IGNORE( ptr->LaunchPositioningSettingsViewL() );
+        if (ptr->iDialog)
+            {
+            TRAP_IGNORE( ptr->iDialog->ProcessCommandL( 3001 ) );
+            }
+        }
+    return KErrNone;
+    }
+//End Of File
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/basiclocationinfodisplay/blid/ui/src/CBlidMainView.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,223 @@
+/*
+* Copyright (c) 2005-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:  Provides blid main view class methods.
+*
+*/
+
+
+// SYSTEM INCLUDE FILES
+#include <aknViewAppUi.h>
+#include <blid.rsg>
+#include <alf/alfenv.h>
+#include <alf/alfcontrolgroup.h>
+#include <alf/alfdisplay.h>
+#include <alf/alftransformation.h>
+#include <alf/alfroster.h>
+// USER INCLUDE FILES
+#include "CBlidMainView.h"
+#include "Blid.hrh"
+#include "CBlidMainControl.h"
+#include "MBlidLocation.h"
+#include "CBlidAppUi.h"
+#include "bliduiconsts.h"
+#include "Debug.h"
+
+//CONSTANTS
+enum TPanicCode
+    {
+    KBlidNullPointer = 1
+    };
+
+// ================= MEMBER FUNCTIONS =======================
+// ----------------------------------------------------------------------------
+// CBlidMainView::NewLC( MKeyProcessor& aKeyProcessor )
+// Two-phased constructor.
+// ----------------------------------------------------------------------------
+//
+CBlidMainView* CBlidMainView::NewLC( MKeyProcessor& aKeyProcessor,
+									 CAlfEnv& aEnv  )
+    {
+    CBlidMainView* self = new (ELeave) CBlidMainView( aKeyProcessor,aEnv );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    return self;
+    }
+// ----------------------------------------------------------------------------
+// CBlidMainView::CBlidMainView
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// ----------------------------------------------------------------------------
+//
+CBlidMainView::CBlidMainView( MKeyProcessor& aKeyProcessor ,
+							  CAlfEnv& aEnv ):
+    CBlidBaseView( aKeyProcessor ),
+    iEnv(aEnv)
+    {
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidMainView::ConstructL
+// Symbian 2nd phase constructor can leave.
+// ----------------------------------------------------------------------------
+//
+void CBlidMainView::ConstructL()
+    {
+    // Modify the Main view option key
+    BaseConstructL( R_BLID_MAIN_VIEW );
+    
+	// Create an instance of our list control.
+	iMainCtrl = CBlidMainControl::NewL(iEnv, ClientRect(), *this );
+	iMainCtrl->CreateNaviPaneL();
+
+	// Create a control group.
+	iMainCtrlGroup = &( iEnv.NewControlGroupL( KBlidMainGroup ) );
+
+	// pass ownership of the list control to the control group
+	iMainCtrlGroup->AppendL(iMainCtrl);
+
+    iCtrlDisplay = &( iEnv.NewDisplayL( ClientRect(), CAlfEnv::ENewDisplayAsCoeControl ) );
+	// Use the Avkon skin background as the display background.
+	iCtrlDisplay->SetClearBackgroundL(CAlfDisplay::EClearWithSkinBackground);
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidMainView::~CBlidMainView
+// ----------------------------------------------------------------------------
+//
+CBlidMainView::~CBlidMainView()
+    {
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidMainView::ProcessKeyEventL
+// ----------------------------------------------------------------------------
+//
+TBool CBlidMainView::ProcessKeyEventL( const TKeyEvent& aKeyEvent,
+    TEventCode aType )
+    {
+    return CBlidBaseView::ProcessKeyEventL( aKeyEvent,aType );
+    }
+
+// ----------------------------------------------------------------------------
+// TUid CBlidMainView::Id
+// ----------------------------------------------------------------------------
+//
+TUid CBlidMainView::Id() const
+    {
+    return TUid::Uid(EBlidMainView);
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidMainView::HandleCommandL
+// ----------------------------------------------------------------------------
+//
+void CBlidMainView::HandleCommandL(TInt aCommand)
+    {
+    (static_cast<CBlidAppUi*>(AppUi()))->HandleCommandL( aCommand );
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidMainView::DoActivateL
+// ----------------------------------------------------------------------------
+//
+void CBlidMainView::DoActivateL(
+   const TVwsViewId& /*aPrevViewId*/,TUid /*aCustomMessageId*/,
+   const TDesC8& /*aCustomMessage*/)
+    {
+    #ifdef _DEBUG
+    RDebug::Print(_L("CBlidMainView::DoActivateL() called"));
+    #endif
+
+    iLocation->SetObserver(*this, EBlidMainView); 
+    iMainCtrl->MakeTitleL( R_BLID_TITLE_MAIN );
+	
+	// Show the control group on the display.
+	iCtrlDisplay->Roster().ShowL( *iMainCtrlGroup );    
+   }
+
+// ----------------------------------------------------------------------------
+// CBlidMainView::DoDeactivate
+// ----------------------------------------------------------------------------
+//
+void CBlidMainView::DoDeactivate()
+    {
+	// Nothing to do.
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidMainView::NotifyL
+// ----------------------------------------------------------------------------
+//
+void CBlidMainView::NotifyL( const TBool aOnlineMode )
+    {  
+    if( iMainCtrl &&  aOnlineMode )
+        {
+        iMainCtrl->SetErrorCode( KErrNone );
+        iMainCtrl->SetOnlineMode( aOnlineMode );
+        iMainCtrl->UpdateL();
+        }
+	DEBUG1(" CBlidMainView::NotifyL called ::%d", aOnlineMode );        
+    CBlidBaseView::NotifyL( aOnlineMode );
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidMainView::NotifyError
+// ----------------------------------------------------------------------------
+//
+void CBlidMainView::NotifyErrorL( TInt aErrorCode )
+    {
+    CBlidBaseView::NotifyErrorL( aErrorCode );    
+    DEBUG1(" CBlidMainView::NotifyErrorL errorcode ::%d", aErrorCode );
+    if( iMainCtrl )
+        {
+        iMainCtrl->SetErrorCode( aErrorCode );
+        iMainCtrl->UpdateL();
+        }
+    }
+
+// ----------------------------------------------------------
+// Handle Resource Change Events: Display orientation switch
+// ----------------------------------------------------------
+//
+void CBlidMainView::HandleResourceChangeL( TInt aType )
+    {
+    if(aType == KEikDynamicLayoutVariantSwitch)
+        {
+        TRect rect;
+        AknLayoutUtils::LayoutMetricsRect(AknLayoutUtils::EMainPane, rect);
+        
+        // Notify skin of changed display size.
+        iEnv.PrimaryDisplay().SetVisibleArea(rect);
+        iMainCtrl->UpdateDisplayLayoutL();
+        }
+    }
+
+CBlidMainControl* CBlidMainView::GetControl()
+    {
+    return iMainCtrl;
+    }
+    
+#ifdef RD_SCALABLE_UI_V2
+// ---------------------------------------------------------------------------
+// CBlidNavigationView::HandleListBoxSelectionL
+// ---------------------------------------------------------------------------
+//
+void CBlidMainView::HandleListBoxSelectionL()
+    {
+    //Do something if needed
+    }
+#endif //RD_SCALABLE_UI_V2    
+// End of File
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/basiclocationinfodisplay/blid/ui/src/CBlidNavigationView.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,533 @@
+/*
+* Copyright (c) 2005-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:  Provides blid compass view class methods.
+*
+*/
+
+
+// SYSTEM INCLUDE FILES
+#include <blid.rsg>
+//Added for HTK toolkit support
+#include <alf/alfenv.h>
+#include <alf/alfcontrolgroup.h>
+#include <alf/alfdisplay.h>
+#include <alf/alftransformation.h>
+#include <alf/alfroster.h>
+//End of addition
+
+#include <csxhelp/blid.hlp.hrh>
+#include <hlplch.h>
+
+// USER INCLUDE
+#include "CBlidNavigationView.h"
+#include "Blid.hrh"
+#include "CBlidDocument.h"
+#include "CBlidAppUi.h"
+#include "CBlidEng.h"
+#include "CHtkNavigationControl.h"
+#include "CHtkTripMeterControl.h"
+#include "MBlidSettings.h"
+#include "CBlidLocSettingLauncher.h"
+#include "bliduiconsts.h"
+#include "BlidUID.h"
+
+
+// ================= MEMBER FUNCTIONS =======================
+// ----------------------------------------------------------------------------
+// CBlidNavigationView::NewLC
+// Two-phased constructor.
+// ----------------------------------------------------------------------------
+//
+CBlidNavigationView* CBlidNavigationView::NewLC( MKeyProcessor& aKeyProcessor,
+												 CAlfEnv& aEnv )
+    {
+    CBlidNavigationView* self = new (ELeave) CBlidNavigationView( aKeyProcessor,aEnv );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    return self;
+    }
+// ----------------------------------------------------------------------------
+// CBlidNavigationView::CBlidNavigationView
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// ----------------------------------------------------------------------------
+//
+CBlidNavigationView::CBlidNavigationView( MKeyProcessor& aKeyProcessor,
+										  CAlfEnv& aEnv ):
+    CBlidBaseView( aKeyProcessor ),
+    iEnv(aEnv)
+    {
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidNavigationView::ConstructL
+// Symbian 2nd phase constructor can leave.
+// ----------------------------------------------------------------------------
+//
+void CBlidNavigationView::ConstructL()
+    {
+    BaseConstructL( R_BLID_NAVIGATION_VIEW );
+
+	// Create an instance of our list control.
+	iNavigationCtrl = CHtkNavigationControl::NewL(iEnv,
+												  this,
+												  ClientRect(),
+												  *iLocation,
+												  *iRouter,
+												  *iEngine,
+												  *this );
+
+
+	// Create a control group.
+	iNavigationCtrlGroup = &( iEnv.NewControlGroupL( KPrimaryGroup ) );
+
+	// pass ownership of the list control to the control group
+	iNavigationCtrlGroup->AppendL(iNavigationCtrl);
+
+    iCtrlDisplay = &( iEnv.NewDisplayL( ClientRect(), CAlfEnv::ENewDisplayAsCoeControl ) );
+	// Use the Avkon skin background as the display background.
+	iCtrlDisplay->SetClearBackgroundL(CAlfDisplay::EClearWithSkinBackground);
+
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidNavigationView::~CBlidNavigationView
+// ----------------------------------------------------------------------------
+//
+CBlidNavigationView::~CBlidNavigationView()
+    {
+    delete iLauncher;
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidNavigationView::NotifyL
+// ----------------------------------------------------------------------------
+//
+void CBlidNavigationView::NotifyL( const TBool aOnlineMode )
+    {  
+    iNavigationCtrl->UpdateL();
+    CBlidBaseView::NotifyL( aOnlineMode );
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidNavigationView::NotifyError
+// ----------------------------------------------------------------------------
+//
+void CBlidNavigationView::NotifyErrorL( TInt aErrorCode )
+    {
+    CBlidBaseView::NotifyErrorL( aErrorCode );    
+    iNavigationCtrl->UpdateL();
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidNavigationView::ProcessKeyEventL
+// ----------------------------------------------------------------------------
+//
+TBool CBlidNavigationView::ProcessKeyEventL( const TKeyEvent& aKeyEvent,
+    TEventCode aType )
+    {
+    return CBlidBaseView::ProcessKeyEventL( aKeyEvent,aType );
+    }
+
+// ----------------------------------------------------------------------------
+// TUid CBlidNavigationView::Id
+// ----------------------------------------------------------------------------
+//
+TUid CBlidNavigationView::Id() const
+    {
+    return TUid::Uid(EBlidNavigationView);
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidNavigationView::HandleCommandL
+// ----------------------------------------------------------------------------
+//
+void CBlidNavigationView::HandleCommandL(TInt aCommand)
+    {
+    switch ( aCommand )
+        {
+        case EBlidCmdWaypoint:
+            {
+            TInt index(0);
+
+            if ( iRouter->Count() > 0 )
+                {
+                index = SelectWaypointL();
+                if ( index != KErrCancel )
+                    {
+                    iRouter->SetWaypoint( index );
+                    }
+                }
+            iNavigationCtrl->ClearNavigationInfoL();
+			iNavigationCtrl->SetUpdateOptionL( ETrue );
+			iLocation->SetNavigationStart( ETrue );
+			iNavigationCtrl->SetFlagVisualL( );
+			iNavigationCtrl->SetAccRacyVisualL();
+			CHtkNavigationControl::iInArrivedZone = EFalse;
+			if(iEngine->HasArrivedToDestination())
+            	{
+            	CHtkNavigationControl::iInArrivedZone = ETrue; 	
+            	}
+            iNavigationCtrl->UpdateL();
+            break;
+            }
+        case EBlidCmdSavedWaypoints:
+        	{
+        	AppUi()->ActivateLocalViewL( TUid::Uid( EBlidSavedWayptsView ) );
+        	break;
+        	}
+        case EBlidCmdStopNavigation:
+            {
+            iRouter->ClearSetPoints();
+            iNavigationCtrl->ClearNavigationInfoL();
+            iLocation->SetNavigationStart( EFalse );
+            static_cast<CHtkTripMeterControl*>( &( iEnv.ControlGroup( KPrimaryTripGroup ).Control( 0 ) ) )->ChangeTripFocus( ETrue );
+            iNavigationCtrl->UpdateL();            
+            break;
+            }
+        case EBlidCmdLmk:
+	        {	        
+	        if(LaunchLandmarksDialogL())
+	        	{
+	        	iNavigationCtrl->ClearNavigationInfoL();
+	        	iNavigationCtrl->SetFlagVisualL( );
+	        	iNavigationCtrl->SetAccRacyVisualL();
+	        	iNavigationCtrl->SetUpdateOptionL( ETrue );
+	        	iLocation->SetNavigationStart( ETrue );
+   	            static_cast<CHtkTripMeterControl*>( &( iEnv.ControlGroup( KPrimaryTripGroup ).Control( 0 ) ) )->ReChangeTripFocus();
+   	            CHtkNavigationControl::iInArrivedZone = EFalse;
+   	            if(iEngine->HasArrivedToDestination())
+   	            	{
+   	            	CHtkNavigationControl::iInArrivedZone = ETrue; 	
+   	            	}
+	        	iNavigationCtrl->UpdateL();	        		
+	        	}	        
+            break;
+	        }
+        case EBlidCmdManualWaypoint:
+            {
+            if(LaunchManualWaypointDialogL())
+            	{
+            	iNavigationCtrl->ClearNavigationInfoL();
+            	iNavigationCtrl->SetFlagVisualL( );
+            	iNavigationCtrl->SetAccRacyVisualL();
+            	iNavigationCtrl->SetUpdateOptionL( ETrue );
+            	iLocation->SetNavigationStart( ETrue );
+            	static_cast<CHtkTripMeterControl*>( &( iEnv.ControlGroup( KPrimaryTripGroup ).Control( 0 ) ) )->ReChangeTripFocus();            	
+            	CHtkNavigationControl::iInArrivedZone = EFalse;
+            	if(iEngine->HasArrivedToDestination())
+   	            	{
+   	            	CHtkNavigationControl::iInArrivedZone = ETrue; 	
+   	            	}
+            	iNavigationCtrl->UpdateL();            	
+            	}            
+            break;
+            }
+        case EBlidCmdSaveLocation:
+        	{
+        	if ( !FeatureManager::FeatureSupported( KFeatureIdLandmarks ) )
+        		{
+        		if ( InsertWaypointL() )
+	                {
+	                static_cast<CBlidDocument*>(AppUi()->Document())->SaveL();
+	                }
+	            else
+	            	{
+	            	User::Leave( KErrGeneral );	
+	            	}    
+        		}
+        	else
+        		{
+        		SaveCurrentPositionAsLandmarkL();
+        		}
+            break;		        		
+        	}
+        case EBlidCmdSatelliteStatus:
+            {
+            TBool lBacklightNormal = EFalse;
+            iNavigationCtrl->StopPlayerL();
+            MBlidSettings* setting = iEngine->SettingsModel();        
+            if(setting->GetBacklightOption() == EBlidBackLightOnDuringNavigation)
+                {
+                setting->SetBacklightOption(EBlidBackLightNormal);
+                iEngine->SetBackLightStateL(CBlidEng::EBlidBacklightNormal);
+                lBacklightNormal = ETrue;    
+                }
+            (static_cast<CBlidAppUi*>(AppUi()))->HandleCommandL( aCommand );
+            if(lBacklightNormal)
+                {
+                iEngine->SetBackLightStateL(CBlidEng::EBlidBacklightAlwaysOn); 
+                setting->SetBacklightOption(EBlidBackLightOnDuringNavigation);               
+                }
+            break;
+            }
+        case EBlidCmdSettings:
+            {
+            iIsSettingsViewActive = ETrue;
+            (static_cast<CBlidAppUi*>(AppUi()))->HandleCommandL( aCommand );
+             break;
+            }
+       	case EBlidCmdShowDetails:
+	       	{
+	       	iNavigationCtrl->StopPlayerL();
+	       	ShowCurrentPositionInfoL();
+			break;	       		
+	       	}
+        case EBlidCmdLaunchPositionSettings:
+        	{
+        	iNavigationCtrl->StopPlayerL();
+        	if(!iLauncher)
+        		{
+        		iLauncher = CBlidLocSettingsLauncher::NewL();        		
+        		}
+        	iLauncher->LaunchL();
+        	break;
+        	}
+        case EBlidSoftKeyStop:
+	        {
+	        iNavigationCtrl->StopPlayerL();
+			break;	        	
+	        }
+        case EBlidNavigationMskInfo:
+	        {
+	        iNavigationCtrl->DisplayInfoPopUpMsgL();
+			break;	        	
+	        }
+        case EAknCmdHelp:
+             {
+             TCoeHelpContext context( TUid::Uid(KBLIDUID3), KHLP_BLID_NAVIGATION );
+             CArrayFix<TCoeHelpContext>* navHelp = new CArrayFixFlat<TCoeHelpContext>(1);
+             CleanupStack::PushL( navHelp );
+             navHelp->AppendL(context);
+             HlpLauncher::LaunchHelpApplicationL(iCoeEnv->WsSession(), navHelp );
+             CleanupStack::Pop( navHelp );                        
+             break;
+             }
+        default:
+            {
+            (static_cast<CBlidAppUi*>(AppUi()))->HandleCommandL( aCommand );
+            break;
+            }
+        }
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidNavigationView::DoActivateL
+// ----------------------------------------------------------------------------
+//
+void CBlidNavigationView::DoActivateL(
+   const TVwsViewId& aPrevViewId,TUid /*aCustomMessageId*/,
+   const TDesC8& /*aCustomMessage*/)
+    {
+    #ifdef _DEBUG
+    RDebug::Print(_L("CBlidNavigationView::DoActivateL() called"));
+    #endif
+	
+	iIsSettingsViewActive = EFalse;
+	
+    iLocation->SetObserver(*this, EBlidNavigationView); 
+    iNavigationCtrl->MakeTitleL(R_BLID_TITLE_NAVIGATION);
+    iNavigationCtrl->UpdateL();
+    
+    if( aPrevViewId.iViewUid.iUid != EBlidTripMeterView )
+	    {
+	    iNavigationCtrl->CreateNaviPaneL( EFalse );
+	    iNavigationCtrl->ActivateTabL( *( iNavigationCtrl->GetNiviDecorator( ) ), EBlidNavigationView );	
+	    
+		// Hide the trip meter control
+		iCtrlDisplay->Roster().Hide( iEnv.ControlGroup( KBlidMainSatelliteGroup ) );
+		}
+	
+	// Hide the trip meter control
+	iCtrlDisplay->Roster().Hide( iEnv.ControlGroup( KPrimaryTripGroup ) );
+	
+	// Show the control group on the display.
+	iCtrlDisplay->Roster().ShowL( *iNavigationCtrlGroup );    
+
+    MenuBar()->SetContextMenuTitleResourceId(R_BLID_VIEW_OK_MENUBAR);
+    MBlidSettings* setting = iEngine->SettingsModel();        
+    if(setting->GetBacklightOption() == EBlidBackLightOnDuringNavigation)
+    	{
+    	iEngine->SetBackLightStateL(CBlidEng::EBlidBacklightAlwaysOn);
+    	}
+   }
+
+// ----------------------------------------------------------------------------
+// CBlidNavigationView::DoDeactivate
+// ----------------------------------------------------------------------------
+//
+void CBlidNavigationView::DoDeactivate()
+    {
+    TRAP_IGNORE(iEngine->SetBackLightStateL(CBlidEng::EBlidBacklightNormal));
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidNavigationView::SelectWaypointL
+// ----------------------------------------------------------------------------
+//
+TInt CBlidNavigationView::SelectWaypointL()
+    {
+    TBool lBacklightNormal = EFalse;
+    MBlidSettings* setting = iEngine->SettingsModel();
+    iNavigationCtrl->StopPlayerL();        
+    if(setting->GetBacklightOption() == EBlidBackLightOnDuringNavigation)
+        {
+        setting->SetBacklightOption(EBlidBackLightNormal);
+        iEngine->SetBackLightStateL(CBlidEng::EBlidBacklightNormal);
+        lBacklightNormal = ETrue;    
+        }
+    TInt index = CBlidBaseView::SelectWaypointL();
+    if(lBacklightNormal)
+        {
+        iEngine->SetBackLightStateL(CBlidEng::EBlidBacklightAlwaysOn);                
+        setting->SetBacklightOption(EBlidBackLightOnDuringNavigation);               
+        }
+    return index;        
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidNavigationView::LaunchLandmarksDialogL
+// ----------------------------------------------------------------------------
+//
+TInt CBlidNavigationView::LaunchLandmarksDialogL()
+    {
+    TBool lBacklightNormal = EFalse;
+    MBlidSettings* setting = iEngine->SettingsModel();
+    iNavigationCtrl->StopPlayerL();        
+    if(setting->GetBacklightOption() == EBlidBackLightOnDuringNavigation)
+        {
+        setting->SetBacklightOption(EBlidBackLightNormal);
+        iEngine->SetBackLightStateL(CBlidEng::EBlidBacklightNormal);
+        lBacklightNormal = ETrue;    
+        }
+    TInt lResult = CBlidBaseView::LaunchLandmarksDialogL();
+    if(lBacklightNormal)
+        {
+        iEngine->SetBackLightStateL(CBlidEng::EBlidBacklightAlwaysOn);                
+        setting->SetBacklightOption(EBlidBackLightOnDuringNavigation);               
+        }
+    return lResult;            
+    }
+    
+// ----------------------------------------------------------------------------
+// CBlidNavigationView::LaunchManualWaypointDialogL
+// ----------------------------------------------------------------------------
+//
+TInt CBlidNavigationView::LaunchManualWaypointDialogL()
+    {
+    TBool lBacklightNormal = EFalse;
+    MBlidSettings* setting = iEngine->SettingsModel();
+    iNavigationCtrl->StopPlayerL();        
+    if(setting->GetBacklightOption() == EBlidBackLightOnDuringNavigation)
+        {
+        setting->SetBacklightOption(EBlidBackLightNormal);
+        iEngine->SetBackLightStateL(CBlidEng::EBlidBacklightNormal);
+        lBacklightNormal = ETrue;    
+        }
+    TInt lResult = CBlidBaseView::LaunchManualWaypointDialogL();
+    if(lBacklightNormal)
+        {
+        iEngine->SetBackLightStateL(CBlidEng::EBlidBacklightAlwaysOn);                
+        setting->SetBacklightOption(EBlidBackLightOnDuringNavigation);               
+        }
+    return lResult;            
+    } 
+    
+    
+// ----------------------------------------------------------------------------
+// CBlidNavigationView::InsertWaypointL
+// ----------------------------------------------------------------------------
+//
+TBool CBlidNavigationView::InsertWaypointL()
+    {
+    TBool lBacklightNormal = EFalse;
+    MBlidSettings* setting = iEngine->SettingsModel();
+    iNavigationCtrl->StopPlayerL();   
+    if(setting->GetBacklightOption() == EBlidBackLightOnDuringNavigation)
+        {
+        setting->SetBacklightOption(EBlidBackLightNormal);
+        iEngine->SetBackLightStateL(CBlidEng::EBlidBacklightNormal);
+        lBacklightNormal = ETrue;    
+        }
+    TBool lResult = CBlidBaseView::InsertWaypointL();
+    if(lBacklightNormal)
+        {
+        iEngine->SetBackLightStateL(CBlidEng::EBlidBacklightAlwaysOn);                
+        setting->SetBacklightOption(EBlidBackLightOnDuringNavigation);               
+        }
+    return lResult;            
+    } 
+  
+  
+// ----------------------------------------------------------------------------
+// CBlidNavigationView::SaveCurrentPositionAsLandmarkL
+// ----------------------------------------------------------------------------
+//
+void CBlidNavigationView::SaveCurrentPositionAsLandmarkL()
+    {
+    TBool lBacklightNormal = EFalse;
+    MBlidSettings* setting = iEngine->SettingsModel();        
+    iNavigationCtrl->StopPlayerL();
+    if(setting->GetBacklightOption() == EBlidBackLightOnDuringNavigation)
+        {
+        setting->SetBacklightOption(EBlidBackLightNormal);
+        iEngine->SetBackLightStateL(CBlidEng::EBlidBacklightNormal);
+        lBacklightNormal = ETrue;    
+        }
+    CBlidBaseView::SaveCurrentPositionAsLandmarkL();
+    if(lBacklightNormal)
+        {
+        iEngine->SetBackLightStateL(CBlidEng::EBlidBacklightAlwaysOn);                
+        setting->SetBacklightOption(EBlidBackLightOnDuringNavigation);               
+        }    
+    } 
+
+// ----------------------------------------------------------------------------
+// CBlidNavigationView::GetControl
+// ----------------------------------------------------------------------------
+//
+CHtkNavigationControl* CBlidNavigationView::GetControl()
+    {
+    return iNavigationCtrl;
+    }
+
+// ----------------------------------------------------------
+// Handle Resource Change Events: Display orientation switch
+// ----------------------------------------------------------
+//
+void CBlidNavigationView::HandleResourceChangeL( TInt aType )
+    {
+    if(aType == KEikDynamicLayoutVariantSwitch)
+        {
+        TRect rect;
+        AknLayoutUtils::LayoutMetricsRect(AknLayoutUtils::EMainPane, rect);
+        
+        // Notify skin of changed display size.
+        iEnv.PrimaryDisplay().SetVisibleArea(rect);
+        iNavigationCtrl->UpdateLayoutL();
+        }
+    }
+
+#ifdef RD_SCALABLE_UI_V2
+// ---------------------------------------------------------------------------
+// CBlidNavigationView::HandleListBoxSelectionL
+// ---------------------------------------------------------------------------
+//
+void CBlidNavigationView::HandleListBoxSelectionL()
+    {
+    //Do something if needed
+    }
+#endif //RD_SCALABLE_UI_V2
+    
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/basiclocationinfodisplay/blid/ui/src/CBlidOwnPosLBModel.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,420 @@
+/*
+* 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:  Provides OwnPosView's details.
+*
+*/
+
+
+// INCLUDE FILES
+#include <StringLoader.h> 
+#include <AknUtils.h>
+#include <blid.rsg>
+#include <aknlocationed.h>
+
+#include "CBlidOwnPosLBModel.h"
+#include "CBlidBaseContainer.h"
+#include "MBlidLocation.h"
+#include "MBlidSettings.h"
+#include "bliduiconsts.h"
+#include "Blid.hrh"
+#include "Blidutils.h"
+#include "lbscommon.h"
+
+
+//CONSTANTS
+
+// ================= MEMBER FUNCTIONS =======================
+// ----------------------------------------------------------------------------
+// CBlidOwnPosLBModel::NewLC
+// Two-phased constructor.
+// ----------------------------------------------------------------------------
+//
+CBlidOwnPosLBModel* CBlidOwnPosLBModel::NewLC( MBlidLocation* aLocationModel,
+                                               MBlidSettings* aSettings )
+    {
+    CBlidOwnPosLBModel* ptr =
+		new (ELeave) CBlidOwnPosLBModel( aLocationModel, aSettings );
+	CleanupStack::PushL(ptr);
+	ptr->ConstructL();
+	return ptr;
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidOwnPosLBModel::CBlidOwnPosLBModel
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// ----------------------------------------------------------------------------
+//
+CBlidOwnPosLBModel::CBlidOwnPosLBModel(MBlidLocation* aLocationModel,
+                                       MBlidSettings* aSettings ):
+    iLocationModel( aLocationModel ), iSettingsModel( aSettings )
+    {
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidOwnPosLBModel::ConstructL
+// Symbian 2nd phase constructor can leave.
+// ----------------------------------------------------------------------------
+//
+void CBlidOwnPosLBModel::ConstructL()
+    {
+    CEikonEnv* env = CEikonEnv::Static();
+    iBuffer = HBufC::NewL( KBlidLBLineMaxLen );
+
+    iLocale = new(ELeave)TLocale();
+
+    /// titles  
+    iBlidLatitude = StringLoader::LoadL( R_BLID_POSITION_LATITUDE, env);
+    iBlidLongitude = StringLoader::LoadL( R_BLID_POSITION_LONGITUDE, env);
+    iBlidAccuracy = StringLoader::LoadL( R_BLID_POSITION_ACCURACY, env);
+    iBlidAltAccuracy = StringLoader::LoadL( R_BLID_POSITION_ALTITUDE_ACCURACY, env);
+    //iBlidSpeed = StringLoader::LoadL( R_BLID_POSITION_SPEED, env);
+    iBlidAltitude = StringLoader::LoadL( R_BLID_POSITION_ALTITUDE, env);
+
+    iAccuraryFormatM = env->AllocReadResourceL( R_BLID_METRIC_METER );
+    iAccuraryFormatFt = env->AllocReadResourceL( R_BLID_IMPERIAL_FOOT);
+    iSpeedFormatKmph = env->AllocReadResourceL( R_BLID_METRIC_SPEED );
+    iSpeedFormatMph = env->AllocReadResourceL( R_BLID_IMPERIAL_SPEED );
+    iAltitudeFormatM = env->AllocReadResourceL( R_BLID_METRIC_METER );
+    iAltitudeFormatFt = env->AllocReadResourceL( R_BLID_IMPERIAL_FOOT );
+    iDataBeingCalculated = StringLoader::LoadL( R_BLID_CALCULATING_LIST, env);
+    iConnectGPS = StringLoader::LoadL( R_BLID_CONNECT_GPS_LIST, env);
+    iNotAvailable = env->AllocReadResourceL( R_BLID_NOT_AVAILABLE );
+    iDataBlank = StringLoader::LoadL( R_BLID_BLANK, env);
+    iWaitingGpsData = StringLoader::LoadL( R_BLID_WAITING_GPS_LIST, env);
+    }
+
+// ---------------------------------------------------------
+// CBlidOwnPosLBModel::~CBlidOwnPosLBModel
+// ---------------------------------------------------------
+//
+CBlidOwnPosLBModel::~CBlidOwnPosLBModel()
+    {
+    delete iLocale;
+
+    delete iBlidLatitude;
+    delete iBlidLongitude;
+    delete iBlidAltitude;
+    delete iBlidAltAccuracy;
+    //delete iBlidSpeed;
+    delete iBlidAccuracy;
+
+    delete iBuffer;
+    
+    delete iAccuraryFormatM;
+    delete iAccuraryFormatFt;
+    delete iSpeedFormatKmph;
+    delete iSpeedFormatMph;
+    delete iAltitudeFormatM;
+    delete iAltitudeFormatFt;
+    delete iDataBeingCalculated;
+    delete iConnectGPS;
+    delete iNotAvailable;
+    delete iDataBlank;
+    delete iWaitingGpsData;
+    }
+
+
+// ----------------------------------------------------------------------------
+// CBlidOwnPosLBModel::MdcaCount
+// ----------------------------------------------------------------------------
+//
+TInt CBlidOwnPosLBModel::MdcaCount() const
+    {
+    return 5;
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidOwnPosLBModel::MdcaPoint
+// ----------------------------------------------------------------------------
+//
+TPtrC16 CBlidOwnPosLBModel::MdcaPoint(TInt aIndex) const
+    {
+    TPtr ptr( iBuffer->Des() );
+    ptr.Zero();
+    const TPosition position = iLocationModel->GetCurrentPosition();
+    const TCourse course = iLocationModel->GetCourse();
+     
+    switch ( aIndex )
+        {
+        case ELocLatitudeItemId:
+            {            
+            TBuf<KBlidLBItemMaxLen> latitudeString;
+            LatitudeFormat( latitudeString, position );
+
+            ptr.Append( *iBlidLatitude );
+            ptr.Append( EKeyTab ); 
+            ptr.Append( latitudeString );
+            break;
+            }
+        case ELocLongitudeItemId:
+            {
+            TBuf<KBlidLBItemMaxLen> longitudeString;
+            LongitudeFormat( longitudeString, position );
+
+            ptr.Append( *iBlidLongitude );
+            ptr.Append( EKeyTab );
+            ptr.Append( longitudeString );
+            break;
+            }
+        case ELocAccuracyItemId:
+            {
+            TBuf<KBlidLBItemMaxLen> accuracyString;
+            AccuracyFormat( accuracyString, position );
+
+            ptr.Append( *iBlidAccuracy );
+            ptr.Append( EKeyTab );
+            ptr.Append( accuracyString );
+            break;
+            }
+        case ELocAltAccuracyItemId:
+            {
+            TBuf<KBlidLBItemMaxLen> altAccuracyString;
+            altAccuracyFormat( altAccuracyString );
+                        
+            ptr.Append( *iBlidAltAccuracy );
+            ptr.Append( EKeyTab );
+            ptr.Append( altAccuracyString );
+            break;
+            }
+        case ELocAltitudeItemId:
+            {
+            TBuf<KBlidLBItemMaxLen> altitudeString;
+            AltitudeFormat( altitudeString, position );
+
+            ptr.Append( *iBlidAltitude );
+            ptr.Append( EKeyTab );
+            ptr.Append( altitudeString );
+            break;
+            }
+        default:
+            {
+            break;
+            }
+        } //switch
+
+    AknTextUtils::LanguageSpecificNumberConversion( ptr );
+    return iBuffer->Des();
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidOwnPosLBModel::LatitudeFormat
+// ----------------------------------------------------------------------------
+//
+void CBlidOwnPosLBModel::LatitudeFormat( TDes& aLatitudeString,
+                                         TPosition aPosition ) const
+    {
+    TReal latitude = aPosition.Latitude();
+
+    if(!CBlidBaseContainer::IsGPSAvailable() || 
+       !iLocationModel->IsGPSDataAvailable() )
+        {
+        if(iLocationModel->WaitingGPSData())
+        	{
+        	aLatitudeString = *iWaitingGpsData;
+        	}
+        else
+        	{
+        	aLatitudeString = *iConnectGPS;
+        	}	 	
+	 	}
+	else if ( !Math::IsNaN(latitude) )
+        {    
+        HBufC* formatter = NULL;                     
+        TRAP_IGNORE(formatter = 
+                           CAknLocationEditor::DisplayableLocationL(aPosition,CAknLocationEditor::ELatitudeOnly));
+        if(formatter)  
+            {
+            aLatitudeString.Copy(formatter->Des());             
+            delete formatter;
+            }
+        formatter = NULL;
+        }
+    else
+        {   
+    	aLatitudeString = *iDataBeingCalculated;
+    	}    	
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidOwnPosLBModel::LongitudeFormat
+// ----------------------------------------------------------------------------
+//
+void CBlidOwnPosLBModel::LongitudeFormat( TDes& aLongitudeString,
+                                          TPosition aPosition ) const
+    {
+    TReal longitude = aPosition.Longitude();
+    
+    if(!CBlidBaseContainer::IsGPSAvailable() ||
+       !iLocationModel->IsGPSDataAvailable() )
+        {
+        aLongitudeString = *iDataBlank;
+        }
+    else if ( !Math::IsNaN(longitude) )
+        {  
+        HBufC* formatter = NULL;             
+        TRAP_IGNORE(formatter = 
+                           CAknLocationEditor::DisplayableLocationL(aPosition,CAknLocationEditor::ELongitudeOnly));
+
+        if(formatter)  
+            {
+            aLongitudeString.Copy(formatter->Des());             
+            delete formatter;
+            }                           
+        formatter = NULL;
+        }
+    else
+    	{
+   		aLongitudeString = *iDataBeingCalculated;
+    	}
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidOwnPosLBModel::AccuracyFormat
+// ----------------------------------------------------------------------------
+//
+void CBlidOwnPosLBModel::AccuracyFormat( TDes& aAccuracyString,
+                                         TPosition aPosition ) const
+    {
+    TReal accuracy = aPosition.HorizontalAccuracy();
+    TInt result(0);
+    
+    if(!CBlidBaseContainer::IsGPSAvailable() ||
+       !iLocationModel->IsGPSDataAvailable() )
+        {
+        aAccuracyString = *iDataBlank;
+        }
+    else if ( !Math::IsNaN(accuracy) &&
+         BlidUtils::TRealToTInt( accuracy, result) == KErrNone )
+        {        
+        if ( iSettingsModel->UnitOfMeasurement() == EUnitsMetric )
+            {
+            StringLoader::Format( aAccuracyString, *iAccuraryFormatM,
+                                  0, result );
+            }
+        else
+            {
+            if ( BlidUtils::TRealToTInt((accuracy*KMetreToFoot), 
+                result) != KErrNone )
+                {
+                aAccuracyString = *iDataBlank;
+                } 
+            else
+                {
+                StringLoader::Format( aAccuracyString, *iAccuraryFormatFt, 
+                                  0, result );
+                }
+            }
+        }
+    else
+    	{
+      	aAccuracyString = *iDataBeingCalculated;
+    	}
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidOwnPosLBModel::altAccuracyFormat
+// ----------------------------------------------------------------------------
+//
+void CBlidOwnPosLBModel::altAccuracyFormat( TDes& aAltAccuracyString ) const
+    {
+    const TPosition position = iLocationModel->GetCurrentPosition();    
+    const TReal32 altAccuracy = position.VerticalAccuracy();
+    TInt result(0);
+    TBuf<KBlidLBItemMaxLen> altitudeAccString;    
+    AltitudeFormat(altitudeAccString, iLocationModel->GetCurrentPosition());
+    
+    if(!CBlidBaseContainer::IsGPSAvailable() ||
+       !iLocationModel->IsGPSDataAvailable() ||
+       altitudeAccString == *iDataBlank)
+        {
+        aAltAccuracyString = *iDataBlank;
+        }    
+    else if ( !Math::IsNaN(altAccuracy) &&
+         BlidUtils::TRealToTInt( altAccuracy, result) == KErrNone )
+        {        
+        if ( iSettingsModel->UnitOfMeasurement() == EUnitsMetric )
+            {
+            StringLoader::Format( aAltAccuracyString, *iAccuraryFormatM,
+                                  0, result );
+            }
+        else
+            {
+            if ( BlidUtils::TRealToTInt((altAccuracy*KMetreToFoot), 
+                result) != KErrNone )
+                {
+                aAltAccuracyString = *iDataBlank;
+                } 
+            else
+                {
+                StringLoader::Format( aAltAccuracyString, *iAccuraryFormatFt, 
+                                  0, result );
+                }
+            }
+        }
+    else
+        {
+        aAltAccuracyString = *iDataBeingCalculated;
+        }
+    }
+
+
+// ----------------------------------------------------------------------------
+// CBlidOwnPosLBModel::AltitudeFormat
+// ----------------------------------------------------------------------------
+//
+void CBlidOwnPosLBModel::AltitudeFormat( TDes& aAltitudeString,
+                                         TPosition aPosition ) const
+    {
+    TReal altitude = aPosition.Altitude();
+    TInt result(0);
+    
+    if(!CBlidBaseContainer::IsGPSAvailable() || 
+       !iLocationModel->IsGPSDataAvailable() )
+        {
+        aAltitudeString = *iDataBlank;
+        }    
+    else if ( !Math::IsNaN(altitude) &&
+         BlidUtils::TRealToTInt((altitude - iSettingsModel->AltCalibration()),
+         result) == KErrNone )
+        {
+        if ( iSettingsModel->UnitOfMeasurement() == EUnitsMetric )
+            {
+        
+            StringLoader::Format( aAltitudeString, *iAltitudeFormatM, 
+                                  0, result );
+            }
+        else
+            {
+            TInt imperialAlt(0);
+            if ( BlidUtils::TRealToTInt((result*KMetreToFoot),
+                imperialAlt) != KErrNone )
+                {
+                aAltitudeString = *iDataBlank;
+                }
+            else
+                {
+                StringLoader::Format( aAltitudeString, *iAltitudeFormatFt,
+                                  0, imperialAlt );
+                }
+            }
+        }
+    else
+        {
+        aAltitudeString = *iDataBlank;
+        }
+
+    }
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/basiclocationinfodisplay/blid/ui/src/CBlidSatelliteControl.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,727 @@
+/*
+* Copyright (c) 2007-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:  Provides blid startup view class methods.
+*
+*/
+
+
+
+// SYSTEM INCLUDES
+#include <StringLoader.h>
+#include <blid.rsg>
+#include <blid.mbg>
+#include <akntitle.h> 
+#include <aknnavide.h> 
+#include <eikspane.h>
+#include <aknlayoutscalable_apps.cdl.h>
+#include <layoutmetadata.cdl.h>
+#include <AknUtils.h>
+#include <AknsConstants.h>
+ 
+#include <alf/alfenv.h>
+#include <alf/alfanchorlayout.h>
+#include <alf/alftextvisual.h>
+#include <alf/alftextstyle.h>
+#include <alf/alfborderbrush.h>
+#include <alf/alfbrusharray.h>
+#include <alf/alfevent.h>
+#include <alf/alftransformation.h>
+#include <alf/alftexture.h>
+#include <alf/alfdecklayout.h>
+#include <alf/alfutil.h>
+#include <alf/alfimagevisual.h>
+#include <alf/alftexture.h>
+#include <alf/alfimageloaderutil.h>
+#include <alf/alfflowlayout.h>
+
+// USER INCLUDES
+#include "CBlidSatelliteControl.h"
+#include "CBlidEng.h"
+#include "CBlidDocument.h"
+#include "MBlidLocation.h"
+#include "CBlidBaseView.h"
+#include "bliduiconsts.h"
+#include "Debug.h"
+
+TInt TimerCallBack(TAny* aPtr);
+
+// ================= MEMBER FUNCTIONS =======================
+// ---------------------------------------------------------
+// CBlidSatelliteControl::NewL()
+// ---------------------------------------------------------
+//
+CBlidSatelliteControl* CBlidSatelliteControl::NewL( CAlfEnv& aEnv,
+		                                  const TRect& aRect,
+		                                  CBlidBaseView& aView)
+    {
+    CBlidSatelliteControl* self = new (ELeave) CBlidSatelliteControl(aEnv,
+    													   aView );
+    CleanupStack::PushL(self);
+    self->ConstructL( aRect );
+    CleanupStack::Pop(self);
+    return self;
+    }
+
+
+// ---------------------------------------------------------
+//
+ //CBlidSatelliteControl::CBlidSatelliteControl()
+// ---------------------------------------------------------
+//
+CBlidSatelliteControl::CBlidSatelliteControl(CAlfEnv& aEnv,
+		    				   	   CBlidBaseView& aView ) 
+    : CAlfControl( ),iEnv(aEnv),iView(aView)
+    {
+    iOnlineMode = EFalse;
+    }
+
+
+// ---------------------------------------------------------
+// CBlidSatelliteControl::ConstructL()
+// ---------------------------------------------------------
+//
+void CBlidSatelliteControl::ConstructL( const TRect& /*aRect*/ )
+    {
+    CAlfControl::ConstructL( iEnv );
+    
+    CBlidEng* engine = iView.BlidDocument()->Engine();
+    iLocation = engine->LocationModel();
+
+	iImagePath = HBufC::NewL( iEnv.TextureManager().ImagePath().Length() + 1 );
+	iImagePath->Des().Copy( iEnv.TextureManager().ImagePath() );
+	
+	iAvailableNoteText = StringLoader::LoadL( R_BLID_NOTE_GPS_POSITIONING_AVAILABLE, CEikonEnv::Static() );
+	iSearchNoteText = StringLoader::LoadL( R_BLID_WAITNOTE_SEARCHING_GPS_SATELLITES, CEikonEnv::Static() );
+    
+    iMainAnchorLayout = CAlfAnchorLayout::AddNewL( *this );
+    
+    iGlobeDeckLayout = CAlfDeckLayout::AddNewL( *this, iMainAnchorLayout );
+    iAnimationVisual = CAlfImageVisual::AddNewL(*this, iGlobeDeckLayout );
+
+    iDisplayIcon = 1;
+    iPeriodic = CPeriodic::NewL(0); // neutral priority 
+    iPeriodic->Start( TTimeIntervalMicroSeconds32( 200000 ),
+                      TTimeIntervalMicroSeconds32( 200000 ),
+                      TCallBack(Tick, this));
+                      
+	CalculateRects();
+	SetAnchors();
+    CreateGlobeVisualL();
+    UpdateGlobeVisual();
+	CreateSatelliteSignalVisualsL();
+	
+	}
+    
+// ----------------------------------------------------
+// CBlidSatelliteControl::~CBlidSatelliteControl
+// Destructor
+// Frees reserved resources
+// ----------------------------------------------------
+//
+CBlidSatelliteControl::~CBlidSatelliteControl()
+    {
+    iTextures.Reset();
+    iTextures.Close();
+    delete iNavimessage;
+    delete iImagePath;
+    delete iSearchNoteText;
+    delete iAvailableNoteText;
+	iSignalBarRects.Reset();
+	iSignalBarRects.Close();
+	iSatelliteNumberRects.Reset();
+	iSatelliteNumberRects.Close();
+	delete iPeriodic;
+	delete iTimer;
+    }    
+ 
+ // ---------------------------------------------------------
+// CBlidSatelliteControl::Tick()
+// ---------------------------------------------------------
+//
+TInt CBlidSatelliteControl::Tick(TAny* aObject)
+    {
+    ((CBlidSatelliteControl*)aObject)->UpdateGlobeVisual(); // cast, and call non-static function
+
+    return KErrNone;
+    }
+    
+
+// ---------------------------------------------------------
+// CBlidSatelliteControl::UpdateL
+// ---------------------------------------------------------
+//
+void CBlidSatelliteControl::UpdateL()
+    {
+    TInt satInView = iLocation->NumberOfSatellitesVisible();
+    TInt satId = 0;
+	DEBUG1(" CBlidSatelliteControl::UpdateL iErrorCode ::%d", iErrorCode );
+	if( iOnlineMode )
+		{
+		CreateNaviPaneL( *iAvailableNoteText );
+		// code for GPS fix received view			
+	    for( TInt i = 0; i < satInView; i++ )
+		    {
+		    satId = iLocation->GetSatelliteNo( i );
+			TBuf<5> satNumber;
+			satNumber.Format(_L("%d"), satId);
+			
+			if( i < 16 )
+				{
+				DisplaySatellitesRowL( satNumber, iSignalStrengthRowOne[i], iSatNoRowOne[i], i );
+				// Dimmed those satellites which are not used.
+				if( !iLocation->IsSatellitesUsed( i ) )
+					{
+					iSignalStrengthRowOne[i]->SetOpacity( 0.3 );	
+					}
+				else
+					{
+					iSignalStrengthRowOne[i]->SetOpacity( 1.0 );						
+					}					
+				}
+
+		    }
+
+	    // Change soft key    
+	    iView.CBAPtr()->SetCommandSetL( R_AVKON_SOFTKEYS_EXIT );
+	    iView.CBAPtr()->DrawDeferred();	    
+		// Start the timer for 2 seconds
+	    if( iTimer )
+	        {
+	        delete iTimer;
+	        iTimer = NULL;
+	        }
+	    iTimer = CPeriodic::NewL( EPriorityHigh );
+	    if( iTimer )
+	        {
+		    TCallBack callback( TimerCallBack, this );
+		    iTimer->Start( TTimeIntervalMicroSeconds32( 2000000 ),
+	                       TTimeIntervalMicroSeconds32( 80000000 ), 
+                           callback );
+	        }
+		// once timer completed then activate navigation view	        
+		}
+    else if( iLocation->WaitingGPSData() || iErrorCode == KErrTimedOut )
+		{
+		CreateNaviPaneL( *iSearchNoteText );
+	    // code for searching GPS view
+	    for( TInt i = 0; i < satInView; i++ )
+		    {
+		    satId = iLocation->GetSatelliteNo( i );
+			TBuf<5> satNumber;
+			satNumber.Format(_L("%d"), satId);
+										
+			if( i < 16 )
+				{
+				DisplaySatellitesRowL( satNumber, iSignalStrengthRowOne[i], iSatNoRowOne[i], i );
+				}
+		    }
+		ChangeSoftKeyL();		    
+		}
+    }
+    
+// ----------------------------------------------------
+// CBlidSatelliteControl::MakeTitleL
+// ----------------------------------------------------
+//
+void CBlidSatelliteControl::MakeTitleL( TInt aResourceText )
+    {
+    HBufC* buf = StringLoader::LoadLC(aResourceText);       
+    CAknTitlePane* title = static_cast<CAknTitlePane*>( StatusPane()->
+                            ControlL( TUid::Uid( EEikStatusPaneUidTitle ) ) );
+    CleanupStack::Pop(); //buf
+    title->SetText(buf); // Takes ownership of buf
+    } 
+    
+// ----------------------------------------------------
+// CBlidSatelliteControl::StatusPane
+// ----------------------------------------------------
+//
+CEikStatusPane* CBlidSatelliteControl::StatusPane()
+    {
+    return CEikonEnv::Static()->AppUiFactory()->StatusPane();
+    }
+    
+// ----------------------------------------------------
+// CBlidSatelliteControl::SetErrorCode
+// ----------------------------------------------------
+//
+void CBlidSatelliteControl::SetErrorCode( TInt aErrorCode )
+	{
+	iErrorCode = aErrorCode;	
+	}
+	
+// ----------------------------------------------------
+// CBlidSatelliteControl::SetOnlineMode
+// ----------------------------------------------------
+//
+void CBlidSatelliteControl::SetOnlineMode( TBool aOnlineMode )
+	{
+	iOnlineMode = aOnlineMode;	
+	}
+	
+// ----------------------------------------------------
+// CBlidSatelliteControl::CreateNaviPaneL
+// ----------------------------------------------------
+//
+void CBlidSatelliteControl::CreateNaviPaneL( const TDesC& aText )
+    {
+    CEikStatusPane* sp = CEikonEnv::Static()->AppUiFactory()->StatusPane();
+    // Fetch pointer to the default navi pane control
+    CAknNavigationControlContainer* naviPane = 
+        static_cast<CAknNavigationControlContainer*>(sp->ControlL( 
+        TUid::Uid(EEikStatusPaneUidNavi)));
+    
+    naviPane->PushDefaultL(EFalse);
+    if( iNavimessage )
+    	{
+    	delete iNavimessage;
+    	iNavimessage = NULL;
+    	}
+	iNavimessage = naviPane->CreateNavigationLabelL( aText );
+	naviPane->PushL( *iNavimessage );
+    }
+    
+// ----------------------------------------------------
+// CBlidSatelliteControl::CreateGlobeVisualL
+// ----------------------------------------------------
+//
+void CBlidSatelliteControl::CreateGlobeVisualL( )
+	{
+	// code to load svg icon
+	MAlfBitmapProvider* provider = NULL;
+	
+	// first creste the image loader utils and then call SetSize.	
+    iView.ImageLoaderUtils()->SetSize( iGlobeRect.Size() );
+    
+    // then create the bitmap provider  
+    provider = iView.ImageLoaderUtils()->CreateImageLoaderL( KAknsIIDQgnGrafBlidSearching, // svg icon skin constant id defiened in Aknsconstant.h file
+    												 iView.ImagePathName(),        // mif file name with path.
+    												 EMbmBlidQgn_graf_blid_searching_01, // bitmap id defiened in mbg file
+    												 EMbmBlidQgn_graf_blid_searching_01_mask ); // bitmap mask id defiened in mbg file
+	// now using that bitmap provider create the texture.
+	CAlfTexture & texture1 = iEnv.TextureManager().CreateTextureL( KAlfAutoGeneratedTextureId,
+	                                                                provider,
+	                                                                EAlfTextureFlagDefault ); 
+    iTextures.Append(&texture1);
+    												 
+    // then create the bitmap provider  
+    provider = iView.ImageLoaderUtils()->CreateImageLoaderL( KAknsIIDQgnGrafBlidSearching, // svg icon skin constant id defiened in Aknsconstant.h file
+    												 iView.ImagePathName(),        // mif file name with path.
+    												 EMbmBlidQgn_graf_blid_searching_02, // bitmap id defiened in mbg file
+    												 EMbmBlidQgn_graf_blid_searching_02_mask ); // bitmap mask id defiened in mbg file
+	// now using that bitmap provider create the texture.
+	CAlfTexture & texture2 = iEnv.TextureManager().CreateTextureL( KAlfAutoGeneratedTextureId,
+	                                                                provider,
+	                                                                EAlfTextureFlagDefault ); 
+    iTextures.Append(&texture2);
+    
+    // then create the bitmap provider  
+    provider = iView.ImageLoaderUtils()->CreateImageLoaderL( KAknsIIDQgnGrafBlidSearching, // svg icon skin constant id defiened in Aknsconstant.h file
+    												 iView.ImagePathName(),        // mif file name with path.
+    												 EMbmBlidQgn_graf_blid_searching_03, // bitmap id defiened in mbg file
+    												 EMbmBlidQgn_graf_blid_searching_03_mask ); // bitmap mask id defiened in mbg file
+	// now using that bitmap provider create the texture.
+	CAlfTexture & texture3 = iEnv.TextureManager().CreateTextureL( KAlfAutoGeneratedTextureId,
+	                                                                provider,
+	                                                                EAlfTextureFlagDefault ); 
+    iTextures.Append(&texture3);
+    
+    // then create the bitmap provider  
+    provider = iView.ImageLoaderUtils()->CreateImageLoaderL( KAknsIIDQgnGrafBlidSearching, // svg icon skin constant id defiened in Aknsconstant.h file
+    												 iView.ImagePathName(),        // mif file name with path.
+    												 EMbmBlidQgn_graf_blid_searching_04, // bitmap id defiened in mbg file
+    												 EMbmBlidQgn_graf_blid_searching_04_mask ); // bitmap mask id defiened in mbg file
+	// now using that bitmap provider create the texture.
+	CAlfTexture & texture4 = iEnv.TextureManager().CreateTextureL( KAlfAutoGeneratedTextureId,
+	                                                                provider,
+	                                                                EAlfTextureFlagDefault ); 
+    iTextures.Append(&texture4);
+    
+    // then create the bitmap provider  
+    provider = iView.ImageLoaderUtils()->CreateImageLoaderL( KAknsIIDQgnGrafBlidSearching, // svg icon skin constant id defiened in Aknsconstant.h file
+    												 iView.ImagePathName(),        // mif file name with path.
+    												 EMbmBlidQgn_graf_blid_searching_05, // bitmap id defiened in mbg file
+    												 EMbmBlidQgn_graf_blid_searching_05_mask ); // bitmap mask id defiened in mbg file
+	// now using that bitmap provider create the texture.
+	CAlfTexture & texture5 = iEnv.TextureManager().CreateTextureL( KAlfAutoGeneratedTextureId,
+	                                                                provider,
+	                                                                EAlfTextureFlagDefault ); 
+    iTextures.Append(&texture5);
+    
+    // then create the bitmap provider  
+    provider = iView.ImageLoaderUtils()->CreateImageLoaderL( KAknsIIDQgnGrafBlidSearching, // svg icon skin constant id defiened in Aknsconstant.h file
+    												 iView.ImagePathName(),        // mif file name with path.
+    												 EMbmBlidQgn_graf_blid_searching_06, // bitmap id defiened in mbg file
+    												 EMbmBlidQgn_graf_blid_searching_06_mask ); // bitmap mask id defiened in mbg file
+	// now using that bitmap provider create the texture.
+	CAlfTexture & texture6 = iEnv.TextureManager().CreateTextureL( KAlfAutoGeneratedTextureId,
+	                                                                provider,
+	                                                                EAlfTextureFlagDefault ); 
+    iTextures.Append(&texture6);
+    
+    // then create the bitmap provider  
+    provider = iView.ImageLoaderUtils()->CreateImageLoaderL( KAknsIIDQgnGrafBlidSearching, // svg icon skin constant id defiened in Aknsconstant.h file
+    												 iView.ImagePathName(),        // mif file name with path.
+    												 EMbmBlidQgn_graf_blid_searching_07, // bitmap id defiened in mbg file
+    												 EMbmBlidQgn_graf_blid_searching_07_mask ); // bitmap mask id defiened in mbg file
+	// now using that bitmap provider create the texture.
+	CAlfTexture & texture7 = iEnv.TextureManager().CreateTextureL( KAlfAutoGeneratedTextureId,
+	                                                                provider,
+	                                                                EAlfTextureFlagDefault ); 
+    iTextures.Append(&texture7);
+    
+    // then create the bitmap provider  
+    provider = iView.ImageLoaderUtils()->CreateImageLoaderL( KAknsIIDQgnGrafBlidSearching, // svg icon skin constant id defiened in Aknsconstant.h file
+    												 iView.ImagePathName(),        // mif file name with path.
+    												 EMbmBlidQgn_graf_blid_searching_08, // bitmap id defiened in mbg file
+    												 EMbmBlidQgn_graf_blid_searching_08_mask ); // bitmap mask id defiened in mbg file
+	// now using that bitmap provider create the texture.
+	CAlfTexture & texture8 = iEnv.TextureManager().CreateTextureL( KAlfAutoGeneratedTextureId,
+	                                                                provider,
+	                                                                EAlfTextureFlagDefault ); 
+    iTextures.Append(&texture8);
+	}
+	
+// ----------------------------------------------------
+// CBlidSatelliteControl::UpdateGlobeVisual
+// ----------------------------------------------------
+//
+void CBlidSatelliteControl::UpdateGlobeVisual( )
+	{
+    if(KNumOfStartUpIcon > iDisplayIcon)
+        {
+        iDisplayIcon++;
+        }
+    else
+        {
+        iDisplayIcon = 1;
+        }
+    //iAnimationVisual->SetSize( animationRect.Size() );
+    iAnimationVisual->SetImage( TAlfImage( *iTextures[iDisplayIcon-1] ) );//N   
+    }
+    
+// ----------------------------------------------------
+// CBlidSatelliteControl::CreateSatelliteSignalVisualsL
+// ----------------------------------------------------
+//
+void CBlidSatelliteControl::CreateSatelliteSignalVisualsL( )
+	{
+	TInt typefaceStyleId = iEnv.TextStyleManager().CreatePlatformTextStyleL(EAknLogicalFontPrimarySmallFont, EAlfTextStyleSmall);
+    CAlfTextStyle* style1 = iEnv.TextStyleManager().TextStyle( typefaceStyleId );
+    style1->SetBold( ETrue );
+    // Set the text font size in pixel
+    style1->SetTextPaneHeightInPixels( 26, ETrue );
+	
+	TRgb rgb;
+	AknsUtils::GetCachedColor ( AknsUtils::SkinInstance(),
+								rgb,
+								KAknsIIDQsnTextColors,
+								EAknsCIQsnTextColorsCG1 
+								);
+	
+	CreateSignalLayoutL( style1, rgb );
+	}
+	
+// ----------------------------------------------------
+// CBlidSatelliteControl::CreateSignalLayoutL
+// ----------------------------------------------------
+//
+void CBlidSatelliteControl::CreateSignalLayoutL( CAlfTextStyle* aStyle, TRgb aRgb )
+	{
+	for( TInt i = 0; i < 16; i++ )
+		{
+		iSignalStrengthRowOne[i] = CAlfImageVisual::AddNewL( *this, iMainAnchorLayout );
+		
+		iSatNoRowOne[i] = CAlfTextVisual::AddNewL( *this, iMainAnchorLayout );
+		iSatNoRowOne[i]->SetColor( aRgb );	
+		iSatNoRowOne[i]->SetTextStyle( aStyle->Id() );
+		iSatNoRowOne[i]->SetAlign( EAlfAlignHCenter, EAlfAlignVCenter );
+		}
+	}
+	
+// ---------------------------------------------------------
+// CBlidSatelliteControl::DisplaySatellitesRowL
+// ---------------------------------------------------------
+//
+void CBlidSatelliteControl::DisplaySatellitesRowL( const TDesC& aSatNo,
+												   CAlfImageVisual* aImageVisual,
+												   CAlfTextVisual* aTextVisual,
+												   TInt aIndex )
+	{
+	// code to load svg icon
+	MAlfBitmapProvider* provider = NULL;
+	// first creste the image loader utils and then call SetSize.	
+    iView.ImageLoaderUtils()->SetSize( iSignalBarRects[0].Size() );
+	
+	aTextVisual->SetTextL( aSatNo );
+	
+	switch( iLocation->GetSatelliteSignalStrength( aIndex ) )
+		{
+		case EBlidSignalStrengthZero:
+			{
+			                                                                  
+		    // then create the bitmap provider
+		    provider = iView.ImageLoaderUtils()->CreateImageLoaderL( KAknsIIDQgnGrafBlidSignalBar01, // svg icon skin constant id defiened in Aknsconstant.h file
+		    												 			iView.ImagePathName(),        // mif file name with path.
+		    												 			EMbmBlidQgn_graf_blid_signal_bar_01, // bitmap id defiened in mbg file
+		    												 			EMbmBlidQgn_graf_blid_signal_bar_01_mask ); // bitmap mask id defiened in mbg file
+		    												 
+			    												 
+			// now using that bitmap provider create the texture.
+			CAlfTexture & texture = iEnv.TextureManager().CreateTextureL( KAlfAutoGeneratedTextureId, provider, EAlfTextureFlagDefault );	
+					                                                                  
+			aImageVisual->SetImage(TAlfImage(texture));		                                                                  
+			break;							
+			}
+		case EBlidSignalStrengthOne:
+			{
+		    provider = iView.ImageLoaderUtils()->CreateImageLoaderL( KAknsIIDQgnGrafBlidSignalBar02, // svg icon skin constant id defiened in Aknsconstant.h file
+		    												 			iView.ImagePathName(),        // mif file name with path.
+		    												 			EMbmBlidQgn_graf_blid_signal_bar_02, // bitmap id defiened in mbg file
+		    												 			EMbmBlidQgn_graf_blid_signal_bar_02_mask ); // bitmap mask id defiened in mbg file
+		    												 
+			    												 
+			// now using that bitmap provider create the texture.
+			CAlfTexture & texture = iEnv.TextureManager().CreateTextureL( KAlfAutoGeneratedTextureId, provider, EAlfTextureFlagDefault );	
+					                                                                  
+			aImageVisual->SetImage(TAlfImage(texture));		                                                                  
+			break;							
+			}
+		case EBlidSignalStrengthTwo:
+			{
+		    provider = iView.ImageLoaderUtils()->CreateImageLoaderL( KAknsIIDQgnGrafBlidSignalBar03, // svg icon skin constant id defiened in Aknsconstant.h file
+		    												 			iView.ImagePathName(),        // mif file name with path.
+		    												 			EMbmBlidQgn_graf_blid_signal_bar_03, // bitmap id defiened in mbg file
+		    												 			EMbmBlidQgn_graf_blid_signal_bar_03_mask ); // bitmap mask id defiened in mbg file
+		    												 
+			    												 
+			// now using that bitmap provider create the texture.
+			CAlfTexture & texture = iEnv.TextureManager().CreateTextureL( KAlfAutoGeneratedTextureId, provider, EAlfTextureFlagDefault );	
+					                                                                  
+			aImageVisual->SetImage(TAlfImage(texture));		                                                                  
+			break;							
+			}
+		case EBlidSignalStrengthThree:
+			{
+		    provider = iView.ImageLoaderUtils()->CreateImageLoaderL( KAknsIIDQgnGrafBlidSignalBar04, // svg icon skin constant id defiened in Aknsconstant.h file
+		    												 			iView.ImagePathName(),        // mif file name with path.
+		    												 			EMbmBlidQgn_graf_blid_signal_bar_04, // bitmap id defiened in mbg file
+		    												 			EMbmBlidQgn_graf_blid_signal_bar_04_mask ); // bitmap mask id defiened in mbg file
+		    												 
+			    												 
+			// now using that bitmap provider create the texture.
+			CAlfTexture & texture = iEnv.TextureManager().CreateTextureL( KAlfAutoGeneratedTextureId, provider, EAlfTextureFlagDefault );	
+					                                                                  
+			aImageVisual->SetImage(TAlfImage(texture));		                                                                  
+			break;							
+			}
+		case EBlidSignalStrengthFour:
+			{
+		    provider = iView.ImageLoaderUtils()->CreateImageLoaderL( KAknsIIDQgnGrafBlidSignalBar05, // svg icon skin constant id defiened in Aknsconstant.h file
+		    												 			iView.ImagePathName(),        // mif file name with path.
+		    												 			EMbmBlidQgn_graf_blid_signal_bar_05, // bitmap id defiened in mbg file
+		    												 			EMbmBlidQgn_graf_blid_signal_bar_05_mask ); // bitmap mask id defiened in mbg file
+		    												 
+			    												 
+			// now using that bitmap provider create the texture.
+			CAlfTexture & texture = iEnv.TextureManager().CreateTextureL( KAlfAutoGeneratedTextureId, provider, EAlfTextureFlagDefault );	
+					                                                                  
+			aImageVisual->SetImage(TAlfImage(texture));		                                                                  
+			break;							
+			}
+		default:
+			{
+			break;							
+			}
+		}
+	}
+
+// ----------------------------------------------------
+// CBlidSatelliteControl::ChangeNavigationViewL
+// ----------------------------------------------------
+//
+void CBlidSatelliteControl::ChangeNavigationViewL()
+    {
+    if (iView.IsForeGroundApp())
+        {
+        iView.ActivateNavigationViewL();
+        }
+    //delete the timer if present
+    delete iTimer;
+    iTimer = NULL;
+    }
+
+// ----------------------------------------------------
+// CBlidSatelliteControl::ChangeSoftKeyL
+// ----------------------------------------------------
+//
+void CBlidSatelliteControl::ChangeSoftKeyL()
+	{
+	iView.ChangeViewSoftKeyL();
+	}
+
+// ----------------------------------------------------
+// CBlidSatelliteControl::UpdateDisplayLayoutL
+// ----------------------------------------------------
+//
+void CBlidSatelliteControl::UpdateDisplayLayoutL( )
+	{
+	CalculateRects();
+	SetAnchors();
+	}
+
+// ----------------------------------------------------
+// CBlidSatelliteControl::CalculateRects
+// ----------------------------------------------------
+//	
+void CBlidSatelliteControl::CalculateRects()
+	{
+	TAknLayoutRect mainBlid2Pane;
+	TAknLayoutRect layoutWindow;
+	TRect mainRect;
+	TRect animationRect;
+	TInt variety;
+
+	if( Layout_Meta_Data::IsLandscapeOrientation() )
+	    {
+	    variety = 1;
+	    }
+	 else
+	 	{
+	 	variety = 0;
+	 	}
+	
+	/////////////// calculate animation  rect /////////////////////////
+    mainBlid2Pane.LayoutRect( iView.ApplicationRect(),
+    							AknLayoutScalable_Apps::main_blid2_pane().LayoutLine() );
+    							
+	mainRect = mainBlid2Pane.Rect(); 							
+    																				   
+    mainBlid2Pane.LayoutRect( mainRect, 
+    							AknLayoutScalable_Apps::blid2_gps_pane( 0 ).LayoutLine() );
+    							
+	animationRect =  mainBlid2Pane.Rect();   							
+    							
+	mainBlid2Pane.LayoutRect( animationRect, 
+    							AknLayoutScalable_Apps::blid2_gps_pane_g1( variety ).LayoutLine() );
+	
+	iGlobeRect = mainBlid2Pane.Rect();
+	
+	/////////////// calculate satellite grid rect /////////////////////////
+	mainBlid2Pane.LayoutRect( animationRect, 
+    						  AknLayoutScalable_Apps::grid_blid2_satellite_pane( variety ).LayoutLine() );
+    							
+	iSatGridRect = mainBlid2Pane.Rect();
+	
+	/////////////// calculate cell rects /////////////////////////
+	TAknLayoutScalableParameterLimits paramLimits;
+	paramLimits = AknLayoutScalable_Apps::cell_blid2_satellite_pane_ParamLimits();
+	
+	TInt numberOfRows = paramLimits.LastRow() - paramLimits.FirstRow() + 1;
+	TInt numberOfColumns = paramLimits.LastColumn() - paramLimits.FirstColumn() + 1;
+	iSignalBarRects.Reset();
+	iSatelliteNumberRects.Reset();
+	for( TInt row = paramLimits.FirstRow() ; row <= paramLimits.LastRow(); ++row )
+		{
+		for( TInt column = paramLimits.FirstColumn() ; column <= paramLimits.LastColumn(); ++column )
+			{
+			layoutWindow.LayoutRect( iSatGridRect, AknLayoutScalable_Apps::cell_blid2_satellite_pane(0, column, row).LayoutLine() );
+			TRect cellRect = layoutWindow.Rect();
+			
+			layoutWindow.LayoutRect( cellRect, AknLayoutScalable_Apps::cell_blid2_satellite_pane_g1(0).LayoutLine());
+			TRect barRect = layoutWindow.Rect();
+			iSignalBarRects.Append(barRect);
+			
+			// Save the layouts of the satellite numbers
+			TAknLayoutText satNumberLayout;
+			satNumberLayout.LayoutText(cellRect, AknLayoutScalable_Apps::cell_blid2_satellite_pane_t1(0).LayoutLine());			
+			iSatelliteNumberRects.Append(satNumberLayout.TextRect());
+			}
+		}		
+	}
+	
+// ----------------------------------------------------
+// CBlidSatelliteControl::SetAnchors
+// ----------------------------------------------------
+//	
+void CBlidSatelliteControl::SetAnchors()
+	{
+	// Anchor for Globe Animation
+	TAlfRealPoint topAnimationPoint( iGlobeRect.iTl );
+	TAlfRealPoint bottomAnimationPoint( iGlobeRect.iBr );
+
+    iMainAnchorLayout->SetAnchor( EAlfAnchorTopLeft, 0, 
+        EAlfAnchorOriginLeft, EAlfAnchorOriginTop,
+        EAlfAnchorMetricAbsolute, EAlfAnchorMetricAbsolute,
+        TAlfTimedPoint( topAnimationPoint.iX, topAnimationPoint.iY ) );
+    iMainAnchorLayout->SetAnchor( EAlfAnchorBottomRight, 0, 
+        EAlfAnchorOriginLeft, EAlfAnchorOriginTop,
+        EAlfAnchorMetricAbsolute, EAlfAnchorMetricAbsolute,
+        TAlfTimedPoint( bottomAnimationPoint.iX, bottomAnimationPoint.iY ) );
+    
+    // Set anchor for all signal strength images	
+	for( TInt i = 0; i < 16; i++ )
+		{
+		TInt ordinal = i*2 + 1;
+		
+		TAlfRealPoint topPoint( iSignalBarRects[i].iTl );
+		TAlfRealPoint bottomPoint( iSignalBarRects[i].iBr );
+		
+	    iMainAnchorLayout->SetAnchor(EAlfAnchorTopLeft, ordinal, 
+        EAlfAnchorOriginLeft, EAlfAnchorOriginTop,
+        EAlfAnchorMetricAbsolute, EAlfAnchorMetricAbsolute,
+        TAlfTimedPoint( topPoint.iX, topPoint.iY ) );
+    	iMainAnchorLayout->SetAnchor(EAlfAnchorBottomRight, ordinal, 
+        EAlfAnchorOriginLeft, EAlfAnchorOriginTop,
+        EAlfAnchorMetricAbsolute, EAlfAnchorMetricAbsolute,
+        TAlfTimedPoint( bottomPoint.iX, bottomPoint.iY ) );		
+		}
+	// Set anchor for Satellite number text	
+	for( TInt i = 0; i < 16; i++ )
+		{
+		TInt ordinal = i*2 + 2;
+		
+		TAlfRealPoint topPoint( iSatelliteNumberRects[i].iTl );
+		TAlfRealPoint bottomPoint( iSatelliteNumberRects[i].iBr );
+		
+	    iMainAnchorLayout->SetAnchor(EAlfAnchorTopLeft, ordinal, 
+        EAlfAnchorOriginLeft, EAlfAnchorOriginTop,
+        EAlfAnchorMetricAbsolute, EAlfAnchorMetricAbsolute,
+        TAlfTimedPoint( topPoint.iX, topPoint.iY ) );
+    	iMainAnchorLayout->SetAnchor(EAlfAnchorBottomRight, ordinal, 
+        EAlfAnchorOriginLeft, EAlfAnchorOriginTop,
+        EAlfAnchorMetricAbsolute, EAlfAnchorMetricAbsolute,
+        TAlfTimedPoint( bottomPoint.iX, bottomPoint.iY ) );		
+		}    	
+	
+	}
+	
+// ----------------------------------------------------------------------------
+// TimerCallBack
+// ----------------------------------------------------------------------------
+//
+TInt TimerCallBack(TAny* aPtr)
+    {
+    CBlidSatelliteControl* ptr = static_cast<CBlidSatelliteControl*>(aPtr);
+    if( ptr )
+        {
+		// Activate navigation view
+		TRAP_IGNORE( ptr->ChangeNavigationViewL() );
+        }
+    return 0;
+    }	
+//End Of File
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/basiclocationinfodisplay/blid/ui/src/CBlidSatelliteView.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,252 @@
+/*
+* Copyright (c) 2007-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:  Provides blid main satellite view class methods.
+*
+*/
+
+
+// SYSTEM INCLUDE FILES
+#include <aknViewAppUi.h>
+#include <blid.rsg>
+#include <alf/alfenv.h>
+#include <alf/alfcontrolgroup.h>
+#include <alf/alfdisplay.h>
+#include <alf/alftransformation.h>
+#include <alf/alfroster.h>
+// USER INCLUDE FILES
+#include "CBlidSatelliteView.h"
+#include "Blid.hrh"
+#include "CBlidSatelliteControl.h"
+#include "MBlidLocation.h"
+#include "CBlidAppUi.h"
+#include "bliduiconsts.h"
+#include "BlidNotes.h"
+#include "Debug.h"
+
+//CONSTANTS
+enum TPanicCode
+    {
+    KBlidNullPointer = 1
+    };
+
+// ================= MEMBER FUNCTIONS =======================
+// ----------------------------------------------------------------------------
+// CBlidSatelliteView::NewLC( MKeyProcessor& aKeyProcessor )
+// Two-phased constructor.
+// ----------------------------------------------------------------------------
+//
+CBlidSatelliteView* CBlidSatelliteView::NewLC( MKeyProcessor& aKeyProcessor,
+									 		   CAlfEnv& aEnv  )
+    {
+    CBlidSatelliteView* self = new (ELeave) CBlidSatelliteView( aKeyProcessor,aEnv );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    return self;
+    }
+// ----------------------------------------------------------------------------
+// CBlidSatelliteView::CBlidSatelliteView
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// ----------------------------------------------------------------------------
+//
+CBlidSatelliteView::CBlidSatelliteView( MKeyProcessor& aKeyProcessor ,
+							  CAlfEnv& aEnv ):
+    CBlidBaseView( aKeyProcessor ),
+    iEnv(aEnv)
+    {
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidSatelliteView::ConstructL
+// Symbian 2nd phase constructor can leave.
+// ----------------------------------------------------------------------------
+//
+void CBlidSatelliteView::ConstructL()
+    {
+    // Modify the Main view option key
+    BaseConstructL( R_BLID_MAINSAT_VIEW );
+
+	// Create an instance of our list control.
+	iMainSatelliteCtrl = CBlidSatelliteControl::NewL(iEnv, ClientRect(), *this );
+
+
+	// Create a control group.
+	iMainSatelliteCtrlGroup = &( iEnv.NewControlGroupL( KBlidMainSatelliteGroup ) );
+
+	// pass ownership of the list control to the control group
+	iMainSatelliteCtrlGroup->AppendL( iMainSatelliteCtrl );
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidSatelliteView::~CBlidSatelliteView
+// Destructor, frees allocated resources
+// ----------------------------------------------------------------------------
+//
+CBlidSatelliteView::~CBlidSatelliteView()
+    {
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidSatelliteView::ProcessKeyEventL
+// Processes key event
+// ----------------------------------------------------------------------------
+//
+TBool CBlidSatelliteView::ProcessKeyEventL( const TKeyEvent& aKeyEvent,
+    TEventCode aType )
+    {
+    return CBlidBaseView::ProcessKeyEventL( aKeyEvent,aType );
+    }
+
+// ----------------------------------------------------------------------------
+// TUid CBlidSatelliteView::Id
+// Returns the id of satellite view
+// ----------------------------------------------------------------------------
+//
+TUid CBlidSatelliteView::Id() const
+    {
+    return TUid::Uid( EBlidMainSatelliteView );
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidSatelliteView::HandleCommandL
+// Handles the option menu commands in satellite view
+// ----------------------------------------------------------------------------
+//
+void CBlidSatelliteView::HandleCommandL(TInt aCommand)
+    {
+    switch ( aCommand )
+        {
+        case EBlidSoftkeyInfo:
+	        {
+	        BlidNotes::PoorGPSDataNoteL();
+	        break;	        	
+	        }
+        default:
+            {
+            (static_cast<CBlidAppUi*>(AppUi()))->HandleCommandL( aCommand );
+            break;
+            }
+        }
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidSatelliteView::DoActivateL
+// Called when Satellite view is activated
+// ----------------------------------------------------------------------------
+//
+void CBlidSatelliteView::DoActivateL(
+   const TVwsViewId& /*aPrevViewId*/,TUid /*aCustomMessageId*/,
+   const TDesC8& /*aCustomMessage*/)
+    {
+    #ifdef _DEBUG
+    RDebug::Print(_L("CBlidSatelliteView::DoActivateL() called"));
+    #endif
+    CAlfDisplay& ctrlDisplay = iEnv.NewDisplayL( ClientRect(), CAlfEnv::ENewDisplayAsCoeControl );
+	// Use the Avkon skin background as the display background.
+	ctrlDisplay.SetClearBackgroundL(CAlfDisplay::EClearWithSkinBackground);
+
+    iLocation->SetObserver( *this, EBlidMainSatelliteView ); 
+    
+    (static_cast<CBlidAppUi*>(AppUi()))->SetSatelliteViewActive( ETrue );
+    
+    iMainSatelliteCtrl->MakeTitleL( R_BLID_TITLE_MAIN );
+	
+	ctrlDisplay.Roster().Hide( iEnv.ControlGroup( KBlidMainGroup ) );
+	
+	// Show the control group on the display.
+	ctrlDisplay.Roster().ShowL( *iMainSatelliteCtrlGroup );    
+   }
+
+// ----------------------------------------------------------------------------
+// CBlidSatelliteView::DoDeactivate
+// Called when satellite view is deactivated
+// ----------------------------------------------------------------------------
+//
+void CBlidSatelliteView::DoDeactivate()
+    {
+	(static_cast<CBlidAppUi*>(AppUi()))->SetSatelliteViewActive( EFalse );
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidSatelliteView::NotifyL
+// Called by location model to notify about changes in current location
+// ----------------------------------------------------------------------------
+//
+void CBlidSatelliteView::NotifyL( const TBool aOnlineMode )
+    {
+    DEBUG1(" CBlidSatelliteView::NotifyL called ::%d", aOnlineMode );          
+    if( iMainSatelliteCtrl &&  aOnlineMode )
+        {
+        iMainSatelliteCtrl->UpdateL();
+        iMainSatelliteCtrl->SetOnlineMode( aOnlineMode );
+        }
+    CBlidBaseView::NotifyL( aOnlineMode );
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidSatelliteView::NotifyError
+// Called by location model to notify about error in current location
+// ----------------------------------------------------------------------------
+//
+void CBlidSatelliteView::NotifyErrorL( TInt aErrorCode )
+    {
+    CBlidBaseView::NotifyErrorL( aErrorCode );    
+    DEBUG1(" CBlidSatelliteView::NotifyErrorL errorcode ::%d", aErrorCode );
+    if( iMainSatelliteCtrl )
+        {
+        iMainSatelliteCtrl->UpdateL();
+        iMainSatelliteCtrl->SetErrorCode( aErrorCode );
+        }
+    }
+
+// ----------------------------------------------------------
+// CBlidSatelliteView::HandleResourceChangeL
+// Handle Resource Change Events: Display orientation switch
+// ----------------------------------------------------------
+//
+void CBlidSatelliteView::HandleResourceChangeL( TInt aType )
+    {
+    if(aType == KEikDynamicLayoutVariantSwitch)
+        {
+        TRect rect;
+        AknLayoutUtils::LayoutMetricsRect(AknLayoutUtils::EMainPane, rect);
+        
+        iMainSatelliteCtrl->UpdateDisplayLayoutL();
+        // Notify skin of changed display size.
+        iEnv.PrimaryDisplay().SetVisibleArea(rect);
+        }
+    }
+
+/**
+ * 
+ */
+CBlidSatelliteControl* CBlidSatelliteView::GetControl()
+    {
+    return iMainSatelliteCtrl;
+    }
+        
+#ifdef RD_SCALABLE_UI_V2
+// ---------------------------------------------------------------------------
+// CBlidNavigationView::HandleListBoxSelectionL
+// Handles the listbox selection
+// ---------------------------------------------------------------------------
+//
+void CBlidSatelliteView::HandleListBoxSelectionL()
+    {
+    //Do something if needed
+    }
+#endif //RD_SCALABLE_UI_V2    
+// End of File
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/basiclocationinfodisplay/blid/ui/src/CBlidSavedWayptsContainer.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,349 @@
+/*
+* 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:  Provides blid main view's container class methods.
+*
+*/
+
+
+// INCLUDE FILES
+#include <aknview.h> 
+#include <aknnavide.h>
+#include <eikmenub.h>
+#include <aknViewAppUi.h> 
+#include <aknlists.h>   // CAknSingleLargeStyleListBox
+#include <blid.rsg>
+#include <AknsConstants.h>
+#include <AknIconArray.h>
+#include <aknnavide.h>
+#include <AknIconUtils.h>
+#include <avkon.mbg>
+#include <avkon.hrh>
+#include <gulicon.h>
+#include <eikclbd.h>
+#include <AknDef.h>
+#include <csxhelp/blid.hlp.hrh>
+
+#include "CBlidSavedWayptsContainer.h"
+#include "Blid.hrh"
+#include "CBlidSavedWayptsLBModel.h"
+
+// CONSTANTS
+#ifdef _DEBUG
+_LIT( KPanicText, "CBlidSavedWayptsContainer" );
+
+enum TPanicCode
+    {
+    KBlidNullPointer = 1
+    };
+#endif
+// Unnamed namespace for local definitions
+namespace {
+const TInt KViewListboxGranularity = 2; // list box granularity
+}  // namespace
+
+
+// ================= MEMBER FUNCTIONS =======================
+// ----------------------------------------------------------------------------
+// CBlidSavedWayptsContainer::NewL
+// ----------------------------------------------------------------------------
+//
+CBlidSavedWayptsContainer* CBlidSavedWayptsContainer::NewL(    
+                            MKeyProcessor& aKeyProcessor,
+                            MObjectProvider* aParent,
+		                    const TRect& aRect,
+                            MBlidLocation* aLocation,
+                            MBlidSettings* aSettings,
+                            MBlidRouter* aRouter,
+                            CBlidBaseView& aView)
+	{
+	CBlidSavedWayptsContainer* self =
+		new (ELeave) CBlidSavedWayptsContainer( aKeyProcessor, aView );
+	CleanupStack::PushL(self);
+	self->SetMopParent( aParent );
+	self->ConstructL( aRect, aLocation, aSettings,aRouter );
+    CleanupStack::Pop( self ); // self
+	return self;
+	}
+
+// ----------------------------------------------------------------------------
+// CBlidSavedWayptsContainer::CBlidSavedWayptsContainer
+// ----------------------------------------------------------------------------
+//
+CBlidSavedWayptsContainer::CBlidSavedWayptsContainer( MKeyProcessor& aKeyProcessor,
+                                                      CBlidBaseView& aView ) 
+    :CBlidBaseContainer( aKeyProcessor, KBLID_HLP_WAYPOINTS ), iView(aView)
+    {
+    }
+
+// ---------------------------------------------------------
+// CBlidSavedWayptsContainer::ConstructL
+// Symbian 2nd phase constructor can leave.
+// ---------------------------------------------------------
+//
+void CBlidSavedWayptsContainer::ConstructL( const TRect& aRect, 
+                                      MBlidLocation* aLocation,
+                                      MBlidSettings* aSettings,MBlidRouter* aRouter )
+    {
+    CreateWindowL();
+    SetBlank();
+
+    iDecoratedTabGroup = CreateNaviPaneL( EFalse );
+    ActivateTabL( *iDecoratedTabGroup, EBlidSavedWayptsView );
+
+    CreateListboxL(aLocation, aSettings,aRouter);
+
+    MakeTitleL(R_BLID_TITLE_WAYPOINTS);
+    SetRect(aRect);
+    ActivateL();
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidSavedWayptsContainer::~CBlidSavedWayptsContainer
+// ----------------------------------------------------------------------------
+//
+CBlidSavedWayptsContainer::~CBlidSavedWayptsContainer()
+    {
+    delete iDecoratedTabGroup;
+    delete iListBox;
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidSavedWayptsContainer::UpdateL
+// ----------------------------------------------------------------------------
+//
+void CBlidSavedWayptsContainer::UpdateL()
+    {
+    __ASSERT_DEBUG( iListBox, User::Panic( KPanicText, KBlidNullPointer ) );
+    iListBox->DrawNow();
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidSavedWayptsContainer::OfferKeyEventL
+// ----------------------------------------------------------------------------
+//
+TKeyResponse CBlidSavedWayptsContainer::OfferKeyEventL( const TKeyEvent& aKeyEvent,
+                                     TEventCode aType)
+    {    
+    if ( aKeyEvent.iCode == EKeyOK )
+		{
+		TBool shiftKeyPressed = (aKeyEvent.iModifiers & EModifierShift);
+		if(shiftKeyPressed)
+            {
+            iListBox->OfferKeyEventL( aKeyEvent, aType);
+            return EKeyWasConsumed;
+            }
+        CEikMenuBar* menubar = static_cast<CAknViewAppUi*>
+            (iAvkonAppUi)->View(TUid::Uid( EBlidSavedWayptsView ))->MenuBar();
+        if ( menubar )
+            {
+            menubar->SetMenuTitleResourceId(R_BLID_SAVEDWAYPTS_VIEW_OK_MENUBAR); 
+
+            menubar->StopDisplayingMenuBar();
+            TRAPD(err,menubar->TryDisplayMenuBarL());                        
+            User::LeaveIfError(err);
+            menubar->SetMenuTitleResourceId(R_BLID_SAVEDWAYPTS_MENUBAR); 
+            }
+        
+		return EKeyWasConsumed;
+		}
+    else if( aKeyEvent.iCode == EKeyBackspace )
+        {
+        static_cast<CAknViewAppUi*>
+            (iAvkonAppUi)->View(TUid::Uid( EBlidSavedWayptsView ))->HandleCommandL(EBlidCmdDeleteWaypt);
+        }
+    return CBlidBaseContainer::OfferKeyEventL( aKeyEvent, aType );
+    }
+
+// ---------------------------------------------------------
+// CBlidSavedWayptsContainer::SizeChanged()
+// Called by framework when the view size is changed
+// ---------------------------------------------------------
+//
+void CBlidSavedWayptsContainer::SizeChanged()
+    {
+    iListBox->SetRect( Rect() );
+    }
+
+// ---------------------------------------------------------
+// CBlidSavedWayptsContainer::CountComponentControls() const
+// ---------------------------------------------------------
+//
+TInt CBlidSavedWayptsContainer::CountComponentControls() const
+    {
+    return 1; // return nbr of controls inside this container
+    }
+
+// ---------------------------------------------------------
+// CBlidSavedWayptsContainer::ComponentControl(TInt aIndex) const
+// ---------------------------------------------------------
+//
+CCoeControl* CBlidSavedWayptsContainer::ComponentControl(TInt /*aIndex*/) const
+    {    
+    return iListBox;
+    }
+
+// ---------------------------------------------------------
+// CBlidSavedWayptsContainer::CreateListboxL
+// ---------------------------------------------------------
+//
+void CBlidSavedWayptsContainer::CreateListboxL( MBlidLocation* aLocation,
+                                           MBlidSettings* aSettings,MBlidRouter* aRouter )
+    {
+    delete iListBox;
+    iListBox = NULL;    
+    iListBox = new(ELeave) CAknSingleGraphicStyleListBox();
+    iListBox->SetContainerWindowL(*this);
+    
+    #ifndef RD_SCALABLE_UI_V2
+    iListBox->ConstructL( this, EAknGenericListBoxFlags
+                                | EAknListBoxMarkableList);
+    #else
+    iListBox->ConstructL( this, EAknGenericListBoxFlags
+                                | EAknListBoxStylusMarkableList);
+    #endif                                    
+
+    MDesCArray* model = CBlidSavedWayptsLBModel::NewLC( aLocation, aSettings,aRouter );
+    // listbox takes the ownership
+    iListBox->Model()->SetItemTextArray( model ); 
+    iListBox->Model()->SetOwnershipType( ELbmOwnsItemArray );
+    CleanupStack::Pop(); // model 
+	
+	 UpdateIconsL();
+	 
+    // Make scroll arrows
+    iListBox->CreateScrollBarFrameL( ETrue );
+    iListBox->ScrollBarFrame()->SetScrollBarVisibilityL( 
+        CEikScrollBarFrame::EAuto,CEikScrollBarFrame::EAuto );
+    MakeEmptyTextListBoxL(R_BLID_NO_WAYPOINTS);
+
+    iListBox->ActivateL();
+    }
+
+// -----------------------------------------------------------------------------
+// CBlidSavedWayptsContainer::UpdateIconsL
+// -----------------------------------------------------------------------------
+//
+void CBlidSavedWayptsContainer::UpdateIconsL()
+    {
+    TAknsItemID skinId = KAknsIIDNone;
+
+    CAknIconArray* icons = new( ELeave ) CAknIconArray( 
+    											KViewListboxGranularity );
+    CleanupStack::PushL( icons );
+
+    TFileName* aknIconFile = new (ELeave) TFileName;
+	CleanupStack::PushL(aknIconFile);
+    *aknIconFile = AknIconUtils::AvkonIconFileName();
+
+    AddIconL( icons, skinId, *aknIconFile, EMbmAvkonQgn_indi_marked_add , 
+    			EMbmAvkonQgn_indi_marked_add_mask );
+    AddIconL( icons, skinId, *aknIconFile, EMbmAvkonQgn_prop_empty , 
+    			EMbmAvkonQgn_prop_empty_mask );
+
+
+    //get old icons and delete those
+    CAknIconArray* Oldicons = static_cast<CAknIconArray*>(
+        iListBox->ItemDrawer()->ColumnData()->IconArray() );    
+    delete Oldicons;
+
+    //set new icons to array
+    iListBox->ItemDrawer()->ColumnData()->SetIconArray( icons );  
+    CleanupStack::PopAndDestroy(aknIconFile);
+    CleanupStack::Pop(icons);
+    }
+
+// -----------------------------------------------------------------------------
+// CLocMainContainer::SelectedRow
+// -----------------------------------------------------------------------------
+//
+TInt CBlidSavedWayptsContainer::SelectedRow() const
+    {
+    return iListBox->CurrentItemIndex();
+    }
+
+// -----------------------------------------------------------------------------
+// CLocMainContainer::SetSelectedRow
+// -----------------------------------------------------------------------------
+//
+void CBlidSavedWayptsContainer::SetSelectedRow(TInt aIndex) const
+    {
+    iListBox->SetCurrentItemIndex(aIndex);
+    }
+
+// -----------------------------------------------------------------------------
+// CLocMainContainer::HandleResourceChange
+// -----------------------------------------------------------------------------
+//
+void CBlidSavedWayptsContainer::HandleResourceChange(TInt aType)
+    {    
+    CBlidBaseContainer::HandleResourceChange( aType );
+    if( aType == KAknsMessageSkinChange )
+        {             
+        TRAPD( error, UpdateIconsL() );
+        if ( error != KErrNone )
+        	{
+            iCoeEnv->HandleError( error );
+            }                 
+        iListBox->DrawDeferred();
+        }
+    else if ( aType == KEikDynamicLayoutVariantSwitch )
+        {
+        iView.Update(this);
+        }
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidSavedWayptsContainer::FocuChanged()
+// ----------------------------------------------------------------------------
+//
+void CBlidSavedWayptsContainer::FocusChanged(TDrawNow aDrawNow)
+	{
+	if (iListBox)
+		{
+		iListBox->SetFocus(IsFocused(), aDrawNow);			
+		}		
+	}
+
+// -----------------------------------------------------------------------------
+// CLocMainContainer::HandleMarkCommandL
+// -----------------------------------------------------------------------------
+//
+void CBlidSavedWayptsContainer::HandleMarkCommandL(TInt aCommand)
+	{
+	AknSelectionService::HandleMarkableListProcessCommandL(aCommand,iListBox); 
+	}
+
+// ----------------------------------------------------
+// CBlidSavedWayptsContainer::MakeEmptyTextListBoxL
+// ----------------------------------------------------
+//
+void CBlidSavedWayptsContainer::MakeEmptyTextListBoxL( TInt aResourceText )
+    {
+    HBufC* textFromResourceFile;
+    textFromResourceFile = iCoeEnv->AllocReadResourceLC( aResourceText );
+    iListBox->View()->SetListEmptyTextL( *textFromResourceFile );
+    CleanupStack::PopAndDestroy();  // textFromResourceFile.
+    }
+
+#ifdef RD_SCALABLE_UI_V2 
+// ---------------------------------------------------------------------------
+// CBlidSavedWayptsContainer::SetListBoxObserver
+// ---------------------------------------------------------------------------
+//
+void CBlidSavedWayptsContainer::SetListBoxObserver( MEikListBoxObserver* aObserver )
+    {
+    iListBox->SetListBoxObserver( aObserver );
+    }
+#endif // RD_SCALABLE_UI_V2    	
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/basiclocationinfodisplay/blid/ui/src/CBlidSavedWayptsLBModel.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,125 @@
+/*
+* 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:  Provides SavedWayptsView's details.
+*
+*/
+
+
+// INCLUDE FILES
+#include <StringLoader.h> 
+#include <AknUtils.h>
+#include <blid.rsg>
+#include "CBlidSavedWayptsLBModel.h"
+#include "MBlidLocation.h"
+#include "MBlidSettings.h"
+#include "MBlidRouter.h"
+#include "bliduiconsts.h"
+#include "Blid.hrh"
+#include "Blidutils.h"
+#include "Debug.h"
+#include "lbscommon.h"
+
+
+// ================= MEMBER FUNCTIONS =======================
+// ----------------------------------------------------------------------------
+// CBlidSavedWayptsLBModel::NewLC
+// Two-phased constructor.
+// ----------------------------------------------------------------------------
+//
+CBlidSavedWayptsLBModel* CBlidSavedWayptsLBModel::NewLC( MBlidLocation* aLocationModel,
+                                               MBlidSettings* aSettings,MBlidRouter* aRouter )
+    {
+    CBlidSavedWayptsLBModel* ptr =
+		new (ELeave) CBlidSavedWayptsLBModel( aLocationModel, aSettings,aRouter );
+	CleanupStack::PushL(ptr);
+	ptr->ConstructL();
+	return ptr;
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidSavedWayptsLBModel::CBlidSavedWayptsLBModel
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// ----------------------------------------------------------------------------
+//
+CBlidSavedWayptsLBModel::CBlidSavedWayptsLBModel(MBlidLocation* aLocationModel,
+                                       MBlidSettings* aSettings,MBlidRouter* aRouter):
+    iLocationModel( aLocationModel ), iSettingsModel( aSettings ),iRouter(aRouter)
+    {
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidSavedWayptsLBModel::ConstructL
+// Symbian 2nd phase constructor can leave.
+// ----------------------------------------------------------------------------
+//
+void CBlidSavedWayptsLBModel::ConstructL()
+    {
+    iBuffer = HBufC::NewL( KBlidLBLineMaxLen );
+    }
+
+// ---------------------------------------------------------
+// CBlidSavedWayptsLBModel::~CBlidSavedWayptsLBModel
+// ---------------------------------------------------------
+//
+CBlidSavedWayptsLBModel::~CBlidSavedWayptsLBModel()
+    {
+  	delete iBuffer;
+    }
+
+
+// ----------------------------------------------------------------------------
+// CBlidSavedWayptsLBModel::MdcaCount
+// ----------------------------------------------------------------------------
+//
+TInt CBlidSavedWayptsLBModel::MdcaCount() const
+    {
+
+    TInt count(iRouter->Count());
+	return count;
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidSavedWayptsLBModel::MdcaPoint
+// ----------------------------------------------------------------------------
+//
+TPtrC16 CBlidSavedWayptsLBModel::MdcaPoint(TInt aIndex) const
+    {
+    TPtr ptr( iBuffer->Des() );
+    ptr.Zero();
+    HBufC* name = (HBufC*)NULL;
+    TBuf<KBlidWaypointNameMaxLen> temp;
+    temp.Zero();
+    if(aIndex < iRouter->Count())
+        {
+        name = iRouter->At(aIndex).Name();    
+        }
+    if ( name )
+    	{
+        _LIT(KFormatString,"%d");
+        ptr.Format(KFormatString,1);
+        ptr.Append( EKeyTab );  
+        ptr.Append( *name );
+        }
+    else
+        {        
+        ptr.Append( EKeyTab );                
+        }
+        
+    AknTextUtils::LanguageSpecificNumberConversion( ptr );
+    delete name;
+    return iBuffer->Des();
+   }
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/basiclocationinfodisplay/blid/ui/src/CBlidSavedWayptsView.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,519 @@
+/*
+* 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:  Provides blid main view class methods.
+*
+*/
+
+
+// INCLUDE FILES
+#include <blid.rsg>
+#include <EPos_CPosLandmarkDatabase.h>
+#include <eikmenub.h> // CEikMenuBar
+#include <avkon.hrh>
+#include <aknViewAppUi.h>
+#include <AknQueryDialog.h> 
+#include <StringLoader.h>
+#include <AknsConstants.h>
+#include "Blid.hrh"
+#include "CBlidSavedWayptsContainer.h"
+#include "CBlidEng.h"
+#include "CBlidDocument.h"
+#include "MBlidLocation.h"
+#include "CBlidAppUi.h"
+#include "CBlidSavedWayptsView.h"
+#include "aknlists.h"
+#include "CLmkEditorDlg.h"
+#include "bliduiconsts.h"
+
+
+//CONSTANTS
+enum TPanicCode
+    {
+    KBlidNullPointer = 1
+    };
+
+
+// ================= MEMBER FUNCTIONS =======================
+// ----------------------------------------------------------------------------
+// CBlidSavedWayptsView::NewLC
+// Two-phased constructor.
+// ----------------------------------------------------------------------------
+//
+CBlidSavedWayptsView* CBlidSavedWayptsView::NewLC( MKeyProcessor& aKeyProcessor )
+    {
+    CBlidSavedWayptsView* self = new (ELeave) CBlidSavedWayptsView(aKeyProcessor);
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    return self;
+    }
+// ----------------------------------------------------------------------------
+// CBlidSavedWayptsView::CBlidSavedWayptsView
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// ----------------------------------------------------------------------------
+//
+CBlidSavedWayptsView::CBlidSavedWayptsView( MKeyProcessor& aKeyProcessor ):
+    CBlidBaseView( aKeyProcessor )
+    {
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidSavedWayptsView::ConstructL(const TRect& aRect)
+// Symbian 2nd phase constructor can leave.
+// ----------------------------------------------------------------------------
+//
+void CBlidSavedWayptsView::ConstructL()
+    {
+    BaseConstructL( R_BLID_SAVEDWAYPTS_VIEW );
+
+    iSettings = iEngine->SettingsModel();
+    __ASSERT_DEBUG(iSettings,
+        		   User::Panic(_L("CBlidSavedWayptsView"),
+        		   KBlidNullPointer));
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidMainView::~CBlidSavedWayptsView
+// ----------------------------------------------------------------------------
+//
+CBlidSavedWayptsView::~CBlidSavedWayptsView()
+    {
+    if ( iContainer )
+        {
+        static_cast<CBlidAppUi*>(AppUi())->RemoveFromViewStack( *this, iContainer );
+        }
+
+    delete iContainer;
+    }
+
+// ---------------------------------------------------------
+// CBlidSavedWayptsView::NotifyL
+// ---------------------------------------------------------
+//
+void CBlidSavedWayptsView::NotifyL( const TBool aOnlineMode )
+    {
+    if( iContainer )
+        {
+        iContainer->UpdateL();
+        }
+    CBlidBaseView::NotifyL( aOnlineMode );    
+    }
+
+// ----------------------------------------------------------------------------
+// TUid CBlidSavedWayptsView::Id
+// ----------------------------------------------------------------------------
+//
+TUid CBlidSavedWayptsView::Id() const
+    {
+    return TUid::Uid(EBlidSavedWayptsView);
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidSavedWayptsView::HandleCommandL
+// ----------------------------------------------------------------------------
+//
+void CBlidSavedWayptsView::HandleCommandL(TInt aCommand)
+    {
+    iContainer-> HandleMarkCommandL( aCommand );
+    
+    switch ( aCommand )
+        {
+        case EAknSoftkeyBack:
+            {
+            static_cast<CBlidAppUi*>(AppUi())->ActivateLocalViewL( iPreviousViewid.iViewUid );
+            break;
+            }
+        case EBlidCmdRenameWaypt:
+            {
+		  	if(RenameWaypointL())
+            	{
+                static_cast<CBlidDocument*>(AppUi()->Document())->SaveL();
+                }
+            break;
+            }
+        case EBlidCmdDeleteWaypt:
+            {
+            HandleWaypointsDeletionL();            
+            break;
+            }
+        default:
+            {
+            static_cast<CBlidAppUi*>(AppUi())->HandleCommandL( aCommand );
+            break;
+            }
+        } // switch
+        
+    if( iContainer )
+        {
+        iContainer->UpdateL();
+        }
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidSavedWayptsView::DoActivateL
+// ----------------------------------------------------------------------------
+//
+void CBlidSavedWayptsView::DoActivateL(
+   const TVwsViewId& aPrevViewId,TUid /*aCustomMessageId*/,
+   const TDesC8& /*aCustomMessage*/)
+    {
+    #ifdef _DEBUG
+    RDebug::Print(_L("CBlidSavedWayptsView::DoActivateL() called"));
+    #endif
+
+    if ( !iContainer )
+        {
+        iContainer = CBlidSavedWayptsContainer::NewL(*this, this, ClientRect(), 
+            iLocation, iSettings,iRouter, *this);
+        static_cast<CBlidAppUi*>(AppUi())->AddToStackL( *this, iContainer );
+        iLocation->SetObserver(*this, EBlidSavedWayptsView);      
+        if(!iMSKVisible)
+            {
+            SetMSKVisible();
+            }
+        MenuBar()->SetContextMenuTitleResourceId(R_BLID_SAVEDWAYPTS_VIEW_OK_MENUBAR);	
+        
+        #ifdef RD_SCALABLE_UI_V2
+        iContainer->SetListBoxObserver(this);
+        #endif // RD_SCALABLE_UI_V2        
+        }
+   iPreviousViewid = aPrevViewId;
+   }
+
+// ----------------------------------------------------------------------------
+// CBlidSavedWayptsView::DoDeactivate
+// ----------------------------------------------------------------------------
+//
+void CBlidSavedWayptsView::DoDeactivate()
+    {
+    if ( iContainer )
+        {
+        static_cast<CBlidAppUi*>(AppUi())->RemoveFromViewStack( *this, iContainer );
+        }
+    delete iContainer;
+    iContainer = NULL;
+    }
+
+// ---------------------------------------------------------
+// CBlidSavedWayptsView::DynInitMenuPaneL
+// ---------------------------------------------------------
+//
+void CBlidSavedWayptsView::DynInitMenuPaneL(
+    TInt aResourceId, CEikMenuPane* aMenuPane )
+    {
+    AknSelectionService::HandleMarkableListDynInitMenuPane(aResourceId, 
+                                                           aMenuPane,
+                                                           iContainer->iListBox);
+    switch(aResourceId)
+        {
+        case R_BLID_SAVEDWAYPTS_VIEW_OK_MENU:
+        case R_BLID_SAVEDWAYPTS_MENU:
+            {
+            if( iRouter->Count() <= 0 )
+                {
+                aMenuPane->SetItemDimmed( EBlidCmdRenameWaypt, ETrue );
+                aMenuPane->SetItemDimmed( EBlidCmdDeleteWaypt, ETrue );                
+                }
+                            
+            const CArrayFix<TInt>& indexes = *iContainer->iListBox->SelectionIndexes();
+            if(indexes.Count() != 0)
+            	{
+                aMenuPane->SetItemDimmed( EBlidCmdRenameWaypt, ETrue );
+            	}
+
+            break;
+            }        
+        default:
+            {
+            break;
+            }
+        }
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidSavedWayptsView::RenameWaypointL()
+// ----------------------------------------------------------------------------
+//
+TBool CBlidSavedWayptsView::RenameWaypointL()
+    {
+    TInt index(0);
+    TBuf<KBlidWaypointNameMaxLen> textData;
+    index = iContainer->SelectedRow();
+    TNamedCoordinate currentWaypoint;
+    if(index < iRouter->Count() && index >= 0)
+        {
+        currentWaypoint = iRouter->At(index);        
+        }
+    HBufC* waypointName = currentWaypoint.Name();
+    textData = waypointName->Des();
+    TInt errorCode(KErrNone);
+    TBool returnValue(ETrue);
+    TInt removedIndex;
+        
+    do
+    	{
+    	if(errorCode != KErrNone)
+    		{
+    		delete waypointName;
+    		return EFalse;
+    		}
+      	CAknTextQueryDialog* dlg = new(ELeave) CAknTextQueryDialog(textData,
+                                               CAknQueryDialog::ENoTone);
+                                               
+       	if (!dlg->ExecuteLD(R_BLID_WAYPOINT_QUERY) || 
+       	    (waypointName->Compare(textData) == 0 ) )
+        	{
+        	delete waypointName;
+           	return EFalse;           
+           	}
+        
+      	}while( CheckIfExistL( textData, errorCode, removedIndex ) );
+      	
+    delete waypointName;
+      	
+    if ( index == KErrCancel )
+    	{
+        return EFalse;
+        }
+    
+    TInt retVal(KErrNone);
+    if ( index >=0 )
+    	{
+        //Check if CheckIfExistL has removed a waypoint below index
+        if((removedIndex != -1 ) && 
+           (removedIndex < index) )
+        	{
+        	--index;
+        	}
+
+        
+        retVal = iRouter->RemoveL( index );
+        if(retVal == KErrDiskFull)
+        	{        	
+        	returnValue = EFalse;
+        	BlidNotes::OutOfMemoryNoteL();	
+        	}
+        }
+   
+    if(retVal == KErrNone)
+    	{
+    	TNamedCoordinate* waypoint = new(ELeave)TNamedCoordinate();
+	    CleanupStack::PushL( waypoint );
+	    waypoint->SetName( textData );
+	    TPosition position = iLocation->GetCurrentPosition();
+	    waypoint->SetCoordinate( position.Latitude(),
+	    						 position.Longitude(),
+	            	             position.Altitude() );
+	    position.SetHorizontalAccuracy(position.HorizontalAccuracy());
+	    waypoint->SetAccuracy(position.HorizontalAccuracy());
+	    //iRouter takes waypoint's ownership    
+	    TInt retVal = iRouter->AppendL( waypoint, ETrue );
+	    if(retVal == KErrDiskFull)
+	    	{
+	    	returnValue = EFalse;
+	        BlidNotes::OutOfMemoryNoteL();
+	        }
+	    CleanupStack::Pop(); //waypoint
+        // Set the actual index of renamed wp
+        retVal = iRouter->FindWaypointIndex( waypoint );
+        if( retVal != KErrNotFound )
+            {
+            iContainer->iListBox->SetCurrentItemIndex(retVal);
+            }
+    	}    
+    return returnValue;
+	}
+
+// ----------------------------------------------------------------------------
+// CBlidSavedWayptsView::DeleteWaypointL()
+// ----------------------------------------------------------------------------
+//
+TBool CBlidSavedWayptsView::DeleteWaypointL(TInt aIndex)
+    {
+    if ( aIndex == KErrCancel )
+    	{
+        return EFalse;
+    	}
+      
+    if ( aIndex >=0 )
+    	{
+    	TInt retVal = iRouter->RemoveL( aIndex );        
+    	if(retVal == KErrDiskFull)
+        	{
+        	BlidNotes::OutOfMemoryNoteL(); 
+        	return EFalse;       	
+        	}
+        if(iRouter->Count() <= 0)
+            {
+            SetMSKNotVisible();            
+            }
+        }    
+    return ETrue;
+  	}
+
+
+// ----------------------------------------------------------------------------
+// CBlidSavedWayptsView::DeleteWaypointsL()
+// ----------------------------------------------------------------------------
+//
+TBool CBlidSavedWayptsView::DeleteWaypointsL(const CArrayFix<TInt>& aIndexes)
+    {
+    const TInt count( aIndexes.Count() );
+    TBool retVal = 0;
+    TBool deleteOpRetVal(ETrue);
+    
+    if(count == 1)
+        {
+        TInt index = aIndexes.At( 0 );
+        TDesC* name = iRouter->At( index ).Name();        
+        CleanupStack::PushL(name);
+        HBufC* buffer = StringLoader::LoadL(R_BLID_QUERY_DELETE_WAYPOINT,
+                                            (*name),
+                                            iCoeEnv);                                                    
+        CAknQueryDialog* dlg = CAknQueryDialog::NewL();
+        CleanupStack::PushL(dlg);
+        dlg->SetPromptL(buffer->Des());
+        retVal = dlg->ExecuteLD(R_BLID_CONFIRMATION_QUERY);
+        if( retVal )
+            {
+            deleteOpRetVal = DeleteWaypointL(index);
+            }
+        else
+        	{
+        	deleteOpRetVal = EFalse;
+        	}
+        CleanupStack::Pop(2);
+        delete buffer;
+        delete name;
+        if((iRouter->Count() != 0) && (index == iRouter->Count()))
+            {
+            iContainer->iListBox->SetCurrentItemIndex(index-1);
+            }
+        }
+    else
+        {        
+        HBufC* buffer = StringLoader::LoadL(R_BLID_QUERY_DELETE_WAYPOINTS,
+                                        count,
+                                        iCoeEnv);                                            
+        CleanupStack::PushL(buffer);
+        CAknQueryDialog* dlg = CAknQueryDialog::NewL();
+        CleanupStack::PushL(dlg);
+        dlg->SetPromptL(buffer->Des());
+        retVal = dlg->ExecuteLD(R_BLID_CONFIRMATION_QUERY);
+        if( retVal )
+            {
+            TInt markedArray[KMaxNumberOfWaypoints] = {0};
+            
+            for ( TInt i(0 ); i < count; ++i )
+            	{
+                TInt ix = aIndexes.At( i );                
+                markedArray[ix] = 1;
+                }
+            TInt waypointCount = iRouter->Count();
+            for( TInt i= waypointCount-1; i >= 0; --i )
+            	{
+            	if(markedArray[i])
+            		{
+            		deleteOpRetVal = DeleteWaypointL(i);
+            		if(!deleteOpRetVal)
+            			{
+            			break;
+            			}
+            		}
+            	}
+            }
+        else
+        	{
+        	deleteOpRetVal = EFalse;
+        	}
+        CleanupStack::Pop(2); // buffer, dlg        
+        delete buffer;
+        TInt index = iContainer->iListBox->CurrentItemIndex();
+        if( (iRouter->Count()!=0) && (index == -1) )
+            {
+            iContainer->iListBox->SetCurrentItemIndex(iRouter->Count() - 1);
+            }
+        }
+    return deleteOpRetVal;
+    }
+    
+// ----------------------------------------------------------------------------
+// CBlidSavedWayptsView::HandleWaypointsDeletionL()
+// ----------------------------------------------------------------------------
+//
+void CBlidSavedWayptsView::HandleWaypointsDeletionL()
+    {
+    const CArrayFix<TInt>& indexes = *iContainer->iListBox->SelectionIndexes();
+    TBool retVal(ETrue);
+    if (indexes.Count() == 0)
+        {
+        TInt index(0);
+        index = iContainer->SelectedRow();
+                
+        TDesC* name;
+        if( index < 0 )
+            {
+            return;
+            }
+        name = iRouter->At( index ).Name();
+        CleanupStack::PushL(name);
+        HBufC* buffer = StringLoader::LoadL(R_BLID_QUERY_DELETE_WAYPOINT,
+                                            (*name),
+                                            iCoeEnv);                                            
+        CleanupStack::PushL(buffer);
+        CAknQueryDialog* dlg = CAknQueryDialog::NewL();
+        CleanupStack::PushL(dlg);
+        dlg->SetPromptL(buffer->Des());
+        if( dlg->ExecuteLD(R_BLID_CONFIRMATION_QUERY) )
+            {
+            retVal = DeleteWaypointL(index);
+            }
+        else
+        	{
+        	retVal = EFalse;
+        	}  
+        CleanupStack::Pop(3); // buffer, dlg, name
+        delete buffer;
+        delete name;
+        if((iRouter->Count()!=0) && (index == iRouter->Count()))
+            {
+            iContainer->iListBox->SetCurrentItemIndex(index-1);
+            }
+        }
+     else
+        {
+        retVal = DeleteWaypointsL(indexes);
+        if( retVal )
+            {
+            iContainer->iListBox->ClearSelection();	
+            }            	
+        }
+    if(retVal)
+    	{
+    	static_cast<CBlidDocument*>(AppUi()->Document())->SaveL();
+    	}    
+    }
+
+
+#ifdef RD_SCALABLE_UI_V2
+// ---------------------------------------------------------------------------
+// CBlidSavedWayptsView::HandleListBoxSelectionL
+// ---------------------------------------------------------------------------
+//
+void CBlidSavedWayptsView::HandleListBoxSelectionL()
+    {
+    MenuBar()->TryDisplayContextMenuBarL();        
+    }
+#endif // RD_SCALABLE_UI_V2
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/basiclocationinfodisplay/blid/ui/src/CBlidSettingsContainer.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,223 @@
+/*
+* 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:  Provides blid request container class methods.
+*
+*/
+
+
+
+// INCLUDE FILES
+#include <aknnavide.h>
+#include <aknlists.h>
+#include <blid.rsg>
+#include <AknDef.h>
+#include <csxhelp/blid.hlp.hrh>
+
+#include "CBlidSettingsContainer.h"
+#include "CBlidSettingsLBModel.h"
+#include "Blid.hrh"
+
+
+// ================= MEMBER FUNCTIONS =======================
+// ---------------------------------------------------------
+// CBlidSettingsContainer::NewL
+// ---------------------------------------------------------
+//
+CBlidSettingsContainer* CBlidSettingsContainer::NewL(    
+                            MKeyProcessor& aKeyProcessor,
+                            MObjectProvider* aParent,
+		                    const TRect& aRect,
+                            MBlidSettings* aSettingsModel,
+                            CBlidBaseView& aView )
+	{
+	CBlidSettingsContainer* view =
+		new (ELeave) CBlidSettingsContainer( aKeyProcessor, aView );
+	CleanupStack::PushL(view);
+	view->SetMopParent( aParent );
+	view->ConstructL(aRect, aSettingsModel );
+    CleanupStack::Pop( view ); // view
+	return view;
+	}
+
+// ---------------------------------------------------------
+// CBlidSettingsContainer::CBlidSettingsContainer
+// ---------------------------------------------------------
+//
+CBlidSettingsContainer::CBlidSettingsContainer( MKeyProcessor& aKeyProcessor,
+                                                CBlidBaseView& aView )
+    :CBlidBaseContainer( aKeyProcessor, KBLID_HLP_SETTINGS ), iView(aView)
+    {
+    }
+
+// ---------------------------------------------------------
+// CBlidSettingsContainer::ConstructL
+// EPOC two phased constructor
+// ---------------------------------------------------------
+//
+void CBlidSettingsContainer::ConstructL(const TRect& aRect, 
+                                        MBlidSettings* aSettingsModel)
+    {
+    CreateWindowL();
+    CreateNaviPaneL( ETrue );
+    
+    iListBox = new( ELeave ) CAknSettingStyleListBox;
+    iListBox->SetContainerWindowL( *this );
+    iListBox->ConstructL( this, EAknListBoxMenuList );
+    
+    // Make scroll arrows
+    iListBox->CreateScrollBarFrameL( ETrue );
+    iListBox->ScrollBarFrame()->SetScrollBarVisibilityL(
+    CEikScrollBarFrame::EOff,CEikScrollBarFrame::EOn );
+
+
+    // create engine model for listbox, pass ownership
+    MDesCArray* model = CBlidSettingsLBModel::NewLC( aSettingsModel );
+    iListBox->Model()->SetItemTextArray( model );
+    iListBox->Model()->SetOwnershipType( ELbmOwnsItemArray );
+    CleanupStack::Pop(); // model
+
+    MakeTitleL(R_BLID_TITLE_SETTINGS);
+    SetRect(aRect);
+    ActivateL();
+    }
+
+// ---------------------------------------------------------
+// CBlidSettingsContainer::~CBlidSettingsContainer
+// ---------------------------------------------------------
+//
+CBlidSettingsContainer::~CBlidSettingsContainer()
+    {
+    delete iDecoratedTabGroup;
+    delete iListBox;
+    }
+
+// ---------------------------------------------------------
+// CBlidSettingsContainer::ListBox
+// ---------------------------------------------------------
+//
+CAknSettingStyleListBox* CBlidSettingsContainer::ListBox() const
+    {
+    return iListBox;
+    }
+
+// ---------------------------------------------------------
+// CBlidSettingsContainer::SizeChanged()
+// Called by framework when the view size is changed
+// ---------------------------------------------------------
+//
+void CBlidSettingsContainer::SizeChanged()
+    {
+    iListBox->SetRect( Rect() );
+    }
+
+// ---------------------------------------------------------
+// CBlidSettingsContainer::CountComponentControls() const
+// ---------------------------------------------------------
+//
+TInt CBlidSettingsContainer::CountComponentControls() const
+    {
+    return 1; // return nbr of controls inside this container
+    }
+
+// ---------------------------------------------------------
+// CBlidSettingsContainer::ComponentControl(TInt aIndex) const
+// ---------------------------------------------------------
+//
+CCoeControl* CBlidSettingsContainer::ComponentControl(TInt /*aIndex*/ ) const
+    {    
+    return iListBox;
+    }
+    
+// ---------------------------------------------------------
+// CBlidSettingsContainer::HandleResourceChange
+// ---------------------------------------------------------
+//
+void CBlidSettingsContainer::HandleResourceChange(TInt aType)
+    {
+    CBlidBaseContainer::HandleResourceChange( aType );
+    switch(aType)
+    	{
+    	case KEikDynamicLayoutVariantSwitch:
+	    	 {
+             iView.Update(this);  
+	    	 break;
+	    	}
+        default:
+	        {
+	        break;	
+	        }
+	   }   
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidSettingsContainer::FocuChanged()
+// ----------------------------------------------------------------------------
+//
+void CBlidSettingsContainer::FocusChanged(TDrawNow aDrawNow)
+	{
+	if (iListBox)
+		{
+		iListBox->SetFocus(IsFocused(), aDrawNow);			
+		}
+	}
+
+// ----------------------------------------------------------------------------
+// CBlidSettingsContainer::OfferKeyEventL
+// ----------------------------------------------------------------------------
+//
+TKeyResponse CBlidSettingsContainer::OfferKeyEventL( const TKeyEvent& aKeyEvent,
+                                     TEventCode aType)
+    {    
+    if ( aType == EEventKeyUp || aType == EEventKeyDown )
+		{
+		TInt lIndex = iListBox->CurrentItemIndex();
+        switch( lIndex )
+            {
+            case EBlidSettingsResetOdometer:
+                {
+				iView.RemoveMiddleSoftKeyLabel( EBlidCmdMskChangeSetting );
+				iView.SetMiddleSoftKeyLabelL( R_BLID_MSK_RESET,EBlidCmdMskResetSetting );				
+            	break;
+                }
+            // Other values are not accepted.
+            case EBlidSettingsBacklight:
+            case EBlidSettingsArrivalTone:
+            case EBlidSettingsCalibration:
+                {
+				iView.RemoveMiddleSoftKeyLabel( EBlidCmdMskResetSetting );
+				iView.SetMiddleSoftKeyLabelL( R_BLID_MSK_CHANGE, EBlidCmdMskChangeSetting );				
+				break;
+                }
+			default:
+				{
+				break;					
+				}                
+            }
+		return EKeyWasConsumed;
+		}
+    return CBlidBaseContainer::OfferKeyEventL( aKeyEvent, aType );
+    }
+    	
+#ifdef RD_SCALABLE_UI_V2 
+// ---------------------------------------------------------------------------
+// CBlidSettingsContainer::SetListBoxObserver
+// ---------------------------------------------------------------------------
+//
+void CBlidSettingsContainer::SetListBoxObserver( MEikListBoxObserver* aObserver )
+    {
+    iListBox->SetListBoxObserver( aObserver );
+    }
+#endif // RD_SCALABLE_UI_V2
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/basiclocationinfodisplay/blid/ui/src/CBlidSettingsLBModel.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,248 @@
+/*
+* 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:  Provides Blid request view listbox model.
+*
+*/
+
+
+// INCLUDE FILES
+#include <StringLoader.h> 
+#include <AknUtils.h>
+#include <blid.rsg>
+#include "CBlidSettingsLBModel.h"
+#include "MBlidSettings.h"
+#include "bliduiconsts.h" 
+#include "Blidutils.h"
+#include "Blid.hrh"
+
+// ================= MEMBER FUNCTIONS =======================
+// ----------------------------------------------------------------------------
+// CBlidSettingsLBModel::NewLC
+// Two-phased constructor.
+// ----------------------------------------------------------------------------
+//
+CBlidSettingsLBModel* CBlidSettingsLBModel::NewLC( 
+                       MBlidSettings* aSettingsModel )
+    {
+    CBlidSettingsLBModel* self =
+		new (ELeave) CBlidSettingsLBModel( aSettingsModel );
+	CleanupStack::PushL(self);
+	self->ConstructL();
+	return self;
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidSettingsLBModel::CBlidSettingsLBModel
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// ----------------------------------------------------------------------------
+//
+CBlidSettingsLBModel::CBlidSettingsLBModel(MBlidSettings* aSettingsModel):
+    iSettingsModel(aSettingsModel)
+    {
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidSettingsLBModel::ConstructL
+// Symbian 2nd phase constructor can leave.
+// ----------------------------------------------------------------------------
+//
+void CBlidSettingsLBModel::ConstructL()
+    {
+    iLocale = new(ELeave)TLocale();
+
+    iEnv = CEikonEnv::Static();
+    iBuffer = HBufC::NewL( KBlidLBLineMaxLen );
+    
+    iBlidArrivalToneName = HBufC::NewL( 257 );
+    	    
+    iBlidAltitude =  StringLoader::LoadL( R_BLID_ALTITUDE_CALIBRATION, iEnv);
+    iAltitudeFormatM =  iEnv->AllocReadResourceL( R_BLID_METRIC_METER );
+    iAltitudeFormatFt =  iEnv->AllocReadResourceL( 
+                         R_BLID_IMPERIAL_FOOT );
+    iBlidBacklight = iEnv->AllocReadResourceL( 
+		         R_BLID_BACKLIGHT);
+    iBlidBacklightNormal = iEnv->AllocReadResourceL( 
+		         R_BLID_BACKLIGHT_NORMAL);
+    iBlidBacklightOn = iEnv->AllocReadResourceL( 
+		         R_BLID_BACKLIGHT_ON);		         
+    iBlidArrivalTone = iEnv->AllocReadResourceL( 
+		         R_BLID_ARRIVAL_RINGING_TONE );
+    iBlidResetOdom = iEnv->AllocReadResourceL( 
+		         R_BLID_RESET_ODOMETER );
+    iBlidArrivalToneOff = iEnv->AllocReadResourceL( 
+		         R_BLID_ARRIVAL_TONE_OFF );		         		         
+    }
+
+// ---------------------------------------------------------
+// CBlidSettingsLBModel::~CBlidSettingsLBModel
+// ---------------------------------------------------------
+//
+CBlidSettingsLBModel::~CBlidSettingsLBModel()
+    {
+    delete iBlidAltitude;
+    delete iAltitudeFormatM;
+    delete iAltitudeFormatFt;
+    delete iBuffer;
+    delete iLocale;
+    delete iBlidBacklight;
+    delete iBlidBacklightNormal;
+    delete iBlidBacklightOn;
+    delete iBlidArrivalTone;
+    delete iBlidResetOdom;
+    delete iBlidArrivalToneOff;
+    delete iBlidArrivalToneName;
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidSettingsLBModel::MdcaCount
+// ----------------------------------------------------------------------------
+//
+TInt CBlidSettingsLBModel::MdcaCount() const
+    {
+    return 4;
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidSettingsLBModel::MdcaPoint
+// ----------------------------------------------------------------------------
+//
+TPtrC16 CBlidSettingsLBModel::MdcaPoint(TInt aIndex) const
+    {
+    TPtr ptr( iBuffer->Des() );
+    ptr.Zero();
+    switch ( aIndex )
+        {
+        case EBlidSettingsCalibration:
+            {
+            TBuf<KBlidLBItemMaxLen> altitudeString;
+            CalibrationFormat( altitudeString );
+
+            ptr.Append( EKeyTab ); // EKeyTab is same as "\t"
+            ptr.Append( *iBlidAltitude );
+            ptr.Append( EKeyTab );
+            ptr.Append( EKeyTab );            
+            ptr.Append( altitudeString );
+            break;
+            }      
+        case EBlidSettingsBacklight:
+            {
+            TBuf<KBlidLBItemMaxLen> backlightString;
+            BacklightFormat( backlightString );
+
+            ptr.Append( EKeyTab ); // EKeyTab is same as "\t"
+            ptr.Append( *iBlidBacklight );
+            ptr.Append( EKeyTab );
+            ptr.Append( EKeyTab );            
+            ptr.Append( backlightString );
+            break;
+            }
+        case EBlidSettingsArrivalTone:
+            {
+            TBuf<KMaxFileName> arrivalTone;
+            ArrivalToneFormat( arrivalTone );
+
+            ptr.Append( EKeyTab ); // EKeyTab is same as "\t"
+            ptr.Append( *iBlidArrivalTone );
+            ptr.Append( EKeyTab );
+            ptr.Append( EKeyTab );            
+            ptr.Append( arrivalTone );
+            break;
+            }                 
+        case EBlidSettingsResetOdometer:
+            {
+            ptr.Append( EKeyTab ); // EKeyTab is same as "\t"
+            ptr.Append( *iBlidResetOdom );
+            ptr.Append( EKeyTab );
+            break;
+            }                 
+        default:
+            {
+            break;
+            }
+        }
+
+    AknTextUtils::LanguageSpecificNumberConversion( ptr );
+    return iBuffer->Des();
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidSettingsLBModel::CalibrationFormat
+// ----------------------------------------------------------------------------
+//
+void CBlidSettingsLBModel::CalibrationFormat( TDes& aCalibrationString ) const
+    {
+    TInt result(0);    
+    HBufC* formatter = NULL;
+    TInt error( KErrNone );
+    if ( iSettingsModel->UnitOfMeasurement() == EUnitsMetric )
+        {
+        formatter = iAltitudeFormatM;        
+        error = BlidUtils::TRealToTInt( 
+                    iSettingsModel->AltCalibration(), result );
+        }
+    else
+        {        
+        formatter = iAltitudeFormatFt;        
+        TReal calibrationFt((iSettingsModel->AltCalibration()*KMetreToFoot));
+        error = BlidUtils::TRealToTInt( calibrationFt, result );                
+        }
+    if(error!=KErrNone)
+        {
+        iEnv->HandleError( error );
+        result = 0;
+        }
+    StringLoader::Format( aCalibrationString, *formatter, 0, result );
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidSettingsLBModel::BacklightFormat
+// ----------------------------------------------------------------------------
+//
+void CBlidSettingsLBModel::BacklightFormat( TDes& aBacklightString ) const
+    {
+    
+    if ( iSettingsModel->GetBacklightOption() == EBlidBackLightNormal )
+        {
+        aBacklightString = *iBlidBacklightNormal;  
+        }
+    else
+        {        
+        aBacklightString = *iBlidBacklightOn; 
+        }
+    
+    }
+    
+// ----------------------------------------------------------------------------
+// CBlidSettingsLBModel::ArrivalToneFormat
+// ----------------------------------------------------------------------------
+//
+void CBlidSettingsLBModel::ArrivalToneFormat( TDes& aRrivalTone ) const
+    {
+    if( iSettingsModel->GetArrivedToneName().Length() > 0 )
+	    {
+        TParse parseFile;
+        TBuf<KMaxFileName> toneFileName;
+        toneFileName.Copy( iSettingsModel->GetArrivedToneName() );
+        parseFile.Set( toneFileName, NULL, NULL );
+
+	    iBlidArrivalToneName->Des().Copy( parseFile.NameAndExt() );
+	    aRrivalTone = *iBlidArrivalToneName;
+	    }
+    else
+	    {
+	    aRrivalTone = *iBlidArrivalToneOff;    	
+	    }
+    }     
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/basiclocationinfodisplay/blid/ui/src/CBlidSettingsView.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,576 @@
+/*
+* 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:  Provides Blid request view class methods.
+*
+*/
+
+
+// INCLUDE FILES
+#include <aknlists.h>
+#include <aknViewAppUi.h>
+#include <akntextsettingpage.h> 
+#include <blid.rsg>
+#include <aknradiobuttonsettingpage.h>
+#include <sysutil.h>
+#include <driveinfo.h>
+#include <CFLDFileListContainer.h>
+#include <aknnotedialog.h>
+
+#include "CBlidSettingsView.h"
+#include "Blid.hrh"
+#include "CBlidSettingsContainer.h"
+#include "CBlidDocument.h" 
+#include "CBlidEng.h" 
+#include "MBlidSettings.h"
+#include "bliduiconsts.h"
+#include "Blidutils.h"
+#include "CBlidAppUi.h"
+
+// CONSTANTS
+enum TPanicCode
+    {
+    KBlidNullPointer = 1
+    };
+
+
+// ================= MEMBER FUNCTIONS =======================
+// ---------------------------------------------------------
+// CBlidSettingsView::NewLC
+// ---------------------------------------------------------
+//
+CBlidSettingsView* CBlidSettingsView::NewLC( MKeyProcessor& aKeyProcessor )
+    {
+    CBlidSettingsView* self = new (ELeave) CBlidSettingsView( aKeyProcessor );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    return self;
+    }
+
+// ---------------------------------------------------------
+// CBlidSettingsView::CBlidSettingsView
+// ---------------------------------------------------------
+//
+CBlidSettingsView::CBlidSettingsView( MKeyProcessor& aKeyProcessor ):
+    CBlidBaseView( aKeyProcessor )
+    {
+    }
+
+// ---------------------------------------------------------
+// CBlidSettingsView::ConstructL
+// Symbian two-phased constructor
+// ---------------------------------------------------------
+//
+void CBlidSettingsView::ConstructL()
+    {
+    CBlidEng* eng = static_cast<CBlidDocument*>(AppUi()->Document())->Engine();
+    BaseConstructL( R_BLID_SETTINGS_VIEW );
+    iLocale = new(ELeave)TLocale();
+
+    eng->CreateModelL( CBlidEng::EBlidSettings );
+    iSettingsModel = eng->SettingsModel();
+    __ASSERT_DEBUG(iSettingsModel,User::Panic(_L("CBlidMainView"),
+                   KBlidNullPointer));
+    iBlidBacklightNormal = iCoeEnv->AllocReadResourceL( 
+		         R_BLID_BACKLIGHT_NORMAL);
+    iBlidBacklightOn = iCoeEnv->AllocReadResourceL( 
+		         R_BLID_BACKLIGHT_ON);		         
+    }
+
+// ---------------------------------------------------------
+// CBlidSettingsView::~CBlidSettingsView
+// ---------------------------------------------------------
+//
+CBlidSettingsView::~CBlidSettingsView()
+    {
+    if ( iContainer )
+        {
+        AppUi()->RemoveFromViewStack( *this, iContainer );
+        }
+
+    delete iContainer;
+    delete iLocale;
+    delete iBlidBacklightNormal;
+    delete iBlidBacklightOn;
+    }
+
+// ---------------------------------------------------------
+// CBlidSettingsView::Id
+// ---------------------------------------------------------
+//
+TUid CBlidSettingsView::Id() const
+    {
+    return TUid::Uid(EBlidSettingsView);
+    }
+
+// ---------------------------------------------------------
+// CBlidSettingsView::HandleCommandL
+// ---------------------------------------------------------
+//
+void CBlidSettingsView::HandleCommandL(TInt aCommand)
+    {
+    switch (aCommand)
+        {
+        case EBlidCmdChangeSetting:
+        case EBlidCmdResetSetting:
+            {
+            // Get the index in location functionality settings view
+            TInt indexLocationSetting=iContainer->ListBox()->CurrentItemIndex();
+            switch( indexLocationSetting )
+                {
+		        case EBlidSettingsCalibration:
+		            {
+                    ChangeAltitudeCalibrationL();
+                    break;
+                    }
+                case EBlidSettingsBacklight:
+                    {
+                    ChangeBacklightSettingsL();
+                    break;
+                    }
+                case EBlidSettingsArrivalTone:
+                    {
+                    OpenArrivalToneDialogL();
+                    break;
+                    }
+                case EBlidSettingsResetOdometer:
+                    {
+                    CheckResetOdometerOptionL();
+                    break;
+                    }                    
+		        default:
+		            {
+               	    User::Leave( KErrBadHandle );
+               	    break;
+                    }
+	            }
+	            break;
+	    	}
+        case EBlidCmdMskChangeSetting:
+        case EBlidCmdMskResetSetting:
+            {
+            // Get the index in location functionality settings view
+            TInt indexLocationSetting=iContainer->ListBox()->CurrentItemIndex();
+            switch( indexLocationSetting )
+                {
+		        case EBlidSettingsCalibration:
+		            {
+                    ChangeAltitudeCalibrationL();
+                    break;
+                    }                
+                case EBlidSettingsBacklight:
+                    {
+                    if ( iSettingsModel->GetBacklightOption() == EBlidBackLightNormal )
+                        {
+                        ChangeBacklightSettingsValueL(EBlidBackLightOnDuringNavigation);
+                        }
+                    else
+                        {
+                        ChangeBacklightSettingsValueL(EBlidBackLightNormal);
+                        } 
+                    break;                        
+                    }
+                case EBlidSettingsArrivalTone:
+                    {
+                    OpenArrivalToneDialogL();
+                    break;
+                    }
+                case EBlidSettingsResetOdometer:
+                    {
+                    CheckResetOdometerOptionL();
+                    break;
+                    }                    
+                default:
+                    {
+               	    User::Leave( KErrBadHandle );
+               	    break;                    
+                    }                    
+                }
+            break;            
+            }
+        case EBlidSettingsArrivalTone:
+            {
+            OpenArrivalToneDialogL();
+            break;
+            }
+        case EBlidSettingsResetOdometer:
+            {
+            CheckResetOdometerOptionL();
+            break;
+            }            
+        case EBlidSettingsCalibration:
+		    {
+            ChangeAltitudeCalibrationL();
+            break;
+            }
+        case EAknSoftkeyBack:
+            {
+            AppUi()->ActivateLocalViewL(TUid::Uid(iPrevViewId) );
+            break;
+            }
+        default:
+            {
+            static_cast<CBlidAppUi*>(AppUi())->HandleCommandL( aCommand );
+            break;
+            }
+        }// switch
+    }
+
+// ---------------------------------------------------------
+// CBlidSettingsView::DynInitMenuPaneL
+// ---------------------------------------------------------
+//
+void CBlidSettingsView::DynInitMenuPaneL( TInt aResourceId,
+										  CEikMenuPane* aMenuPane )
+    {
+    switch( aResourceId )
+        { 
+        case R_BLID_MAIN_MENU:
+            {
+            CBlidBaseView::HandleHelpFeatureL( aMenuPane );
+            break;
+            }
+        case R_BLID_SETTINGS_MENU:
+	        {
+            // Get the index in location functionality settings view
+            TInt indexLocationSetting=
+                iContainer->ListBox()->CurrentItemIndex();
+            switch( indexLocationSetting )
+                {
+                case EBlidSettingsResetOdometer:
+                    {
+                    aMenuPane->SetItemDimmed( EBlidCmdChangeSetting, ETrue );
+                	break;
+                    }
+                // Other values are not accepted.
+                default:
+                    {
+                    aMenuPane->SetItemDimmed( EBlidCmdResetSetting, ETrue );
+					break;
+                    }
+                }
+			break;	        	
+	        }
+        default:
+	        {
+	        break;	        	
+	        }
+        }
+    }
+
+// ---------------------------------------------------------
+// CBlidSettingsView::ProcessKeyEventL
+// ---------------------------------------------------------
+//
+TBool CBlidSettingsView::ProcessKeyEventL( const TKeyEvent& aKeyEvent,
+    TEventCode aType )
+    {
+    if( (aType == EEventKey) )
+        {
+        if ( aKeyEvent.iCode == EKeyOK )
+            {
+            // Get the index in location functionality settings view
+            TInt indexLocationSetting=
+                iContainer->ListBox()->CurrentItemIndex();
+            switch( indexLocationSetting )
+                {
+                case EBlidSettingsCalibration:
+                    {
+                    HandleCommandL( EBlidSettingsCalibration );
+                    break;
+                    }
+                // Other values are not accepted.
+                default:
+                    {
+                    break;
+                    }
+                }
+            return ETrue;
+            }
+        }
+
+    return CBlidBaseView::ProcessKeyEventL( aKeyEvent,aType );
+    }
+
+// ---------------------------------------------------------
+// CBlidSettingsView::DoActivateL
+// ---------------------------------------------------------
+//
+void CBlidSettingsView::DoActivateL(
+   const TVwsViewId& aPrevViewId,TUid /*aCustomMessageId*/,
+   const TDesC8& /*aCustomMessage*/)
+    {
+    iPrevViewId = aPrevViewId.iViewUid.iUid;
+    if (!iContainer)
+        {
+        iContainer = CBlidSettingsContainer::NewL(*this, this, ClientRect(),
+            iSettingsModel, *this);
+        AppUi()->AddToStackL( *this, iContainer );
+        SetMiddleSoftKeyLabelL(R_BLID_MSK_CHANGE,EBlidCmdMskChangeSetting); 
+
+        #ifdef RD_SCALABLE_UI_V2
+        iContainer->SetListBoxObserver(this);               
+        #endif //RD_SCALABLE_UI_V2        
+        }
+   }
+
+// ---------------------------------------------------------
+// CBlidSettingsView::DoDeactivate
+// ---------------------------------------------------------
+//
+void CBlidSettingsView::DoDeactivate()
+    {
+    if ( iContainer )
+        {
+        AppUi()->RemoveFromViewStack( *this, iContainer );
+        }
+
+    delete iContainer;
+    iContainer = NULL;
+    }
+
+// ---------------------------------------------------------
+// CBlidSettingsView::ChangeAltitudeCalibrationL
+// ---------------------------------------------------------
+//
+void CBlidSettingsView::ChangeAltitudeCalibrationL()
+    {     
+    TInt AltCalibration( 0 );
+    TInt error(0);
+    TReal altitude( iSettingsModel->AltCalibration() );
+    if ( iSettingsModel->UnitOfMeasurement() != EUnitsMetric )
+        {
+        altitude *= KMetreToFoot;        
+        }
+
+    error = BlidUtils::TRealToTInt( altitude, AltCalibration );
+    User::LeaveIfError( error );
+
+    /*CBlidSettingsPage* dlg = new ( ELeave )
+            CBlidSettingsPage( *(AppUi()->EventMonitor()),
+             R_BLID_ALTITUDE_CALIBRATION_SETTINGS_PAGE, AltCalibration );*/
+
+    TInt resourceId;
+    if(iSettingsModel->UnitOfMeasurement() == EUnitsMetric)
+    	{
+    	resourceId = R_BLID_ALTITUDE_CALIBRATION_METRIC_SETTINGS_PAGE;
+    	}
+    else
+    	{
+    	resourceId = R_BLID_ALTITUDE_CALIBRATION_IMPERIAL_SETTINGS_PAGE;
+    	}
+    
+    CAknIntegerSettingPage* dlg = new (ELeave)
+    						CAknIntegerSettingPage(resourceId,
+    											   AltCalibration,
+    											   0);
+    
+    if ( dlg->ExecuteLD( CAknSettingPage::EUpdateWhenChanged ) )
+        {
+        RFs fs;
+	    User::LeaveIfError(fs.Connect()); 
+	    CleanupClosePushL( fs ); 
+
+	    if ( SysUtil::DiskSpaceBelowCriticalLevelL( &fs, 0, DriveInfo::EDefaultPhoneMemory ) )
+	        {
+	        BlidNotes::OutOfMemoryNoteL();
+			}
+		else
+			{
+			TReal32 newCalibration = static_cast<TReal32>(AltCalibration);
+
+	        if ( iSettingsModel->UnitOfMeasurement()  != EUnitsMetric )
+	            {
+	            newCalibration /= static_cast<TReal32>(KMetreToFoot);
+	            }
+	        iSettingsModel->SetAltCalibration(newCalibration);
+	        iContainer->DrawNow();
+			}
+		CleanupStack::PopAndDestroy(); //fs
+        }    
+    }
+
+// -----------------------------------------------------------------------------
+// CBlidSettingsView::ChangeBacklightSettingsL
+// Change the backlight option in between Normal/On During Navigation
+// -----------------------------------------------------------------------------
+//
+void CBlidSettingsView::ChangeBacklightSettingsL()
+    {            
+     // number of options in query
+     CDesCArrayFlat* items = 
+            new( ELeave ) CDesCArrayFlat( 2 );
+     CleanupStack::PushL( items );
+     items->AppendL( *(iBlidBacklightNormal) );
+     items->AppendL( *(iBlidBacklightOn ));
+                       
+     TInt indexForNewValue;
+     if ( iSettingsModel->GetBacklightOption() == EBlidBackLightNormal )
+        {
+        indexForNewValue = 0;
+        }
+     else
+        {
+        indexForNewValue = 1;
+        }
+     CAknRadioButtonSettingPage* dlg = new ( ELeave )
+            CAknRadioButtonSettingPage(  R_BLID_SETTINGS_BACKLIGHT_PAGE,
+                                         indexForNewValue, 
+                                         items );
+     if ( dlg->ExecuteLD( CAknSettingPage::EUpdateWhenChanged ) )
+     	{
+     	RFs fs;
+	    User::LeaveIfError(fs.Connect()); 
+	    CleanupClosePushL( fs ); 
+
+	    if ( SysUtil::DiskSpaceBelowCriticalLevelL( &fs, 0, DriveInfo::EDefaultPhoneMemory ) )
+	        {
+	        BlidNotes::OutOfMemoryNoteL();
+			}
+		else
+			{			
+		    // Change value if a new value given in radio button page.
+		    iSettingsModel->SetBacklightOption(indexForNewValue);
+		    iContainer->DrawNow();
+			}
+		 CleanupStack::PopAndDestroy();// fs
+        }    
+    CleanupStack::PopAndDestroy(); // items
+    }
+
+
+// ---------------------------------------------------------------------------
+// CBlidSettingsView::ChangeBacklightSettingsValue
+// ---------------------------------------------------------------------------
+//
+void CBlidSettingsView::ChangeBacklightSettingsValueL(TInt aValue)
+    {
+ 	RFs fs;
+    User::LeaveIfError(fs.Connect()); 
+    CleanupClosePushL( fs ); 
+
+    if ( SysUtil::DiskSpaceBelowCriticalLevelL( &fs, 0, DriveInfo::EDefaultPhoneMemory ) )
+        {
+        BlidNotes::OutOfMemoryNoteL();
+		}
+	else
+		{
+	    // Change value if a new value given in radio button page.
+	    iSettingsModel->SetBacklightOption(aValue);
+	    iContainer->DrawNow();
+		}
+	CleanupStack::PopAndDestroy();// fs        
+    }
+    
+// ---------------------------------------------------------------------------
+// CBlidSettingsView::OpenArrivalToneDialogL
+// ---------------------------------------------------------------------------
+//
+void CBlidSettingsView::OpenArrivalToneDialogL( )
+	{
+	TFileName iToneFile;
+    // Create instance of FileList using new FileList API
+    CFLDFileListContainer* filelist = CFLDFileListContainer::NewLC();
+
+    filelist->InsertEndNullItemL( _L( "Off" ) );
+    // Do not show videos, use new FileList API
+    filelist->AddExclusiveMediaTypeL( ECLFMediaTypeVideo );
+    
+    if( iSettingsModel->GetArrivedToneName().Length() > 0 )
+	    {
+		iToneFile.Copy( iSettingsModel->GetArrivedToneName() );
+	    }
+
+    TBool ok( filelist->LaunchL( iToneFile ) );
+    
+    if( ok )
+        {
+        HBufC8* lFileName = HBufC8::NewLC( iToneFile.Length() + 1 );
+        lFileName->Des().Copy( iToneFile );
+	    // Change value if a new value given in radio button page.
+	    iSettingsModel->SetArrivedToneName( *lFileName );
+	    iContainer->DrawNow();
+	    CleanupStack::PopAndDestroy( lFileName );
+        }
+
+    CleanupStack::PopAndDestroy( filelist ); // filelist 		
+	}
+
+// ---------------------------------------------------------------------------
+// CBlidSettingsView::CheckResetOdometerOptionL
+// ---------------------------------------------------------------------------
+//
+void CBlidSettingsView::CheckResetOdometerOptionL( )
+	{
+    CAknNoteDialog* dlg;
+    dlg = new (ELeave) CAknNoteDialog(CAknNoteDialog::EConfirmationTone,CAknNoteDialog::ENoTimeout);
+    TBool result = dlg->ExecuteLD( R_SETTINGS_ODOMETER_RESET_CONFIRMATION_NOTE );
+    if( result )
+	    {
+	    // Change value if a new value given in radio button page.
+	    iSettingsModel->SetResetOdometerOption( result );
+	    static_cast<CBlidAppUi*>(AppUi())->ResetOdoMeterValueL( );
+	    iContainer->DrawNow();
+	    }
+	dlg = NULL;	    
+	}
+    
+#ifdef RD_SCALABLE_UI_V2
+// ---------------------------------------------------------------------------
+// CBlidSettingsView::HandleListBoxSelectionL
+// ---------------------------------------------------------------------------
+//
+void CBlidSettingsView::HandleListBoxSelectionL()
+    {
+    // Get the index in location functionality settings view
+    TInt indexLocationSetting=iContainer->ListBox()->CurrentItemIndex();
+    switch( indexLocationSetting )
+        {
+        case EBlidSettingsCalibration:
+            {
+            ChangeAltitudeCalibrationL();
+            break;
+            }
+        case EBlidSettingsBacklight:
+            {
+            if ( iSettingsModel->GetBacklightOption() == EBlidBackLightNormal )
+                {
+                ChangeBacklightSettingsValueL(EBlidBackLightOnDuringNavigation);
+                }
+            else
+                {
+                ChangeBacklightSettingsValueL(EBlidBackLightNormal);
+                }                
+            break;
+            }
+        case EBlidSettingsArrivalTone:
+            {
+            OpenArrivalToneDialogL();
+            break;
+            }
+        case EBlidSettingsResetOdometer:
+            {
+            CheckResetOdometerOptionL();
+            break;
+            }            
+        default:
+            {
+            User::Leave( KErrBadHandle );
+            break;
+            }
+        }
+    }
+    
+#endif //RD_SCALABLE_UI_V2
+    
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/basiclocationinfodisplay/blid/ui/src/CBlidTripMeterView.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,502 @@
+/*
+* Copyright (c) 2005-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:  Provides blid main view class methods.
+*
+*/
+
+// SYSTEM INCLUDES
+#include <blid.rsg>
+//Added for HTK toolkit support
+#include <alf/alfenv.h>
+#include <alf/alfcontrolgroup.h>
+#include <alf/alfdisplay.h>
+#include <alf/alftransformation.h>
+#include <alf/alfroster.h>
+//End of addition
+
+#include <csxhelp/blid.hlp.hrh>
+#include <hlplch.h>
+
+// USER INCLUDES
+#include "cblidnotedialog.h"
+#include "CBlidTripMeterView.h"
+#include "Blid.hrh"
+#include "CHtkTripMeterControl.h"
+#include "MBlidLocation.h"
+#include "MBlidRouter.h"
+#include "MBlidSettings.h"
+#include "CBlidEng.h"
+#include "CBlidDocument.h"
+#include "CBlidAppUi.h"
+#include "bliduiconsts.h"
+#include "CBlidLocSettingLauncher.h"
+#include "BlidUID.h"
+
+#include <locationvariationdomaincrkeys.h>
+#include <centralrepository.h>
+
+
+// ================= MEMBER FUNCTIONS =======================
+// ----------------------------------------------------------------------------
+// CBlidTripMeterView::NewLC
+// Two-phased constructor.
+// ----------------------------------------------------------------------------
+//
+CBlidTripMeterView* CBlidTripMeterView::NewLC( MKeyProcessor& aKeyProcessor,
+											   CAlfEnv& aEnv )
+    {
+    CBlidTripMeterView* self = new (ELeave) CBlidTripMeterView(aKeyProcessor, aEnv );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    return self;
+    }
+// ----------------------------------------------------------------------------
+// CBlidTripMeterView::CBlidTripMeterView
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// ----------------------------------------------------------------------------
+//
+CBlidTripMeterView::CBlidTripMeterView( MKeyProcessor& aKeyProcessor,
+										CAlfEnv& aEnv ):
+    CBlidBaseView( aKeyProcessor ),
+    iEnv(aEnv)
+    {
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidTripMeterView::ConstructL
+// Symbian 2nd phase constructor can leave.
+// ----------------------------------------------------------------------------
+//
+void CBlidTripMeterView::ConstructL()
+    {
+    BaseConstructL( R_BLID_TRIPMETER_VIEW );
+    
+   	// Create an instance of our list control.
+	iTripCtrl = CHtkTripMeterControl::NewL(iEnv,
+										   *this,
+										   this,
+										   ClientRect(),
+            							   iLocation,
+            							   iRouter,
+            							   *iEngine,
+            							   *this);
+            							   
+	// Create a control group.
+	iTripCtrlGroup = &( iEnv.NewControlGroupL( KPrimaryTripGroup ) );
+
+	// pass ownership of the list control to the control group
+	iTripCtrlGroup->AppendL(iTripCtrl);
+	
+    iCtrlDisplay = &( iEnv.NewDisplayL( ClientRect(), CAlfEnv::ENewDisplayAsCoeControl ) );
+	// Use the Avkon skin background as the display background.
+	iCtrlDisplay->SetClearBackgroundL(CAlfDisplay::EClearWithSkinBackground);
+
+    iNoteDialog = CBlidNoteDialog::NewL();
+    
+    iLauncher = NULL;    
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidMainView::~CBlidMainView
+// ----------------------------------------------------------------------------
+//
+CBlidTripMeterView::~CBlidTripMeterView()
+    {
+    delete iNoteDialog;
+    delete iLauncher;
+    }
+
+// ---------------------------------------------------------
+// CBlidTripMeterView::NotifyL
+// ---------------------------------------------------------
+//
+void CBlidTripMeterView::NotifyL( const TBool aOnlineMode )
+    {
+    if(iTripCtrl->HasTripStarted())
+        {
+        if(aOnlineMode)
+            {
+            if(iTripCtrl->WasGPSDataLost())
+                {
+                if(static_cast<CBlidAppUi*>(AppUi())->IsForeground())
+                    {
+                    iTripCtrl->SetGPSDataAvailability(EFalse);                
+                    iNoteDialog->ExecuteNoteDialog();                                    
+                    }
+				}
+            }        
+        }
+    
+    if( iTripCtrl )
+        {
+        iTripCtrl->UpdateL();
+        }
+    CBlidBaseView::NotifyL( aOnlineMode );     
+    }
+
+// ---------------------------------------------------------
+// CBlidTripMeterView::NotifyErrorL
+// ---------------------------------------------------------
+//
+void CBlidTripMeterView::NotifyErrorL( TInt aErrorCode )
+    {
+    CBlidBaseView::NotifyErrorL( aErrorCode );    
+        
+    if( iTripCtrl )
+        {
+        iTripCtrl->UpdateL();
+        }
+    }
+    
+// ----------------------------------------------------------------------------
+// TUid CBlidTripMeterView::Id
+// ----------------------------------------------------------------------------
+//
+TUid CBlidTripMeterView::Id() const
+    {
+    return TUid::Uid(EBlidTripMeterView);
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidTripMeterView::HandleCommandL
+// ----------------------------------------------------------------------------
+//
+void CBlidTripMeterView::HandleCommandL(TInt aCommand)
+    {
+    switch ( aCommand )
+        {
+        case EBlidCmdTripStart:
+        case EBlidCmdTripStop:
+        case EBlidCmdTripReset:
+        case EBlidCmdTripClear:
+        	{
+         	iTripCtrl->ProcessCommandL(aCommand);
+         	break;
+        	}
+        case EBlidCmdTripResume:
+        	{        	
+	        iTripCtrl->ProcessCommandL(aCommand);
+         	break;
+        	}
+        case EBlidCmdSavedWaypoints:
+        	{
+        	AppUi()->ActivateLocalViewL( TUid::Uid( EBlidSavedWayptsView ) );
+			break;  
+  	      	}
+  	    case EBlidCmdLmk:
+	        {
+	        LaunchLandmarksDialogL();
+            break;
+	        }
+	    case EBlidCmdWaypoint:
+            {
+            TInt index(0);
+
+            if ( iRouter->Count() > 0 )
+                {
+                index = SelectWaypointL();
+                if ( index != KErrCancel )
+                    {
+                    iRouter->SetWaypoint( index );
+                    }
+                }
+            break;
+            }            
+        case EBlidCmdSaveLocation:
+        	{
+        	if ( !FeatureManager::FeatureSupported( KFeatureIdLandmarks ) )
+        		{
+        		if ( InsertWaypointL() )
+	                {
+	                static_cast<CBlidDocument*>(AppUi()->Document())->SaveL();
+	                }
+        		}
+        	else
+        		{
+        		SaveCurrentPositionAsLandmarkL();
+        		}
+            break;		        		
+        	}
+       	case EBlidCmdShowDetails:
+	       	{
+	       	ShowCurrentPositionInfoL();
+			break;	       		
+	       	}
+        case EBlidCmdLaunchPositionSettings:
+        	{
+        	if(!iLauncher)
+        		{
+        		iLauncher = CBlidLocSettingsLauncher::NewL();        		
+        		}
+        	iLauncher->LaunchL();
+        	break;
+        	}
+        case EBlidNavigationMskInfo:
+	        {
+	        iTripCtrl->DisplayInfoPopUpMsgL();
+			break;	        	
+	        }
+        case EBlidCmdSatelliteStatus:
+            {
+            TBool lBacklightNormal = EFalse;
+            MBlidSettings* setting = iEngine->SettingsModel();        
+            if(setting->GetBacklightOption() == EBlidBackLightOnDuringNavigation)
+                {
+                setting->SetBacklightOption(EBlidBackLightNormal);
+                iEngine->SetBackLightStateL(CBlidEng::EBlidBacklightNormal);
+                lBacklightNormal = ETrue;    
+                }
+            (static_cast<CBlidAppUi*>(AppUi()))->HandleCommandL( aCommand );
+            if(lBacklightNormal)
+                {
+                iEngine->SetBackLightStateL(CBlidEng::EBlidBacklightAlwaysOn); 
+                setting->SetBacklightOption(EBlidBackLightOnDuringNavigation);               
+                }
+            break;
+            }        
+        case EBlidCmdSettings:
+            {
+            iIsSettingsViewActive = ETrue;
+            (static_cast<CBlidAppUi*>(AppUi()))->HandleCommandL( aCommand );
+             break;
+            }                 
+       case EAknCmdHelp:
+            {
+            TCoeHelpContext context( TUid::Uid(KBLIDUID3), KHLP_BLID_TRIPMETER );
+            CArrayFix<TCoeHelpContext>* tripHelp = new CArrayFixFlat<TCoeHelpContext>(1);
+            CleanupStack::PushL( tripHelp );
+            tripHelp->AppendL(context);
+            HlpLauncher::LaunchHelpApplicationL(iCoeEnv->WsSession(), tripHelp );
+            CleanupStack::Pop( tripHelp );                        
+            break;
+            }
+        default:
+            {
+            static_cast<CBlidAppUi*>(AppUi())->HandleCommandL( aCommand );
+            break;
+            }
+        } //switch
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidTripMeterView::DoActivateL
+// ----------------------------------------------------------------------------
+//
+void CBlidTripMeterView::DoActivateL(
+   const TVwsViewId& aPrevViewId,TUid /*aCustomMessageId*/,
+   const TDesC8& /*aCustomMessage*/)
+    {
+    #ifdef _DEBUG
+    RDebug::Print(_L("CBlidTripMeterView::DoActivateL() called"));
+    #endif
+    
+	iIsSettingsViewActive = EFalse;
+	    
+    iLocation->SetObserver(*this, EBlidTripMeterView ); 
+	
+	iTripCtrl->MakeTitleL( R_BLID_TITLE_TRIPMETER );
+    iTripCtrl->UpdateL();
+
+    if( aPrevViewId.iViewUid.iUid != EBlidNavigationView )
+	    {
+	    iTripCtrl->CreateNaviPaneL( EFalse );
+	    iTripCtrl->ActivateTabL( *( iTripCtrl->GetNiviDecorator( ) ), EBlidTripMeterView );	
+	    }
+	
+	// Hide the navigation control group
+	iCtrlDisplay->Roster().Hide( iEnv.ControlGroup( KPrimaryGroup ) );
+	
+	// Show the control group on the display.
+	iCtrlDisplay->Roster().ShowL( *iTripCtrlGroup );    
+
+    MenuBar()->SetContextMenuTitleResourceId(R_BLID_TRIP_METER_VIEW_OK_MENUBAR);
+    MBlidSettings* setting = iEngine->SettingsModel();        
+    if(setting->GetBacklightOption() == EBlidBackLightOnDuringNavigation)
+    	{
+    	iEngine->SetBackLightStateL(CBlidEng::EBlidBacklightAlwaysOn);
+    	}
+    		
+   }
+
+// ----------------------------------------------------------------------------
+// CBlidTripMeterView::DoDeactivate
+// ----------------------------------------------------------------------------
+//
+void CBlidTripMeterView::DoDeactivate()
+    {
+    TRAP_IGNORE(iEngine->SetBackLightStateL(CBlidEng::EBlidBacklightNormal));
+    }
+
+// ---------------------------------------------------------
+// CBlidTripMeterView::DynInitMenuPaneL
+// ---------------------------------------------------------
+//
+void CBlidTripMeterView::DynInitMenuPaneL(
+    TInt aResourceId,
+    CEikMenuPane* aMenuPane )
+    {
+    switch( aResourceId )
+        {
+        case R_BLID_TRIP_METER_VIEW_OK_MENU:            
+        case R_BLID_TRIPMETER_MENU:
+            {
+              if(iLocation->HasTripStarted())
+            	{
+            	aMenuPane->SetItemDimmed( EBlidCmdTripStart, ETrue );
+            	aMenuPane->SetItemDimmed( EBlidCmdTripResume, ETrue );   
+            	aMenuPane->SetItemDimmed( EBlidCmdTripStop, EFalse );
+            	aMenuPane->SetItemDimmed( EBlidCmdTripReset, EFalse ); 
+            	
+            	if(aResourceId != R_BLID_TRIP_METER_VIEW_OK_MENU)
+            	    {
+                	aMenuPane->SetItemDimmed( EBlidCmdTripClear, ETrue ); 
+            	    }            	            	
+            	}else
+              if(iLocation->HasTripNotStarted())  
+                {
+            	aMenuPane->SetItemDimmed( EBlidCmdTripStop, ETrue ); 
+            	aMenuPane->SetItemDimmed( EBlidCmdTripResume, ETrue ); 
+            	aMenuPane->SetItemDimmed( EBlidCmdTripStart, EFalse );
+            	aMenuPane->SetItemDimmed( EBlidCmdTripReset, ETrue ); 
+            	
+            	if(aResourceId != R_BLID_TRIP_METER_VIEW_OK_MENU)
+            	    {
+                	aMenuPane->SetItemDimmed( EBlidCmdTripClear, ETrue ); 
+            	    }            	            	
+            	}else
+               if(!iLocation->HasTripStarted())
+            	{
+            	if(iLocation->IsTripCleared())
+            	    {
+            	    aMenuPane->SetItemDimmed( EBlidCmdTripResume, ETrue );             	    
+            	    aMenuPane->SetItemDimmed( EBlidCmdTripReset, ETrue );             	    
+            	    }
+            	else
+            	    {
+            	    aMenuPane->SetItemDimmed( EBlidCmdTripStart, ETrue );
+            	    }
+            	
+            	if(iLocation->IsTripReset())
+            	    {
+            	    aMenuPane->SetItemDimmed( EBlidCmdTripReset, ETrue );
+            	    }
+            	
+		        aMenuPane->SetItemDimmed( EBlidCmdTripStop, ETrue );		        
+		        
+            	if(aResourceId != R_BLID_TRIP_METER_VIEW_OK_MENU)
+            	    {
+            	    if(iLocation->IsTripCleared())
+            	        {
+            	        aMenuPane->SetItemDimmed( EBlidCmdTripClear, ETrue );            	        
+            	        }
+            	    }            	            	
+            	}
+            break;
+            }
+        case R_BLID_TRIP_VIEW_MENU:
+            {
+   			// Hide the satellite status menu option				
+            if ( !(iLocation->IsGPSDeviceConnected() && 
+                   iLocation->SatelliteCapability()) )
+                {                
+                aMenuPane->SetItemDimmed( EBlidCmdSatelliteStatus, ETrue );                
+                }            
+			// hide the save position.
+            if(!iLocation->IsOnline())
+                {
+                aMenuPane->SetItemDimmed( EBlidCmdCurrentLocation, ETrue );
+                }
+
+			if ( !iRouter->Count() )
+                {
+                aMenuPane->SetItemDimmed( EBlidCmdSavedWaypoints, ETrue );
+                }
+                
+			if ( FeatureManager::FeatureSupported( KFeatureIdLandmarks ) )
+				{
+				aMenuPane->SetItemDimmed( EBlidCmdSavedWaypoints, ETrue );
+				}			
+            break;
+            }
+        case R_BLID_MAIN_MENU:
+            {
+            CBlidBaseView::HandleHelpFeatureL( aMenuPane );
+            break;
+            }  
+        case R_BLID_SAVE_CURRENT_LOCATION_MENU:
+        	{
+        		TInt settingsValue = 0;
+	            CRepository* repository = CRepository::NewL( TUid::Uid( KCRUidLocLocalVariation) );
+	            CleanupStack::PushL( repository );
+	            User::LeaveIfError( repository->Get( KLocHideCoordinates,
+	                                                      settingsValue ));  
+	            CleanupStack::PopAndDestroy( repository );
+	            
+	            if ( ELocCoordinatesHidden == settingsValue )
+	            {
+	            	 aMenuPane->SetItemDimmed( EBlidCmdShowDetails, ETrue );
+	            }
+	            else
+	            {
+	             	 aMenuPane->SetItemDimmed( EBlidCmdShowDetails, EFalse );
+	            }	
+        	}
+        default:
+            {
+            break;
+            }
+        }
+    }
+
+// ----------------------------------------------------------
+// Handle Resource Change Events: Display orientation switch
+// ----------------------------------------------------------
+//
+void CBlidTripMeterView::HandleResourceChangeL( TInt aType )
+    {
+    if(aType == KEikDynamicLayoutVariantSwitch)
+        {
+        TRect rect;
+        AknLayoutUtils::LayoutMetricsRect(AknLayoutUtils::EMainPane, rect);
+        
+        // Notify skin of changed display size.
+        iEnv.PrimaryDisplay().SetVisibleArea(rect);
+        iTripCtrl->UpdateLayoutL();
+        }
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidTripMeterView::GetControl
+// ----------------------------------------------------------------------------
+//
+CHtkTripMeterControl* CBlidTripMeterView::GetControl()
+    {
+    return iTripCtrl;
+    }
+
+
+#ifdef RD_SCALABLE_UI_V2
+// ---------------------------------------------------------------------------
+// CBlidTripMeterView::HandleListBoxSelectionL
+// ---------------------------------------------------------------------------
+//
+void CBlidTripMeterView::HandleListBoxSelectionL()
+    {
+    //Nothing to do here
+    }
+#endif // RD_SCALABLE_UI_V2
+// End of File
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/basiclocationinfodisplay/blid/ui/src/CHtkNavigationControl.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,2589 @@
+/*
+* Copyright (c) 2005-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:  Blid application compass view's compass control class definition.
+*
+*/
+
+
+// SYSTEM INCLUDES
+#include <coemain.h>
+#include <akncontext.h> 
+#include <aknnavide.h> 
+#include <eikspane.h> 
+#include <barsread.h> 
+#include <AknIconArray.h>
+#include <gulicon.h>
+#include <StringLoader.h> 
+#include <akntitle.h> 
+#include <avkon.hrh>
+#include <AknsUtils.h>
+#include <akntabgrp.h>
+#include <blid.mbg>
+#include <blid.rsg>
+#include <avkon.hrh>
+#include <eikenv.h>
+#include <aknsoundsystem.h>
+#include <centralrepository.h>
+#include <ProfileEngineSDKCRKeys.h>
+#include <EPos_CPosLandmark.h>
+#include <aknnotedialog.h>
+#include <aknlayoutscalable_apps.cdl.h>
+#include <layoutmetadata.cdl.h>
+#include <AknUtils.h>
+#include <AknsConstants.h>
+// for HTK
+#include <alf/alfenv.h>
+#include <alf/alfanchorlayout.h>
+#include <alf/alftextvisual.h>
+#include <alf/alftextstyle.h>
+#include <alf/alfborderbrush.h>
+#include <alf/alfbrusharray.h>
+#include <alf/alfevent.h>
+#include <alf/alftransformation.h>
+#include <alf/alfimagevisual.h>
+#include <alf/alftexture.h>
+#include <alf/alfroster.h>
+#include <alf/alfcurvepath.h>
+#include <alf/alfcurvepathlayout.h>
+#include <alf/alfimagebrush.h>
+#include <alf/alfdecklayout.h>
+#include <alf/alfutil.h>
+#include <alf/alfframebrush.h>
+#include <alf/alfimageloaderutil.h>
+// USER INCLUDES
+#include "CHtkNavigationControl.h"
+#include "MBlidSettings.h"
+#include "Blid.hlp.hrh"
+#include "Blid.hrh"
+#include "CBlidAppUi.h"
+#include "MBlidLocation.h"
+#include "MBlidRouter.h"
+#include "CBlidEng.h"
+#include "bliduiconsts.h"
+#include "Blidutils.h"
+#include "TNamedCoordinate.h"
+#include "CBlidArrivedTonePayerUtility.h"
+#include "Debug.h"
+
+_LIT( KSpeedFormat, "%.1f" );
+_LIT( KText1,  " " );
+_LIT( KFlagVisual, " Flag");
+_LIT( KAccVisual, " Accuracy");
+
+const TInt KTimerDuration = 200000;
+
+TBool CHtkNavigationControl::iHasToPlayArrivedTone = EFalse;
+TBool CHtkNavigationControl::iHasArrived = EFalse;
+TBool CHtkNavigationControl::iInArrivedZone = EFalse;
+
+// FORWARD DECLARATION
+TInt TimerCallBackFunction(TAny* aPtr);
+
+
+// ================= MEMBER FUNCTIONS =======================
+// ---------------------------------------------------------
+// CHtkNavigationControl::NewL()
+// ---------------------------------------------------------
+//
+CHtkNavigationControl* CHtkNavigationControl::NewL(CAlfEnv& aEnv,
+						                           MObjectProvider* aParent,
+								                   const TRect& aRect,
+						                           MBlidLocation& aLocation,
+						                           MBlidRouter& aRouter,
+						                           CBlidEng& aEngine,
+						                           CBlidBaseView& aView)
+    {
+    CHtkNavigationControl* self = CHtkNavigationControl::NewLC(aEnv,
+    														   aParent,
+    														   aRect,
+    														   aLocation,
+    														   aRouter,
+    														   aEngine,
+    														   aView);
+    CleanupStack::Pop(self);
+    return self;
+    }
+
+
+// ---------------------------------------------------------
+// CHtkNavigationControl::NewLC()
+// ---------------------------------------------------------
+//
+CHtkNavigationControl* CHtkNavigationControl::NewLC(CAlfEnv& aEnv,
+						                           MObjectProvider* /*aParent*/,
+								                   const TRect& aRect,
+						                           MBlidLocation& aLocation,
+						                           MBlidRouter& aRouter,
+						                           CBlidEng& aEngine,
+						                           CBlidBaseView& aView)
+    {
+    CHtkNavigationControl* self = new (ELeave) CHtkNavigationControl(aEnv,
+    														 		 aLocation,
+    														 		 aView,
+    														 		 aEngine );
+    CleanupStack::PushL(self);
+    self->ConstructL(aEnv,aRect,aRouter,aEngine);
+    return self;
+    }
+
+// ---------------------------------------------------------
+//
+ //CHtkNavigationControl::CHtkNavigationControl()
+// ---------------------------------------------------------
+//
+CHtkNavigationControl::CHtkNavigationControl(CAlfEnv& aEnv,
+                                             MBlidLocation& aLocation,
+                                             CBlidBaseView& aView,
+                                             CBlidEng& aEngine ) 
+    : CAlfControl( ),iLocationModel( aLocation ), iView(aView), iEngine(aEngine),iEnv(aEnv)
+
+    {
+    
+    }
+
+
+// ---------------------------------------------------------
+// CHtkNavigationControl::ConstructL()
+// ---------------------------------------------------------
+//
+void CHtkNavigationControl::ConstructL( CAlfEnv& aEnv,
+                                        const TRect& /*aRect*/,
+                                        MBlidRouter& aRouter,
+                                        CBlidEng& aEngine )
+    {
+    
+    CAlfControl::ConstructL( aEnv );
+    
+    // Create a single text visual. The pointer to the visual is stored
+    // as a member variable for later access.
+	CreateNaviPaneL( EFalse );
+    ActivateTabL( *iDecoratedTabGroup, EBlidNavigationView );
+    
+	iRouter = &aRouter;
+	iSettings = aEngine.SettingsModel();
+	CreateApplicationStringsL( );
+
+	iImagePath = HBufC::NewL( iEnv.TextureManager().ImagePath().Length() + 1 );
+	iImagePath->Des().Copy( iEnv.TextureManager().ImagePath() );
+    iLayout = CAlfAnchorLayout::AddNewL( *this );
+
+	AknsUtils::GetCachedColor ( AknsUtils::SkinInstance(),
+								iVisualColor,
+								KAknsIIDQsnTextColors,
+								EAknsCIQsnTextColorsCG1 
+								);
+	
+	TInt typefaceStyle1Id = iEnv.TextStyleManager().CreatePlatformTextStyleL(EAknHighestLogicalFont, EAlfTextStyleNormal); 
+	TInt typefaceStyle2Id = iEnv.TextStyleManager().CreatePlatformTextStyleL(EAknHighestLogicalFont, EAlfTextStyleNormal); 
+    CAlfTextStyle* style1 = iEnv.TextStyleManager().TextStyle( typefaceStyle1Id );
+    CAlfTextStyle* style2 = iEnv.TextStyleManager().TextStyle( typefaceStyle2Id );
+
+	CalculateRects();
+	
+	CreateAnimationL();
+	CreateNavigationVisualsL( );// image
+	CreateNavigationTextVisualsL( style1 );
+	CreateDistanceVisualL( style1 );
+	CreateSpeedVisualL( style2 );
+	CreateIndicatorVisualL();
+	DrawCurvesL();
+	CreateSignalTexturesL();
+	CreatePopupImgTextureL();
+	CreateAccTextureL();
+	LaunchDeviceNotAvlNoteL( );
+
+	SetAnchors();	
+	isDeviceUnavailableDisplayed = EFalse;	
+	iIsDownPressed = EFalse;	
+    }
+
+// ---------------------------------------------------------
+// CHtkNavigationControl::CreateAnimationL()
+// ---------------------------------------------------------
+//
+void CHtkNavigationControl::CreateAnimationL( )
+	{
+	// code to load svg icon
+	MAlfBitmapProvider* provider = NULL;
+	
+	// first creste the image loader utils and then call SetSize.
+    iView.ImageLoaderUtils()->SetSize( TAlfRealSize( 210, 210 ) );
+    
+    // then create the bitmap provider  
+    provider = iView.ImageLoaderUtils()->CreateImageLoaderL( KAknsIIDQgnGrafBlidFlag, // svg icon skin constant id defiened in Aknsconstant.h file
+    												 iView.ImagePathName(),        // mif file name with path.
+    												 EMbmBlidQgn_graf_blid_flag_01, // bitmap id defiened in mbg file
+    												 EMbmBlidQgn_graf_blid_flag_01_mask ); // bitmap mask id defiened in mbg file
+	// now using that bitmap provider create the texture.
+	CAlfTexture & texture1 = iEnv.TextureManager().CreateTextureL( KAlfAutoGeneratedTextureId,
+	                                                                provider,
+	                                                                EAlfTextureFlagDefault ); 
+    iTextures.Append(&texture1);
+    												 
+    // then create the bitmap provider  
+    provider = iView.ImageLoaderUtils()->CreateImageLoaderL( KAknsIIDQgnGrafBlidFlag, // svg icon skin constant id defiened in Aknsconstant.h file
+    												 iView.ImagePathName(),        // mif file name with path.
+    												 EMbmBlidQgn_graf_blid_flag_02, // bitmap id defiened in mbg file
+    												 EMbmBlidQgn_graf_blid_flag_02_mask ); // bitmap mask id defiened in mbg file
+	// now using that bitmap provider create the texture.
+	CAlfTexture & texture2 = iEnv.TextureManager().CreateTextureL( KAlfAutoGeneratedTextureId,
+	                                                                provider,
+	                                                                EAlfTextureFlagDefault ); 
+    iTextures.Append(&texture2);
+    
+    // then create the bitmap provider  
+    provider = iView.ImageLoaderUtils()->CreateImageLoaderL( KAknsIIDQgnGrafBlidFlag, // svg icon skin constant id defiened in Aknsconstant.h file
+    												 iView.ImagePathName(),        // mif file name with path.
+    												 EMbmBlidQgn_graf_blid_flag_03, // bitmap id defiened in mbg file
+    												 EMbmBlidQgn_graf_blid_flag_03_mask ); // bitmap mask id defiened in mbg file
+	// now using that bitmap provider create the texture.
+	CAlfTexture & texture3 = iEnv.TextureManager().CreateTextureL( KAlfAutoGeneratedTextureId,
+	                                                                provider,
+	                                                                EAlfTextureFlagDefault ); 
+    iTextures.Append(&texture3);
+    
+    // then create the bitmap provider  
+    provider = iView.ImageLoaderUtils()->CreateImageLoaderL( KAknsIIDQgnGrafBlidFlag, // svg icon skin constant id defiened in Aknsconstant.h file
+    												 iView.ImagePathName(),        // mif file name with path.
+    												 EMbmBlidQgn_graf_blid_flag_04, // bitmap id defiened in mbg file
+    												 EMbmBlidQgn_graf_blid_flag_04_mask ); // bitmap mask id defiened in mbg file
+	// now using that bitmap provider create the texture.
+	CAlfTexture & texture4 = iEnv.TextureManager().CreateTextureL( KAlfAutoGeneratedTextureId,
+	                                                                provider,
+	                                                                EAlfTextureFlagDefault ); 
+    iTextures.Append(&texture4);
+    
+    // then create the bitmap provider  
+    provider = iView.ImageLoaderUtils()->CreateImageLoaderL( KAknsIIDQgnGrafBlidFlag, // svg icon skin constant id defiened in Aknsconstant.h file
+    												 iView.ImagePathName(),        // mif file name with path.
+    												 EMbmBlidQgn_graf_blid_flag_05, // bitmap id defiened in mbg file
+    												 EMbmBlidQgn_graf_blid_flag_05_mask ); // bitmap mask id defiened in mbg file
+	// now using that bitmap provider create the texture.
+	CAlfTexture & texture5 = iEnv.TextureManager().CreateTextureL( KAlfAutoGeneratedTextureId,
+	                                                                provider,
+	                                                                EAlfTextureFlagDefault ); 
+    iTextures.Append(&texture5);
+
+	}
+	
+// ----------------------------------------------------
+// CHtkNavigationControl::CreateGlobeVisualL
+// ----------------------------------------------------
+//
+void CHtkNavigationControl::CreatePopUpVisualL( )
+	{
+	// code to load svg icon
+	MAlfBitmapProvider* provider = NULL;
+	
+	// first creste the image loader utils and then call SetSize.	
+    iView.ImageLoaderUtils()->SetSize( TAlfRealSize( 60, 60 ) );
+    
+    // then create the bitmap provider  
+    provider = iView.ImageLoaderUtils()->CreateImageLoaderL( KAknsIIDQgnGrafBlidSearching, // svg icon skin constant id defiened in Aknsconstant.h file
+    												 iView.ImagePathName(),        // mif file name with path.
+    												 EMbmBlidQgn_graf_blid_searching_01, // bitmap id defiened in mbg file
+    												 EMbmBlidQgn_graf_blid_searching_01_mask ); // bitmap mask id defiened in mbg file
+	// now using that bitmap provider create the texture.
+	CAlfTexture & texture1 = iEnv.TextureManager().CreateTextureL( KAlfAutoGeneratedTextureId,
+	                                                                provider,
+	                                                                EAlfTextureFlagDefault ); 
+    iPopupTextures.Append(&texture1);
+    												 
+    // then create the bitmap provider  
+    provider = iView.ImageLoaderUtils()->CreateImageLoaderL( KAknsIIDQgnGrafBlidSearching, // svg icon skin constant id defiened in Aknsconstant.h file
+    												 iView.ImagePathName(),        // mif file name with path.
+    												 EMbmBlidQgn_graf_blid_searching_02, // bitmap id defiened in mbg file
+    												 EMbmBlidQgn_graf_blid_searching_02_mask ); // bitmap mask id defiened in mbg file
+	// now using that bitmap provider create the texture.
+	CAlfTexture & texture2 = iEnv.TextureManager().CreateTextureL( KAlfAutoGeneratedTextureId,
+	                                                                provider,
+	                                                                EAlfTextureFlagDefault ); 
+    iPopupTextures.Append(&texture2);
+    
+    // then create the bitmap provider  
+    provider = iView.ImageLoaderUtils()->CreateImageLoaderL( KAknsIIDQgnGrafBlidSearching, // svg icon skin constant id defiened in Aknsconstant.h file
+    												 iView.ImagePathName(),        // mif file name with path.
+    												 EMbmBlidQgn_graf_blid_searching_03, // bitmap id defiened in mbg file
+    												 EMbmBlidQgn_graf_blid_searching_03_mask ); // bitmap mask id defiened in mbg file
+	// now using that bitmap provider create the texture.
+	CAlfTexture & texture3 = iEnv.TextureManager().CreateTextureL( KAlfAutoGeneratedTextureId,
+	                                                                provider,
+	                                                                EAlfTextureFlagDefault ); 
+    iPopupTextures.Append(&texture3);
+    
+    // then create the bitmap provider  
+    provider = iView.ImageLoaderUtils()->CreateImageLoaderL( KAknsIIDQgnGrafBlidSearching, // svg icon skin constant id defiened in Aknsconstant.h file
+    												 iView.ImagePathName(),        // mif file name with path.
+    												 EMbmBlidQgn_graf_blid_searching_04, // bitmap id defiened in mbg file
+    												 EMbmBlidQgn_graf_blid_searching_04_mask ); // bitmap mask id defiened in mbg file
+	// now using that bitmap provider create the texture.
+	CAlfTexture & texture4 = iEnv.TextureManager().CreateTextureL( KAlfAutoGeneratedTextureId,
+	                                                                provider,
+	                                                                EAlfTextureFlagDefault ); 
+    iPopupTextures.Append(&texture4);
+    
+    // then create the bitmap provider  
+    provider = iView.ImageLoaderUtils()->CreateImageLoaderL( KAknsIIDQgnGrafBlidSearching, // svg icon skin constant id defiened in Aknsconstant.h file
+    												 iView.ImagePathName(),        // mif file name with path.
+    												 EMbmBlidQgn_graf_blid_searching_05, // bitmap id defiened in mbg file
+    												 EMbmBlidQgn_graf_blid_searching_05_mask ); // bitmap mask id defiened in mbg file
+	// now using that bitmap provider create the texture.
+	CAlfTexture & texture5 = iEnv.TextureManager().CreateTextureL( KAlfAutoGeneratedTextureId,
+	                                                                provider,
+	                                                                EAlfTextureFlagDefault ); 
+    iPopupTextures.Append(&texture5);
+    
+    // then create the bitmap provider  
+    provider = iView.ImageLoaderUtils()->CreateImageLoaderL( KAknsIIDQgnGrafBlidSearching, // svg icon skin constant id defiened in Aknsconstant.h file
+    												 iView.ImagePathName(),        // mif file name with path.
+    												 EMbmBlidQgn_graf_blid_searching_06, // bitmap id defiened in mbg file
+    												 EMbmBlidQgn_graf_blid_searching_06_mask ); // bitmap mask id defiened in mbg file
+	// now using that bitmap provider create the texture.
+	CAlfTexture & texture6 = iEnv.TextureManager().CreateTextureL( KAlfAutoGeneratedTextureId,
+	                                                                provider,
+	                                                                EAlfTextureFlagDefault ); 
+    iPopupTextures.Append(&texture6);
+    
+    // then create the bitmap provider  
+    provider = iView.ImageLoaderUtils()->CreateImageLoaderL( KAknsIIDQgnGrafBlidSearching, // svg icon skin constant id defiened in Aknsconstant.h file
+    												 iView.ImagePathName(),        // mif file name with path.
+    												 EMbmBlidQgn_graf_blid_searching_07, // bitmap id defiened in mbg file
+    												 EMbmBlidQgn_graf_blid_searching_07_mask ); // bitmap mask id defiened in mbg file
+	// now using that bitmap provider create the texture.
+	CAlfTexture & texture7 = iEnv.TextureManager().CreateTextureL( KAlfAutoGeneratedTextureId,
+	                                                                provider,
+	                                                                EAlfTextureFlagDefault ); 
+    iPopupTextures.Append(&texture7);
+    
+    // then create the bitmap provider  
+    provider = iView.ImageLoaderUtils()->CreateImageLoaderL( KAknsIIDQgnGrafBlidSearching, // svg icon skin constant id defiened in Aknsconstant.h file
+    												 iView.ImagePathName(),        // mif file name with path.
+    												 EMbmBlidQgn_graf_blid_searching_08, // bitmap id defiened in mbg file
+    												 EMbmBlidQgn_graf_blid_searching_08_mask ); // bitmap mask id defiened in mbg file
+	// now using that bitmap provider create the texture.
+	CAlfTexture & texture8 = iEnv.TextureManager().CreateTextureL( KAlfAutoGeneratedTextureId,
+	                                                                provider,
+	                                                                EAlfTextureFlagDefault ); 
+    iPopupTextures.Append(&texture8);
+	}
+	
+// ---------------------------------------------------------
+// CHtkNavigationControl::DrawCurvesL()
+// ---------------------------------------------------------
+//
+void CHtkNavigationControl::DrawCurvesL()
+	{
+	MAlfBitmapProvider* provider = NULL;
+	// Create curvepath layout.
+	iCurveLayout = CAlfCurvePathLayout::AddNewL( *this, iCurveDecLyt );
+	CAlfCurvePath& path = iCurveLayout->CurvePath();
+
+	iCurveLayout->SetBaseUnit( TAlfMetric( 1, EAlfUnitNormalized ) );
+	TAlfRealPoint centre( 0.5, 0.5 );
+	TAlfRealSize  radious( 0.47, 0.37 );
+	path.AppendArcL( centre, radious, 0, 360, 1 );
+	path.EnableLoop();
+
+	iNdecLayout = CAlfDeckLayout::AddNewL( *this, iCurveLayout );
+	
+	iActualNdeck = CAlfDeckLayout::AddNewL( *this, iNdecLayout );
+
+    iActualNdeck->SetSize( TAlfRealSize( 32, 32 ) );
+
+	// now map the image visual to curve path and move.
+	TAlfTimedPoint pos1;
+	pos1.SetMappingFunctionIdentifier( iCurveLayout->MappingFunctionIdentifier() );
+	pos1.SetTarget( 0.75, 0 );
+	iNdecLayout->SetPos( pos1 );
+
+	// create the image visual to set on curve path
+	//MAlfBitmapProvider* provider = NULL;
+	iNorthVisual = CAlfImageVisual::AddNewL(*this, iActualNdeck );
+	
+    provider = iView.ImageLoaderUtils()->CreateImageLoaderL( KAknsIIDQgnGrafBlidNorth, // svg icon skin constant id defiened in Aknsconstant.h file
+    												 iView.ImagePathName(),        // mif file name with path.
+    												 EMbmBlidQgn_graf_blid_north, // bitmap id defiened in mbg file
+    												 EMbmBlidQgn_graf_blid_north_mask ); // bitmap mask id defiened in mbg file
+	// now using that bitmap provider create the texture.
+	CAlfTexture & thumbTexture1 = iEnv.TextureManager().CreateTextureL( KAlfAutoGeneratedTextureId,
+	                                                                provider,
+	                                                                EAlfTextureFlagDefault ); 
+                                                                      
+	iNorthVisual->SetImage(TAlfImage( thumbTexture1 ) );//N
+	
+    iNdecLayout->EnableScrollingL( ETrue );
+    // scroll offset should be half of the 
+    // size of decklayout.
+	iNdecLayout->SetScrollOffset( TAlfTimedPoint(  14 , 14  ) );
+	}
+
+
+// ---------------------------------------------------------
+// CHtkNavigationControl::CreateIndicatorVisualL()
+// ---------------------------------------------------------
+//
+void CHtkNavigationControl::CreateIndicatorVisualL()
+	{
+    iNavigationRing = CAlfImageVisual::AddNewL(*this, iLayout ); // ordinal 6
+    iNavigationRing->SetScaleMode( CAlfImageVisual::EScaleCover );
+    iNavigationRing->SetPadding(TAlfBoxMetric(TAlfMetric( 0, EAlfUnitNormalized ) ) );
+
+	// Place the curve path circle ring
+    MAlfBitmapProvider* provider = NULL;  
+                              
+    provider = iView.ImageLoaderUtils()->CreateImageLoaderL( KAknsIIDQgnGrafBlidRing, // svg icon skin constant id defiened in Aknsconstant.h file
+    												 iView.ImagePathName(),        // mif file name with path.
+    												 EMbmBlidQgn_graf_blid_ring, // bitmap id defiened in mbg file
+    												 EMbmBlidQgn_graf_blid_ring_mask ); // bitmap mask id defiened in mbg file
+	// now using that bitmap provider create the texture.
+	CAlfTexture & thumbTexture = iEnv.TextureManager().CreateTextureL( KAlfAutoGeneratedTextureId,
+	                                                                provider,
+	                                                                EAlfTextureFlagDefault ); 
+	iNavigationRing->SetImage(TAlfImage( thumbTexture ) );
+
+	//Start
+	iAccVisual = CAlfImageVisual::AddNewL( *this, iLayout ); // ordinal 7
+
+	iCurveDecLyt = CAlfDeckLayout::AddNewL( *this, iLayout); // ordinal 8
+	
+	iIndicatorVisual = CAlfImageVisual::AddNewL( *this, iLayout ); // ordinal 9
+	//End
+
+    provider = iView.ImageLoaderUtils()->CreateImageLoaderL( KAknsIIDQgnGrafBlidCompass, // svg icon skin constant id defiened in Aknsconstant.h file
+    												 iView.ImagePathName(),        // mif file name with path.
+    												 EMbmBlidQgn_graf_blid_compass, // bitmap id defiened in mbg file
+    												 EMbmBlidQgn_graf_blid_compass_mask ); // bitmap mask id defiened in mbg file
+	// now using that bitmap provider create the texture.
+	CAlfTexture & thumbTextureind = iEnv.TextureManager().CreateTextureL( KAlfAutoGeneratedTextureId,
+	                                                                provider,
+	                                                                EAlfTextureFlagDefault ); 
+     	                                                                  	
+	iIndicatorVisual->SetImage(TAlfImage(thumbTextureind));//indicator  	
+	iIndicatorVisual->SetOpacity(0.8);
+	}
+
+
+// ---------------------------------------------------------
+// CHtkNavigationControl::CreateNavigationVisualsL()
+// ---------------------------------------------------------
+//
+void CHtkNavigationControl::CreateNavigationVisualsL( )
+	{
+	iImageVisual = CAlfImageVisual::AddNewL(*this, iLayout); // ordinal 0
+	}
+	
+
+// ---------------------------------------------------------
+// CHtkNavigationControl::CreateNavigationTextVisualsL()
+// ---------------------------------------------------------
+//
+void CHtkNavigationControl::CreateNavigationTextVisualsL( CAlfTextStyle* aStyle1 )	
+	{
+    aStyle1->SetBold( ETrue );
+    aStyle1->SetItalic( ETrue );
+
+	iLabel = CAlfTextVisual::AddNewL(*this, iLayout); // ordinal 1
+	
+	iLabel->EnableBrushesL();
+
+	aStyle1->SetTextSizeInPixels( 22, ETrue );
+	iLabel->SetColor( iVisualColor );
+	iLabel->SetTextL( KText1 );
+	iLabel->SetTextStyle( aStyle1->Id() );
+	iLabel->SetWrapping( CAlfTextVisual::ELineWrapTruncate );
+	iLabel->SetPadding(TAlfBoxMetric(TAlfMetric( 0.01, EAlfUnitNormalized ) ) );
+	iLabel->SetAlign( EAlfAlignHCenter, EAlfAlignVTop );
+	}
+
+// ---------------------------------------------------------
+// CHtkNavigationControl::CreateDistanceVisualL()
+// ---------------------------------------------------------
+//
+void CHtkNavigationControl::CreateDistanceVisualL( CAlfTextStyle* aStyle1 )	
+	{
+    aStyle1->SetBold( ETrue );
+    aStyle1->SetItalic( ETrue );
+    
+	iDistanceLabel = CAlfTextVisual::AddNewL( *this, iLayout ); // ordinal 2
+	
+	iDistanceLabel->EnableBrushesL();
+
+	iDistanceLabel->SetColor( iVisualColor );
+
+	aStyle1->SetTextSizeInPixels( 22, ETrue );
+
+	iDistanceLabel->SetTextL( KText1 );
+	iDistanceLabel->SetTextStyle( aStyle1->Id() );
+	iDistanceLabel->SetAlign( EAlfAlignHCenter, EAlfAlignVTop );
+	}
+
+// ---------------------------------------------------------
+// CHtkNavigationControl::CreateSpeedVisualL()
+// ---------------------------------------------------------
+//
+void CHtkNavigationControl::CreateSpeedVisualL( CAlfTextStyle* aStyle1 )	
+	{
+	CAlfImageVisual* speedmeterVisual = CAlfImageVisual::AddNewL(*this, iLayout ); // ordinal 3
+
+	// Place the speed
+    MAlfBitmapProvider* provider = NULL;  
+    
+    provider = iView.ImageLoaderUtils()->CreateImageLoaderL( KAknsIIDQgnGrafBlidSpwatch, // svg icon skin constant id defiened in Aknsconstant.h file
+    												 iView.ImagePathName(),        // mif file name with path.
+    												 EMbmBlidQgn_graf_blid_spwatch, // bitmap id defiened in mbg file
+    												 EMbmBlidQgn_graf_blid_spwatch_mask ); // bitmap mask id defiened in mbg file
+	// now using that bitmap provider create the texture.
+	CAlfTexture & thumbTexture = iEnv.TextureManager().CreateTextureL( KAlfAutoGeneratedTextureId,
+	                                                                provider,
+	                                                                EAlfTextureFlagDefault ); 
+	                                                                  
+	speedmeterVisual->SetImage(TAlfImage( thumbTexture ) );// Speed image
+
+	iSpeedLabel = CAlfTextVisual::AddNewL(*this, iLayout ); // ordinal 4
+
+	aStyle1->SetTextSizeInPixels( 13, ETrue );	
+	aStyle1->SetItalic( ETrue );
+	
+	iSpeedLabel->SetColor( KRgbWhite );
+    iSpeedLabel->SetClipping( EFalse );
+	iSpeedLabel->SetTextL( KText1 );
+	iSpeedLabel->SetTextStyle( aStyle1->Id() );
+	iSpeedLabel->SetPadding(TAlfBoxMetric(TAlfMetric(.1, EAlfUnitNormalized)));
+	iSpeedLabel->SetAlign( EAlfAlignHCenter, EAlfAlignVCenter );
+	
+	iSpeedFormatLabel = CAlfTextVisual::AddNewL(*this, iLayout ); // ordinal 5
+
+	aStyle1->SetTextSizeInPixels( 13, ETrue );	
+	aStyle1->SetItalic( ETrue );
+	
+	iSpeedFormatLabel->SetColor( KRgbWhite );
+    iSpeedFormatLabel->SetClipping( EFalse );
+	iSpeedFormatLabel->SetTextL( KText1 );
+	iSpeedFormatLabel->SetTextStyle( aStyle1->Id() );
+	iSpeedFormatLabel->SetPadding(TAlfBoxMetric(TAlfMetric(.1, EAlfUnitNormalized)));
+	iSpeedFormatLabel->SetAlign( EAlfAlignHCenter, EAlfAlignVCenter );
+		
+	}
+
+// ---------------------------------------------------------
+// CHtkNavigationControl::SetFlagVisualL()
+// ---------------------------------------------------------
+//
+void CHtkNavigationControl::SetFlagVisualL()
+	{
+	if( !iLocationModel.IsGPSDataAvailable() )
+		{
+		return;			
+		}
+	
+	// Check wheather landmark is set or not.
+	
+   if( !iRouter->Waypoint() && !iRouter->Landmark() )
+	   {
+	   iIsDestinationSet = EFalse;
+	   return;	
+	   }
+	
+	
+	idecLayout = CAlfDeckLayout::AddNewL( *this, iCurveLayout );
+	
+	iFlagdeck = CAlfDeckLayout::AddNewL( *this, idecLayout );
+
+    iFlagdeck->SetSize(TAlfRealSize( 30, 30 ));
+
+    TInt error = KErrNone;
+    // calculate angle of bearing    
+    const TPosition& position = iPositionInfo;
+    TReal heading = iLocationModel.GetHeading();
+    TReal32 bearing(0);
+    	    
+    TBool isWaypointSet = iRouter->IsWaypointSet();
+    TNamedCoordinate* waypoint = NULL;
+    CPosLandmark* landmark = NULL;
+    
+    if( isWaypointSet )
+	    {
+	    waypoint = iRouter->Waypoint() ;	
+	    }
+    else
+	    {
+	    landmark = iRouter->Landmark();	
+	    }
+       
+    if ( !Math::IsNaN(heading) )
+        {	    	
+    	iHeading = heading;
+    	}	    
+
+    if( isWaypointSet && waypoint )
+        {
+        error = position.BearingTo( TCoordinate( 
+    							                      waypoint->Latitude(),
+    							                      waypoint->Longitude(),
+    							                      waypoint->Altitude() ), 
+    							                      bearing );
+        }
+    else if( landmark )
+    	{
+    	TLocality location;
+    	landmark->GetPosition(location);
+    	error = position.BearingTo( TCoordinate( 
+    		                                          location.Latitude(),
+    	 		                                      location.Longitude(),
+                         		                      location.Altitude() ), 
+                         		                      bearing );
+    	}
+
+    //calculate bearing and heading
+    TInt resultBearing(0);
+    TInt resultHeading(0);
+	TReal32 lpointFlag( 0 );	
+	
+    error = BlidUtils::TRealToTInt(bearing, resultBearing);
+    if( error == KErrNone)
+	    {
+	    error = BlidUtils::TRealToTInt(iHeading, resultHeading);
+	    if( error == KErrNone)
+    	    {
+			// for flag movement					    
+			TReal32 lpoint = resultBearing - resultHeading;
+			if( lpoint > 0 )
+				{
+				lpointFlag = lpoint / 360;	
+				}
+			else
+				{
+				lpointFlag = ( 360 + lpoint ) / 360;	
+				}
+    	    }
+	    }
+	
+	// now map the image visual to curve path and move.
+	TAlfTimedPoint pos1;
+	pos1.SetMappingFunctionIdentifier( iCurveLayout->MappingFunctionIdentifier() );
+	pos1.SetTarget( lpointFlag, 0 );
+	idecLayout->SetPos( pos1 );
+
+	// create the image visual to set on curve path
+	iFlagVisual = CAlfImageVisual::AddNewL(*this, iFlagdeck );
+    iDisplayIcon = 1;
+    //iFlagVisual->SetSize( animationRect.Size() );
+    iFlagVisual->SetImage( TAlfImage( *iTextures[iDisplayIcon-1] ) );//N   
+	iFlagVisual->SetScaleMode( CAlfImageVisual::EScaleCover );
+	iFlagVisual->SetTagL( iFlagText->Des() );	
+	iFlagVisual->SetOpacity( 0.8 );
+
+    idecLayout->EnableScrollingL( ETrue );
+	idecLayout->SetScrollOffset( TAlfTimedPoint(  17, 17 ));
+	}
+
+// ---------------------------------------------------------
+// CHtkNavigationControl::SetAccRacyVisualL()
+// ---------------------------------------------------------
+//
+void CHtkNavigationControl::SetAccRacyVisualL()
+	{
+	if( !iLocationModel.IsGPSDataAvailable() )
+		{
+		return;			
+		}
+	// Check wheather landmark or waypoint is set or not.
+	if( !iRouter->Waypoint() && !iRouter->Landmark() )
+	   {
+	   iIsDestinationSet = EFalse;
+	   return;	
+	   }
+	
+	iAccVisual->SetImage(TAlfImage( *iAccTexture ) );//accuracy
+	iAccVisual->SetScaleMode( CAlfImageVisual::EScaleCover );
+	iAccVisual->SetTagL( iAccText->Des() );	
+	iAccVisual->SetOpacity( 1.0 );
+	iAccVisual->SetScale( 0.8 );
+	
+	// Find all the original size of acuracy ring, Flag, navigation ring
+	iLayout->ChildSize( 6, iCurveSize );
+	TAlfTimedPoint lAccpoint = iAccVisual->Size();
+	TAlfTimedPoint lFagpoint = iFlagVisual->Size();
+	iFlagSize = lFagpoint.IntValueNow().AsSize();
+	iAccuracyringcurveSize = lAccpoint.IntValueNow().AsSize();
+	
+	}
+
+// ---------------------------------------------------------
+// CHtkNavigationControl::~CHtkNavigationControl()
+// ---------------------------------------------------------
+//
+CHtkNavigationControl::~CHtkNavigationControl()
+    {
+    delete iPeriodic;
+    iPeriodic = NULL;
+    iTextures.Reset();
+    iTextures.Close();
+    iPopupTextures.Reset();
+    iPopupTextures.Close();
+	delete iDecoratedTabGroup;
+
+	delete iDistanceFormatKm;
+	delete iDistanceFormatM;
+	delete iDistanceFormatMiles;
+	delete iDistanceFormatFt;
+	delete iDurationFormatLong;
+	delete iBlidSpeed;
+	delete iSpeedFormatKmph;
+	delete iSpeedFormatMph;
+	delete iDataBeingCalculated;
+	delete iDataBlank;
+	delete iFlagText;
+	delete iAccText;
+    delete iTimer;
+    delete iImagePath;
+	delete iToneUtility;
+	iSignalTextures.Reset();
+    iSignalTextures.Close();
+    delete iMenu;
+    }
+
+
+// ----------------------------------------------------
+// CHtkNavigationControl::CreateNaviPaneL
+// ----------------------------------------------------
+//
+void CHtkNavigationControl::CreateNaviPaneL( TBool aDefaultNaviPane )
+    {    
+    CEikStatusPane* sp = StatusPane();
+    // Fetch pointer to the default navi pane control
+    CAknNavigationControlContainer* naviPane = 
+        static_cast<CAknNavigationControlContainer*>(sp->ControlL( 
+        TUid::Uid(EEikStatusPaneUidNavi)));
+    
+    if( iDecoratedTabGroup )
+	    {
+	    delete iDecoratedTabGroup;
+	    iDecoratedTabGroup = NULL;	
+	    }
+
+    if ( aDefaultNaviPane ) // dummy tab
+        {        
+        naviPane->PushDefaultL(EFalse);
+        }
+    else
+        {              
+        iDecoratedTabGroup = naviPane->CreateTabGroupL();
+        iDecoratedTabGroup->SetControlType( CAknNavigationDecorator::ETabGroup );
+        CAknTabGroup* tabGroup = 
+        static_cast< CAknTabGroup* > ( iDecoratedTabGroup->DecoratedControl() );        
+        AddTabsL( *tabGroup );        
+        }
+    }
+
+// ----------------------------------------------------
+// CHtkNavigationControl::GetNiviDecorator
+// ----------------------------------------------------
+//
+CAknNavigationDecorator* CHtkNavigationControl::GetNiviDecorator( )
+	{
+	return iDecoratedTabGroup;	
+	}
+
+// ----------------------------------------------------
+// CHtkNavigationControl::ActivateTabL
+// ----------------------------------------------------
+//
+void CHtkNavigationControl::ActivateTabL( 
+                         CAknNavigationDecorator& aNaviDecorator,
+                         TInt aTabId )
+    {
+    CEikStatusPane* sp = StatusPane();    
+    CAknNavigationControlContainer* naviPane =
+        static_cast<CAknNavigationControlContainer*>(
+        sp->ControlL(TUid::Uid(EEikStatusPaneUidNavi)));
+    CAknTabGroup* tabGroup = static_cast<CAknTabGroup*>( 
+        aNaviDecorator.DecoratedControl() );
+    tabGroup->SetActiveTabById( aTabId );
+    naviPane->PushL( aNaviDecorator );
+    }
+
+
+// ----------------------------------------------------
+// CHtkNavigationControl::StatusPane
+// ----------------------------------------------------
+//
+CEikStatusPane* CHtkNavigationControl::StatusPane()
+    {
+    return CEikonEnv::Static()->AppUiFactory()->StatusPane();
+    }
+
+
+// ----------------------------------------------------
+// CHtkNavigationControl::MakeTitleL
+// ----------------------------------------------------
+//
+void CHtkNavigationControl::MakeTitleL( TInt aResourceText )
+    {
+    HBufC* buf = StringLoader::LoadLC(aResourceText);       
+    CAknTitlePane* title = static_cast<CAknTitlePane*>( StatusPane()->
+                            ControlL( TUid::Uid( EEikStatusPaneUidTitle ) ) );
+    CleanupStack::Pop(); //buf
+    title->SetText(buf); // Takes ownership of buf
+    }
+
+
+// ----------------------------------------------------
+// CHtkNavigationControl::AddTabsL
+// ----------------------------------------------------
+//
+void CHtkNavigationControl::AddTabsL(CAknTabGroup& aTabGroup)
+    {
+    aTabGroup.SetTabFixedWidthL(EAknTabWidthWithTwoTabs);
+
+    MAknsSkinInstance* skin = AknsUtils::SkinInstance(); 
+    HBufC* filename = BlidUtils::GetBitmapFilenameLC();        
+    CFbsBitmap* bitmap = NULL;
+    CFbsBitmap* bitmapMask = NULL;
+        
+    //Add tab icon 1
+    AknsUtils::CreateIconLC( skin,
+                            KAknsIIDQgnPropBlidNavigationTab3,
+                            bitmap,
+                            bitmapMask,
+                            *filename,
+                            EMbmBlidQgn_prop_blid_navigation_tab3,
+                            EMbmBlidQgn_prop_blid_navigation_tab3_mask );             
+    aTabGroup.AddTabL( EBlidNavigationView, bitmap, bitmapMask );
+    CleanupStack::Pop(2); //bitmap, bitmapmask
+
+    //Add tab icon 2
+    AknsUtils::CreateIconLC( skin,
+                            KAknsIIDQgnPropBlidTripTab3,
+                            bitmap,
+                            bitmapMask,
+                            *filename,
+                            EMbmBlidQgn_prop_blid_trip_tab3,
+                            EMbmBlidQgn_prop_blid_trip_tab3_mask );             
+    aTabGroup.AddTabL( EBlidTripMeterView, bitmap, bitmapMask );
+    CleanupStack::Pop(2); //bitmap, bitmapmask
+    
+    CleanupStack::PopAndDestroy(); //filename
+    }
+
+// ----------------------------------------------------
+// CHtkNavigationControl::OfferEventL
+// ----------------------------------------------------
+//
+TBool CHtkNavigationControl::OfferEventL(const TAlfEvent& aEvent)
+	{
+    if(aEvent.IsKeyEvent() && aEvent.Code() == EEventKey)
+        {
+	    CEikStatusPane* sp = StatusPane();
+	    // Fetch pointer to the default navi pane control
+	    CAknNavigationControlContainer* naviPane = 
+	        static_cast<CAknNavigationControlContainer*>(sp->ControlL( 
+	        TUid::Uid(EEikStatusPaneUidNavi)));
+	    CAknNavigationDecorator* naviDecorator = naviPane->Top();
+
+	    // Check if navigation pane controls exists, because decorator does 
+	    // not exist in every cases. E.g. after contact fetch in "new rule" 
+	    // command operation naviDecorator is null. 
+	    if ( naviDecorator && naviDecorator->ControlType() == 
+	        CAknNavigationDecorator::ETabGroup )
+	        {
+	        if ( naviDecorator->DecoratedControl()->OfferKeyEventL( 
+	            aEvent.KeyEvent(), aEvent.Code() ) == EKeyWasConsumed )
+	            {
+	            CAknTabGroup* tabGroup = static_cast< CAknTabGroup* > ( naviDecorator->DecoratedControl() );
+	            TInt tabIndex = tabGroup->ActiveTabIndex();
+				iView.ActivateCorrectViewL( tabIndex );
+	            return ETrue;
+	            }
+	        }
+		StopPlayerL( );	            
+		}
+ 	if( aEvent.IsPointerEvent() )
+		{
+		TPointerEvent ptrEvent = aEvent.PointerEvent();
+		TPoint tapPoint = ptrEvent.iPosition;
+		if ( ptrEvent.iType == TPointerEvent::EButton1Down )
+			{
+			iIsDownPressed = ETrue;
+			return ETrue;
+			}
+		if ( ptrEvent.iType == TPointerEvent::EButton1Up && iIsDownPressed)
+		{
+			if( iLocationModel.IsGPSDataAvailable() )
+				{
+				TAlfRealRect rect = iLabel->DisplayRectTarget();
+				if( tapPoint.iY < rect.iTl.iY || tapPoint.iY > rect.iBr.iY )
+					{
+					iView.LaunchNavigationContextMenuL();	
+					}
+				else
+					{
+					LaunchStylusPopupMenuL( ptrEvent );
+					}				
+				return ETrue;				
+				}
+			else
+				{
+				if( aEvent.Visual() == iPopUpAnchor ||
+					aEvent.Visual() == iPopUpMsg ||
+					aEvent.Visual() == iPopImage )					  
+					{
+					if( isSatelliteInfoLaunch )
+						{
+						iView.LaunchSatelliteInfoDlgL();
+						return ETrue;
+						}
+					else
+						{
+						LaunchInfoQueryDlgL();	
+						return ETrue;						
+						}						
+					}
+				}
+			return EFalse;
+			}
+		}
+	return EFalse;
+	}
+
+
+// ---------------------------------------------------------
+// CHtkNavigationControl::LaunchInfoQueryDlgL
+// ---------------------------------------------------------
+//
+void CHtkNavigationControl::LaunchInfoQueryDlgL()
+	{
+    CAknNoteDialog* dlg;
+    dlg = new (ELeave) CAknNoteDialog(CAknNoteDialog::EConfirmationTone,CAknNoteDialog::ENoTimeout);
+    TInt result = dlg->ExecuteLD( R_INFO_POPUP_MSG_QUERY );
+    if( result == EAknSoftkeyExit )
+	    {
+	    iView.ExitMainApplicationL( EAknSoftkeyExit );
+	    }
+	dlg = NULL;	
+	}
+
+// ---------------------------------------------------------
+// CHtkNavigationControl::UpdateL
+// ---------------------------------------------------------
+//
+void CHtkNavigationControl::UpdateL()
+    {
+    if((iEngine.AppMode() == CBlidEng::EAppForeground) && 
+       (iSettings->GetBacklightOption() == EBlidBackLightOnDuringNavigation) && !iView.IsSettingsViewActive() )
+        {
+        User::ResetInactivityTime();        
+        }
+	            
+    iPositionInfo = iLocationModel.GetCurrentPosition();
+    iCourse = iLocationModel.GetCourse();
+
+	if( iLocationModel.IsGPSDataAvailable() )
+        {
+        isDeviceUnavailableDisplayed = EFalse;
+        CalculateIfArrivedL();
+        iLayout->SetOpacity( 1.0 );
+        iPopUpLayout->SetOpacity( 0.0 );
+        
+        // If MSK visible then after getting fix softkey should change
+		if( iView.CBAPtr() &&
+			iMskInfoVisible  )
+			{
+			iView.CBAPtr()->SetCommandSetL( R_BLID_SOFTKEYS_OPTIONS_EXIT__CONTEXTOPTIONS );
+			iView.CBAPtr()->DrawDeferred();
+			iMskInfoVisible = EFalse;
+			}			    
+		TInt satCount = 0;
+		iLocationModel.GetNumOfSatellitesL( satCount );
+		DisplaySatelliteSignalStrength( satCount );
+		CalculateDistanceL( iPositionInfo );
+    	CalculateDurationL( iCourse );
+    	// if destination is set then
+    	// distance should be update.
+		if( iIsDestinationSet )
+			{
+			if( !iRouter->Waypoint() && !iRouter->Landmark() )
+			   {
+			   iIsDestinationSet = EFalse;
+			   return;	
+			   }
+					
+			// Set the landmarks Name
+			SetLandMarksNameL();
+			// distance format calculation
+			TBuf<KBlidLBItemMaxLen> distanceString;
+			DistanceFormat( distanceString );
+			// distance unit calculation
+    	    TBuf<KBlidLBItemMaxLen> unitString;
+    	    DistanceUnit( unitString );
+    	    if(distanceString != *iDataBlank)
+    	    	{
+    	    	distanceString.Append( unitString );
+    	    	}
+			iDistanceLabel->SetTextL( distanceString );
+			
+			TBuf<KBlidLBItemMaxLen> speedString;
+		    TBuf<KBlidLBItemMaxLen> speedFormatString;
+		    if(iLocationModel.IsOnline())
+		        {
+		        SpeedFormat( speedString, speedFormatString );
+		        iSpeedLabel->SetTextL( speedString );
+		        iSpeedFormatLabel->SetTextL( speedFormatString );
+		        }
+		    else
+		        {
+		        speedString.Append(*iDataBlank);
+		        speedFormatString.Append(*iDataBlank);
+		        }
+			PrepareDynamicMoveL();		        
+			}
+	   	}
+	else
+		{
+		StopPlayerL();
+        TFileName imagepathname;		
+		DisplaySatelliteSignalStrength( 0 );
+        iLayout->SetOpacity( 0.3 );
+        iPopUpLayout->SetOpacity( 1.0 );
+		
+		// for MSK enabled phone add MSK        
+		if( iView.CBAPtr() )
+			{
+			iView.CBAPtr()->SetCommandSetL( R_BLID_OPTION_INFO_EXIT );
+			iView.CBAPtr()->DrawDeferred();
+			iMskInfoVisible = ETrue;
+			}			    
+		if( iPeriodic )
+	        {
+	        delete iPeriodic;
+	        iPeriodic = NULL;
+	        }
+		if( iLocationModel.WaitingGPSData() )
+		    {
+		    isSatelliteInfoLaunch = ETrue;
+		    if(KNumOfSearchIcon != iPopupTextures.Count())
+		    	CreatePopUpVisualL( );
+			HBufC* noteText = StringLoader::LoadLC( R_BLID_STARTUP_NAVITEXT_SEARCHING_GPS_SATELLITES, CEikonEnv::Static() );	
+			iPopUpMsg->SetTextL( *noteText );
+            iDisplayIcon = 1;
+		                
+            iPeriodic = CPeriodic::NewL(0); // neutral priority 
+            iPeriodic->Start( TTimeIntervalMicroSeconds32( KTimerDuration ),
+                              TTimeIntervalMicroSeconds32( KTimerDuration ),
+                              TCallBack(Tick, this));
+            UpdateVisualImage();   
+			CleanupStack::PopAndDestroy(noteText); //noteText
+		    }
+        else
+            {
+            isSatelliteInfoLaunch = EFalse;
+		   	HBufC* noteText = StringLoader::LoadLC( R_BLID_ERROR_NO_GPS_DEVICE, CEikonEnv::Static() );	
+			iPopUpMsg->SetTextL( *noteText );
+        	iPopImage->SetImage(TAlfImage( *iPopupImgTexture ) );
+			CleanupStack::PopAndDestroy(noteText); //noteText        	
+				if(!isDeviceUnavailableDisplayed)
+				{
+					CHWRMLight* aHWRMLight = CHWRMLight::NewL();
+					if(aHWRMLight->LightStatus(CHWRMLight::EPrimaryDisplay) != CHWRMLight::ELightOn)
+					{
+						User::ResetInactivityTime();
+						aHWRMLight->LightOnL(CHWRMLight::EPrimaryDisplay);
+						aHWRMLight->ReleaseLight(CHWRMLight::EPrimaryDisplay);
+						isDeviceUnavailableDisplayed = ETrue;
+						
+					}
+					
+		        	delete aHWRMLight;	
+						
+				}
+            }		    
+		}	   	
+    
+    if(iHasArrived && 
+       (iEngine.AppMode() == CBlidEng::EAppForeground) &&
+       iHasToPlayArrivedTone &&
+       iLocationModel.IsGPSDataAvailable())
+        {
+        if(iAccVisual->Opacity().ValueNow() == 0.0)
+		{
+			iAccVisual->SetOpacity(1.0);
+		}
+			
+		if(iFlagVisual->Opacity().ValueNow() == 0.0)
+		{
+			iFlagVisual->SetOpacity(0.8);
+		}
+		if( iFlagVisual )
+			{
+            iDisplayIcon = 1;
+		    if( iPeriodic )
+		        {
+		        delete iPeriodic;
+		        iPeriodic = NULL;
+		        }            
+            iPeriodic = CPeriodic::NewL(0); // neutral priority 
+            iPeriodic->Start( TTimeIntervalMicroSeconds32( KTimerDuration ),
+                              TTimeIntervalMicroSeconds32( KTimerDuration ),
+                              TCallBack(Tick, this));
+            UpdateVisualImage();
+			}
+        PlayArrivedToneL();
+        }
+    }
+
+// ---------------------------------------------------------
+// CHtkNavigationControl::DisplayInfoPopUpMsgL
+// ---------------------------------------------------------
+//
+void CHtkNavigationControl::DisplayInfoPopUpMsgL()
+	{
+	if( isSatelliteInfoLaunch )
+		{
+		iView.LaunchSatelliteInfoDlgL();
+		}
+	else
+		{
+		LaunchInfoQueryDlgL();	
+		}						
+	}
+
+// ---------------------------------------------------------
+// CHtkNavigationControl::LaunchDeviceNotAvlNoteL
+// ---------------------------------------------------------
+//
+void CHtkNavigationControl::LaunchDeviceNotAvlNoteL( )
+    {
+	TInt typefaceStyleId = iEnv.TextStyleManager().CreatePlatformTextStyleL(EAknHighestLogicalFont, EAlfTextStyleNormal); 
+    CAlfTextStyle* style1 = iEnv.TextStyleManager().TextStyle( typefaceStyleId );
+
+    iPopUpLayout = CAlfAnchorLayout::AddNewL( *this );
+    
+    iPopupDeck = CAlfDeckLayout::AddNewL( *this, iPopUpLayout );
+    
+    iPopUpLayout->SetAnchor(EAlfAnchorTopLeft, 0, 
+        EAlfAnchorOriginHCenter, EAlfAnchorOriginTop,
+        EAlfAnchorMetricRelativeToSize, EAlfAnchorMetricRelativeToSize,
+        TAlfTimedPoint( -0.05, 0.05));
+    iPopUpLayout->SetAnchor(EAlfAnchorBottomRight, 0, 
+        EAlfAnchorOriginHCenter, EAlfAnchorOriginTop,
+        EAlfAnchorMetricRelativeToSize, EAlfAnchorMetricRelativeToSize,
+        TAlfTimedPoint( 0.4, 0.38));
+
+	iPopupDeck->EnableBrushesL();
+
+    TAlfXYMetric edgeoffset(TAlfMetric( 0.01, EAlfUnitNormalized ));
+    iFrameBrush = CAlfFrameBrush::NewL(iEnv, KAknsIIDQsnFrPopup, edgeoffset);
+    iFrameBrush->SetFrameRectsL(TRect(12,12,167,167), TRect(11,11,170,170));
+    iFrameBrush->SetEdgeOffset(edgeoffset);
+    iPopupDeck->Brushes()->AppendL( iFrameBrush, EAlfHasOwnership );
+	
+    iPopUpAnchor = CAlfAnchorLayout::AddNewL( *this, iPopupDeck );
+    
+	iPopUpAnchor->EnableBrushesL();
+    
+    iPopUpMsg = CAlfTextVisual::AddNewL( *this, iPopUpAnchor );
+    iPopImage = CAlfImageVisual::AddNewL( *this, iPopUpAnchor );
+    style1->SetTextSizeInPixels(20, ETrue );
+    style1->SetBold( EFalse );
+    
+	iPopUpMsg->SetColor( iVisualColor );
+	iPopUpMsg->SetTextL( KText1 );
+	iPopUpMsg->SetTextStyle( style1->Id() );
+	iPopUpMsg->SetPadding(TAlfBoxMetric(TAlfMetric(.1, EAlfUnitNormalized)));
+	iPopUpMsg->SetWrapping( CAlfTextVisual::ELineWrapBreak );
+	iPopUpMsg->SetAlign( EAlfAlignHCenter, EAlfAlignVCenter );
+	
+    iPopUpAnchor->SetAnchor(EAlfAnchorTopLeft, 0, 
+        EAlfAnchorOriginLeft, EAlfAnchorOriginTop,
+        EAlfAnchorMetricRelativeToSize, EAlfAnchorMetricRelativeToSize,
+        TAlfTimedPoint( 0.02, 0.02));
+    iPopUpAnchor->SetAnchor(EAlfAnchorBottomRight, 0, 
+        EAlfAnchorOriginHCenter, EAlfAnchorOriginTop,
+        EAlfAnchorMetricRelativeToSize, EAlfAnchorMetricRelativeToSize,
+        TAlfTimedPoint( 0.47, 0.3));
+
+    iPopUpAnchor->SetAnchor(EAlfAnchorTopLeft, 1, 
+        EAlfAnchorOriginLeft, EAlfAnchorOriginTop,
+        EAlfAnchorMetricRelativeToSize, EAlfAnchorMetricRelativeToSize,
+        TAlfTimedPoint( 0.28, 0.4 ));
+    iPopUpAnchor->SetAnchor(EAlfAnchorBottomRight, 1, 
+        EAlfAnchorOriginHCenter, EAlfAnchorOriginBottom,
+        EAlfAnchorMetricRelativeToSize, EAlfAnchorMetricRelativeToSize,
+        TAlfTimedPoint( 0.22, -0.16 ) );
+
+    iPopUpLayout->SetOpacity( 0.0 );        
+    }
+    
+        
+// ---------------------------------------------------------
+// CHtkNavigationControl::DisplaySatelliteSignalStrength
+// ---------------------------------------------------------
+//
+void CHtkNavigationControl::DisplaySatelliteSignalStrength( TInt aSatCount ) 
+	{
+    TFileName imagepathname;
+	imagepathname.Zero();
+	iImageVisual->SetImage(TAlfImage(*iSignalTextures[aSatCount]));                                                           
+	}
+
+// ---------------------------------------------------------
+// CHtkNavigationControl::SetLandMarksNameL
+// ---------------------------------------------------------
+//
+void CHtkNavigationControl::SetLandMarksNameL()   
+	{
+	TDesC* name = NULL;
+	TBool isWaypointSet = iRouter->IsWaypointSet();
+	TNamedCoordinate* waypoint = NULL;
+	CPosLandmark* landmark = NULL;
+
+	TPtrC landmarkname;
+	if( isWaypointSet )
+	   {
+	   waypoint = iRouter->Waypoint() ;	
+	   name = waypoint->Name();
+	   }
+	else
+	   {
+	   landmark = iRouter->Landmark();	
+	   landmark->GetLandmarkName(landmarkname);
+	   }
+
+	HBufC* landmarksName = HBufC::NewLC( landmarkname.Length() + 20 );
+	
+	if( isWaypointSet )
+	   {
+	   landmarksName->Des().Copy( *name );
+	   delete name;
+	   }
+	else
+	   {
+	   landmarksName->Des().Copy(landmarkname);
+	   }
+	iLabel->SetTextL( *landmarksName );
+	CleanupStack::PopAndDestroy(landmarksName);
+	}
+
+// ---------------------------------------------------------
+// CHtkNavigationControl::ClearNavigationInfoL
+// ---------------------------------------------------------
+//
+void CHtkNavigationControl::ClearNavigationInfoL()
+	{
+	CAlfVisual* lvisual = NULL;
+	if( iFlagdeck )
+		{
+		lvisual =  iFlagdeck->FindTag( iFlagText->Des() );
+		if( lvisual )
+			{
+			lvisual->SetOpacity( 0.0 ); 
+			}
+		}
+
+	if( iAccVisual )
+		{
+		lvisual =  iLayout->FindTag( iAccText->Des() );
+		if( lvisual )
+			{
+			lvisual->SetOpacity( 0.0 );
+			}
+		}
+	
+	if( iCurveLayout && iIsDestinationSet )
+		{
+		iNavigationRing->SetScale( 1.0 );
+		CAlfCurvePath& path = iCurveLayout->CurvePath();
+		TAlfRealPoint centre( 0.5, 0.5 );
+		TAlfRealSize  radious( 0.47, 0.37 );
+		path.Reset();
+		path.AppendArcL( centre, radious, 0, 360, 1 );
+		path.EnableLoop();
+		}
+		
+	iDistanceLabel->SetTextL( KText1 );
+	iSpeedLabel->SetTextL( KText1 );
+	iSpeedFormatLabel->SetTextL( KText1 );
+	iLabel->SetTextL( KText1 );
+	
+	if( iNdecLayout && iIsDestinationSet )
+		{
+		TAlfTimedPoint pos1;
+		pos1.SetTarget( 0.75, 0 );
+		iNdecLayout->SetPos( pos1 );
+		}
+	
+	// Playing should be stopped if user stop navigation
+    if( iToneUtility )
+	    {
+		// change back the softkey to optionexit
+	    if( iView.CBAPtr() )
+		    {
+		    iView.CBAPtr()->SetCommandSetL( R_BLID_SOFTKEYS_OPTIONS_EXIT__CONTEXTOPTIONS );
+		    iView.CBAPtr()->DrawDeferred();
+		    }			    
+	    iToneUtility->CanclePayer();		    	
+	    }
+
+	iHasArrived = EFalse;
+	iHasToPlayArrivedTone = ETrue;
+	iTimeFirstArrived = EFalse;
+	iTimerComplete = EFalse;
+	iIsDestinationSet = EFalse;
+	} 
+
+// ---------------------------------------------------------
+// CHtkNavigationControl::SetUpdateOptionL
+// ---------------------------------------------------------
+//
+void CHtkNavigationControl::SetUpdateOptionL( TBool aIsDestSet )
+	{
+	iIsFirstDistance = 0;
+	iIsDestinationSet = aIsDestSet;
+	iLocationModel.SetTripStartL();
+	}
+
+// ---------------------------------------------------------
+// CHtkNavigationControl::PlayArrivedToneL
+// ---------------------------------------------------------
+//
+void CHtkNavigationControl::PlayArrivedToneL()    
+    {
+    if( !iToneUtility )
+    	{
+    	iToneUtility = CBlidArrivedTonePlayerUtility::NewL();
+    	}
+    TBuf<KMaxFileName> lFileName;
+    lFileName.Copy( iSettings->GetArrivedToneName() );
+    iToneUtility->PlayToneL( lFileName );
+    iHasToPlayArrivedTone = EFalse;
+    if( iView.CBAPtr() )
+	    {
+	    iView.CBAPtr()->SetCommandSetL( R_BLID_SOFTKEYS_OPTIONS_STOP );
+	    iView.CBAPtr()->DrawDeferred();
+	    }
+    }
+    
+// ---------------------------------------------------------
+// CHtkNavigationControl::CalculateIfArrivedL
+// ---------------------------------------------------------
+//
+void CHtkNavigationControl::CalculateIfArrivedL()
+	{
+	if(iHasArrived)
+		{
+		if( iTimeFirstArrived )
+		    {
+		    if( iTimer )
+		        {
+		        delete iTimer;
+		        iTimer = NULL;
+		        }
+		    iTimer = CPeriodic::NewL( EPriorityHigh );
+		    if( iTimer )
+		        {
+    		    TCallBack callback( TimerCallBackFunction, this );
+    		    iTimer->Start( TTimeIntervalMicroSeconds32( KMinArrivalTime ),
+    	                       TTimeIntervalMicroSeconds32( 80000000 ), 
+                               callback );
+                iTimeFirstArrived = EFalse;                           
+		        }
+			
+			TReal32 flagArrivedScale = ( iCurveSize.iWidth ) / ( ( iFlagSize.iWidth / 2 ) + ( iAccuracyringcurveSize.iWidth / 2 ) );
+			TReal32 accArrivedScale = ( iCurveSize.iWidth / 2 ) / ( ( iFlagSize.iWidth / 2 ) + ( iAccuracyringcurveSize.iWidth / 2 ) );
+			iAccVisual->SetScale( accArrivedScale );
+			//iFlagVisual->SetScale( flagArrivedScale );
+			iNavigationRing->SetScale( 0.25 );
+			// change the curve path size once arrived.
+			if( iCurveLayout )
+				{
+				TAlfRealPoint centre( 0.5, 0.4 );
+				TAlfRealSize  radious( 0, 0 );
+				iCurveLayout->CurvePath().Reset();
+				iCurveLayout->CurvePath().AppendArcL( centre, radious, 0, 360, 1 );
+				iCurveLayout->CurvePath().EnableLoop();
+				if(iFlagdeck) 
+					iFlagdeck->SetPos( iCurveLayout->Pos() );
+				}				
+				
+			if(iInArrivedZone)
+				{
+				iFlagVisual->SetScale( 4 * flagArrivedScale );
+				}
+			isStopUpdate = ETrue;				
+		    }
+		else if( iTimerComplete )
+		    {
+		    isStopUpdate = EFalse;
+		    if( iToneUtility )
+			    {
+			    iToneUtility->CanclePayer();		    	
+			    }
+			// change back the softkey to optionexit
+		    if( iView.CBAPtr() )
+			    {
+			    iView.CBAPtr()->SetCommandSetL( R_BLID_SOFTKEYS_OPTIONS_EXIT__CONTEXTOPTIONS );
+			    iView.CBAPtr()->DrawDeferred();	
+			    }			    
+			if( !IsInArrivedZone() )
+				{
+				iHasArrived = EFalse;
+				}			
+		    }
+		else if( !IsInArrivedZone() )
+			{
+		    StopPlayerL();			    			
+			iHasArrived = EFalse;	
+			iMskInfoVisible = ETrue;	
+			}
+		}
+	else
+		{
+		if(iEngine.HasArrivedToDestination())
+			{
+			iHasArrived = ETrue;
+			iHasToPlayArrivedTone = ETrue;
+			iTimeFirstArrived = ETrue;
+			iTimerComplete = EFalse;
+			}
+		}    
+	}
+
+// ---------------------------------------------------------
+// CHtkNavigationControl::Tick()
+// ---------------------------------------------------------
+//
+TInt CHtkNavigationControl::Tick(TAny* aObject)
+    {
+    ((CHtkNavigationControl*)aObject)->UpdateVisualImage(); // cast, and call non-static function
+
+    return KErrNone;
+    }
+
+// ---------------------------------------------------------
+// CHtkNavigationControl::UpdateVisualImage
+// ---------------------------------------------------------
+//
+void CHtkNavigationControl::UpdateVisualImage()
+	{
+	if( isSatelliteInfoLaunch )
+		{
+	    if(KNumOfSearchIcon > iDisplayIcon)
+	        {
+	        iDisplayIcon++;
+	        }
+	    else
+	        {
+	        iDisplayIcon = 1;
+	        } 
+	    //iPopImage->SetSize( animationRect.Size() );
+	    iPopImage->SetImage( TAlfImage( *iPopupTextures[iDisplayIcon-1] ) );//N  
+		}
+	else if(!iTimerComplete && isStopUpdate)
+		{
+	    if(KNumOfFlagIcon > iDisplayIcon)
+	        {
+	        iDisplayIcon++;
+	        }
+	    else
+	        {
+	        iDisplayIcon = 1;
+	        } 
+	    //iFlagVisual->SetSize( animationRect.Size() );
+	    iFlagVisual->SetImage( TAlfImage( *iTextures[iDisplayIcon-1] ) );//N  
+		}
+	}
+	
+// ---------------------------------------------------------
+// CHtkNavigationControl::ChangeFlagVisualImageL
+// ---------------------------------------------------------
+//
+void CHtkNavigationControl::ChangeFlagVisualImageL()
+	{
+    if( iPeriodic )
+        {
+        delete iPeriodic;
+        iPeriodic = NULL;
+        }
+	iDisplayIcon = 1;
+    //iFlagVisual->SetSize( animationRect.Size() );
+    iFlagVisual->SetImage( TAlfImage( *iTextures[iDisplayIcon-1] ) );//N  
+	}
+
+// ---------------------------------------------------------
+// CHtkNavigationControl::IsInArrivedZone
+// ---------------------------------------------------------
+//
+TBool CHtkNavigationControl::IsInArrivedZone()
+	{
+	if(iRouter->IsAnyPointSet())
+		{
+		TPosition& currentPosition = iLocationModel.GetCurrentPosition();
+		TReal32 distanceToDestination(0);
+		
+		if(iRouter->IsWaypointSet())
+	        {
+	        TNamedCoordinate* destination = iRouter->Waypoint();
+	        if(destination->Distance(currentPosition, distanceToDestination) != KErrNone)
+	        	{
+	        	return EFalse;
+	        	}
+	        }
+	    else
+	        {
+	        TPosition destination;
+	        CPosLandmark* landmark = iRouter->Landmark();	        
+	        landmark->GetPosition(destination);
+	        if(currentPosition.Distance(destination, distanceToDestination) != KErrNone)
+	        	{
+	        	return EFalse;
+	        	}
+	        }	    
+        
+	    if(  distanceToDestination < iSettings->GetArrivedDistance() && 
+	        iHasArrived )
+	    	{
+	    	return ETrue;
+	    	}
+		}	
+    return EFalse;		
+	}
+
+// ---------------------------------------------------------
+// CHtkNavigationControl::HasArrivedDestination
+// ---------------------------------------------------------
+//
+TBool CHtkNavigationControl::HasArrivedDestination()
+	{
+	return iHasArrived;
+	}
+
+// ----------------------------------------------------------------------------
+// CHtkNavigationControl::CreateApplicationStringsL
+// ----------------------------------------------------------------------------
+//
+void CHtkNavigationControl::CreateApplicationStringsL( )
+	{
+    iDistanceFormatKm = CEikonEnv::Static()->AllocReadResourceL( 
+                                R_BLID_NAV_DISTANCE_KM );
+    iDistanceFormatM = CEikonEnv::Static()->AllocReadResourceL( 
+                                R_BLID_NAV_DISTANCE_M );
+
+    iDistanceFormatMiles = CEikonEnv::Static()->AllocReadResourceL( 
+                                R_BLID_NAV_DISTANCE_MI );
+
+    iDistanceFormatFt = CEikonEnv::Static()->AllocReadResourceL( 
+                                R_BLID_NAV_DISTANCE_FT );
+
+    iDurationFormatLong = CEikonEnv::Static()->AllocReadResourceL( 
+                 R_QTN_TIME_DURAT_LONG_WITH_ZERO );
+    
+    iBlidSpeed = StringLoader::LoadL( R_BLID_NAVIGATION_SPEED, CEikonEnv::Static());
+    
+   
+    iSpeedFormatKmph = CEikonEnv::Static()->AllocReadResourceL( R_BLID_METRIC_SPEED_FORMAT );
+    iSpeedFormatMph = CEikonEnv::Static()->AllocReadResourceL( R_BLID_IMPERIAL_SPEED_FORMAT );
+    iDataBeingCalculated = StringLoader::LoadL( R_BLID_WAITING_GPS_LIST, CEikonEnv::Static() );
+    iDataBlank = StringLoader::LoadL( R_BLID_BLANK, CEikonEnv::Static() );
+    
+	iFlagText = HBufC8::NewL( 8 );
+	iAccText = HBufC8::NewL( 15 );
+	iFlagText->Des().Copy( KFlagVisual );
+    iAccText->Des().Copy( KAccVisual );
+	}
+
+
+// ---------------------------------------------------------
+// CHtkNavigationControl::CalculateDistance
+// ---------------------------------------------------------
+//
+void CHtkNavigationControl::CalculateDistanceL( TPosition aPosition )
+    {
+    // If destination is not set don't do anything
+    if( iRouter->IsAnyPointSet() )
+	    {
+	    TNamedCoordinate* waypoint = NULL;
+	    CPosLandmark* landmark = NULL;
+	    
+	    if( iRouter->IsWaypointSet() )
+		    {
+		    waypoint = iRouter->Waypoint() ;	
+		    }
+	    else
+		    {
+		    landmark = iRouter->Landmark();	
+		    }
+	    
+	    iDistance = 0;
+	    if ( iRouter->IsAnyPointSet() && waypoint )
+	        {
+	        User::LeaveIfError( aPosition.Distance( TCoordinate( 
+	                                     waypoint->Latitude(),
+	                                     waypoint->Longitude(),
+	                                     waypoint->Altitude() ),iDistance) );
+	        }
+	    else if( landmark )
+	    	{
+	    	TLocality location;
+		    landmark->GetPosition(location);
+	        User::LeaveIfError( aPosition.Distance( TCoordinate( 
+	                                     location.Latitude(),
+		 		                         location.Longitude(),
+	                     		         location.Altitude() ),iDistance) );
+	        }
+	    }
+    }
+
+// ---------------------------------------------------------
+// CHtkNavigationControl::CalculateDurationL
+// ---------------------------------------------------------
+//
+void CHtkNavigationControl::CalculateDurationL( TCourse /*aCourse*/ )
+    {
+    TCourse course = iLocationModel.GetCourse();
+    iSpeed = course.Speed();    
+         
+    iDurationInSeconds = 0;
+
+    if ( !Math::IsNaN(iSpeed) )
+        {
+        User::LeaveIfError( Math::Round( iSpeed, iSpeed, KDecimals3 ) );
+         iIsSpeed = ETrue;
+        }
+    else
+        {
+        iIsSpeed = EFalse;
+        iSpeed = 0;
+        }
+
+    if ( iSpeed != 0 && iDistance != 0)
+        {
+        iDurationInSeconds = (iDistance/iSpeed);
+        }
+    
+    TBuf<KBlidLBItemMaxLen> durationString;
+    if ( BlidUtils::FormatStringToTime( durationString, iDurationInSeconds ) 
+         != KErrNone )
+        {
+        return;
+        }
+
+    if ( iDurationInSeconds < KDayToSeconds )
+        {
+        iDuration.Set( durationString );
+        }
+    else
+        {
+        User::LeaveIfError( 
+            BlidUtils::SecondsToDays( iDurationInSeconds, iDurationInDays ) ); 
+        }
+    }
+
+
+
+// ---------------------------------------------------------
+// CHtkNavigationControl::PrepareDynamicMoveL
+// ---------------------------------------------------------
+//
+void CHtkNavigationControl::PrepareDynamicMoveL( )
+	{
+	if( iLocationModel.IsGPSDataAvailable() )
+	    {
+	    if( isStopUpdate )
+		    {
+			return;		    	
+		    }
+
+	    if( iHasArrived )
+		    {
+			return;		    	
+		    }
+		    		    
+	    TInt error = KErrNone;
+        // calculate angle of bearing    
+        const TPosition& position = iPositionInfo;
+        TReal heading = iLocationModel.GetHeading();
+        TReal32 bearing(0);
+        	    
+        TBool isWaypointSet = iRouter->IsWaypointSet();
+        TNamedCoordinate* waypoint = NULL;
+        CPosLandmark* landmark = NULL;
+        
+        if( isWaypointSet )
+    	    {
+    	    waypoint = iRouter->Waypoint() ;	
+    	    }
+        else
+    	    {
+    	    landmark = iRouter->Landmark();	
+    	    }
+           
+        if ( !Math::IsNaN(heading) )
+	        {	    	
+	    	iHeading = heading;
+	    	}	    
+
+        if( isWaypointSet && waypoint )
+	        {
+	        error = position.BearingTo( TCoordinate( 
+        							                      waypoint->Latitude(),
+        							                      waypoint->Longitude(),
+        							                      waypoint->Altitude() ), 
+        							                      bearing );
+	        }
+	    else if( landmark )
+	    	{
+	    	TLocality location;
+	    	landmark->GetPosition(location);
+	    	error = position.BearingTo( TCoordinate( 
+        		                                          location.Latitude(),
+        	 		                                      location.Longitude(),
+                             		                      location.Altitude() ), 
+                             		                      bearing );
+	    	}
+    
+	    //calculate bearing and heading
+	    TInt resultBearing(0);
+	    TInt resultHeading(0);
+	    TReal32 lDistance;
+	    TReal degreeN( 0 );
+
+	    error = BlidUtils::TRealToTInt(bearing, resultBearing);
+	    if( error == KErrNone)
+    	    {
+		    error = BlidUtils::TRealToTInt(iHeading, resultHeading);
+		    if( error == KErrNone)
+	    	    {
+			    degreeN = resultHeading;
+
+				TReal32 NavigationPaneRadius = iCurveSize.iWidth / 2;
+				TReal32 accuracyRingRadius = iAccuracyringcurveSize.iWidth / 2;
+				TReal32 flagRadious = iFlagSize.iWidth / 2;
+				
+			    if( isWaypointSet )
+				    {
+				    position.Distance(TCoordinate(waypoint->Latitude(),waypoint->Longitude()), lDistance);
+				    }	    	
+			    else
+			    	{
+			    	TLocality location;
+			    	landmark->GetPosition(location);
+			    	position.Distance(TCoordinate(location.Latitude(),location.Longitude()), lDistance);
+			    	}
+			        
+				if( iIsFirstDistance == 0 )
+					{
+					iFirstDistance = lDistance;	
+					iIsFirstDistance = 1;					
+					}
+				
+				TReal32 flagFactor = 0,ringFactor = 0, accFactor = 0, ringMap = 0, ringWidth = 0;
+				TReal32 newRingFact = 0, newFlagFact = 0, newAccFact = 0, difference = 0;
+				TReal32 flagAccFact = NavigationPaneRadius / 2;
+					if(iAccVisual->Opacity().ValueNow() == 0.0)
+					{
+						
+						iAccVisual->SetOpacity(1.0);
+					}
+						
+					if(iFlagVisual->Opacity().ValueNow() == 0.0)
+					{
+						
+						iFlagVisual->SetOpacity(0.8);
+					}
+				    if( lDistance < iFirstDistance && iFirstDistance > 0 )
+					{
+					ringFactor = NavigationPaneRadius / iFirstDistance;
+					flagFactor = ( NavigationPaneRadius - flagRadious ) / iFirstDistance;
+					accFactor = ( flagAccFact - accuracyRingRadius ) / iFirstDistance;
+
+					difference = iFirstDistance - lDistance;
+					newRingFact = lDistance * ringFactor;
+					newFlagFact = flagRadious + flagFactor * difference;
+					newAccFact = accuracyRingRadius + accFactor * difference;
+					
+					ringMap = (newRingFact * 0.37 ) / NavigationPaneRadius;
+					ringWidth = (newRingFact * 0.47 ) / NavigationPaneRadius;
+					if(	ringMap <= 0.37 &&  ringMap > 0 )					
+						{
+						TAlfRealPoint centre( 0.5, 0.5 );
+						TAlfRealSize  radious( ringWidth,ringMap );
+						Env().SetRefreshMode( EAlfRefreshModeManual );
+						iCurveLayout->CurvePath().Reset();
+						TRAP( error, iCurveLayout->CurvePath().AppendArcL( centre, radious, 0, 360, 1 ) )
+						iCurveLayout->CurvePath().EnableLoop();
+						Env().SetRefreshMode( EAlfRefreshModeAutomatic );
+						}
+					// scale flag and  accuracy ring
+					iAccVisual->SetScale( TAlfTimedValue( newAccFact / accuracyRingRadius ) );
+					iFlagVisual->SetScale( TAlfTimedValue( newFlagFact / flagRadious ) );
+					iNavigationRing->SetScale( newRingFact / NavigationPaneRadius );
+					}
+				else
+					{
+					iFirstDistance = lDistance;
+					Env().SetRefreshMode( EAlfRefreshModeManual );
+					iCurveLayout->CurvePath().Reset();
+					TRAP( error, iCurveLayout->CurvePath().AppendArcL( TAlfRealPoint( 0.5, 0.5 ),
+														  TAlfRealPoint( 0.47, 0.37 ),
+														  0,
+														  360,
+														  1 ) );
+					iCurveLayout->CurvePath().EnableLoop();
+					Env().SetRefreshMode( EAlfRefreshModeAutomatic );
+					iAccVisual->SetScale( 0.8 );
+					iFlagVisual->SetScale( 1.5 );
+					iNavigationRing->SetScale( 1.0 );
+					}					
+
+				// for N movement					    
+			    TReal32 lpointN = ( 360 - degreeN ) / 360;
+			    // As start from top position
+			    lpointN -= 0.25;
+					
+				// for flag movement					    
+				TReal32 lpoint = resultBearing - resultHeading;
+				TReal32 lpointFlag( 0 );
+				if( lpoint > 0 )
+					{
+					lpointFlag = lpoint / 360;	
+					}
+				else
+					{
+					lpointFlag = ( 360 + lpoint ) / 360;	
+					}
+				// As start from top position	
+				lpointFlag -= 0.25;
+				 
+			    TAlfPointCommand moveCommandN( 
+			        iNdecLayout, 
+			        EAlfPointCommandVisualSetPos,
+			        TAlfRealPoint( lpointN , lpointN ),
+			        0 );
+				moveCommandN.ExecuteL( iEnv );		        
+
+			    // move it again later on
+			    TAlfPointCommand moveCommand( 
+			        idecLayout, 
+			        EAlfPointCommandVisualSetPos,
+			        TAlfRealPoint( lpointFlag , lpointFlag ),
+			        0 );
+			    moveCommand.ExecuteL( iEnv ); 
+	    	    }
+    	    }
+    	}
+	}
+
+// ---------------------------------------------------------
+// CHtkNavigationControl::DistanceFormat
+// ---------------------------------------------------------
+//
+void CHtkNavigationControl::DistanceFormat( TDes& aDistanceString )
+    {
+    //max distance is 20.000km, so aDistanceString is allways 
+    //long enough
+    TBuf<KBlidLBItemMaxLen> temp;    
+    TInt result;
+	if( !iRouter->IsAnyPointSet() )
+    	{
+    	// 
+    	// Destination not set
+    	//
+    	aDistanceString = *iDataBlank;
+    	return;
+    	}
+    	
+    if ( iSettings->UnitOfMeasurement() == EUnitsMetric )
+        {
+        if ( iDistance >= KKilometerToMeters )
+            {
+            TReal distanceInKm = iDistance / KKilometerToMeters;
+            if(distanceInKm >1 && distanceInKm <100)
+                {
+                BlidUtils::DistanceFormat( aDistanceString, distanceInKm,ETrue );            
+                }
+            else
+                {
+                BlidUtils::DistanceFormat( aDistanceString, distanceInKm, EFalse );                            
+                }                
+            }
+        else
+            {
+            if ( BlidUtils::TRealToTInt(iDistance, result) != KErrNone )
+                {
+                result = 0;   
+                }                        
+            BlidUtils::DistanceFormat( aDistanceString, result, EFalse ); 	
+            }
+        }
+    else
+        {
+        TReal distanceImperial = iDistance*KMetreToFoot;
+        if ( distanceImperial >= KMileToFeets ) 
+            {
+            distanceImperial /= KMileToFeets;
+            if(distanceImperial >10 && distanceImperial <100)
+                {
+                BlidUtils::DistanceFormat( aDistanceString, distanceImperial,ETrue );
+                }
+            else
+                {
+                BlidUtils::DistanceFormat( aDistanceString, distanceImperial, EFalse );                            
+                }                
+            }
+        else
+            {    
+            if ( BlidUtils::TRealToTInt(distanceImperial, result) != KErrNone )
+                {
+                 result = 0;   
+                }
+            BlidUtils::DistanceFormat( aDistanceString, result, EFalse );
+            }
+        }
+    }
+    
+// ---------------------------------------------------------
+// CHtkNavigationControl::DistanceUnit
+// ---------------------------------------------------------
+//
+void CHtkNavigationControl::DistanceUnit( TDes& aUnitString )
+    {
+    //max distance is 20.000km, so aDistanceString is allways 
+    //long enough
+    TInt result;
+
+    if ( iSettings->UnitOfMeasurement() == EUnitsMetric )
+        {
+        if ( iDistance >= KKilometerToMeters )
+            {
+                         
+            aUnitString.Append(*iDistanceFormatKm);            
+            }
+        else
+            {
+            if ( BlidUtils::TRealToTInt(iDistance, result) != KErrNone )
+                {
+                 result = 0;   
+                }
+            
+            aUnitString.Append(*iDistanceFormatM);           
+            }
+        }
+    else
+        {
+        TReal distanceImperial = iDistance*KMetreToFoot;
+        if ( distanceImperial >= KMileToFeets ) 
+            {
+            distanceImperial /= KMileToFeets;
+            aUnitString.Append(*iDistanceFormatMiles); 
+            }
+        else
+            {    
+            if ( BlidUtils::TRealToTInt(distanceImperial, result) != KErrNone )
+                {
+                 result = 0;   
+                }
+            aUnitString.Append(*iDistanceFormatFt);
+                       
+            }
+        }
+    }
+
+// ----------------------------------------------------------------------------
+// CHtkNavigationControl::SpeedFormat
+// ----------------------------------------------------------------------------
+//
+void CHtkNavigationControl::SpeedFormat( TDes& aSpeedString, TDes& aSpeedFormatString)
+    {
+    if(!iRouter->IsAnyPointSet())
+    	{
+    	// 
+    	// Destination not set
+    	//
+    	aSpeedString = *iDataBlank;
+    	aSpeedFormatString = *iDataBlank;
+    	return;
+    	}
+    
+    if ( iIsSpeed )
+        {
+        TReal speedInKmph = iSpeed * KSpeedConvertion;
+        //
+        //If speed is less than 1km or mile per hour,then no data
+        // is displayed
+        //
+        if(speedInKmph < 1)
+        	{
+        	aSpeedString = *iDataBlank;
+        	aSpeedFormatString = *iDataBlank;
+        	return;
+        	}
+        TBuf<KBlidLBItemMaxLen> temp;        
+        //HBufC* formatter = NULL;
+        if ( iSettings->UnitOfMeasurement() == EUnitsMetric )
+            {
+            temp.Format( KSpeedFormat, speedInKmph );
+            //formatter = iSpeedFormatKmph;
+            aSpeedString.Copy(temp);
+            aSpeedFormatString.Copy(*iSpeedFormatKmph);
+            }
+        else
+            {
+            speedInKmph *= KKilometreToMiles;
+            temp.Format( KSpeedFormat, speedInKmph );
+            //formatter = iSpeedFormatMph;  
+            aSpeedString.Copy(temp);
+            aSpeedFormatString.Copy(*iSpeedFormatMph);           
+            }
+        //StringLoader::Format( aSpeedString, *formatter, 0, temp );  
+        }
+    else
+        {    
+     	aSpeedString = *iDataBeingCalculated;
+        }
+    }
+
+// ----------------------------------------------------------------------------
+// CHtkNavigationControl::StopPlayerL
+// ----------------------------------------------------------------------------
+//
+void CHtkNavigationControl::StopPlayerL(  )
+	{
+    if( iToneUtility && isStopUpdate )
+	    {
+	    iToneUtility->CanclePayer();
+	    ChangeFlagVisualImageL();
+	    isStopUpdate = EFalse;
+		// change back the softkey to optionexit
+	    if( iView.CBAPtr() )
+		    {
+		    iView.CBAPtr()->SetCommandSetL( R_BLID_SOFTKEYS_OPTIONS_EXIT__CONTEXTOPTIONS );
+		    iView.CBAPtr()->DrawDeferred();
+		    }			    
+	    }	    
+	}
+
+
+// ----------------------------------------------------------------------------
+// CHtkNavigationControl::NotifyControlVisibility
+// ----------------------------------------------------------------------------
+//
+void CHtkNavigationControl::NotifyControlVisibility( TBool aIsVisible, 
+                              						 CAlfDisplay& /*aDisplay*/ )
+	{
+	if( !aIsVisible )
+		{
+		TRAP_IGNORE(StopPlayerL());	
+		}
+	}
+
+// ----------------------------------------------------------------------------
+// CHtkNavigationControl::UpdateLayoutL
+// ----------------------------------------------------------------------------
+//
+void CHtkNavigationControl::UpdateLayoutL( )
+	{
+	// Call all the root label setanchor and adjust the new LAyout rectangle.
+	CalculateRects();	
+	SetAnchors();
+	}
+
+// ----------------------------------------------------------------------------
+// CHtkNavigationControl::UpdateLayoutL
+// ----------------------------------------------------------------------------
+//
+void CHtkNavigationControl::CalculateRects( )
+	{
+	TAknLayoutRect mainPane;
+	TAknLayoutRect mainBlid2Pane;
+	TAknLayoutRect layoutWindow;
+	TAknLayoutText textLayout;
+	TRect mainRect;
+	TRect mainBlidRect;
+	TRect navigationRect;
+	TInt variety;
+	TInt mainvariety;
+
+	if( Layout_Meta_Data::IsLandscapeOrientation() )
+	    {
+	    variety = 1;
+	    mainvariety = 4;
+	    }
+	 else
+	 	{
+	 	variety = 0;
+	 	mainvariety = 0;
+	 	}
+	
+	/////////////// calculate signal strength  rect /////////////////////////
+
+	/*TRect mainPaneRect;
+	AknLayoutUtils::LayoutMetricsRect( AknLayoutUtils::EMainPane, mainPaneRect );*/
+    mainPane.LayoutRect( iView.ApplicationRect(),
+    							AknLayoutScalable_Apps::main_pane(mainvariety).LayoutLine() );
+    							
+	mainRect = mainPane.Rect(); 
+	
+    mainBlid2Pane.LayoutRect( mainRect,
+    							AknLayoutScalable_Apps::main_blid2_pane().LayoutLine() );
+    							
+	mainBlidRect = mainBlid2Pane.Rect(); 							
+    																				   
+    layoutWindow.LayoutRect( mainBlidRect, 
+    							AknLayoutScalable_Apps::blid2_navig_pane( 0 ).LayoutLine() );
+    							
+	navigationRect =  layoutWindow.Rect();   							
+
+	// Since the Hitchcock does draw at main pane, we take the reference to
+	// Navigation(main) pane's.
+	navigationRect.Move(navigationRect.iTl.iX,-navigationRect.iTl.iY);  
+    							
+	/////////////// calculate Navigation  rect /////////////////////////
+	layoutWindow.LayoutRect( navigationRect, 
+    							AknLayoutScalable_Apps::blid2_navig_pane_g1( variety ).LayoutLine() );
+	
+	iSignalStrengthRect = layoutWindow.Rect();
+	
+	/////////////// calculate Diastance  rect /////////////////////////
+	textLayout.LayoutText( navigationRect, 
+    							AknLayoutScalable_Apps::blid2_navig_pane_t2( variety ).LayoutLine() );
+    							
+	iDistanceRect = textLayout.TextRect();
+		    								
+	/////////////// calculate Landmark Name rect /////////////////////////
+	textLayout.LayoutText( navigationRect, 
+    							AknLayoutScalable_Apps::blid2_navig_pane_t1( variety ).LayoutLine() );
+	iLmkNameRect = textLayout.TextRect();
+	
+	/////////////// calculate Speed pane rects /////////////////////////	
+	layoutWindow.LayoutRect( navigationRect, 
+    							AknLayoutScalable_Apps::blid2_speed_pane( variety ).LayoutLine() );
+	
+	
+	TRect speedPaneRect = layoutWindow.Rect();
+	
+	layoutWindow.LayoutRect( speedPaneRect, 
+    							AknLayoutScalable_Apps::blid2_speed_pane_g1( 0 ).LayoutLine() );
+    
+    // Bg image	Rect						
+	iSpeedBgRect = 	layoutWindow.Rect();
+	
+	textLayout.LayoutText( speedPaneRect, 
+    							AknLayoutScalable_Apps::blid2_speed_pane_t2( 0 ).LayoutLine() );
+	
+	// Speed Rect
+	iSpeedRect = textLayout.TextRect();
+	
+	textLayout.LayoutText( speedPaneRect, 
+    							AknLayoutScalable_Apps::blid2_speed_pane_t1( 0 ).LayoutLine() );
+	
+	// Format Rect
+	iSpdFormatRect = textLayout.TextRect();
+	iSpdFormatRect.Move( 0, -6);	// For Text alignment
+	
+	
+	
+	/////////////// calculate Navigation ring pane rect /////////////////////////
+	layoutWindow.LayoutRect( navigationRect, 
+    							AknLayoutScalable_Apps::blid2_navig_ring_pane( variety ).LayoutLine() );
+	
+	
+	TRect navRingPaneRect = layoutWindow.Rect();
+	
+	layoutWindow.LayoutRect( navRingPaneRect, 
+    							AknLayoutScalable_Apps::blid2_navig_ring_pane_g1( 0 ).LayoutLine() );
+	
+	
+	iNavRingBgRect = layoutWindow.Rect();
+	
+	/////////////// calculate North rect /////////////////////////	
+	layoutWindow.LayoutRect( navRingPaneRect, 
+    							AknLayoutScalable_Apps::blid2_navig_ring_pane_g2( 0 ).LayoutLine() );
+	
+	iNorthRect = layoutWindow.Rect();							
+
+	/////////////// calculate Direction Ind rect /////////////////////////	
+	layoutWindow.LayoutRect( navRingPaneRect, 
+    							AknLayoutScalable_Apps::blid2_navig_ring_pane_g3( 0 ).LayoutLine() );
+    							
+	iDirectionIndRect = layoutWindow.Rect();
+	iDirectionIndRect.Move( 0, -15);	// For Proper alignment
+    							
+	
+	/////////////// calculate Accuracy Ring rect /////////////////////////	
+	layoutWindow.LayoutRect( navRingPaneRect, 
+    							AknLayoutScalable_Apps::blid2_navig_ring_pane_g4( 0 ).LayoutLine() );
+	
+	
+	iAccRingRect = layoutWindow.Rect();
+	/////////////// calculate Flag  rect /////////////////////////		
+	layoutWindow.LayoutRect( navRingPaneRect, 
+    							AknLayoutScalable_Apps::blid2_navig_ring_pane_g5( 0 ).LayoutLine() );
+	
+	iFlagRect = layoutWindow.Rect();
+	
+	}
+
+
+// ----------------------------------------------------------------------------
+// CHtkNavigationControl::SetAnchors
+// ----------------------------------------------------------------------------
+//
+void CHtkNavigationControl::SetAnchors( )
+	{
+	// Anchor for Signal strength image
+	TAlfRealPoint topPoint( iSignalStrengthRect.iTl );
+	TAlfRealPoint bottomPoint( iSignalStrengthRect.iBr );
+
+    iLayout->SetAnchor( EAlfAnchorTopLeft, 0, 
+        EAlfAnchorOriginLeft, EAlfAnchorOriginTop,
+        EAlfAnchorMetricAbsolute, EAlfAnchorMetricAbsolute,
+        TAlfTimedPoint( topPoint.iX, topPoint.iY  ) );
+    iLayout->SetAnchor( EAlfAnchorBottomRight, 0, 
+        EAlfAnchorOriginLeft, EAlfAnchorOriginTop,
+        EAlfAnchorMetricAbsolute, EAlfAnchorMetricAbsolute,
+        TAlfTimedPoint( bottomPoint.iX, bottomPoint.iY  ) );
+
+    // Anchor for Name
+	topPoint = iLmkNameRect.iTl;
+    bottomPoint = iLmkNameRect.iBr;
+    
+    iLayout->SetAnchor( EAlfAnchorTopLeft, 1, 
+        EAlfAnchorOriginLeft, EAlfAnchorOriginTop,
+        EAlfAnchorMetricAbsolute, EAlfAnchorMetricAbsolute,
+        TAlfTimedPoint( topPoint.iX, topPoint.iY ) );
+    iLayout->SetAnchor( EAlfAnchorBottomRight, 1, 
+        EAlfAnchorOriginLeft, EAlfAnchorOriginTop,
+        EAlfAnchorMetricAbsolute, EAlfAnchorMetricAbsolute,
+        TAlfTimedPoint( bottomPoint.iX, bottomPoint.iY ) );
+        
+    // Anchor for Distance
+    topPoint = iDistanceRect.iTl;
+    bottomPoint = iDistanceRect.iBr;
+    
+    iLayout->SetAnchor( EAlfAnchorTopLeft, 2, 
+        EAlfAnchorOriginLeft, EAlfAnchorOriginTop,
+        EAlfAnchorMetricAbsolute, EAlfAnchorMetricAbsolute,
+        TAlfTimedPoint( topPoint.iX, topPoint.iY ) );
+    iLayout->SetAnchor( EAlfAnchorBottomRight, 2, 
+        EAlfAnchorOriginLeft, EAlfAnchorOriginTop,
+        EAlfAnchorMetricAbsolute, EAlfAnchorMetricAbsolute,
+        TAlfTimedPoint( bottomPoint.iX, bottomPoint.iY ) );
+        
+    // Anchor for Speed Pane Bg Image
+    topPoint = iSpeedBgRect.iTl;
+    bottomPoint = iSpeedBgRect.iBr;
+    
+    iLayout->SetAnchor( EAlfAnchorTopLeft, 3, 
+        EAlfAnchorOriginLeft, EAlfAnchorOriginTop,
+        EAlfAnchorMetricAbsolute, EAlfAnchorMetricAbsolute,
+        TAlfTimedPoint( topPoint.iX, topPoint.iY ) );
+    iLayout->SetAnchor( EAlfAnchorBottomRight, 3, 
+        EAlfAnchorOriginLeft, EAlfAnchorOriginTop,
+        EAlfAnchorMetricAbsolute, EAlfAnchorMetricAbsolute,
+        TAlfTimedPoint( bottomPoint.iX, bottomPoint.iY ) );
+        
+    // Anchor for Speed 
+    topPoint = iSpeedRect.iTl;
+    bottomPoint = iSpeedRect.iBr;
+    
+    iLayout->SetAnchor( EAlfAnchorTopLeft, 4, 
+        EAlfAnchorOriginLeft, EAlfAnchorOriginTop,
+        EAlfAnchorMetricAbsolute, EAlfAnchorMetricAbsolute,
+        TAlfTimedPoint( topPoint.iX, topPoint.iY ) );
+    iLayout->SetAnchor( EAlfAnchorBottomRight, 4, 
+        EAlfAnchorOriginLeft, EAlfAnchorOriginTop,
+        EAlfAnchorMetricAbsolute, EAlfAnchorMetricAbsolute,
+        TAlfTimedPoint( bottomPoint.iX, bottomPoint.iY ) );
+    
+    // Anchor for Speed Format
+    topPoint = iSpdFormatRect.iTl;
+    bottomPoint = iSpdFormatRect.iBr;
+    
+    iLayout->SetAnchor( EAlfAnchorTopLeft, 5, 
+        EAlfAnchorOriginLeft, EAlfAnchorOriginTop,
+        EAlfAnchorMetricAbsolute, EAlfAnchorMetricAbsolute,
+        TAlfTimedPoint( topPoint.iX, topPoint.iY ) );
+    iLayout->SetAnchor( EAlfAnchorBottomRight, 5, 
+        EAlfAnchorOriginLeft, EAlfAnchorOriginTop,
+        EAlfAnchorMetricAbsolute, EAlfAnchorMetricAbsolute,
+        TAlfTimedPoint( bottomPoint.iX, bottomPoint.iY ) );
+        
+
+    // Anchor for Nav Ring Pane
+    topPoint = iNavRingBgRect.iTl;
+    bottomPoint = iNavRingBgRect.iBr;
+    
+    iLayout->SetAnchor( EAlfAnchorTopLeft, 6, 
+        EAlfAnchorOriginLeft, EAlfAnchorOriginTop,
+        EAlfAnchorMetricAbsolute, EAlfAnchorMetricAbsolute,
+        TAlfTimedPoint( topPoint.iX, topPoint.iY ) );
+    iLayout->SetAnchor( EAlfAnchorBottomRight, 6, 
+        EAlfAnchorOriginLeft, EAlfAnchorOriginTop,
+        EAlfAnchorMetricAbsolute, EAlfAnchorMetricAbsolute,
+        TAlfTimedPoint( bottomPoint.iX, bottomPoint.iY ) );
+
+    // Anchor for Acc Ring Pane
+    topPoint = iAccRingRect.iTl;
+    bottomPoint = iAccRingRect.iBr;
+    
+    iLayout->SetAnchor( EAlfAnchorTopLeft, 7, 
+        EAlfAnchorOriginLeft, EAlfAnchorOriginTop,
+        EAlfAnchorMetricAbsolute, EAlfAnchorMetricAbsolute,
+        TAlfTimedPoint( topPoint.iX, topPoint.iY ) );
+    iLayout->SetAnchor( EAlfAnchorBottomRight, 7, 
+        EAlfAnchorOriginLeft, EAlfAnchorOriginTop,
+        EAlfAnchorMetricAbsolute, EAlfAnchorMetricAbsolute,
+        TAlfTimedPoint( bottomPoint.iX, bottomPoint.iY ) );
+        
+	//Anchor for Visuals inside curve ring (iCurveDecLyt)
+    topPoint = iNavRingBgRect.iTl;
+    bottomPoint = iNavRingBgRect.iBr;
+        
+    iLayout->SetAnchor( EAlfAnchorTopLeft, 8, 
+        EAlfAnchorOriginLeft, EAlfAnchorOriginTop,
+        EAlfAnchorMetricAbsolute, EAlfAnchorMetricAbsolute,
+        TAlfTimedPoint( topPoint.iX, topPoint.iY ) );
+    iLayout->SetAnchor( EAlfAnchorBottomRight, 8, 
+        EAlfAnchorOriginLeft, EAlfAnchorOriginTop,
+        EAlfAnchorMetricAbsolute, EAlfAnchorMetricAbsolute,
+        TAlfTimedPoint( bottomPoint.iX, bottomPoint.iY ) );
+
+    // Anchor for Direction Ind Pane
+    topPoint = iDirectionIndRect.iTl;
+    bottomPoint = iDirectionIndRect.iBr;
+    
+    iLayout->SetAnchor( EAlfAnchorTopLeft, 9, 
+        EAlfAnchorOriginLeft, EAlfAnchorOriginTop,
+        EAlfAnchorMetricAbsolute, EAlfAnchorMetricAbsolute,
+        TAlfTimedPoint( topPoint.iX, topPoint.iY ) );
+    iLayout->SetAnchor( EAlfAnchorBottomRight, 9, 
+        EAlfAnchorOriginLeft, EAlfAnchorOriginTop,
+        EAlfAnchorMetricAbsolute, EAlfAnchorMetricAbsolute,
+        TAlfTimedPoint( bottomPoint.iX, bottomPoint.iY ) );
+        
+	}
+                              						 
+// ----------------------------------------------------------------------------
+// TimerCallBackFunction
+// ----------------------------------------------------------------------------
+//
+TInt TimerCallBackFunction(TAny* aPtr)
+    {
+    CHtkNavigationControl* ptr = static_cast<CHtkNavigationControl*>(aPtr);
+    if( ptr )
+        {
+        if( ptr->HasArrivedDestination() )
+            {
+            TRAP_IGNORE(ptr->ChangeFlagVisualImageL());
+            ptr->iTimerComplete = ETrue;
+            }
+        }
+    return 0;
+    }
+
+// ----------------------------------------------------------------------------
+// CHtkNavigationControl::CreateSignalTexturesL
+// ----------------------------------------------------------------------------
+//
+void CHtkNavigationControl::CreateSignalTexturesL( )
+	{
+	MAlfBitmapProvider* provider = NULL;	
+    // then create the bitmap provider
+    provider = iView.ImageLoaderUtils()->CreateImageLoaderL( KAknsIIDQgnGrafBlidSatSignal01, // svg icon skin constant id defiened in Aknsconstant.h file
+    												 			iView.ImagePathName(),        // mif file name with path.
+    												 			EMbmBlidQgn_graf_blid_sat_signal_01, // bitmap id defiened in mbg file
+    												 			EMbmBlidQgn_graf_blid_sat_signal_01_mask ); // bitmap mask id defiened in mbg file
+    												 
+	    												 
+	// now using that bitmap provider create the texture.
+	CAlfTexture & thumbTexture1 = iEnv.TextureManager().CreateTextureL( KAlfAutoGeneratedTextureId,
+                                                                provider,
+                                                                EAlfTextureFlagDefault );
+	iSignalTextures.Append( &thumbTexture1 );// At 0
+	
+
+    // then create the bitmap provider
+    provider = iView.ImageLoaderUtils()->CreateImageLoaderL( KAknsIIDQgnGrafBlidSatSignal02, // svg icon skin constant id defiened in Aknsconstant.h file
+    												 			iView.ImagePathName(),        // mif file name with path.
+    												 			EMbmBlidQgn_graf_blid_sat_signal_02, // bitmap id defiened in mbg file
+    												 			EMbmBlidQgn_graf_blid_sat_signal_02_mask ); // bitmap mask id defiened in mbg file
+    												 
+	    												 
+	// now using that bitmap provider create the texture.
+	CAlfTexture & thumbTexture2 = iEnv.TextureManager().CreateTextureL( KAlfAutoGeneratedTextureId,
+                                                                provider,
+                                                                EAlfTextureFlagDefault ); 	
+
+	iSignalTextures.Append( &thumbTexture2 );// At 1			                                                                  
+    // then create the bitmap provider
+    provider = iView.ImageLoaderUtils()->CreateImageLoaderL( KAknsIIDQgnGrafBlidSatSignal03, // svg icon skin constant id defiened in Aknsconstant.h file
+    												 			iView.ImagePathName(),        // mif file name with path.
+    												 			EMbmBlidQgn_graf_blid_sat_signal_03, // bitmap id defiened in mbg file
+    												 			EMbmBlidQgn_graf_blid_sat_signal_03_mask ); // bitmap mask id defiened in mbg file
+    												 
+	    												 
+	// now using that bitmap provider create the texture.
+	CAlfTexture & thumbTexture3 = iEnv.TextureManager().CreateTextureL( KAlfAutoGeneratedTextureId,
+                                                                provider,
+                                                                EAlfTextureFlagDefault );
+
+	iSignalTextures.Append( &thumbTexture3 );// At 2  
+	
+    // then create the bitmap provider
+    provider = iView.ImageLoaderUtils()->CreateImageLoaderL( KAknsIIDQgnGrafBlidSatSignal04, // svg icon skin constant id defiened in Aknsconstant.h file
+    												 			iView.ImagePathName(),        // mif file name with path.
+    												 			EMbmBlidQgn_graf_blid_sat_signal_04, // bitmap id defiened in mbg file
+    												 			EMbmBlidQgn_graf_blid_sat_signal_04_mask ); // bitmap mask id defiened in mbg file
+    												 
+	    												 
+	// now using that bitmap provider create the texture.
+	CAlfTexture & thumbTexture4 = iEnv.TextureManager().CreateTextureL( KAlfAutoGeneratedTextureId,
+                                                                provider,
+                                                                EAlfTextureFlagDefault );
+
+	iSignalTextures.Append( &thumbTexture4 );// At 3  
+	
+    // then create the bitmap provider
+    provider = iView.ImageLoaderUtils()->CreateImageLoaderL( KAknsIIDQgnGrafBlidSatSignal05, // svg icon skin constant id defiened in Aknsconstant.h file
+    												 			iView.ImagePathName(),        // mif file name with path.
+    												 			EMbmBlidQgn_graf_blid_sat_signal_05, // bitmap id defiened in mbg file
+    												 			EMbmBlidQgn_graf_blid_sat_signal_05_mask ); // bitmap mask id defiened in mbg file
+    												 
+	    												 
+	// now using that bitmap provider create the texture.
+	CAlfTexture & thumbTexture5 = iEnv.TextureManager().CreateTextureL( KAlfAutoGeneratedTextureId,
+                                                                provider,
+                                                                EAlfTextureFlagDefault );
+
+	iSignalTextures.Append( &thumbTexture5 );// At 4
+	}
+	
+// ----------------------------------------------------------------------------
+// CHtkNavigationControl::CreatePopupImgTextureL
+// ----------------------------------------------------------------------------
+//
+void CHtkNavigationControl::CreatePopupImgTextureL( )
+	{
+	MAlfBitmapProvider* provider = NULL;			
+    provider = iView.ImageLoaderUtils()->CreateImageLoaderL( KAknsIIDQgnGrafBlidUnavail, // svg icon skin constant id defiened in Aknsconstant.h file
+    												 iView.ImagePathName(),        // mif file name with path.
+    												 EMbmBlidQgn_graf_blid_unavail, // bitmap id defiened in mbg file
+    												 EMbmBlidQgn_graf_blid_unavail_mask ); // bitmap mask id defiened in mbg file
+	
+	// now using that bitmap provider create the texture.
+	CAlfTexture & thumbTexture = iEnv.TextureManager().CreateTextureL( KAlfAutoGeneratedTextureId,
+	                                                                provider,
+	                                                                EAlfTextureFlagDefault ); 
+		                                                                
+	iPopupImgTexture = &thumbTexture;
+	}
+	
+// ----------------------------------------------------------------------------
+// CHtkNavigationControl::CreateAccTextureL
+// ----------------------------------------------------------------------------
+//
+void CHtkNavigationControl::CreateAccTextureL( )
+	{
+	MAlfBitmapProvider* provider = NULL;
+	
+    provider = iView.ImageLoaderUtils()->CreateImageLoaderL( KAknsIIDQgnGrafBlidDetCircle, // svg icon skin constant id defiened in Aknsconstant.h file
+    												 iView.ImagePathName(),        // mif file name with path.
+    												 EMbmBlidQgn_graf_blid_det_circle, // bitmap id defiened in mbg file
+    												 EMbmBlidQgn_graf_blid_det_circle_mask ); // bitmap mask id defiened in mbg file
+	// now using that bitmap provider create the texture.
+	CAlfTexture & thumbTexture = iEnv.TextureManager().CreateTextureL( KAlfAutoGeneratedTextureId,
+	                                                                provider,
+	                                                                EAlfTextureFlagDefault ); 
+		                                                                  
+	iAccTexture = &thumbTexture;
+	}		
+
+// ----------------------------------------------------------------------------
+// CHtkNavigationControl::LaunchStylusPopupMenuL
+// ----------------------------------------------------------------------------
+//
+void CHtkNavigationControl::LaunchStylusPopupMenuL( TPointerEvent aPointerEvent )
+	{
+	if( !iMenu )
+		{
+		iMenu = CAknStylusPopUpMenu::NewL( &iView, aPointerEvent.iParentPosition, NULL );
+	    TInt resourceReaderId = R_BLID_DESTINATION_STYLUS_MENU;
+	    TResourceReader reader;
+	    CCoeEnv* env = iView.CoeEnv(); 
+	    env->CreateResourceReaderLC( reader , resourceReaderId );
+	    iMenu->ConstructFromResourceL( reader );
+	    CleanupStack::PopAndDestroy(); // reader
+		}
+		
+   if(iView.IsLmFeatureAvailable())
+        {
+        iMenu->SetItemDimmed(EBlidCmdWaypoint,ETrue);
+        if(!iIsDestinationSet)
+            {
+            iMenu->SetItemDimmed(EBlidCmdStopNavigation,ETrue);
+            if(!iView.IsLmAvailableL())
+                {
+                iMenu->SetItemDimmed(EBlidCmdLmk,ETrue);
+                }
+            else
+                {
+                iMenu->SetItemDimmed(EBlidCmdLmk,EFalse);
+                }                        
+            }
+        else
+            {
+            iMenu->SetItemDimmed(EBlidCmdStopNavigation,EFalse);
+            if(!iView.IsLmAvailableL())
+                {
+                iMenu->SetItemDimmed(EBlidCmdLmk,ETrue);
+                }                    
+            else
+                {
+                iMenu->SetItemDimmed(EBlidCmdLmk,EFalse);
+                }                        
+            }                    
+        }
+    else
+        {
+        iMenu->SetItemDimmed(EBlidCmdLmk,ETrue);
+        if(!iIsDestinationSet)
+            {
+            iMenu->SetItemDimmed(EBlidCmdStopNavigation,ETrue);
+            if(!iView.IsWpAvailable())
+                {
+                iMenu->SetItemDimmed(EBlidCmdWaypoint,ETrue);
+                }
+            else
+                {
+                iMenu->SetItemDimmed(EBlidCmdWaypoint,EFalse);
+                }                        
+            }
+        else
+            {
+            iMenu->SetItemDimmed(EBlidCmdStopNavigation,EFalse);
+            if(!iView.IsWpAvailable())
+                {
+                iMenu->SetItemDimmed(EBlidCmdWaypoint,ETrue);
+                }
+            else
+                {
+                iMenu->SetItemDimmed(EBlidCmdWaypoint,EFalse);
+                }                        
+            }                                    
+        }		
+    iMenu->SetPosition( aPointerEvent.iPosition );
+    iMenu->ShowMenu();	
+    }
+    
+//End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/basiclocationinfodisplay/blid/ui/src/CHtkTripMeterControl.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,2149 @@
+/*
+* Copyright (c) 2007-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:  Blid application Tripmeter view's control class definition.
+*
+*/
+
+
+// SYSTEM INCLUDES
+#include <coemain.h>
+#include <akncontext.h> 
+#include <aknnavide.h> 
+#include <eikspane.h> 
+#include <StringLoader.h> 
+#include <akntitle.h> 
+#include <akntabgrp.h>
+#include <blid.mbg>
+#include <blid.rsg>
+#include <aknlayoutscalable_avkon.cdl.h>
+#include <centralrepository.h>
+#include <aknnotedialog.h>
+#include <aknlayoutscalable_apps.cdl.h>
+#include <layoutmetadata.cdl.h>
+#include <AknUtils.h>
+#include <AknsConstants.h>
+
+#include <alf/alfenv.h>
+#include <alf/alfanchorlayout.h>
+#include <alf/alftextvisual.h>
+#include <alf/alfborderbrush.h>
+#include <alf/alfbrusharray.h>
+#include <alf/alfevent.h>
+#include <alf/alftransformation.h>
+#include <alf/alfimagevisual.h>
+#include <alf/alftexture.h>
+#include <alf/alfroster.h>
+#include <alf/alflinevisual.h>
+#include <alf/alfcurvepath.h>
+#include <alf/alfcurvepathlayout.h>
+#include <alf/alfimagebrush.h>
+#include <alf/alfframebrush.h>
+#include <alf/alfdecklayout.h>
+#include <alf/alftextstyle.h>
+#include <alf/alfutil.h>
+#include <alf/alfimageloaderutil.h>
+// USER INCLUDES
+#include "CBlidBaseView.h"
+#include "CBlidEng.h"
+#include "CHtkTripMeterControl.h"
+#include "Blid.hrh"
+#include "CHtkTripMeterControl.h"
+#include "MBlidRouter.h"
+#include "MBlidSettings.h"
+#include "MBlidLocation.h"
+#include "e32const.h"
+#include "Blidutils.h"
+#include "bliduiconsts.h"
+#include "BlidSettingsCrkeys.h"
+#include "Debug.h"
+
+_LIT( KText1,  " " );
+_LIT( KDistanceFormat,"%.1f" );
+const TInt KTimerInterval = 200000;
+
+// ================= MEMBER FUNCTIONS =======================
+// ---------------------------------------------------------
+// CHtkTripMeterControl::NewL()
+// ---------------------------------------------------------
+//
+CHtkTripMeterControl* CHtkTripMeterControl::NewL(CAlfEnv& aEnv,
+				    							MKeyProcessor& aKeyProcessor,
+		                                        MObjectProvider* /*aParent*/,
+				                                const TRect& aRect,
+		                                        MBlidLocation* aLocation,
+		                                        MBlidRouter* aRouter,
+		                                        CBlidEng& aEngine,
+		                                        CBlidBaseView& aView)
+    {
+	CHtkTripMeterControl* self =
+		new (ELeave) CHtkTripMeterControl( aEnv, aKeyProcessor, *aRouter, aView, aEngine );
+	CleanupStack::PushL(self);
+	self->ConstructL(aEnv, aRect, aLocation, aEngine );
+    CleanupStack::Pop( self ); // self
+	return self;
+    }
+
+
+// ---------------------------------------------------------
+//
+//CHtkTripMeterControl::CHtkTripMeterControl()
+// ---------------------------------------------------------
+//
+CHtkTripMeterControl::CHtkTripMeterControl(CAlfEnv& aEnv,
+					    					MKeyProcessor& /*aKeyProcessor*/,
+				                            MBlidRouter& aRouter,
+					                        CBlidBaseView& aView,
+					                        CBlidEng& aEngine )
+    : CAlfControl( ),iRouter( aRouter ),iView( aView ), iEngine(aEngine),iEnv(aEnv)
+
+    {
+    }
+
+
+// ---------------------------------------------------------
+// CHtkTripMeterControl::ConstructL()
+// ---------------------------------------------------------
+//
+void CHtkTripMeterControl::ConstructL( CAlfEnv& aEnv,
+										const TRect& /*aRect*/,
+					                    MBlidLocation* aLocation,
+					                    CBlidEng& aEngine )
+    {
+    
+    CAlfControl::ConstructL( aEnv );
+    
+    iLocation = aLocation ;
+    iSpeedCount = 0;
+    iSettingsModel = aEngine.SettingsModel();
+    
+    iDurationFormatLong = CEikonEnv::Static()->AllocReadResourceL( 
+                      R_QTN_TIME_DURAT_LONG_WITH_ZERO );
+
+    iSpeedFormatKmph = CEikonEnv::Static()->AllocReadResourceL( R_BLID_METRIC_SPEED_FORMAT );
+    
+    iSpeedFormatMph = CEikonEnv::Static()->AllocReadResourceL( R_BLID_IMPERIAL_SPEED_FORMAT );                       
+
+		
+    /// item's formats
+    iDataBlank = StringLoader::LoadL( R_BLID_BLANK, CEikonEnv::Static() );    
+	iTripDistance = HBufC::NewL( KBlidLBItemMaxLen );
+	iOdometerDistance = HBufC::NewL( KBlidLBItemMaxLen );
+	iImagePath = HBufC::NewL( iEnv.TextureManager().ImagePath().Length() + 1 );
+	iImagePath->Des().Copy( iEnv.TextureManager().ImagePath() );
+	
+	iRepository = CRepository::NewL( KCRUidBlidOdometerSettings );
+	TInt error = iRepository->Get( KBlidOdometerSettingsValue, iLastodometerValue );
+	if( error == KErrNone )
+		{
+		iOdoValueToStore = iLastodometerValue;
+		FormatOdometerDistance( iLastodometerValue );
+		}
+
+    TInt textStyleId = iEnv.TextStyleManager().
+        CreatePlatformTextStyleL( EAknLogicalFontDigitalFont, 
+                                  EAlfTextStyleSmall );
+    iStyle1 = iEnv.TextStyleManager().TextStyle( textStyleId );                                  
+    iStyle1->SetBold( ETrue );
+   	iStyle1->SetTextSizeInPixels( 22, ETrue );
+
+    // Create a single text visual. The pointer to the visual is stored
+    // as a member variable for later access.
+	CreateNaviPaneL( EFalse );
+    ActivateTabL( *iDecoratedTabGroup, EBlidNavigationView );
+    
+    iIsLessThanInitial = EFalse;
+    iSTripDimmed = EFalse;
+    
+    CalculateRects();
+    iTripLayout = CAlfAnchorLayout::AddNewL( *this );
+    CreateTripVisualsL();// ordinal 0 to 8
+	CreateSpeedVisualsL();// ordinal 9 to 17
+	CreateSignalTexturesL();
+	CreatePopupImgTextureL();
+	// image visual for signal strength
+	iImageVisual = CAlfImageVisual::AddNewL(*this, iTripLayout);// ordinal 18
+	
+	LaunchDeviceNotAvlNoteL( );
+	SetAnchors();
+    
+    // Make the dial in zeroth position
+    iNextAngle = -( ( 240.0 / iMaxScale ) * iCurrSpeed ) + 30;  	
+	RotateSpeedDialL( iPrevAngle, iNextAngle );
+	iPrevAngle = iNextAngle;	      
+	isDeviceUnavailableDisplayed = EFalse;	      
+	iIsDownPressed = EFalse;	      
+    }
+
+
+// ---------------------------------------------------------
+// CHtkTripMeterControl::CreateSpeedVisualsL()
+// ---------------------------------------------------------
+//
+void CHtkTripMeterControl::CreateSpeedVisualsL()
+	{
+	TInt j = 0;
+	HBufC* lTextSpeed = HBufC::NewLC( 20 );
+	
+	for ( TInt i = 0; i < 9; i++ )
+		{
+		iMileVisual[i] = CAlfTextVisual::AddNewL( *this, iTripLayout );// ordinal 9 to 17
+		lTextSpeed->Des().Zero();
+		lTextSpeed->Des().AppendNum( j );
+		j = j + 5;
+		iMileVisual[i]->SetTextL( *lTextSpeed );
+		iMileVisual[i]->SetTextStyle( iStyle1->Id() );
+		iMileVisual[i]->SetColor( KRgbWhite );
+		iMileVisual[i]->SetAlign( EAlfAlignHCenter, EAlfAlignVCenter );
+		iMileVisual[i]->SetPadding(TAlfBoxMetric(TAlfMetric(.04, EAlfUnitNormalized)));			
+		}
+
+	iMaxScale = j - 5;		
+	CleanupStack::PopAndDestroy( lTextSpeed );
+	}
+
+// ----------------------------------------------------
+// CHtkTripMeterControl::CreateGlobeVisualL
+// ----------------------------------------------------
+//
+void CHtkTripMeterControl::CreatePopUpVisualL( )
+	{
+	// code to load svg icon
+	MAlfBitmapProvider* provider = NULL;
+	
+	// first creste the image loader utils and then call SetSize.	
+    iView.ImageLoaderUtils()->SetSize( TAlfRealSize( 60, 60 ) );
+    
+    // then create the bitmap provider  
+    provider = iView.ImageLoaderUtils()->CreateImageLoaderL( KAknsIIDQgnGrafBlidSearching, // svg icon skin constant id defiened in Aknsconstant.h file
+    												 iView.ImagePathName(),        // mif file name with path.
+    												 EMbmBlidQgn_graf_blid_searching_01, // bitmap id defiened in mbg file
+    												 EMbmBlidQgn_graf_blid_searching_01_mask ); // bitmap mask id defiened in mbg file
+	// now using that bitmap provider create the texture.
+	CAlfTexture & texture1 = iEnv.TextureManager().CreateTextureL( KAlfAutoGeneratedTextureId,
+	                                                                provider,
+	                                                                EAlfTextureFlagDefault ); 
+    iPopupTextures.Append(&texture1);
+    												 
+    // then create the bitmap provider  
+    provider = iView.ImageLoaderUtils()->CreateImageLoaderL( KAknsIIDQgnGrafBlidSearching, // svg icon skin constant id defiened in Aknsconstant.h file
+    												 iView.ImagePathName(),        // mif file name with path.
+    												 EMbmBlidQgn_graf_blid_searching_02, // bitmap id defiened in mbg file
+    												 EMbmBlidQgn_graf_blid_searching_02_mask ); // bitmap mask id defiened in mbg file
+	// now using that bitmap provider create the texture.
+	CAlfTexture & texture2 = iEnv.TextureManager().CreateTextureL( KAlfAutoGeneratedTextureId,
+	                                                                provider,
+	                                                                EAlfTextureFlagDefault ); 
+    iPopupTextures.Append(&texture2);
+    
+    // then create the bitmap provider  
+    provider = iView.ImageLoaderUtils()->CreateImageLoaderL( KAknsIIDQgnGrafBlidSearching, // svg icon skin constant id defiened in Aknsconstant.h file
+    												 iView.ImagePathName(),        // mif file name with path.
+    												 EMbmBlidQgn_graf_blid_searching_03, // bitmap id defiened in mbg file
+    												 EMbmBlidQgn_graf_blid_searching_03_mask ); // bitmap mask id defiened in mbg file
+	// now using that bitmap provider create the texture.
+	CAlfTexture & texture3 = iEnv.TextureManager().CreateTextureL( KAlfAutoGeneratedTextureId,
+	                                                                provider,
+	                                                                EAlfTextureFlagDefault ); 
+    iPopupTextures.Append(&texture3);
+    
+    // then create the bitmap provider  
+    provider = iView.ImageLoaderUtils()->CreateImageLoaderL( KAknsIIDQgnGrafBlidSearching, // svg icon skin constant id defiened in Aknsconstant.h file
+    												 iView.ImagePathName(),        // mif file name with path.
+    												 EMbmBlidQgn_graf_blid_searching_04, // bitmap id defiened in mbg file
+    												 EMbmBlidQgn_graf_blid_searching_04_mask ); // bitmap mask id defiened in mbg file
+	// now using that bitmap provider create the texture.
+	CAlfTexture & texture4 = iEnv.TextureManager().CreateTextureL( KAlfAutoGeneratedTextureId,
+	                                                                provider,
+	                                                                EAlfTextureFlagDefault ); 
+    iPopupTextures.Append(&texture4);
+    
+    // then create the bitmap provider  
+    provider = iView.ImageLoaderUtils()->CreateImageLoaderL( KAknsIIDQgnGrafBlidSearching, // svg icon skin constant id defiened in Aknsconstant.h file
+    												 iView.ImagePathName(),        // mif file name with path.
+    												 EMbmBlidQgn_graf_blid_searching_05, // bitmap id defiened in mbg file
+    												 EMbmBlidQgn_graf_blid_searching_05_mask ); // bitmap mask id defiened in mbg file
+	// now using that bitmap provider create the texture.
+	CAlfTexture & texture5 = iEnv.TextureManager().CreateTextureL( KAlfAutoGeneratedTextureId,
+	                                                                provider,
+	                                                                EAlfTextureFlagDefault ); 
+    iPopupTextures.Append(&texture5);
+    
+    // then create the bitmap provider  
+    provider = iView.ImageLoaderUtils()->CreateImageLoaderL( KAknsIIDQgnGrafBlidSearching, // svg icon skin constant id defiened in Aknsconstant.h file
+    												 iView.ImagePathName(),        // mif file name with path.
+    												 EMbmBlidQgn_graf_blid_searching_06, // bitmap id defiened in mbg file
+    												 EMbmBlidQgn_graf_blid_searching_06_mask ); // bitmap mask id defiened in mbg file
+	// now using that bitmap provider create the texture.
+	CAlfTexture & texture6 = iEnv.TextureManager().CreateTextureL( KAlfAutoGeneratedTextureId,
+	                                                                provider,
+	                                                                EAlfTextureFlagDefault ); 
+    iPopupTextures.Append(&texture6);
+    
+    // then create the bitmap provider  
+    provider = iView.ImageLoaderUtils()->CreateImageLoaderL( KAknsIIDQgnGrafBlidSearching, // svg icon skin constant id defiened in Aknsconstant.h file
+    												 iView.ImagePathName(),        // mif file name with path.
+    												 EMbmBlidQgn_graf_blid_searching_07, // bitmap id defiened in mbg file
+    												 EMbmBlidQgn_graf_blid_searching_07_mask ); // bitmap mask id defiened in mbg file
+	// now using that bitmap provider create the texture.
+	CAlfTexture & texture7 = iEnv.TextureManager().CreateTextureL( KAlfAutoGeneratedTextureId,
+	                                                                provider,
+	                                                                EAlfTextureFlagDefault ); 
+    iPopupTextures.Append(&texture7);
+    
+    // then create the bitmap provider  
+    provider = iView.ImageLoaderUtils()->CreateImageLoaderL( KAknsIIDQgnGrafBlidSearching, // svg icon skin constant id defiened in Aknsconstant.h file
+    												 iView.ImagePathName(),        // mif file name with path.
+    												 EMbmBlidQgn_graf_blid_searching_08, // bitmap id defiened in mbg file
+    												 EMbmBlidQgn_graf_blid_searching_08_mask ); // bitmap mask id defiened in mbg file
+	// now using that bitmap provider create the texture.
+	CAlfTexture & texture8 = iEnv.TextureManager().CreateTextureL( KAlfAutoGeneratedTextureId,
+	                                                                provider,
+	                                                                EAlfTextureFlagDefault ); 
+    iPopupTextures.Append(&texture8);
+	}
+	
+// ---------------------------------------------------------
+// CHtkTripMeterControl::ChangeSpeedometerScaleL()
+// ---------------------------------------------------------
+//
+void CHtkTripMeterControl::ChangeSpeedometerScaleL()
+	{
+	TInt j = 0;
+	HBufC* lTextSpeed = HBufC::NewLC( 20 );
+	for ( TInt i = 0; i < 9; i++ )
+		{
+		lTextSpeed->Des().Zero();
+		if( iCurrSpeed > 40 &&
+			iCurrSpeed <= 200 )
+			{
+			lTextSpeed->Des().AppendNum( j );
+			j = j + 25;	
+			}
+		else if( iCurrSpeed <= 40 )
+			{
+			lTextSpeed->Des().AppendNum( j );			
+			j = j + 5;		
+			}
+		iMileVisual[i]->SetTextL( *lTextSpeed );
+		}
+		
+	if( iCurrSpeed > 40 &&
+		iCurrSpeed <= 200 )
+		{
+		iMaxScale = j - 25;
+		}
+	else if( iCurrSpeed < 40 )
+		{
+		iMaxScale = j - 5;
+		}
+
+	CleanupStack::PopAndDestroy( lTextSpeed );
+
+	}
+
+// ---------------------------------------------------------
+// CHtkTripMeterControl::CreateSpeedFormatsL()
+// ---------------------------------------------------------
+//
+void CHtkTripMeterControl::CreateSpeedFormatsL()
+	{
+	iSpeedFormatVisual = CAlfTextVisual::AddNewL( *this, iTripLayout );// ordinal 18
+	TInt typefaceStyleId = iEnv.TextStyleManager().CreatePlatformTextStyleL(EAknLogicalFontPrimarySmallFont, EAlfTextStyleSmall);
+	
+	if ( iSettingsModel->UnitOfMeasurement() == EUnitsMetric )
+		{
+		iSpeedFormatVisual->SetTextL( *iSpeedFormatKmph );		
+		}
+	else
+		{
+		iSpeedFormatVisual->SetTextL( *iSpeedFormatMph );	
+		}
+	iSpeedFormatVisual->SetTextStyle( typefaceStyleId );
+	iSpeedFormatVisual->SetColor( KRgbWhite );
+	iSpeedFormatVisual->SetAlign( EAlfAlignHCenter, EAlfAlignVCenter );	
+	iSpeedFormatVisual->SetPadding(TAlfBoxMetric(TAlfMetric(.03, EAlfUnitNormalized)));
+	}
+
+// ---------------------------------------------------------
+// CHtkTripMeterControl::CreateTripVisualsL()
+// ---------------------------------------------------------
+//
+void CHtkTripMeterControl::CreateTripVisualsL( )
+	{
+	MAlfBitmapProvider* provider = NULL;
+	
+	iBigTripVisual = CAlfImageVisual::AddNewL(*this, iTripLayout);// ordinal 0
+
+    // create the bitmap provider
+    iView.ImageLoaderUtils()->SetSize( iBigTripRect.Size() );
+    provider = iView.ImageLoaderUtils()->CreateImageLoaderL( KAknsIIDQgnGrafBlidTpmeter, // svg icon skin constant id defiened in Aknsconstant.h file
+    												 			iView.ImagePathName(),        // mif file name with path.
+    												 			EMbmBlidQgn_graf_blid_tpmeter, // bitmap id defiened in mbg file
+    												 			EMbmBlidQgn_graf_blid_tpmeter_mask ); // bitmap mask id defiened in mbg file
+    												 
+	    												 
+	// now using that bitmap provider create the texture.
+	CAlfTexture & tripTexture1 = iEnv.TextureManager().CreateTextureL( KAlfAutoGeneratedTextureId,
+                                                                provider,
+                                                                EAlfTextureFlagDefault ); 
+		                                                                  
+	iBigTripVisual->SetImage(TAlfImage(tripTexture1));// big trip
+
+	iTripDeckVisual = CAlfImageVisual::AddNewL(*this, iTripLayout);// ordinal 1	
+	
+    iView.ImageLoaderUtils()->SetSize( iTripDeckRect.Size() ); 
+    provider = iView.ImageLoaderUtils()->CreateImageLoaderL( KAknsIIDQgnGrafBlidInfo, // svg icon skin constant id defiened in Aknsconstant.h file
+    												 			iView.ImagePathName(),        // mif file name with path.
+    												 			EMbmBlidQgn_graf_blid_info, // bitmap id defiened in mbg file
+    												 			EMbmBlidQgn_graf_blid_info_mask ); // bitmap mask id defiened in mbg file
+    												 
+	    												 
+	// now using that bitmap provider create the texture.
+	CAlfTexture & tripTexture2 = iEnv.TextureManager().CreateTextureL( KAlfAutoGeneratedTextureId,
+                                                                provider,
+                                                                EAlfTextureFlagDefault ); 
+			                                                                  
+	iTripDeckVisual->SetImage( TAlfImage( tripTexture2 ) );//trip table
+
+    iTripMeter = CAlfTextVisual::AddNewL( *this, iTripLayout );// ordinal 2
+	TRgb rgb;
+	AknsUtils::GetCachedColor ( AknsUtils::SkinInstance(),
+								rgb,
+								KAknsIIDQsnTextColors,
+								EAknsCIQsnTextColorsCG1 
+								);
+								
+    iTripMeter->SetColor( rgb );
+    iTripMeter->SetClipping( EFalse );
+	iTripMeter->SetTextStyle( iStyle1->Id() );	
+	iTripMeter->SetAlign( EAlfAlignHCenter, EAlfAlignVCenter );
+
+	iOdoDeckVisual = CAlfImageVisual::AddNewL(*this, iTripLayout );// ordinal 3
+	
+    iView.ImageLoaderUtils()->SetSize( iOdoDeckRect.Size() ); 
+    provider = iView.ImageLoaderUtils()->CreateImageLoaderL( KAknsIIDQgnGrafBlidInfo, // svg icon skin constant id defiened in Aknsconstant.h file
+    												 			iView.ImagePathName(),        // mif file name with path.
+    												 			EMbmBlidQgn_graf_blid_info, // bitmap id defiened in mbg file
+    												 			EMbmBlidQgn_graf_blid_info_mask ); // bitmap mask id defiened in mbg file
+    												 
+	    												 
+	// now using that bitmap provider create the texture.
+	CAlfTexture & tripTexture6 = iEnv.TextureManager().CreateTextureL( KAlfAutoGeneratedTextureId,
+                                                                provider,
+                                                                EAlfTextureFlagDefault ); 
+                                                                	
+	iOdoDeckVisual->SetImage( TAlfImage( tripTexture6 ) );//odometer table
+	
+    iOdoMeter = CAlfTextVisual::AddNewL( *this, iTripLayout );// ordinal 4
+	iOdoMeter->SetColor( rgb );
+    iOdoMeter->SetClipping( EFalse );
+	iOdoMeter->SetAlign( EAlfAlignHCenter, EAlfAlignVCenter );
+	iOdoMeter->SetTextStyle( iStyle1->Id() );
+	iOdoMeter->SetTextL( *iOdometerDistance );
+	
+	// Speed Format
+	CreateSpeedFormatsL();// ordinal 5
+
+	iTripDialVisual = CAlfImageVisual::AddNewL(*this, iTripLayout );// ordinal 6
+	
+    iView.ImageLoaderUtils()->SetSize( iTripDialRect.Size() ); 
+    provider = iView.ImageLoaderUtils()->CreateImageLoaderL( KAknsIIDQgnGrafBlidTpPointer, // svg icon skin constant id defiened in Aknsconstant.h file
+    												 			iView.ImagePathName(),        // mif file name with path.
+    												 			EMbmBlidQgn_graf_blid_tp_pointer, // bitmap id defiened in mbg file
+    												 			EMbmBlidQgn_graf_blid_tp_pointer_mask ); // bitmap mask id defiened in mbg file
+    												 
+	    												 
+	// now using that bitmap provider create the texture.
+	CAlfTexture & tripTexture4 = iEnv.TextureManager().CreateTextureL( KAlfAutoGeneratedTextureId,
+                                                                provider,
+                                                                EAlfTextureFlagDefault ); 
+		                                                                 
+	iTripDialVisual->SetImage( TAlfImage( tripTexture4 ) );//pointer
+	
+	iTripTimeVisual = CAlfImageVisual::AddNewL(*this, iTripLayout );// ordinal 7	
+
+    iView.ImageLoaderUtils()->SetSize( iClockImageRect.Size() ); 
+    provider = iView.ImageLoaderUtils()->CreateImageLoaderL( KAknsIIDQgnGrafBlidTime, // svg icon skin constant id defiened in Aknsconstant.h file
+    												 			iView.ImagePathName(),        // mif file name with path.
+    												 			EMbmBlidQgn_graf_blid_time, // bitmap id defiened in mbg file
+    												 			EMbmBlidQgn_graf_blid_time_mask ); // bitmap mask id defiened in mbg file
+    												 
+	    												 
+	// now using that bitmap provider create the texture.
+	CAlfTexture & tripTexture7 = iEnv.TextureManager().CreateTextureL( KAlfAutoGeneratedTextureId,
+                                                                provider,
+                                                                EAlfTextureFlagDefault ); 
+	
+	iTripTimeVisual->SetImage( TAlfImage( tripTexture7 ) );//clock
+	
+	// trip time text	
+    iTriptime = CAlfTextVisual::AddNewL( *this, iTripLayout );// ordinal 8
+    iTriptime->SetColor( rgb );
+    iTriptime->SetClipping( EFalse );
+	iTriptime->SetAlign( EAlfAlignHCenter, EAlfAlignVCenter );
+	iTriptime->SetTextStyle( iStyle1->Id() );
+	}
+
+// ---------------------------------------------------------
+// CHtkTripMeterControl::~CHtkTripMeterControl()
+// ---------------------------------------------------------
+//
+CHtkTripMeterControl::~CHtkTripMeterControl()
+    {
+    delete iPeriodic;
+    iPeriodic = NULL;
+    iPopupTextures.Reset();
+    iPopupTextures.Close();
+	delete iDecoratedTabGroup;
+	delete iDurationFormatLong;
+	delete iDataBlank;
+	delete iOdometerDistance;
+	delete iTripDistance;
+	delete iSpeedFormatKmph;
+	delete iSpeedFormatMph;
+	delete iRepository;
+	delete iImagePath;
+	iSignalTextures.Reset();
+    iSignalTextures.Close();	
+    }
+
+
+// ----------------------------------------------------------------------------
+// CHtkTripMeterControl::UpdateL
+// ----------------------------------------------------------------------------
+//
+void CHtkTripMeterControl::UpdateL()
+    {
+    if((iEngine.AppMode() == CBlidEng::EAppForeground) && 
+       (iSettingsModel->GetBacklightOption() == EBlidBackLightOnDuringNavigation) && !iView.IsSettingsViewActive() )
+        {
+        User::ResetInactivityTime();        
+        }
+    
+	if( iLocation->IsGPSDataAvailable() )
+		{
+		isDeviceUnavailableDisplayed = EFalse;
+		if( iView.CBAPtr() )
+			{
+			iView.CBAPtr()->SetCommandSetL( R_BLID_SOFTKEYS_OPTIONS_EXIT__CONTEXTOPTIONS );
+			iView.CBAPtr()->DrawDeferred();
+			}			    
+		TInt satCount = 0;
+		iLocation->GetNumOfSatellitesL( satCount );
+		DisplaySatelliteSignalStrength( satCount );
+		if( !iSTripDimmed )
+			{
+        	iTripLayout->SetOpacity( 1.0 );				
+			}
+        iPopUpLayout->SetOpacity( 0.0 );
+		}
+	else
+		{
+        TFileName imagepathname;		
+		DisplaySatelliteSignalStrength( 0 );
+        iTripLayout->SetOpacity( 0.3 );
+        iPopUpLayout->SetOpacity( 1.0 );
+		// for MSK enabled phone add MSK        
+		if( iView.CBAPtr() )
+			{
+			iView.CBAPtr()->SetCommandSetL( R_BLID_OPTION_INFO_EXIT );
+			iView.CBAPtr()->DrawDeferred();
+			}
+		if( iPeriodic )
+		        {
+		        delete iPeriodic;
+		        iPeriodic = NULL;
+		        }				    
+		if( iLocation->WaitingGPSData() )
+		    {
+		    isSatelliteInfoLaunch = ETrue;
+		    if(KNumOfSearchIcon != iPopupTextures.Count())
+		    	CreatePopUpVisualL( );
+			HBufC* noteText = StringLoader::LoadLC( R_BLID_STARTUP_NAVITEXT_SEARCHING_GPS_SATELLITES, CEikonEnv::Static() );	
+			iPopUpMsg->SetTextL( *noteText );
+            iDisplayIcon = 1;
+		    iPeriodic = CPeriodic::NewL(0); // neutral priority 
+            iPeriodic->Start( TTimeIntervalMicroSeconds32( KTimerInterval ),
+                              TTimeIntervalMicroSeconds32( KTimerInterval ),
+                              TCallBack(Tick, this));
+            UpdateVisualImage();   
+			CleanupStack::PopAndDestroy(noteText); //noteText
+		    }
+        else
+            {
+            isSatelliteInfoLaunch = EFalse;
+		    HBufC* noteText = StringLoader::LoadLC( R_BLID_ERROR_NO_GPS_DEVICE, CEikonEnv::Static() );	
+			iPopUpMsg->SetTextL( *noteText );
+	    	iPopImage->SetImage(TAlfImage( *iPopupImgTexture ) );
+			CleanupStack::PopAndDestroy(noteText); //noteText        	
+				if(!isDeviceUnavailableDisplayed)
+				{
+					CHWRMLight* aHWRMLight = CHWRMLight::NewL();
+					isDeviceUnavailableDisplayed = ETrue;
+					if(aHWRMLight->LightStatus(CHWRMLight::EPrimaryDisplay) != CHWRMLight::ELightOn)
+					{
+						User::ResetInactivityTime();
+						aHWRMLight->LightOnL(CHWRMLight::EPrimaryDisplay);
+						aHWRMLight->ReleaseLight(CHWRMLight::EPrimaryDisplay);
+            }		    
+		        	delete aHWRMLight;	
+				}
+            }	       	
+		}	   	
+		
+	if( iLocation->HasTripStarted() ||
+		iLocation->IsTripCleared() ||
+		iLocation->IsTripReset() )
+		{
+	    SetTRipMeterValueL();
+	    SetOdoMeterValueL();
+	    SetTripTimeL();
+	    SetTripSpeed();
+		}
+    // logic for rotating the dial
+    if( iLocation->HasTripStarted() && 
+    	!iLocation->IsTripCleared() && 
+        !iLocation->IsTripReset() && 
+        iLocation->IsGPSDataAvailable() )
+	    {
+	    // Calculate Current Speed
+	    if ( iSettingsModel->UnitOfMeasurement() == EUnitsMetric )
+		    {
+	    	iCurrSpeed = ( iLocation->GetTripMaxSpeed() ) * KSpeedConvertion;
+		    }
+		else
+			{
+			iCurrSpeed = ( iLocation->GetTripMaxSpeed() ) * KSpeedConvertion;
+			iCurrSpeed *= KKilometreToMiles;
+			}		    
+		// Check if scale has to be changed
+		if( iCurrSpeed > 40 && iMaxScale == 40 )
+			{
+			ChangeSpeedometerScaleL();			
+			}
+		if( iCurrSpeed <= 40 && iMaxScale == 200 )
+			{
+			ChangeSpeedometerScaleL();			
+			}
+		// Calculate Next Angle	
+		iNextAngle = -( ( 240.0 / iMaxScale ) * iCurrSpeed ) + 30;
+		// Rotate dial  	
+		RotateSpeedDialL( iPrevAngle, iNextAngle );
+		// Set prev angle
+		iPrevAngle = iNextAngle;
+				
+	    }
+    }
+
+// ---------------------------------------------------------
+// CHtkTripMeterControl::Tick()
+// ---------------------------------------------------------
+//
+TInt CHtkTripMeterControl::Tick(TAny* aObject)
+    {
+    ((CHtkTripMeterControl*)aObject)->UpdateVisualImage(); // cast, and call non-static function
+
+    return KErrNone;
+    }
+
+// ---------------------------------------------------------
+// CHtkTripMeterControl::UpdateVisualImage
+// ---------------------------------------------------------
+//
+void CHtkTripMeterControl::UpdateVisualImage()
+	{
+	if( isSatelliteInfoLaunch )
+		{
+	    if(KNumOfSearchIcon > iDisplayIcon)
+	        {
+	        iDisplayIcon++;
+	        }
+	    else
+	        {
+	        iDisplayIcon = 1;
+	        } 
+	    //iPopImage->SetSize( animationRect.Size() );
+	    iPopImage->SetImage( TAlfImage( *iPopupTextures[iDisplayIcon-1] ) );//N  
+		}
+	}
+	
+// ---------------------------------------------------------
+// CHtkTripMeterControl::DisplayInfoPopUpMsgL
+// ---------------------------------------------------------
+//
+void CHtkTripMeterControl::DisplayInfoPopUpMsgL()
+	{
+	if( isSatelliteInfoLaunch )
+		{
+		iView.LaunchSatelliteInfoDlgL();
+		}
+	else
+		{
+		LaunchInfoQueryDlgL();	
+		}						
+	}
+	
+// ---------------------------------------------------------
+// CHtkTripMeterControl::LaunchDeviceNotAvlNoteL
+// ---------------------------------------------------------
+//
+void CHtkTripMeterControl::LaunchDeviceNotAvlNoteL( )
+    {
+	TInt typefaceStyleId = iEnv.TextStyleManager().CreatePlatformTextStyleL(EAknHighestLogicalFont, EAlfTextStyleNormal); 
+    CAlfTextStyle* style1 = iEnv.TextStyleManager().TextStyle( typefaceStyleId );
+
+    iPopUpLayout = CAlfAnchorLayout::AddNewL( *this );
+    
+    iPopupDeck = CAlfDeckLayout::AddNewL( *this, iPopUpLayout );
+    
+    iPopUpLayout->SetAnchor(EAlfAnchorTopLeft, 0, 
+        EAlfAnchorOriginHCenter, EAlfAnchorOriginTop,
+        EAlfAnchorMetricRelativeToSize, EAlfAnchorMetricRelativeToSize,
+        TAlfTimedPoint( -0.05, 0.05));
+    iPopUpLayout->SetAnchor(EAlfAnchorBottomRight, 0, 
+        EAlfAnchorOriginHCenter, EAlfAnchorOriginTop,
+        EAlfAnchorMetricRelativeToSize, EAlfAnchorMetricRelativeToSize,
+        TAlfTimedPoint( 0.4, 0.38));
+
+	iPopupDeck->EnableBrushesL();
+
+    TAlfXYMetric edgeoffset(TAlfMetric( 0.01, EAlfUnitNormalized ));
+    iFrameBrush = CAlfFrameBrush::NewL(iEnv, KAknsIIDQsnFrPopup, edgeoffset);
+    iFrameBrush->SetFrameRectsL(TRect(12,12,167,167), TRect(11,11,170,170));
+    iFrameBrush->SetEdgeOffset(edgeoffset);
+    iPopupDeck->Brushes()->AppendL( iFrameBrush, EAlfHasOwnership );
+	
+    iPopUpAnchor = CAlfAnchorLayout::AddNewL( *this, iPopupDeck );
+    
+	iPopUpAnchor->EnableBrushesL();
+    
+    iPopUpMsg = CAlfTextVisual::AddNewL( *this, iPopUpAnchor );
+    iPopImage = CAlfImageVisual::AddNewL( *this, iPopUpAnchor );
+    style1->SetTextSizeInPixels(20, ETrue );
+    style1->SetBold( EFalse );
+    
+	TRgb rgb;
+	AknsUtils::GetCachedColor ( AknsUtils::SkinInstance(),
+								rgb,
+								KAknsIIDQsnTextColors,
+								EAknsCIQsnTextColorsCG1 
+							   );
+	
+	iPopUpMsg->SetColor( rgb );
+	iPopUpMsg->SetTextL( KText1 );
+	iPopUpMsg->SetTextStyle( style1->Id() );
+	iPopUpMsg->SetPadding(TAlfBoxMetric(TAlfMetric(.1, EAlfUnitNormalized)));
+	iPopUpMsg->SetWrapping( CAlfTextVisual::ELineWrapBreak );
+	iPopUpMsg->SetAlign( EAlfAlignHCenter, EAlfAlignVCenter );
+	
+    iPopUpAnchor->SetAnchor(EAlfAnchorTopLeft, 0, 
+        EAlfAnchorOriginLeft, EAlfAnchorOriginTop,
+        EAlfAnchorMetricRelativeToSize, EAlfAnchorMetricRelativeToSize,
+        TAlfTimedPoint( 0.02, 0.02));
+    iPopUpAnchor->SetAnchor(EAlfAnchorBottomRight, 0, 
+        EAlfAnchorOriginHCenter, EAlfAnchorOriginTop,
+        EAlfAnchorMetricRelativeToSize, EAlfAnchorMetricRelativeToSize,
+        TAlfTimedPoint( 0.47, 0.3));
+
+    iPopUpAnchor->SetAnchor(EAlfAnchorTopLeft, 1, 
+        EAlfAnchorOriginLeft, EAlfAnchorOriginTop,
+        EAlfAnchorMetricRelativeToSize, EAlfAnchorMetricRelativeToSize,
+        TAlfTimedPoint( 0.28, 0.4 ));
+    iPopUpAnchor->SetAnchor(EAlfAnchorBottomRight, 1, 
+        EAlfAnchorOriginHCenter, EAlfAnchorOriginBottom,
+        EAlfAnchorMetricRelativeToSize, EAlfAnchorMetricRelativeToSize,
+        TAlfTimedPoint( 0.22, -0.16 ) );
+
+    iPopUpLayout->SetOpacity( 0.0 );        
+    }
+    
+// ---------------------------------------------------------
+// CHtkTripMeterControl::DisplaySatelliteSignalStrength
+// ---------------------------------------------------------
+//
+void CHtkTripMeterControl::DisplaySatelliteSignalStrength( TInt aSatCount ) 
+	{
+	TFileName imagepathname;
+	imagepathname.Zero();
+	iImageVisual->SetImage(TAlfImage(*iSignalTextures[aSatCount]));
+	}
+	
+// ---------------------------------------------------------
+// CHtkTripMeterControl::LaunchInfoQueryDlgL
+// ---------------------------------------------------------
+//
+void CHtkTripMeterControl::LaunchInfoQueryDlgL()
+	{
+    CAknNoteDialog* dlg;
+    dlg = new (ELeave) CAknNoteDialog(CAknNoteDialog::EConfirmationTone,CAknNoteDialog::ENoTimeout);
+    TInt result = dlg->ExecuteLD( R_INFO_POPUP_MSG_QUERY );
+    if( result == EAknSoftkeyExit )
+	    {
+	    iView.ExitMainApplicationL( EEikCmdExit );
+	    }
+	dlg = NULL;	    
+	}
+		
+// ---------------------------------------------------------
+// CHtkTripMeterControl::HasTripStarted
+// ---------------------------------------------------------
+//
+TBool CHtkTripMeterControl::HasTripStarted()
+    {
+    return iLocation->HasTripStarted();
+    }
+
+// ---------------------------------------------------------
+// CHtkTripMeterControl::WasGPSDataLost
+// ---------------------------------------------------------
+//
+TBool CHtkTripMeterControl::WasGPSDataLost(void)
+    {
+    return iLocation->WasGPSDataLost();
+    }
+        
+// ---------------------------------------------------------
+// CHtkTripMeterControl::SetGPSDataAvailability
+// ---------------------------------------------------------
+//
+void CHtkTripMeterControl::SetGPSDataAvailability(TBool aAvailability)
+    {
+    iLocation->SetGPSDataAvailability(aAvailability);
+    }
+
+// ---------------------------------------------------------
+// CHtkTripMeterControl::ProcessCommandL
+// ---------------------------------------------------------
+//
+void CHtkTripMeterControl::ProcessCommandL(TInt aCommand)
+    {
+    ReChangeTripFocus();
+	switch(aCommand)
+		{
+		case EBlidCmdTripStart:
+			{
+			/**
+			 * Start the calculations for the current trip
+			 */
+			iLocation->SetTripStartL();
+			break;
+			}
+        case EBlidCmdTripStop:
+        	{
+        	/**
+			* Stop the calculations for the current trip
+			*/        	
+        	iLocation->SetTripStop();
+        	break;
+			}
+        case EBlidCmdTripResume:
+        	{
+        	/**
+			* Resume the calculations for the current trip after stopping
+			*/			
+			iLocation->SetTripResumeL();
+			break;
+			}
+        case EBlidCmdTripReset:
+        	{
+        	/**
+			* Reset the items only for the current trip
+			*/
+        	iLocation->ResetTrip();
+        	break;
+			}
+        case EBlidCmdTripClear:
+        	{
+         	/**
+			* Reset all the items in the trip when it is stopped
+			*/
+			RotateSpeedDialL( iPrevAngle, 30 );    
+			iLocation->SetTripClear();
+	        break;
+			}
+		default:
+			{
+			break;
+			}
+		}
+		UpdateL();
+    }
+    
+
+// ----------------------------------------------------
+// CHtkTripMeterControl::CreateNaviPaneL
+// ----------------------------------------------------
+//
+void CHtkTripMeterControl::CreateNaviPaneL( TBool aDefaultNaviPane )
+    {    
+    CEikStatusPane* sp = StatusPane();
+    // Fetch pointer to the default navi pane control
+    CAknNavigationControlContainer* naviPane = 
+        static_cast<CAknNavigationControlContainer*>(sp->ControlL( 
+        TUid::Uid(EEikStatusPaneUidNavi)));
+ 
+    if( iDecoratedTabGroup )
+	    {
+	    delete iDecoratedTabGroup;
+	    iDecoratedTabGroup = NULL;	
+	    }
+   
+    if ( aDefaultNaviPane ) // dummy tab
+        {        
+        naviPane->PushDefaultL(EFalse);
+        }
+    else
+        {              
+        iDecoratedTabGroup = naviPane->CreateTabGroupL();
+        iDecoratedTabGroup->SetControlType( CAknNavigationDecorator::ETabGroup );
+        CAknTabGroup* tabGroup = 
+        static_cast< CAknTabGroup* > ( iDecoratedTabGroup->DecoratedControl() );        
+        AddTabsL( *tabGroup );        
+        }
+    }
+
+
+// ----------------------------------------------------
+// CHtkTripMeterControl::GetNiviDecorator
+// ----------------------------------------------------
+//
+CAknNavigationDecorator* CHtkTripMeterControl::GetNiviDecorator( )
+	{
+	return iDecoratedTabGroup;	
+	}
+	
+	    
+// ----------------------------------------------------
+// CHtkTripMeterControl::ActivateTabL
+// ----------------------------------------------------
+//
+void CHtkTripMeterControl::ActivateTabL( 
+                         CAknNavigationDecorator& aNaviDecorator,
+                         TInt aTabId )
+    {
+    CEikStatusPane* sp = StatusPane();    
+    CAknNavigationControlContainer* naviPane =
+        static_cast<CAknNavigationControlContainer*>(
+        sp->ControlL(TUid::Uid(EEikStatusPaneUidNavi)));
+    CAknTabGroup* tabGroup = static_cast<CAknTabGroup*>( 
+        aNaviDecorator.DecoratedControl() );
+    tabGroup->SetActiveTabById( aTabId );
+    naviPane->PushL( aNaviDecorator );
+    }
+
+
+// ----------------------------------------------------
+// CHtkTripMeterControl::StatusPane
+// ----------------------------------------------------
+//
+CEikStatusPane* CHtkTripMeterControl::StatusPane()
+    {
+    return CEikonEnv::Static()->AppUiFactory()->StatusPane();
+    }
+
+
+// ----------------------------------------------------
+// CHtkTripMeterControl::MakeTitleL
+// ----------------------------------------------------
+//
+void CHtkTripMeterControl::MakeTitleL( TInt aResourceText )
+    {
+    HBufC* buf = StringLoader::LoadLC(aResourceText);       
+    CAknTitlePane* title = static_cast<CAknTitlePane*>( StatusPane()->
+                            ControlL( TUid::Uid( EEikStatusPaneUidTitle ) ) );
+    CleanupStack::Pop(); //buf
+    title->SetText(buf); // Takes ownership of buf
+    }
+
+
+// ----------------------------------------------------
+// CHtkTripMeterControl::AddTabsL
+// ----------------------------------------------------
+//
+void CHtkTripMeterControl::AddTabsL(CAknTabGroup& aTabGroup)
+    {
+    aTabGroup.SetTabFixedWidthL(EAknTabWidthWithTwoTabs);
+
+    MAknsSkinInstance* skin = AknsUtils::SkinInstance(); 
+    HBufC* filename = BlidUtils::GetBitmapFilenameLC();        
+    CFbsBitmap* bitmap = NULL;
+    CFbsBitmap* bitmapMask = NULL;
+        
+    //Add tab icon 1
+    AknsUtils::CreateIconLC( skin,
+                            KAknsIIDQgnPropBlidNavigationTab3,
+                            bitmap,
+                            bitmapMask,
+                            *filename,
+                            EMbmBlidQgn_prop_blid_navigation_tab3,
+                            EMbmBlidQgn_prop_blid_navigation_tab3_mask );             
+    aTabGroup.AddTabL( EBlidNavigationView, bitmap, bitmapMask );
+    CleanupStack::Pop(2); //bitmap, bitmapmask
+
+    //Add tab icon 2
+    AknsUtils::CreateIconLC( skin,
+                            KAknsIIDQgnPropBlidTripTab3,
+                            bitmap,
+                            bitmapMask,
+                            *filename,
+                            EMbmBlidQgn_prop_blid_trip_tab3,
+                            EMbmBlidQgn_prop_blid_trip_tab3_mask );             
+    aTabGroup.AddTabL( EBlidTripMeterView, bitmap, bitmapMask );
+    CleanupStack::Pop(2); //bitmap, bitmapmask
+
+    
+    
+    CleanupStack::PopAndDestroy(); //filename
+    }
+
+// ----------------------------------------------------
+// CHtkTripMeterControl::OfferEventL
+// ----------------------------------------------------
+//
+TBool CHtkTripMeterControl::OfferEventL(const TAlfEvent& aEvent)
+	{
+    if(aEvent.IsKeyEvent() && aEvent.Code() == EEventKey)
+        {
+        CEikStatusPane* sp = StatusPane();
+	    // Fetch pointer to the default navi pane control
+	    CAknNavigationControlContainer* naviPane = 
+	        static_cast<CAknNavigationControlContainer*>(sp->ControlL( 
+	        TUid::Uid(EEikStatusPaneUidNavi)));
+	    CAknNavigationDecorator* naviDecorator = naviPane->Top();
+
+	    // Check if navigation pane controls exists, because decorator does 
+	    // not exist in every cases. E.g. after contact fetch in "new rule" 
+	    // command operation naviDecorator is null. 
+	    if ( naviDecorator && naviDecorator->ControlType() == 
+	        CAknNavigationDecorator::ETabGroup )
+	        {
+	        if ( naviDecorator->DecoratedControl()->OfferKeyEventL( 
+	            aEvent.KeyEvent(), aEvent.Code() ) == EKeyWasConsumed )
+	            {
+	            CAknTabGroup* tabGroup = static_cast< CAknTabGroup* > ( naviDecorator->DecoratedControl() );
+	            TInt tabIndex = tabGroup->ActiveTabIndex();
+				iView.ActivateCorrectViewL( tabIndex );
+	            return ETrue;
+	            }
+	        }    
+		}
+	else if( aEvent.IsPointerEvent() )
+		{
+		if ( aEvent.PointerDown() )
+			{
+			iIsDownPressed = ETrue;
+			return ETrue;
+			}
+		if ( aEvent.PointerUp() && iIsDownPressed )
+			{	
+			if( iLocation->IsGPSDataAvailable() )
+				{
+				iView.LaunchTripContextMenuL();
+				return ETrue;				
+				}
+			else
+				{
+				if( aEvent.Visual() == iPopUpAnchor ||
+					aEvent.Visual() == iPopUpMsg ||
+					aEvent.Visual() == iPopImage )					  
+					{
+					if( isSatelliteInfoLaunch )
+						{
+						iView.LaunchSatelliteInfoDlgL();
+						return ETrue;
+						}
+					else
+						{
+						LaunchInfoQueryDlgL();	
+						return ETrue;						
+						}						
+					}
+				}
+			return EFalse;
+			}
+		}
+	return EFalse;
+	}
+	
+
+// ----------------------------------------------------------------------------
+// CHtkTripMeterControl::RotateSpeedDialL()
+// ----------------------------------------------------------------------------
+//
+void CHtkTripMeterControl::RotateSpeedDialL( int aThetaPrevious, int aThetaFinal )
+    {
+	iTripDialVisual->EnableTransformationL(ETrue);
+	CAlfTransformation& aXf = iTripDialVisual->Transformation();
+	aXf.LoadIdentity();
+	TAlfTimedValue angle;
+	angle.SetValueNow( aThetaPrevious );
+	angle.SetTarget( aThetaFinal, 8000 );
+	aXf.Rotate(angle); 
+    }
+
+// ----------------------------------------------------------------------------
+// CHtkTripMeterControl::SetTRipMeterValueL
+// ----------------------------------------------------------------------------
+//
+void CHtkTripMeterControl::SetTRipMeterValueL( )
+    {
+	// set the tripmeter distance
+	TBuf<128> tripmeterString;	
+	TripmeterFormatL( tripmeterString );
+	iTripMeter->SetTextL( *iTripDistance );
+    }
+    
+// ----------------------------------------------------------------------------
+// CHtkTripMeterControl::SetOdoMeterValueL
+// ----------------------------------------------------------------------------
+//
+void CHtkTripMeterControl::SetOdoMeterValueL( )
+    {
+	// set the odometer distance
+	TBuf<128> odometerString;	
+	OdometerFormat( odometerString );
+	iOdoMeter->SetTextL( *iOdometerDistance );
+    }
+
+// ----------------------------------------------------------------------------
+// CHtkTripMeterControl::SetTripTimeL
+// ----------------------------------------------------------------------------
+//
+void CHtkTripMeterControl::SetTripTimeL( )
+    {
+	// set the odometer distance
+	TBuf<128> odometerString;	
+	TotalTimeFormat( odometerString );
+	iTriptime->SetTextL( odometerString );
+    }
+
+// ----------------------------------------------------------------------------
+// CHtkTripMeterControl::SetTripSpeed
+// ----------------------------------------------------------------------------
+//
+void CHtkTripMeterControl::SetTripSpeed( )
+    {
+    // Nothing to do now
+    }
+
+// ----------------------------------------------------------------------------
+// CHtkTripMeterControl::FormatOdometerDistance
+// ----------------------------------------------------------------------------
+//
+void CHtkTripMeterControl::FormatOdometerDistance( TReal aLastodometerValue )    
+	{
+    TInt result(0);        
+    if ( BlidUtils::TRealToTInt(aLastodometerValue, result) != KErrNone )
+        {
+        iOdometerDistance->Des().Copy( *iDataBlank );
+        return;
+        }
+    aLastodometerValue = result;        
+    TReal temp;
+                    
+    // metric or imperial
+    if ( iSettingsModel->UnitOfMeasurement() == EUnitsMetric )
+        {
+
+        if ( aLastodometerValue >= KKilometerToMeters )
+            {
+            TReal distanceInKm = aLastodometerValue / KKilometerToMeters;
+            Math::Round(temp, distanceInKm, 1);
+            distanceInKm = temp;
+            TBuf<KBlidLBItemMaxLen> temp;        
+            temp.Format( KDistanceFormat, Abs(distanceInKm) );
+            iOdometerDistance->Des().Copy( temp );
+            }
+    	else
+        	{
+            if ( BlidUtils::TRealToTInt(aLastodometerValue, result) != KErrNone )
+            	{
+                iOdometerDistance->Des().Copy( *iDataBlank );
+            	}
+            else
+            	{
+            	Math::Mod(temp, result, 10);        	
+		        if( temp >= 5 )
+		        	{
+		            result += (10 - temp);
+		            }
+		        else
+		        	{
+		            result -= temp; 
+		        	}
+		        	
+		        if ( result >= KKilometerToMeters )
+	            	{
+	            	aLastodometerValue = result;
+	            	TReal distanceInKm = aLastodometerValue / KKilometerToMeters;
+	                Math::Round(temp, distanceInKm, 1);
+	                distanceInKm = temp;
+	                TBuf<KBlidLBItemMaxLen> temp;        
+	                temp.Format( KDistanceFormat, Abs(distanceInKm) );
+	                iOdometerDistance->Des().Copy( temp );
+	            	}
+	            else
+	            	{
+	            	iOdometerDistance->Des().Zero();
+	                iOdometerDistance->Des().AppendNum( result );
+	            	}				
+            	}
+        	}
+        }
+    else
+    	{
+    	TReal32 distanceImperial = aLastodometerValue*KMetreToFoot;
+            
+    	if ( distanceImperial >= KMileToFeets ) 
+        	{
+        	distanceImperial /= KMileToFeets;
+        	Math::Round(temp, distanceImperial, 1);
+        	distanceImperial = temp;
+        	TBuf<KBlidLBItemMaxLen> tempstring;
+            tempstring.Format( KDistanceFormat, Abs(distanceImperial) );
+            iOdometerDistance->Des().Copy( tempstring );
+        	}
+    	else
+    		{                
+            if ( BlidUtils::TRealToTInt(
+                     distanceImperial, result) != KErrNone )
+            	{
+                iOdometerDistance->Des().Copy( *iDataBlank );
+                }
+            else
+            	{
+            	Math::Mod(temp, result, 10);        	
+	            if( temp >= 5 )
+	                {
+	                result += (10 - temp);
+	                }
+	            else
+	                {
+	                result -= temp; 
+	                }
+	                
+	            if ( result >= KMileToFeets )
+	            	{
+	            	distanceImperial = result;
+	            	distanceImperial /= KMileToFeets;
+	            	Math::Round(temp, distanceImperial, 1);
+	            	distanceImperial = temp;
+	            	TBuf<KBlidLBItemMaxLen> temp;
+	                temp.Format( KDistanceFormat, Abs(distanceImperial) );
+	                iOdometerDistance->Des().Copy( temp );
+	            	}
+	            else
+	            	{
+	            	iOdometerDistance->Des().Zero();
+	                iOdometerDistance->Des().AppendNum( result );
+	            	}                	
+                }
+            }
+    	}
+        		
+	}
+
+// ----------------------------------------------------------------------------
+// CHtkTripMeterControl::OdometerFormat
+// ----------------------------------------------------------------------------
+//
+void CHtkTripMeterControl::OdometerFormat( TDes& aOdometerString )
+    {
+    aOdometerString.Zero();
+   
+    if ( iLocation->IsTotalDistanceTravelled() &&
+    	 iLocation->IsGPSDataAvailable() )
+        {
+        TReal32 totalDistance;
+        iLocation->GetTotalDistance( totalDistance );
+        totalDistance = totalDistance + iLastodometerValue;
+        iOdoValueToStore = totalDistance;
+        TInt result(0);        
+        if ( BlidUtils::TRealToTInt(totalDistance, result) != KErrNone )
+            {
+            aOdometerString = *iDataBlank;
+            iOdometerDistance->Des().Copy( aOdometerString );
+            return;
+            }
+        totalDistance = result;        
+        TReal temp;
+                        
+        // metric or imperial
+        if ( iSettingsModel->UnitOfMeasurement() == EUnitsMetric )
+            {
+ 
+            if ( totalDistance >= KKilometerToMeters )
+                {
+                TReal distanceInKm = totalDistance / KKilometerToMeters;
+                Math::Round(temp, distanceInKm, 1);
+                distanceInKm = temp;
+                TBuf<KBlidLBItemMaxLen> temp;        
+                temp.Format( KDistanceFormat, Abs(distanceInKm) );
+                iOdometerDistance->Des().Copy( temp );
+                }
+        	else
+            	{
+                if ( BlidUtils::TRealToTInt(totalDistance, result) != KErrNone )
+                	{
+                    aOdometerString = *iDataBlank;
+                    iOdometerDistance->Des().Copy( aOdometerString );
+                	}
+                else
+                	{
+                	Math::Mod(temp, result, 10);        	
+			        if( temp >= 5 )
+			        	{
+			            result += (10 - temp);
+			            }
+			        else
+			        	{
+			            result -= temp; 
+			        	}
+			        	
+			        if ( result >= KKilometerToMeters )
+		            	{
+		            	totalDistance = result;
+		            	TReal distanceInKm = totalDistance / KKilometerToMeters;
+		                Math::Round(temp, distanceInKm, 1);
+		                distanceInKm = temp;
+		                TBuf<KBlidLBItemMaxLen> temp;        
+		                temp.Format( KDistanceFormat, Abs(distanceInKm) );
+		                iOdometerDistance->Des().Copy( temp );
+		            	}
+		            else
+		            	{
+		            	iOdometerDistance->Des().Zero();
+		                iOdometerDistance->Des().AppendNum( result );
+		            	}				
+                	}
+            	}
+            }
+        else
+        	{
+        	TReal32 distanceImperial = totalDistance*KMetreToFoot;
+                
+        	if ( distanceImperial >= KMileToFeets ) 
+            	{
+            	distanceImperial /= KMileToFeets;
+            	Math::Round(temp, distanceImperial, 1);
+            	distanceImperial = temp;
+            	TBuf<KBlidLBItemMaxLen> tempstring;
+                tempstring.Format( KDistanceFormat, Abs(distanceImperial) );
+                iOdometerDistance->Des().Copy( tempstring );
+            	}
+        	else
+        		{                
+                if ( BlidUtils::TRealToTInt(
+                         distanceImperial, result) != KErrNone )
+                	{
+                    aOdometerString = *iDataBlank;
+                    iOdometerDistance->Des().Copy( aOdometerString );
+                    }
+                else
+                	{
+                	Math::Mod(temp, result, 10);        	
+		            if( temp >= 5 )
+		                {
+		                result += (10 - temp);
+		                }
+		            else
+		                {
+		                result -= temp; 
+		                }
+		                
+		            if ( result >= KMileToFeets )
+		            	{
+		            	distanceImperial = result;
+		            	distanceImperial /= KMileToFeets;
+		            	Math::Round(temp, distanceImperial, 1);
+		            	distanceImperial = temp;
+		            	TBuf<KBlidLBItemMaxLen> temp;
+		                temp.Format( KDistanceFormat, Abs(distanceImperial) );
+		                iOdometerDistance->Des().Copy( temp );
+		            	}
+		            else
+		            	{
+		            	iOdometerDistance->Des().Zero();
+		                iOdometerDistance->Des().AppendNum( result );
+		            	}                	
+                    }
+                }
+        	}
+        }
+    }
+
+// ----------------------------------------------------------------------------
+// CHtkTripMeterControl::TotalTimeFormat
+// ----------------------------------------------------------------------------
+//
+void CHtkTripMeterControl::TotalTimeFormat( TDes& aTotalTimeString )
+    {
+    TInt error(0);
+    TTimeIntervalSeconds timeInterval;
+    TTime totaltime;
+    iLocation->GetTotalTime(timeInterval);
+    TBuf<KBlidLBItemMaxLen> totaltimeString;
+    if ( BlidUtils::FormatTimeToString( totaltimeString, (TReal)(timeInterval.Int()))
+         != KErrNone )
+        {
+        return;
+        }
+    totaltime.Set( totaltimeString );
+    TRAP( error, totaltime.FormatL( 
+          aTotalTimeString , *iDurationFormatLong ));
+          
+    if(error!=KErrNone)
+	    {
+	    CEikonEnv::Static()->HandleError( error );
+	    aTotalTimeString .Zero();
+	    }
+    }
+
+// ----------------------------------------------------------------------------
+// CHtkTripMeterControl::TripmeterFormatL
+// ----------------------------------------------------------------------------
+//
+void CHtkTripMeterControl::TripmeterFormatL( TDes& aTripmeterString )
+    {
+    aTripmeterString.Zero();
+    TInt result(0);
+    TReal temp;    
+  
+	if ( iLocation->IsTripDistanceTravelled()  &&
+    	 iLocation->IsGPSDataAvailable() )
+	    {
+	    TReal32 distanceTravelled;
+	    iLocation->GetTripDistance(distanceTravelled);        
+	    // metric or imperial
+	    if ( iSettingsModel->UnitOfMeasurement() == EUnitsMetric )
+	        {
+	        iSpeedFormatVisual->SetTextL( *iSpeedFormatKmph );
+	        if ( BlidUtils::TRealToTInt(distanceTravelled, result) != KErrNone )
+	        	{
+	            aTripmeterString = *iDataBlank;
+	            iTripDistance->Des().Copy( aTripmeterString );
+	            }
+	        else
+	        	{            	
+	        	distanceTravelled = result;
+	                
+	            if ( distanceTravelled >= KKilometerToMeters )
+	            	{
+	            	TReal distanceInKm = distanceTravelled / KKilometerToMeters;
+	            	Math::Round(temp, distanceInKm, 1);
+	            	distanceInKm = temp;
+	                TBuf<KBlidLBItemMaxLen> tempstring;        
+	                tempstring.Format( KDistanceFormat, Abs(distanceInKm) );
+	            	iTripDistance->Des().Copy( tempstring );
+	               	}
+	            else
+	            	{	            	
+	            	Math::Mod(temp, distanceTravelled, 10);        	
+			        if( temp >= 5 )
+			        	{
+			            distanceTravelled += (10 - temp);
+			            }
+			        else
+			        	{
+			            distanceTravelled -= temp; 
+			        	}
+			        
+			        if(distanceTravelled >= KKilometerToMeters )
+			        	{
+			        	TReal distanceInKm = distanceTravelled / KKilometerToMeters;
+		            	Math::Round(temp, distanceInKm, 1);
+	                	distanceInKm = temp;
+		                TBuf<KBlidLBItemMaxLen> tempstring;   
+		                tempstring.Format( KDistanceFormat, Abs(distanceInKm) );
+		                iTripDistance->Des().Copy( tempstring );
+			        	}
+			        else
+			        	{
+		                iTripDistance->Des().Zero();
+		                iTripDistance->Des().AppendNum( distanceTravelled );
+			        	}
+	            	}
+	            }
+	        }
+	    else
+	    	{
+	    	iSpeedFormatVisual->SetTextL( *iSpeedFormatMph );
+	        TReal32 distanceImperial = distanceTravelled*KMetreToFoot; 
+	        
+	        if ( distanceImperial >= KMileToFeets ) 
+	        	{
+	        	distanceImperial /= KMileToFeets;
+	        	Math::Round(temp, distanceImperial, 1);
+	        	distanceImperial = temp;
+	        	TBuf<KBlidLBItemMaxLen> temp;
+	            temp.Format( KDistanceFormat, Abs(distanceImperial) );
+                iTripDistance->Des().Copy( temp );
+	        	}
+	        else
+	        	{
+	        	if ( BlidUtils::TRealToTInt(
+	                 distanceImperial, result) != KErrNone )
+	            	{
+	                aTripmeterString = *iDataBlank;
+	                iTripDistance->Des().Copy( aTripmeterString );
+	                }
+	            else
+	            	{
+	            	Math::Mod(temp, distanceImperial, 10);        	
+		            if( temp >= 5 )
+		                {
+		                distanceImperial += (10 - temp);
+		                }
+		            else
+		                {
+		                distanceImperial -= temp; 
+		                }
+		                
+		            if ( distanceImperial >= KMileToFeets )
+		            	{
+		            	distanceImperial /= KMileToFeets;
+		            	Math::Round(temp, distanceImperial, 1);
+		            	distanceImperial = temp;
+		            	TBuf<KBlidLBItemMaxLen> temp;
+		                temp.Format( KDistanceFormat, Abs(distanceImperial) );
+		                iTripDistance->Des().Copy( temp );
+		            	}
+		            else
+		            	{
+		                iTripDistance->Des().Zero();
+		                iTripDistance->Des().AppendNum( distanceImperial );
+		            	}
+	                }
+	        	}            
+	        }
+   		}    
+   }
+
+// ----------------------------------------------------------------------------
+// CHtkTripMeterControl::SaveOdometerValue
+// ----------------------------------------------------------------------------
+//
+void CHtkTripMeterControl::SaveOdometerValue( )
+	{
+	if( iRepository )
+		{
+	    iRepository->Set(KBlidOdometerSettingsValue, iOdoValueToStore);		
+		}
+	}
+	
+// ----------------------------------------------------------------------------
+// CHtkTripMeterControl::ResetOdometerDistanceL
+// ----------------------------------------------------------------------------
+//
+void CHtkTripMeterControl::ResetOdometerDistanceL( )
+	{
+	if( iOdometerDistance )
+		{
+		iOdometerDistance->Des().Zero();
+		iOdometerDistance->Des().AppendNum( 0 );
+		iOdoMeter->SetTextL( *iOdometerDistance );			
+		}
+	iLocation->ResetOdometerValue();		
+	iOdoValueToStore = 0.0;
+	iLastodometerValue = 0.0;	
+	}
+
+// ----------------------------------------------------------------------------
+// CHtkTripMeterControl::SaveOdometerValue
+// ----------------------------------------------------------------------------
+//
+void CHtkTripMeterControl::ChangeTripFocus( TBool aSTripDimmed )
+	{
+	iSTripDimmed = aSTripDimmed;
+	if( iTripLayout )
+		{
+		TAlfTimedValue opecity;
+		opecity.SetTarget( 0.3, 0 );
+		iTripLayout->SetOpacity( opecity );				
+		}
+	}
+	
+// ----------------------------------------------------------------------------
+// CHtkTripMeterControl::SaveOdometerValue
+// ----------------------------------------------------------------------------
+//
+void CHtkTripMeterControl::ReChangeTripFocus( )
+	{
+	iSTripDimmed = EFalse;
+	if( iTripLayout )
+		{
+		TAlfTimedValue opecity;
+		opecity.SetTarget( 1.0, 0 );
+		iTripLayout->SetOpacity( opecity );				
+		}
+	}
+
+// ----------------------------------------------------------------------------
+// CHtkTripMeterControl::UpdateLayoutL
+// ----------------------------------------------------------------------------
+//
+void CHtkTripMeterControl::UpdateLayoutL( )
+	{
+	// Call all the root label setanchor and adjust the new LAyout rectangle.
+	CalculateRects();	
+	SetAnchors();
+	}
+
+// ----------------------------------------------------------------------------
+// CHtkTripMeterControl::UpdateLayoutL
+// ----------------------------------------------------------------------------
+//
+void CHtkTripMeterControl::CalculateRects( )
+	{
+	TAknLayoutRect mainPane;
+	TAknLayoutRect mainBlid2Pane;
+	TAknLayoutRect layoutWindow;
+	TAknLayoutText textLayout;
+	TRect mainRect;
+	TRect mainBlidRect;
+	TRect tripMeterRect;
+	TRect valueRect;
+	TInt variety;
+	TInt mainvariety;
+
+	if( Layout_Meta_Data::IsLandscapeOrientation() )
+	    {
+	    variety = 1;
+	    mainvariety = 4;
+	    }
+	 else
+	 	{
+	 	variety = 0;
+	    mainvariety = 0;
+	 	}
+	// 	
+    mainPane.LayoutRect( iView.ApplicationRect(),
+    							AknLayoutScalable_Apps::main_pane(mainvariety).LayoutLine() );
+    							
+	mainRect = mainPane.Rect(); 
+	
+    mainBlid2Pane.LayoutRect( mainRect,
+    							AknLayoutScalable_Apps::main_blid2_pane().LayoutLine() );
+    							
+	mainBlidRect = mainBlid2Pane.Rect(); 							
+    																				   
+    layoutWindow.LayoutRect( mainBlidRect, 
+    							AknLayoutScalable_Apps::blid2_tripm_pane( 0 ).LayoutLine() );
+    							
+	tripMeterRect =  layoutWindow.Rect();   							
+	// Since the Hitchcock does draw at main pane, we take the reference to
+	// Tripmeter(main) pane's.
+	tripMeterRect.Move(tripMeterRect.iTl.iX,-tripMeterRect.iTl.iY);  							
+	 	
+	// Bg rect
+    layoutWindow.LayoutRect( tripMeterRect, 
+    							AknLayoutScalable_Apps::blid2_tripm_pane_g1( variety ).LayoutLine() );
+    							
+	iBigTripRect =  layoutWindow.Rect();
+	
+	// Trip dial rect
+    layoutWindow.LayoutRect( tripMeterRect, 
+    							AknLayoutScalable_Apps::blid2_tripm_pane_g2( variety ).LayoutLine() );
+    							
+	iTripDialRect =  layoutWindow.Rect();
+
+	// Since the LAF Rect for Dial is 90 degree wrt image, we calculate the rect for 90 degree rotation
+	TAlfRealPoint topPoint = iTripDialRect.iTl;
+	TAlfRealPoint bottomPoint = iTripDialRect.iBr;
+	TReal32 topX 		= topPoint.iX;
+	TReal32 topY  		= topPoint.iY;
+	TReal32 bottomX 	= bottomPoint.iX;
+	TReal32 bottomY  	= bottomPoint.iY;
+	TReal32 wt			= bottomX - topX;
+	TReal32 ht			= bottomY - topY;	
+
+	TReal32 tX 		= topX+(wt/2)-(ht/2);
+	TReal32 tY  	= topY+(ht/2)-(wt/2);
+	TReal32 bX		= topX+(wt/2)+(ht/2);
+	TReal32 bY		= topY+(ht/2)+(wt/2);
+
+	iTripDialRect.SetRect( tX, tY, bX, bY );
+	
+	// Trip deck image rect
+    layoutWindow.LayoutRect( tripMeterRect, 
+    							AknLayoutScalable_Apps::blid2_tripm_pane_g3( variety ).LayoutLine() );
+    							
+	iTripDeckRect =  layoutWindow.Rect();
+
+	// Odo meter image rect
+    layoutWindow.LayoutRect( tripMeterRect, 
+    							AknLayoutScalable_Apps::blid2_tripm_pane_g4( variety ).LayoutLine() );
+    							
+	iOdoDeckRect =  layoutWindow.Rect();
+
+	// Trip meter text rect
+    textLayout.LayoutText( tripMeterRect, 
+    							AknLayoutScalable_Apps::blid2_tripm_pane_t1( variety ).LayoutLine() );
+    							
+	iTripMeterRect =  textLayout.TextRect();
+	
+	// Odo meter text rect
+    textLayout.LayoutText( tripMeterRect, 
+    							AknLayoutScalable_Apps::blid2_tripm_pane_t2( variety ).LayoutLine() );
+    							
+	iOdoMeterRect =  textLayout.TextRect();
+	
+	// Time text rect
+    textLayout.LayoutText( tripMeterRect, 
+    							AknLayoutScalable_Apps::blid2_tripm_pane_t3( variety ).LayoutLine() );
+    							
+	iTripTimeRect =  textLayout.TextRect();
+	
+	// Speed Format text rect
+    textLayout.LayoutText( tripMeterRect, 
+    							AknLayoutScalable_Apps::blid2_tripm_pane_t3( variety ).LayoutLine() );
+    							
+	iSpeedFormatRect =  textLayout.TextRect();
+	// since we donot have the LAF for Speed Format, we calculate it based on Dial Layout
+	iSpeedFormatRect.SetRect( topX, topY+ht/4, bottomX, topY+ht/3 );
+
+	// Clock image rect
+    layoutWindow.LayoutRect( tripMeterRect, 
+    							AknLayoutScalable_Apps::blid2_tripm_pane_g5( variety ).LayoutLine() );
+    							
+	iClockImageRect =  layoutWindow.Rect();
+
+	// Speeds Value rect
+    layoutWindow.LayoutRect( tripMeterRect, 
+    							AknLayoutScalable_Apps::blid2_tripm_values_pane( variety ).LayoutLine() );
+    							
+	valueRect =  layoutWindow.Rect();
+	
+	// Speed Value 1 rect
+    textLayout.LayoutText( valueRect, 
+    							AknLayoutScalable_Apps::blid2_tripm_values_pane_t1( 0 ).LayoutLine() );
+    							
+	iValueRect1 =  textLayout.TextRect();
+	
+	// Speed Value 2 rect
+    textLayout.LayoutText( valueRect, 
+    							AknLayoutScalable_Apps::blid2_tripm_values_pane_t2( 0 ).LayoutLine() );
+    							
+	iValueRect2 =  textLayout.TextRect();
+	
+	// Speed Value 3 rect
+    textLayout.LayoutText( valueRect, 
+    							AknLayoutScalable_Apps::blid2_tripm_values_pane_t3( 0 ).LayoutLine() );
+    							
+	iValueRect3 =  textLayout.TextRect();
+	
+	// Speed Value 4 rect
+    textLayout.LayoutText( valueRect, 
+    							AknLayoutScalable_Apps::blid2_tripm_values_pane_t4( 0 ).LayoutLine() );
+    							
+	iValueRect4 =  textLayout.TextRect();
+	
+	// Speed Value 5 rect
+    textLayout.LayoutText( valueRect, 
+    							AknLayoutScalable_Apps::blid2_tripm_values_pane_t5( 0 ).LayoutLine() );
+    							
+	iValueRect5 =  textLayout.TextRect();
+	
+	// Speed Value 6 rect
+    textLayout.LayoutText( valueRect, 
+    							AknLayoutScalable_Apps::blid2_tripm_values_pane_t6( 0 ).LayoutLine() );
+    							
+	iValueRect6 =  textLayout.TextRect();
+	
+	// Speed Value 7 rect
+    textLayout.LayoutText( valueRect, 
+    							AknLayoutScalable_Apps::blid2_tripm_values_pane_t7( 0 ).LayoutLine() );
+    							
+	iValueRect7 =  textLayout.TextRect();
+	
+	// Speed Value 8 rect
+    textLayout.LayoutText( valueRect, 
+    							AknLayoutScalable_Apps::blid2_tripm_values_pane_t8( 0 ).LayoutLine() );
+    							
+	iValueRect8 =  textLayout.TextRect();
+	
+	// Speed Value 9 rect
+    textLayout.LayoutText( valueRect, 
+    							AknLayoutScalable_Apps::blid2_tripm_values_pane_t9( 0 ).LayoutLine() );
+    							
+	iValueRect9 =  textLayout.TextRect();
+	
+	// Signal Strength
+    layoutWindow.LayoutRect( tripMeterRect, 
+    							AknLayoutScalable_Apps::blid2_tripm_pane_g6( variety ).LayoutLine() );
+    							
+	iSignalStrengthRect =  layoutWindow.Rect();
+	
+	
+	}
+
+
+// ----------------------------------------------------------------------------
+// CHtkTripMeterControl::SetAnchors
+// ----------------------------------------------------------------------------
+//
+void CHtkTripMeterControl::SetAnchors( )
+	{	
+	// Anchor for Big trip visual
+	TAlfRealPoint topPoint( iBigTripRect.iTl );
+	TAlfRealPoint bottomPoint( iBigTripRect.iBr );
+	
+    iTripLayout->SetAnchor( EAlfAnchorTopLeft, 0, 
+        EAlfAnchorOriginLeft, EAlfAnchorOriginTop,
+        EAlfAnchorMetricAbsolute, EAlfAnchorMetricAbsolute,
+        TAlfTimedPoint( topPoint.iX, topPoint.iY  ) );
+    iTripLayout->SetAnchor( EAlfAnchorBottomRight, 0, 
+        EAlfAnchorOriginLeft, EAlfAnchorOriginTop,
+        EAlfAnchorMetricAbsolute, EAlfAnchorMetricAbsolute,
+        TAlfTimedPoint( bottomPoint.iX, bottomPoint.iY  ) );
+	       
+	// Anchor for trip box image visual
+	topPoint =  iTripDeckRect.iTl;
+	bottomPoint = iTripDeckRect.iBr;
+	
+    iTripLayout->SetAnchor( EAlfAnchorTopLeft, 1, 
+        EAlfAnchorOriginLeft, EAlfAnchorOriginTop,
+        EAlfAnchorMetricAbsolute, EAlfAnchorMetricAbsolute,
+        TAlfTimedPoint( topPoint.iX, topPoint.iY  ) );
+    iTripLayout->SetAnchor( EAlfAnchorBottomRight, 1, 
+        EAlfAnchorOriginLeft, EAlfAnchorOriginTop,
+        EAlfAnchorMetricAbsolute, EAlfAnchorMetricAbsolute,
+        TAlfTimedPoint( bottomPoint.iX, bottomPoint.iY  ) );
+        
+	// Anchor for tripmeter text visual
+	topPoint =  iTripMeterRect.iTl;
+	bottomPoint = iTripMeterRect.iBr;
+    
+    iTripLayout->SetAnchor( EAlfAnchorTopLeft, 2, 
+        EAlfAnchorOriginLeft, EAlfAnchorOriginTop,
+        EAlfAnchorMetricAbsolute, EAlfAnchorMetricAbsolute,
+        TAlfTimedPoint( topPoint.iX, topPoint.iY  ) );
+    iTripLayout->SetAnchor( EAlfAnchorBottomRight, 2, 
+        EAlfAnchorOriginLeft, EAlfAnchorOriginTop,
+        EAlfAnchorMetricAbsolute, EAlfAnchorMetricAbsolute,
+        TAlfTimedPoint( bottomPoint.iX, bottomPoint.iY  ) );
+        
+	// Anchor for odometer box image visual
+	topPoint =  iOdoDeckRect.iTl;
+	bottomPoint = iOdoDeckRect.iBr;
+	
+    iTripLayout->SetAnchor( EAlfAnchorTopLeft, 3, 
+        EAlfAnchorOriginLeft, EAlfAnchorOriginTop,
+        EAlfAnchorMetricAbsolute, EAlfAnchorMetricAbsolute,
+        TAlfTimedPoint( topPoint.iX, topPoint.iY  ) );
+    iTripLayout->SetAnchor( EAlfAnchorBottomRight, 3, 
+        EAlfAnchorOriginLeft, EAlfAnchorOriginTop,
+        EAlfAnchorMetricAbsolute, EAlfAnchorMetricAbsolute,
+        TAlfTimedPoint( bottomPoint.iX, bottomPoint.iY  ) );
+        
+	// Anchor for odometer text visual
+	topPoint =  iOdoMeterRect.iTl;
+	bottomPoint = iOdoMeterRect.iBr;
+	
+    iTripLayout->SetAnchor( EAlfAnchorTopLeft, 4, 
+        EAlfAnchorOriginLeft, EAlfAnchorOriginTop,
+        EAlfAnchorMetricAbsolute, EAlfAnchorMetricAbsolute,
+        TAlfTimedPoint( topPoint.iX, topPoint.iY  ) );
+    iTripLayout->SetAnchor( EAlfAnchorBottomRight, 4, 
+        EAlfAnchorOriginLeft, EAlfAnchorOriginTop,
+        EAlfAnchorMetricAbsolute, EAlfAnchorMetricAbsolute,
+        TAlfTimedPoint( bottomPoint.iX, bottomPoint.iY  ) );
+        
+	// Anchor for Speed Format visual
+	topPoint =  iSpeedFormatRect.iTl;
+	bottomPoint = iSpeedFormatRect.iBr;
+
+    iTripLayout->SetAnchor( EAlfAnchorTopLeft, 5, 
+        EAlfAnchorOriginLeft, EAlfAnchorOriginTop,
+        EAlfAnchorMetricAbsolute, EAlfAnchorMetricAbsolute,
+        TAlfTimedPoint( topPoint.iX, topPoint.iY  ) );
+    iTripLayout->SetAnchor( EAlfAnchorBottomRight, 5, 
+        EAlfAnchorOriginLeft, EAlfAnchorOriginTop,
+        EAlfAnchorMetricAbsolute, EAlfAnchorMetricAbsolute,
+        TAlfTimedPoint( bottomPoint.iX, bottomPoint.iY  ) );
+
+    // Anchor for Speed format
+	topPoint =  iTripDialRect.iTl;
+	bottomPoint = iTripDialRect.iBr;
+	
+    iTripLayout->SetAnchor( EAlfAnchorTopLeft, 6, 
+        EAlfAnchorOriginLeft, EAlfAnchorOriginTop,
+        EAlfAnchorMetricAbsolute, EAlfAnchorMetricAbsolute,
+        TAlfTimedPoint( topPoint.iX, topPoint.iY ) );
+    iTripLayout->SetAnchor( EAlfAnchorBottomRight, 6, 
+        EAlfAnchorOriginLeft, EAlfAnchorOriginTop,
+        EAlfAnchorMetricAbsolute, EAlfAnchorMetricAbsolute,
+        TAlfTimedPoint( bottomPoint.iX, bottomPoint.iY ) );
+        
+	// Anchor for clock image visual
+	topPoint =  iClockImageRect.iTl;
+	bottomPoint = iClockImageRect.iBr;
+	
+    iTripLayout->SetAnchor( EAlfAnchorTopLeft, 7, 
+        EAlfAnchorOriginLeft, EAlfAnchorOriginTop,
+        EAlfAnchorMetricAbsolute, EAlfAnchorMetricAbsolute,
+        TAlfTimedPoint( topPoint.iX, topPoint.iY  ) );
+    iTripLayout->SetAnchor( EAlfAnchorBottomRight, 7, 
+        EAlfAnchorOriginLeft, EAlfAnchorOriginTop,
+        EAlfAnchorMetricAbsolute, EAlfAnchorMetricAbsolute,
+        TAlfTimedPoint( bottomPoint.iX, bottomPoint.iY  ) );
+        
+	// Anchor for trip time text visual
+	topPoint =  iTripTimeRect.iTl;
+	bottomPoint = iTripTimeRect.iBr;
+	   
+    iTripLayout->SetAnchor( EAlfAnchorTopLeft, 8, 
+        EAlfAnchorOriginLeft, EAlfAnchorOriginTop,
+        EAlfAnchorMetricAbsolute, EAlfAnchorMetricAbsolute,
+        TAlfTimedPoint( topPoint.iX, topPoint.iY  ) );
+    iTripLayout->SetAnchor( EAlfAnchorBottomRight, 8, 
+        EAlfAnchorOriginLeft, EAlfAnchorOriginTop,
+        EAlfAnchorMetricAbsolute, EAlfAnchorMetricAbsolute,
+        TAlfTimedPoint( bottomPoint.iX, bottomPoint.iY  ) );
+
+    // Anchors for iMileVisuals (8 to 16)
+        
+	// Anchor for Mile Value 1
+	topPoint =  iValueRect1.iTl;
+	bottomPoint = iValueRect1.iBr;
+
+    iTripLayout->SetAnchor( EAlfAnchorTopLeft, 9, 
+        EAlfAnchorOriginLeft, EAlfAnchorOriginTop,
+        EAlfAnchorMetricAbsolute, EAlfAnchorMetricAbsolute,
+        TAlfTimedPoint( topPoint.iX, topPoint.iY  ) );
+    iTripLayout->SetAnchor( EAlfAnchorBottomRight, 9, 
+        EAlfAnchorOriginLeft, EAlfAnchorOriginTop,
+        EAlfAnchorMetricAbsolute, EAlfAnchorMetricAbsolute,
+        TAlfTimedPoint( bottomPoint.iX, bottomPoint.iY  ) );
+        
+	// Anchor for Mile Value 2
+	topPoint =  iValueRect2.iTl;
+	bottomPoint = iValueRect2.iBr;
+
+    iTripLayout->SetAnchor( EAlfAnchorTopLeft, 10, 
+        EAlfAnchorOriginLeft, EAlfAnchorOriginTop,
+        EAlfAnchorMetricAbsolute, EAlfAnchorMetricAbsolute,
+        TAlfTimedPoint( topPoint.iX, topPoint.iY  ) );
+    iTripLayout->SetAnchor( EAlfAnchorBottomRight, 10, 
+        EAlfAnchorOriginLeft, EAlfAnchorOriginTop,
+        EAlfAnchorMetricAbsolute, EAlfAnchorMetricAbsolute,
+        TAlfTimedPoint( bottomPoint.iX, bottomPoint.iY  ) );
+        
+	// Anchor for Mile Value 3
+	topPoint =  iValueRect3.iTl;
+	bottomPoint = iValueRect3.iBr;
+
+    iTripLayout->SetAnchor( EAlfAnchorTopLeft, 11, 
+        EAlfAnchorOriginLeft, EAlfAnchorOriginTop,
+        EAlfAnchorMetricAbsolute, EAlfAnchorMetricAbsolute,
+        TAlfTimedPoint( topPoint.iX, topPoint.iY  ) );
+    iTripLayout->SetAnchor( EAlfAnchorBottomRight, 11, 
+        EAlfAnchorOriginLeft, EAlfAnchorOriginTop,
+        EAlfAnchorMetricAbsolute, EAlfAnchorMetricAbsolute,
+        TAlfTimedPoint( bottomPoint.iX, bottomPoint.iY  ) );
+        
+	// Anchor for Mile Value 4
+	topPoint =  iValueRect4.iTl;
+	bottomPoint = iValueRect4.iBr;
+
+    iTripLayout->SetAnchor( EAlfAnchorTopLeft, 12, 
+        EAlfAnchorOriginLeft, EAlfAnchorOriginTop,
+        EAlfAnchorMetricAbsolute, EAlfAnchorMetricAbsolute,
+        TAlfTimedPoint( topPoint.iX, topPoint.iY  ) );
+    iTripLayout->SetAnchor( EAlfAnchorBottomRight, 12, 
+        EAlfAnchorOriginLeft, EAlfAnchorOriginTop,
+        EAlfAnchorMetricAbsolute, EAlfAnchorMetricAbsolute,
+        TAlfTimedPoint( bottomPoint.iX, bottomPoint.iY  ) );
+        
+	// Anchor for Mile Value 5
+	topPoint =  iValueRect5.iTl;
+	bottomPoint = iValueRect5.iBr;
+
+    iTripLayout->SetAnchor( EAlfAnchorTopLeft, 13, 
+        EAlfAnchorOriginLeft, EAlfAnchorOriginTop,
+        EAlfAnchorMetricAbsolute, EAlfAnchorMetricAbsolute,
+        TAlfTimedPoint( topPoint.iX, topPoint.iY  ) );
+    iTripLayout->SetAnchor( EAlfAnchorBottomRight, 13, 
+        EAlfAnchorOriginLeft, EAlfAnchorOriginTop,
+        EAlfAnchorMetricAbsolute, EAlfAnchorMetricAbsolute,
+        TAlfTimedPoint( bottomPoint.iX, bottomPoint.iY  ) );
+        
+	// Anchor for Mile Value 6
+	topPoint =  iValueRect6.iTl;
+	bottomPoint = iValueRect6.iBr;
+
+    iTripLayout->SetAnchor( EAlfAnchorTopLeft, 14, 
+        EAlfAnchorOriginLeft, EAlfAnchorOriginTop,
+        EAlfAnchorMetricAbsolute, EAlfAnchorMetricAbsolute,
+        TAlfTimedPoint( topPoint.iX, topPoint.iY  ) );
+    iTripLayout->SetAnchor( EAlfAnchorBottomRight, 14, 
+        EAlfAnchorOriginLeft, EAlfAnchorOriginTop,
+        EAlfAnchorMetricAbsolute, EAlfAnchorMetricAbsolute,
+        TAlfTimedPoint( bottomPoint.iX, bottomPoint.iY  ) );
+        
+	// Anchor for Mile Value 7
+	topPoint =  iValueRect7.iTl;
+	bottomPoint = iValueRect7.iBr;
+
+    iTripLayout->SetAnchor( EAlfAnchorTopLeft, 15, 
+        EAlfAnchorOriginLeft, EAlfAnchorOriginTop,
+        EAlfAnchorMetricAbsolute, EAlfAnchorMetricAbsolute,
+        TAlfTimedPoint( topPoint.iX, topPoint.iY  ) );
+    iTripLayout->SetAnchor( EAlfAnchorBottomRight, 15, 
+        EAlfAnchorOriginLeft, EAlfAnchorOriginTop,
+        EAlfAnchorMetricAbsolute, EAlfAnchorMetricAbsolute,
+        TAlfTimedPoint( bottomPoint.iX, bottomPoint.iY  ) );
+        
+	// Anchor for Mile Value 8
+	topPoint =  iValueRect8.iTl;
+	bottomPoint = iValueRect8.iBr;
+
+    iTripLayout->SetAnchor( EAlfAnchorTopLeft, 16, 
+        EAlfAnchorOriginLeft, EAlfAnchorOriginTop,
+        EAlfAnchorMetricAbsolute, EAlfAnchorMetricAbsolute,
+        TAlfTimedPoint( topPoint.iX, topPoint.iY  ) );
+    iTripLayout->SetAnchor( EAlfAnchorBottomRight, 16, 
+        EAlfAnchorOriginLeft, EAlfAnchorOriginTop,
+        EAlfAnchorMetricAbsolute, EAlfAnchorMetricAbsolute,
+        TAlfTimedPoint( bottomPoint.iX, bottomPoint.iY  ) );
+        
+	// Anchor for Mile Value 9
+	topPoint =  iValueRect9.iTl;
+	bottomPoint = iValueRect9.iBr;
+
+    iTripLayout->SetAnchor( EAlfAnchorTopLeft, 17, 
+        EAlfAnchorOriginLeft, EAlfAnchorOriginTop,
+        EAlfAnchorMetricAbsolute, EAlfAnchorMetricAbsolute,
+        TAlfTimedPoint( topPoint.iX, topPoint.iY  ) );
+    iTripLayout->SetAnchor( EAlfAnchorBottomRight, 17, 
+        EAlfAnchorOriginLeft, EAlfAnchorOriginTop,
+        EAlfAnchorMetricAbsolute, EAlfAnchorMetricAbsolute,
+        TAlfTimedPoint( bottomPoint.iX, bottomPoint.iY  ) );
+    
+    // Anchor for Satellite Status image visual   (18) 
+	topPoint =  iSignalStrengthRect.iTl;
+	bottomPoint = iSignalStrengthRect.iBr;
+
+    iTripLayout->SetAnchor( EAlfAnchorTopLeft, 18,   
+        EAlfAnchorOriginLeft, EAlfAnchorOriginTop,  
+        EAlfAnchorMetricAbsolute, EAlfAnchorMetricAbsolute,
+        TAlfTimedPoint( topPoint.iX, topPoint.iY  ) );
+    iTripLayout->SetAnchor( EAlfAnchorBottomRight, 18, 
+        EAlfAnchorOriginLeft, EAlfAnchorOriginTop,
+        EAlfAnchorMetricAbsolute, EAlfAnchorMetricAbsolute,
+        TAlfTimedPoint( bottomPoint.iX, bottomPoint.iY  ) );
+
+	}
+	
+// ----------------------------------------------------------------------------
+// CHtkTripMeterControl::CreateSignalTexturesL
+// ----------------------------------------------------------------------------
+//
+void CHtkTripMeterControl::CreateSignalTexturesL( )
+	{
+	MAlfBitmapProvider* provider = NULL;	
+	
+    // then create the bitmap provider
+    iView.ImageLoaderUtils()->SetSize( iSignalStrengthRect.Size() ); 
+    provider = iView.ImageLoaderUtils()->CreateImageLoaderL( KAknsIIDQgnGrafBlidSatSignal01, // svg icon skin constant id defiened in Aknsconstant.h file
+    												 			iView.ImagePathName(),        // mif file name with path.
+    												 			EMbmBlidQgn_graf_blid_sat_signal_01, // bitmap id defiened in mbg file
+    												 			EMbmBlidQgn_graf_blid_sat_signal_01_mask ); // bitmap mask id defiened in mbg file
+    												 
+	    												 
+	// now using that bitmap provider create the texture.
+	CAlfTexture & thumbTexture1 = iEnv.TextureManager().CreateTextureL( KAlfAutoGeneratedTextureId,
+                                                                provider,
+                                                                EAlfTextureFlagDefault );
+	iSignalTextures.Append( &thumbTexture1 );// At 0
+	
+
+    // then create the bitmap provider
+    provider = iView.ImageLoaderUtils()->CreateImageLoaderL( KAknsIIDQgnGrafBlidSatSignal02, // svg icon skin constant id defiened in Aknsconstant.h file
+    												 			iView.ImagePathName(),        // mif file name with path.
+    												 			EMbmBlidQgn_graf_blid_sat_signal_02, // bitmap id defiened in mbg file
+    												 			EMbmBlidQgn_graf_blid_sat_signal_02_mask ); // bitmap mask id defiened in mbg file
+    												 
+	    												 
+	// now using that bitmap provider create the texture.
+	CAlfTexture & thumbTexture2 = iEnv.TextureManager().CreateTextureL( KAlfAutoGeneratedTextureId,
+                                                                provider,
+                                                                EAlfTextureFlagDefault ); 	
+
+	iSignalTextures.Append( &thumbTexture2 );// At 1			                                                                  
+    // then create the bitmap provider
+    provider = iView.ImageLoaderUtils()->CreateImageLoaderL( KAknsIIDQgnGrafBlidSatSignal03, // svg icon skin constant id defiened in Aknsconstant.h file
+    												 			iView.ImagePathName(),        // mif file name with path.
+    												 			EMbmBlidQgn_graf_blid_sat_signal_03, // bitmap id defiened in mbg file
+    												 			EMbmBlidQgn_graf_blid_sat_signal_03_mask ); // bitmap mask id defiened in mbg file
+    												 
+	    												 
+	// now using that bitmap provider create the texture.
+	CAlfTexture & thumbTexture3 = iEnv.TextureManager().CreateTextureL( KAlfAutoGeneratedTextureId,
+                                                                provider,
+                                                                EAlfTextureFlagDefault );
+
+	iSignalTextures.Append( &thumbTexture3 );// At 2  
+	
+    // then create the bitmap provider
+    provider = iView.ImageLoaderUtils()->CreateImageLoaderL( KAknsIIDQgnGrafBlidSatSignal04, // svg icon skin constant id defiened in Aknsconstant.h file
+    												 			iView.ImagePathName(),        // mif file name with path.
+    												 			EMbmBlidQgn_graf_blid_sat_signal_04, // bitmap id defiened in mbg file
+    												 			EMbmBlidQgn_graf_blid_sat_signal_04_mask ); // bitmap mask id defiened in mbg file
+    												 
+	    												 
+	// now using that bitmap provider create the texture.
+	CAlfTexture & thumbTexture4 = iEnv.TextureManager().CreateTextureL( KAlfAutoGeneratedTextureId,
+                                                                provider,
+                                                                EAlfTextureFlagDefault );
+
+	iSignalTextures.Append( &thumbTexture4 );// At 3  
+	
+    // then create the bitmap provider
+    provider = iView.ImageLoaderUtils()->CreateImageLoaderL( KAknsIIDQgnGrafBlidSatSignal05, // svg icon skin constant id defiened in Aknsconstant.h file
+    												 			iView.ImagePathName(),        // mif file name with path.
+    												 			EMbmBlidQgn_graf_blid_sat_signal_05, // bitmap id defiened in mbg file
+    												 			EMbmBlidQgn_graf_blid_sat_signal_05_mask ); // bitmap mask id defiened in mbg file
+    												 
+	    												 
+	// now using that bitmap provider create the texture.
+	CAlfTexture & thumbTexture5 = iEnv.TextureManager().CreateTextureL( KAlfAutoGeneratedTextureId,
+                                                                provider,
+                                                                EAlfTextureFlagDefault );
+
+	iSignalTextures.Append( &thumbTexture5 );// At 4
+	}
+	
+// ----------------------------------------------------------------------------
+// CHtkTripMeterControl::CreatePopupImgTextureL
+// ----------------------------------------------------------------------------
+//
+void CHtkTripMeterControl::CreatePopupImgTextureL( )
+	{
+	MAlfBitmapProvider* provider = NULL;			
+    provider = iView.ImageLoaderUtils()->CreateImageLoaderL( KAknsIIDQgnGrafBlidUnavail, // svg icon skin constant id defiened in Aknsconstant.h file
+    												 iView.ImagePathName(),        // mif file name with path.
+    												 EMbmBlidQgn_graf_blid_unavail, // bitmap id defiened in mbg file
+    												 EMbmBlidQgn_graf_blid_unavail_mask ); // bitmap mask id defiened in mbg file
+	
+	// now using that bitmap provider create the texture.
+	CAlfTexture & thumbTexture = iEnv.TextureManager().CreateTextureL( KAlfAutoGeneratedTextureId,
+	                                                                provider,
+	                                                                EAlfTextureFlagDefault ); 
+		                                                                
+	iPopupImgTexture = &thumbTexture;
+	}	
+		
+//End Of File
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/basiclocationinfodisplay/blid/ui/src/Debug.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,88 @@
+/*
+* 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:  Contains debugging functions
+*
+*/
+
+
+
+// INCLUDE FILES
+#include "Debug.h"
+#include <flogger.h>
+#include <e32svr.h>
+
+// CONSTANTS
+//#ifdef _DEBUG
+/// Folder where the log resides
+_LIT( KLogFolder, "BLID" );
+
+/// The name of the log file
+_LIT( KLogFileName, "BLID" );
+
+/// The format in which the time is formatted in log
+_LIT( KLogTimeFormat, "%02d.%02d:%02d:%06d ");
+
+/// The length of the string produced by KLocLogTimeFormat
+const TInt KLogTimeFormatLength = 16;
+
+/// How many characters a log line can contain
+const TInt KLogLineLength = 256;
+
+// ========================== OTHER EXPORTED FUNCTIONS =========================
+
+
+// -----------------------------------------------------------------------------
+// Debug
+// Generates a log file if c:\logs\BLID\ folder exists
+// -----------------------------------------------------------------------------
+//
+void Debug( TRefByValue<const TDesC> aText, ... )
+    {
+  
+    RDebug::Print(aText);
+
+    VA_LIST args;
+    VA_START( args, aText );
+
+    TBuf<KLogLineLength> buf;
+    buf.FormatList( aText, args );
+
+    RFileLogger logger;
+    TInt ret=logger.Connect();
+    if (ret==KErrNone)
+        {
+        logger.SetDateAndTime( EFalse,EFalse );
+        logger.CreateLog( KLogFolder, KLogFileName, EFileLoggingModeAppend );
+        TBuf<KLogTimeFormatLength> timeStamp;
+        TTime now;
+        now.HomeTime();
+        TDateTime dateTime;
+        dateTime = now.DateTime();
+        timeStamp.Format( KLogTimeFormat,
+            dateTime.Hour(), dateTime.Minute(),
+            dateTime.Second(), dateTime.MicroSecond() );
+        buf.Insert( 0, timeStamp );
+
+        logger.Write(buf);
+        }
+
+    logger.Close();
+
+    VA_END( args );
+
+    }
+    
+//#endif // _DEBUG
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/basiclocationinfodisplay/blid/ui/src/FileSystemInfo.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,110 @@
+/*
+* 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: Implementation of CFileSystemInfo class which provides application's private path information
+*
+*/
+
+
+
+// INCLUDE FILES
+#include "FileSystemInfo.h"
+#include <coemain.h>
+#include <apgcli.h>
+
+// ========================= MEMBER FUNCTIONS ================================
+
+// ----------------------------------------------------------
+// CFileSystemInfo::NewL()
+// ----------------------------------------------------------
+//
+CFileSystemInfo* CFileSystemInfo::NewL(const TUid & aApplicationUid)
+    {
+    CFileSystemInfo* self = CFileSystemInfo::NewLC(aApplicationUid);
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+// ----------------------------------------------------------
+// CFileSystemInfo::NewLC()
+// ----------------------------------------------------------
+//
+CFileSystemInfo* CFileSystemInfo::NewLC(const TUid & aApplicationUid)
+    {
+    CFileSystemInfo* self = new (ELeave) CFileSystemInfo();
+    CleanupStack::PushL( self );
+    self->ConstructL(aApplicationUid);
+    return self;
+    }
+
+// ---------------------------------------------------------
+// CFileSystemInfo::CFileSystemInfo()
+// ---------------------------------------------------------
+//
+CFileSystemInfo::CFileSystemInfo()
+    {
+    }
+
+// ---------------------------------------------------------
+// CFileSystemInfo::~CFileSystemInfo()
+// ---------------------------------------------------------
+//
+CFileSystemInfo::~CFileSystemInfo()
+    {
+    }
+
+// ---------------------------------------------------------
+// CFileSystemInfo::PrivatePath()
+// ---------------------------------------------------------
+//
+TFileName CFileSystemInfo::PrivatePath() const
+	{
+	return iPrivatePath;
+	}
+
+// ---------------------------------------------------------
+// CFileSystemInfo::ConstructL()
+// ---------------------------------------------------------
+//
+void CFileSystemInfo::ConstructL(const TUid & aApplicationUid)
+    {
+    RApaLsSession apaSession;
+    
+    // Connect to application architecture service.
+    User::LeaveIfError( apaSession.Connect() );
+        
+    // Retrieve the application info
+    TApaAppInfo appInfo;
+    User::LeaveIfError( apaSession.GetAppInfo( appInfo, aApplicationUid ) );
+    
+    // Close connection to application architecture service.
+    apaSession.Close();
+            
+    RFs fs;
+    User::LeaveIfError(fs.Connect());
+    
+    // Parse the installation drive from the application path.
+    TParse driveParse;
+    driveParse.Set( appInfo.iFullName, NULL, NULL );
+    iPrivatePath.Append( driveParse.Drive() );
+    
+    // Append the private path to installation drive.
+    TFileName privatePath;
+    fs.PrivatePath( privatePath ); 
+    iPrivatePath.Append( privatePath );    
+    fs.Close();
+    
+    }
+	
+// End of file
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/basiclocationinfodisplay/blid/ui/src/cblidnotedialog.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,123 @@
+/*
+* 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:  execute a information note dialog.
+*
+*/
+
+
+
+// INCLUDE FILES
+#include <aknnotedialog.h>
+#include <blid.rsg>
+#include "cblidnotedialog.h"
+
+// ============================ MEMBER FUNCTIONS ==============================
+// ----------------------------------------------------------------------------
+// CBlidNoteDialog::CBlidNoteDialog
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// ----------------------------------------------------------------------------
+//
+CBlidNoteDialog::CBlidNoteDialog()
+    :CActive(EPriorityStandard)
+    {
+    CActiveScheduler::Add( this );    
+    }
+    
+    
+// ----------------------------------------------------------------------------
+// CBlidNoteDialog::ConstructL
+// Symbian 2nd phase constructor can leave.
+// ----------------------------------------------------------------------------
+//
+void CBlidNoteDialog::ConstructL( )
+    {
+    iIsNoteDisplayed = EFalse; 
+    }
+    
+    
+// ----------------------------------------------------------------------------
+// CBlidNoteDialog::NewL
+// Two-phased constructor.
+// ----------------------------------------------------------------------------
+//
+CBlidNoteDialog* CBlidNoteDialog::NewL()
+    {
+    CBlidNoteDialog* self = new( ELeave ) CBlidNoteDialog();    
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop( self );
+    return self;
+    }    
+    
+    
+// ----------------------------------------------------------------------------
+// CBlidNoteDialog::~CBlidNoteDialog
+// ----------------------------------------------------------------------------
+//
+CBlidNoteDialog::~CBlidNoteDialog()
+    {
+    Cancel();
+    }  
+    
+    
+// ----------------------------------------------------------------------------
+// CBlidNoteDialog::RunL
+// ----------------------------------------------------------------------------
+//
+void CBlidNoteDialog::RunL()
+    {
+    switch( iStatus.Int() ) 
+        {
+        case KErrNone:
+            {
+            if(!iIsNoteDisplayed)
+                {
+                iIsNoteDisplayed = ETrue;
+                CAknNoteDialog* dlg;
+                dlg = new (ELeave) CAknNoteDialog(CAknNoteDialog::EConfirmationTone,CAknNoteDialog::ENoTimeout);
+                dlg->ExecuteLD(R_TRIP_RESUME_CONFIRMATION_NOTE);
+                iIsNoteDisplayed = EFalse;
+                }
+            break;
+            }
+        default:
+            {
+            break;
+            }            
+        }
+    }
+    
+
+// ----------------------------------------------------------------------------
+// CBlidNoteDialog::DoCancel
+// ----------------------------------------------------------------------------
+//
+void CBlidNoteDialog::DoCancel()
+    {
+    }
+
+// ----------------------------------------------------------------------------
+// CBlidNoteDialog::ExecuteNoteDialogL
+// ----------------------------------------------------------------------------
+//
+void CBlidNoteDialog::ExecuteNoteDialog()
+    {
+    SetActive();  
+    TRequestStatus *status = &iStatus;  
+    User::RequestComplete(status, KErrNone);
+    }
+    
+//End of File
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/basiclocationinfodisplay/blid/ui/src/uid.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,23 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: MakMake generated UID file
+*
+*/
+
+
+// Makmake-generated uid source file
+#include <e32cmn.h>
+#pragma data_seg(".SYMBIAN")
+__EMULATOR_IMAGE_HEADER2(0x1000007a,0x100039ce,0x101f85a0,EPriorityForeground,0x0003f030u,0x00000000u,0x101f85a0,0x101fb657,0x00010000,0)
+#pragma data_seg()
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/basiclocationinfodisplay/group/bld.inf	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,29 @@
+/*
+* 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 BLID.
+*
+*/
+
+
+
+PRJ_PLATFORMS  
+DEFAULT
+
+PRJ_EXPORTS
+#include "../blid/group/bld.inf"
+
+
+PRJ_MMPFILES
+
+//  End of File  
Binary file eventsui/cenrep/2001E66D.cre has changed
Binary file eventsui/cenrep/2001E66D.txt has changed
Binary file eventsui/cenrep/keys_evtstorage.xls has changed
Binary file eventsui/conf/evtstorage.confml has changed
Binary file eventsui/conf/evtstorage_2001E66D.crml has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/data/backup_registration.xml	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,6 @@
+<?xml version="1.0" standalone="yes"?>
+<backup_registration version="1.0">
+    <proxy_data_manager sid = "0x10281E17" />
+    <dbms_backup policy="2001E663" />
+    <restore requires_reboot = "no"/>
+</backup_registration>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventseditor/bwins/evteditoru.def	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,7 @@
+EXPORTS
+	??1CEvtEventsDlg@@UAE@XZ @ 1 NONAME ; CEvtEventsDlg::~CEvtEventsDlg(void)
+	?ExecuteLD@CEvtEventsDlg@@QAEHXZ @ 2 NONAME ; int CEvtEventsDlg::ExecuteLD(void)
+	?NewL@CEvtEventsDlg@@SAPAV1@HAAVCEvtEvent@@AAVCEvtMgmtUiEngine@@H@Z @ 3 NONAME ; class CEvtEventsDlg * CEvtEventsDlg::NewL(int, class CEvtEvent &, class CEvtMgmtUiEngine &, int)
+	?SetHelpContext@CEvtEventsDlg@@QAEXVTCoeHelpContext@@@Z @ 4 NONAME ; void CEvtEventsDlg::SetHelpContext(class TCoeHelpContext)
+	?SetMopParent@CEvtEventsDlg@@QAEXPAVMObjectProvider@@@Z @ 5 NONAME ; void CEvtEventsDlg::SetMopParent(class MObjectProvider *)
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventseditor/data/evtmgmteditorui.rss	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,1365 @@
+/*
+* 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:   Resource file defintion for project Events Management UI
+*
+*/
+
+
+
+//  RESOURCE IDENTIFIER
+NAME    EVEN // 4 letter ID
+
+//  SYSTEM INCLUDES
+#include <eikon.rh>
+#include <appinfo.rh>
+#include <avkon.rsg>
+#include <avkon.rh>
+#include <avkon.mbg>
+#include <bldvariant.hrh>
+#include <avkon.hrh>
+#include <avkon.loc>
+#include <data_caging_paths_strings.hrh>
+#include <AiwCommon.hrh>
+#include <AiwCommon.rh>
+#include <evtui.loc>
+
+// USER INCLUDES
+#include "evtmgmteditorui.hrh"
+
+//  RESOURCE DEFINITIONS 
+
+// ---------------------------------------------------------------------------
+// RESOURCE RSS_SIGNATURE 
+// ---------------------------------------------------------------------------
+//
+RESOURCE RSS_SIGNATURE 
+    {
+    }
+
+// ---------------------------------------------------------------------------
+// RESOURCE TBUF
+// ---------------------------------------------------------------------------
+//
+RESOURCE TBUF 
+    {
+    buf="evtmgmteditorui";
+    }
+
+// ---------------------------------------------------------------------------
+// RESOURCE MENU_PANE r_evtmgmtui_startup_appmenu
+// Menu pane for generic application level settings
+// ---------------------------------------------------------------------------
+//
+RESOURCE MENU_PANE r_evtmgmtui_startup_appmenu
+    {
+    items=
+        {
+        MENU_ITEM 
+            { 
+            command = EAknCmdHelp; 
+            txt = qtn_options_help; 
+            },
+        MENU_ITEM 
+            {
+            command = EAknCmdExit;  
+            txt = qtn_options_exit; 
+            }
+        };
+    }
+    
+//----------------------------------------------------
+// RESOURCE TBUF r_evtui_createnew_list
+// List box item for creating new event
+//----------------------------------------------------
+//
+RESOURCE TBUF r_evtui_createnew_list
+    {
+    buf = qtn_locev_list_create_new_event;
+    }
+
+/***************** Form ****************************************************/
+
+//----------------------------------------------------
+// RESOURCE DIALOG r_evtmgmtui_createevent_form_dialog
+// Form dialog to create an event
+//----------------------------------------------------
+//
+RESOURCE DIALOG r_evtmgmtui_createevent_form_dialog
+{
+    flags = EEikDialogFlagNoDrag | 
+            EEikDialogFlagFillAppClientRect |
+            EEikDialogFlagWait |
+            EEikDialogFlagCbaButtons;
+            
+    buttons = r_evtmgmtui_createevent_cba_nomsk;
+    form = r_evtmgmtui_createevent_form;
+}
+
+//----------------------------------------------------
+// RESOURCE DIALOG r_evtmgmtui_createevent_form
+// Form to create an event
+//----------------------------------------------------
+//
+RESOURCE FORM r_evtmgmtui_createevent_form
+    {
+    flags =  EEikFormUseDoubleSpacedFormat ;
+    items =
+        {
+        DLG_LINE
+            {
+            type=EEikCtEdwin;
+            prompt=qtn_locev_list_lbl_subject;
+            id=EEvtMgmtUiDlgCIdSubject;
+            itemflags = EEikDlgItemTakesEnterKey | EEikDlgItemOfferAllHotKeys;
+            control=EDWIN 
+                {
+                flags = EEikEdwinJustAutoCurEnd | EEikEdwinResizable | EEikEdwinNoLineOrParaBreaks  ;
+                width=16; 
+                maxlength=160;
+                lines=10;
+                 };
+            },
+         DLG_LINE
+            {
+            type=EEikCtEdwin;
+            prompt=qtn_locev_list_lbl_place;
+            id=EEvtMgmtUiDlgCIdPlace;
+            itemflags = EEikDlgItemAsLabel | EEikDlgItemTakesEnterKey | EEikDlgItemOfferAllHotKeys;
+            control=EDWIN 
+                {       
+                flags = EEikEdwinResizable | EEikEdwinReadOnly | EEikEdwinAvkonDisableCursor | EEikEdwinNoAutoSelection ;
+                maxlength=80;
+                lines=2;
+                max_view_height_in_lines=2;                
+                };
+            }, 
+       DLG_LINE
+             {
+             type = EAknCtPopupFieldText;
+             prompt = qtn_locev_list_lbl_repeat;
+             id = EEvtMgmtUiDlgCIdRepeat;
+             itemflags = EEikDlgItemTakesEnterKey | EEikDlgItemOfferAllHotKeys;
+             control = POPUP_FIELD_TEXT
+                 {
+                 popupfield = POPUP_FIELD
+                     {
+                     width = 50;
+                     };
+                 textarray = r_evtmgmtui_createeventform_repeatarray;
+                 active = 0;
+                 };
+             },    
+       DLG_LINE
+             {
+             type = EEikCtEdwin;
+	           prompt=qtn_locev_list_lbl_alert_tone;
+	           id=EEvtMgmtUiDlgCIdAssignTone;
+	           itemflags = EEikDlgItemTakesEnterKey | EEikDlgItemOfferAllHotKeys;
+	           control=EDWIN 
+	               {
+	               maxlength=0;
+	               flags = EEikEdwinReadOnly  | EEikEdwinAvkonDisableCursor | EEikEdwinNoAutoSelection;
+	               };
+             }, 
+       DLG_LINE
+             {
+							type = EAknCtPopupFieldText;
+							prompt = qtn_locev_list_lbl_audio_loop;
+							id = EEvtMgmtUiDlgCIdAudioLoop;
+							itemflags = EEikDlgItemTakesEnterKey | EEikDlgItemOfferAllHotKeys;
+							control = POPUP_FIELD_TEXT
+							    {
+							    popupfield = POPUP_FIELD
+							        {
+							        width = 50;
+							        };
+							    textarray = r_evtmgmtui_createeventform_audiolooparray;
+							    active = 0;
+							    };
+             }, 
+       DLG_LINE
+             {
+             type = EAknCtPopupFieldText;
+             prompt = qtn_locev_list_lbl_status;
+             id = EEvtMgmtUiDlgCIdStatus;
+             itemflags = EEikDlgItemTakesEnterKey | EEikDlgItemOfferAllHotKeys;
+             control = POPUP_FIELD_TEXT
+                 {
+                 popupfield = POPUP_FIELD
+                     {
+                     width = 50;
+                     };
+                 textarray = r_evtmgmtui_createeventform_statusarray;
+                 active = 0;
+                 };
+             }
+        };
+    }
+    
+// ---------------------------------------------------------------------------
+// RESOURCE CBA r_evtmgmtui_createevent_cba
+// Control button array for events ui create event view
+// ---------------------------------------------------------------------------
+//  
+RESOURCE CBA r_evtmgmtui_createevent_cba
+    {
+    flags = 0;
+    buttons = 
+        {
+        CBA_BUTTON 
+            {
+            id = EAknSoftkeyOptions; 
+            txt = text_softkey_option;
+            },
+        CBA_BUTTON 
+            {
+            id = EAknSoftkeyDone; 
+            txt = text_softkey_done;
+            },
+        CBA_BUTTON
+            {
+            id = EAknFormCmdEdit; 
+            txt = qtn_locev_options_change;
+            }
+        };
+    }
+
+// ---------------------------------------------------------------------------
+// RESOURCE CBA r_evtmgmtui_createevent_cba_edit
+// Control button array for events ui create event view
+// ---------------------------------------------------------------------------
+// 
+RESOURCE CBA r_evtmgmtui_createevent_cba_edit
+    {
+    flags = 0;
+    buttons = 
+        {
+        CBA_BUTTON 
+            {
+            id = EAknSoftkeyOptions; 
+            txt = text_softkey_option;
+            },
+        CBA_BUTTON 
+            {
+            id = EAknSoftkeyDone; 
+            txt = text_softkey_done;
+            },
+        CBA_BUTTON
+            {
+            id = EAknFormCmdEdit; 
+            txt = qtn_form_litxt_edit;
+            }
+        };
+    }
+
+// ---------------------------------------------------------------------------
+// RESOURCE CBA r_evtmgmtui_createevent_cba_define
+// Control button array for events ui create event view
+// ---------------------------------------------------------------------------
+// 
+RESOURCE CBA r_evtmgmtui_createevent_cba_define
+    {
+    flags = 0;
+    buttons = 
+        {
+        CBA_BUTTON 
+            {
+            id = EAknSoftkeyOptions; 
+            txt = text_softkey_option;
+            },
+        CBA_BUTTON 
+            {
+            id = EAknSoftkeyDone; 
+            txt = text_softkey_done;
+            },
+        CBA_BUTTON
+            {
+            id = EAknFormCmdEdit; 
+            txt = qtn_msk_define;
+            }
+        };
+    }
+
+// ---------------------------------------------------------------------------
+// RESOURCE CBA r_evtmgmtui_createevent_cba_back
+// Control button array for events ui create event view
+// ---------------------------------------------------------------------------
+// 
+RESOURCE CBA r_evtmgmtui_createevent_cba_back
+    {
+    flags = 0;
+    buttons = 
+        {
+        CBA_BUTTON 
+            {
+            id = EAknSoftkeyOptions; 
+            txt = text_softkey_option;
+            },
+        CBA_BUTTON 
+            {
+            id = EAknSoftkeyBack; 
+            txt = text_softkey_back;
+            },
+        CBA_BUTTON
+            {
+            id = EAknFormCmdEdit; 
+            txt = qtn_locev_options_edit;
+            }
+        };
+    }
+// ---------------------------------------------------------------------------
+// RESOURCE MENU_BAR r_evtmgmtui_createeventform_menubar
+// Create Event Form UI's menubar structure
+// ---------------------------------------------------------------------------
+//
+RESOURCE MENU_BAR r_evtmgmtui_createeventform_menubar
+    {
+    titles=
+        {
+        MENU_TITLE 
+            {
+            menu_pane = r_evtmgmtui_createeventform_menu; 
+            txt = ""; 
+            },
+        MENU_TITLE 
+            {
+            menu_pane = r_evtmgmtui_startup_appmenu;
+            txt = ""; 
+            }
+        };
+    }
+
+// ---------------------------------------------------------------------------
+// RESOURCE MENU_BAR r_evtmgmtui_createeventform_adddesc_menu
+// Create Event Form UI's cascaded menu structure to add description
+// ---------------------------------------------------------------------------
+//
+RESOURCE MENU_PANE r_evtmgmtui_createeventform_adddesc_menu
+    {
+    items=
+        {
+        MENU_ITEM 
+                { 
+                command = EEvtEditorCmdAddDescNew; 
+                txt = qtn_locev_options_new_desc; 
+                },
+        MENU_ITEM 
+                {
+                command = EEvtEditorCmdAddDescFromExisting; 
+                txt = qtn_locev_options_from_notes; 
+                }
+        };
+    }
+                
+// ---------------------------------------------------------------------------
+// RESOURCE MENU_BAR r_evtmgmtui_createeventform_menu
+// Create Event Form UI's menu structure
+// ---------------------------------------------------------------------------
+//
+RESOURCE MENU_PANE r_evtmgmtui_createeventform_menu
+    {
+    items=
+        {    
+        MENU_ITEM 
+             {
+             command = EEvtEditorCmdEditDesc; 
+             txt = qtn_locev_options_edit_desc; 
+             },
+        MENU_ITEM 
+             {
+             command = EEvtEditorCmdSetPlace; 
+             txt = qtn_locev_options_setplace; 
+             },  
+        MENU_ITEM 
+             {
+             command = EEvtEditorCmdDiscard; 
+             txt = qtn_locev_options_discard; 
+             },
+        MENU_ITEM 
+               {
+               command = EEvtEditorCmdAssignTone; 
+               txt = qtn_locev_options_set_tone; 
+               },
+         MENU_ITEM 
+                {
+                command = EEvtEditorCmdAddDesc; 
+                txt = qtn_locev_options_add_desc; 
+                cascade = r_evtmgmtui_createeventform_adddesc_menu;
+                },        
+        MENU_ITEM 
+               {
+               command = EEvtEditorCmdRemoveDesc; 
+               txt = qtn_locev_options_remove_desc;             
+               },
+        MENU_ITEM 
+            {
+            command = EEvtEditorCmdActivate; 
+            txt = qtn_locev_options_activate; 
+            }, 
+        MENU_ITEM 
+           {
+           command = EEvtEditorCmdSaveDraft; 
+           txt = qtn_locev_options_setdraft; 
+           },
+        MENU_ITEM 
+            {
+            command = EEvtEditorCmdShowOnMap; 
+            txt = qtn_locev_options_show_map; 
+            }, 
+        MENU_ITEM 
+            {
+            command = EEvtEditorCmdNavigateToPlace; 
+            txt = qtn_locev_options_navigate; 
+            },
+       MENU_ITEM 
+          {
+          command = EEvtEditorCmdDelete; 
+          txt = qtn_locev_options_delete; 
+          },
+       MENU_ITEM 
+          {
+          command = EEvtMgmtUiEventUiPosSettings; 
+          txt = qtn_locev_options_posi_settings; 
+          }
+        };
+    }
+
+//----------------------------------------------------
+// RESOURCE DIALOG r_evtui_createnewform_dlgline_radius
+// Event Editot Dialog line for radius
+//----------------------------------------------------
+//
+RESOURCE  DLG_LINE r_evtui_createnewform_dlgline_radius
+       {
+       type=EAknCtUnitEditor;
+       prompt=qtn_locev_list_lbl_radius;
+       id=EEvtMgmtUiDlgCIdRadius;
+       itemflags = EEikDlgItemTakesEnterKey | EEikDlgItemOfferAllHotKeys;
+       control=AVKON_UNIT_EDITOR 
+           {       
+           min=0.1;
+           max=1.5;
+           value=0.1;
+           unit = EAknUnitEditorKilometer ;
+           };
+       }
+               
+//----------------------------------------------------
+// RESOURCE DIALOG r_evtui_createnewform_dlgline_desc
+// Event Editot Dialog line for description
+//----------------------------------------------------
+//
+RESOURCE DLG_LINE r_evtui_createnewform_dlgline_desc
+      {
+      type=EEikCtEdwin;
+      prompt=qtn_locev_list_lbl_description;
+      id=EEvtMgmtUiDlgCIdDesc;
+      itemflags = EEikDlgItemTakesEnterKey | EEikDlgItemOfferAllHotKeys;
+      control=EDWIN 
+          {
+          maxlength=0;
+          flags = EEikEdwinReadOnly  | EEikEdwinAvkonDisableCursor | EEikEdwinNoAutoSelection ;
+          };
+      }
+
+//----------------------------------------------------
+// RESOURCE DIALOG r_evtui_createnewform_dlgline_assignedtone
+// Event Editot Dialog line for assigned tone
+//----------------------------------------------------
+//
+RESOURCE DLG_LINE r_evtui_createnewform_dlgline_assignedtone
+           {
+           type=EEikCtEdwin;
+           prompt=qtn_locev_list_lbl_alert_tone;
+           id=EEvtMgmtUiDlgCIdAssignTone;
+           itemflags = EEikDlgItemTakesEnterKey | EEikDlgItemOfferAllHotKeys;
+           control=EDWIN 
+               {
+               maxlength=0;
+               flags = EEikEdwinReadOnly  | EEikEdwinAvkonDisableCursor | EEikEdwinNoAutoSelection ;
+               };
+           }
+
+//----------------------------------------------------
+// RESOURCE DIALOG r_evtui_createnewform_dlgline_audioloop
+// Event Editot Dialog line for audio loop
+//----------------------------------------------------
+//
+ RESOURCE DLG_LINE r_evtui_createnewform_dlgline_audioloop
+        {
+        type = EAknCtPopupFieldText;
+        prompt = qtn_locev_list_lbl_audio_loop;
+        id = EEvtMgmtUiDlgCIdAudioLoop;
+        itemflags = EEikDlgItemTakesEnterKey | EEikDlgItemOfferAllHotKeys;
+        control = POPUP_FIELD_TEXT
+            {
+            popupfield = POPUP_FIELD
+                {
+                width = 50;
+                };
+            textarray = r_evtmgmtui_createeventform_audiolooparray;
+            active = 0;
+            };
+        }
+
+//----------------------------------------------------
+// RESOURCE ARRAY r_evtmgmtui_createeventform_repeatarray
+// array for repeat pop-up dialog
+//----------------------------------------------------
+//
+RESOURCE ARRAY r_evtmgmtui_createeventform_repeatarray
+    {
+    items =
+        {
+        LBUF{ txt = qtn_locev_list_value_repeat_on; },
+        LBUF{ txt = qtn_locev_list_value_repeat_off; }                  
+        };
+    }
+
+ //----------------------------------------------------
+ // RESOURCE ARRAY r_evtmgmtui_createeventform_expirationarray
+ // array for expiration pop-up dialog
+ //----------------------------------------------------
+ //
+RESOURCE ARRAY r_evtmgmtui_createeventform_expirationarray
+    {
+    items =
+        {
+        LBUF{ txt = qtn_evtui_createnew_form_expirationoption_none; },
+        LBUF{ txt = qtn_evtui_createnew_form_expirationoption_defined; }                  
+        };
+    }
+
+//----------------------------------------------------
+// RESOURCE ARRAY r_evtmgmtui_createeventform_audiolooparray
+// array for audio-loop pop-up dialog
+//----------------------------------------------------
+//
+RESOURCE ARRAY r_evtmgmtui_createeventform_audiolooparray
+    {
+    items =
+        {
+        LBUF{ txt = qtn_locev_list_value_loop_off; },
+        LBUF{ txt = qtn_locev_list_value_loop_on; }                  
+        };
+    }
+
+//----------------------------------------------------
+// RESOURCE ARRAY r_evtmgmtui_createeventform_statusarray
+// array for status pop-up dialog
+//----------------------------------------------------
+//
+RESOURCE ARRAY r_evtmgmtui_createeventform_statusarray
+    {
+    items =
+        {
+        LBUF{ txt = qtn_locev_list_value_active; },
+        LBUF{ txt = qtn_locev_list_value_draft; },
+        LBUF{ txt = qtn_locev_list_value_completed; }        
+        };
+    }
+
+//----------------------------------------------------
+// RESOURCE ARRAY r_evtmgmtui_evteditor_setplacearray
+// array for set place pop-up dialog
+//----------------------------------------------------
+//
+RESOURCE ARRAY r_evtmgmtui_evteditor_setplacearray
+    {
+    items =
+        {
+        LBUF{ txt = qtn_locev_list_current_place; },
+        LBUF{ txt = qtn_locev_list_landmarks; } ,
+        LBUF{ txt = qtn_locev_list_from_map; } 
+        };
+    }
+
+//----------------------------------------------------
+// RESOURCE ARRAY r_evtmgmtui_evteditor_assigntonearray
+// array for assign tone pop-up dialog
+//----------------------------------------------------
+//
+RESOURCE ARRAY r_evtmgmtui_evteditor_assigntonearray
+    {
+    items =
+        {
+        LBUF{ txt = qtn_locev_list_alert_tone; },
+        LBUF{ txt = qtn_locev_list_record_clip; }        
+        };
+    }
+
+// ---------------------------------------------------------------------------
+// RESOURCE CBA r_evtmgmtui_listquery_cba
+// Control button array for listbox popup dialog
+// ---------------------------------------------------------------------------
+//  
+RESOURCE CBA r_evtmgmtui_listquery_cba
+    {
+    flags = 0;
+    buttons = 
+        {
+        CBA_BUTTON 
+            {
+            id = EAknSoftkeySelect; 
+            txt = text_softkey_select;
+            },
+        CBA_BUTTON
+            {
+            id = EAknSoftkeyCancel; 
+            txt = text_softkey_cancel;
+            },    
+        CBA_BUTTON 
+            {
+            id = EAknSoftkeySelect; 
+            txt = qtn_msk_select;
+            }       
+        };
+    }
+
+// ---------------------------------------------------------------------------
+// RESOURCE CBA r_evtmgmtui_createevent_cba_nomsk
+// Control button array for events ui create event view
+// ---------------------------------------------------------------------------
+// 
+RESOURCE CBA r_evtmgmtui_createevent_cba_nomsk
+    {
+    flags = 0;
+    buttons = 
+        {
+        CBA_BUTTON 
+            {
+            id = EAknSoftkeyOptions; 
+            txt = text_softkey_option;
+            },
+        CBA_BUTTON 
+            {
+            id = EAknSoftkeyDone; 
+            txt = text_softkey_done;
+            },
+        CBA_BUTTON
+            {
+            id = EAknFormCmdEdit; 
+            txt = "";
+            }
+        };
+    }
+    
+//------------------------------------------------------------------------------
+// RESOURCE DIALOG r_evtui_confirmation_query
+// Confirmation Query Dialog
+//------------------------------------------------------------------------------
+//
+RESOURCE DIALOG r_evtui_confirmation_query
+    {
+    flags = EGeneralQueryFlags;
+    buttons = R_AVKON_SOFTKEYS_YES_NO;
+    items =
+        {
+        DLG_LINE
+            {
+            type = EAknCtQuery;
+            id = EGeneralQuery;
+            control = AVKON_CONFIRMATION_QUERY
+                {
+                layout = EConfirmationQueryLayout;                
+                };
+            }
+        };
+    }
+
+//----------------------------------------------------
+// RESOURCE AVKON_LIST_QUERY r_evtmgmtui_list_query
+// General Listbox dialog
+//----------------------------------------------------
+//
+RESOURCE AVKON_LIST_QUERY r_evtmgmtui_list_query
+    {
+    flags = EGeneralQueryFlags;
+    softkeys = r_evtmgmtui_listquery_cba;
+    items =
+        {
+        AVKON_LIST_QUERY_DLG_LINE
+            {
+            control = AVKON_LIST_QUERY_CONTROL
+                {
+                listtype = EAknCtSingleGraphicPopupMenuListBox;
+                listbox = AVKON_LIST_QUERY_LIST
+                    { 
+                    //array_id=r_evtmgmtui_createeventform_audiolooparray;
+                    };
+                heading = qtn_locev_options_setplace;
+                };
+            }
+        };
+    }
+//------------------------------------------------------------------------------
+// RESOURCE DIALOG r_evtui_message_query
+// Message Query Dialog
+//------------------------------------------------------------------------------
+//
+RESOURCE DIALOG r_evtui_message_query
+{
+   flags = EGeneralQueryFlags;
+   buttons = R_AVKON_SOFTKEYS_OK_CANCEL;
+   items=
+       {
+       DLG_LINE
+          {
+            type = EAknCtPopupHeadingPane;
+            id = EAknMessageQueryHeaderId;
+            itemflags = EEikDlgItemNonFocusing;
+            control = AVKON_HEADING
+                {                  
+                headinglayout=R_AVKON_LIST_HEADING_PANE_POPUPS;
+                };
+          },
+       DLG_LINE
+          {
+            type = EAknCtMessageQuery;
+            id = EAknMessageQueryContentId;
+            control = AVKON_MESSAGE_QUERY
+                {
+                };
+          }
+       };
+}
+
+// ---------------------------------------------------------------------------
+// r_evtui_message_query_empty
+// Query dialog showing info note
+// ---------------------------------------------------------------------------
+//
+RESOURCE DIALOG r_evtui_message_query_empty
+    {
+    flags = EAknInformationNoteFlags | EEikDialogFlagNoBorder | EEikDialogFlagNoShadow;
+    buttons = R_AVKON_SOFTKEYS_EMPTY;
+    items =
+        {
+        DLG_LINE 
+            {
+            type = EAknCtPopupHeadingPane;
+            id = EAknMessageQueryHeaderId;
+            control = AVKON_HEADING
+                {
+                headinglayout = R_AVKON_WML_SIGN_QUERY_HEADING_PANE;
+                };
+            },
+        DLG_LINE
+            {
+            type = EAknCtQuery;
+            id = EGeneralQuery;
+            control = AVKON_CONFIRMATION_QUERY
+                {
+                layout = EConfirmationQueryLayout;  
+                bmpfile = "z:\\resource\\apps\\avkon2.mif";
+                bmpid = EMbmAvkonQgn_note_info;
+                bmpmask = EMbmAvkonQgn_note_info_mask;
+                };
+            }           
+        };
+    }  
+
+RESOURCE IMAGE r_evtui_infonote_image
+    {
+     bmpfile = "z:\\resource\\apps\\avkon2.mif";
+     bmpid = EMbmAvkonQgn_note_info;
+     bmpmask = EMbmAvkonQgn_note_info_mask;
+    }
+
+//----------------------------------------------------
+//   
+//    r_evtmgmtui_waitdlg_cancel
+//    Progress note 
+//
+//----------------------------------------------------
+//
+RESOURCE DIALOG r_evtmgmtui_waitdlg_cancel
+    {   
+    flags = EAknWaitNoteFlags | EEikDialogFlagWait;
+    buttons = R_AVKON_SOFTKEYS_CANCEL;
+    items =
+        {
+        DLG_LINE
+            {
+            type = EAknCtNote;
+            id = EGeneralNote;
+            control= AVKON_NOTE 
+                { 
+                layout = EWaitLayout;
+                singular_label = qtn_locev_note_request_loc;
+                animation = R_QGN_GRAF_WAIT_BAR_ANIM;
+                };
+            }
+        };
+    }
+
+//----------------------------------------------------
+//   
+//    r_evtmgmtui_waitdlg
+//    Progress note 
+//
+//----------------------------------------------------
+//
+RESOURCE DIALOG r_evteditor_waitdlg
+    {   
+    flags = EAknWaitNoteFlags | EEikDialogFlagWait;
+    buttons = R_AVKON_SOFTKEYS_EMPTY;
+    items =
+        {
+        DLG_LINE
+            {
+            type = EAknCtNote;
+            id = EGeneralNote;
+            control= AVKON_NOTE 
+                { 
+                layout = EWaitLayout;
+                singular_label = qtn_locev_note_request_loc;
+                animation = R_QGN_GRAF_WAIT_BAR_ANIM;
+                };
+            }
+        };
+    }
+
+//----------------------------------------------------
+//   
+//    r_evtmgmtui_aiw_interest_selectfrommap
+//    AIW interest for option landmark from map
+//
+//----------------------------------------------------
+//
+RESOURCE AIW_INTEREST r_evtmgmtui_aiw_interest_selectfrommap
+    {
+    items =
+        {
+        AIW_CRITERIA_ITEM
+            {
+            id = EEvtMgmtUiFromMapPlaceholder;
+            serviceCmd = KAiwCmdMnSelectFromMap;
+            contentType = "application/x-landmark";
+            serviceClass = KAiwClassBase;           
+            }
+        };
+    }
+
+
+//----------------------------------------------------
+//   
+//    r_evtmgmtui_aiw_interest_showonmap
+//    AIW interest for option show on map
+//
+//----------------------------------------------------
+//
+RESOURCE AIW_INTEREST r_evtmgmtui_aiw_interest_showonmap
+    {
+    items =
+        {
+        AIW_CRITERIA_ITEM
+            {
+            id = EEvtMgmtUiShowOnMapPlaceHolder;
+            serviceCmd = KAiwCmdMnShowMap;
+            contentType = "application/x-landmark";
+            serviceClass = KAiwClassBase;
+            }
+        };
+    }
+
+//----------------------------------------------------
+//   
+//    r_evtmgmtui_aiw_interest_navigateto
+//    AIW interest for option navigate to
+//
+//----------------------------------------------------
+//
+RESOURCE AIW_INTEREST r_evtmgmtui_aiw_interest_navigateto
+    {
+    items =
+        {
+        AIW_CRITERIA_ITEM
+            {
+            id = EEvtMgmtUiNavigateToPlaceHolder;
+            serviceCmd = KAiwCmdMnNavigateTo;
+            contentType = "application/x-landmark";
+            serviceClass = KAiwClassBase;
+            }
+        };
+    }
+
+//-----------------------------------------------------------------------------
+//
+//  r_evtui_place_data_query
+//
+//-----------------------------------------------------------------------------
+RESOURCE DIALOG r_evtui_place_data_query
+    {
+    flags=EGeneralQueryFlags;
+    buttons=R_AVKON_SOFTKEYS_OK_CANCEL;
+    items=
+        {
+        DLG_LINE
+            {
+            type=EAknCtQuery;
+            id=EGeneralQuery;
+            control= AVKON_DATA_QUERY 
+                { 
+                    layout = EStaticSizeDataLayout; // Use this when you have a heading in data query
+                    label = "";
+                    control=EDWIN 
+                        {
+                        flags= EEikEdwinNoHorizScrolling | EEikEdwinResizable; 
+                        maxlength=80; 
+                        width=16; 
+                        lines=1; 
+                        };
+                };
+            }
+        };
+    }
+
+//----------------------------------------------------
+// RESOURCE TBUF r_locev_note_prompt_text
+// Text Query prompt
+//----------------------------------------------------
+//
+RESOURCE TBUF r_locev_note_prompt_text
+    {
+    buf = qtn_locev_note_prompt_text;
+    }
+    
+//----------------------------------------------------
+// RESOURCE TBUF r_evtui_createnew_form_cmdedit
+// Menu item for edit attributes of the event
+//----------------------------------------------------
+//
+RESOURCE TBUF r_evtui_createnew_form_cmdedit
+    {
+    buf = qtn_locev_options_edit;
+    }
+
+//----------------------------------------------------
+// RESOURCE TBUF r_evtui_createnew_form_cmdchange
+// Menu item for change attributes of the event
+//----------------------------------------------------
+//
+RESOURCE TBUF r_evtui_createnew_form_cmdchange
+    {
+    buf = qtn_locev_options_change;
+    }
+
+//----------------------------------------------------
+// RESOURCE TBUF r_evtui_createnew_form_placepopup_title
+// title  for 'Set Place' dialog 
+//----------------------------------------------------
+//
+RESOURCE TBUF r_evtui_createnew_form_placepopup_title
+    {
+    buf = qtn_locev_heading_set_place;
+    }
+
+//----------------------------------------------------
+// RESOURCE TBUF r_evtui_createnew_form_placepopupoption_currentplace
+// 'Current Place' pop-up option for 'Set Place' dialog 
+//----------------------------------------------------
+//
+RESOURCE TBUF r_evtui_createnew_form_placepopupoption_currentplace
+    {
+    buf = qtn_locev_list_current_place;
+    }
+
+//----------------------------------------------------
+// RESOURCE TBUF r_evtui_createnew_form_placepopupoption_landmark
+// 'Landmark' pop-up option for 'Set Place' dialog
+//----------------------------------------------------
+//
+RESOURCE TBUF r_evtui_createnew_form_placepopupoption_landmark
+    {
+    buf = qtn_locev_list_landmarks;
+    }
+
+//----------------------------------------------------
+// RESOURCE TBUF r_evtui_createnew_form_placepopupoption_frommap
+// 'From map' pop-up option for 'Set Place' dialog
+//----------------------------------------------------
+//
+RESOURCE TBUF r_evtui_createnew_form_placepopupoption_frommap
+    {
+    buf = qtn_locev_list_from_map;
+    }
+    
+//----------------------------------------------------
+// RESOURCE TBUF r_evtui_createnew_form_confirmation_deleteevent
+// Confirmation text to delete event
+//----------------------------------------------------
+//
+RESOURCE TBUF r_evtui_createnew_form_confirmation_deleteevent
+    {
+    buf = qtn_locev_confirm_delete_event;
+    }
+
+//----------------------------------------------------
+// RESOURCE TBUF r_evtui_createnew_form_defaultnavititle
+// Default navipane title
+//----------------------------------------------------
+//
+RESOURCE TBUF r_evtui_createnew_form_defaultnavititle
+    {
+    buf = qtn_locev_title_new_event;
+    }
+
+//----------------------------------------------------
+// RESOURCE TBUF r_evtui_createnew_form_assigntonepopup_title
+// Title text for assign-tone popup dialog
+//----------------------------------------------------
+//
+RESOURCE TBUF r_evtui_createnew_form_assigntonepopup_title
+    {
+    buf = qtn_locev_list_heading_alert_tone;
+    }
+
+//----------------------------------------------------
+// RESOURCE TBUF r_evtui_createnew_form_assignpopuptoneoptions_tone
+// popup option for assign-tone popup dialog
+//----------------------------------------------------
+//
+RESOURCE TBUF r_evtui_createnew_form_assigntonepopupoptions_tone
+    {
+    buf = qtn_locev_list_alert_tone;
+    }
+
+//----------------------------------------------------
+// RESOURCE TBUF r_evtui_createnew_form_assigntonepopupoptions_recordnew
+// popup option for assign-tone popup dialog
+//----------------------------------------------------
+//
+RESOURCE TBUF r_evtui_createnew_form_assigntonepopupoptions_recordnew
+    {
+    buf = qtn_locev_list_record_clip;
+    }
+
+//----------------------------------------------------
+// RESOURCE TBUF r_evtui_createnew_form_defined
+// default text for place 
+//----------------------------------------------------
+//
+RESOURCE TBUF r_evtui_createnew_form_defined
+    {
+    buf = qtn_locev_list_value_define;
+    }
+//----------------------------------------------------
+// RESOURCE TBUF r_evtui_editor_adddesc_title
+// title for notepad editor dialog 
+//----------------------------------------------------
+//
+RESOURCE TBUF r_evtui_editor_adddesc_title
+    {
+    buf = qtn_locev_list_heading_add_desc;
+    }
+//----------------------------------------------------
+// RESOURCE TBUF r_evtui_unnamed
+// List box entry for unnamed trigger 
+//----------------------------------------------------
+//
+RESOURCE TBUF r_evtui_unnamed
+    {
+    buf = qtn_locev_list_unnamed;
+    }
+    
+//----------------------------------------------------
+// RESOURCE TBUF r_evtui_retry_requesting_location
+// Retry message when current location retrieval fails
+//----------------------------------------------------
+//
+RESOURCE TBUF r_evtui_retry_requesting_location
+    {
+    buf = qtn_locev_note_saving_failed;
+    }
+
+//----------------------------------------------------
+// RESOURCE TBUF r_evtui_cancel_requesting_location
+// Mesaage when current location retrieval is cancelled
+//----------------------------------------------------
+//
+RESOURCE TBUF r_evtui_cancel_requesting_location
+    {
+    buf = qtn_locev_note_not_saved;
+    }
+//----------------------------------------------------
+// RESOURCE TBUF r_evtui_positioningerror
+// Error mesaage when no positioning method is enabled
+//----------------------------------------------------
+//
+RESOURCE TBUF r_evtui_positioningerror
+    {
+    buf = qtn_locev_note_positioning;
+    }
+
+//----------------------------------------------------
+// RESOURCE TBUF r_evtui_positioningerror_link
+// Error mesaage as part of link when no positioning method is enabled
+//----------------------------------------------------
+//
+RESOURCE TBUF r_evtui_positioningerror_link
+    {
+    buf = qtn_locev_note_positioning_link;
+    }
+
+//----------------------------------------------------
+// RESOURCE TBUF r_evtui_positioningerror_header
+// Error mesaage title when no positioning method is enabled
+//----------------------------------------------------
+//
+RESOURCE TBUF r_evtui_positioningerror_header
+    {
+    buf = qtn_locev_note_heading_positioning;
+    }
+
+//----------------------------------------------------
+// RESOURCE TBUF r_evtui_landmark_locmiss_error
+// Error message when landmark withouth coordinate informatio is selected.
+//----------------------------------------------------
+//
+RESOURCE TBUF r_evtui_landmark_locmiss_error
+    {
+    buf = qtn_locev_note_invalid_lm;
+    }
+
+//----------------------------------------------------
+// RESOURCE TBUF r_evtui_landmark_locmiss_error
+// Confirmation message before replacing old place
+//----------------------------------------------------
+//
+RESOURCE TBUF r_evtui_editor_confirm_placesave
+    {
+    buf = qtn_locev_note_replace_details;
+    }
+
+//----------------------------------------------------
+// RESOURCE TBUF r_evtui_wait_requesting_location
+// Wait note text when waiting response for a location request.
+//----------------------------------------------------
+//
+RESOURCE TBUF r_evtui_wait_requesting_location
+    {
+    buf = qtn_locev_note_request_loc;
+    }
+
+//----------------------------------------------------
+// RESOURCE TBUF r_locev_note_saving_event
+// Wait note text while saving event
+//----------------------------------------------------
+//
+RESOURCE TBUF r_locev_note_saving_event
+    {
+    buf = qtn_locev_note_saving_event;
+    }
+
+//----------------------------------------------------
+// RESOURCE TBUF r_locev_not deleting
+// Wait note while deleting event
+//----------------------------------------------------
+//
+RESOURCE TBUF r_locev_note_deleting
+    {
+    buf = qtn_locev_note_deleting;
+    }
+    
+//----------------------------------------------------
+// RESOURCE TBUF r_locev_note_list_acc_unknown
+// Accuracy note after retrieval of current location.
+//----------------------------------------------------
+//
+RESOURCE TBUF r_locev_note_list_acc_unknown
+    {
+    buf = qtn_locev_note_txt_acc_unknown;
+    }
+ 
+//----------------------------------------------------
+// RESOURCE TBUF r_evtui_ringtoneselect_off
+// To add 'Off' in ringtone selection dialog.
+//----------------------------------------------------
+//
+RESOURCE TBUF r_evtui_ringtoneselect_off
+    {
+    buf = qtn_locev_list_value_alert_off;
+    }
+
+//----------------------------------------------------
+// RESOURCE TBUF r_evtui_ringtoneselect_off
+// To add 'Off' in ringtone selection dialog.
+//----------------------------------------------------
+//
+RESOURCE TBUF r_evtui_accuracylevel_low
+    {
+    buf = qtn_locev_note_heading_low_acc;
+    }
+
+//----------------------------------------------------
+// RESOURCE TBUF r_evtui_ringtoneselect_off
+// To add 'Off' in ringtone selection dialog.
+//----------------------------------------------------
+//
+RESOURCE TBUF r_evtui_accuracylevel_medium
+    {
+    buf = qtn_locev_note_heading_medium_acc;
+    }
+
+//----------------------------------------------------
+// RESOURCE TBUF r_evtui_ringtoneselect_off
+// To add 'Off' in ringtone selection dialog.
+//----------------------------------------------------
+//
+RESOURCE TBUF r_evtui_accuracylevel_high
+    {
+    buf = qtn_locev_note_heading_high_acc;
+    }
+
+//----------------------------------------------------
+// RESOURCE TBUF r_evtui_unit_km
+// KM unit
+//----------------------------------------------------
+//
+RESOURCE TBUF r_evtui_unit_km
+    {
+    buf = qtn_locev_list_lbl_radius_km;
+    }
+
+//----------------------------------------------------
+// RESOURCE TBUF r_evtui_unit_mile
+// Mile unit
+//----------------------------------------------------
+//
+RESOURCE TBUF r_evtui_unit_miles
+    {
+    buf = qtn_locev_list_lbl_radius_miles;
+    }
+
+//----------------------------------------------------
+// RESOURCE TBUF r_locev_query_discard_changes
+// Confirmation note text while discarding changes in editor
+//----------------------------------------------------
+//
+RESOURCE TBUF r_locev_query_discard_changes
+    {
+    buf = qtn_locev_query_discard_changes;
+    }
+
+//----------------------------------------------------
+// RESOURCE TBUF r_locev_note_missed_info
+// Information note text when mandatory fields are not filled
+//----------------------------------------------------
+//
+RESOURCE TBUF r_locev_note_missed_info
+    {
+    buf = qtn_locev_note_missed_info;
+    }
+
+//----------------------------------------------------
+// RESOURCE TBUF r_locev_note_singleevt_delete
+// Wait note text while deleting single event
+//----------------------------------------------------
+//
+RESOURCE TBUF r_locev_note_singleevt_delete
+    {
+    buf = qtn_locev_note_singleevt_delete;
+    }
+
+//----------------------------------------------------
+// RESOURCE TBUF r_locev_note_txt_acc_km
+// Unit value for display in accuracy note.
+//----------------------------------------------------
+//
+RESOURCE TBUF r_locev_note_txt_acc_km
+    {
+    buf = qtn_locev_note_txt_acc_km;
+    }
+
+//----------------------------------------------------
+// RESOURCE TBUF r_locev_note_txt_acc_metres
+// Unit value for display in accuracy note.
+//----------------------------------------------------
+//
+RESOURCE TBUF r_locev_note_txt_acc_metres
+    {
+    buf = qtn_locev_note_txt_acc_metres;
+    }
+
+//----------------------------------------------------
+// RESOURCE TBUF r_locev_note_txt_acc_miles
+// Unit value for display in accuracy note.
+//----------------------------------------------------
+//
+RESOURCE TBUF r_locev_note_txt_acc_miles
+    {
+    buf = qtn_locev_note_txt_acc_miles;
+    }
+
+//----------------------------------------------------
+// RESOURCE TBUF r_locev_note_txt_acc_ft
+// Unit value for display in accuracy note.
+//----------------------------------------------------
+//
+RESOURCE TBUF r_locev_note_txt_acc_ft
+    {
+    buf = qtn_locev_note_txt_acc_ft;
+    }
+
+//----------------------------------------------------
+// RESOURCE TBUF r_locev_list_value_active
+// Status value for popup list.
+//----------------------------------------------------
+//
+RESOURCE TBUF r_locev_list_value_active
+    {
+    buf = qtn_locev_list_value_active;
+    }
+
+//----------------------------------------------------
+// RESOURCE TBUF r_locev_list_value_draft
+// Status value for popup list.
+//----------------------------------------------------
+//
+RESOURCE TBUF r_locev_list_value_draft
+    {
+    buf = qtn_locev_list_value_draft;
+    }
+
+//----------------------------------------------------
+// RESOURCE TBUF r_locev_list_value_completed
+// Status value for popup list.
+//----------------------------------------------------
+//
+RESOURCE TBUF r_locev_list_value_completed
+    {
+    buf = qtn_locev_list_value_completed;
+    }
+
+//----------------------------------------------------
+// RESOURCE TBUF r_locev_list_value_invalid
+// Status value for popup list.
+//----------------------------------------------------
+//
+RESOURCE TBUF r_locev_list_value_invalid
+    {
+    buf = qtn_locev_list_value_invalid;
+    } 
+
+//----------------------------------------------------
+// RESOURCE TBUF r_locev_list_vorec_clip_name
+// Record new file string.
+//----------------------------------------------------
+//
+RESOURCE TBUF r_locev_list_vorec_clip_name
+    {
+    buf = qtn_locev_list_vorec_clip_name;
+    } 
+//End file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventseditor/eabi/evteditoru.def	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,29 @@
+EXPORTS
+	_ZN13CEvtEventsDlg12SetMopParentEP15MObjectProvider @ 1 NONAME
+	_ZN13CEvtEventsDlg14SetHelpContextE15TCoeHelpContext @ 2 NONAME
+	_ZN13CEvtEventsDlg4NewLEiR9CEvtEventR16CEvtMgmtUiEnginei @ 3 NONAME
+	_ZN13CEvtEventsDlg9ExecuteLDEv @ 4 NONAME
+	_ZN13CEvtEventsDlgD0Ev @ 5 NONAME
+	_ZN13CEvtEventsDlgD1Ev @ 6 NONAME
+	_ZN13CEvtEventsDlgD2Ev @ 7 NONAME
+	_ZTI10CEvtEditor @ 8 NONAME ; #<TI>#
+	_ZTI13CEvtEventsDlg @ 9 NONAME ; #<TI>#
+	_ZTI23CEvtMgmtUiDescComponent @ 10 NONAME ; #<TI>#
+	_ZTI24CEvtMgmtUiPlaceComponent @ 11 NONAME ; #<TI>#
+	_ZTI26CEvtMgmtUiEditorCmdHandler @ 12 NONAME ; #<TI>#
+	_ZTI26CEvtMgmtUiSysOfMeasurement @ 13 NONAME ; #<TI>#
+	_ZTI27CEvtMgmtUiRingtoneComponent @ 14 NONAME ; #<TI>#
+	_ZTI29CEvtMgmtUiLocSettingsLauncher @ 15 NONAME ; #<TI>#
+	_ZTI30CEvtMgmtUiMapNavigationAdapter @ 16 NONAME ; #<TI>#
+	_ZTI32CEvtMgmtUiLocationServiceAdapter @ 17 NONAME ; #<TI>#
+	_ZTV10CEvtEditor @ 18 NONAME ; #<VT>#
+	_ZTV13CEvtEventsDlg @ 19 NONAME ; #<VT>#
+	_ZTV23CEvtMgmtUiDescComponent @ 20 NONAME ; #<VT>#
+	_ZTV24CEvtMgmtUiPlaceComponent @ 21 NONAME ; #<VT>#
+	_ZTV26CEvtMgmtUiEditorCmdHandler @ 22 NONAME ; #<VT>#
+	_ZTV26CEvtMgmtUiSysOfMeasurement @ 23 NONAME ; #<VT>#
+	_ZTV27CEvtMgmtUiRingtoneComponent @ 24 NONAME ; #<VT>#
+	_ZTV29CEvtMgmtUiLocSettingsLauncher @ 25 NONAME ; #<VT>#
+	_ZTV30CEvtMgmtUiMapNavigationAdapter @ 26 NONAME ; #<VT>#
+	_ZTV32CEvtMgmtUiLocationServiceAdapter @ 27 NONAME ; #<VT>#
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventseditor/group/bld.inf	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,35 @@
+/*
+* 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:  Build information file for Events Editor
+*
+*/
+
+
+
+PRJ_PLATFORMS
+DEFAULT    
+
+PRJ_EXPORTS
+../inc/evteventsdlg.h                    |../../inc/evteventsdlg.h 
+
+PRJ_EXTENSIONS
+START EXTENSION s60/mifconv
+OPTION TARGETFILE evteditor.mif
+OPTION HEADERFILE evteditor.mbg
+OPTION SOURCES -c8,8 qgn_prop_locev_current_location.svg -c8,8 qgn_prop_locev_landmark.svg -c8,8 qgn_prop_locev_map.svg -c8,8 qgn_prop_locev_active_small.svg -c8,8 qgn_prop_locev_draft_small.svg -c8,8 qgn_prop_locev_delete_small.svg -c8,8 qgn_prop_fmgr_file_sound -c8,8 qgn_prop_fmgr_file_voicerec 
+END
+
+
+PRJ_MMPFILES
+evteditor.mmp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventseditor/group/evteditor.mmp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,96 @@
+/*
+* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:   Project definition file for Events Editor
+*
+*/
+
+
+
+// Includes 
+#include "../inc/evteditoruid.hrh"		// For UID3
+
+// SYSTEM INCLUDE
+#include <data_caging_paths.hrh>
+#include <platform_paths.hrh> // For the APP_LAYER_SYSTEMINCLUDE
+
+// Target information
+TARGET  		evteditor.dll
+TARGETTYPE  	dll
+UID  			0x0 EVTEDITOR_UID3
+CAPABILITY 		CAP_GENERAL_DLL
+VENDORID 		VID_DEFAULT
+
+// System Includes
+APP_LAYER_SYSTEMINCLUDE
+
+// User Includes
+USERINCLUDE     ../../inc ../inc
+SOURCEPATH      ../src
+
+SOURCE 			evtmgmtuiplacecomponent.cpp
+SOURCE 			evtmgmtuieditorcmdhandler.cpp
+SOURCE 			evteditor.cpp
+SOURCE 			evtmgmtuidesccomponent.cpp
+SOURCE 			evtmgmtuisysofmeasurement.cpp
+SOURCE          evtmgmtuiringtonecomponent.cpp 
+SOURCE          evtmgmtuimapnavigationadapter.cpp 
+SOURCE          evtmgmtuilocationserviceadapter.cpp 
+SOURCE          evtmgmtuiwaitdlglauncher.cpp
+SOURCE          evteventsdlg.cpp
+SOURCE			evtmgmtuilocsettinglauncher.cpp
+
+SOURCEPATH      ../data 
+START RESOURCE  evtmgmteditorui.rss
+HEADER
+TARGETPATH      RESOURCE_FILES_DIR
+LANGUAGE_IDS
+END
+
+LIBRARY         featmgr.lib
+LIBRARY         euser.lib 
+LIBRARY         apparc.lib 
+LIBRARY         cone.lib 
+LIBRARY         eikcore.lib 
+LIBRARY         avkon.lib 
+LIBRARY		    bafl.lib
+LIBRARY         eikcoctl.lib
+LIBRARY         efsrv.lib 
+LIBRARY		    eikctl.lib
+LIBRARY         egul.lib
+LIBRARY         fbscli.lib
+LIBRARY         estor.lib					
+LIBRARY         commonengine.lib
+LIBRARY		    aknskins.lib
+LIBRARY		    aknskinsrv.lib
+LIBRARY		    aknswallpaperutils.lib
+LIBRARY         hlplch.lib
+LIBRARY		    aknicon.lib eikdlg.lib 
+LIBRARY		    eposlandmarks.lib lmkcommonui.lib
+LIBRARY		    npdlib.lib                          // Notepad API
+LIBRARY         centralrepository.lib               // CRepository
+LIBRARY         filelist.lib                        // FileList libraries
+LIBRARY         caf.lib                             // DRM libraries
+LIBRARY         cafutils.lib
+LIBRARY         DRMHelper.lib
+LIBRARY			servicehandler.lib
+LIBRARY         NewService.lib
+LIBRARY 		eposmodset.lib
+LIBRARY  		PlatformEnv.lib
+LIBRARY         locsettingsuiclient.lib
+LIBRARY			mnclientlib.lib
+LIBRARY			lbs.lib 
+LIBRARY			evtengine.lib
+LIBRARY         evtutils.lib
+
+DEFFILE         evteditor.def
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventseditor/inc/evteditor.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,348 @@
+/*
+* 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:   Form class for creating events.
+*
+*/
+
+
+#ifndef EVTEDITOR_H_
+#define EVTEDITOR_H_
+
+#include <AknForm.h>
+#include <e32base.h>        // CBase
+#include <ConeResLoader.h>
+
+#include "evtmgmtuieditorcmdhandler.h"
+#include "evtmgmtuisysofmeasurement.h"
+#include "evtmgmtuiengine.h"
+
+class CAknNavigationControlContainer;
+class CAknNavigationDecorator;
+class CEvtEvent;
+class TCoordinate;
+class CEvtMgmtUiEditorCmdHandler;
+class TCoeHelpContext;
+class CAknIconArray;
+class TAknsItemID;
+class CAknListQueryDialog;
+
+// Derive the class from CAknForm 
+class CEvtEditor : public CAknForm,
+                   public MEvtMgmtUiEditorObserver,
+                   public MEvtMgmtUiSOMObserver
+    {   
+    public:  // Constructor and destructor  
+        /**
+         * Static Two phase constructor
+         *         
+         */
+        static CEvtEditor* NewL( TBool                              aIsEditable, 
+                                 CEvtEvent&                         aEvent,
+                                 CEvtMgmtUiEngine&                  aEventEngine,
+                                 TBool                              aDisplayExitMenuItem = ETrue );
+ 
+        /**
+         * Virtual destructor
+         */
+        virtual ~CEvtEditor(); 
+        
+    public://new functions
+        /*
+        * It sets help context
+        * 
+        * @since Symbian v9.1
+        * 
+        * @param[in] aContext - help context object  
+        */
+       void SetHelpContext( TCoeHelpContext aContext );
+      
+        
+    private: //new functions
+        /**
+         * Load intial data values
+         */
+        void LoadFormValuesFromDataL();
+        
+        /**
+         * Displays confirmation query dialog
+         * @param aResourceId Text to be displayed on query
+         */
+        TBool DisplayConfirmationQueryDlgL( TInt aResourceId);
+      
+        /**
+         * Set navipane title
+		 * @param aTitle title for navipane
+         */
+        void SetNavipaneTitleL(const TDesC& aTitle);
+        
+        /**
+		 * Change RSK caption
+         * 
+         */		 
+        void ChangeRSKCaptionL();
+
+         /** Change MSK caption
+         * @param aControlId of current focused line
+         */
+           void ChangeMSKCaptionL(TInt  aControlId);
+        
+        /**
+         * Perform the required action when MSK is pressed
+         */
+        void HandleMSKL();
+        
+        /**
+         * Sets default date and time for date-time components of editor
+         */
+        //void SetDefaultDateTime();
+        
+        /**
+         * It deletes dialog line for audio-loop
+         */
+        void RemoveAudioLoopDlgLineL();
+        
+        /**
+        * It inserts dialog line for audio-loop
+        */
+        void InsertAudioLoopDlgLinesL();
+        
+        /**
+        * It inserts dialog line for radius
+        */
+        void InsertRadiusDlgLineL();
+        
+        /**
+         * It removes dialog line for radius
+         */
+        void RemoveRadiusDlgLineL();
+        
+        /**
+         * It inserts dialog line for descriptor
+         */
+        void InsertDesDlgLineL();
+        
+        /**
+         * It removes dialog line for descriptor
+         */
+        void RemoveDesDlgLineL();
+        
+        /**
+        * It sets text to descriptor edwin
+        */
+        void SetDescL();
+        
+        /**
+        * It sets text to place edwin
+        */
+        void SetPlaceL();
+        
+        /**
+        * It sets Status to popup
+        */
+        void SetStatusL();
+        
+        /**
+        * It Checks for the status and dynamically sets the popup list
+        */
+        void CheckStatusL();
+        
+        /**
+        * It sets text to radius editor
+        */
+        void SetRadiusL();
+        
+        /**
+        * It sets text to ringtone editor
+        */
+        void SetRingtoneL();
+        
+       /**
+       * It checks if all mandatory fields are filled
+       *  @return ETrue if all mandatory fields are filled
+       *          KFalse otherwise
+       */
+        TBool MandatoryFieldsFilled();
+        
+
+	    /** 
+	     * Set the Title text
+	     */ 
+	    void MakeTitleL( TDesC& aText );
+	    
+	   
+	           
+	    /**
+         * Opens the nearest localized resourcefile using aResourceLoader. 
+         * aResourceLoader should be opened only once before closing it. 
+         * Otherwise it will raise a panic. Therefore it is better to have 
+         * multiple resource loaders.
+         * 
+         * @param aResourceFileName Drive and name of resource file in format 
+         *                          <path>:<rsc_file_name>
+         * @param aResourceLoader Resource loader for the resource. The loader 
+         *                        must not be opened allready or it will raise 
+         *                        a panic. It is caller's responsibility to 
+         *                        close the resource loader after using the 
+         *                        resource.
+         */
+        void OpenLocalizedResourceFileL( const TDesC& aResourceFileName, 
+                                RConeResourceLoader&  aResourceLoader );
+	   
+    public:  // Functions from base class
+        /*
+         *  Inherited from CCoeControl
+         */
+        void SetMopParent( MObjectProvider* aParent );
+       
+        /*
+         * Inherited from CEikDialog
+         */
+        TInt ExecuteLD();
+            
+        /*
+         * Inherited from CCoeControl
+         */
+        void GetHelpContext( TCoeHelpContext& aContext ) const;
+      
+   private:  // Functions from base class
+       
+        /**
+        * Inherited from CAknDialog
+        */
+        void LineChangedL( TInt  aControlId  ); 
+        
+        /**
+         * Inherited from CAknForm
+         */
+        //void HandleControlStateChangeL();
+        void HandleControlStateChangeL(TInt aControlId);
+        
+       
+        /**
+         * Inherited from CAknForm
+         */
+        void DynInitMenuPaneL(TInt aResourceId, CEikMenuPane* aMenuPane);
+         
+       /**
+        * Inherited from CAknForm
+        */
+       void ProcessCommandL(TInt  aCommandId); 
+       
+        /**
+         * Inherited from CEikDialog
+         */
+        TBool OkToExitL( TInt aButtonId );
+         
+        /**
+         * Inherited from CEikDialog
+         */
+        void PreLayoutDynInitL();        
+       
+        /**
+        * Inherited from CEikDialog
+        */
+        void PostLayoutDynInitL();  
+        
+       /**
+         * Inherited from MEvtMgmtUiEditorObserver
+         */
+        void NotifyEditorL(TInt aCommand, TInt aErrorCode);   
+         
+        // Inherited from MEvtMgmtUiSOMObserver
+        void NotifySOMChangeL( );
+               
+        void HandlePointerEventL(const TPointerEvent &aPointerEvent);
+       // void HandleDialogPageEventL( TInt aEventID );
+        
+        TKeyResponse OfferKeyEventL (const TKeyEvent &aKeyEvent, TEventCode aType); 
+        
+    private:  // Constructor
+        /**
+         * C++ Default constructor
+         */       
+         CEvtEditor( TBool                              aIsEditable, 
+                     CEvtEvent&                         aEvent, 
+                     CEvtMgmtUiEngine&                  aEventEngine,
+                     TBool                              aDisplayExitMenuItem = ETrue);
+  
+        /**
+         * Second phase of the two phase constructor
+         */ 
+         void ConstructL();
+         
+    private: //new functions
+        
+        /*
+         * It checks if event is empty.
+         * 
+         * @since Symbian v9.1
+         * 
+         * @ret true if event is empty else false.
+         */
+        TBool IsEmptyEventL();
+        
+        TBool ProcessDoneCommandL();
+        
+       /**
+        * it toggles value of popup field
+        */        
+        void TogglePopupFieldControlL( TInt aControlId );
+        
+    private:
+        /**
+        * owns: It handles all editor commands
+        */
+       CEvtMgmtUiEditorCmdHandler*      iCmdHandler;
+       /*
+        * Owns: It checks unit for radius
+        */
+       CEvtMgmtUiSysOfMeasurement*      iSysOfMeas;
+       /*
+        * Mode in which editor is opened. It can be either view or edit mode.
+        */   
+       TBool                            iIsEditMode;
+       /*
+        *  Ref: The event to be displayed on editor
+        */
+       CEvtEvent&                       iEvent;
+       /*
+        *  help context object
+        */
+       TCoeHelpContext                  iHelpContext;  
+       
+       /**
+       * Resource loader handle
+       * Owns
+       */
+      RConeResourceLoader             iResourceLoader;
+      
+      /**
+       * Reference to the Events UI Engine
+       */
+      CEvtMgmtUiEngine&               iEventEngine;
+
+      /*
+       * Optimization:It is used in order to avoid repeated check in dynitmenupaneL
+       */
+      TBool                           iDisplayExitMenuItem;
+      
+      /*
+       * It determines which attributes are modified
+       */
+      TEvtEventAttributeMask          iEventAttributeMask;
+      
+      TInt                           iIsDragging;
+ };
+
+#endif /*EVTEDITOR_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventseditor/inc/evteditorconsts.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,86 @@
+/*
+* 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:   it will contain constans for engine/editor
+*
+*/
+
+
+
+#ifndef EVTMGMTUICONSTS_H_
+#define EVTMGMTUICONSTS_H_
+
+/*
+ *  constants used in editor/engine
+ */
+
+/*
+ * resource file containing all editor specific resources
+ */
+_LIT( KEvtEditorResFileName, "evtmgmteditorui.rsc" );
+
+/*
+ *  Mif containing all icons used in editor ui
+ */
+_LIT( KEvtMgmtUiIconFileName, "evteditor.mif" );
+
+/*
+ *  Maximum length of place attribute stored in local database
+ */
+const TInt KPlaceMaxLength = 256;
+
+/*
+ *  time out value for location acquisition
+ *  If location is not retrived within this time period, it fails with time-out error
+ */
+const TInt64 KLocAcqTimeOut = 1000000*2*60 ; //2 minutes
+
+/*
+ * minimum value for radius in km
+ */
+const TReal KMinRadiusInKm = 0.1;
+
+/*
+ *  maximum value for radius in km 
+ */
+const TReal KMaxRadiusInKm = 1.5;
+
+/*
+ * Conversion from km to mile.
+ */
+const TReal KUnitConversion = 0.621371192237;
+
+/*
+ *  maximum limit for low accuracy
+ * Required when place is set using 'Current Location'
+ */
+const TInt KLowAccuracyMaxLimit = 500;
+
+/*
+ * Maximum limit for medium accuracy
+ * Required when place is set using 'Current Location'
+ */
+const TInt KMediumAccuracyMaxLimit = 1500;
+
+/*
+ *  prefix for tone recorded from eventsui application
+ */
+//TODO: tone name should be changed acc to draft
+ _LIT(KRecorderFile, "soundclip");
+ 
+ /*
+  *  file extention for tone recorded from eventsui application
+  */
+ _LIT(KRecorderFileEnd, ".amr");
+ 
+#endif /*EVTMGMTUICONSTS_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventseditor/inc/evteditoruid.hrh	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,27 @@
+/*
+* 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:  Resource headers for Events Editor
+*
+*/
+
+
+#ifndef EVTEDITORUID_HRH
+#define EVTEDITORUID_HRH
+
+// Events Editor API UID3
+#define EVTEDITOR_UID3          0x2001E665
+
+#endif      // EVTEDITORUID_HRH
+
+// End of File
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventseditor/inc/evteventsdlg.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,119 @@
+/*
+* 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:  This class provides functionality for editing Events.
+*
+*/
+
+
+
+#ifndef EVTEVENTSDLG_H
+#define EVTEVENTSDLG_H
+
+//  INCLUDES
+#include <e32base.h>            // CBase
+
+// User Includes
+
+// FORWARD DECLARATIONS
+class CEvtEvent;
+class CEvtEditor;
+class MObjectProvider;
+class TCoeHelpContext;
+class TCoordinate;
+class CEvtMgmtUiEngine;
+
+// CLASS DECLARATION
+
+/**
+*  This is a dialog class, which is used to launch Events editor dialog.
+*/
+class CEvtEventsDlg : public CBase
+    {
+    public:  // Constructors and destructor
+        /**
+        * This is a static function, which creates and returns an instance of this class.
+        * The Event that has to be edited is shown in the editor.
+    	*
+        * @leave  Leaves with KErrNotSupported if framework functionality is not available.
+        * @panic  Panics with system-wide panic codes.
+        * @return new instance of this class
+        */
+        IMPORT_C static CEvtEventsDlg* NewL(TBool                              aIsEditable, 
+                                            CEvtEvent&                         aEvent,                               
+                                            CEvtMgmtUiEngine&                  aEventEngine,
+                                            TBool                              aDisplayExitMenuItem = ETrue
+                                            ); 
+
+        /**
+        * Destructor.
+        */
+        IMPORT_C ~CEvtEventsDlg();
+
+    public: // New functions
+        /**
+        * This function sets the context - that is, the enclosing parent control - for this control.
+        *
+        * @param [in] aParent The parent object which is the context for the control.
+        * @panic Panics with KLmkPanicNullMember, if the selector is not
+        *        constructed properly.
+        */
+        IMPORT_C void SetMopParent( MObjectProvider* aParent );
+
+        /**
+        * This method sets help context. This provides an option to show the help context
+        * of the application that launches editor. By default, we show the Events Ui help context.
+        * @param[in] aContext help context to use
+        */
+        IMPORT_C void SetHelpContext( TCoeHelpContext aContext );
+
+        /**
+        * This function launches the Events editor dialog. Client uses this function
+        * to launch events editor dialog.
+        * This object is destroyed when this function returns or leaves.
+        * @leave Leaves with system-wide leave codes.
+        * @panic Panics with KEvtPanicNullMember, if the selector is not constructed properly.
+        * @return Returns non-zero if accepted, else zero.
+        */          
+        IMPORT_C TInt ExecuteLD( );
+    private:
+        /**
+        * C++ default constructor.
+        * @return newly instantiated object
+        */
+        CEvtEventsDlg();
+        		
+        /**
+        * By default Symbian 2nd phase constructor is private.        
+        */
+        
+        void ConstructL( TBool                              aIsEditable, 
+                        CEvtEvent&                         aEvent,        
+                        CEvtMgmtUiEngine&                  aEventEngine,
+                        TBool                              aDisplayExitMenuItem = ETrue
+                        );
+        
+
+    private:    // Data
+    
+        /// Own: Editor object
+        CEvtEditor* iEvtEditor;  
+
+        /// Own: A pointer to TBool
+        TBool* iDestroyedPtr;
+
+    };
+
+#endif      // EVTEVENTSDLG_H   
+            
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventseditor/inc/evtmgmteditorui.hrh	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,67 @@
+/*
+* 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:   Enumeration for Events Management UI command set.
+*
+*/
+
+
+
+/**
+ * Enumeration for Events Management UI command set
+ */
+enum TEvtMgmtUiCommands
+	{
+	EEvtMgmtUiCommandNone = 0x5000,
+	
+	EEvtEditorCmdChange,
+	EEvtEditorCmdDiscard,
+	EEvtEditorCmdAddDesc,
+	EEvtEditorCmdAddDescNew,
+	EEvtEditorCmdAddDescFromExisting,
+	EEvtEditorCmdRemoveDesc,
+	EEvtEditorCmdAssignTone,
+	EEvtEditorCmdRemoveTone,
+	EEvtEditorCmdSetPlace,
+   	EEvtEditorCmdEditDesc,
+	EEvtEditorCmdActivate,
+	EEvtEditorCmdSaveDraft,
+	EEvtEditorCmdDelete,
+	EEvtMgmtUiEventUiSettings,
+	EEvtMgmtUiEventUiPosSettings,
+	EEvtEditorCmdExit,
+	EEvtMgmtUiCmdRetry,
+	EEvtEditorCmdCloseDlg,
+	EEvtEditorCmdNavigateToPlace,
+	EEvtEditorCmdShowOnMap,
+	  
+	EEvtMgmtUiFromMapPlaceholder,
+	EEvtMgmtUiShowOnMapPlaceHolder,
+	EEvtMgmtUiNavigateToPlaceHolder
+	};           
+
+/**
+ * Enumeration for Editor controls
+ */
+enum TEvtMgmtUiCreateEventFormControls
+    {
+    EEvtMgmtUiDlgCIdSubject = 0x6000,
+    EEvtMgmtUiDlgCIdPlace,
+    EEvtMgmtUiDlgCIdRadius,
+    EEvtMgmtUiDlgCIdDesc,    
+    EEvtMgmtUiDlgCIdRepeat,
+    EEvtMgmtUiDlgCIdAssignTone,
+    EEvtMgmtUiDlgCIdAudioLoop,
+    EEvtMgmtUiDlgCIdStatus
+    };
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventseditor/inc/evtmgmtuidesccomponent.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,123 @@
+/*
+* 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:   Description component for retrieving description.
+*
+*/
+
+
+#ifndef EVTMGMTUIDESCCOMPONENT_H_
+#define EVTMGMTUIDESCCOMPONENT_H_
+
+#include <e32base.h>        // CBase
+
+// Forward Declaration
+class CNotepadApi;
+
+/**
+ *  @class CEvtMgmtUiDescComponent
+ *  Class that represents Description component of editor
+ *
+ *  This class acts as description component of editor.
+ *  It  is used to retrieve description from notepad.
+ *  It is also used to create new description using notepad.
+ *  Note: Created description is not stored in Notepad application.
+ *
+ *  @since S60 v9.1
+ */
+
+class CEvtMgmtUiDescComponent: public CBase
+    {
+private:
+    
+    public:  // Constructor and destructor  
+        /**
+         * Static Two phase constructor
+         * @param [in] aPrevDesc - description of existing event.
+         *                       - empty for newly created event        
+         */
+        static CEvtMgmtUiDescComponent* NewL(const TPtrC aPrevDesc);
+        
+      /**
+       * Static Two phase constructor
+       * @param [in] aPrevDesc - description of existing event.
+       *                       - empty for newly created event        
+       */
+      static CEvtMgmtUiDescComponent* NewLC(const TPtrC aPrevDesc);
+
+      /**
+       * Virtual destructor
+       */
+      virtual ~CEvtMgmtUiDescComponent(); 
+      
+    public:// new functions
+      /**
+       * It displays notepad editor and saves in descriptor variable
+       * 
+       * @since S60 v9.1
+       * 
+       * @return KErrCancel if deleted
+       *         KErrAlreadyExists if not modified
+       *         KErrNone if modified
+       */
+        TInt DisplayNotepadEditorL(); 
+        
+       /**
+       * It opens system's memo popup dialog and 
+       * saves selected memo as descriptor.
+       * 
+       * @since S60 v9.1
+       *  
+       * @return KErrCancel if cancel or no note
+       *         KErrNone if note is selected
+       */
+        TInt DescFromExistingNotesL();
+                
+        /**
+        * It retrieves descriptor
+        * 
+        * @since S60 v9.1
+        * 
+        * @return selected descriptor
+        */
+         TPtrC Desc() const;        
+
+       
+    private:  // Constructor
+        /**
+         * C++ Default constructor
+         */       
+        CEvtMgmtUiDescComponent();
+  
+        /**
+         * Second phase of the two phase constructor
+         *  @param [in] aPrevDesc - description of existing event.
+         *                        - empty for newly created event        
+         */ 
+         void ConstructL( const TPtrC aPrevDesc );
+    
+    private:
+        /**
+         * description value
+         * owns
+         */
+        HBufC* iDesc;
+		
+        /**
+         * Notepad Instance
+         * owns
+         */
+        CNotepadApi* iNotepad;
+    };
+
+#endif //EVTMGMTUIDESCCOMPONENT_H_
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventseditor/inc/evtmgmtuieditorcmdhandler.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,327 @@
+/*
+* 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:   It is handler class to handle editor commands
+*
+*/
+
+
+#ifndef EVTMGMTUIEDITORCMDHANDLER_H_
+#define EVTMGMTUIEDITORCMDHANDLER_H_
+
+#include <e32base.h>        // CBase
+#include <locsettingsuiclient.h>
+#include "evtdefs.h"
+#include "evtmgmtuiengine.h"
+#include "evtmgmtuiwaitdlglauncher.h"
+
+class CEvtEditor;
+class CEvtEvent;
+class TCoordinate;
+class CEvtMgmtUiPlaceComponent;
+class CAknIconArray;
+class CAknListQueryDialog;
+class TAknsItemID;
+class CEvtMgmtUiWaitDialogLauncher;
+class CEvtMgmtUiDescComponent;
+class CEvtMgmtUiMapNavigationAdapter;
+class CEvtMgmtUiRingtoneComponent;
+
+class MEvtMgmtUiEditorObserver
+    {
+public:
+    /**
+     * It will be used to notify editor that command has been handled
+     * @param aCommandId Id of the command pressed
+     * @param aErrorCode It will contain the status of the operation
+     *                KErrNone if successful otherwise error code          
+     */
+    virtual void NotifyEditorL( TInt aCommand, 
+                                TInt aErrorCode )=0;
+    };
+
+/**
+ *  @class CEvtMgmtUiEditorCmdHandler
+ *  Class that represents command handler for editor
+ *
+ *  This class acts as command handler of editor.
+ *  It  is used to :
+ *      To activate event
+ *      To save event as draft
+ *      To save event as completed
+ *      To delete event
+ *      To add/edit/remove description
+ *      To add/change place
+ *      To assign ringtone
+ *      To show event on map
+ *      To navigate to place
+ *      To launch position settings
+ *
+ *  @since S60 v9.1
+ */
+
+class CEvtMgmtUiEditorCmdHandler : public CActive,
+                                   public MEvtMgmtUiEngineObserver,
+                                   public MEvtMgmtUiWaitDialogLauncherObserver
+    {
+    public:  // Constructor and destructor  
+      /**
+       * Static Two phase constructor
+       * 
+       * @since Symbian v9.1
+       *
+       * @param[in/out] aEvent - event object which contains current event information.
+       *                         event details may be changed while executing commands
+       * @param[in] aEditorObserver - observer to handle editor specific operations 
+       *                              after command is executed
+       */
+      static CEvtMgmtUiEditorCmdHandler* NewL( 
+                        CEvtEvent&                      aEvent, 
+                        MEvtMgmtUiEditorObserver&       aEditorObserver,
+                        CEvtMgmtUiEngine&               aEventEngine );
+
+      /**
+       * Virtual destructor
+       */
+      virtual ~CEvtMgmtUiEditorCmdHandler(); 
+      
+    public: // new functions
+        /**
+         * It will handle all editor commands.
+         * 
+         * @since Symbian v9.1
+         * 
+         * @param[in] aCommand - command id of the command to be handled
+         * @param[out] aResult - Result of the command operation
+         */
+        void HandleEditorCmdL( TInt     aCommand );
+        
+         /*
+          * It will handle add/edit/remove description operation.
+          * 
+          * @since Symbian v9.1
+          * 
+          * @param[in] aCommand - Command id of the operation to be performed.
+          */
+         TInt HandleDescCommandsL( TInt     aCommand );
+         
+         /*
+          * It will handle assign tone operation.
+          * 
+          * @since Symbian v9.1
+          * 
+          * @ret returns KErrNone if successfully handled else error
+          */
+         TInt HandleAssignToneCommandL();
+         
+         /*
+          * It will handle 'show on map' operation.
+          * 
+          * @since Symbian v9.1
+          * 
+          */
+         void HandleShowOnMapCommandL();
+         
+         /*
+          * It will handle 'navigate to place' operation.
+          * 
+          * @since Symbian v9.1
+          * 
+          */
+         void HandleNavigateToPlaceCommandL();
+         
+         /*
+          *  It will set attribute mask which will be used to update event.
+          * 
+          *  @since Symbian v9.1
+          * 
+          */
+         void SetEventAttributeMask( TEvtEventAttributeMask aEventAttributeMask );
+                 
+   public: //derived
+        /**
+        * Derived from CActive
+        */
+        void RunL();
+        
+        /**
+        * Derived from CActive
+        */
+        TInt RunError( TInt aError );
+        
+        /**
+        * Derived from CActive
+        */
+        void DoCancel();
+        
+        /**
+        * Inherited from MEvtMgmtUiEngineObserver
+        */
+        void NotifyEventChangeL(TInt aErrorCode, TInt aState );
+        
+        /**
+        * Inherited from MEvtMgmtUiEngineObserver
+        */
+        void NotifyModelChangeL();
+        
+        /**
+        * Inherited from MEvtMgmtUiWaitDialogLauncherObserver
+        */
+        void HandleDialogDismissed( TInt aButtonId );
+      
+    private:  // Constructor
+        /**
+         * C++ Default constructor
+         */       
+        CEvtMgmtUiEditorCmdHandler(
+                    CEvtEvent&                          aEvent,
+                    MEvtMgmtUiEditorObserver&           aEditorObserver,
+                    CEvtMgmtUiEngine&                   aEventEngine );
+  
+        /**
+         * Second phase of the two phase constructor
+         */ 
+         void ConstructL();
+         
+    private:         
+         /**
+         * It will display comfirmation query dialog
+         * 
+         * @since Symbian v9.1
+         * 
+         * @param[in] aResourceId - resource id of the resource to be displayed 
+         *                           on confirmation query dialog.
+         * @ret returns true if OK is pressed.
+         *      returns false if Cancel is pressed. 
+         */
+         TBool DisplayConfirmationQueryDlgL( TInt aResourceId );
+
+         /*
+          * It will handle'set place' operation.
+          * 
+          * @since Symbian v9.1
+          * 
+          */
+         void HandleSetPlaceCommandL();
+                        
+         /**
+          * Start wait Dialog for asynchronous processing.
+          */
+         void StartWaitDialogL(TInt aResourceId);
+                        
+         /**
+          * Stop outstanding wait Dialog.
+          */
+         void StopWaitDialogL();
+                        
+         /**
+          * It is used to update icons
+          */
+         void UpdateIconsL( CAknListQueryDialog* aDialog );    
+          
+         /**
+          * Append icon to icon array. CAknIconArray owns icons so it is 
+          * easier to it leave safely.
+          * @param aIcons icon array
+          * @param aIconFileWithPath icon file name with path
+          * @param aSkinID skin id of the icon
+          * @param aIconGraphicsIndex picture index
+          * @param aIconGraphicsMaskIndex mask index
+          */
+         void AddIconL( CAknIconArray&       aIcons,
+                        const TDesC&         aIconFileWithPath,
+                        TAknsItemID          aSkinID,
+                        TInt                 aIconGraphicsIndex,
+                        TInt                 aIconGraphicsMaskIndex );
+                              
+         /**
+          * Gets Events Management UI icon file path and name. Ownership
+          * is transferred, item is left in the cleanup stack.
+          * @return TFileName* The full name of the Events UI icon file.
+          */        
+         TFileName* IconFileNameLC() const;
+         
+    private:
+        /*
+         *  state-machine's state
+         */
+        TInt                            iState;
+		
+        /*
+         *  The event to be displayed on editor
+         */
+        CEvtEvent&                      iEvent;      
+		
+        /*
+         *  It performs all editor specific operation when command is executed
+         */
+        MEvtMgmtUiEditorObserver&       iEditorObserver;
+		
+        /*
+         * Owns: 'Set place' component object
+         * It retrieves place and location information
+         */
+        CEvtMgmtUiPlaceComponent*       iPlaceComponent;
+		
+        /*
+         * Owns: It launches position settings
+         */
+        CLocSettingsUiClient*                   iClientLibrary;
+        
+        /*
+         * Description Component Instance
+         * Owns
+         */
+        CEvtMgmtUiDescComponent* iDescComponent;
+        
+        /*
+         * Map Component Instance
+         * Owns
+         */
+        CEvtMgmtUiMapNavigationAdapter* iMapAdapter;
+        
+        /*
+         * Ringtone Component Instance
+         * Owns
+         */
+        CEvtMgmtUiRingtoneComponent* iRingtoneComponent; 
+        
+        /**
+        * Wait dialog launcher
+        * Owns
+        */ 
+        CEvtMgmtUiWaitDialogLauncher*   iWaitDialogLauncher;
+        
+        /**
+         * Reference to the Events UI Engine
+         */
+        CEvtMgmtUiEngine&               iEventEngine;      
+        
+        /*
+         * List of events id to be deleted/updated
+         * Owns
+         */
+        RArray<TEvtEventId> iEvtIdArray;     
+        
+        /*
+         * It indicates if any Dialog is outstanding
+         */
+        TBool   iIsDlgOutstanding;
+        
+        /*
+         * It determines which attributes are modified
+         */
+        TEvtEventAttributeMask          iEventAttributeMask;
+    };
+
+#endif //EVTMGMTUIEDITORCMDHANDLER_H_
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventseditor/inc/evtmgmtuilocationserviceadapter.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,182 @@
+/*
+* Copyright (c) 2002-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:  Implements methods for interfacing with Location Acquisition API.
+*
+*/
+
+
+#ifndef __CEVTMGMTUILOCATIONSERVICEADAPTER_H__
+#define __CEVTMGMTUILOCATIONSERVICEADAPTER_H__
+
+//  INCLUDES
+#include <lbs.h>
+
+// FORWARD DECLARATION
+class MEvtMgmtUiLocationObserver;
+class TPosition;
+class RPositionServer;
+class RPositioner;
+class TPositionInfo;
+
+// CLASS DECLARATIONS
+/**
+ *  @class MEvtMgmtUiLocationServiceObserver
+ *  Class that represents the observer to notify completion 
+ *  of location acquisition operation
+ * 
+ *  It is used to notify completion of location acquisition operation.
+ *  It is also used to notify error if it fails.
+ *
+ *  @since S60 v9.1
+ */
+
+class MEvtMgmtUiLocationServiceObserver
+    {
+    public: 
+        /**
+        * Notifies the observer about occured event.
+        * Engine observer has to update its data when this function is called.
+        * @param [in] aStatus - response code
+        */
+        virtual void HandleLocationServiceResponseL( const TInt aStatus ) = 0;
+
+        /**
+        * Called if occured event fails.
+        * @param [in] aErrorCode - Occured general errorcode.
+        *               KErrAccessDenied - if right capability is not added.         
+        *               KPositionQualityLoss - if accuracy is not acceptable.
+        *               KErrTimedOut - if operation takes a lot of time to complete.
+        *               KErrNotFound - if no psy is enabled.           
+        *               KErrCancel   - if operation is canceled.
+        *               Otherwise system wide error-codes. 
+        */
+        virtual void HandleLocationServiceErrorL( TInt aErrorCode ) = 0;
+    };
+
+
+// CLASS DECLARATIONS
+/**
+ *  @class CEvtMgmtUiLocationServiceAdapter
+ *  Class that represents the adapter for location acquisition engine
+ *
+ *  This class acts as an adapter for location acquisition engine. 
+ *  It  is used to retrieve current location
+ *
+ *  @since S60 v9.1
+ */
+
+class CEvtMgmtUiLocationServiceAdapter : public CActive
+    {
+    public:
+        /**
+        * Two-phased constructor.
+        * @param location service requester name 
+        *        (Landmarks Application's name) 
+        *        which is passed to Location framework as a parameter to Location Acquisition API
+        *        It is maintained by Location Framework for privacy rules and logging purposes   
+        * @return CLmkLocationService object.
+        */
+         static CEvtMgmtUiLocationServiceAdapter* NewL( MEvtMgmtUiLocationServiceObserver& aObserver );
+
+        /**
+        * Destructor.
+        */
+        virtual ~CEvtMgmtUiLocationServiceAdapter();
+   
+    public: //new functions
+ 
+        /**
+        * It is used to request current location
+        * 
+        * @since S60 v9.1
+        */
+         void LocationRequestL();
+
+        /**        
+        * It is used to retrieve current location
+        * 
+        * @since S60 v9.1
+        * 
+        * @return Recently retrieved current location
+        */
+         TPosition& CurrentPosition();
+
+        /**
+        * It is used to cancel recently issued location request
+        * 
+        * @since S60 v9.1
+        */
+         void CancelRequest();
+
+         /**
+         * Check if all positioning methods are disabled.
+         * 
+         * @since S60 v9.1
+         * 
+         * @ret true if disabled else false
+         */
+         TBool AllPositionMethodsDisabledL();
+
+    public: //Derived
+        /*
+         * Derived from CActive
+         */
+        void RunL();
+        /*
+         * Derived from CActive
+         */
+        void DoCancel();
+        /*
+         * Derived from CActive
+         */
+        TInt RunError(TInt aError);
+
+    private:
+           /**
+           * By default Symbian 2nd phase constructor is private.
+           * @param location service requester name 
+           *        (Landmarks Application's name) 
+           *        which is passed to Location framework as a parameter to Location Acquisition API
+           *        It is maintained by Location Framework for privacy rules and logging purposes 
+           */
+           void ConstructL( );
+
+           /**
+           * C++ default constructor.
+           * @param[in] aObserver - observer to notify completion of location acquisition operation
+           */
+           CEvtMgmtUiLocationServiceAdapter( MEvtMgmtUiLocationServiceObserver& aObserver );   
+         
+    private:    // data
+        
+        /// Own: iServer
+        RPositionServer iServer;
+
+        ///Ref: observer to notify completion of location acquisition operation
+        MEvtMgmtUiLocationServiceObserver& iObserver;
+
+        ///  RPositioner
+        RPositioner iPositioner;
+
+        ///  TPosition
+        TPosition iPosition;
+
+		///  TPositionInfo
+        TPositionInfo iPositionInfo;       
+
+    };
+
+#endif // __CEVTMGMTUILOCATIONSERVICEADAPTER_H__
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventseditor/inc/evtmgmtuilocsettinglauncher.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,95 @@
+/*
+* Copyright (c) 2002-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:   Responsible for launching positioning settings
+*
+*/
+
+#ifndef EVTMGMTUILOCSETTINGSLAUNCHER_H
+#define EVTMGMTUILOCSETTINGSLAUNCHER_H
+
+// INCLUDES
+#include <e32base.h>
+#include <locsettingsuiclient.h>
+
+class MEvtMgmtUiLocSettingsLauncherObserver;
+// CLASS DECLARATION
+/**
+*  CEvtMgmtUiLocSettingsLauncher class
+*  This class is a wrapper for launching Position settings
+*/
+
+class CEvtMgmtUiLocSettingsLauncher : public CActive
+                                      
+    {     
+    public: // Constructors and destructor
+    /**
+     * Two-phased constructor.
+     *
+     */
+     static CEvtMgmtUiLocSettingsLauncher* NewL();
+                  
+     /**
+      * Destructor.
+      */
+     ~CEvtMgmtUiLocSettingsLauncher();             
+          
+    public: // new functions
+       /*
+       * It is used to launch position settings
+       * 
+       * @since Symbian v9.1
+       *  
+       */
+       void LaunchL();    
+       
+       /*
+        * It is used to set observer which will get notification 
+        * after completion of operation.
+        * 
+        * @since Symbian v9.1
+        *  
+        */
+       void SetObserver( MEvtMgmtUiLocSettingsLauncherObserver* aObserver );
+       
+    protected: // from CActive
+      /*
+       *  Derived from CActive
+       */
+      void RunL();
+      /*
+       *  Derived from CActive
+       */ 
+      void DoCancel();
+          
+    private: 
+     /**
+      * Second phase of construction.
+      */
+      void ConstructL();      
+      
+      /**
+       * C++ default constructor.
+       */
+      CEvtMgmtUiLocSettingsLauncher();
+      
+    private:
+        // Owns: Pointer to Location setings client library
+        CLocSettingsUiClient*                   iClientLibrary;
+        //Does not own : Observer to which completion of operation is notified.
+        MEvtMgmtUiLocSettingsLauncherObserver*  iObserver;
+    };
+    
+#endif // EVTMGMTUILOCSETTINGSLAUNCHER_H
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventseditor/inc/evtmgmtuilocsettinglauncherobserver.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,35 @@
+/*
+* 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:  It is observer class to handle launch of location 
+* settings.
+*/
+
+
+#ifndef EVTMGMTUILOCSETTINGLAUNCHEROBSERVER_H_
+#define EVTMGMTUILOCSETTINGLAUNCHEROBSERVER_H_
+
+#include <e32base.h>        // CBase
+
+class MEvtMgmtUiLocSettingsLauncherObserver
+    {
+public:
+    /**
+     * It will be used to notify observer that lauching positioning settings
+     * has been completed.
+     * @param aErrorCode It will contain the status of the operation
+     *                   KErrNone if successful otherwise error status code          
+     */
+    virtual void NotifyLocSettingLaucherChangeL( TInt aErrorCode )=0;
+    };
+#endif //EVTMGMTUILOCSETTINGLAUNCHEROBSERVER_H_
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventseditor/inc/evtmgmtuimapnavigationadapter.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,201 @@
+/*
+* 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:  Application's adapter class to Map and Navigation use cases
+*
+*/
+
+
+#ifndef CEVTMGMTUIMAPNAVIGATIONADAPTER_H
+#define CEVTMGMTUIMAPNAVIGATIONADAPTER_H
+
+// INCLUDES
+#include <AiwCommon.h>
+#include <e32std.h>
+
+class CAiwServiceHandler;
+class CPosLandmark;
+
+class MEvtMgmtUiMapAndNavigationObserver
+    {
+public:
+    /**
+     * It will be used to notify observer that map operation
+     * has been completed.
+     * @param aPlace place retrieved from map
+     * @param aErrorCode It will contain the status of the operation
+     *                KErrNone if successful otherwise error status code          
+     */
+    virtual void HandleMapAndNavigationResponseL(TInt aErrorCode, const TPtrC aPlace, TCoordinate aTriggerLocation )=0;  
+    };
+
+
+
+/**
+* The class CEvtMgmtUiMapNavigationAdapter contains the implemenation 
+* for all the uses cases of Map and Navigation.
+* Functionality:
+*   To check map service providers
+*   To show location on map
+*   To navigate to the location
+*   To retrieve location from map
+*/
+
+class CEvtMgmtUiMapNavigationAdapter : public CBase, 
+								       public MAiwNotifyCallback
+	{
+
+	public: // Constructors and destructor
+		/**
+        * Symbian 1st phase static constructor. 
+        *       
+        */        
+        static CEvtMgmtUiMapNavigationAdapter* NewL();
+		
+		/**
+        * Symbian 1st phase static constructor. 
+        * Leaves the constructed object on Cleanup Stack.     
+        */        
+        static CEvtMgmtUiMapNavigationAdapter* NewLC();
+        /**
+        * Destructor.
+        */
+        ~CEvtMgmtUiMapNavigationAdapter();		
+    
+    public: // New methods     	
+    
+    	/**
+    	* This method is called for the get landmarks from map use case.
+    	* 
+    	* @since S60 v9.1
+    	*/
+    	void PlaceFromMapL();
+    	
+    	/**
+    	 * It will return place value recieved from map.
+    	 * 
+    	 * @since S60 v9.1
+    	 * 
+    	 * @ret selected place
+    	 */
+    	TPtrC Place() const;
+    	
+    	/**
+    	 * It will return total map service providers.
+    	 * 
+    	 * @since S60 v9.1
+    	 * 
+    	 * @ret total number of map service providers
+    	 */
+    	TInt MapServiceProvidersL();
+    	
+    	/**
+         * It will show location on map
+         * 
+         * @since S60 v9.1
+         */
+    	void ShowOnMapL();
+    	
+    	/**
+         * It will navigate to location
+         * 
+         * @since S60 v9.1
+         */
+    	void NavigateToPlaceL();
+    	
+    	/**
+         * It will set observer to notify completion of map operation
+         * 
+         * @since S60 v9.1
+         * 
+         *  @param [in] aObserver - observer to notify completion of map operation
+         */
+    	void SetObserver( MEvtMgmtUiMapAndNavigationObserver* aObserver );
+    	
+    	/**
+         * It will set place
+         * 
+         * @since S60 v9.1
+         * 
+         * @param [in] aPlace - place of existing event
+         *                    - empty for newly created event
+         */
+    	void SetPlaceL( const TPtrC& aPlace );
+    	
+    	/**
+         * It will set location
+         *  
+         * @since S60 v9.1
+         * 
+         * param[in] aTriggerLocation - location of trigger of existing event
+         *                            - NaN for newly created event
+         */
+    	void SetLocation( TCoordinate  aTriggerLocation );
+    	
+    public: // from MAiwNotifyCallback
+        /**
+        * The callback function for the get landmark from map use case
+        * This function gets a callback once the user selects a location
+        * from map to save as a landmark.
+        */
+        TInt HandleNotifyL( TInt aCmdId, 
+                            TInt aEventId, 
+                            CAiwGenericParamList &aEventParamList, 
+                            const CAiwGenericParamList &aInParamList );
+	
+    private:
+    	/**
+        * C++ default constructor.                 
+        */
+        CEvtMgmtUiMapNavigationAdapter(); 
+        
+        /**
+        * Symbian 2nd phase constructor. 
+        */
+        void ConstructL();
+    	
+    private: // Private functions
+        
+        /**
+         * It will set place details from landmark recieved from map
+         *  
+         * @since S60 v9.1
+         * 
+         * @param[in] aLandmark - landmark selected on map      
+         */
+        void SetPlaceFromLandmarkL( CPosLandmark& aLandmark );
+    	
+    private: // Data    	
+    	// Owns : Pointer to AIW service handler to send service commands     	
+    	CAiwServiceHandler*     iAiwServiceHandler;
+    	
+    	// Owns : Generic parameter input list     
+    	CAiwGenericParamList*   iInList;
+    	
+    	// Owns : Generic parameter output list    	     	
+        CAiwGenericParamList*   iOutList;    
+        
+        // Owns : place details     
+        HBufC*                  iPlace;       
+        
+        // Does not own : observer to notify completion of map operation            
+        MEvtMgmtUiMapAndNavigationObserver* iObserver;
+        
+        // trigger location of the event
+        TCoordinate            iTriggerLocation ;        
+	};
+
+#endif //CEVTMGMTUIMAPNAVIGATIONADAPTER_H
+
+// End of file
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventseditor/inc/evtmgmtuiplacecomponent.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,322 @@
+/*
+* 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:   'Set Place' component for retrieving place.
+*
+*/
+
+
+#ifndef EVTMGMTUIPLACECOMPONENT_H_
+#define EVTMGMTUIPLACECOMPONENT_H_
+
+#include <e32base.h>        // CBase
+
+#include "evtmgmtuimapnavigationadapter.h"
+#include "evtmgmtuilocationserviceadapter.h"
+#include "evtmgmtuiwaitdlglauncher.h"
+#include "evtmgmtuilocsettinglauncherobserver.h"
+
+class TCoordinate;
+class CEvtMgmtUiLocSettingsLauncher;
+class CAknIconArray;
+
+/**
+ *  @class CEvtMgmtUiPlaceComponent
+ *  Class that represents 'Set place' component of editor
+ *
+ *  This class acts as 'set place' component of editor.
+ *  It  is used to retrieve location details for which event will be set.
+ *  Location details can be retrieved from current location, map or landmark
+ *
+ *  @since S60 v9.1
+ */
+
+class CEvtMgmtUiPlaceComponent: public CBase,
+                                public MEvtMgmtUiMapAndNavigationObserver,
+                                public MEvtMgmtUiLocationServiceObserver,
+                                public MEvtMgmtUiWaitDialogLauncherObserver,
+                                public MEvtMgmtUiLocSettingsLauncherObserver
+    {
+private:
+    /*
+     *  'Set place' popup dialog options
+     */
+    enum TEvtMgmtUiSetPlace
+       {
+       /*
+        * It indicates that 'Current location' is selected
+        * from popup dialog
+        */
+       EEvtMgmtUiSetPlaceCurrentPlace,
+       /*
+        * It indicates that 'Landmark' is selected
+        * from popup dialog
+        */
+       EEvtMgmtUiSetPlaceLandmark,
+       /*
+        * It indicates that 'Map' is selected
+        * from popup dialog
+        */
+       EEvtMgmtUiSetPlaceFromMap,
+       };
+    
+    public:  // Constructor and destructor  
+      /**
+       * Static Two phase constructor
+       * @param[in] aPrevPlace - place of existing event
+       *                         empty string for newly create event     
+       * @param[in/out] aTriggerLocation - location of the existing event is passed.
+       *                                   after successful completion of retrieval operation
+       *                                   new location is set to it.    
+       */
+      static CEvtMgmtUiPlaceComponent* NewLC(const TPtrC aPrevPlace,  
+              TCoordinate& aTriggerLocation );
+
+      static CEvtMgmtUiPlaceComponent* NewL(const TPtrC aPrevPlace,  
+                   TCoordinate& aTriggerLocation );
+
+      /**
+       * Virtual destructor
+       */
+      virtual ~CEvtMgmtUiPlaceComponent(); 
+      
+    public:// new functions
+     /**
+     * It is used as a wrapper class to trap leaving function DisplayPlacePopupDlgL()
+     *
+     * @since S60 v5.0
+     * 
+     * @param[in] aStatus - status which will contain success/failure state
+     *                       based on retrieval of location is successful or failed
+     */
+     void DisplayPlacePopupDlg( TRequestStatus& aStatus );    
+     
+     /**
+     * It is used to retrieve place details
+     * 
+     * @since S60 v5.0
+     * 
+     * @ret place details retrieved
+     */
+     TPtrC Place() const;
+     
+     /**
+      * It is used to retrieve location details
+      * 
+      * @since S60 v5.0
+      * 
+      * @ret location details retrieved
+      */
+     TCoordinate& TriggerLocation() const;
+  
+     /**
+      * It is used to launch position settings
+      * 
+      * @since S60 v5.0
+      */
+     void LaunchPositioningSettingsL();
+           
+    public: //Derived
+       
+       /**
+         * Derived from MEvtMgmtUiMapAndNavigationObserver
+         */
+       void HandleMapAndNavigationResponseL( TInt aErrorCode, const TPtrC aPlace, TCoordinate aTriggerLocation  );
+       
+       /**
+        * Derived from MEvtMgmtUiLocationServiceObserver
+        */
+       void HandleLocationServiceResponseL( const TInt aStatus );
+
+       /**
+        * Derived from MEvtMgmtUiLocationServiceObserver
+        */      
+       void HandleLocationServiceErrorL( TInt aErrorCode );
+       
+       /**
+       * Derived from MEvtMgmtUiWaitDialogLauncherObserver
+       */ 
+       void HandleDialogDismissed( TInt aButtonId );
+       
+       /**
+         * Derived from MEvtMgmtUiLocSettingsLauncherObserver
+         */ 
+       void NotifyLocSettingLaucherChangeL( TInt aErrorCode );
+
+    private://new functions
+        /*
+         * It is used to display accuracy note
+         */
+        void DisplayAccuracyNoteL();
+        /*
+         * It is used to display accuracy note
+         */
+        void DisplayAccuracyNoteL(TPosition& aPos);
+        /*
+         * It is used to get the accuracy string
+         */
+        void GetAccuracyStringL( TReal& aAccuracy, HBufC*& aAccuracyString );
+        /*
+         * Gets the place details from retrieved position information.
+         */
+        TInt GetPlaceL();
+        /*
+         * Resolves the Error code
+         */
+        void ResolveErrorL( TInt aErrorCode );
+       
+    private:  // Constructor
+        /**
+         * C++ Default constructor
+         */       
+        CEvtMgmtUiPlaceComponent( TCoordinate& aTriggerLocation );
+  
+        /**
+         * Second phase of the two phase constructor
+         */ 
+         void ConstructL( const TPtrC aPrevPlace );
+         
+    private: //new function
+        
+        /**
+         * It is used to display 'set place' popup dialog and retrieve place 
+         * using selected method.
+         *
+         * @since S60 v5.0
+         * 
+         * @ret it returns the option selected.
+         *      it leaves with KErrCancel, if popup dialog is cancelled.
+         *      it may leave with other errors, if retrieval of place fails.
+         */
+        TInt DisplayPlacePopupDlgL();
+           
+        /*
+         * It is used to display error note.
+         * 
+         * @since S60 v5.0
+         * 
+         * @param[in] aResourceId - resource ID of the text to be displayed on error note.
+         */
+        void DisplayErrorNoteL(TInt aResourceId );
+        
+       
+       /**
+        * It retrieves place details from landmark     
+        * 
+        * @since S60 v5.0
+        *       
+        */
+       void PlaceFromLandmarkL();
+         
+       /**
+         * It returns total number of landmarks stored in landmark database.     
+         * If there is any error in retrieving details, it will return zero landmark.
+         * 
+         * @since S60 v5.0
+         * 
+         * @ret total number of landmarks stored in landmark database
+         */
+       TInt LandmarksL();       
+
+       /**
+        * It displays message query if there is no positioning method enabled.     
+        * 
+        * @since S60 v5.0
+        * 
+        * @ret If pressed Ok, it will return true.
+        *      If pressed Close, it will return false.
+        */
+       TBool DisplayNoPositioningMethodInfoNoteL( TInt aResourceId );
+       
+       /**
+        * It initiates set place request from current location.
+        * If there is no positioning method enabled, it will leave with KErrCancel.
+        * Otherwise it will request current location and will launch busy dialog.     
+        * 
+        * @since S60 v5.0
+        *        
+        */
+       void PlaceFromCurrentLocationL();
+       
+       /**
+        * Update icons
+        */
+       void UpdateIconsL( CAknListQueryDialog& aDialog );    
+        
+       /**
+        * Append icon to icon array. CAknIconArray owns icons so it is 
+        * easier to it leave safely.
+        * @param aIcons icon array
+        * @param aIconFileWithPath icon file name with path
+        * @param aSkinID skin id of the icon
+        * @param aIconGraphicsIndex picture index
+        * @param aIconGraphicsMaskIndex mask index
+        */
+       void AddIconL( CAknIconArray&       aIcons,
+                      const TDesC&         aIconFileWithPath,
+                      TAknsItemID          aSkinID,
+                      TInt                 aIconGraphicsIndex,
+                      TInt                 aIconGraphicsMaskIndex );
+                            
+       /**
+        * Gets Events Management UI icon file path and name. Ownership
+        * is transferred, item is left in the cleanup stack.
+        * @return TFileName* The full name of the Events UI icon file.
+        */        
+       TFileName* IconFileNameLC() const;
+      /**
+       * It will create new trigger;    
+       */
+      //void CreateTriggerL();
+    private:
+        /**
+         * Place value
+         * owns
+         */
+        HBufC*                              iPlace;
+        /*
+         *  location details 
+         */
+        TCoordinate&                        iTriggerLocation;
+       
+        /*
+         *  status of retrieval of place 
+         *  Not own
+         */
+        TRequestStatus*                     iStatus;
+        
+        /*
+         * object used to retrieve place details from map 
+         * Owns
+         */
+        CEvtMgmtUiMapNavigationAdapter*     iMapAdapter;
+        /*
+         * object used to retrieve place details from current location
+         * Owns
+         */
+        CEvtMgmtUiLocationServiceAdapter*   iLocationServiceAdapter;
+        /**
+          * Wait dialog launcher
+          * Owns
+          */ 
+       CEvtMgmtUiWaitDialogLauncher*        iWaitDialogLauncher;   
+       /*
+        * object used to display position settings
+        * Owns
+        */
+       CEvtMgmtUiLocSettingsLauncher*       iPosSetLauncher;
+       
+       TBool                                iIsDlgOutstanding;
+    };
+
+#endif //EVTMGMTUIPLACECOMPONENT_H_
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventseditor/inc/evtmgmtuiringtonecomponent.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,211 @@
+/*
+* 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:   'Set Assigntone' component for retrieving ringtone.
+*
+*/
+
+
+#ifndef EVTMGMTUIRINGTONECOMPONENT_H_
+#define EVTMGMTUIRINGTONECOMPONENT_H_
+
+#include <e32base.h>        // CBase
+
+/**
+ *  @class CEvtMgmtUiRingtoneComponent
+ *  Class that represents 'Set tone' component of editor
+ *
+ *  This class acts as 'set tone' component of editor.
+ *  It  is used to retrieve tones from memory.
+ *  It is also used to record new ringtone and to pass its path to editor
+ *
+ *  @since S60 v9.1
+ */
+class CAknIconArray;
+class CNewFileServiceClient;
+class CFLDFileListContainer;
+
+class CEvtMgmtUiRingtoneComponent: public CBase
+    {
+    private:
+        /*
+         *  'Set tone' popup dialog options
+         */
+        enum TEvtMgmtUiAssignedTone
+            {
+            /*
+             * It indicates that 'select tone from existing' is selected
+             * from popup dialog
+             */
+            EEvtMgmtUiAssignedToneTone,
+            /*
+             * It indicates that 'record new tone' is selected
+             * from popup dialog
+             */
+            EvtMgmtUiAssignedToneRecordNew
+            };
+        
+    public:  // Constructor and destructor  
+        /**
+         * Static Two phase constructor
+         * @param [in] aPrevRingtone - previous ringtone of the existing event
+         *                           - null for newly created event            
+         */
+        static CEvtMgmtUiRingtoneComponent* NewL( const TPtrC aPrevRingtone );
+      /**
+       * Static Two phase constructor
+       * @param [in] aPrevRingtone - previous ringtone of the existing event
+       *                           - null for newly created event            
+       */
+      static CEvtMgmtUiRingtoneComponent* NewLC( const TPtrC aPrevRingtone );
+
+      /**
+       * Virtual destructor
+       */
+      virtual ~CEvtMgmtUiRingtoneComponent(); 
+      
+    public:// new functions  
+                
+     /**
+     * It is used to retrieve the selected ringtone's absolute path.
+     * 
+     * @since S60 v9.1
+     * 
+     * @ret absolute path of the selected ringtone
+     */
+     TPtrC Ringtone() const;      
+                
+     /**
+     * It is used to retrieve the default ringtone's absolute path.
+     * 
+     * @since S60 v9.1
+     * 
+     * @ret absolute path of the default ringtone
+     */
+     TPtrC DefaultRingtoneL(); 
+     
+     /**
+      * It is used to display 'Set tone' popup dialog and to retrieve ringtone.
+      * 
+      * @since S60 v9.1
+      * 
+      * @ret error if there is any error
+      *      KErrNone if it is successful
+      */
+     TInt DisplayAudioTonePopupDlgL();  
+   
+      
+    private:  // Constructor
+        /**
+         * C++ Default constructor
+         */       
+        CEvtMgmtUiRingtoneComponent();
+  
+        /**
+         * Second phase of the two phase constructor
+         * @param [in] aPrevRingtone - previous ringtone of the existing event     
+         */ 
+         void ConstructL( const TPtrC aPrevRingtone );
+         
+    private: // new functions
+           
+       /**
+        * It is used to display generic popup dialog.
+        * 
+        * @since S60 v9.1
+        *
+        * @ret index of item selected if OK is pressed
+        *       KErrCancel if Cancel is pressed 
+        */
+       TInt DisplayPopupDlgL();
+       
+       /*
+        * It is used to record new ringtone.
+        * 
+        * @since S60 v5.0
+        * 
+        * @ret KErrNone if recording is succesful.
+        *      error code if it is failed.
+        */
+       TInt RecordNewToneL();
+       
+       /*
+        * It is used to generate filename for recording new file.
+        * 
+        * @since S60 v5.0
+        * 
+        * @param[out] aFileName - it will contain generated file-name
+        * @ret KErrNone if recording is succesful.
+        *      error code if it is failed.
+        */
+       TInt  FileNameForRecordingL( TDes& aFileName );
+       
+       /**
+          * It is used display  system's 'select tone' dialog.
+          * 
+          * @since S60 v5.0
+          * 
+          * @ret error while displaying 'select tone' dialog and 
+          *      retrieving ringtone from it. 
+          *      KErrNone if it is successful
+          */
+         TInt DisplayRingtoneSelectionDlgL();   
+         
+       /**
+         * It is used to update icons
+         */
+        void UpdateIconsL( CAknListQueryDialog& aDialog );    
+         
+        /**
+         * Append icon to icon array. CAknIconArray owns icons so it is 
+         * easier to it leave safely.
+         * @param aIcons icon array
+         * @param aIconFileWithPath icon file name with path
+         * @param aSkinID skin id of the icon
+         * @param aIconGraphicsIndex picture index
+         * @param aIconGraphicsMaskIndex mask index
+         */
+        void AddIconL( CAknIconArray&       aIcons,
+                       const TDesC&         aIconFileWithPath,
+                       TAknsItemID          aSkinID,
+                       TInt                 aIconGraphicsIndex,
+                       TInt                 aIconGraphicsMaskIndex );
+                             
+        /**
+         * Gets Events Management UI icon file path and name. Ownership
+         * is transferred, item is left in the cleanup stack.
+         * @return TFileName* The full name of the Events UI icon file.
+         */        
+        TFileName* IconFileNameLC() const;
+    
+    private:
+        /**
+         * Ringtone value
+         * owns
+         */
+        HBufC* iRingtone;
+		
+        /**
+         * New File Service Instance
+         * owns
+         */
+        CNewFileServiceClient* iRecorderClient;
+		
+        /**
+         * File List component
+         * owns
+         */
+        CFLDFileListContainer*  iSelectRingtoneDlg;
+    };
+
+#endif //EVTMGMTUIRINGTONECOMPONENT_H_
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventseditor/inc/evtmgmtuisysofmeasurement.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,129 @@
+/*
+* 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:  An observer for change in System of Measurement
+*
+*/
+
+#ifndef C_EVTMGMTUISYSOFMEASUREMENT_H_
+#define C_EVTMGMTUISYSOFMEASUREMENT_H_
+
+//  System Includes
+#include <e32base.h>
+
+// User Includes
+#include "locnotprefplugindomaincrkeys.h"
+
+// Forward Declarations
+class CRepository;
+
+// Constant Declarations
+
+// Class Definition
+class MEvtMgmtUiSOMObserver
+    {
+public:
+    /**
+     * It will be used to notify observer that lbt operation
+     * has be completed
+     * @param aTriggerId trigger id of newly created trigger
+     * @param aState It will contain the the operation type              
+     */
+    virtual void NotifySOMChangeL( )=0;
+
+    };
+    
+
+/**
+ * Adapter to the System of Measurement settings storage
+ */
+class CEvtMgmtUiSysOfMeasurement : public CActive
+    {
+    public:
+        /**
+         * Creates new System of Measurement adapter
+         *
+         * @param  aAdapterObsrv                        Observer to the Settings adapter
+         * @return CEvtMgmtUiSysOfMeasurement&  Reference to the application view
+         */                                                 
+        static CEvtMgmtUiSysOfMeasurement* NewL( 
+                            MEvtMgmtUiSOMObserver& aAdapterObsrv );
+
+
+        /**
+         * Creates new System of Measurement adapter
+         * Leaves the object on the Clean up stack         
+         *
+         * @param  aAdapterObsrv                        Observer to the Settings adapter
+         * @return CEvtMgmtUiSysOfMeasurement&  Reference to the application view
+         */                                                 
+        static CEvtMgmtUiSysOfMeasurement* NewLC( 
+                            MEvtMgmtUiSOMObserver& aAdapterObsrv );    
+
+        
+        /**
+         * Destructor
+         */
+        ~CEvtMgmtUiSysOfMeasurement ();
+
+        /**
+         * Returns the current value of the System of measurements settings
+         *
+         * @return TLocSystemofMeasurementValues  Current value of the System of measurements settings
+         */
+        TLocSystemofMeasurementValues GetCurrentSysofMeasL();
+        
+    protected:
+        /**
+         * Inherited from CActive
+         */
+        void RunL();
+        
+        /**
+         * Inherited from CActive
+         */
+        void DoCancel();
+                        
+    private:
+        /**
+         * Constructor
+         */
+        CEvtMgmtUiSysOfMeasurement( MEvtMgmtUiSOMObserver& aAdapterObsrv );
+
+        /**
+         * Second Phase Constructor
+         */
+        void ConstructL();
+    
+        /**
+         * Start notification from the Central repository server for any changes in the
+         * System of measurements key value
+         */
+        void StartNotification();
+                
+    private:
+        /**
+         * Reference to the Adapter observer
+         */
+        MEvtMgmtUiSOMObserver&     iObserver;
+
+        /**
+         * Reference to the Central repository object
+         *
+         * Owns
+         */
+        CRepository*                    iRepository;        
+        
+    };          
+
+#endif // C_EVTMGMTUISYSOFMEASUREMENT_H_
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventseditor/inc/evtmgmtuiwaitdlglauncher.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,189 @@
+/*
+* 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:  Encapuslates the Wait dialog in an Active Object interface 
+*
+*/
+
+
+#ifndef EVTMGMTUIWAITDLGLAUNCHER_H
+#define EVTMGMTUIWAITDLGLAUNCHER_H
+
+// System Includes
+#include <AknWaitDialog.h>
+#include <AknProgressDialog.h>
+#include <e32base.h>
+
+// Class Declaration
+/**
+* MLmkDlgMenuObserver class 
+*/
+class MEvtMgmtUiWaitDialogLauncherObserver
+    {
+    public: // New functions
+        virtual void HandleDialogDismissed( TInt aButtonId ) = 0;
+    };
+/**
+ * Class used to encapsulate the AknWaitDialog in an Active object interface.
+ * Provides the functionality to launch the Wait dialog in an asynchronous mode
+ * so that the current running context is not blocked.
+ */
+NONSHARABLE_CLASS ( CEvtMgmtUiWaitDialogLauncher ) : public CActive,
+                                                     public MProgressDialogCallback
+    {
+    public:
+        /**
+         * Two phased constructor for creating the Wait dialog launcher.
+         *
+         * @return CEvtMgmtUiWaitDialogLauncher* Pointer to the created object.
+         */
+        static CEvtMgmtUiWaitDialogLauncher* NewL();
+        
+        /**
+         * Destructor.
+         */        
+        ~CEvtMgmtUiWaitDialogLauncher();
+        
+        /**
+         * Issues an asynchronous request to start the Wait dialog. The termination
+         * of the dialog either when User terminated or when terminated using the 
+         * StopWaitingDialog call will be notified using the MProgressDialogCallback
+         * observer object.
+         */
+        void StartWaitDialogL();
+        
+        /**
+         * Issues an asynchronous request to the stop the running Wait dialog. The
+         * actual dismissal of the dialog will be communicated using the 
+         * MProgressDialogCallback observer object.
+         * 
+         * @return TInt The Button ID with which the dialog was dismissed
+         */
+        TInt StopWaitDialogL();
+        
+        /**
+         * Issues an synchronous request to start the Wait dialog. The termination
+         * of the dialog either when User terminated or when terminated using the 
+         * StopWaitingDialog call will be notified using the MProgressDialogCallback
+         * observer object.
+         */
+        void StartWaitDialogSyncL();
+        
+        /**
+         * Issues an synchronous request to the stop the running Wait dialog. The
+         * actual dismissal of the dialog will be communicated using the 
+         * MProgressDialogCallback observer object.
+         * 
+         * @return TInt The Button ID with which the dialog was dismissed
+         */        
+        TInt StopWaitDialogSyncL();
+        
+        /**
+         * Sets an observer, so that, client can be notified about the
+         * button id, after the dialog dismissal.
+         */
+        void SetObserver( MEvtMgmtUiWaitDialogLauncherObserver* aObserver );
+    
+        /*
+         * Allow user to cancel busy dialog
+         * @param[in] aIsCancelAvailable - True if user is allowed to cancel else false 
+         */
+        void AllowUserToCancel( TBool aIsCancelAvailable );
+       
+        /*
+         * It will set text to be displayed on wait dialog.
+         * 
+         * @since Symbian v9.1
+         * 
+         * @param[in] aText - text to be displayed on wait dialog.
+         */
+        void SetTextL(const TDesC& aText);
+        
+        /*
+         * It will set text to be displayed on wait dialog.
+         * 
+         * @since Symbian v9.1
+         * 
+         * @param[in] aResourceId - resource id of the text to be displayed 
+         *                          on wait dialog.
+         */
+        void SetTextL( const TInt aResourceId );
+        
+    private:
+        /**
+         * Inherited from MProgressDialogCallback. The scope of the function is
+         * made private since, this should be called only from the 
+         * MProgressDialogCallback interface and from the Wait dialog alone.
+         */
+        void DialogDismissedL( TInt aButtonId );
+        
+    private:
+        /**
+         * Overloaded C++ constructor
+         */
+        CEvtMgmtUiWaitDialogLauncher();
+        
+        /**
+         * Second phase constructor
+         */
+        void ConstructL();
+        
+    protected:
+        /**
+         * Inherited from CActive
+         */
+        void RunL();
+        
+        /**
+         * Inherited from CActive
+         */
+        void DoCancel();
+    
+    private:
+        
+        /**
+         * Button ID with which the dialog was cancelled
+         */
+        TInt                        iButtonId;
+         
+        /**
+         * Wait Note
+         * Owns
+         */
+        CAknWaitDialog*             iWaitNote;
+        
+        /**
+         * Active Scheduler re-loop to make Stop synchronous
+         */
+        CActiveSchedulerWait*       iSchedWait;
+        /**
+         * ref
+         * Observer for callback, when the dialog is dissmissed.
+         */
+        MEvtMgmtUiWaitDialogLauncherObserver*       iObserver;
+        
+        /*
+         * It determines weather user is allowed to cancel dialog.
+         */
+        TBool iIsCancelAvailable;
+        
+        /*
+         * Owns
+         * text to be displayed on wait dialog.
+         */
+        HBufC*  iWaitText;
+    };
+    
+#endif // EVTMGMTUIWAITDLGLAUNCHER_H   
+            
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventseditor/src/evteditor.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,1729 @@
+/*
+* 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:   Form class for creating events.
+*
+*/
+
+#include <evtmgmteditorui.rsg>
+#include <avkon.rsg>
+#include <avkon.hrh>
+#include <eikedwin.h>
+#include <eikmenup.h>
+#include <eikenv.h>
+#include <aknlistquerydialog.h>
+#include <StringLoader.h>
+#include <eikaufty.h>
+#include <AknPopupFieldText.h> 
+#include <eikenv.h>
+#include <eikspane.h>       // Status pane
+#include <akntitle.h>       // CAknTitlePane
+#include <aknuniteditor.h> 
+#include <e32math.h>
+#include <AknIconArray.h>       // Icon Array
+#include <evteditor.mbg>
+#include <AknsUtils.h>
+#include <AknsSkinInstance.h>
+#include <data_caging_path_literals.hrh>
+#include <gulicon.h>            // Gul Icon
+#include <eikapp.h>
+#include <eikenv.h>
+#include <barsread.h>               // For TResourceReader
+#include <bautils.h> 
+#include <eikserverapp.h>
+#include <aknappui.h>
+#include <AknUtils.h>
+#include <aknnotewrappers.h>
+#include <hlplch.h>
+
+#include "evteditor.h"
+#include "evtmgmteditorui.hrh"
+#include "evtevent.h"
+#include "evttoneaction.h"
+#include "evtdebug.h"
+#include "evteditorconsts.h"
+#include "evtmgmtuiringtonecomponent.h"
+#include "evtdefs.h"
+
+// ---------------------------------------------------------------------------
+// CEvtEditor::NewL()
+// @param[in] aIsEditMode - It sets mode of editor. 
+//                          If true, edit mode is set else view mode is set. 
+// @param[in] aEvent - The event to be displayed on editor
+//                     Empty if new event is going to be created.
+// @param[in] aTriggerLocation - Coordinate based location details of 
+//                                  the event to be displayed on editor. 
+// @param[in] aExitCmdHandler - It handles all commands which may result into closing editor.
+// ---------------------------------------------------------------------------
+//
+CEvtEditor* CEvtEditor ::NewL(TBool                             aIsEditable, 
+                             CEvtEvent&                         aEvent, 
+                             CEvtMgmtUiEngine&                  aEventEngine,
+                             TBool                              aDisplayExitMenuItem
+                             )
+    {
+    CEvtEditor * self = new (ELeave) CEvtEditor(aIsEditable, aEvent, aEventEngine, aDisplayExitMenuItem );
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    CleanupStack::Pop(self);
+    return self;
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtEditor::~CEvtEditor()
+// ---------------------------------------------------------------------------
+//
+CEvtEditor::~CEvtEditor()
+    {  
+	EVTUIDEBUG("+ CEvtEditor::~CEvtEditor()");
+    // Close the resource loader
+    iResourceLoader.Close();
+       
+    if(iCmdHandler)
+        {
+        delete iCmdHandler;
+        iCmdHandler = NULL;
+        }
+    
+    delete iSysOfMeas;
+    iSysOfMeas = NULL;
+	EVTUIDEBUG("- CEvtEditor::~CEvtEditor()");
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtEditor ::ConstructL()
+// ---------------------------------------------------------------------------
+//
+void CEvtEditor ::ConstructL()
+    {
+	EVTUIDEBUG("+ CEvtEditor::ConstructL()");
+    // Open the Resource File
+    OpenLocalizedResourceFileL( KEvtEditorResFileName, iResourceLoader );
+       
+    CAknForm::ConstructL(R_EVTMGMTUI_CREATEEVENTFORM_MENUBAR);    
+    iCmdHandler = CEvtMgmtUiEditorCmdHandler::NewL( iEvent, 
+                                                    *this,
+                                                    iEventEngine );
+    
+    // Observer for a change in System of Measurement
+    iSysOfMeas = CEvtMgmtUiSysOfMeasurement::NewL(*this);
+    	EVTUIDEBUG("- CEvtEditor::ConstructL()");
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtEditor ::CEvtEditor()
+// ---------------------------------------------------------------------------
+//
+CEvtEditor::CEvtEditor( TBool                           aIsEditable, 
+                        CEvtEvent&                      aEvent,
+                        CEvtMgmtUiEngine&               aEventEngine,
+                        TBool                           aDisplayExitMenuItem)
+    :iIsEditMode( aIsEditable ), 
+    iEvent( aEvent ), 
+    iResourceLoader( *CCoeEnv::Static()),
+    iEventEngine( aEventEngine ),
+    iDisplayExitMenuItem( aDisplayExitMenuItem )
+    {
+    iEventAttributeMask = 0;
+    }
+
+// ---------------------------------------------------------------------------
+// Derived from CEikDialog
+// CEvtEditor ::OkToExitL()
+// ---------------------------------------------------------------------------
+//
+TBool CEvtEditor::OkToExitL( TInt aButtonId )
+    {
+	EVTUIDEBUG1("+ CEvtEditor::OkToExitL() - %d", aButtonId );
+    switch(aButtonId)
+        {
+        case EAknFormCmdEdit: // when MSK is pressed
+            {
+            //Handle MSK operation based on focused line.
+            HandleMSKL(); 
+            //dont close editor
+            return EFalse;
+            }
+        case EAknSoftkeyOptions: //when LSK is pressed
+            {
+            //display menu specific to editor
+            DisplayMenuL();
+            //don't close editor
+            return EFalse;
+            }
+        case EAknSoftkeyDone: // when RSK is pressed in edit mode
+            {
+            return ProcessDoneCommandL();
+            }
+        default: // close editor in all other cases
+            {
+            return ETrue;
+            }
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtEditor::ProcessDoneCommandL()
+// It checks if event is empty.
+// @ret true if event is empty else false
+// ---------------------------------------------------------------------------
+//
+TBool CEvtEditor::ProcessDoneCommandL()
+    {                
+    //validate event, if valid event, display 'Event status' popup dialog
+    // and perform selected operation.          
+    if( IsEmptyEventL() || !iEventAttributeMask )
+        {
+        return ETrue;
+        }                
+    else
+        {
+        //update attribute mask so that only those attributes of event will be modified                    
+        iCmdHandler->SetEventAttributeMask( iEventAttributeMask );
+
+        if(EActive == iEvent.EventStatus())
+            {
+            if(MandatoryFieldsFilled())
+                {
+                iCmdHandler->HandleEditorCmdL( EEvtEditorCmdActivate );
+                }
+            else
+                {
+                HBufC* infoMsg = StringLoader::LoadLC(R_LOCEV_NOTE_MISSED_INFO );
+                CAknInformationNote* infoNote = new(ELeave) CAknInformationNote( ETrue );
+                infoNote->ExecuteLD( *infoMsg  );
+                CleanupStack::PopAndDestroy();
+                }
+            }
+        else
+            {
+            iCmdHandler->HandleEditorCmdL( EEvtEditorCmdSaveDraft );
+            }
+            
+        return EFalse;
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtEditor::IsEmptyEventL()
+// It checks if event is empty.
+// @ret true if event is empty else false
+// ---------------------------------------------------------------------------
+//
+TBool CEvtEditor::IsEmptyEventL()
+    {    
+    //if eventid is not zero, it means existing event is opened in editor
+    //hence it is not empty event.
+    if(iEvent.EventId())
+        return EFalse;
+
+    // Check for Default Action
+    TBool defaultAction(EFalse);
+    if( iEvent.HasAction() )
+        {            
+        CEvtToneAction* tone = CEvtToneAction::NewLC();  
+        tone->InternalizeL( iEvent.Action() );  
+        CEvtMgmtUiRingtoneComponent* ringtoneComponent = CEvtMgmtUiRingtoneComponent::NewLC( KNullDesC() );
+        if( ringtoneComponent->DefaultRingtoneL().Compare( tone->FileName() ) == 0 && 
+                !tone->ToneLoop() )
+            {
+            defaultAction = ETrue;
+            }
+        CleanupStack::PopAndDestroy( 2 ); // tone, ringtoneComponent
+        }
+    
+    //if eventid is zero, it means new event is about to create.
+    //hence check if something is entered by the user.    
+    if( 6 == GetNumberOfLinesOnPage(0) && //if only subject,place and repeat are present
+        0 == iEvent.Subject().Compare(KNullDesC) && //if subject is empty
+        0 == iEvent.Place().Compare(KNullDesC) && // if place is default
+        0 == iEvent.Repeat() && // if repeat is OFF
+        EDraft == iEvent.EventStatus() &&
+        defaultAction ) // if Status is Draft
+        {       
+        return ETrue; 
+        }  
+    return EFalse;
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtEditor ::LoadFormValuesFromDataL()
+// Called when the form is  executed and when the user chooses to discard changes
+// in QuerySaveChangesL (via  DoNotSaveFormDataL).
+// ---------------------------------------------------------------------------
+// 
+void CEvtEditor::LoadFormValuesFromDataL()
+    {
+	EVTUIDEBUG("+ CEvtEditor::LoadFormValuesFromDataL()");
+    if(iEvent.EventId()==0) //if create event
+        {
+        CEikEdwin* placeEditor = static_cast <CEikEdwin*> (ControlOrNull(EEvtMgmtUiDlgCIdPlace));            
+            if(placeEditor)
+                {   
+                if( iEvent.Place().Compare(KNullDesC) == 0 )  
+                    {
+                    HBufC* define = StringLoader::LoadLC(R_EVTUI_CREATENEW_FORM_DEFINED);   
+                    placeEditor->SetTextL(define);
+                    CleanupStack::PopAndDestroy(define);
+                    }               
+                } 
+            
+        CAknPopupFieldText* repeatPopupFieldText = (CAknPopupFieldText*)Control( EEvtMgmtUiDlgCIdRepeat );
+            if(repeatPopupFieldText)
+                {  
+                repeatPopupFieldText->SetCurrentValueIndex(1);      
+                }
+
+        // Set the Default Ringtone
+        CEvtMgmtUiRingtoneComponent* ringtoneComponent = CEvtMgmtUiRingtoneComponent::NewLC( KNullDesC() );
+        if( ringtoneComponent->DefaultRingtoneL().Compare( KNullDesC ) == 0 )
+            {
+            iEvent.SetActionL( NULL );
+            }
+        else
+            {
+            CEvtToneAction* tone = CEvtToneAction::NewLC();
+            tone->SetFileNameL( ringtoneComponent->Ringtone() );
+            tone->SetToneLoop( EFalse );  
+      
+            CEvtAction* action = CEvtAction::NewLC();
+            tone->ExternalizeL( *action );
+            iEvent.SetActionL( action ); // ownership is transferred.
+            CleanupStack::Pop( action ); // action  
+
+            CleanupStack::PopAndDestroy( ); // tone        
+            }
+        CleanupStack::PopAndDestroy( ); // ringtoneComponent   
+        
+        SetRingtoneL();
+        
+        // Set Default Status
+        iEvent.SetEventStatus(EDraft);
+        SetStatusL();
+        
+        return;
+        }
+    
+   //assign initial values
+   	CEikEdwin* subjectEditor = static_cast <CEikEdwin*> (ControlOrNull(EEvtMgmtUiDlgCIdSubject));
+    if(subjectEditor )
+        {        
+		if( iEvent.Subject().Compare(KNullDesC) != 0 )
+			{
+			HBufC* subject = iEvent.Subject().AllocLC();   
+			subjectEditor->SetTextL( subject );
+			CleanupStack::PopAndDestroy(subject);
+			}
+        }
+   
+    CEikEdwin* placeEditor = static_cast <CEikEdwin*> (ControlOrNull(EEvtMgmtUiDlgCIdPlace));            
+    if(placeEditor)
+        {   
+        if( iEvent.Place().Compare(KNullDesC) == 0 )  
+	        {
+			HBufC* define = StringLoader::LoadLC(R_EVTUI_CREATENEW_FORM_DEFINED);   
+			placeEditor->SetTextL(define);
+			CleanupStack::PopAndDestroy(define);
+	        }
+	    else
+		    {
+			HBufC* place = iEvent.Place().AllocLC();   
+			placeEditor->SetTextL(place);
+			CleanupStack::PopAndDestroy(place);
+            EVTUIDEBUG(" Setting Radius");
+            InsertRadiusDlgLineL();
+		    }
+	    }     
+    
+    CAknPopupFieldText* repeatPopupFieldText = (CAknPopupFieldText*)Control( EEvtMgmtUiDlgCIdRepeat );
+    if(repeatPopupFieldText)
+        {    
+        if(iEvent.Repeat())
+            repeatPopupFieldText->SetCurrentValueIndex(0);
+         else
+             repeatPopupFieldText->SetCurrentValueIndex(1);      
+        }
+    
+    // Set Ringtone
+    SetRingtoneL();
+    
+    // Set Status
+    SetStatusL();
+       
+    if( iEvent.Description().Compare(KNullDesC)!=0 )
+        {
+        InsertDesDlgLineL();
+        SetDescL();
+        }
+	EVTUIDEBUG("- CEvtEditor::LoadFormValuesFromDataL()");
+    }
+ 
+// ---------------------------------------------------------------------------
+// Derived from CEikDialog
+// CEvtEditor ::PreLayoutDynInitL()
+// ---------------------------------------------------------------------------
+// 
+void CEvtEditor::PreLayoutDynInitL()
+    {
+	EVTUIDEBUG("+ CEvtEditor::PreLayoutDynInitL()");
+    CAknForm::PreLayoutDynInitL();
+    
+    //Load existing event if it is opened in viewe mode  
+    LoadFormValuesFromDataL();
+	EVTUIDEBUG("- CEvtEditor::PreLayoutDynInitL()");
+    }
+ 
+// ---------------------------------------------------------------------------
+// Derived from CEikDialog
+// CEvtEditor ::PostLayoutDynInitL()
+// ---------------------------------------------------------------------------
+// 
+void CEvtEditor::PostLayoutDynInitL()
+    {
+	EVTUIDEBUG("+ CEvtEditor::PostLayoutDynInitL()");
+   CAknForm::PostLayoutDynInitL();
+   
+     if(iEvent.Subject().Compare(KNullDesC) == 0)
+        {
+        if(iEvent.EventId())
+            {
+            TPtrC ptr = KNullDesC();
+            MakeTitleL(ptr);  
+            }
+        else
+            {
+            HBufC* navititle = StringLoader::LoadLC( R_EVTUI_CREATENEW_FORM_DEFAULTNAVITITLE);
+            MakeTitleL(*navititle);  
+            CleanupStack::PopAndDestroy(navititle);
+            }
+        }
+    else
+        {
+        TPtrC ptr = iEvent.Subject();
+        MakeTitleL( ptr);
+        }
+            
+    ChangeRSKCaptionL();
+    SetEditableL(iIsEditMode);
+	EVTUIDEBUG("- CEvtEditor::PostLayoutDynInitL()");
+    }
+// ---------------------------------------------------------------------------
+// Derived from CAknForm
+// CEvtEditor ::DynInitMenuPaneL()
+// ---------------------------------------------------------------------------
+//  
+void CEvtEditor ::DynInitMenuPaneL(TInt aResourceId, CEikMenuPane* aMenuPane)
+    {
+    CAknForm::DynInitMenuPaneL(aResourceId,aMenuPane);
+
+    if (aResourceId == R_AVKON_FORM_MENUPANE)
+        {  
+        
+        // Disable all the unwanted AKnForm's Default Menu Items 
+        aMenuPane->SetItemDimmed(EAknFormCmdLabel, ETrue);
+        aMenuPane->SetItemDimmed(EAknFormCmdAdd, ETrue);
+        aMenuPane->SetItemDimmed(EAknFormCmdDelete, ETrue);
+        aMenuPane->SetItemDimmed(EAknFormCmdSave, ETrue);
+        
+        if(iDisplayExitMenuItem)
+            aMenuPane->SetItemDimmed(EAknCmdExit, EFalse);
+        else
+            aMenuPane->SetItemDimmed(EAknCmdExit, ETrue);
+        
+        if( IsEditable() )
+	        {
+	        // "Edit" present only in Viewer mode
+	        aMenuPane->SetItemDimmed(EAknFormCmdEdit, ETrue);
+	        
+	        // "Discard Changes" has to be present only in Edit mode
+	        // and if some changes are made
+	        if( IsEmptyEventL() || !iEventAttributeMask || !iEvent.EventId())
+	            aMenuPane->SetItemDimmed(EEvtEditorCmdDiscard, ETrue);
+	        else
+                aMenuPane->SetItemDimmed(EEvtEditorCmdDiscard, EFalse);
+            
+            // Initially display all the Editor specific Menu items which 
+            // are dimmed based on focus and context
+			aMenuPane->SetItemDimmed(EEvtEditorCmdAddDesc, ETrue);
+			aMenuPane->SetItemDimmed(EEvtEditorCmdRemoveDesc, ETrue);
+			aMenuPane->SetItemDimmed(EEvtEditorCmdSetPlace, ETrue);
+			aMenuPane->SetItemDimmed(EEvtEditorCmdEditDesc, ETrue);
+
+			if(NULL == ControlOrNull(EEvtMgmtUiDlgCIdAssignTone))
+			    aMenuPane->SetItemDimmed(EEvtEditorCmdAssignTone, EFalse);
+			else
+			    aMenuPane->SetItemDimmed(EEvtEditorCmdAssignTone, ETrue);
+	        
+	        // "Add Description" / "Remove Description" is displayed based
+	        // on Decsription control's existance in Form
+	        if( NULL == ControlOrNull(EEvtMgmtUiDlgCIdDesc) )
+	            {
+	            aMenuPane->SetItemDimmed(EEvtEditorCmdAddDesc, EFalse);
+	        	aMenuPane->SetItemDimmed(EEvtEditorCmdRemoveDesc, ETrue);
+	            }
+	        else
+	            {
+	            aMenuPane->SetItemDimmed(EEvtEditorCmdAddDesc, ETrue);
+	        	aMenuPane->SetItemDimmed(EEvtEditorCmdRemoveDesc, EFalse);
+	            }
+            
+	        // Menu items whose existance depends on the focussed control
+	        switch( IdOfFocusControl() )
+	            {
+	            case EEvtMgmtUiDlgCIdPlace:
+	                {
+	                aMenuPane->SetItemDimmed(EEvtEditorCmdSetPlace, EFalse);
+	                break;
+	                }
+	            case EEvtMgmtUiDlgCIdDesc:            
+	                {
+	                aMenuPane->SetItemDimmed(EEvtEditorCmdEditDesc, EFalse);
+	                break;
+	                }    
+	            case EEvtMgmtUiDlgCIdAssignTone:              
+	                {
+	                aMenuPane->SetItemDimmed(EAknFormCmdEdit, ETrue);
+	                aMenuPane->SetItemDimmed(EEvtEditorCmdAssignTone, EFalse);
+	                break;
+	                }    
+	            case EEvtMgmtUiDlgCIdRepeat:
+	            case EEvtMgmtUiDlgCIdAudioLoop:   
+                case EEvtMgmtUiDlgCIdStatus:            
+	                {
+	        		aMenuPane->SetItemDimmed(EAknFormCmdEdit, EFalse);
+        			aMenuPane->SetItemTextL(EAknFormCmdEdit,R_EVTUI_CREATENEW_FORM_CMDCHANGE);
+	                break;
+	                }    
+	            default:
+	                {
+	                break;
+	                }                
+	            }//switch
+ 
+            // Activate and Draft are absent in Edit mode
+            aMenuPane->SetItemDimmed(EEvtEditorCmdActivate, ETrue);
+            aMenuPane->SetItemDimmed(EEvtEditorCmdSaveDraft, ETrue);
+	            
+	        // Editor/Viewer specific menu items    
+    		aMenuPane->SetItemDimmed(EEvtEditorCmdNavigateToPlace, ETrue);
+    		aMenuPane->SetItemDimmed(EEvtEditorCmdShowOnMap, ETrue);
+    		aMenuPane->SetItemDimmed(EEvtMgmtUiEventUiPosSettings, EFalse);
+	        }
+	    else   // View Mode
+	        {
+	        // "Edit" present only in Viewer mode
+	        aMenuPane->SetItemDimmed(EAknFormCmdEdit, EFalse);
+            
+            // "Discard Changes" has to be absent only in View mode
+            aMenuPane->SetItemDimmed(EEvtEditorCmdDiscard, ETrue);
+            
+            // Dim all the Editor specific Menu items.
+			aMenuPane->SetItemDimmed(EEvtEditorCmdAddDesc, ETrue);
+			aMenuPane->SetItemDimmed(EEvtEditorCmdRemoveDesc, ETrue);
+			aMenuPane->SetItemDimmed(EEvtEditorCmdSetPlace, ETrue);
+			aMenuPane->SetItemDimmed(EEvtEditorCmdEditDesc, ETrue);
+			aMenuPane->SetItemDimmed(EEvtEditorCmdAssignTone, ETrue);
+            
+            // Menu items that depend on Event's status
+    		switch( iEvent.EventStatus() )
+    			{
+    			case EActive:
+    			    {
+            		aMenuPane->SetItemDimmed(EEvtEditorCmdActivate, ETrue);
+            		aMenuPane->SetItemDimmed(EEvtEditorCmdSaveDraft, EFalse);
+    				break;
+    			    }
+    			case EDraft:
+    			    {
+    			    if(MandatoryFieldsFilled())
+    			        aMenuPane->SetItemDimmed(EEvtEditorCmdActivate, EFalse);
+    			    else
+    			        aMenuPane->SetItemDimmed(EEvtEditorCmdActivate, ETrue);
+            		aMenuPane->SetItemDimmed(EEvtEditorCmdSaveDraft, ETrue);
+    				break;
+    			    }
+                case ECompleted:
+                    {
+                    aMenuPane->SetItemDimmed(EEvtEditorCmdActivate, EFalse);
+                    aMenuPane->SetItemDimmed(EEvtEditorCmdSaveDraft, EFalse);
+                    break;
+                    }
+    			default:
+    				break;
+    			}
+    			
+	        // if location is defined
+    		if( Math::IsNaN( iEvent.Location().Latitude() ) || Math::IsNaN( iEvent.Location().Latitude() )
+    			|| iEvent.Location().Latitude() == 0 || iEvent.Location().Latitude() == 0 ) 
+    		    {
+        		aMenuPane->SetItemDimmed(EEvtEditorCmdNavigateToPlace, ETrue);
+        		aMenuPane->SetItemDimmed(EEvtEditorCmdShowOnMap, ETrue);
+    		    }
+    		else
+    		    {
+    		    aMenuPane->SetItemDimmed(EEvtEditorCmdNavigateToPlace, EFalse);
+                aMenuPane->SetItemDimmed(EEvtEditorCmdShowOnMap, EFalse);
+                 }
+    		aMenuPane->SetItemDimmed(EEvtMgmtUiEventUiPosSettings, ETrue);
+	        }
+
+        }//if
+    }
+// -----------------------------------------------------------------------------
+// Derived from CEikDialog
+// CEvtEditor::HandleControlStateChangeL()
+// Called when focus is moved from the specified line.
+// -----------------------------------------------------------------------------
+//
+void CEvtEditor::HandleControlStateChangeL(TInt aControlId)
+    {
+	EVTUIDEBUG1("+ CEvtEditor::PostLayoutDynInitL() - %d", aControlId );
+    switch(aControlId)
+        {
+        case EEvtMgmtUiDlgCIdSubject:
+            {            
+            iEventAttributeMask  = iEventAttributeMask | CEvtMgmtUiEngine::EEvtEventAttributeSubject;
+            
+            //Retrieve subject text 
+            CEikEdwin* subjectEditor = static_cast <CEikEdwin*> (ControlOrNull(EEvtMgmtUiDlgCIdSubject));            
+            if(subjectEditor)
+                {                       
+                HBufC* subject = subjectEditor->GetTextInHBufL();
+                if( subject )
+	                {
+	                CleanupStack::PushL(subject);
+	                subject->Des().Trim();
+	                iEvent.SetSubjectL(*subject);
+                	MakeTitleL(*subject); 
+	                CleanupStack::PopAndDestroy(subject);
+	                }
+	            else
+	                {
+	                iEvent.SetSubjectL(KNullDesC);
+	                HBufC* navititle = StringLoader::LoadLC( R_EVTUI_CREATENEW_FORM_DEFAULTNAVITITLE);
+	                MakeTitleL(*navititle);             
+	                CleanupStack::PopAndDestroy(navititle);	
+	                }
+                }              
+            break;
+            } 
+        case EEvtMgmtUiDlgCIdRadius:
+            {
+            iEventAttributeMask  = iEventAttributeMask | CEvtMgmtUiEngine::EEvtEventAttributeRadius;
+            CAknUnitEditor* radiusEd =
+                 (CAknUnitEditor*)Control( EEvtMgmtUiDlgCIdRadius );
+            if(radiusEd)
+                {
+                //convert radius in km unit
+                TReal val(0);
+        		if( EAknUnitEditorMile == radiusEd->Unit() )
+        			{        			
+        			val = radiusEd->Value();
+        			val /= KUnitConversion;        		       			       			
+        			}
+        		if( EAknUnitEditorKilometer ==radiusEd->Unit() )
+        		    val = radiusEd->Value();
+        		
+        		//validate radius value
+        		if( val<KMinRadiusInKm ) //if less than minima, set to minima
+        		    iEvent.SetRadius( KMinRadiusInKm );
+        		else if( val>KMaxRadiusInKm ) //if greater than maxima, set to maxima
+        		    iEvent.SetRadius( KMaxRadiusInKm );
+        		else
+        		    iEvent.SetRadius( val );
+                }
+            break;
+            } 
+        case EEvtMgmtUiDlgCIdRepeat:
+           {
+           iEventAttributeMask  = iEventAttributeMask | CEvtMgmtUiEngine::EEvtEventAttributeRepeat;
+           CAknPopupFieldText* repeatPopupFieldText =
+                 (CAknPopupFieldText*)Control( EEvtMgmtUiDlgCIdRepeat );
+           if(repeatPopupFieldText)
+               {
+               if(repeatPopupFieldText->CurrentValueIndex() == 0)               
+                   iEvent.SetRepeat( ETrue );
+               else
+                   iEvent.SetRepeat( EFalse );   
+               }
+           break;
+           }
+        case EEvtMgmtUiDlgCIdAudioLoop:
+           {
+           iEventAttributeMask  = iEventAttributeMask | CEvtMgmtUiEngine::EEvtEventAttributeAudioLoop;                 
+           CAknPopupFieldText* audioLoopPopupFieldText =
+                 (CAknPopupFieldText*)Control( EEvtMgmtUiDlgCIdAudioLoop );
+           if(audioLoopPopupFieldText)
+               {
+               CEvtToneAction* tone = CEvtToneAction::NewLC();
+               tone->InternalizeL( iEvent.Action() );
+               if( audioLoopPopupFieldText->CurrentValueIndex() == 0)
+                   tone->SetToneLoop( EFalse );
+               else
+                   tone->SetToneLoop( ETrue );   
+               
+                CEvtAction* action = CEvtAction::NewLC();
+                tone->ExternalizeL( *action );
+                iEvent.SetActionL( action ); //ownership is transferred.
+                CleanupStack::Pop( action );
+                CleanupStack::PopAndDestroy( tone );
+               }
+           break;
+           }    
+        case EEvtMgmtUiDlgCIdStatus:
+           {
+           iEventAttributeMask  = iEventAttributeMask | CEvtMgmtUiEngine::EEvtEventAttributeStatus;                 
+           CAknPopupFieldText* statusPopupFieldText =
+                 (CAknPopupFieldText*)Control( EEvtMgmtUiDlgCIdStatus );
+           if(statusPopupFieldText)
+               {
+               switch(statusPopupFieldText->CurrentValueIndex())
+                   {
+                   case 0:
+                       iEvent.SetEventStatus(EActive);
+                       break;
+                   case 1:
+                       iEvent.SetEventStatus(EDraft);
+                       break;
+                   case 2:
+                       iEvent.SetEventStatus(ECompleted);
+                       break;
+                   default:
+                       iEvent.SetEventStatus(EDraft);
+                       break;
+                   }
+               }
+           break;
+           }                
+        }
+	EVTUIDEBUG("- CEvtEditor::PostLayoutDynInitL()");
+    }
+
+
+// -----------------------------------------------------------------------------
+// CEvtEditor::ProcessCommandL()
+// It handles command events
+// -----------------------------------------------------------------------------
+//
+void CEvtEditor::ProcessCommandL(TInt  aCommandId)
+    {      
+	EVTUIDEBUG1("+ CEvtEditor::ProcessCommandL() - %d", aCommandId );         
+    CAknForm::ProcessCommandL(aCommandId); //to hide menu  
+ 
+    
+    switch(aCommandId)
+        {          
+        case EEvtEditorCmdAddDescNew:
+        case EEvtEditorCmdAddDescFromExisting:            
+        case EEvtEditorCmdEditDesc:
+        case EEvtEditorCmdAssignTone:
+        case EEvtEditorCmdShowOnMap:
+        case EEvtEditorCmdNavigateToPlace:
+        case EEvtMgmtUiEventUiPosSettings:
+        case EEvtEditorCmdSetPlace:
+            {      
+            iCmdHandler->HandleEditorCmdL( aCommandId );
+            break;
+            }
+        case EEvtEditorCmdRemoveDesc:
+            {
+            RemoveDesDlgLineL();
+            iEventAttributeMask  = iEventAttributeMask | CEvtMgmtUiEngine::EEvtEventAttributeDesc;
+            DrawDeferred();
+            break;
+            }
+        case EEvtEditorCmdDelete:    
+            {
+            if( IsEmptyEventL() )
+                TryExitL( EAknSoftkeyBack );
+            else if( DisplayConfirmationQueryDlgL(R_EVTUI_CREATENEW_FORM_CONFIRMATION_DELETEEVENT) )
+                {
+                if( !iEvent.EventId() )
+                    TryExitL( EAknSoftkeyBack );
+                else
+                    iCmdHandler->HandleEditorCmdL( aCommandId );
+                }
+            break;
+            }
+        case EEvtEditorCmdActivate:
+            {         
+            if(IsEditable())
+                ProcessDoneCommandL();
+            else
+                {            
+                iEvent.SetEventStatus(EActive);
+                iEventAttributeMask  = iEventAttributeMask | CEvtMgmtUiEngine::EEvtEventAttributeStatus;          
+                iCmdHandler->SetEventAttributeMask( iEventAttributeMask );
+                iCmdHandler->HandleEditorCmdL( aCommandId );
+                }
+            break;
+            }    
+        case EEvtEditorCmdSaveDraft:
+            {         
+            if(IsEditable())
+                ProcessDoneCommandL();
+            else
+                {            
+                iEvent.SetEventStatus(EDraft);
+                iEventAttributeMask  = iEventAttributeMask | CEvtMgmtUiEngine::EEvtEventAttributeStatus;          
+                iCmdHandler->SetEventAttributeMask( iEventAttributeMask );
+                iCmdHandler->HandleEditorCmdL( aCommandId );
+                }
+            break;
+            }         
+        case EAknCmdExit:
+            {
+            // The User has exited the application using the Exit option from
+            //.Options menu.  But, thats possible only if we exit the application
+            // with EAknCmdExit.
+            // A bit of convoluted logic but needed because we are using the
+            // same components for the Settings UI Server as well as LC.
+            
+           	CEikAppServer* server = iEikonEnv->AppServer();
+			if ( server )
+				{
+				server->NotifyServerExit( EAknCmdExit );
+				}
+		    CAknAppUi* appUi = static_cast< CAknAppUi* >( iEikonEnv->AppUi());
+		    appUi->RunAppShutter();            
+            break;
+            }
+        case EAknFormCmdEdit:
+            {
+            HandleMSKL(); 
+            if( !iIsEditMode )
+                {
+                iIsEditMode = ETrue;
+                }               
+            DrawDeferred();             
+            break;
+            }
+        case EEvtEditorCmdDiscard:
+            if( !DisplayConfirmationQueryDlgL(R_LOCEV_QUERY_DISCARD_CHANGES) )
+                break;
+        case EAknSoftkeyBack:
+            {
+            TryExitL( EAknSoftkeyBack );
+            break;
+            }
+        case EAknCmdHelp:
+            {
+            HlpLauncher::LaunchHelpApplicationL( iEikonEnv->WsSession(),
+                static_cast<CAknAppUi*>(
+                    iCoeEnv->AppUi() )->AppHelpContextL() );
+            break;
+            }
+        default:
+            {
+            //panic code
+            break;
+            }
+        }  
+	EVTUIDEBUG("- CEvtEditor::ProcessCommandL()");
+    }
+
+// -----------------------------------------------------------------------------
+// CEvtEditor::SetMopParent
+// -----------------------------------------------------------------------------
+//
+void CEvtEditor::SetMopParent(
+    MObjectProvider* aParent )
+    {        
+    CCoeControl::SetMopParent( aParent );
+    }
+
+// -----------------------------------------------------------------------------
+// CEvtEditor::SetHelpContext
+// -----------------------------------------------------------------------------
+//
+void CEvtEditor::SetHelpContext( TCoeHelpContext aContext )
+    {    
+    iHelpContext = aContext;
+    }
+
+// -----------------------------------------------------------------------------
+// CEvtEditor::ExecuteL
+// -----------------------------------------------------------------------------
+//
+TInt CEvtEditor::ExecuteLD()
+    {    
+	return CAknForm::ExecuteLD( R_EVTMGMTUI_CREATEEVENT_FORM_DIALOG );    	
+    }
+
+// -----------------------------------------------------------------------------
+// CEvtEditor::GetHelpContext
+// -----------------------------------------------------------------------------
+//
+void CEvtEditor::GetHelpContext( TCoeHelpContext& aContext ) const
+    {
+    if ( iHelpContext.iContext.Length() > 0 )
+        {
+        aContext.iContext = iHelpContext.iContext;
+        aContext.iMajor = iHelpContext.iMajor;
+        }
+    }
+    
+// -----------------------------------------------------------------------------
+// CEvtEditor::DisplayConfirmationQueryDlg()
+// It shows confirmation query dialog
+// -----------------------------------------------------------------------------
+//
+TBool CEvtEditor::DisplayConfirmationQueryDlgL( TInt aResourceId )
+    {
+    HBufC* msg = StringLoader::LoadLC(aResourceId);
+    TBool response= EFalse;
+    CAknQueryDialog* confirmationQuery = CAknQueryDialog::NewL();     
+    response = confirmationQuery->ExecuteLD(R_EVTUI_CONFIRMATION_QUERY, *msg);         
+    CleanupStack::PopAndDestroy(msg);
+    return response;
+    }
+
+// -----------------------------------------------------------------------------
+// CEvtEditor::ChangeRSKCaptionL()
+// It changes caption of RSK key
+// -----------------------------------------------------------------------------
+//
+void CEvtEditor::ChangeRSKCaptionL()
+    {
+	EVTUIDEBUG("+ CEvtEditor::ChangeRSKCaptionL()");
+    //if edit mode then RSK =Done otherwise Back
+    CEikButtonGroupContainer* cba   = CEikButtonGroupContainer::Current();
+    CleanupStack::PushL( cba );
+    if(iIsEditMode)
+        cba->SetCommandSetL ( R_EVTMGMTUI_CREATEEVENT_CBA_NOMSK ); 
+    else
+        cba->SetCommandSetL(R_EVTMGMTUI_CREATEEVENT_CBA_BACK);         
+    cba->DrawDeferred();    
+    CleanupStack::Pop();//cba  
+	EVTUIDEBUG("- CEvtEditor::ChangeRSKCaptionL()");
+    }
+
+// -----------------------------------------------------------------------------
+// CEvtEditor::ChangeMSKCaptionL()
+// It changes caption of MSK key
+// @param aControlId of current focused line
+// -----------------------------------------------------------------------------
+//
+void CEvtEditor::ChangeMSKCaptionL(TInt  aControlId)
+    {
+	EVTUIDEBUG("+ CEvtEditor::ChangeMSKCaptionL()");
+    CEikButtonGroupContainer* cba   = CEikButtonGroupContainer::Current();
+    CleanupStack::PushL( cba );
+         
+    //attribute specific cba
+    switch(aControlId)
+        {
+        case EEvtMgmtUiDlgCIdSubject:
+        case EEvtMgmtUiDlgCIdRadius:
+            {//Options Done
+            cba->SetCommandSetL(R_EVTMGMTUI_CREATEEVENT_CBA_NOMSK);
+            break;
+            }
+        case EEvtMgmtUiDlgCIdRepeat:
+        case EEvtMgmtUiDlgCIdAssignTone:
+        case EEvtMgmtUiDlgCIdAudioLoop:
+        case EEvtMgmtUiDlgCIdStatus:
+            { //Options Change Done
+            cba->SetCommandSetL(R_EVTMGMTUI_CREATEEVENT_CBA);                
+            break;
+            }
+        case EEvtMgmtUiDlgCIdDesc:
+            {//Options Edit Done
+            cba->SetCommandSetL(R_EVTMGMTUI_CREATEEVENT_CBA_EDIT);
+            break;
+            }
+        case EEvtMgmtUiDlgCIdPlace:
+            {
+            if(iEvent.Place().Compare(KNullDesC)==0)//Options Define Done
+                cba->SetCommandSetL(R_EVTMGMTUI_CREATEEVENT_CBA_DEFINE);
+            else //Options Change Done
+                cba->SetCommandSetL(R_EVTMGMTUI_CREATEEVENT_CBA);
+            break;
+            }
+        default:
+            break;
+        }
+    cba->DrawDeferred();    
+    CleanupStack::Pop();//cba    
+	EVTUIDEBUG("- CEvtEditor::ChangeMSKCaptionL()");
+    }
+
+// -----------------------------------------------------------------------------
+// CEvtEditor::HandleMSKL()
+// It performs the required action when MSK is pressed
+// -----------------------------------------------------------------------------
+//
+void CEvtEditor::HandleMSKL()
+    {
+	EVTUIDEBUG("+ CEvtEditor::HandleMSKL()");
+    if( !iIsEditMode )
+        {
+        iIsEditMode = ETrue;
+        SetEditableL(ETrue);  
+        ChangeRSKCaptionL();
+        ChangeMSKCaptionL( IdOfFocusControl() ); 
+        return;    
+        }
+    
+    if(IsEditable())
+        {
+        //attribute specific action
+        switch( IdOfFocusControl() )
+            {
+            case EEvtMgmtUiDlgCIdSubject:
+                {
+                CEikEdwin* subjectEditor = static_cast <CEikEdwin*> (ControlOrNull(EEvtMgmtUiDlgCIdSubject));
+                if(subjectEditor )
+                    {    
+                    subjectEditor->SetCursorPosL(iEvent.Subject().Length(),EFalse);
+                    subjectEditor->DrawDeferred();
+                    }
+                break;
+                }
+            case EEvtMgmtUiDlgCIdPlace:
+                {
+                ProcessCommandL(EEvtEditorCmdSetPlace);
+                break;
+                }
+            case EEvtMgmtUiDlgCIdDesc:
+                {
+                ProcessCommandL(EEvtEditorCmdEditDesc);
+                break;
+                }
+            case EEvtMgmtUiDlgCIdAssignTone:
+                {
+                ProcessCommandL(EEvtEditorCmdAssignTone);
+                break;
+                }
+            case EEvtMgmtUiDlgCIdRepeat:    
+                {
+                //ProcessCommandL(EEvtMgmtUiDlgCIdRepeat);
+                TogglePopupFieldControlL( EEvtMgmtUiDlgCIdRepeat );
+                break;
+                }
+            case EEvtMgmtUiDlgCIdAudioLoop:
+                {              
+                //ProcessCommandL(EEvtMgmtUiDlgCIdAudioLoop);
+               TogglePopupFieldControlL( EEvtMgmtUiDlgCIdAudioLoop );
+                break;
+                }  
+            case EEvtMgmtUiDlgCIdStatus:
+                {      
+                CheckStatusL();
+                CAknPopupFieldText* statusEditor = static_cast <CAknPopupFieldText*> ( ControlOrNull(EEvtMgmtUiDlgCIdStatus) );
+                     if (statusEditor)
+                         {  
+                         TKeyEvent keyEvent;
+                         keyEvent.iCode = EKeyEnter;
+                         keyEvent.iModifiers = EModifierPureKeycode;
+                         statusEditor->OfferKeyEventL( keyEvent, EEventKey ); 
+                         }
+                break;
+                }                  
+            default:
+                {  
+                //error panic
+              break;
+                }
+            }
+        }
+	EVTUIDEBUG("- CEvtEditor::HandleMSKL()");
+    }
+    
+// -----------------------------------------------------------------------------
+// CEvtEditor::InsertDesDlgLineL()
+// It inserts dialog line for descriptor
+// -----------------------------------------------------------------------------
+//
+void CEvtEditor::InsertDesDlgLineL()
+    {
+	EVTUIDEBUG("+ CEvtEditor::InsertDesDlgLineL()");
+    TInt lineIndex;
+    if( !ControlOrNull( EEvtMgmtUiDlgCIdRadius ))
+        {
+        lineIndex = FindLineIndex(* ControlOrNull(EEvtMgmtUiDlgCIdPlace)) + 1;
+        }
+    else
+        {
+        lineIndex = FindLineIndex(* ControlOrNull(EEvtMgmtUiDlgCIdRadius))  + 1;
+        }
+   InsertLineL(lineIndex,R_EVTUI_CREATENEWFORM_DLGLINE_DESC);
+   UpdatePageL(ETrue);
+	EVTUIDEBUG("- CEvtEditor::InsertDesDlgLineL()");
+   }
+
+// -----------------------------------------------------------------------------
+// CEvtEditor::RemoveDesDlgLineL()
+// It removes dialog line for descriptor
+// -----------------------------------------------------------------------------
+//
+void CEvtEditor::RemoveDesDlgLineL()
+    {      
+	EVTUIDEBUG("+ CEvtEditor::RemoveDesDlgLineL()");
+    if( ControlOrNull(EEvtMgmtUiDlgCIdDesc))
+      {
+      DeleteLine(EEvtMgmtUiDlgCIdDesc,ETrue);
+      iEvent.SetDescriptionL(KNullDesC);
+      }               
+	EVTUIDEBUG("- CEvtEditor::RemoveDesDlgLineL()");
+    }
+
+// -----------------------------------------------------------------------------
+// CEvtEditor::SetDescL()
+// It sets text to descriptor edwin
+// -----------------------------------------------------------------------------
+//
+void CEvtEditor::SetDescL()
+    {
+	EVTUIDEBUG("+ CEvtEditor::SetDescL()");
+    CEikEdwin* descEditor = static_cast <CEikEdwin*> (ControlOrNull(EEvtMgmtUiDlgCIdDesc));
+     if (descEditor)
+         {
+         TPtrC desc = iEvent.Description();
+         descEditor->SetTextL(&desc);  
+         UpdatePageL(ETrue);
+         }
+	EVTUIDEBUG("- CEvtEditor::SetDescL()");
+    }
+
+// -----------------------------------------------------------------------------
+// CEvtEditor::SetRadiusL()
+// It sets radius to radius editor
+// -----------------------------------------------------------------------------
+//
+void CEvtEditor::SetRadiusL()
+    {
+	EVTUIDEBUG("+ CEvtEditor::SetRadiusL()");
+    CAknUnitEditor* radiusEd =
+                      (CAknUnitEditor*)Control( EEvtMgmtUiDlgCIdRadius );
+     if(radiusEd)
+         {
+         NotifySOMChangeL(); // to set unit value
+         }
+	EVTUIDEBUG("- CEvtEditor::SetRadiusL()");
+    }
+
+// -----------------------------------------------------------------------------
+// CEvtEditor::CheckStatusL()
+// It Checks for the status and dynamically sets the popup list
+// -----------------------------------------------------------------------------
+//
+void CEvtEditor::CheckStatusL()
+    {
+    CAknPopupFieldText* statusEditor = static_cast <CAknPopupFieldText*> ( ControlOrNull(EEvtMgmtUiDlgCIdStatus) );
+    if( statusEditor && statusEditor->MdcArray()->MdcaCount() == 3 )
+        {
+        MDesC16Array* statusArray = (MDesC16Array*) (statusEditor->MdcArray());
+        CAknQueryValueTextArray* aTextArray = static_cast <CAknQueryValueTextArray*> (statusArray);
+        CDesCArray* arr =  aTextArray->Array();      // Delete the previous Array
+        arr->Reset();
+        arr->Compress();
+        HBufC* strActive = StringLoader::LoadLC( R_LOCEV_LIST_VALUE_ACTIVE );
+        HBufC* strDraft = StringLoader::LoadLC( R_LOCEV_LIST_VALUE_DRAFT );
+        arr->AppendL( *strActive );
+        arr->AppendL( *strDraft );
+        CleanupStack::PopAndDestroy( strDraft );
+        CleanupStack::PopAndDestroy( strActive );   
+        
+        if(EActive == iEvent.EventStatus())
+            statusEditor->SetCurrentValueIndex (0);
+        else
+            statusEditor->SetCurrentValueIndex (1);
+            
+        statusEditor->SetFocus(ETrue);
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CEvtEditor::SetStatusL()
+// It sets Status of the event
+// -----------------------------------------------------------------------------
+//
+void CEvtEditor::SetStatusL()
+    {
+    EVTUIDEBUG("+ CEvtEditor::SetStatusL()");
+    //Set Status of the Event
+    CAknPopupFieldText* statusEditor = static_cast <CAknPopupFieldText*> ( ControlOrNull(EEvtMgmtUiDlgCIdStatus) );
+    if(statusEditor)
+        {
+        switch(iEvent.EventStatus())
+            {
+            case EActive:
+                statusEditor->SetCurrentValueIndex(0);
+                break;
+            case EDraft:
+                statusEditor->SetCurrentValueIndex(1);
+                break;
+            case ECompleted:
+                statusEditor->SetCurrentValueIndex(2);
+                break;
+            default:
+                statusEditor->SetCurrentValueIndex(0);
+                break;
+            }
+       }
+    EVTUIDEBUG("- CEvtEditor::SetStatusL()");
+    }
+
+// -----------------------------------------------------------------------------
+// CEvtEditor::SetPlaceL()
+// It sets text to place edwin
+// -----------------------------------------------------------------------------
+//
+void CEvtEditor::SetPlaceL()
+    {
+	EVTUIDEBUG("+ CEvtEditor::SetPlaceL()");
+    //Set place dialog line to new place value
+    CEikEdwin* placeEditor = static_cast <CEikEdwin*> (ControlOrNull(EEvtMgmtUiDlgCIdPlace));
+    if (placeEditor)
+       { 
+       HBufC* place = iEvent.Place().AllocLC();   
+       if(place->Compare(KNullDesC)!=0)
+           {
+           iEventAttributeMask  = iEventAttributeMask | CEvtMgmtUiEngine::EEvtEventAttributePlace;
+           placeEditor->SetTextL(place);   
+           placeEditor->DrawDeferred();   
+           InsertRadiusDlgLineL();
+		   DrawNow();
+           } 
+       CleanupStack::PopAndDestroy(place);       
+       }
+	EVTUIDEBUG("- CEvtEditor::SetPlaceL()");
+    }
+
+// -----------------------------------------------------------------------------
+// CEvtEditor::SetRingtoneL()
+// It sets text to ringtone edwin
+// -----------------------------------------------------------------------------
+//
+void CEvtEditor::SetRingtoneL()
+    {
+	EVTUIDEBUG("+ CEvtEditor::SetRingtoneL()");
+    CEikEdwin* ringtoneEditor = static_cast <CEikEdwin*> ( ControlOrNull(EEvtMgmtUiDlgCIdAssignTone) );
+          
+    if ( ringtoneEditor )
+         {
+         if( iEvent.HasAction() )
+             {            
+             CEvtToneAction* tone = CEvtToneAction::NewLC();  
+             tone->InternalizeL( iEvent.Action() );      
+             TParsePtrC parse( tone->FileName() );
+             TPtrC filename = parse.NameAndExt();
+             ringtoneEditor->SetTextL( &filename ); 
+             
+             // Insert Loop
+             InsertAudioLoopDlgLinesL();
+             CAknPopupFieldText* audioLoopEditor = static_cast <CAknPopupFieldText*> ( ControlOrNull(EEvtMgmtUiDlgCIdAudioLoop) );
+             if(audioLoopEditor)
+                 {
+                 if(tone->ToneLoop())
+                     audioLoopEditor->SetCurrentValueIndex(1);
+                 else
+                     audioLoopEditor->SetCurrentValueIndex(0);
+                 }
+             CleanupStack::PopAndDestroy( tone );
+             }
+         else
+             {
+             HBufC* strOff = StringLoader::LoadLC( R_EVTUI_RINGTONESELECT_OFF );
+             ringtoneEditor->SetTextL( strOff ); 
+             CleanupStack::PopAndDestroy( strOff );
+             
+             // Remove Loop
+             RemoveAudioLoopDlgLineL();
+             }
+         UpdatePageL(ETrue);
+         }
+    Debug(_L("CEvtEditor::SetRingtoneL()"));
+      if( iEvent.HasAction() )
+          {        
+          CEvtToneAction* tone = CEvtToneAction::NewLC();
+          TFileName debug;
+          tone->InternalizeL( iEvent.Action() );
+          debug.Copy(_L("Ringtone: "));
+          debug.Append(tone->FileName());
+          Debug(debug);
+          debug.Copy(_L("Audio Loop: "));
+          debug.AppendNum(tone->ToneLoop());
+          Debug(debug);            
+          CleanupStack::PopAndDestroy(tone);
+          }
+	EVTUIDEBUG("- CEvtEditor::SetRingtoneL()");
+    }
+
+// -----------------------------------------------------------------------------
+// CEvtEditor::MandatoryFieldsFilled()
+// It checks if all mandatory fields are filled
+// @return ETrue if all mandatory fields are filled
+//         KFalse otherwise
+// -----------------------------------------------------------------------------
+//
+TBool CEvtEditor::MandatoryFieldsFilled()
+    {   
+    return (iEvent.Subject().Compare(KNullDesC)!=0 && iEvent.Place().Compare(KNullDesC)!=0);
+    }
+
+// -----------------------------------------------------------------------------
+// CEvtEditor::LineChangedL()
+// Derived from CAknDialog
+// -----------------------------------------------------------------------------
+//
+void CEvtEditor::LineChangedL(TInt  aControlId)
+    {
+	EVTUIDEBUG("+ CEvtEditor::LineChangedL()");
+    if(iIsEditMode)
+        ChangeMSKCaptionL(aControlId); 
+	EVTUIDEBUG("- CEvtEditor::LineChangedL()");
+    }
+
+// -----------------------------------------------------------------------------
+// CEvtEditor::InsertRadiusDlgLineL()
+// It inserts dialog line for radius
+// -----------------------------------------------------------------------------
+//
+void CEvtEditor::InsertRadiusDlgLineL()
+    {
+	EVTUIDEBUG("+ CEvtEditor::InsertRadiusDlgLineL()");
+    if( ControlOrNull(EEvtMgmtUiDlgCIdRadius)==NULL )
+        {
+        TInt lineIndex;   
+        lineIndex = FindLineIndex(* ControlOrNull(EEvtMgmtUiDlgCIdPlace))+1;
+        InsertLineL(lineIndex,R_EVTUI_CREATENEWFORM_DLGLINE_RADIUS);
+		SetRadiusL();
+        }
+	EVTUIDEBUG("- CEvtEditor::InsertRadiusDlgLineL()");
+	}
+
+// -----------------------------------------------------------------------------
+// CEvtEditor::RemoveRadiusDlgLineL()
+// It remove dialog line for radius
+// -----------------------------------------------------------------------------
+//
+void CEvtEditor::RemoveRadiusDlgLineL()
+    {  
+	EVTUIDEBUG("+ CEvtEditor::RemoveRadiusDlgLineL()");
+    if(ControlOrNull(EEvtMgmtUiDlgCIdRadius)!=NULL)
+          {
+          DeleteLine(EEvtMgmtUiDlgCIdRadius,ETrue); 
+          }  
+	EVTUIDEBUG("- CEvtEditor::RemoveRadiusDlgLineL()");  
+    }
+
+// -----------------------------------------------------------------------------
+// CEvtEditor::RemoveAudioLoopDlgLineL()
+// It removes dialog line for ringtone and audio-loop
+// -----------------------------------------------------------------------------
+//
+void CEvtEditor::RemoveAudioLoopDlgLineL()
+    {  
+	EVTUIDEBUG("+ CEvtEditor::RemoveAudioLoopDlgLineL()");    
+    if(ControlOrNull(EEvtMgmtUiDlgCIdAudioLoop)!=NULL)
+      {
+      DeleteLine(EEvtMgmtUiDlgCIdAudioLoop,ETrue); 
+      }  
+	EVTUIDEBUG("- CEvtEditor::RemoveAudioLoopDlgLineL()");             
+    }
+// -----------------------------------------------------------------------------
+// CEvtEditor::InsertAudioLoopDlgLinesL()
+// It inserts dialog line for ringtone and audio-loop
+// -----------------------------------------------------------------------------
+//
+void CEvtEditor::InsertAudioLoopDlgLinesL()
+    {
+	EVTUIDEBUG("+ CEvtEditor::InsertAudioLoopDlgLinesL()"); 
+    if( ControlOrNull(EEvtMgmtUiDlgCIdAudioLoop)==NULL )
+        {
+        TInt lastLineIndex = FindLineIndex(* ControlOrNull(EEvtMgmtUiDlgCIdAssignTone));
+        InsertLineL(lastLineIndex+1,R_EVTUI_CREATENEWFORM_DLGLINE_AUDIOLOOP);
+        UpdatePageL(ETrue);
+        }
+	EVTUIDEBUG("- CEvtEditor::InsertAudioLoopDlgLinesL()"); 
+    }
+
+// -----------------------------------------------------------------------------
+// CEvtEditor::NotifyEditorL()
+// Inherited from MEvtMgmtUiEditorObserver
+// -----------------------------------------------------------------------------
+//
+void CEvtEditor::NotifyEditorL(TInt aCommand, TInt aErrorCode)
+    {
+	EVTUIDEBUG1("+ CEvtEditor::NotifyEditorL() - %d", aErrorCode ); 
+    if(aErrorCode!=KErrNone && aErrorCode!=KErrCancel&& aErrorCode!=KErrNotFound)
+        return;
+    
+    switch(aCommand)
+        {              
+        case EEvtEditorCmdSetPlace:
+            {        
+            if( aErrorCode==KErrNone )              
+            	SetPlaceL();
+            ChangeMSKCaptionL(EEvtMgmtUiDlgCIdPlace);          
+            break;
+            }
+        case EEvtEditorCmdAddDescNew:
+        case EEvtEditorCmdAddDescFromExisting: 
+        case EEvtEditorCmdEditDesc:
+            {
+            if( aErrorCode == KErrNone )
+                {
+                if(!ControlOrNull(EEvtMgmtUiDlgCIdDesc))
+                    InsertDesDlgLineL();
+                TryChangeFocusToL( EEvtMgmtUiDlgCIdDesc ); 
+                SetDescL();
+                }
+             else
+             	{
+				RemoveDesDlgLineL();
+				DrawNow();
+             	}     
+            iEventAttributeMask  = iEventAttributeMask | CEvtMgmtUiEngine::EEvtEventAttributeDesc;             
+            break;
+            }
+        case EEvtEditorCmdAssignTone:
+            {     
+            if (  aErrorCode == KErrNone  ||  aErrorCode == KErrNotFound )
+                {
+                // Ring tone assignment was successful
+                SetRingtoneL();
+                TryChangeFocusToL( EEvtMgmtUiDlgCIdAssignTone );   
+                iEventAttributeMask  = iEventAttributeMask | CEvtMgmtUiEngine::EEvtEventAttributeTone;
+                }        
+            break;
+            }
+        case EEvtEditorCmdDelete:        
+        case EEvtEditorCmdActivate:
+        case EEvtEditorCmdSaveDraft:
+            {  
+            if ( !aErrorCode )
+                {
+                TryExitL( EEvtEditorCmdCloseDlg );
+                }
+            break;
+            }      
+        default:
+            {
+            break;
+            }
+        }
+	EVTUIDEBUG("- CEvtEditor::NotifyEditorL()");
+    }
+    
+// -----------------------------------------------------------------------------
+// CEvtEditor::NotifySOMChangeL()
+// Inherited from MEvtMgmtUiSOMObserver
+// -----------------------------------------------------------------------------
+//
+void CEvtEditor::NotifySOMChangeL( )
+	{
+	EVTUIDEBUG("+ CEvtEditor::NotifySOMChangeL()");
+    if( ControlOrNull(EEvtMgmtUiDlgCIdRadius) != NULL )
+        {
+        CAknUnitEditor* radiusEd =
+             (CAknUnitEditor*)Control( EEvtMgmtUiDlgCIdRadius );
+             
+        //convert radius in km unit
+        TReal val(0);
+        switch( iSysOfMeas->GetCurrentSysofMeasL() )
+        	{
+        	case ELocImperial: // Mile
+        	    {
+                val = iEvent.Radius();
+                val *= KUnitConversion;
+                TReal setVal;
+                Math::Round(setVal, val, 2);
+                radiusEd->SetMinimumAndMaximum( KMinRadiusInKm*KUnitConversion, KMaxRadiusInKm*KUnitConversion );
+                radiusEd->SetValue( setVal );
+                radiusEd->SetUnitL( EAknUnitEditorMile );      
+        		break;
+        	    }
+        	case ELocMetric:   // KiloMetre
+                {
+                val = iEvent.Radius();
+                TReal setVal;
+                Math::Round(setVal, val, 2);
+                radiusEd->SetMinimumAndMaximum( KMinRadiusInKm, KMaxRadiusInKm );
+                radiusEd->SetValue( setVal );
+                radiusEd->SetUnitL( EAknUnitEditorKilometer );      
+                break;  			
+                }
+        	default: 
+        		break;
+        	}
+        UpdatePageL(ETrue);
+        }
+	EVTUIDEBUG("- CEvtEditor::NotifySOMChangeL()");
+	}
+
+// -----------------------------------------------------------------------------
+// CEvtEditor::OfferKeyEventL()
+// Inherited from CAknForm
+// -----------------------------------------------------------------------------
+//
+TKeyResponse CEvtEditor::OfferKeyEventL (const TKeyEvent &aKeyEvent, TEventCode aType) 
+    {
+    // Handle the "C" key in View mode.
+    if(!IsEditable() && aType == EEventKeyUp)
+        {
+        switch ( aKeyEvent.iScanCode )
+            {
+            case EStdKeyBackspace:
+            case EStdKeyDelete:
+                {
+                ProcessCommandL( EEvtEditorCmdDelete );  
+                return EKeyWasConsumed;               
+                }
+            default:
+                {
+                break;  
+                }
+            }
+        }  
+    
+    // Handle the Control Specific key events.
+    if( IdOfFocusControl() == EEvtMgmtUiDlgCIdPlace && aType == EEventKey )
+        {
+        switch(aKeyEvent.iCode)
+            {
+            case EKeyDownArrow:
+                {
+                if( ControlOrNull(EEvtMgmtUiDlgCIdRadius) )
+                    TryChangeFocusToL( EEvtMgmtUiDlgCIdRadius );  
+                else if( ControlOrNull(EEvtMgmtUiDlgCIdDesc) )
+                    TryChangeFocusToL( EEvtMgmtUiDlgCIdDesc );  
+                else if( ControlOrNull(EEvtMgmtUiDlgCIdRepeat) )
+                    TryChangeFocusToL( EEvtMgmtUiDlgCIdRepeat );  
+                return EKeyWasConsumed;
+                }
+            default:
+                break;
+            }
+        }
+    if( IdOfFocusControl() == EEvtMgmtUiDlgCIdStatus && aType == EEventKey )
+        {
+        switch(aKeyEvent.iCode)
+            {
+            case EKeyLeftArrow:
+            case EKeyRightArrow:
+            case EKeyOK:
+            case EKeyEnter:
+                {
+                CheckStatusL();
+                }
+            default:
+                break;
+            }
+        }
+    return CAknForm::OfferKeyEventL( aKeyEvent, aType );  
+    }
+
+// -----------------------------------------------------------------------------
+// CEvtEditor::HandlePointerEventL()
+// Inherited from CAknForm
+// -----------------------------------------------------------------------------
+//
+void CEvtEditor::HandlePointerEventL(const TPointerEvent& aPointerEvent)
+    {    
+    EVTUIDEBUG("+ CEvtEditor::HandlePointerEventL()");
+
+    if( aPointerEvent.iType != TPointerEvent::EButton1Up  )
+        {
+        CAknForm::HandlePointerEventL( aPointerEvent );  
+        if( aPointerEvent.iType == TPointerEvent::EDrag  )
+            iIsDragging++;
+        return;
+        }
+    
+    EVTUIDEBUG1("iIsDragging =%d",iIsDragging );
+    
+    //ToDo: Hack for kinetic scrolling
+    // Must be removed once avkon fix is recieved.
+    if( iIsDragging >6 )
+        {        
+        CAknForm::HandlePointerEventL( aPointerEvent );
+        iIsDragging = 0;  
+        return;
+        }
+        
+    iIsDragging = 0;
+    // End of todo
+    
+    if( !IsEditable() )
+        {
+        iIsEditMode = ETrue;
+        SetEditableL(ETrue);
+        ChangeRSKCaptionL();
+        ChangeMSKCaptionL( IdOfFocusControl() ); 			
+		return;
+        }	  
+    
+    CEikEdwin* editor = NULL;
+    CAknPopupFieldText* popupFieldText = NULL;
+    switch(IdOfFocusControl())
+        {
+        case EEvtMgmtUiDlgCIdPlace: // Place Editor
+            editor = static_cast <CEikEdwin*> (ControlOrNull(EEvtMgmtUiDlgCIdPlace));
+             if ( editor )
+                 { 
+                 iCmdHandler->HandleEditorCmdL( EEvtEditorCmdSetPlace );
+                 }
+            break;
+        case EEvtMgmtUiDlgCIdDesc: // Description Editor
+            editor = static_cast <CEikEdwin*> (ControlOrNull(EEvtMgmtUiDlgCIdDesc));
+             if ( editor )
+                 {
+                 iCmdHandler->HandleEditorCmdL( EEvtEditorCmdEditDesc );
+                 }
+            break;
+        case EEvtMgmtUiDlgCIdAssignTone: // Tone Editor
+            editor = static_cast <CEikEdwin*> (ControlOrNull(EEvtMgmtUiDlgCIdAssignTone));
+             if ( editor )
+                 {
+                 iCmdHandler->HandleEditorCmdL( EEvtEditorCmdAssignTone );
+                 }
+            break;
+        case EEvtMgmtUiDlgCIdStatus: // Status Editor
+            popupFieldText = static_cast <CAknPopupFieldText*> ( ControlOrNull(EEvtMgmtUiDlgCIdStatus) );
+            if( popupFieldText )
+                {
+                TInt editorStatus = popupFieldText->CurrentValueIndex();
+                CheckStatusL();
+                if( ECompleted != editorStatus )
+                    {
+                    if( EActive == editorStatus )
+                        {
+                        popupFieldText->SetCurrentValueIndex ( EDraft );
+                        }
+                    else
+                        {
+                        popupFieldText->SetCurrentValueIndex ( EActive );
+                        }
+          					HandleControlStateChangeL( EEvtMgmtUiDlgCIdStatus );
+                    UpdatePageL(ETrue);
+                    return;
+                    }
+                else
+                    {
+                    CAknForm::HandlePointerEventL( aPointerEvent );  
+                    return;
+                    }
+                }
+            break;
+        case EEvtMgmtUiDlgCIdRepeat: // Repeat editor
+        case EEvtMgmtUiDlgCIdAudioLoop: // audio loop editor
+        				TogglePopupFieldControlL( IdOfFocusControl() );
+            break;
+        default:
+            CAknForm::HandlePointerEventL( aPointerEvent );  
+            break;
+        }
+		EVTUIDEBUG("- CEvtEditor::HandlePointerEventL()");
+    }
+// ---------------------------------------------------------------------------
+// CEvtEditor::MakeTitleL()
+// Set the Title Text
+// ---------------------------------------------------------------------------
+//
+void CEvtEditor::MakeTitleL( TDesC& aText )
+    {
+	EVTUIDEBUG("+ CEvtEditor::MakeTitleL()");
+    
+    // Obtain the title from the Status Pane
+    CAknTitlePane* title = static_cast<CAknTitlePane*>( iEikonEnv->AppUiFactory()->
+    	StatusPane()->ControlL( TUid::Uid( EEikStatusPaneUidTitle )));
+       
+    // Set the Title's buffer    
+    HBufC* buf = aText.AllocL();
+    title->SetText( buf ); // Takes ownership of buf
+    title->DrawNow();
+	EVTUIDEBUG("- CEvtEditor::MakeTitleL()");
+    }     
+
+// ---------------------------------------------------------------------------
+// CEvtEditor::TogglePopupFieldControlL()
+// it toggles  value of popupfield control
+// ---------------------------------------------------------------------------
+//
+void CEvtEditor::TogglePopupFieldControlL( TInt aControlId )
+    {
+	EVTUIDEBUG1("+ CEvtEditor::TogglePopupFieldControlL() - %d", aControlId );
+    CAknPopupFieldText* audioLoopPopupFieldText =
+                    (CAknPopupFieldText*)Control( aControlId );
+      if(audioLoopPopupFieldText)
+          {          
+          if( audioLoopPopupFieldText->CurrentValueIndex() == 0)
+              audioLoopPopupFieldText->SetCurrentValueIndex(1);
+          else
+              audioLoopPopupFieldText->SetCurrentValueIndex(0);    
+                    
+          HandleControlStateChangeL( aControlId );
+          
+          UpdatePageL(ETrue);
+          }
+	EVTUIDEBUG("- CEvtEditor::TogglePopupFieldControlL()");
+    }
+    
+// ---------------------------------------------------------------------------
+// void CEvtMgmtUiModel::OpenLocalizedResourceFileL
+// Opens the nearest localized resourcefile using aResourceLoader. 
+// aResourceLoader should be opened only once before closing it. 
+// Otherwise it will raise a panic. Therefore it is better to have 
+// multiple resource loaders.
+// 
+// @param aResourceFileName Drive and name of resource file in format 
+//                          <path>:<rsc_file_name>
+// @param aResourceLoader Resource loader for the resource. The loader 
+//                        must not be opened allready or it will raise 
+//                        a panic. It is caller's responsibility to 
+//                        close the resource loader after using the 
+//                        resource.
+// ---------------------------------------------------------------------------
+//  
+void CEvtEditor::OpenLocalizedResourceFileL( 
+                            const TDesC&               aResourceFileName, 
+                                  RConeResourceLoader& aResourceLoader )
+    {    
+    TFileName* tmpName = new(ELeave) TFileName;
+    CleanupStack::PushL( tmpName );
+    
+    // Append the Resource Files Directory
+    tmpName->Append( KDC_RESOURCE_FILES_DIR );
+    
+    // Append the Ressource File Name
+    tmpName->Append( aResourceFileName );
+    
+    // Obtain the drive where the DLL is installed
+    TFileName* dllDrive = new (ELeave) TFileName;
+    CleanupStack::PushL( dllDrive );
+    Dll::FileName( *dllDrive );
+    
+    // Obtain the Complete path for the Resource File
+    TParse parse;
+    User::LeaveIfError( parse.Set( *dllDrive, NULL, NULL ) );
+    User::LeaveIfError( parse.Set( parse.Drive(), tmpName, NULL ) );
+    TFileName* fileName = new(ELeave) TFileName;
+    CleanupStack::PushL( fileName );
+    fileName->Append( parse.FullName() );
+    
+    // Get language of resource file
+    BaflUtils::NearestLanguageFile( CEikonEnv::Static()->FsSession(), *fileName );
+    
+    // Open resource file    
+    aResourceLoader.OpenL( *fileName );
+    
+    // Pop all the fields
+    CleanupStack::PopAndDestroy( fileName );
+    CleanupStack::PopAndDestroy( dllDrive );
+    CleanupStack::PopAndDestroy( tmpName );    
+    }
+
+//End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventseditor/src/evteventsdlg.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,142 @@
+/*
+* 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:  Events editor dialog.
+*
+*/
+
+// INCLUDE FILES
+#include "evteventsdlg.h"
+#include "evteditor.h"
+#include "evtmgmtuiengine.h"
+
+// CONSTANTS
+/// Unnamed namespace for local definitions
+namespace {
+#if defined(_DEBUG)
+
+_LIT( KPanicMsg, "CEvtEventsDlg" );
+
+enum TPanicCode
+    {
+    KEvtPanicNullMember = 1
+    };
+
+void Panic( TPanicCode aReason )
+    {
+    User::Panic( KPanicMsg, aReason );
+    }
+#endif
+}  // namespace
+
+// ============================= LOCAL FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CEvtEventsDlg::NewL
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CEvtEventsDlg* CEvtEventsDlg::NewL(TBool                              aIsEditable, 
+                                            CEvtEvent&                         aEvent, 
+                                            CEvtMgmtUiEngine&                  aEventEngine,
+                                            TBool                              aDisplayExitMenuItem
+                                            )                             
+	{
+    CEvtEventsDlg* self = new( ELeave ) CEvtEventsDlg();
+    CleanupStack::PushL( self );
+    self->ConstructL( aIsEditable, aEvent, aEventEngine, aDisplayExitMenuItem );
+    CleanupStack::Pop(); //self
+    return self;
+	}
+
+// -----------------------------------------------------------------------------
+// CEvtEventsDlg::~CEvtEventsDlg
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CEvtEventsDlg::~CEvtEventsDlg()
+	{    
+    if ( iDestroyedPtr ) 
+        {
+        *iDestroyedPtr = ETrue;        
+        }
+    delete iEvtEditor;
+	}
+
+// -----------------------------------------------------------------------------
+// CEvtEventsDlg::CEvtEventsDlg
+// -----------------------------------------------------------------------------
+//
+CEvtEventsDlg::CEvtEventsDlg()
+	{
+	}
+
+// -----------------------------------------------------------------------------
+// CEvtEventsDlg::ConstructL
+// -----------------------------------------------------------------------------
+//
+void CEvtEventsDlg::ConstructL( TBool                              aIsEditable, 
+                                CEvtEvent&                         aEvent,             
+                                CEvtMgmtUiEngine&                  aEventEngine,
+                                TBool                              aDisplayExitMenuItem
+                                )   
+	{    
+    iEvtEditor = CEvtEditor::NewL( aIsEditable, aEvent, aEventEngine, aDisplayExitMenuItem );
+    
+	}
+
+// -----------------------------------------------------------------------------
+// CEvtEventsDlg::SetMopParent
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CEvtEventsDlg::SetMopParent( MObjectProvider* aParent )
+	{
+    __ASSERT_DEBUG( iEvtEditor, Panic( KEvtPanicNullMember ) );
+    iEvtEditor->SetMopParent( aParent );
+	}
+
+// -----------------------------------------------------------------------------
+// CEvtEventsDlg::SetHelpContext
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CEvtEventsDlg::SetHelpContext( TCoeHelpContext aContext )
+    {
+    __ASSERT_DEBUG( iEvtEditor, Panic( KEvtPanicNullMember ) );
+    iEvtEditor->SetHelpContext( aContext );
+    }
+
+// -----------------------------------------------------------------------------
+// CEvtEventsDlg::ExecuteLD
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TInt CEvtEventsDlg::ExecuteLD()
+	{
+	CleanupStack::PushL( this );
+    
+    TBool thisDestroyed( EFalse );
+    iDestroyedPtr = &thisDestroyed;
+
+	TInt ret( iEvtEditor->ExecuteLD() ); 
+    iEvtEditor = NULL;
+
+    if ( thisDestroyed )
+        {
+        // this object has been deleted already
+        CleanupStack::Pop( this );
+        }
+    else
+        {
+        CleanupStack::PopAndDestroy(this); //this
+        }
+    return ret;
+	}
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventseditor/src/evtmgmtuidesccomponent.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,166 @@
+/*
+* 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:   Description component for retrieving place.
+*
+*/
+
+#include <evtmgmteditorui.rsg>
+#include <NpdApi.h> 
+#include <StringLoader.h>
+#include <eikappui.h>
+#include <eikenv.h>
+
+#include "evtmgmteditorui.hrh"
+#include "evtmgmtuidesccomponent.h"
+
+// ---------------------------------------------------------------------------
+// CEvtEditor ::NewL()
+// ---------------------------------------------------------------------------
+//
+CEvtMgmtUiDescComponent* CEvtMgmtUiDescComponent::NewL(const TPtrC aPrevDesc)
+    {
+    CEvtMgmtUiDescComponent * self = CEvtMgmtUiDescComponent::NewLC(aPrevDesc);
+    CleanupStack::Pop(self);
+    return self;
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtEditor ::NewLC()
+// ---------------------------------------------------------------------------
+//
+CEvtMgmtUiDescComponent* CEvtMgmtUiDescComponent::NewLC(const TPtrC aPrevDesc)
+    {
+    CEvtMgmtUiDescComponent * self = new (ELeave) CEvtMgmtUiDescComponent();
+    CleanupStack::PushL(self);
+    self->ConstructL(aPrevDesc);
+    return self;
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiDescComponent ::~CEvtMgmtUiDescComponent()
+// ---------------------------------------------------------------------------
+//
+CEvtMgmtUiDescComponent::~CEvtMgmtUiDescComponent()
+    {    
+    delete iNotepad;
+    iNotepad = NULL;
+    
+    delete iDesc;
+    iDesc = NULL;
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiDescComponent ::ConstructL()
+// ---------------------------------------------------------------------------
+//
+void CEvtMgmtUiDescComponent ::ConstructL(const TPtrC aPrevDesc)
+    {
+    iDesc = aPrevDesc.AllocL();
+    iNotepad = CNotepadApi::NewL();
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiDescComponent ::CEvtMgmtUiDescComponent()
+// ---------------------------------------------------------------------------
+//
+CEvtMgmtUiDescComponent::CEvtMgmtUiDescComponent() 
+    {   
+    }
+
+// -----------------------------------------------------------------------------
+// CEvtMgmtUiDescComponent::DisplayNotepadEditorL()
+// It displays notepad editor and saves in descriptor variable
+// @return KErrCancel if deleted
+//         KErrAlreadyExists if not modified
+//         KErrNone if modified
+// -----------------------------------------------------------------------------
+//
+TInt CEvtMgmtUiDescComponent::DisplayNotepadEditorL()
+   {
+   TInt status = KErrNone;       
+   
+   //Launch notepad application
+   HBufC* desc = iNotepad->ExecTextEditorL(status,*iDesc);    
+   
+   if(!desc)
+       desc = KNullDesC().AllocL();
+   
+   CleanupStack::PushL(desc);
+   
+   if(status != KErrNone )//if deleted
+       {
+       CleanupStack::PopAndDestroy(desc);  
+       delete iDesc;
+       iDesc = NULL;
+       iDesc = KNullDesC().AllocL();
+       return KErrCancel;
+       }
+   
+   desc->Des().Trim();
+   if(desc->Length()==0) //if no text
+       {
+       delete iDesc;
+       iDesc = NULL;
+       iDesc = KNullDesC().AllocL();
+       CleanupStack::PopAndDestroy(desc);
+       return KErrCancel;
+       }
+   
+   //set text to description
+   delete iDesc;
+   iDesc = desc; //ownership is transfered   
+   CleanupStack::Pop(desc);
+   return KErrNone;
+   }
+
+// -----------------------------------------------------------------------------
+// CEvtMgmtUiDescComponent::DescFromExistingNotesL()
+// It shows Memo dialog and saves in descriptor variable
+// @return KErrCancel if cancel or no note
+//         KErrNone if note is selected
+// -----------------------------------------------------------------------------
+//
+TInt CEvtMgmtUiDescComponent::DescFromExistingNotesL()
+    {
+    HBufC* title = StringLoader::LoadLC(R_EVTUI_EDITOR_ADDDESC_TITLE);
+    
+    //Display memo dialog
+    HBufC* desc = iNotepad->FetchMemoL(title);
+    CleanupStack::PopAndDestroy(title);    
+        
+    if(desc) //if memo is selected
+        {            
+        CleanupStack::PushL(desc);
+        delete iDesc;
+        iDesc = desc; //ownership is transferred       
+        CleanupStack::Pop(desc);
+        return KErrNone;
+        }       
+    return KErrCancel;
+    }
+
+// -----------------------------------------------------------------------------
+// CEvtMgmtUiDescComponent::Desc()
+// returns description value
+// -----------------------------------------------------------------------------
+
+TPtrC CEvtMgmtUiDescComponent::Desc() const
+    {
+    //if description, return it, else return empty string
+    if(iDesc)
+        return *iDesc;
+    else
+        return KNullDesC();
+    }
+//end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventseditor/src/evtmgmtuieditorcmdhandler.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,723 @@
+/*
+* 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:   It is handler class to handle editor commands
+*
+*/
+
+#include <evtmgmteditorui.rsg>
+#include <AknQueryDialog.h> 
+#include <StringLoader.h>
+#include <lbsposition.h>
+#include <aknlistquerydialog.h>
+#include <StringLoader.h>
+#include <AknIconArray.h>       // Icon Array
+#include <evteditor.mbg>
+#include <AknsUtils.h>
+#include <AknsSkinInstance.h>
+#include <data_caging_path_literals.hrh>
+#include <gulicon.h>            // Gul Icon
+#include <eikapp.h>
+#include <aknlistquerydialog.h>
+#include <eikserverapp.h>
+#include <aknappui.h>
+#include <eikenv.h>
+
+#include "evteditor.h"
+#include "evtevent.h"
+#include "evttoneaction.h"
+#include "evtaction.h"
+#include "evtmgmteditorui.hrh"
+#include "evtmgmtuieditorcmdhandler.h"
+#include "evtmgmtuiplacecomponent.h"
+#include "evtmgmtuidesccomponent.h"
+#include "evtmgmtuiringtonecomponent.h"
+#include "evtmgmtuimapnavigationadapter.h"
+#include "evtdebug.h"
+#include "evteditorconsts.h"
+#include "evtmgmtuiwaitdlglauncher.h"
+#include "evtmgmtuiengine.h"
+#include "evtmgmtuilbtadapter.h"
+
+// ---------------------------------------------------------------------------
+// CEvtEditor ::NewL()
+// @param[in] aExitCmdHandler - handler to handle all commands which 
+//                              may result into closing editor
+// @param[in/out] aEvent - event object which contains current event information.
+//                         event details may be changed while executing commands
+// @param[in] aEditorObserver - observer to handle editor specific operations 
+//                              after command is executed   
+// ---------------------------------------------------------------------------
+//
+CEvtMgmtUiEditorCmdHandler* CEvtMgmtUiEditorCmdHandler::NewL( 
+                                CEvtEvent&                      aEvent, 
+                                MEvtMgmtUiEditorObserver&       aEditorObserver,
+                                CEvtMgmtUiEngine&               aEventEngine )
+    {
+    CEvtMgmtUiEditorCmdHandler * self = 
+                    new ( ELeave ) CEvtMgmtUiEditorCmdHandler( aEvent, 
+                                                               aEditorObserver,
+                                                               aEventEngine );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiEditorCmdHandler ::~CEvtMgmtUiEditorCmdHandler()
+// ---------------------------------------------------------------------------
+//
+CEvtMgmtUiEditorCmdHandler::~CEvtMgmtUiEditorCmdHandler()
+    {
+	EVTUIDEBUG("+ CEvtMgmtUiEditorCmdHandler::~CEvtMgmtUiEditorCmdHandler()");
+    // Unregister the command handler as an observer
+    iEventEngine.RemoveObserver( this );
+        
+    //cancel any asychronous operation
+    Cancel();
+    
+    // Reset the Array
+    iEvtIdArray.Reset(); 
+    iEvtIdArray.Close();
+    
+    //Delete iMapAdapter 
+    if( iMapAdapter )
+        {
+        delete iMapAdapter;
+        iMapAdapter = NULL;
+        }
+    
+    //Delete iRingtoneComponent
+    if( iRingtoneComponent )
+        {
+        delete iRingtoneComponent;
+        iRingtoneComponent = NULL;
+        }
+    
+    //Delete iDescComponent
+    if( iDescComponent )
+        {
+        delete iDescComponent;
+        iDescComponent = NULL;
+        }
+    
+    //Delete iPlaceComponent
+    if( iPlaceComponent )
+        {
+        delete iPlaceComponent;
+        iPlaceComponent = NULL;
+        }
+    
+    //Delete iClientLibrary
+    if( iClientLibrary )
+        {
+        delete iClientLibrary;
+        iClientLibrary = NULL;
+        }
+    
+    //Delete wait launcher
+    if( iWaitDialogLauncher )
+        {
+        delete iWaitDialogLauncher;
+        iWaitDialogLauncher = NULL;
+        }
+    
+	EVTUIDEBUG("- CEvtMgmtUiEditorCmdHandler::~CEvtMgmtUiEditorCmdHandler()");
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiEditorCmdHandler ::ConstructL()
+// ---------------------------------------------------------------------------
+//
+void CEvtMgmtUiEditorCmdHandler::ConstructL()
+    {   
+	EVTUIDEBUG("+ CEvtMgmtUiEditorCmdHandler::ConstructL()");
+    CActiveScheduler::Add( this );
+    
+    iEvtIdArray.Append(iEvent.EventId());
+    
+    // Set the Command Handler as the observer
+    iEventEngine.SetObserver( this );
+	EVTUIDEBUG("- CEvtMgmtUiEditorCmdHandler::ConstructL()");
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiEditorCmdHandler ::CEvtMgmtUiEditorCmdHandler()
+// ---------------------------------------------------------------------------
+//
+CEvtMgmtUiEditorCmdHandler::CEvtMgmtUiEditorCmdHandler( 
+                        CEvtEvent&                      aEvent, 
+                        MEvtMgmtUiEditorObserver&       aEditorObserver,
+                        CEvtMgmtUiEngine&               aEventEngine )
+    :CActive( EPriorityStandard ), 
+     iEvent( aEvent ), 
+     iEditorObserver( aEditorObserver ),
+     iEventEngine( aEventEngine )
+    {
+    iWaitDialogLauncher = NULL;
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiEditorCmdHandler ::HandleEditorCmdL()
+// It will handle all editor commands
+// @param[in] aCommand - command id of the command to be handled.
+// ---------------------------------------------------------------------------
+//
+void CEvtMgmtUiEditorCmdHandler::HandleEditorCmdL( TInt     aCommand )
+    {
+    EVTUIDEBUG("+ CEvtMgmtUiEditorCmdHandler::HandleEditorCmdL()" );
+    
+    // return if already Active
+    if ( IsActive() || (iWaitDialogLauncher && iWaitDialogLauncher->IsActive()) )
+        {
+        return;
+        }
+    
+    //set state of the state-machine.
+    iState = aCommand;
+    switch( aCommand )
+        {     
+        case EEvtEditorCmdNavigateToPlace:  
+        case EEvtEditorCmdShowOnMap:  
+        case EEvtEditorCmdAddDescNew:
+        case EEvtEditorCmdEditDesc:
+        case EEvtEditorCmdAddDescFromExisting:  
+        case EEvtEditorCmdAssignTone:  
+        case EEvtEditorCmdActivate:
+        case EEvtEditorCmdSaveDraft:
+        case EEvtEditorCmdDelete:  
+            {           
+            // Schedule a request onto yourself for completion
+            TRequestStatus* status = &iStatus;
+            User::RequestComplete( status, KErrNone );
+            SetActive();                                  
+            break;
+            }
+        case EEvtMgmtUiEventUiPosSettings:
+            {
+            if( !iClientLibrary )
+                iClientLibrary  = CLocSettingsUiClient::NewL();  
+            iClientLibrary->LaunchPosSettingsAsEmbeddedAppL( iStatus );
+            SetActive();
+            break;
+            }
+        case EEvtEditorCmdSetPlace: // set place
+            {
+            SetActive();
+            iStatus = KRequestPending;
+            
+            if(!iPlaceComponent)    
+                iPlaceComponent = CEvtMgmtUiPlaceComponent::NewL( iEvent.Place(), iEvent.Location() );
+            iPlaceComponent->DisplayPlacePopupDlg( iStatus );                
+            break;
+            }
+        default:
+            {
+            EVTUIDEBUG("Error CEvtMgmtUiEditorCmdHandler::HandleEditorCmdL()" );
+            }
+        }
+    EVTUIDEBUG("- CEvtMgmtUiEditorCmdHandler::HandleEditorCmdL()" );
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiEditorCmdHandler ::StopWaitDialogL()
+// Stop the Wait Loop
+// ---------------------------------------------------------------------------
+//
+void CEvtMgmtUiEditorCmdHandler::StopWaitDialogL()
+    {
+    // Handle the notification completion event. Stop the Wait Dialog
+    if( iWaitDialogLauncher )
+        {
+        iWaitDialogLauncher->StopWaitDialogL();  
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiEditorCmdHandler ::StartWaitDialogL()
+// Launch the Wait Loop
+// ---------------------------------------------------------------------------
+//
+void CEvtMgmtUiEditorCmdHandler::StartWaitDialogL(TInt aResourceId)
+    {
+    // Create the wait loop if it doesn't exit
+    if( !iWaitDialogLauncher )
+        {
+        // Create the Wait loop
+        iWaitDialogLauncher = CEvtMgmtUiWaitDialogLauncher::NewL(); 
+        iWaitDialogLauncher->SetObserver( this ); 
+        
+        // No Cancel operation
+        iWaitDialogLauncher->AllowUserToCancel( ETrue );                                          
+        }
+
+    if( iWaitDialogLauncher )
+        {
+        // Set the CBA accordingly
+        iWaitDialogLauncher->SetTextL( aResourceId );
+
+        // Finally start the Wait Dialog in Synchronous format
+        iWaitDialogLauncher->StartWaitDialogL();                                           
+        } 
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiEditorCmdHandler ::HandleDialogDismissed()
+// Derived from CActive
+// ---------------------------------------------------------------------------
+//
+void CEvtMgmtUiEditorCmdHandler::HandleDialogDismissed( TInt aButtonId )
+    {
+    EVTUIDEBUG("+ CEvtMgmtUiEditorCmdHandler::HandleDialogDismissed()");
+    if( EEikBidCancel == aButtonId )
+        {
+        EVTUIDEBUG("wait dialog is dismissed manually" );
+        
+        //Cancel Outstanding Request
+        iEventEngine.CancelRequest();  
+        }
+    EVTUIDEBUG("- CEvtMgmtUiEditorCmdHandler::HandleDialogDismissed()");
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiEditorCmdHandler ::RunError()
+// Derived from CActive
+// ---------------------------------------------------------------------------
+//
+TInt CEvtMgmtUiEditorCmdHandler::RunError( TInt aError )
+    {
+    EVTUIDEBUG("+ CEvtMgmtUiEditorCmdHandler::RunError()" );
+    if( aError != KErrNone )
+        {
+        if( iWaitDialogLauncher )
+            {
+            TRAP_IGNORE(iWaitDialogLauncher->StopWaitDialogL());
+            }
+        EVTUIDEBUG1("Error = %d", aError );   
+        }
+    EVTUIDEBUG("- CEvtMgmtUiEditorCmdHandler::RunError()" );
+    return aError;
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiEditorCmdHandler ::RunL()
+// Derived from CActive
+// ---------------------------------------------------------------------------
+//
+void CEvtMgmtUiEditorCmdHandler::RunL()
+    {    
+    TInt error = iStatus.Int();    
+    EVTUIDEBUG1("+ CEvtMgmtUiEditorCmdHandler::RunL() Error = %d", error );    
+    //if no error, handle the command
+    switch( iState )
+        {
+        case EEvtEditorCmdActivate:           
+        case EEvtEditorCmdSaveDraft:
+            {
+            StartWaitDialogL( R_LOCEV_NOTE_SAVING_EVENT );
+            
+            if( iEvent.EventId() ) //if present, modify event
+                {
+                iEventEngine.ModifyEventL(iEvent, iEventAttributeMask );                
+                }
+            else 
+                {
+                iEventEngine.AddEventL( iEvent );
+                }
+            return;
+            }
+        case EEvtEditorCmdDelete:
+            {
+            StartWaitDialogL( R_LOCEV_NOTE_SINGLEEVT_DELETE );
+            
+            iEventEngine.DeleteEventsL( &iEvtIdArray );
+            return;    
+            }
+        case EEvtEditorCmdSetPlace:
+            {  
+            if( error == KErrCancel ) 
+                {
+                iEditorObserver.NotifyEditorL( iState,KErrCancel );
+                if( iPlaceComponent )
+                   {
+                   delete iPlaceComponent;
+                   iPlaceComponent = NULL;
+                   }
+                return;
+                }
+            //handle 'set place' command 
+            HandleSetPlaceCommandL();
+            break;
+            }
+        case EEvtMgmtUiEventUiPosSettings:
+            {
+            if(iClientLibrary)
+                {
+                delete iClientLibrary;
+                iClientLibrary = NULL;
+                }
+            break;
+            }
+        case EEvtEditorCmdNavigateToPlace:
+            {
+            HandleNavigateToPlaceCommandL();
+            break;
+            }
+        case EEvtEditorCmdShowOnMap:  
+            {
+            HandleShowOnMapCommandL();
+            break;
+            }
+        case EEvtEditorCmdAddDescNew:
+        case EEvtEditorCmdEditDesc:
+        case EEvtEditorCmdAddDescFromExisting:  
+            {
+            error = HandleDescCommandsL( iState );
+            break;
+            }
+        case EEvtEditorCmdAssignTone:
+            {
+            error = HandleAssignToneCommandL();
+            break;
+            }
+        default:
+            {
+            EVTUIDEBUG("Error in CEvtMgmtUiEditorCmdHandler::HandleEditorCmdL()" );
+            }  
+        }
+    
+    //Notify editor status of the operation in order to do any UI specific updates
+    iEditorObserver.NotifyEditorL(iState,error);
+    
+    EVTUIDEBUG("- CEvtMgmtUiEditorCmdHandler::RunL()" );
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiEditorCmdHandler ::DoCancel()
+// ---------------------------------------------------------------------------
+//
+void CEvtMgmtUiEditorCmdHandler::DoCancel()
+    {    
+    switch( iState )
+        {
+        case EEvtEditorCmdActivate:           
+        case EEvtEditorCmdSaveDraft:
+        case EEvtEditorCmdDelete:
+            {
+            iEventEngine.CancelRequest();  
+            return; 
+            }
+        case EEvtEditorCmdSetPlace:
+            {  
+            if( iPlaceComponent )
+               {
+               delete iPlaceComponent;
+               iPlaceComponent = NULL;
+               }
+            break;
+            }
+        case EEvtMgmtUiEventUiPosSettings:
+            {
+            if( iClientLibrary )
+               {
+               iClientLibrary->ClosePosSettings();
+               delete iClientLibrary;
+               iClientLibrary = NULL;
+               }
+            break;
+            }
+        case EEvtEditorCmdNavigateToPlace:
+        case EEvtEditorCmdShowOnMap:  
+            {
+            if( iMapAdapter )
+               {
+               delete iMapAdapter;
+               iMapAdapter = NULL;
+               }
+            break;
+            }
+        case EEvtEditorCmdAddDescNew:
+        case EEvtEditorCmdEditDesc:
+        case EEvtEditorCmdAddDescFromExisting:  
+            {
+            if( iDescComponent )
+               {
+               delete iDescComponent;
+               iDescComponent = NULL;
+               }
+            break;
+            }
+        case EEvtEditorCmdAssignTone:
+            {
+            if( iRingtoneComponent )
+               {
+               delete iRingtoneComponent;
+               iRingtoneComponent = NULL;
+               }
+            break;
+            }
+        default:
+            {
+            break;
+            }  
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CEvtMgmtUiEditorCmdHandler::DisplayConfirmationQueryDlg()
+// It shows confirmation query dialog
+// -----------------------------------------------------------------------------
+//
+TBool CEvtMgmtUiEditorCmdHandler::DisplayConfirmationQueryDlgL( TInt aResourceId )
+    {
+    EVTUIDEBUG("+ CEvtMgmtUiEditorCmdHandler::DisplayConfirmationQueryDlgL()" );
+    HBufC* msg = StringLoader::LoadLC( aResourceId );
+    TBool response= EFalse;
+    CAknQueryDialog* confirmationQuery = CAknQueryDialog::NewL();     
+    response = confirmationQuery->ExecuteLD( R_EVTUI_CONFIRMATION_QUERY, *msg );         
+    CleanupStack::PopAndDestroy(msg);
+    EVTUIDEBUG("- CEvtMgmtUiEditorCmdHandler::DisplayConfirmationQueryDlgL()" );
+    return response;
+    }
+
+// -----------------------------------------------------------------------------
+//  CEvtMgmtUiEditorCmdHandler::HandleSetPlaceCommandL
+//  It will handle'set place' operation.
+// -----------------------------------------------------------------------------
+//
+void CEvtMgmtUiEditorCmdHandler::HandleSetPlaceCommandL()
+    {
+    EVTUIDEBUG("= Details recieved from Set Place component" ); 
+    EVTUIDEBUG1("TriggerId = %d", iEvent.EventId() );
+	TPtrC placePtr = iPlaceComponent->Place();
+    EVTUIDEBUG1("Place = %S", &placePtr );
+    EVTUIDEBUG1("Lat = %f", iPlaceComponent->TriggerLocation().Latitude() );
+    EVTUIDEBUG1("Long = %f", iPlaceComponent->TriggerLocation().Longitude() );
+    EVTUIDEBUG("= Finish Details recieved from Set Place component" );
+   
+    //if place is already set
+    if( iEvent.Place().Compare(KNullDesC ) != 0 )
+        {
+        //display confirmation message to replace old details
+        if( DisplayConfirmationQueryDlgL( R_EVTUI_EDITOR_CONFIRM_PLACESAVE ) )
+           { 
+           //if yes, then replace
+           iEvent.SetPlaceL( iPlaceComponent->Place() );  
+           iEventAttributeMask  = iEventAttributeMask | CEvtMgmtUiEngine::EEvtEventAttributePlace;
+           }       
+        }
+    else //if place is not already set, then set it
+        {
+        iEvent.SetPlaceL( iPlaceComponent->Place() );   
+        iEventAttributeMask  = iEventAttributeMask | CEvtMgmtUiEngine::EEvtEventAttributePlace;
+        }
+    }
+
+// -----------------------------------------------------------------------------
+//  CEvtMgmtUiEditorCmdHandler::HandleDescCommandsL
+//  It will handle add/edit/remove description operation.
+//  @param[in] aCommand - Command id of the operation to be performed.
+// -----------------------------------------------------------------------------
+//
+TInt CEvtMgmtUiEditorCmdHandler::HandleDescCommandsL( TInt  aCommand )
+    {
+	EVTUIDEBUG("+ CEvtMgmtUiEditorCmdHandler::HandleDescCommandsL()");
+	TInt result = KErrNone;
+    switch( aCommand )
+        {
+        case EEvtEditorCmdAddDescNew:
+        case EEvtEditorCmdEditDesc:     
+            {
+            iDescComponent = CEvtMgmtUiDescComponent::NewL(iEvent.Description());
+            result = iDescComponent->DisplayNotepadEditorL();
+            if( iDescComponent )
+                {
+                if(result == KErrNone || result == KErrCancel )
+                        iEvent.SetDescriptionL( iDescComponent->Desc() );
+                delete iDescComponent;
+                iDescComponent = NULL;
+                }
+            EVTUIDEBUG("= add/edit description operation is completed" );
+            break;
+            }
+        case EEvtEditorCmdAddDescFromExisting:
+            {
+            iDescComponent = CEvtMgmtUiDescComponent::NewL(iEvent.Description());
+            result = iDescComponent->DescFromExistingNotesL();
+            if( iDescComponent )
+                {
+                if(result == KErrNone )
+                        iEvent.SetDescriptionL( iDescComponent->Desc() );
+                delete iDescComponent;
+                iDescComponent = NULL;
+                }
+            EVTUIDEBUG("= add desc from existing operation is completed" );
+            break;
+            }
+        default:
+            break;
+        }
+	EVTUIDEBUG("+ CEvtMgmtUiEditorCmdHandler::HandleDescCommandsL()");
+	return result;
+    }
+
+// -----------------------------------------------------------------------------
+//  CEvtMgmtUiEditorCmdHandler::HandleAssignToneCommandL
+//  It will handle 'assign tone' command.
+//  @ret returns KErrNone if successfully handled else error
+// -----------------------------------------------------------------------------
+//
+TInt CEvtMgmtUiEditorCmdHandler::HandleAssignToneCommandL()
+    {
+    EVTUIDEBUG("+ CEvtMgmtUiEditorCmdHandler::HandleAssignToneCommandL()" );
+    TInt retval = KErrNone; 
+    CEvtToneAction* tone = CEvtToneAction::NewLC();
+    if( iEvent.HasAction())
+       {              
+       tone->InternalizeL( iEvent.Action() );
+       iRingtoneComponent = CEvtMgmtUiRingtoneComponent::NewL( tone->FileName() );
+       }
+    else
+        iRingtoneComponent = CEvtMgmtUiRingtoneComponent::NewL( KNullDesC() );
+   
+    if( iRingtoneComponent->DisplayAudioTonePopupDlgL() == KErrCancel )
+       {
+       if( iRingtoneComponent )
+           {
+           delete iRingtoneComponent;
+           iRingtoneComponent = NULL;
+           }
+       CleanupStack::PopAndDestroy(); //tone
+       return KErrCancel;
+       }
+    if( iRingtoneComponent)
+        {
+        if( iRingtoneComponent->Ringtone().Compare( KNullDesC ) == 0 )
+            {
+            retval = KErrNotFound;
+            iEvent.SetActionL( NULL );
+            }
+        else
+            {
+            tone->SetFileNameL( iRingtoneComponent->Ringtone() );
+      
+            CEvtAction* action = CEvtAction::NewLC();
+            tone->ExternalizeL( *action );
+            iEvent.SetActionL( action ); //ownership is transferred.
+       
+            CleanupStack::Pop( action );        
+            }
+        delete iRingtoneComponent;
+        iRingtoneComponent = NULL;
+        }
+    CleanupStack::PopAndDestroy( ); //tone  
+    EVTUIDEBUG("- CEvtMgmtUiEditorCmdHandler::HandleAssignToneCommandL()" );
+    return retval;
+    }
+
+// -----------------------------------------------------------------------------
+//  CEvtMgmtUiEditorCmdHandler::HandleShowOnMapCommandL
+//  It will handle 'show on map' command.
+// -----------------------------------------------------------------------------
+//
+void CEvtMgmtUiEditorCmdHandler::HandleShowOnMapCommandL()
+    {
+    EVTUIDEBUG("+ CEvtMgmtUiEditorCmdHandler::HandleShowOnMapCommandL()" );
+    iMapAdapter = CEvtMgmtUiMapNavigationAdapter::NewL();
+    iMapAdapter->SetLocation(iEvent.Location());
+    iMapAdapter->ShowOnMapL();
+    if(iMapAdapter)
+        {
+        delete iMapAdapter;
+        iMapAdapter = NULL;
+        }
+    EVTUIDEBUG("- CEvtMgmtUiEditorCmdHandler::HandleShowOnMapCommandL()" );
+    }
+
+// -----------------------------------------------------------------------------
+//  CEvtMgmtUiEditorCmdHandler::HandleNavigateToPlaceCommandL
+//  It will handle 'navigate to place' command.
+// -----------------------------------------------------------------------------
+//
+void CEvtMgmtUiEditorCmdHandler::HandleNavigateToPlaceCommandL()
+    {
+    EVTUIDEBUG("+ CEvtMgmtUiEditorCmdHandler::HandleNavigateToPlaceCommandL()" );
+    iMapAdapter = CEvtMgmtUiMapNavigationAdapter::NewL();
+    iMapAdapter->SetLocation(iEvent.Location());
+    iMapAdapter->NavigateToPlaceL();
+    if(iMapAdapter)
+        {
+        delete iMapAdapter;
+        iMapAdapter = NULL;
+        }
+    EVTUIDEBUG("- CEvtMgmtUiEditorCmdHandler::HandleNavigateToPlaceCommandL()" );
+    }
+
+// -----------------------------------------------------------------------------
+// CEvtMgmtUiEditorCmdHandler::SetEventAttributeMask
+// It will set attribute mask which will be used to update event.
+// -----------------------------------------------------------------------------
+void CEvtMgmtUiEditorCmdHandler::SetEventAttributeMask( TEvtEventAttributeMask aEventAttributeMask )
+    {
+    iEventAttributeMask = iEventAttributeMask | aEventAttributeMask;
+    }
+
+// -----------------------------------------------------------------------------
+// void CEvtMgmtUiEditorCmdHandler::NotifyEventChangeL
+// -----------------------------------------------------------------------------
+//    
+void CEvtMgmtUiEditorCmdHandler::NotifyEventChangeL( TInt aErrorCode, TInt /*aState*/ )
+    {
+    EVTUIDEBUG("+ CEvtMgmtUiEditorCmdHandler::NotifyEventChangeL()" );
+        
+    // Stop the Wait Dialog
+    StopWaitDialogL();
+    
+    //Notify editor status of the operation in order to do any UI specific updates
+    iEditorObserver.NotifyEditorL(iState,iStatus.Int());
+    
+    if( aErrorCode == KErrServerTerminated || 
+        aErrorCode == KErrServerBusy ||
+        aErrorCode == KErrNotReady )
+        {
+        EVTUIDEBUG("Exiting application as server is not ready." );
+        // The User has exited the application using the Exit option from
+        //.Options menu.  But, thats possible only if we exit the application
+        // with EAknCmdExit.
+        // A bit of convoluted logic but needed because we are using the
+        // same components for the Settings UI Server as well as LC.
+        
+        CEikonEnv* env = CEikonEnv::Static();
+       	CEikAppServer* server = env->AppServer();
+		if ( server )
+			{
+			server->NotifyServerExit( EAknCmdExit );
+			}
+	    CAknAppUi* appUi = static_cast< CAknAppUi* >( env->AppUi());
+	    appUi->RunAppShutter();  
+        return;
+        }
+    EVTUIDEBUG("- CEvtMgmtUiEditorCmdHandler::NotifyEventChangeL()" );
+    }
+
+// -----------------------------------------------------------------------------
+// void CEvtMgmtUiEditorCmdHandler::NotifyEventChangeL
+// -----------------------------------------------------------------------------
+//
+void CEvtMgmtUiEditorCmdHandler::NotifyModelChangeL()
+    {
+    // Do Nothing here
+    }
+
+//end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventseditor/src/evtmgmtuilocationserviceadapter.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,234 @@
+/*
+* Copyright (c) 2002-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 contains the methods which interface with Location Acquisition 
+*     API for getting location information 
+*
+*/
+
+// INCLUDE FILES
+#include <evtmgmteditorui.rsg>
+#include <f32file.h>
+#include <sysutil.h>
+#include <lbs/epos_cposmoduleidlist.h>
+#include <lbs/epos_cposmodules.h>
+#include <aknnotewrappers.h> 
+#include <eikenv.h>
+#include <StringLoader.h>
+#include <centralrepository.h>
+#include "locnotprefplugindomaincrkeys.h"
+#include "evtmgmtuilocationserviceadapter.h"
+#include "evteditorconsts.h"
+#include "evtdebug.h"
+
+// ----------------------------------------------------------------------------
+// CEvtMgmtUiLocationServiceAdapter::NewL
+// Two-phased constructor.
+// ----------------------------------------------------------------------------
+CEvtMgmtUiLocationServiceAdapter* CEvtMgmtUiLocationServiceAdapter::NewL( MEvtMgmtUiLocationServiceObserver& aObserver )
+	{
+	CEvtMgmtUiLocationServiceAdapter* self = new ( ELeave ) CEvtMgmtUiLocationServiceAdapter( aObserver );
+	CleanupStack::PushL( self );
+	self->ConstructL();
+	CleanupStack::Pop(); // self
+	return self;
+	}
+
+// ---------------------------------------------------------
+// CEvtMgmtUiLocationServiceAdapter::~CEvtMgmtUiLocationServiceAdapter
+// ---------------------------------------------------------
+CEvtMgmtUiLocationServiceAdapter::~CEvtMgmtUiLocationServiceAdapter()
+    {
+    EVTUIDEBUG("+ CEvtMgmtUiLocationServiceAdapter::~CEvtMgmtUiLocationServiceAdapter()" );
+    Cancel();
+    iPositioner.Close();
+    iServer.Close();
+    EVTUIDEBUG("- CEvtMgmtUiLocationServiceAdapter::~CEvtMgmtUiLocationServiceAdapter()" );
+    }
+
+// ---------------------------------------------------------
+// CEvtMgmtUiLocationServiceAdapter::ConstructL
+// ---------------------------------------------------------
+void CEvtMgmtUiLocationServiceAdapter::ConstructL()
+	{
+	//conect to position server
+	User::LeaveIfError(iServer.Connect());
+	
+	//create subsesion with server
+	User::LeaveIfError(iPositioner.Open( iServer ));
+	
+	//set timeout value
+	TPositionUpdateOptions updateOptions;        
+	updateOptions.SetUpdateTimeOut( TTimeIntervalMicroSeconds(KLocAcqTimeOut));
+	User::LeaveIfError( iPositioner.SetUpdateOptions(updateOptions) );
+	
+	//set requestor
+    _LIT(KRequestorName, "LocationSerivce");    
+	User::LeaveIfError( iPositioner.SetRequestor( 
+	                    CRequestor::ERequestorService,
+	                    CRequestor::EFormatApplication,
+	                    KRequestorName )); 
+	
+	//add to active scheduler for asychrnous operation
+	 CActiveScheduler::Add( this );
+	}
+
+// ----------------------------------------------------------------------------
+// CLmkLocationService::CLmkLocationService
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// ----------------------------------------------------------------------------
+CEvtMgmtUiLocationServiceAdapter::CEvtMgmtUiLocationServiceAdapter( MEvtMgmtUiLocationServiceObserver& aObserver ) 
+: CActive(EPriorityStandard), iObserver( aObserver )
+    {   
+    }
+
+// ---------------------------------------------------------
+// CEvtMgmtUiLocationServiceAdapter::LocationRequestL
+// It is used to request current location
+// ---------------------------------------------------------
+ void CEvtMgmtUiLocationServiceAdapter::LocationRequestL()
+	{    
+	EVTUIDEBUG("+ CEvtMgmtUiLocationServiceAdapter::LocationRequestL()" );
+	if ( IsActive() )
+        {
+        User::Leave( KErrInUse );            
+        }
+    SetActive();
+    iStatus = KRequestPending;
+	iPositioner.NotifyPositionUpdate( iPositionInfo, iStatus );  
+	EVTUIDEBUG("- CEvtMgmtUiLocationServiceAdapter::LocationRequestL()" );      	
+	}
+
+// ---------------------------------------------------------
+// CEvtMgmtUiLocationServiceAdapter::CurrentPosition
+// It is used to retrieve current location
+// @ret Recently retrieved current location 
+// ---------------------------------------------------------
+TPosition& CEvtMgmtUiLocationServiceAdapter::CurrentPosition()
+	{
+	return iPosition;
+	}
+
+// ---------------------------------------------------------
+// CEvtMgmtUiLocationServiceAdapter::AllPositionMethodsDisabled
+// Check if all positioning methods are disabled.
+// @ret true if disabled else false
+// ---------------------------------------------------------
+//
+TBool CEvtMgmtUiLocationServiceAdapter::AllPositionMethodsDisabledL()
+    {
+    CPosModules* moduleDb = CPosModules::OpenL();
+    CleanupStack::PushL(moduleDb);
+    CPosModuleIdList* psyList = moduleDb->ModuleIdListL();
+    CleanupStack::PushL(psyList);
+    
+    TBool allDisabled =ETrue;
+    
+    TPositionModuleInfo moduleInfo;
+     for(TInt index=0; index< psyList->Count(); index++)
+         {
+        TPositionModuleId moduleId = psyList->At( index );
+        TRAPD(error, moduleDb->GetModuleInfoL( moduleId, moduleInfo););
+        if(error == KErrNone ) 
+            {
+            if( moduleInfo.IsAvailable() )
+                {
+                allDisabled = EFalse;
+                break;
+                }
+            }        
+         }
+    
+    CleanupStack::PopAndDestroy(2); // psyList, moduleDb
+    return allDisabled;
+    }
+
+// ---------------------------------------------------------
+// CEvtMgmtUiLocationServiceAdapter::CancelRequest
+// It is used to cancel recently issued location request
+// ---------------------------------------------------------
+void CEvtMgmtUiLocationServiceAdapter::CancelRequest()
+	{
+	Cancel();
+	TRAP_IGNORE( iObserver.HandleLocationServiceErrorL( KErrCancel ) );
+	}
+
+// ---------------------------------------------------------
+// CEvtMgmtUiLocationServiceAdapter::RunL
+// Derived from CActive
+// ---------------------------------------------------------
+void CEvtMgmtUiLocationServiceAdapter::RunL()
+	{
+    EVTUIDEBUG1("+ CEvtMgmtUiLocationServiceAdapter::RunL() - %d", iStatus.Int() );
+
+   //TInt err = KErrTimedOut;
+   //switch ( err )
+   switch ( iStatus.Int() )
+		{
+		case KErrNone:
+		case KPositionPartialUpdate:        
+			{
+			//retrieve current location information
+			iPositionInfo.GetPosition( iPosition );
+			TReal32 altitude = iPosition.Altitude();
+			if ( Math::IsNaN( altitude ) )
+				{
+				TRealX nan;
+				nan.SetNaN();
+				iPosition.SetVerticalAccuracy( nan );	
+				}	
+			
+			//notify observer about successful completion of operation
+			iObserver.HandleLocationServiceResponseL( iStatus.Int() );
+			break;
+			}
+		case KErrAccessDenied:			
+		case KPositionQualityLoss:
+		case KErrTimedOut:
+		case KErrNotFound: // No PSY selected.
+		case KErrUnknown:
+		case KErrCancel:
+		case KErrArgument:
+		default:
+			{		
+		    TRAP_IGNORE( iObserver.HandleLocationServiceErrorL( iStatus.Int() ) );
+			break;
+			}
+		}
+	}	
+
+// ---------------------------------------------------------
+// CEvtMgmtUiLocationServiceAdapter::RunError
+// Derived from CActive
+// ---------------------------------------------------------
+//
+TInt CEvtMgmtUiLocationServiceAdapter::RunError(TInt aError)
+    {
+    TRAP_IGNORE( iObserver.HandleLocationServiceErrorL( aError ) );
+    return KErrNone;
+    }
+
+// ---------------------------------------------------------
+// CEvtMgmtUiLocationServiceAdapter::DoCancel
+// Derived from CActive
+// ---------------------------------------------------------
+//
+void CEvtMgmtUiLocationServiceAdapter::DoCancel()
+    {
+    EVTUIDEBUG("+ CEvtMgmtUiLocationServiceAdapter::DoCancel()" );
+    iPositioner.CancelRequest( EPositionerNotifyPositionUpdate );
+    EVTUIDEBUG("- CEvtMgmtUiLocationServiceAdapter::DoCancel()" );
+    }
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventseditor/src/evtmgmtuilocsettinglauncher.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,110 @@
+/*
+* Copyright (c) 2002-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:   Responsible for launching positioning settings
+*
+*/
+
+// INCLUDE FILES
+#include "evtmgmtuilocsettinglauncher.h"
+#include "evtmgmtuilocsettinglauncherobserver.h"
+
+// ----------------------------------------------------------------------------
+// CLmkLocSettingsLauncher::NewL
+// Two-phased constructor.
+// ----------------------------------------------------------------------------
+//
+CEvtMgmtUiLocSettingsLauncher* CEvtMgmtUiLocSettingsLauncher:: NewL()
+	{
+	CEvtMgmtUiLocSettingsLauncher* self = new (ELeave) CEvtMgmtUiLocSettingsLauncher();
+	CleanupStack::PushL(self);
+	self->ConstructL();
+	CleanupStack::Pop(); // self
+	return self;
+	}
+
+// ----------------------------------------------------------------------------
+// CLmkLocSettingsLauncher::CLmkLocSettingsLauncher
+// ----------------------------------------------------------------------------
+//
+CEvtMgmtUiLocSettingsLauncher::CEvtMgmtUiLocSettingsLauncher()
+	: CActive( EPriorityStandard )
+	{
+	}
+
+// ----------------------------------------------------------------------------
+// CEvtMgmtUiLocSettingsLauncher::~CEvtMgmtUiLocSettingsLauncher
+// ----------------------------------------------------------------------------
+//
+CEvtMgmtUiLocSettingsLauncher::~CEvtMgmtUiLocSettingsLauncher()
+	{
+	Cancel();
+    delete iClientLibrary;
+	}
+
+// ----------------------------------------------------------------------------
+// CEvtMgmtUiLocSettingsLauncher::ConstructL
+// ----------------------------------------------------------------------------
+//
+void CEvtMgmtUiLocSettingsLauncher::ConstructL()
+	{
+	iClientLibrary  = CLocSettingsUiClient::NewL();    
+    CActiveScheduler::Add( this );
+	}
+
+// ----------------------------------------------------------------------------
+// CEvtMgmtUiLocSettingsLauncher::LaunchL
+// It is used to cancel launching of position settings.
+// ----------------------------------------------------------------------------
+//
+void CEvtMgmtUiLocSettingsLauncher::LaunchL()
+    {
+    iClientLibrary->LaunchPosSettingsAsEmbeddedAppL( iStatus );
+    SetActive();
+    }
+
+// ----------------------------------------------------------------------------
+// CEvtMgmtUiLocSettingsLauncher::SetObserver
+// It is used to set observer which will get notification 
+// after completion of operation.
+// ----------------------------------------------------------------------------
+//
+void CEvtMgmtUiLocSettingsLauncher::SetObserver( MEvtMgmtUiLocSettingsLauncherObserver* aObserver )
+    { 
+    iObserver = aObserver;
+    }
+    
+// ----------------------------------------------------------------------------
+// CEvtMgmtUiLocSettingsLauncher::RunL
+// Derived from CActive
+// ----------------------------------------------------------------------------
+//
+void CEvtMgmtUiLocSettingsLauncher::RunL()
+    {
+    //notify observer completion of operation.
+    if(iObserver)
+        iObserver->NotifyLocSettingLaucherChangeL( iStatus.Int() );
+    }
+
+// ----------------------------------------------------------------------------
+// CEvtMgmtUiLocSettingsLauncher::DoCancel
+// Derived from CActive
+// ----------------------------------------------------------------------------
+//
+void CEvtMgmtUiLocSettingsLauncher::DoCancel()
+    {
+    iClientLibrary->ClosePosSettings();
+    }
+
+// End of File
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventseditor/src/evtmgmtuimapnavigationadapter.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,361 @@
+/*
+* 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:   Applications interface class to map and navigation use cases
+*
+*/
+
+// INCLUDE FILES
+#include <AiwGenericParam.h>
+#include <epos_poslandmarkserialization.h>
+#include <lbsposition.h>
+#include <eikenv.h>
+#include <StringLoader.h>
+#include <evtmgmteditorui.rsg>
+#include <EPos_CPosLandmarkDatabase.h>
+#include <EPos_CPosLmOperation.h>
+#include <EPos_CPosLandmark.h>
+#include <EPos_Landmarks.h>
+#include <e32math.h>
+#include <TLmkItemIdDbCombiInfo.h> 
+#include <AiwServiceHandler.h>
+#include <AiwCommon.h> 
+#include <mnaiwservices.h>
+#include <mnmapview.h>
+#include <mnprovider.h>
+#include <mnproviderfinder.h>
+
+#include "evtdebug.h"
+#include "evtmgmtuimapnavigationadapter.h"
+#include "evteditorconsts.h"
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CEvtMgmtUiMapNavigationAdapter::CLmkMapNavigationInterface
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+CEvtMgmtUiMapNavigationAdapter::CEvtMgmtUiMapNavigationAdapter()
+	{	
+	}
+
+// -----------------------------------------------------------------------------
+// CEvtMgmtUiMapNavigationAdapter::ConstructL
+// Symbian 2nd phase constructor can leave.
+// -----------------------------------------------------------------------------
+void CEvtMgmtUiMapNavigationAdapter::ConstructL()
+	{
+	iAiwServiceHandler = CAiwServiceHandler::NewL();
+	iInList = CAiwGenericParamList::NewL();
+    iOutList = CAiwGenericParamList::NewL();  
+	}
+
+// -----------------------------------------------------------------------------
+// CEvtMgmtUiMapNavigationAdapter::NewL
+// Symbian 1st phase constructor can leave.
+// -----------------------------------------------------------------------------
+CEvtMgmtUiMapNavigationAdapter* CEvtMgmtUiMapNavigationAdapter::NewL()
+	{	
+	CEvtMgmtUiMapNavigationAdapter* self = new (ELeave) CEvtMgmtUiMapNavigationAdapter();
+	CleanupStack::PushL( self );
+	self->ConstructL();
+	CleanupStack::Pop();//self
+	return self;
+	}
+	
+// -----------------------------------------------------------------------------
+// CEvtMgmtUiMapNavigationAdapter::NewLC
+// Symbian 1st phase constructor can leave.
+// -----------------------------------------------------------------------------
+CEvtMgmtUiMapNavigationAdapter* CEvtMgmtUiMapNavigationAdapter::NewLC()
+    {   
+    CEvtMgmtUiMapNavigationAdapter* self = new (ELeave) CEvtMgmtUiMapNavigationAdapter();
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop();//self
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CEvtMgmtUiMapNavigationAdapter::~CEvtMgmtUiMapNavigationAdapter
+// C++ Destructor
+// -----------------------------------------------------------------------------
+ CEvtMgmtUiMapNavigationAdapter::~CEvtMgmtUiMapNavigationAdapter()
+	{	
+	delete iAiwServiceHandler;    
+	iAiwServiceHandler = NULL;
+    delete iInList;
+    iInList = NULL;
+    delete iOutList;   
+    iOutList = NULL;
+    if(iPlace)
+        {
+        delete iPlace;
+        iPlace = NULL;
+        }
+	}
+ 
+ // -----------------------------------------------------------------------------
+ // CEvtMgmtUiMapNavigationAdapter::SetObserver
+ // It will set observer to notify completion of map operation
+ // -----------------------------------------------------------------------------
+ void CEvtMgmtUiMapNavigationAdapter::SetObserver( MEvtMgmtUiMapAndNavigationObserver* aObserver )
+     {
+     iObserver = aObserver;
+     } 
+ 
+ // -----------------------------------------------------------------------------
+ // CEvtMgmtUiMapNavigationAdapter::SetPlaceL
+ // It will set place.
+ // @param [in] aPlace - place of existing event
+ //                    - empty for newly created event
+ // ----------------------------------------------------------------------------- 
+ void CEvtMgmtUiMapNavigationAdapter::SetPlaceL( const TPtrC& aPlace )
+     {
+     iPlace = aPlace.AllocL();
+     }
+ 
+ // -----------------------------------------------------------------------------
+ // CEvtMgmtUiMapNavigationAdapter::SetLocation
+ // It will set location.
+ // param[in] aTriggerLocation - location of trigger of existing event
+ //                            - NaN for newly created event
+ // -----------------------------------------------------------------------------
+ void CEvtMgmtUiMapNavigationAdapter::SetLocation( TCoordinate  aTriggerLocation )
+     {
+     iTriggerLocation = aTriggerLocation;
+     }
+
+ // -----------------------------------------------------------------------------
+ // CEvtMgmtUiMapNavigationAdapter::Place()
+ // It will return place value recieved from map.
+ // @ret selected place
+ // -----------------------------------------------------------------------------
+ TPtrC CEvtMgmtUiMapNavigationAdapter::Place() const
+     {
+     //if place, it is set otherwise empty string
+     if(iPlace)
+         return *iPlace;
+     else
+         return KNullDesC();
+     }
+
+// -----------------------------------------------------------------------------
+// CEvtMgmtUiMapNavigationAdapter::PlaceFromMapL
+// This method is called for the get landmarks from map use case.
+// -----------------------------------------------------------------------------
+    void CEvtMgmtUiMapNavigationAdapter::PlaceFromMapL()
+	{
+	// This string will be sent to the provider to display it in the map view
+    HBufC* buf = StringLoader::LoadLC( R_EVTUI_CREATENEW_FORM_PLACEPOPUP_TITLE , CEikonEnv::Static() );    
+	TAiwGenericParam param( EGenericParamRequestText, TAiwVariant( *buf ) );
+    iInList->Reset();
+    iInList->AppendL( param );
+    iOutList->Reset(); 
+    iAiwServiceHandler->AttachL( R_EVTMGMTUI_AIW_INTEREST_SELECTFROMMAP );
+	iAiwServiceHandler->ExecuteServiceCmdL( KAiwCmdMnSelectFromMap, *iInList, *iOutList, 0, this );	
+	CleanupStack::PopAndDestroy( buf ); 
+	}
+
+// -----------------------------------------------------------------------------
+// CEvtMgmtUiMapNavigationAdapter::ShowOnMapL
+// It will show location on map
+// -----------------------------------------------------------------------------
+void CEvtMgmtUiMapNavigationAdapter::ShowOnMapL()
+    {
+    CPosLandmark* lmk = CPosLandmark::NewLC();
+    TLocality locality;
+    HBufC8* lmBuf;
+    
+    //set location
+    locality.SetCoordinate( iTriggerLocation.Latitude(), iTriggerLocation.Longitude(), iTriggerLocation.Altitude() );
+ 
+    lmk->SetPositionL(locality);
+    
+    //set  in parameters
+    iInList->Reset();
+    lmBuf =PosLandmarkSerialization::PackL( *lmk );
+    CleanupStack::PushL( lmBuf );
+    TAiwGenericParam param( EGenericParamLandmark, TAiwVariant( *lmBuf ) );     
+    iInList->AppendL( param );       
+    TMnAiwCommonOptionsParam options;
+    options.iRunChained = EFalse;
+    TPckg<TMnAiwCommonOptionsParam> optionsPack( options );
+    TAiwGenericParam optParam( EGenericParamMnCommonOptions, TAiwVariant( optionsPack ) );
+    iInList->AppendL( optParam );
+            
+    //show location on map
+    iAiwServiceHandler->AttachL( R_EVTMGMTUI_AIW_INTEREST_SHOWONMAP );
+    iAiwServiceHandler->ExecuteServiceCmdL( KAiwCmdMnShowMap, *iInList, *iOutList, 0, this ); 
+    
+    CleanupStack::PopAndDestroy( 2 ); //lmbuf, lmk
+    }
+
+// -----------------------------------------------------------------------------
+// CEvtMgmtUiMapNavigationAdapter::NavigateToPlaceL
+// It will navigate to location
+// -----------------------------------------------------------------------------
+void CEvtMgmtUiMapNavigationAdapter::NavigateToPlaceL()
+    {
+    CPosLandmark* lmk = CPosLandmark::NewLC();
+    TLocality locality;
+    HBufC8* lmBuf;
+    
+    //set location
+    locality.SetCoordinate( iTriggerLocation.Latitude(), iTriggerLocation.Longitude(), iTriggerLocation.Altitude() );
+    lmk->SetPositionL(locality);
+    
+    //set in parameters
+    iInList->Reset();
+    lmBuf =PosLandmarkSerialization::PackL( *lmk );
+    CleanupStack::PushL( lmBuf );
+    TAiwGenericParam param( EGenericParamLandmark, TAiwVariant( *lmBuf ) );     
+    iInList->AppendL( param );       
+    TMnAiwCommonOptionsParam options;
+    options.iRunChained = EFalse;
+    TPckg<TMnAiwCommonOptionsParam> optionsPack( options );
+    TAiwGenericParam optParam( EGenericParamMnCommonOptions, TAiwVariant( optionsPack ) );
+    iInList->AppendL( optParam );
+        
+    //navigate to location
+    iAiwServiceHandler->AttachL( R_EVTMGMTUI_AIW_INTEREST_NAVIGATETO );
+    iAiwServiceHandler->ExecuteServiceCmdL( KAiwCmdMnNavigateTo, *iInList, *iOutList, 0, this ); 
+    
+    CleanupStack::PopAndDestroy( 2 ); //lmbuf, lmk
+    }
+        
+        
+// -----------------------------------------------------------------------------
+// CEvtMgmtUiMapNavigationAdapter::MapServiceProvidersL
+// It will return total map service providers.
+// @ret total number of map service providers
+// -----------------------------------------------------------------------------
+//
+TInt CEvtMgmtUiMapNavigationAdapter::MapServiceProvidersL()
+    {
+    RPointerArray<CMnProvider> providers;
+    // get all providers
+    MnProviderFinder::FindProvidersL( providers );
+    TInt total = providers.Count();
+    providers.ResetAndDestroy();
+    providers.Close();
+    Debug(_L("Total map service providers = %d"), total);
+    return total;
+    }
+
+// -----------------------------------------------------------------------------
+// CEvtMgmtUiMapNavigationAdapter::HandleNotifyL
+// Derived from MAiwNotifyCallback
+// -----------------------------------------------------------------------------
+ TInt CEvtMgmtUiMapNavigationAdapter::HandleNotifyL( TInt /*aCmdId*/, 
+                                                        TInt /*aEventId*/, 
+                                                        CAiwGenericParamList& /*aEventParamList*/,
+                                                        const CAiwGenericParamList& /*aInParamList*/ )
+    {
+    if ( iOutList->Count() ) //if location is selected on map
+        {
+        const TAiwGenericParam& param = ( *iOutList )[0];
+        if ( EGenericParamLandmark == param.SemanticId() )
+            {
+            TPtrC8 landmarkData( param.Value().AsData() );
+            CPosLandmark* lm = PosLandmarkSerialization::UnpackL( landmarkData );
+            CleanupStack::PushL( lm );           
+            
+            SetPlaceFromLandmarkL( *lm );
+            CleanupStack::PopAndDestroy( lm );
+            iOutList->Reset(); 
+            iObserver->HandleMapAndNavigationResponseL( KErrNone, *iPlace, iTriggerLocation );
+            }
+        else
+            {
+            iOutList->Reset(); 
+            iObserver->HandleMapAndNavigationResponseL( KErrCancel, *iPlace, iTriggerLocation );             
+            }         
+        }
+    else //if map application is cancelled
+        iObserver->HandleMapAndNavigationResponseL( KErrCancel, *iPlace, iTriggerLocation );
+    return KErrNone;
+    }
+ 
+ // -----------------------------------------------------------------------------
+ // CEvtMgmtUiMapNavigationAdapter::PlaceFromLandmarkL
+ // It will set place details from landmark recieved from map
+ // @param[in] aLandmark - landmark selected on map 
+ // -----------------------------------------------------------------------------
+ void CEvtMgmtUiMapNavigationAdapter::SetPlaceFromLandmarkL( CPosLandmark& aLandmark )
+     {            
+    _LIT(KCommaSeparator,", ");
+    
+    //retrieve lat long info
+    TLocality locality;
+    aLandmark.GetPosition( locality );
+    iTriggerLocation = locality;
+    
+    //retrive position description
+    delete iPlace;
+    iPlace = NULL;
+    iPlace = HBufC::NewL(KPlaceMaxLength);       
+    TPtr placePtr = iPlace->Des();
+    
+    TPtrC ptr(KNullDesC);
+    
+    //Landmark Name
+    if( aLandmark.GetLandmarkName(ptr) == KErrNone && ptr.Compare(KNullDesC)!=0 )
+        {                      
+        placePtr.Copy(ptr);           
+        placePtr.Append(_L(" "));            
+        }
+             
+    //retrieve street
+    if(aLandmark.GetPositionField(EPositionFieldStreet,ptr)!=KErrNotFound && ptr.Compare(KNullDesC)!=0)
+       {           
+       placePtr.Append(ptr);
+       placePtr.Append(KCommaSeparator);
+       }
+    //retrieve city
+    if(aLandmark.GetPositionField(EPositionFieldCity,ptr)!=KErrNotFound && ptr.Compare(KNullDesC)!=0)
+      { 
+      placePtr.Append(ptr);
+      placePtr.Append(KCommaSeparator);
+      }  
+    //retrieve state
+    if(aLandmark.GetPositionField(EPositionFieldState,ptr)!=KErrNotFound && ptr.Compare(KNullDesC)!=0)
+      {           
+      placePtr.Append(ptr);
+      placePtr.Append(KCommaSeparator);
+      }
+    //retrieve county
+    if(aLandmark.GetPositionField(EPositionFieldCounty,ptr)!=KErrNotFound && ptr.Compare(KNullDesC)!=0)
+      { 
+      placePtr.Append(KCommaSeparator);
+      placePtr.Append(ptr);
+      }
+    //retrieve country
+    if(aLandmark.GetPositionField(EPositionFieldCountry,ptr)!=KErrNotFound && ptr.Compare(KNullDesC)!=0)
+      {           
+      placePtr.Append(ptr);
+      placePtr.Append(KCommaSeparator);
+      }      
+       
+    // if address is not present, set place to timestamp
+    if( placePtr.Compare( KNullDesC ) != 0 )
+        {
+        TInt commaDesLen = KCommaSeparator().Length();
+        if(placePtr.Mid(placePtr.Length()-commaDesLen,commaDesLen).Compare(KCommaSeparator)==0)
+            placePtr.Delete(placePtr.Length()-commaDesLen, commaDesLen);
+        else
+            placePtr.Delete(placePtr.Length()-1,1); 
+        }
+    }
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventseditor/src/evtmgmtuiplacecomponent.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,1079 @@
+/*
+* 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:   'Set Place' component for retrieving place.
+*
+*/
+
+#include <evtmgmteditorui.rsg>
+#include <aknlistquerydialog.h>
+#include <StringLoader.h>
+#include <CLmkLandmarkSelectorDlg.h> 
+#include <TLmkItemIdDbCombiInfo.h> 
+#include <lbsposition.h>
+#include <aknnotewrappers.h>
+#include <aknmessagequerydialog.h>
+#include <AknIconArray.h>       // Icon Array
+#include <evteditor.mbg>
+#include <AknsUtils.h>
+#include <AknsSkinInstance.h>
+#include <data_caging_path_literals.hrh>
+#include <gulicon.h>            // Gul Icon
+#include <eikapp.h>
+#include <aknconsts.h>
+#include <textresolver.h>
+
+#include "evteditor.h"
+#include "evtmgmteditorui.hrh"
+#include "evtmgmtuiplacecomponent.h"
+#include "evtdebug.h"
+#include "evtmgmtuilocsettinglauncher.h"
+#include "evtmgmtuilocsettinglauncherobserver.h"
+#include "evteditorconsts.h"
+#include "evtmgmtuilbtadapter.h"
+
+// CONSTANTS
+const TInt KSetPlaceGranularity = 3;
+const TInt KMToKMConversion = 1000;
+_LIT( KFloatAccuracyFormat, "%.2f" );
+
+static TInt LinkClickedL(TAny* aPtr);
+
+static TInt LinkClickedL(TAny* aPtr)
+    {
+    CEvtMgmtUiPlaceComponent* self = static_cast<CEvtMgmtUiPlaceComponent*>(aPtr);
+    self->LaunchPositioningSettingsL();
+    return ETrue;
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiPlaceComponent ::NewLC()
+// ---------------------------------------------------------------------------
+//
+CEvtMgmtUiPlaceComponent* CEvtMgmtUiPlaceComponent::NewLC(const TPtrC aPrevPlace,  TCoordinate& aTriggerLocation )
+    {
+    CEvtMgmtUiPlaceComponent * self = new (ELeave) CEvtMgmtUiPlaceComponent( aTriggerLocation);
+    CleanupStack::PushL(self);
+    self->ConstructL(aPrevPlace);
+    return self;
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiPlaceComponent ::NewL()
+// ---------------------------------------------------------------------------
+//
+CEvtMgmtUiPlaceComponent* CEvtMgmtUiPlaceComponent::NewL(const TPtrC aPrevPlace,  TCoordinate& aTriggerLocation )
+    {
+    CEvtMgmtUiPlaceComponent * self = CEvtMgmtUiPlaceComponent::NewLC( aPrevPlace, aTriggerLocation );
+    CleanupStack::Pop(self);    
+    return self;
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiPlaceComponent ::CEvtMgmtUiPlaceComponent()
+// ---------------------------------------------------------------------------
+//
+CEvtMgmtUiPlaceComponent::CEvtMgmtUiPlaceComponent(  TCoordinate& aTriggerLocation ):iTriggerLocation(aTriggerLocation)
+    {   
+    iIsDlgOutstanding = EFalse;
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiPlaceComponent ::~CEvtMgmtUiPlaceComponent()
+// ---------------------------------------------------------------------------
+//
+CEvtMgmtUiPlaceComponent::~CEvtMgmtUiPlaceComponent()
+    {    
+    delete iPlace;
+    iPlace = NULL;
+    
+    if( iMapAdapter )
+        {
+        delete iMapAdapter;
+        iMapAdapter = NULL;
+        }    
+    
+    if( iLocationServiceAdapter )
+        {
+        delete iLocationServiceAdapter;
+        iLocationServiceAdapter = NULL;
+        }
+    
+    if( iWaitDialogLauncher )
+        {
+        delete iWaitDialogLauncher;
+        iWaitDialogLauncher = NULL;
+        }
+    
+    if(iPosSetLauncher)
+        {
+        delete iPosSetLauncher;
+        iPosSetLauncher = NULL;
+        }
+    
+    if( iIsDlgOutstanding )
+        {
+        TKeyEvent key;
+        key.iCode = EKeyEscape;
+        key.iModifiers = 0;
+        TRAP_IGNORE( CEikonEnv::Static()->SimulateKeyEventL(key, EEventKey)) ;
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiPlaceComponent ::ConstructL()
+// ---------------------------------------------------------------------------
+//
+void CEvtMgmtUiPlaceComponent ::ConstructL(const TPtrC aPrevPlace)
+    {
+    iPlace = aPrevPlace.AllocL();
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiPlaceComponent::DisplayPlacePopupDlg()
+// It is used as a wrapper class to trap leaving function DisplayPlacePopupDlgL()
+// @param[in] aStatus - status which will contain success/failure state
+//                       based on retrieval of location is successful or failed
+// ---------------------------------------------------------------------------
+//
+void CEvtMgmtUiPlaceComponent::DisplayPlacePopupDlg( TRequestStatus& aStatus )
+    {
+    EVTUIDEBUG("+ CEvtMgmtUiPlaceComponent::DisplayPlacePopupDlg()" );
+    iStatus = &aStatus;
+    TInt response(0);
+    
+    // show 'set place' popup dialog and retrieve location information
+    TRAPD( err, response = DisplayPlacePopupDlgL() );
+    
+    if( err != KErrNone )// if the request is failed
+        {
+        iIsDlgOutstanding = EFalse;
+		//TRAP_IGNORE( ResolveErrorL( err ) );
+        User::RequestComplete( iStatus, err );
+        }
+    else 
+        {
+        //if from landmark, complete the request otherwise wait till asychronous 
+        //operation is completed
+        if( response == EEvtMgmtUiSetPlaceLandmark ) 
+            {
+            if( iStatus )
+                User::RequestComplete( iStatus, KErrNone );
+            }
+        
+        //if dialog is cancelled
+        if( response == KErrCancel ) 
+            {
+            if( iStatus )
+                User::RequestComplete( iStatus, KErrCancel );
+            }
+        }
+    EVTUIDEBUG("- CEvtMgmtUiPlaceComponent::DisplayPlacePopupDlg()" );
+    }
+
+// -----------------------------------------------------------------------------
+// CEvtMgmtUiPlaceComponent::Place()
+// returns place value
+// -----------------------------------------------------------------------------
+
+TPtrC CEvtMgmtUiPlaceComponent::Place() const
+    {
+    if(iPlace)
+        return *iPlace;
+    else
+        return KNullDesC();
+    }
+
+// -----------------------------------------------------------------------------
+// CEvtMgmtUiPlaceComponent::TriggerLocation()
+// returns location recentrly retrieved
+// -----------------------------------------------------------------------------
+
+TCoordinate& CEvtMgmtUiPlaceComponent::TriggerLocation() const
+    {
+    return iTriggerLocation;
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiPlaceComponent::HandleMapAndNavigationResonseL()
+// Derived from MEvtMgmtUiMapAndNavigationObserver
+// ---------------------------------------------------------------------------
+//
+void CEvtMgmtUiPlaceComponent::HandleMapAndNavigationResponseL( TInt aErrorCode, const TPtrC aPlace, TCoordinate aTriggerLocation )
+    {
+    EVTUIDEBUG("+ CEvtMgmtUiPlaceComponent::HandleMapAndNavigationResponseL()" );
+    if( aErrorCode == KErrNone )
+        {
+        //if successful , set place and location to those retrieved from map
+        if(aPlace.Length())
+            {
+            delete iPlace;
+            iPlace = NULL;
+            iPlace = aPlace.AllocL();     
+            }
+        
+        // Get Place
+        aErrorCode = GetPlaceL();
+        
+        iTriggerLocation = aTriggerLocation;
+        }
+   
+    // complete 'set place' operation selected from map
+    if(iStatus)
+        User::RequestComplete( iStatus, aErrorCode );
+    EVTUIDEBUG("- CEvtMgmtUiPlaceComponent::HandleMapAndNavigationResponseL()" );
+    }
+
+
+//---------------------------------------------------------------------------
+// CEvtMgmtUiPlaceComponent::HandleLocationServiceResponseL()
+// Derived from MEvtMgmtUiLocationServiceObserver
+// ---------------------------------------------------------------------------
+//
+void CEvtMgmtUiPlaceComponent::HandleLocationServiceResponseL( const TInt aStatus )
+    {    
+    EVTUIDEBUG1("+ CEvtMgmtUiPlaceComponent::HandleLocationServiceResponseL() - %d", aStatus );
+    TInt err = aStatus;
+    // Stop the running wait dialog
+    TInt buttonId = iWaitDialogLauncher->StopWaitDialogL();
+    
+    if( EEikBidCancel != buttonId ) // if busy dialog is not cancelled
+        {
+        switch( aStatus )
+            {
+            case KErrNone:
+            case KPositionPartialUpdate:
+                {    
+                if(iLocationServiceAdapter)    
+                    {
+                    EVTUIDEBUG("========== Retrieving current location ========" );
+                    
+                    //Set location
+                    iTriggerLocation = iLocationServiceAdapter->CurrentPosition();    
+                    TPosition pos = iLocationServiceAdapter->CurrentPosition();
+
+                    if ( !Math::IsNaN( pos.HorizontalAccuracy() ) )
+                        DisplayAccuracyNoteL(pos);
+                    else
+                        DisplayAccuracyNoteL();
+                    
+                    // Get Place
+                    err = GetPlaceL();
+                    }         
+                EVTUIDEBUG("========== Retrieved current location ========" );
+                break;
+                }
+            default:
+                {
+                break;
+                }
+            }
+        // complete 'set place' operation selected from current location
+        if( iStatus  )
+            User::RequestComplete( iStatus, err );
+        }
+    else
+        {
+        TRAP( err, DisplayErrorNoteL( R_EVTUI_CANCEL_REQUESTING_LOCATION ) );       
+        EVTUIDEBUG1("Erro while displaying error note =%d", err );
+        
+        // complete 'set place' operation selected from current location
+        if( iStatus  )
+            User::RequestComplete( iStatus, KErrCancel );
+        }
+    
+    //Delete LocAcq object
+    if( iLocationServiceAdapter )
+         {
+         delete iLocationServiceAdapter;
+         iLocationServiceAdapter = NULL;
+         }     
+    EVTUIDEBUG("- CEvtMgmtUiPlaceComponent::HandleLocationServiceResponseL()");
+    }
+
+//---------------------------------------------------------------------------
+// CEvtMgmtUiPlaceComponent::HandleLocationServiceErrorL()
+// Derived from MEvtMgmtUiLocationServiceObserver
+// ---------------------------------------------------------------------------
+//
+void CEvtMgmtUiPlaceComponent::HandleLocationServiceErrorL( TInt aErrorCode )
+    {
+    EVTUIDEBUG1("+ CEvtMgmtUiPlaceComponent::HandleLocationServiceErrorL - %d", aErrorCode );
+    
+    //Error handling   
+    switch( aErrorCode )
+        {
+        case KErrNotFound: //if no psy selected
+            {
+		    //Delete wait dialog
+		    if( iWaitDialogLauncher )
+		        iWaitDialogLauncher->StopWaitDialogL();
+		        
+            if( DisplayNoPositioningMethodInfoNoteL( R_EVTUI_MESSAGE_QUERY ) ) //if Open is pressed
+                {
+                return;
+                }            
+            break;
+            }
+        case KErrCancel:
+            {                        
+            //Delete wait dialog
+            if( iWaitDialogLauncher )
+                iWaitDialogLauncher->StopWaitDialogL();
+            
+            TRAPD( err, DisplayErrorNoteL( R_EVTUI_CANCEL_REQUESTING_LOCATION ) );       
+            EVTUIDEBUG1("Erro while displaying error note =%d", err );
+            
+            break;
+            }
+        case KErrTimedOut:
+        default:
+            {
+		    //Delete wait dialog
+		    if( iWaitDialogLauncher )
+		        iWaitDialogLauncher->StopWaitDialogL();
+		        
+            //disply retry message
+            CAknErrorNote* errNote = new(ELeave) CAknErrorNote( ETrue );
+            TBuf<128> msg;
+            CEikonEnv::Static()->ReadResourceAsDes16L(msg, R_EVTUI_RETRY_REQUESTING_LOCATION );        
+            errNote->ExecuteLD( msg );
+            
+            break;
+            }
+        }
+    
+    //delete LocAcq object
+    if( iLocationServiceAdapter )
+        {
+        delete iLocationServiceAdapter;
+        iLocationServiceAdapter = NULL;
+        }
+    
+    // Complete 'set place' operation selected from current location with failure
+    User::RequestComplete( iStatus, KErrCancel );
+    
+    EVTUIDEBUG("- CEvtMgmtUiPlaceComponent::HandleLocationServiceErrorL()");
+    }
+
+//---------------------------------------------------------------------------
+// CEvtMgmtUiPlaceComponent::HandleDialogDismissed()
+// Derived from MEvtMgmtUiWaitDialogLauncherObserver
+// ---------------------------------------------------------------------------
+//
+void CEvtMgmtUiPlaceComponent::HandleDialogDismissed( TInt aButtonId )
+    {
+    EVTUIDEBUG("+ CEvtMgmtUiPlaceComponent::HandleDialogDismissed()");
+    if( EEikBidCancel == aButtonId && iLocationServiceAdapter &&
+            iLocationServiceAdapter->IsActive() )
+        {
+        EVTUIDEBUG("wait dialog is dismissed manually" );
+        
+        //Cancel Outstanding Request
+        iLocationServiceAdapter->CancelRequest();
+        }
+    EVTUIDEBUG("- CEvtMgmtUiPlaceComponent::HandleDialogDismissed()");
+    }
+
+//---------------------------------------------------------------------------
+// CEvtMgmtUiPlaceComponent::NotifyLocSettingLaucherChangeL()
+// Derived from MEvtMgmtUiLocSettingsLauncherObserver
+// ---------------------------------------------------------------------------
+//
+void CEvtMgmtUiPlaceComponent::NotifyLocSettingLaucherChangeL( TInt /*aErrorCode*/ )
+    {
+    // Nothing to do.
+    }
+
+// ---------------------------------------------------------------------------
+// void CEvtMgmtUiPlaceComponent::DisplayErrorNoteL()
+// It is used to display error note.
+// @param[in] aResourceId - resource ID of the text to be displayed on error note.
+// ---------------------------------------------------------------------------
+//
+void CEvtMgmtUiPlaceComponent::DisplayErrorNoteL(TInt aResourceId )
+    { 
+    EVTUIDEBUG("+ CEvtMgmtUiPlaceComponent::DisplayErrorNoteL" );
+    CAknErrorNote* errNote = new(ELeave) CAknErrorNote( ETrue );
+    TBuf<32> msg;
+    CEikonEnv::Static()->ReadResourceAsDes16L(msg, aResourceId );
+    iIsDlgOutstanding = ETrue;
+    errNote->ExecuteLD( msg );
+    iIsDlgOutstanding = EFalse;
+    EVTUIDEBUG("- CEvtMgmtUiPlaceComponent::DisplayErrorNoteL" );
+    }
+
+// ---------------------------------------------------------------------------
+// TInt CEvtMgmtUiPlaceComponent::GetPlaceL()
+// Displays the Query dialog for getting place.
+// ---------------------------------------------------------------------------
+//
+TInt CEvtMgmtUiPlaceComponent::GetPlaceL()
+    {
+    EVTUIDEBUG("+ CEvtMgmtUiPlaceComponent::GetPlaceL()");
+    
+    HBufC* place = HBufC::NewLC( KPlaceMaxLength );
+    place->Des().Copy( *iPlace );
+    TPtr placePtr(place->Des());
+    TInt ret = KErrCancel;
+
+    HBufC* prompt = StringLoader::LoadLC(R_LOCEV_NOTE_PROMPT_TEXT);
+    
+    CAknTextQueryDialog* dlg = new(ELeave) CAknTextQueryDialog( placePtr ,*prompt, CAknQueryDialog::ENoTone );
+    if( EEikBidOk == dlg->ExecuteLD( R_EVTUI_PLACE_DATA_QUERY ))
+        {
+        delete iPlace;
+        iPlace = NULL;
+        iPlace = place->AllocL();
+        ret = KErrNone;
+        }
+    
+    CleanupStack::PopAndDestroy(2); // prompt, place
+    EVTUIDEBUG("- CEvtMgmtUiPlaceComponent::GetPlaceL()");
+    return ret;
+    }
+
+// ---------------------------------------------------------------------------
+// TInt CEvtMgmtUiPlaceComponent::LaunchPositioningSettingsL()
+// It is used to launch position settings
+// ---------------------------------------------------------------------------
+//
+void CEvtMgmtUiPlaceComponent::LaunchPositioningSettingsL()
+    {
+    EVTUIDEBUG("+ CEvtMgmtUiPlaceComponent::LaunchPositioningSettingsL()");
+    if(!iPosSetLauncher)
+          {
+          iPosSetLauncher = CEvtMgmtUiLocSettingsLauncher::NewL();                
+          }
+    iPosSetLauncher->SetObserver(this);
+    iPosSetLauncher->LaunchL();
+    EVTUIDEBUG("- CEvtMgmtUiPlaceComponent::LaunchPositioningSettingsL()");
+    }
+
+// -----------------------------------------------------------------------------
+// CEvtMgmtUiPlaceComponent::DisplayPlacePopupDlgL()
+// It is used to display 'set place' popup dialog and retrieve place 
+// using selected method.
+// @ret it returns the option selected.
+//      it leaves with KErrCancel, if popup dialog is cancelled.
+//      it may leave with other errors, if retrieval of place fails.     
+// -----------------------------------------------------------------------------
+//
+TInt CEvtMgmtUiPlaceComponent::DisplayPlacePopupDlgL()
+    {
+    EVTUIDEBUG("+ CEvtMgmtUiPlaceComponent::DisplayPlacePopupDlgL()");
+    TInt index;
+    const TInt KCpIconIndex = 0;
+    const TInt KLmkIconIndex = 1;
+    const TInt KMapIconIndex = 2;
+    const TInt KIconTextLength = 1;
+    _LIT(KTab, "\t");  
+    HBufC* dummy = NULL;
+    
+    // Retrieve number of landmarks stored in landmark database.
+    TInt lmks = LandmarksL();
+   
+    //Retrive strings for popup dialog.
+   
+    //Current Location
+    dummy = StringLoader::LoadLC(R_EVTUI_CREATENEW_FORM_PLACEPOPUPOPTION_CURRENTPLACE);
+    HBufC* cp = HBufC::NewL( KIconTextLength + KTab().Length() + 
+                        dummy->Length() + KTab().Length( )+ KTab().Length() );    
+    TPtr ptrDummy = cp->Des();    
+    ptrDummy.Num(KCpIconIndex);
+    ptrDummy.Append(KTab);
+    ptrDummy.Append(*dummy);
+    ptrDummy.Append(KTab);
+    ptrDummy.Append(KTab);
+    CleanupStack::PopAndDestroy(dummy);
+    CleanupStack::PushL(cp);
+    
+    //Landmark
+    dummy   = StringLoader::LoadLC(R_EVTUI_CREATENEW_FORM_PLACEPOPUPOPTION_LANDMARK);
+    HBufC* lmk = HBufC::NewL( KIconTextLength + KTab().Length() + 
+                           dummy->Length() + KTab().Length( )+ KTab().Length() );
+    ptrDummy.Set(lmk->Des());
+    ptrDummy.Num(KLmkIconIndex);
+    ptrDummy.Append(KTab);
+    ptrDummy.Append(*dummy);
+    ptrDummy.Append(KTab);
+    ptrDummy.Append(KTab);
+    CleanupStack::PopAndDestroy(dummy);
+    CleanupStack::PushL(lmk);
+   
+    //Map
+    dummy   = StringLoader::LoadLC(R_EVTUI_CREATENEW_FORM_PLACEPOPUPOPTION_FROMMAP);
+    HBufC* map = HBufC::NewL( KIconTextLength + KTab().Length() + 
+                           dummy->Length() + KTab().Length( )+ KTab().Length() );    
+    ptrDummy.Set(map->Des());
+    ptrDummy.Num(KMapIconIndex);
+    ptrDummy.Append(KTab);
+    ptrDummy.Append(*dummy);
+    ptrDummy.Append(KTab);
+    ptrDummy.Append(KTab);
+    CleanupStack::PopAndDestroy(dummy);
+    CleanupStack::PushL(map);
+               
+    HBufC* title = StringLoader::LoadLC(R_EVTUI_CREATENEW_FORM_PLACEPOPUP_TITLE);
+               
+    //Create array 
+    CDesCArrayFlat* array = new(ELeave)CDesCArrayFlat( KSetPlaceGranularity );
+    CleanupStack::PushL(array);
+    
+    //Add current location
+    array->AppendL(*cp);
+    
+    //if landmarks are present, then add 'Landmark'
+    if( lmks )
+        array->AppendL(*lmk);
+   
+    //Create map object to retrieve place from maps
+    if( iMapAdapter )
+        {
+        delete iMapAdapter;
+        iMapAdapter = NULL;
+        }
+    iMapAdapter = CEvtMgmtUiMapNavigationAdapter::NewL();
+    iMapAdapter->SetPlaceL( *iPlace );
+    iMapAdapter->SetLocation( iTriggerLocation );
+    iMapAdapter->SetObserver( this );
+    
+    //if map service providers are present, then add 'From map'     
+    if(iMapAdapter->MapServiceProvidersL())          
+        array->AppendL(*map);
+    else //if map service provider is not present, delete map object
+        {
+        delete iMapAdapter;
+        iMapAdapter = NULL;
+        }
+     
+    //popup dialog
+   CAknListQueryDialog* dlg = new( ELeave ) CAknListQueryDialog( &index );
+   dlg->PrepareLC(R_EVTMGMTUI_LIST_QUERY);
+   UpdateIconsL( *dlg );
+   dlg->SetItemTextArray(array );
+   dlg->SetOwnershipType(ELbmOwnsItemArray);  
+   dlg->QueryHeading()->SetTextL(*title);    
+      
+   iIsDlgOutstanding = ETrue;
+    if ( dlg->RunLD() ) //if item is selected
+        {  
+        iIsDlgOutstanding = EFalse;
+       CleanupStack::Pop();// pop up array since ownership is handed to dlg
+       CleanupStack::PopAndDestroy(4) ;//title, map, lmk, cp   
+       switch(index)
+           {
+           case EEvtMgmtUiSetPlaceCurrentPlace: //if current place is selected
+               {  
+    			EVTUIDEBUG("= Set Current place");              
+               PlaceFromCurrentLocationL();                
+               break;
+               }
+           case EEvtMgmtUiSetPlaceLandmark:
+               {
+               if(lmks) //if landmarks are present, 'Landmark' is pressed
+                   {
+    				EVTUIDEBUG("= Set Landmark place");   
+                   PlaceFromLandmarkL();
+                   break;
+                   }
+               //else 'From map' is pressed, hence request place from map
+               //break; ....intentionally commented
+               }            
+           case EEvtMgmtUiSetPlaceFromMap:
+               {
+    			EVTUIDEBUG("= Set Map place");   
+               index = EEvtMgmtUiSetPlaceFromMap;
+               iMapAdapter->PlaceFromMapL();          
+               break;
+               }
+           default:
+               {
+               break;
+               }
+           }
+       return index;
+       }  
+    else
+        {
+        iIsDlgOutstanding = EFalse;
+        CleanupStack::Pop();// pop up array since ownership is handed to dlg
+        CleanupStack::PopAndDestroy(4) ;//title, map, lmk, cp
+        return KErrCancel;
+        }    
+     }
+
+// -----------------------------------------------------------------------------
+// CEvtMgmtUiPlaceComponent::PlaceFromLandmarkL()
+// It retrieves place and location details from landmark     
+// -----------------------------------------------------------------------------
+//
+void CEvtMgmtUiPlaceComponent::PlaceFromLandmarkL()
+    {
+    EVTUIDEBUG("+ CEvtMgmtUiPlaceComponent::PlaceFromLandmarkL()");
+    _LIT(KCommaSeparator,", ");
+    TLmkItemIdDbCombiInfo lmkInfo;
+    CLmkLandmarkSelectorDlg* dlg =  CLmkLandmarkSelectorDlg::NewL();
+    iIsDlgOutstanding = ETrue;
+    if(dlg->ExecuteLD(lmkInfo))
+        {
+        iIsDlgOutstanding = EFalse;
+        CPosLandmarkDatabase* lmkDb = lmkInfo.GetLmDb();
+        CleanupStack::PushL(lmkDb);
+        CPosLandmark* lmk = lmkDb->ReadLandmarkLC( lmkInfo.GetItemId() );
+        
+        //retrieve lat long info
+        TLocality locality;
+        lmk->GetPosition( locality );
+        if(Math::IsNaN( locality.Latitude() ) || Math::IsNaN( locality.Longitude() ) )
+            {
+            CAknErrorNote* errNote = new(ELeave) CAknErrorNote( ETrue );
+            TBuf<128> msg; 
+            CEikonEnv::Static()->ReadResourceAsDes16L(msg, R_EVTUI_LANDMARK_LOCMISS_ERROR );        
+            errNote->ExecuteLD( msg );
+            CleanupStack::PopAndDestroy(2);//lmk,lmkDb
+            iIsDlgOutstanding = EFalse;          
+            User::Leave(KErrCancel);
+            }
+        iTriggerLocation = locality;
+        
+        //retrive position description
+        delete iPlace;
+        iPlace = NULL;
+        iPlace = HBufC::NewL(KPlaceMaxLength);       
+        TPtr placePtr = iPlace->Des();
+        
+        TPtrC ptr(KNullDesC);
+        
+        if(lmk->GetLandmarkName(ptr)!=KErrNotFound)
+            {                      
+            placePtr.Copy(ptr);           
+            placePtr.Append(_L(" "));            
+            }
+        if(lmk->GetPositionField(EPositionFieldStreet,ptr)!=KErrNotFound && ptr.Compare(KNullDesC)!=0)
+            {           
+            placePtr.Append(ptr);
+            placePtr.Append(KCommaSeparator);
+            }
+        if(lmk->GetPositionField(EPositionFieldCity,ptr)!=KErrNotFound && ptr.Compare(KNullDesC)!=0)
+           { 
+           placePtr.Append(ptr);
+           placePtr.Append(KCommaSeparator);
+           }    
+        if(lmk->GetPositionField(EPositionFieldState,ptr)!=KErrNotFound && ptr.Compare(KNullDesC)!=0)
+           {           
+           placePtr.Append(ptr);
+           placePtr.Append(KCommaSeparator);
+           }
+        if(lmk->GetPositionField(EPositionFieldCounty,ptr)!=KErrNotFound && ptr.Compare(KNullDesC)!=0)
+           { 
+           placePtr.Append(KCommaSeparator);
+           placePtr.Append(ptr);
+           }
+        if(lmk->GetPositionField(EPositionFieldCountry,ptr)!=KErrNotFound && ptr.Compare(KNullDesC)!=0)
+           {           
+           placePtr.Append(ptr);
+           placePtr.Append(KCommaSeparator);
+           }
+        TInt commaDesLen = KCommaSeparator().Length();
+        if(placePtr.Mid(placePtr.Length()-commaDesLen,commaDesLen).Compare(KCommaSeparator)==0)
+            placePtr.Delete(placePtr.Length()-commaDesLen, commaDesLen);
+        else
+            placePtr.Delete(placePtr.Length()-1,1);
+        
+        //iEvent.SetPlaceL(*place);
+        CleanupStack::PopAndDestroy(2);//lmk,lmkDb
+        }
+    else
+        {
+        iIsDlgOutstanding = EFalse;
+        if( iStatus )
+           User::RequestComplete( iStatus, KErrCancel );
+        }
+    EVTUIDEBUG("- CEvtMgmtUiPlaceComponent::PlaceFromLandmarkL()");
+    }
+
+// -----------------------------------------------------------------------------
+// CEvtMgmtUiPlaceComponent::LandmarksL()
+// It returns total number of landmarks stored.
+// If there is any error in retrieving details, it will return zero landmark.
+// -----------------------------------------------------------------------------
+//
+TInt CEvtMgmtUiPlaceComponent::LandmarksL()
+    {  
+    EVTUIDEBUG("+ CEvtMgmtUiPlaceComponent::LandmarksL()" );  
+    TInt lmks = 0;
+    
+    CPosLandmarkDatabase* lmkDb;
+	lmkDb = CPosLandmarkDatabase::OpenL();			
+	CleanupStack::PushL(lmkDb);
+	// Initialize Landmarks data base if required			
+	CPosLmOperation* operation = lmkDb->InitializeL();
+	CleanupStack::PushL(operation);			
+	operation->ExecuteL();
+	CPosLmItemIterator* iterator = lmkDb->LandmarkIteratorL();
+	CleanupStack::PushL(iterator);
+	lmks = iterator->NumOfItemsL();
+    CleanupStack::PopAndDestroy(3); //lmkDb, iterator and operation    
+
+    EVTUIDEBUG1("Number of Landmarks = %d", lmks );
+    
+    EVTUIDEBUG("- CEvtMgmtUiPlaceComponent::LandmarksL()" );
+    return lmks;   
+    }
+
+// -----------------------------------------------------------------------------
+// CEvtMgmtUiPlaceComponent::PlaceFromCurrentLocationL()
+// It initiates set place request from current location.
+// If there is no positioning method enabled, it will leave with KErrCancel.
+// Otherwise it will request current location and will launch busy dialog
+// -----------------------------------------------------------------------------
+//
+void CEvtMgmtUiPlaceComponent::PlaceFromCurrentLocationL()
+    {
+    EVTUIDEBUG("+ CEvtMgmtUiPlaceComponent::PlaceFromCurrentLocationL()" );
+    // Delete any previously created LocAcq object.
+    if( !iLocationServiceAdapter )
+     {     
+     //Create new LocAcq object
+     iLocationServiceAdapter = CEvtMgmtUiLocationServiceAdapter::NewL( *this );
+     }
+   
+    EVTUIDEBUG("Before iLocationServiceAdapter->LocationRequestL" );
+    iLocationServiceAdapter->LocationRequestL();
+    EVTUIDEBUG("After iLocationServiceAdapter->LocationRequestL" );
+    
+    if( iWaitDialogLauncher )
+        {
+        EVTUIDEBUG("Deleting iWaitDialogLauncher..." );
+        delete iWaitDialogLauncher;
+        iWaitDialogLauncher = NULL;
+        }
+    
+    // Create the wait dialog launcher
+    iWaitDialogLauncher = CEvtMgmtUiWaitDialogLauncher::NewL(); 
+    iWaitDialogLauncher->SetObserver(this);
+    iWaitDialogLauncher->SetTextL( R_EVTUI_WAIT_REQUESTING_LOCATION );
+    
+    EVTUIDEBUG("Before iWaitDialogLauncher->StartWaitDialogL" );
+    //Start busy wait dialog while requesting current location
+    TRAPD( error, iWaitDialogLauncher->StartWaitDialogL());
+    EVTUIDEBUG1("After iWaitDialogLauncher->StartWaitDialogL - %d", error );
+    
+    //if error while displaying dialog, delete LocAcq object and leave
+    if( error )
+        {
+        delete iLocationServiceAdapter;
+        iLocationServiceAdapter = NULL;
+        
+        User::Leave( error );
+        } 
+    EVTUIDEBUG("- CEvtMgmtUiPlaceComponent::PlaceFromCurrentLocationL()" );
+    }
+
+// -----------------------------------------------------------------------------
+// CEvtMgmtUiPlaceComponent::DisplayNoPositioningMethodInfoNoteL()
+// It displays message query if there is no positioning method enabled.
+// @param aResourceId - resource id of the wait dialog to be displayed.
+// @ret If pressed Open, it will return true.
+//      If pressed Close, it will return false.
+// -----------------------------------------------------------------------------
+//
+TBool CEvtMgmtUiPlaceComponent::DisplayNoPositioningMethodInfoNoteL( TInt aResourceId )
+    {
+    EVTUIDEBUG("+ CEvtMgmtUiPlaceComponent::DisplayNoPositioningMethodInfoNoteL()");
+    TBool response = EFalse;
+    
+    //all strings 
+     HBufC* errMsg = StringLoader::LoadLC( R_EVTUI_POSITIONINGERROR, CCoeEnv::Static() );
+     HBufC* errMsgLink = StringLoader::LoadLC( R_EVTUI_POSITIONINGERROR_LINK, CCoeEnv::Static() );
+     HBufC* errMsgTitle = StringLoader::LoadLC( R_EVTUI_POSITIONINGERROR_HEADER, CCoeEnv::Static() );
+     HBufC* errCompleteMsg = HBufC::NewLC( errMsg->Length() + KNewLine().Length() + errMsgLink->Length() );
+     errCompleteMsg->Des().Copy(*errMsg);
+     errCompleteMsg->Des().Append(KNewLine);
+     errCompleteMsg->Des().Append(*errMsgLink);
+     
+     //Launch dialog     
+     CAknMessageQueryDialog* dlg = CAknMessageQueryDialog::NewL(*errCompleteMsg);
+     dlg->PrepareLC( aResourceId );
+     dlg->SetLinkTextL(*errMsgLink);
+     TCallBack callBack = TCallBack(LinkClickedL, this);
+     dlg->SetLink( callBack );
+     dlg->QueryHeading()->SetTextL( *errMsgTitle );
+     if( dlg->RunLD() ==  EAknSoftkeyOk )
+         {
+         CleanupStack::PopAndDestroy(4); //errMsgTitle, errMsg, errMsgLink, errCompleteMsg
+         
+         if( ! iLocationServiceAdapter->AllPositionMethodsDisabledL() ) //if atleast one psy is enabled
+             {
+             response = ETrue;
+             //request current location
+             PlaceFromCurrentLocationL();
+             }
+         else
+             response = EFalse;
+         }
+     else
+         {
+         response = EFalse;
+         CleanupStack::PopAndDestroy(4); //errMsgTitle, errMsg, errMsgLink, errCompleteMsg
+         }
+    EVTUIDEBUG("- CEvtMgmtUiPlaceComponent::DisplayNoPositioningMethodInfoNoteL()");
+     return response;
+    }
+
+// -----------------------------------------------------------------------------
+// CEvtMgmtUiPlaceComponent::UpdateIconsL
+// It update icons
+// -----------------------------------------------------------------------------
+void CEvtMgmtUiPlaceComponent::UpdateIconsL( CAknListQueryDialog& aDialog )
+    {
+    EVTUIDEBUG("+ CEvtMgmtUiPlaceComponent::UpdateIconsL()" );
+    
+    CAknIconArray* icons = new( ELeave ) CAknIconArray( KSetPlaceGranularity );
+    CleanupStack::PushL( icons );
+
+    TFileName *iconFile = IconFileNameLC();
+
+    AddIconL( *icons, 
+              *iconFile,
+              KAknsIIDQgnPropLocevCurrentLocation, 
+              EMbmEvteditorQgn_prop_locev_current_location, EMbmEvteditorQgn_prop_locev_current_location_mask);
+             
+    AddIconL( *icons, 
+              *iconFile,
+              KAknsIIDQgnPropLocevLandmark, 
+              EMbmEvteditorQgn_prop_locev_landmark, EMbmEvteditorQgn_prop_locev_landmark_mask);
+       
+    AddIconL( *icons, 
+              *iconFile,
+              KAknsIIDQgnPropLocevMap, 
+              EMbmEvteditorQgn_prop_locev_map, EMbmEvteditorQgn_prop_locev_map_mask);
+
+    CleanupStack::PopAndDestroy(iconFile);
+
+    //set new icons to array
+    aDialog.SetIconArrayL( icons );  
+    CleanupStack::Pop(icons);
+    
+    EVTUIDEBUG("- CEvtMgmtUiPlaceComponent::UpdateIconsL()" );
+        
+    }
+    
+// -----------------------------------------------------------------------------
+// CEvtMgmtUiPlaceComponent::AddIconL
+// Append icon to icon array. CAknIconArray owns icons so it is 
+// easier to it leave safely.
+// @param aIcons icon array
+// @param aIconFileWithPath icon file name with path
+// @param aSkinID skin id of the icon
+// @param aIconGraphicsIndex picture index
+// @param aIconGraphicsMaskIndex mask index
+// -----------------------------------------------------------------------------
+void CEvtMgmtUiPlaceComponent::AddIconL( CAknIconArray&  aIcons,
+                                           const TDesC&    aIconFileWithPath,
+                                           TAknsItemID     aSkinID,
+                                           TInt            aIconGraphicsIndex,
+                                           TInt            aIconGraphicsMaskIndex )
+    {
+    MAknsSkinInstance* skin = AknsUtils::SkinInstance();
+
+    EVTUIDEBUG( "AknsUtils::SkinInstance" );
+    
+    CFbsBitmap* bitmap = NULL;
+    CFbsBitmap* bitmapMask = NULL;
+    TRAPD( err, AknsUtils::CreateIconL( skin,
+                            aSkinID,
+                            bitmap,
+                            bitmapMask,
+                            aIconFileWithPath,
+                            aIconGraphicsIndex,
+                            aIconGraphicsMaskIndex ) );
+
+	
+    EVTUIDEBUG1( "AknsUtils::CreateIconL - %d", err );
+    if(err != KErrNone)
+	    {
+	    TRAP( err, AknIconUtils::CreateIconL( bitmap,
+	                            bitmapMask,
+	                            aIconFileWithPath,
+	                            aIconGraphicsIndex,
+	                            aIconGraphicsMaskIndex ) );
+    	EVTUIDEBUG1( "AknIconUtils::CreateIconL - %d", err );
+	    }
+    User::LeaveIfError( err );
+    
+    CleanupStack::PushL( bitmap );
+    CleanupStack::PushL( bitmapMask );
+    
+    CGulIcon* icon = CGulIcon::NewL( bitmap, bitmapMask );
+    
+    // Remove the Bitmap and the Bitmap Icon from the Clean up stack since 
+    // the ownership is taken over by the icon
+    CleanupStack::Pop( bitmapMask );
+    CleanupStack::Pop( bitmap ); 
+    
+    CleanupStack::PushL( icon );
+    aIcons.AppendL( icon );
+    CleanupStack::Pop( icon ); // icon
+    }
+
+// -----------------------------------------------------------------------------
+// CEvtMgmtUiPlaceComponent::IconFileNameLC
+// Gets Events Management UI icon file path and name. Ownership
+// is transferred, item is left in the cleanup stack.
+// @return TFileName* The full name of the Events UI icon file.
+// -----------------------------------------------------------------------------
+TFileName* CEvtMgmtUiPlaceComponent::IconFileNameLC() const
+    {
+    TFileName* fileName = new(ELeave) TFileName;
+    CleanupStack::PushL( fileName );
+    
+    TFileName* tmpName = new(ELeave) TFileName;
+    CleanupStack::PushL( tmpName );
+    
+    tmpName->Append( KDC_BITMAP_DIR );
+    tmpName->Append( KEvtMgmtUiIconFileName );
+
+    CEikAppUi *appUi = ( CEikAppUi *)( CEikonEnv::Static()->AppUi());
+    TFileName appDrive = appUi->Application()->AppFullName();
+    
+    TParse parse;
+    User::LeaveIfError( parse.Set( appDrive, NULL, NULL ) );
+    User::LeaveIfError( parse.Set( parse.Drive(), tmpName, NULL ) );
+    
+    fileName->Copy(parse.FullName());
+
+    CleanupStack::PopAndDestroy( tmpName );
+
+    return fileName;
+    }    
+
+// ---------------------------------------------------------
+// CEvtMgmtUiPlaceComponent::DisplayAccuracyNoteL
+// It is used to display accuracy note
+// ---------------------------------------------------------
+//
+void CEvtMgmtUiPlaceComponent::DisplayAccuracyNoteL()
+    {
+    EVTUIDEBUG("+ CEvtMgmtUiPlaceComponent::DisplayAccuracyNoteL() - Unknown" );
+    HBufC* infoMsg = StringLoader::LoadLC(R_LOCEV_NOTE_LIST_ACC_UNKNOWN, CEikonEnv::Static());
+    CAknInformationNote* infoNote = new(ELeave) CAknInformationNote( ETrue );
+    infoNote->ExecuteLD( *infoMsg  );
+    CleanupStack::PopAndDestroy(); //infoMsg  
+    EVTUIDEBUG("- CEvtMgmtUiPlaceComponent::DisplayAccuracyNoteL()" );
+    }
+
+// ---------------------------------------------------------
+// CEvtMgmtUiPlaceComponent::DisplayAccuracyNoteL
+// It is used to display accuracy note
+// ---------------------------------------------------------
+//
+void CEvtMgmtUiPlaceComponent::DisplayAccuracyNoteL(TPosition& aPos)
+    {
+    EVTUIDEBUG("+ CEvtMgmtUiPlaceComponent::DisplayAccuracyNoteL() - TPosition" );
+    _LIT(KNewLine, "\n");
+    HBufC* acclevel = NULL;
+    HBufC* accString = NULL;
+    
+    // Calculate the Accuracy Level
+    TReal accuracy = aPos.HorizontalAccuracy();
+    EVTUIDEBUG1("Horizontal Accuracy = %f", accuracy );
+    
+    if(accuracy < KLowAccuracyMaxLimit )
+        acclevel = StringLoader::LoadLC(R_EVTUI_ACCURACYLEVEL_HIGH );
+    if(accuracy >=KLowAccuracyMaxLimit && accuracy <= KMediumAccuracyMaxLimit )
+        acclevel = StringLoader::LoadLC(R_EVTUI_ACCURACYLEVEL_MEDIUM );
+    if(accuracy > KMediumAccuracyMaxLimit )
+        acclevel = StringLoader::LoadLC( R_EVTUI_ACCURACYLEVEL_LOW );
+               
+    // Get the Accuracy String   
+    GetAccuracyStringL( accuracy, accString );
+    CleanupStack::PushL( accString );
+    
+    HBufC* infoMsg = HBufC::NewLC( acclevel->Length() + KNewLine().Length() + accString->Length() );
+    TPtr ptrMsg = infoMsg->Des();
+    ptrMsg.Copy( *acclevel );
+    ptrMsg.Append( KNewLine );
+    ptrMsg.Append( *accString );
+    CAknInformationNote* infoNote = new(ELeave) CAknInformationNote( ETrue );
+    infoNote->ExecuteLD( *infoMsg  );
+    CleanupStack::PopAndDestroy(3); //infoMsg, accString, acclevel  
+    EVTUIDEBUG("- CEvtMgmtUiPlaceComponent::DisplayAccuracyNoteL()" );
+    }
+
+
+// ---------------------------------------------------------
+// CEvtMgmtUiPlaceComponent::ResolveErrorL
+// Resolves the Error code
+// ---------------------------------------------------------
+//
+void CEvtMgmtUiPlaceComponent::ResolveErrorL( TInt aErrorCode )
+    {
+    TPtrC buf;
+    CTextResolver* textResolver = CTextResolver::NewLC( *(CEikonEnv::Static()) );
+    buf.Set(textResolver->ResolveErrorString(aErrorCode));
+    	
+    CAknErrorNote* dialog = 
+	        new(ELeave)CAknErrorNote(ETrue);    
+    dialog->SetTone(CAknNoteDialog::EErrorTone);
+    dialog->ExecuteLD( buf ); 
+    	
+    CleanupStack::PopAndDestroy( textResolver );
+    }
+
+// ---------------------------------------------------------
+// CEvtMgmtUiPlaceComponent::DisplayAccuracyNoteL
+// It is used to provide Accuracy String based on current 
+// System of Measurement Settings
+// ---------------------------------------------------------
+//
+void CEvtMgmtUiPlaceComponent::GetAccuracyStringL( TReal& aAccuracy, HBufC*& aAccuracyString )
+    {
+    EVTUIDEBUG("+ CEvtMgmtUiPlaceComponent::GetAccuracyStringL()" );
+    TInt settingsValue = 0;
+    CRepository* repository = CRepository::NewL( TUid::Uid( KCRUidLocNotationPref) );
+    CleanupStack::PushL( repository );
+    User::LeaveIfError( repository->Get( KLocSystemofMeasurements,
+                                              settingsValue ));  
+    CleanupStack::PopAndDestroy( repository );
+    
+    aAccuracy = aAccuracy/KMToKMConversion;
+    
+    switch( static_cast<TLocSystemofMeasurementValues>( settingsValue ) )
+       {
+       case ELocImperial: // mile              
+           {                   
+           aAccuracy *= KUnitConversion;
+           TReal approxAccuracy;
+           TBuf<8> accuracyString;
+           Math::Round( approxAccuracy, aAccuracy, 2 );
+           accuracyString.Format(KFloatAccuracyFormat, approxAccuracy);
+           aAccuracyString = StringLoader::LoadL( R_LOCEV_NOTE_TXT_ACC_MILES, accuracyString, CEikonEnv::Static() );
+           break;
+           }
+       case ELocMetric: // metric
+           {
+           TReal approxAccuracy;
+           TBuf<8> accuracyString;
+           Math::Round( approxAccuracy, aAccuracy, 2 );
+           accuracyString.Format(KFloatAccuracyFormat, approxAccuracy);
+           aAccuracyString = StringLoader::LoadL( R_LOCEV_NOTE_TXT_ACC_KM, accuracyString, CEikonEnv::Static() );
+           }
+           break;           
+       default: 
+           break;
+       }
+    EVTUIDEBUG("- CEvtMgmtUiPlaceComponent::GetAccuracyStringL()" );
+    }
+//end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventseditor/src/evtmgmtuiringtonecomponent.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,591 @@
+/*
+* 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:   'Set Assigntone' component for retrieving ringtone.
+*
+*/
+
+#include <evtmgmteditorui.rsg>
+#include <StringLoader.h>
+#include <CFLDFileListContainer.h>  // Audio File List
+#include <DRMHelper.h>              // DRM
+#include <eikenv.h>
+#include <aknlistquerydialog.h>
+#include <pathinfo.h>
+#include <driveinfo.h>
+#include <f32file.h>
+#include <NewFileServiceClient.h>   // Voice Recorder
+#include <AiwGenericParam.h>    
+#include <AknIconArray.h>       // Icon Array
+#include <evteditor.mbg>
+#include <avkon.mbg>
+#include <AknsUtils.h>
+#include <AknsSkinInstance.h>
+#include <data_caging_path_literals.hrh>
+#include <gulicon.h>            // Gul Icon
+#include <eikapp.h>
+#include <eikappui.h>
+#include <CalendarDomainCRKeys.h>
+#include <centralrepository.h>
+#include <AknUtils.h>
+#include <collate.h>
+
+#include "evtmgmteditorui.hrh"
+#include "evtmgmtuiringtonecomponent.h"
+#include "evtdebug.h"
+#include "evteditorconsts.h"
+
+const TInt KSetToneGranularity = 2;
+
+// ---------------------------------------------------------------------------
+// CEvtEditor ::NewL()
+// ---------------------------------------------------------------------------
+//
+CEvtMgmtUiRingtoneComponent* CEvtMgmtUiRingtoneComponent::NewL(const TPtrC aPrevRingtone)
+    {
+    CEvtMgmtUiRingtoneComponent * self = CEvtMgmtUiRingtoneComponent::NewLC(aPrevRingtone);
+    CleanupStack::Pop(self);
+    return self;
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtEditor ::NewLC()
+// ---------------------------------------------------------------------------
+//
+CEvtMgmtUiRingtoneComponent* CEvtMgmtUiRingtoneComponent::NewLC(const TPtrC aPrevRingtone)
+    {
+    CEvtMgmtUiRingtoneComponent * self = new (ELeave) CEvtMgmtUiRingtoneComponent();
+    CleanupStack::PushL(self);
+    self->ConstructL( aPrevRingtone );
+    return self;
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiDescComponent ::~CEvtMgmtUiDescComponent()
+// ---------------------------------------------------------------------------
+//
+CEvtMgmtUiRingtoneComponent::~CEvtMgmtUiRingtoneComponent()
+    {    
+    delete iRingtone;
+    iRingtone = NULL;
+    
+    if( iRecorderClient ) 
+        {
+        delete iRecorderClient;        
+        iRecorderClient = NULL;
+        }
+        
+    if( iSelectRingtoneDlg )
+        {
+        delete iSelectRingtoneDlg;        
+        iSelectRingtoneDlg = NULL;
+        }  
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiRingtoneComponent ::ConstructL()
+// ---------------------------------------------------------------------------
+//
+void CEvtMgmtUiRingtoneComponent ::ConstructL( const TPtrC aPrevRingtone )
+    {
+    iRingtone = aPrevRingtone.AllocL();
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiRingtoneComponent ::CEvtMgmtUiRingtoneComponent()
+// ---------------------------------------------------------------------------
+//
+CEvtMgmtUiRingtoneComponent::CEvtMgmtUiRingtoneComponent()
+    {    
+    }
+
+// -----------------------------------------------------------------------------
+// CEvtMgmtUiRingtoneComponent::Ringtone()
+// It is used to retrieve the selected ringtone's absolute path.
+// @ret absolute path of the selected ringtone
+// -----------------------------------------------------------------------------
+TPtrC CEvtMgmtUiRingtoneComponent::Ringtone() const
+    {
+    // if ringtone, returns ringtone else empty string
+    if( iRingtone )
+        return *iRingtone;
+    else
+        return KNullDesC();
+    }
+
+// -----------------------------------------------------------------------------
+// CEvtMgmtUiRingtoneComponent::DefaultRingtoneL()
+// It is used to retrieve the path of the Default Tone.
+// @ret absolute path of the default ringtone
+// -----------------------------------------------------------------------------
+TPtrC CEvtMgmtUiRingtoneComponent::DefaultRingtoneL()
+    {
+    TFileName toneFileName;
+    CRepository* centralRepository = CRepository::NewLC(KCRUidCalendar);
+    User::LeaveIfError(centralRepository->Get(KCalendarSoundFile, toneFileName));
+    CleanupStack::PopAndDestroy(centralRepository);
+    if( iRingtone )
+        {
+        delete iRingtone;
+        iRingtone = NULL;
+        }
+    iRingtone = toneFileName.AllocL();   
+    
+    // if ringtone, returns ringtone else empty string
+    if( iRingtone )
+        return *iRingtone;
+    else
+        return KNullDesC();
+    }
+
+// -----------------------------------------------------------------------------
+// CEvtMgmtUiRingtoneComponent::DisplayAudioPopupDlgL()
+// It is used to display 'Set tone' popup dialog and to retrieve ringtone.
+// @ret error if there is any error
+//      KErrNone if it is successful  
+// -----------------------------------------------------------------------------
+TInt CEvtMgmtUiRingtoneComponent::DisplayAudioTonePopupDlgL()
+    {    
+    TInt response = KErrNone;   
+    
+    //display 'set tone' popup dialog   
+    TInt index = DisplayPopupDlgL();
+   
+    switch(index)
+        {        
+        case EEvtMgmtUiAssignedToneTone: // if 'select from exising' is selected
+            {
+            response = DisplayRingtoneSelectionDlgL();
+            break;
+            }
+        case EvtMgmtUiAssignedToneRecordNew: //if 'record new' is selected
+            {
+            response = RecordNewToneL();
+            break;
+            }
+        default:
+            {
+            response = KErrCancel;
+            Debug(_L("DisplayAudioTonePopupDlgL panic"));
+            break;
+            }
+        }    
+     return response;
+    }
+
+// -----------------------------------------------------------------------------
+// CEvtMgmtUiRingtoneComponent::DisplayRingtoneSelectionDlgL()
+// t is used display  system's 'select tone' dialog.
+// @ret error while displaying 'select tone' dialog and 
+//      retrieving ringtone from it. 
+//      KErrNone if it is successful
+// -----------------------------------------------------------------------------
+TInt CEvtMgmtUiRingtoneComponent::DisplayRingtoneSelectionDlgL()
+    {
+    TInt response = KErrNone;
+    
+    // Create instance of FileList using new FileList API
+    if(!iSelectRingtoneDlg)
+        iSelectRingtoneDlg = CFLDFileListContainer::NewL();
+
+    iSelectRingtoneDlg->SetAutomatedType( CDRMHelper::EAutomatedTypeRingingTone );
+
+    // Do not show videos, use new FileList API
+    iSelectRingtoneDlg->AddExclusiveMediaTypeL( ECLFMediaTypeVideo );
+    
+    HBufC* strOff = StringLoader::LoadLC( R_EVTUI_RINGTONESELECT_OFF );
+    
+    iSelectRingtoneDlg->InsertEndNullItemL( *strOff );
+    TFileName ringtone( *iRingtone );
+    
+    //launch selection dialog
+    if( iSelectRingtoneDlg->LaunchL( ringtone ) ) //if ringtone is selected
+        {        
+        delete iRingtone;
+        iRingtone = NULL;
+        iRingtone = ringtone.AllocL();   
+        }
+    else // if dialog is cancelled
+        response = KErrCancel;
+    
+    CleanupStack::PopAndDestroy(1 ); // strOff
+    delete iSelectRingtoneDlg;
+    iSelectRingtoneDlg = NULL;
+    
+    //return error code
+    return response;
+    }
+
+// -----------------------------------------------------------------------------
+// CEvtMgmtUiRingtoneComponent::DisplayPopupDlgL()
+// It is used to display generic popup dialog.
+// @ret index of item selected if OK is pressed
+//       KErrCancel if Cancel is pressed 
+// -----------------------------------------------------------------------------
+TInt CEvtMgmtUiRingtoneComponent::DisplayPopupDlgL()
+    {
+    TInt index = 0;
+    const TInt KToneIconIndex = 0;
+    const TInt KRecordNewIconIndex = 1;
+    const TInt KIconTextLength = 1;
+    const TInt KAssignToneGranularity =2;   
+    _LIT(KTab, "\t");  
+    HBufC* dummy = NULL;
+    
+    //title text
+    HBufC* title  = StringLoader::LoadLC( R_EVTUI_CREATENEW_FORM_ASSIGNTONEPOPUP_TITLE );
+     
+    //Tone
+    dummy = StringLoader::LoadLC(R_EVTUI_CREATENEW_FORM_ASSIGNTONEPOPUPOPTIONS_TONE);
+    HBufC* tone = HBufC::NewL( KIconTextLength + KTab().Length() + 
+                       dummy->Length() + KTab().Length( )+ KTab().Length() );
+    TPtr ptrDummy = tone->Des();
+    ptrDummy.Num(KToneIconIndex);
+    ptrDummy.Append(KTab);
+    ptrDummy.Append(*dummy);
+    ptrDummy.Append(KTab);
+    ptrDummy.Append(KTab);
+    CleanupStack::PopAndDestroy(dummy);
+    CleanupStack::PushL(tone);
+    
+    // Record new
+    dummy = StringLoader::LoadLC(R_EVTUI_CREATENEW_FORM_ASSIGNTONEPOPUPOPTIONS_RECORDNEW);
+    HBufC* recordNew = HBufC::NewL( KIconTextLength + KTab().Length() + 
+                      dummy->Length() + KTab().Length( )+ KTab().Length() );
+    ptrDummy.Set( recordNew->Des() );
+    ptrDummy.Num(KRecordNewIconIndex);
+    ptrDummy.Append(KTab);
+    ptrDummy.Append(*dummy);
+    ptrDummy.Append(KTab);
+    ptrDummy.Append(KTab);
+    CleanupStack::PopAndDestroy(dummy);
+    CleanupStack::PushL(recordNew);
+    
+    //array
+    CDesCArrayFlat* array = new(ELeave)CDesCArrayFlat( KAssignToneGranularity );
+    CleanupStack::PushL(array);
+    array->AppendL(*tone);
+    array->AppendL(*recordNew);
+    
+    //launch dialog
+    CAknListQueryDialog* dlg = new( ELeave ) CAknListQueryDialog( &index );
+    dlg->PrepareLC( R_EVTMGMTUI_LIST_QUERY );  
+    UpdateIconsL( *dlg );
+    dlg->SetItemTextArray( array ); 
+    dlg->SetOwnershipType( ELbmOwnsItemArray );  
+    dlg->QueryHeading()->SetTextL( *title );
+    if ( !dlg->RunLD() )     // if dialog is cancelled  
+       index = KErrCancel;   
+    
+    CleanupStack::Pop(array); //ownership was transferred to dialog
+    
+    CleanupStack::PopAndDestroy( 3 ); //recordNew, tone, title
+    return index;
+    }
+
+// -----------------------------------------------------------------------------
+// CEvtMgmtUiRingtoneComponent::RecordNewToneL()
+// It is used to record new ringtone.
+// @ret KErrNone if recording is succesful.
+//      error code if it is failed.
+// -----------------------------------------------------------------------------
+TInt CEvtMgmtUiRingtoneComponent::RecordNewToneL()
+    {
+    TInt err = KErrNone;
+    
+    TFileName fileName;
+    err = FileNameForRecordingL( fileName );
+    if(err!=KErrNone)
+        {
+        Debug( _L("Error while generating filename for recording =%d"), err );
+        return err;
+        }
+    
+    Debug( _L("Recording filename = ") );
+    Debug( fileName );
+    
+    RFs fs;
+    User::LeaveIfError( fs.Connect() );
+    CleanupClosePushL(fs);
+    fs.ShareProtected(); // The file server session must be in this mode
+
+    
+    // Record Audio Clip    
+    if(!iRecorderClient)
+        iRecorderClient = NewFileServiceFactory::NewClientL();  
+       
+    //create empty audio file
+    RFile file;
+    file.Replace( fs, fileName, EFileShareAny|EFileWrite  );
+    CleanupClosePushL(file);
+    
+ 
+    // launch recorder application to record tone.
+    TBool response = EFalse;
+    CAiwGenericParamList* params = CAiwGenericParamList::NewLC();
+    TAiwVariant variant;
+    variant.Set( _L("file" ) );
+    TAiwGenericParam param( EGenericParamURL, variant );
+    params->AppendL( param );
+    TRAP(err, response = iRecorderClient->NewFileL( file, params, ENewFileServiceAudio ) );   
+    Debug( _L( "Error while recording =%d, response =%d" ), err, response );
+    CleanupStack::PopAndDestroy( 2 ); // params, file
+    delete iRecorderClient;
+    iRecorderClient = NULL;
+   //if recording is successful, set ringtone.
+   if( response && err == KErrNone)
+       {
+       delete iRingtone;
+       iRingtone = NULL;
+       iRingtone = fileName.AllocL();
+       }
+   
+   //if recording is cancelled, set err to KErrCancel
+   if( !response )
+       err = KErrCancel;       
+   
+   //if there is error in recording or recording is cancelled, delete the file.
+   if( err!=KErrNone )
+       fs.Delete( fileName );
+   
+   CleanupStack::PopAndDestroy(); //fs
+   
+   return err;
+   }
+
+// -----------------------------------------------------------------------------
+// CEvtMgmtUiRingtoneComponent::RecordNewToneL()
+// It is used to generate filename for recording new file.
+// @param[out] aFileName - it will contain generated file-name
+// @ret KErrNone if recording is succesful.
+//      error code if it is failed.
+// -----------------------------------------------------------------------------
+TInt CEvtMgmtUiRingtoneComponent:: FileNameForRecordingL( TDes& aFileName )
+    { 
+    PathInfo::GetFullPath(aFileName, EDriveC, PathInfo::ESoundsPath );
+    
+    HBufC* recStr = StringLoader::LoadLC( R_LOCEV_LIST_VOREC_CLIP_NAME );
+    
+    //Open sound directory
+    RDir directory;
+    TInt err = directory.Open(CEikonEnv::Static()->FsSession(), aFileName, KEntryAttNormal);       
+    if( err!=KErrNone )
+       {     
+       return err;
+       }   
+    CleanupClosePushL(directory);
+    
+    //Retrieve files from directory
+    TEntryArray fileList;    
+    err = directory.Read(fileList);
+    
+    TInt maxValue = 0;
+    
+    if ( err == KErrNone || err == KErrEof )
+       {
+       err = KErrNone;
+       //Check folder's files and find last recent audio file    
+       for (TInt i = 0; i < fileList.Count(); ++i)
+           {
+           TEntry fileEntry = fileList[i];
+           
+           TCollationMethod cm = *Mem::CollationMethodByIndex( 0 ); // default collation method
+           cm.iFlags |= TCollationMethod::EIgnoreNone;
+           
+           //Check that file is valid audiofile                
+           if (!fileEntry.IsReadOnly() && 
+               !fileEntry.IsHidden() &&
+               !fileEntry.IsSystem() && 
+               !fileEntry.IsDir() &&
+               TDesC::EIsPrefix == fileEntry.iName.HasPrefixC(*recStr, 0, &cm) &&
+               fileEntry.iName.Find(*recStr) != KErrNotFound)
+               {
+               //Find out running number
+               TParse parser;
+               parser.Set( fileEntry.iName, NULL, NULL );
+               TFileName fileName = parser.Name();
+               fileName.Delete(0,recStr->Length());
+               fileName.Trim();
+
+               //Convert digits from any digit format to european digit format. 
+               AknTextUtils::ConvertDigitsTo( fileName, EDigitTypeWestern );
+                               
+               TInt multiplier = 1;
+               TInt count = 0;
+               for (TInt i = fileName.Length() - 1; i != -1;  --i)
+                   {
+                   TChar numberchar = fileName[i];
+                   //Check if the character is digit
+                   if( numberchar.IsDigit() )
+                       {
+                       TInt number = numberchar.GetNumericValue();
+                       
+                       count += number * multiplier;
+                       multiplier = multiplier * 10;
+                       }
+                   else
+                       {
+                       break;
+                       }
+                   }
+               
+               //Save current number of audio files
+               if (count > maxValue)
+                   {
+                   maxValue = count;
+                   }
+               }
+           }
+       }
+    
+    //Create a text containing the count to localize
+    TFileName num;
+    num.Zero();
+    num.AppendNum(maxValue+1);
+
+    //Converts between arabic-indic digits and european digits 
+    //based on existing language setting.
+    AknTextUtils::LanguageSpecificNumberConversion( num );
+    
+    //set recording filename
+    aFileName.Append(*recStr);
+    aFileName.Append(num);    
+    aFileName.Append(KRecorderFileEnd);
+    
+    CleanupStack::PopAndDestroy(2); // dir, recStr
+    
+    return err;           
+    }
+
+// -----------------------------------------------------------------------------
+// CEvtMgmtUiRingtoneComponent::UpdateIconsL
+// It update icons
+// -----------------------------------------------------------------------------
+void CEvtMgmtUiRingtoneComponent::UpdateIconsL( CAknListQueryDialog& aDialog )
+    {
+    Debug(_L("start CEvtMgmtUiPlaceComponent::UpdateIconsL()"));
+    
+    CAknIconArray* icons = new( ELeave ) CAknIconArray( KSetToneGranularity );
+    CleanupStack::PushL( icons );
+
+    TFileName *iconFile = IconFileNameLC();
+
+    AddIconL( *icons, 
+              *iconFile,
+              KAknsIIDQgnPropFmgrFileSound, 
+              EMbmEvteditorQgn_prop_fmgr_file_sound, EMbmEvteditorQgn_prop_fmgr_file_sound_mask);
+    
+    AddIconL( *icons, 
+             *iconFile,
+             KAknsIIDQgnPropFmgrFileVoicerec, 
+             EMbmEvteditorQgn_prop_fmgr_file_voicerec, EMbmEvteditorQgn_prop_fmgr_file_voicerec_mask);
+
+    CleanupStack::PopAndDestroy(iconFile);
+
+    //set new icons to array
+    aDialog.SetIconArrayL( icons );  
+    CleanupStack::Pop(icons);
+    
+    Debug(_L("end CEvtMgmtUiPlaceComponent::UpdateIconsL()"));
+        
+    }
+    
+// -----------------------------------------------------------------------------
+// CEvtMgmtUiRingtoneComponent::AddIconL
+// Append icon to icon array. CAknIconArray owns icons so it is 
+// easier to it leave safely.
+// @param aIcons icon array
+// @param aIconFileWithPath icon file name with path
+// @param aSkinID skin id of the icon
+// @param aIconGraphicsIndex picture index
+// @param aIconGraphicsMaskIndex mask index
+// -----------------------------------------------------------------------------
+void CEvtMgmtUiRingtoneComponent::AddIconL( CAknIconArray&  aIcons,
+                                           const TDesC&    aIconFileWithPath,
+                                           TAknsItemID     aSkinID,
+                                           TInt            aIconGraphicsIndex,
+                                           TInt            aIconGraphicsMaskIndex )
+    {
+    MAknsSkinInstance* skin = AknsUtils::SkinInstance();
+
+    EVTUIDEBUG( "AknsUtils::SkinInstance" );
+    
+    CFbsBitmap* bitmap = NULL;
+    CFbsBitmap* bitmapMask = NULL;
+    TRAPD( err, AknsUtils::CreateIconL( skin,
+                            aSkinID,
+                            bitmap,
+                            bitmapMask,
+                            aIconFileWithPath,
+                            aIconGraphicsIndex,
+                            aIconGraphicsMaskIndex ) );
+
+	
+    EVTUIDEBUG1( "AknsUtils::CreateIconL - %d", err );
+    if(err != KErrNone)
+	    {
+	    TRAP( err, AknIconUtils::CreateIconL( bitmap,
+	                            bitmapMask,
+	                            aIconFileWithPath,
+	                            aIconGraphicsIndex,
+	                            aIconGraphicsMaskIndex ) );
+    	EVTUIDEBUG1( "AknIconUtils::CreateIconL - %d", err );
+	    }
+    User::LeaveIfError( err );
+    
+    CleanupStack::PushL( bitmap );
+    CleanupStack::PushL( bitmapMask );
+    
+    CGulIcon* icon = CGulIcon::NewL( bitmap, bitmapMask );
+    
+    // Remove the Bitmap and the Bitmap Icon from the Clean up stack since 
+    // the ownership is taken over by the icon
+    CleanupStack::Pop( bitmapMask );
+    CleanupStack::Pop( bitmap ); 
+    
+    CleanupStack::PushL( icon );
+    aIcons.AppendL( icon );
+    CleanupStack::Pop( icon ); // icon
+    }
+
+// -----------------------------------------------------------------------------
+// CEvtMgmtUiRingtoneComponent::IconFileNameLC
+// Gets Events Management UI icon file path and name. Ownership
+// is transferred, item is left in the cleanup stack.
+// @return TFileName* The full name of the Events UI icon file.
+// -----------------------------------------------------------------------------
+TFileName* CEvtMgmtUiRingtoneComponent::IconFileNameLC() const
+    {
+    TFileName* fileName = new(ELeave) TFileName;
+    CleanupStack::PushL( fileName );
+    
+    TFileName* tmpName = new(ELeave) TFileName;
+    CleanupStack::PushL( tmpName );
+    
+    tmpName->Append( KDC_BITMAP_DIR );
+    tmpName->Append( KEvtMgmtUiIconFileName );
+
+    CEikAppUi *appUi = ( CEikAppUi *)( CEikonEnv::Static()->AppUi());
+    TFileName appDrive = appUi->Application()->AppFullName();
+    
+    TParse parse;
+    User::LeaveIfError( parse.Set( appDrive, NULL, NULL ) );
+    User::LeaveIfError( parse.Set( parse.Drive(), tmpName, NULL ) );
+    
+    fileName->Copy(parse.FullName());
+
+    CleanupStack::PopAndDestroy( tmpName );
+
+    return fileName;
+    }  
+//end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventseditor/src/evtmgmtuisysofmeasurement.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,171 @@
+/*
+* 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:  An observer for change in System of Measurement
+*
+*/
+
+
+// System Include
+#include <centralrepository.h>
+
+// User Include
+#include "evtmgmtuisysofmeasurement.h"
+
+
+// ========================= MEMBER FUNCTIONS ================================
+
+
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiSysOfMeasurement::CEvtMgmtUiSysOfMeasurement
+// Overloaded Constructor
+//
+// ---------------------------------------------------------------------------
+//  
+CEvtMgmtUiSysOfMeasurement::CEvtMgmtUiSysOfMeasurement(  
+                                MEvtMgmtUiSOMObserver& aAdapterObsrv )
+    :CActive(EPriorityStandard),
+    iObserver(aAdapterObsrv)
+    {
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiSysOfMeasurement::~CEvtMgmtUiSysOfMeasurement
+// Destructor
+//
+// ---------------------------------------------------------------------------
+//
+CEvtMgmtUiSysOfMeasurement::~CEvtMgmtUiSysOfMeasurement()
+    {
+    Cancel();
+    
+    delete iRepository; 
+    }
+    
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiSysOfMeasurement* CEvtMgmtUiSysOfMeasurement::NewL
+// Creates new Systen of Measurement adapter
+//
+// @param  aAdapterObsrv                        Observer to the Settings adapter
+// @return CEvtMgmtUiSysOfMeasurement&  Reference to the application view
+// ---------------------------------------------------------------------------
+//    
+CEvtMgmtUiSysOfMeasurement* CEvtMgmtUiSysOfMeasurement::NewL( 
+                            MEvtMgmtUiSOMObserver& aAdapterObsrv )
+    {   
+    CEvtMgmtUiSysOfMeasurement* self = 
+                        CEvtMgmtUiSysOfMeasurement::NewLC( aAdapterObsrv );
+    CleanupStack::Pop(self);
+    return self;
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiSysOfMeasurement* CEvtMgmtUiSysOfMeasurement::NewLC
+// Creates new Systen of Measurement adapter. Leaves the object on the clean-up
+// stack
+//
+// @param  aAdapterObsrv                        Observer to the Settings adapter
+// @return CEvtMgmtUiSysOfMeasurement&  Reference to the application view
+// ---------------------------------------------------------------------------
+// 
+CEvtMgmtUiSysOfMeasurement* CEvtMgmtUiSysOfMeasurement::NewLC( 
+                            MEvtMgmtUiSOMObserver& aAdapterObsrv )
+    {   
+    CEvtMgmtUiSysOfMeasurement* self = 
+                        new(ELeave) CEvtMgmtUiSysOfMeasurement( aAdapterObsrv );
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    return self;
+    }
+    
+// ---------------------------------------------------------------------------
+// void CEvtMgmtUiSysOfMeasurement::ConstructL
+// Second Phase Constructor
+//
+// ---------------------------------------------------------------------------
+//
+void CEvtMgmtUiSysOfMeasurement::ConstructL()
+    {
+    CActiveScheduler::Add( this );
+    
+    // Create the Central repository object for manipulating Avkon Central
+    // repository for System of measurements settings
+    iRepository = CRepository::NewL(TUid::Uid( KCRUidLocNotationPref ));
+    
+    StartNotification();    
+    }
+
+// ---------------------------------------------------------------------------
+// TLocSystemofMeasurementValues CEvtMgmtUiSysOfMeasurement::GetCurrentSysofMeasL
+// Returns the current value of the System of measurements settings
+//
+// @return TLocSystemofMeasurementValues  Current value of the System of 
+//                                        measurements settings
+// ---------------------------------------------------------------------------
+//
+TLocSystemofMeasurementValues CEvtMgmtUiSysOfMeasurement::GetCurrentSysofMeasL()
+    {
+    
+    TInt settingsValue = 0;
+    User::LeaveIfError( iRepository->Get( KLocSystemofMeasurements,
+                                          settingsValue ));  
+    return ( static_cast<TLocSystemofMeasurementValues>( settingsValue ));
+    }
+           
+// --------------------------------------------------------------------------
+// void CEvtMgmtUiSysOfMeasurement::RunL
+// Inherited from CActive
+//
+// ---------------------------------------------------------------------------
+//
+void CEvtMgmtUiSysOfMeasurement::RunL()
+    {
+    // Issue Notification
+    iObserver.NotifySOMChangeL();
+    
+    // Schedule for listening to change events again
+    StartNotification();
+    }
+
+// --------------------------------------------------------------------------
+// void CEvtMgmtUiSysOfMeasurement::DoCancel
+// Inherited from CActive
+//
+// ---------------------------------------------------------------------------
+//
+void CEvtMgmtUiSysOfMeasurement::DoCancel()
+    {
+    // Cancel the outstanding CR notification request
+    if( iRepository )
+        {
+        iRepository->NotifyCancel( KLocSystemofMeasurements );        
+        }
+    }
+    
+// --------------------------------------------------------------------------
+// void CEvtMgmtUiSysOfMeasurement::StartNotification
+// Start notification from the Central repository server for any changes in the
+// System of measurements key value
+//
+// ---------------------------------------------------------------------------
+//
+void CEvtMgmtUiSysOfMeasurement::StartNotification()
+    {
+    if( !IsActive())
+        {
+        iStatus = KRequestPending;
+        // Request for notification
+        iRepository->NotifyRequest( KLocSystemofMeasurements, iStatus);
+        SetActive();          
+        }  
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventseditor/src/evtmgmtuiwaitdlglauncher.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,310 @@
+/*
+* 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:  Encapuslates the Wait dialog in an Active Object interface 
+*
+*/
+
+
+// System Includes
+#include <evtmgmteditorui.rsg>
+#include <eikenv.h>
+
+// User Includes
+#include "evtmgmtuiwaitdlglauncher.h"
+#include "evtdebug.h"
+
+// -----------------------------------------------------------------------------
+// CLmkWaitDialogLauncher::CLmkWaitDialogLauncher
+// C++ Overloaded constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+CEvtMgmtUiWaitDialogLauncher::CEvtMgmtUiWaitDialogLauncher()
+    :CActive( EPriorityUserInput )
+    {
+    iIsCancelAvailable = ETrue;
+    iObserver = NULL;
+    }
+    
+// -----------------------------------------------------------------------------
+// CEvtMgmtUiWaitDialogLauncher::~CEvtMgmtUiWaitDialogLauncher
+// C++ destructor
+// -----------------------------------------------------------------------------
+//    
+CEvtMgmtUiWaitDialogLauncher::~CEvtMgmtUiWaitDialogLauncher()
+    {
+    Cancel();
+    
+    if ( iSchedWait->IsStarted() )
+        {
+        iSchedWait->AsyncStop();        
+        }
+            
+    delete iSchedWait; 
+    iSchedWait =NULL;
+    
+    delete iWaitText;
+    iWaitText =NULL;
+    }
+
+// -----------------------------------------------------------------------------
+// CEvtMgmtUiWaitDialogLauncher* CEvtMgmtUiWaitDialogLauncher::NewL
+// Two phase constructor
+// -----------------------------------------------------------------------------
+//        
+CEvtMgmtUiWaitDialogLauncher* CEvtMgmtUiWaitDialogLauncher::NewL()
+    {
+    CEvtMgmtUiWaitDialogLauncher* self = 
+                new ( ELeave ) CEvtMgmtUiWaitDialogLauncher();
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// void CEvtMgmtUiWaitDialogLauncher::ConstructL
+// Second phase constructor
+// -----------------------------------------------------------------------------
+//
+void CEvtMgmtUiWaitDialogLauncher::ConstructL()
+    {
+    iSchedWait = new ( ELeave )CActiveSchedulerWait;
+    CActiveScheduler::Add( this);
+    }
+
+// -----------------------------------------------------------------------------
+// void CEvtMgmtUiWaitDialogLauncher::SetObserver
+// -----------------------------------------------------------------------------
+void CEvtMgmtUiWaitDialogLauncher::SetObserver( MEvtMgmtUiWaitDialogLauncherObserver* aObserver)
+    {
+    iObserver = aObserver; 
+    }
+
+// -----------------------------------------------------------------------------
+// void CEvtMgmtUiWaitDialogLauncher::SetTextL
+// -----------------------------------------------------------------------------
+void CEvtMgmtUiWaitDialogLauncher::SetTextL(const TDesC& aText)
+    {
+    if(iWaitText)
+        {
+        delete iWaitText;
+        iWaitText = NULL;
+        }
+    
+    iWaitText = aText.AllocL();
+    }
+    
+// -----------------------------------------------------------------------------
+// void CEvtMgmtUiWaitDialogLauncher::SetTextL
+// -----------------------------------------------------------------------------
+void CEvtMgmtUiWaitDialogLauncher::SetTextL( const TInt aResourceId )
+    {  
+    if(iWaitText)
+       {
+       delete iWaitText;
+       iWaitText = NULL;
+       }
+    iWaitText = CEikonEnv::Static()->AllocReadResourceAsDes16L( aResourceId );
+    }
+    
+// -----------------------------------------------------------------------------
+// void CEvtMgmtUiWaitDialoaLauncher::AllowUserToCancel
+// -----------------------------------------------------------------------------
+void CEvtMgmtUiWaitDialogLauncher::AllowUserToCancel( TBool aIsCancelAvailable )
+    {
+    iIsCancelAvailable = aIsCancelAvailable; 
+    }
+
+// -----------------------------------------------------------------------------
+// void CEvtMgmtUiWaitDialogLauncher::StartWaitDialogL
+// Starts the wait dialog
+// -----------------------------------------------------------------------------
+// 
+void CEvtMgmtUiWaitDialogLauncher::StartWaitDialogL()
+    {
+    EVTUIDEBUG("+ CEvtMgmtUiWaitDialogLauncher::StartWaitDialogL" );
+    if( IsActive())
+        {
+        User::Leave( KErrInUse );
+        }
+        
+    // Issue a request for Wait dialog launching
+            
+    TRequestStatus* status = &iStatus;
+    User::RequestComplete( status, KErrNone );
+    SetActive();
+    EVTUIDEBUG("- CEvtMgmtUiWaitDialogLauncher::StartWaitDialogL" );
+    }
+
+// -----------------------------------------------------------------------------
+// void CEvtMgmtUiWaitDialogLauncher::StartWaitDialogL
+// Stops the wait dialog
+// -----------------------------------------------------------------------------
+//    
+TInt CEvtMgmtUiWaitDialogLauncher::StopWaitDialogL()
+    {
+    EVTUIDEBUG("+ CEvtMgmtUiWaitDialogLauncher::StopWaitDialogL" );
+    if ( iWaitNote )
+        {        	
+        TRAPD( err, iWaitNote->ProcessFinishedL() );
+        if (err != KErrNone)
+    		{
+		    delete iWaitNote;
+            iWaitNote = NULL;            
+            return KErrNone;            
+	    	}    	    	
+        }
+
+    // Rechecking the Wait note is required since, the value might get modified
+    // in DialogDismissedL call
+    
+    if( iWaitNote )
+        {
+    		EVTUIDEBUG("= Start Scheduler wait loop" );
+    	if ( !iSchedWait->IsStarted() )
+    	    iSchedWait->Start();
+        }
+    EVTUIDEBUG("- CEvtMgmtUiWaitDialogLauncher::StopWaitDialogL" );
+                
+    // Return the Button ID with which the dialog was dismissed    
+    return iButtonId;               
+    }
+
+// -----------------------------------------------------------------------------
+// void CEvtMgmtUiWaitDialogLauncher::DialogDismissedL
+// Inherited from MProgressDialogCallback
+// -----------------------------------------------------------------------------
+// 
+void CEvtMgmtUiWaitDialogLauncher::DialogDismissedL( TInt aButtonId )
+    {
+    EVTUIDEBUG1("+ CEvtMgmtUiWaitDialogLauncher::DialogDismissedL - %d", aButtonId );
+    // Store the Button ID for later retrival
+    iButtonId = aButtonId;
+    
+    if ( iSchedWait->IsStarted() )
+        {
+        iSchedWait->AsyncStop();        
+        }
+    iWaitNote = NULL;
+    if(iObserver)
+    	{
+    	iObserver->HandleDialogDismissed( iButtonId );
+    	}
+    EVTUIDEBUG("- CEvtMgmtUiWaitDialogLauncher::DialogDismissedL" );
+    }
+            
+// -----------------------------------------------------------------------------
+// void CEvtMgmtUiWaitDialogLauncher::RunL
+// Inherited from CActive
+// -----------------------------------------------------------------------------
+//
+void CEvtMgmtUiWaitDialogLauncher::RunL()
+    {
+    EVTUIDEBUG("+ CEvtMgmtUiWaitDialogLauncher::RunL" );
+    if( iStatus.Int() == KErrNone )
+        {
+        // Launch the Wait dialog
+        iWaitNote = new (ELeave) CAknWaitDialog
+                      ((REINTERPRET_CAST(CEikDialog**,&iWaitNote)), ETrue );
+        iWaitNote->SetCallback( this ); 
+        iWaitNote->SetTextL(*iWaitText);
+        
+        TInt resourceId ;
+        if(iIsCancelAvailable)
+            resourceId = R_EVTMGMTUI_WAITDLG_CANCEL;
+        else
+            resourceId = R_EVTEDITOR_WAITDLG;    
+        
+    		EVTUIDEBUG("= Before Dialog Launch" );
+        if ( !iWaitNote->ExecuteLD( resourceId ) )
+            {
+    				EVTUIDEBUG("= After Dialog Launch" );
+            //making iWaitNote null, since framework destroys waitnote
+            //dialog on pressing cancel.
+            iWaitNote = NULL;
+            }
+        }
+    EVTUIDEBUG("+ CEvtMgmtUiWaitDialogLauncher::RunL" );
+    }
+
+// -----------------------------------------------------------------------------
+// void CEvtMgmtUiWaitDialogLauncher::DoCancel
+// Inherited from CActive
+// -----------------------------------------------------------------------------
+//    
+void CEvtMgmtUiWaitDialogLauncher::DoCancel()
+    {
+    TRAP_IGNORE(StopWaitDialogL());     
+    }
+   
+// -----------------------------------------------------------------------------
+// void CEvtMgmtUiWaitDialogLauncher::StartWaitDialogSyncL
+// -----------------------------------------------------------------------------
+//  
+void CEvtMgmtUiWaitDialogLauncher::StartWaitDialogSyncL()
+    {
+    // Check if there is any outstanding operation. If Yes, the one cannot
+    // proceed
+    if ( iWaitNote || IsActive())
+        {
+        User::Leave( KErrInUse );
+        }
+        
+    // Launch the Wait dialog
+    iWaitNote = new ( ELeave ) CAknWaitDialog
+                  (( REINTERPRET_CAST( CEikDialog**,&iWaitNote )), ETrue );
+    iWaitNote->SetTextL( *iWaitText );
+    
+    TInt resourceId ;
+    if(iIsCancelAvailable)
+        {
+        resourceId = R_EVTMGMTUI_WAITDLG_CANCEL;
+        }        
+    else
+        {
+        resourceId = R_EVTEDITOR_WAITDLG;
+        }
+            
+    if ( !iWaitNote->ExecuteLD( resourceId ) )
+        {
+        //making iWaitNote null, since framework destroys waitnote
+        //dialog on pressing cancel.
+        iWaitNote = NULL;
+        }    
+    }
+
+// -----------------------------------------------------------------------------
+// TInt CEvtMgmtUiWaitDialogLauncher::StopWaitDialogSyncL
+// -----------------------------------------------------------------------------
+//
+TInt CEvtMgmtUiWaitDialogLauncher::StopWaitDialogSyncL()    
+    {
+    // Dismiss the Wait note
+    if ( iWaitNote )
+        {        	
+        TRAPD( err, iWaitNote->ProcessFinishedL() );
+        if (err != KErrNone)
+    		{
+		    delete iWaitNote;
+            iWaitNote = NULL;            
+            return KErrNone;            
+	    	}    	    	
+        }
+    
+    // Return the stored button ID
+    return iButtonId;   
+    }
+// End of File
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventsengine/bwins/evtengineu.def	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,85 @@
+EXPORTS
+	?ModifyEventL@CEvtMgmtUiEngine@@QAEXAAVCEvtEvent@@K@Z @ 1 NONAME ; void CEvtMgmtUiEngine::ModifyEventL(class CEvtEvent &, unsigned long)
+	?EventId@CEvtBasicEventInfo@@QBEKXZ @ 2 NONAME ; unsigned long CEvtBasicEventInfo::EventId(void) const
+	??1CEvtAction@@UAE@XZ @ 3 NONAME ; CEvtAction::~CEvtAction(void)
+	?CancelRequest@CEvtMgmtUiEngine@@QAEXXZ @ 4 NONAME ; void CEvtMgmtUiEngine::CancelRequest(void)
+	?Type@CEvtAction@@QBE?AW4TEvtActionType@@XZ @ 5 NONAME ; enum TEvtActionType CEvtAction::Type(void) const
+	?RemoveEventsL@CEvtEventManager@@QAEXABV?$RArray@K@@@Z @ 6 NONAME ; void CEvtEventManager::RemoveEventsL(class RArray<unsigned long> const &)
+	??1CEvtToneAction@@UAE@XZ @ 7 NONAME ; CEvtToneAction::~CEvtToneAction(void)
+	?GetEventL@CEvtEventManager@@QAEPAVCEvtEvent@@K@Z @ 8 NONAME ; class CEvtEvent * CEvtEventManager::GetEventL(unsigned long)
+	?Subject@CEvtEvent@@QBE?AVTPtrC16@@XZ @ 9 NONAME ; class TPtrC16 CEvtEvent::Subject(void) const
+	?SetRepeat@CEvtEvent@@QAEXH@Z @ 10 NONAME ; void CEvtEvent::SetRepeat(int)
+	?NewLC@CEvtEvent@@SAPAV1@XZ @ 11 NONAME ; class CEvtEvent * CEvtEvent::NewLC(void)
+	??0CEvtAction@@AAE@XZ @ 12 NONAME ; CEvtAction::CEvtAction(void)
+	?SetRadius@CEvtEvent@@QAEXN@Z @ 13 NONAME ; void CEvtEvent::SetRadius(double)
+	?ConstructL@CEvtEvent@@AAEXXZ @ 14 NONAME ; void CEvtEvent::ConstructL(void)
+	?Description@CEvtEvent@@QBE?AVTPtrC16@@XZ @ 15 NONAME ; class TPtrC16 CEvtEvent::Description(void) const
+	?SetPlaceL@CEvtBasicEventInfo@@QAEXABVTDesC16@@@Z @ 16 NONAME ; void CEvtBasicEventInfo::SetPlaceL(class TDesC16 const &)
+	?InternalizeL@CEvtToneAction@@QAEXAAVCEvtAction@@@Z @ 17 NONAME ; void CEvtToneAction::InternalizeL(class CEvtAction &)
+	??1CEvtEventManager@@UAE@XZ @ 18 NONAME ; CEvtEventManager::~CEvtEventManager(void)
+	?UpdateEventL@CEvtEventManager@@QAEXAAVCEvtEvent@@@Z @ 19 NONAME ; void CEvtEventManager::UpdateEventL(class CEvtEvent &)
+	?DeleteEventL@CEvtMgmtUiEngine@@QAEXK@Z @ 20 NONAME ; void CEvtMgmtUiEngine::DeleteEventL(unsigned long)
+	?EventL@CEvtMgmtUiEngine@@QAEPAVCEvtEvent@@K@Z @ 21 NONAME ; class CEvtEvent * CEvtMgmtUiEngine::EventL(unsigned long)
+	?Place@CEvtBasicEventInfo@@QBE?AVTPtrC16@@XZ @ 22 NONAME ; class TPtrC16 CEvtBasicEventInfo::Place(void) const
+	?SetObserver@CEvtMgmtUiEngine@@QAEXPAVMEvtMgmtUiEngineObserver@@@Z @ 23 NONAME ; void CEvtMgmtUiEngine::SetObserver(class MEvtMgmtUiEngineObserver *)
+	?EventStatus@CEvtBasicEventInfo@@QBE?AW4TEvtEventStatus@@XZ @ 24 NONAME ; enum TEvtEventStatus CEvtBasicEventInfo::EventStatus(void) const
+	?Radius@CEvtEvent@@QBENXZ @ 25 NONAME ; double CEvtEvent::Radius(void) const
+	?UpdateEventsStatusL@CEvtEventManager@@QAEXABV?$RArray@K@@W4TEvtEventStatus@@@Z @ 26 NONAME ; void CEvtEventManager::UpdateEventsStatusL(class RArray<unsigned long> const &, enum TEvtEventStatus)
+	?NewLC@CEvtAction@@SAPAV1@XZ @ 27 NONAME ; class CEvtAction * CEvtAction::NewLC(void)
+	?NewL@CEvtToneAction@@SAPAV1@XZ @ 28 NONAME ; class CEvtToneAction * CEvtToneAction::NewL(void)
+	?EventId@CEvtEvent@@QBEKXZ @ 29 NONAME ; unsigned long CEvtEvent::EventId(void) const
+	?HandleFiredTriggerStateL@CEvtMgmtUiEngine@@QAEXK@Z @ 30 NONAME ; void CEvtMgmtUiEngine::HandleFiredTriggerStateL(unsigned long)
+	?SyncDbsL@CEvtMgmtUiEngine@@QAEXXZ @ 31 NONAME ; void CEvtMgmtUiEngine::SyncDbsL(void)
+	?Subject@CEvtBasicEventInfo@@QBE?AVTPtrC16@@XZ @ 32 NONAME ; class TPtrC16 CEvtBasicEventInfo::Subject(void) const
+	?ConstructL@CEvtToneAction@@AAEXXZ @ 33 NONAME ; void CEvtToneAction::ConstructL(void)
+	?ExternalizeL@CEvtToneAction@@QAEXAAVCEvtAction@@@Z @ 34 NONAME ; void CEvtToneAction::ExternalizeL(class CEvtAction &)
+	?NewL@CEvtMgmtUiEngine@@SAPAV1@XZ @ 35 NONAME ; class CEvtMgmtUiEngine * CEvtMgmtUiEngine::NewL(void)
+	?SetSubjectL@CEvtBasicEventInfo@@QAEXABVTDesC16@@@Z @ 36 NONAME ; void CEvtBasicEventInfo::SetSubjectL(class TDesC16 const &)
+	?GetEventsL@CEvtEventManager@@QAEXAAV?$RPointerArray@VCEvtBasicEventInfo@@@@@Z @ 37 NONAME ; void CEvtEventManager::GetEventsL(class RPointerArray<class CEvtBasicEventInfo> &)
+	?GetEventsL@CEvtEventManager@@QAEXW4TEvtEventStatus@@AAV?$RPointerArray@VCEvtBasicEventInfo@@@@@Z @ 38 NONAME ; void CEvtEventManager::GetEventsL(enum TEvtEventStatus, class RPointerArray<class CEvtBasicEventInfo> &)
+	?AddEventL@CEvtEventManager@@QAEXAAVCEvtEvent@@@Z @ 39 NONAME ; void CEvtEventManager::AddEventL(class CEvtEvent &)
+	?SetPlaceL@CEvtEvent@@QAEXABVTDesC16@@@Z @ 40 NONAME ; void CEvtEvent::SetPlaceL(class TDesC16 const &)
+	?SetObserver@CEvtEventManager@@QAEXPAVMEvtStorageDbObserver@@@Z @ 41 NONAME ; void CEvtEventManager::SetObserver(class MEvtStorageDbObserver *)
+	?SetSubjectL@CEvtEvent@@QAEXABVTDesC16@@@Z @ 42 NONAME ; void CEvtEvent::SetSubjectL(class TDesC16 const &)
+	?NewLC@CEvtMgmtUiEngine@@SAPAV1@XZ @ 43 NONAME ; class CEvtMgmtUiEngine * CEvtMgmtUiEngine::NewLC(void)
+	?Repeat@CEvtEvent@@QBEHXZ @ 44 NONAME ; int CEvtEvent::Repeat(void) const
+	?SetActionL@CEvtEvent@@QAEXPAVCEvtAction@@@Z @ 45 NONAME ; void CEvtEvent::SetActionL(class CEvtAction *)
+	?SetEventId@CEvtEvent@@QAEXK@Z @ 46 NONAME ; void CEvtEvent::SetEventId(unsigned long)
+	?UpdateEventStatusL@CEvtEventManager@@QAEXKW4TEvtEventStatus@@@Z @ 47 NONAME ; void CEvtEventManager::UpdateEventStatusL(unsigned long, enum TEvtEventStatus)
+	?ConstructL@CEvtBasicEventInfo@@AAEXXZ @ 48 NONAME ; void CEvtBasicEventInfo::ConstructL(void)
+	??1CEvtBasicEventInfo@@UAE@XZ @ 49 NONAME ; CEvtBasicEventInfo::~CEvtBasicEventInfo(void)
+	??0CEvtToneAction@@AAE@XZ @ 50 NONAME ; CEvtToneAction::CEvtToneAction(void)
+	?EventStatus@CEvtEvent@@QBE?AW4TEvtEventStatus@@XZ @ 51 NONAME ; enum TEvtEventStatus CEvtEvent::EventStatus(void) const
+	?NewL@CEvtAction@@SAPAV1@XZ @ 52 NONAME ; class CEvtAction * CEvtAction::NewL(void)
+	?NewL@CEvtEventManager@@SAPAV1@XZ @ 53 NONAME ; class CEvtEventManager * CEvtEventManager::NewL(void)
+	?SetRepeat@CEvtBasicEventInfo@@QAEXH@Z @ 54 NONAME ; void CEvtBasicEventInfo::SetRepeat(int)
+	?RetrieveLocationL@CEvtMgmtUiEngine@@QAEXKAAVTCoordinate@@@Z @ 55 NONAME ; void CEvtMgmtUiEngine::RetrieveLocationL(unsigned long, class TCoordinate &)
+	?SetEventStatus@CEvtBasicEventInfo@@QAEXW4TEvtEventStatus@@@Z @ 56 NONAME ; void CEvtBasicEventInfo::SetEventStatus(enum TEvtEventStatus)
+	?AddEventL@CEvtMgmtUiEngine@@QAEXAAVCEvtEvent@@@Z @ 57 NONAME ; void CEvtMgmtUiEngine::AddEventL(class CEvtEvent &)
+	?NewLC@CEvtToneAction@@SAPAV1@XZ @ 58 NONAME ; class CEvtToneAction * CEvtToneAction::NewLC(void)
+	?Place@CEvtEvent@@QBE?AVTPtrC16@@XZ @ 59 NONAME ; class TPtrC16 CEvtEvent::Place(void) const
+	?NewL@CEvtEvent@@SAPAV1@XZ @ 60 NONAME ; class CEvtEvent * CEvtEvent::NewL(void)
+	?Location@CEvtEvent@@QBEAAVTPosition@@XZ @ 61 NONAME ; class TPosition & CEvtEvent::Location(void) const
+	?SetFileNameL@CEvtToneAction@@QAEXABVTDesC16@@@Z @ 62 NONAME ; void CEvtToneAction::SetFileNameL(class TDesC16 const &)
+	??0CEvtBasicEventInfo@@AAE@XZ @ 63 NONAME ; CEvtBasicEventInfo::CEvtBasicEventInfo(void)
+	?SetEventStateL@CEvtMgmtUiEngine@@QAEXW4TEvtEventStatus@@K@Z @ 64 NONAME ; void CEvtMgmtUiEngine::SetEventStateL(enum TEvtEventStatus, unsigned long)
+	?CalculateFiredAccuracyL@CEvtMgmtUiEngine@@QAE?AW4TEvtFireAccuracy@@K@Z @ 65 NONAME ; enum TEvtFireAccuracy CEvtMgmtUiEngine::CalculateFiredAccuracyL(unsigned long)
+	?NewLC@CEvtBasicEventInfo@@SAPAV1@XZ @ 66 NONAME ; class CEvtBasicEventInfo * CEvtBasicEventInfo::NewLC(void)
+	?NewLC@CEvtEventManager@@SAPAV1@XZ @ 67 NONAME ; class CEvtEventManager * CEvtEventManager::NewLC(void)
+	?FileName@CEvtToneAction@@QBE?AVTPtrC16@@XZ @ 68 NONAME ; class TPtrC16 CEvtToneAction::FileName(void) const
+	?Action@CEvtEvent@@QBEAAVCEvtAction@@XZ @ 69 NONAME ; class CEvtAction & CEvtEvent::Action(void) const
+	?HasAction@CEvtEvent@@QAEHXZ @ 70 NONAME ; int CEvtEvent::HasAction(void)
+	?RemoveObserver@CEvtMgmtUiEngine@@QAEXPAVMEvtMgmtUiEngineObserver@@@Z @ 71 NONAME ; void CEvtMgmtUiEngine::RemoveObserver(class MEvtMgmtUiEngineObserver *)
+	?SetEventStatus@CEvtEvent@@QAEXW4TEvtEventStatus@@@Z @ 72 NONAME ; void CEvtEvent::SetEventStatus(enum TEvtEventStatus)
+	?RemoveEventL@CEvtEventManager@@QAEXK@Z @ 73 NONAME ; void CEvtEventManager::RemoveEventL(unsigned long)
+	?UpdateModelL@CEvtMgmtUiEngine@@QAEXAAV?$RPointerArray@VCEvtBasicEventInfo@@@@W4TEvtEventStatusFilter@1@@Z @ 74 NONAME ; void CEvtMgmtUiEngine::UpdateModelL(class RPointerArray<class CEvtBasicEventInfo> &, enum CEvtMgmtUiEngine::TEvtEventStatusFilter)
+	?DeleteEventsL@CEvtMgmtUiEngine@@QAEXPBV?$RArray@K@@@Z @ 75 NONAME ; void CEvtMgmtUiEngine::DeleteEventsL(class RArray<unsigned long> const *)
+	?NewL@CEvtBasicEventInfo@@SAPAV1@XZ @ 76 NONAME ; class CEvtBasicEventInfo * CEvtBasicEventInfo::NewL(void)
+	?SetEventsStateL@CEvtMgmtUiEngine@@QAEXW4TEvtEventStatus@@PBV?$RArray@K@@@Z @ 77 NONAME ; void CEvtMgmtUiEngine::SetEventsStateL(enum TEvtEventStatus, class RArray<unsigned long> const *)
+	?SetToneLoop@CEvtToneAction@@QAEXH@Z @ 78 NONAME ; void CEvtToneAction::SetToneLoop(int)
+	?SetDescriptionL@CEvtEvent@@QAEXABVTDesC16@@@Z @ 79 NONAME ; void CEvtEvent::SetDescriptionL(class TDesC16 const &)
+	?SetEventId@CEvtBasicEventInfo@@QAEXK@Z @ 80 NONAME ; void CEvtBasicEventInfo::SetEventId(unsigned long)
+	?ConstructL@CEvtAction@@AAEXXZ @ 81 NONAME ; void CEvtAction::ConstructL(void)
+	?ToneLoop@CEvtToneAction@@QBEHXZ @ 82 NONAME ; int CEvtToneAction::ToneLoop(void) const
+	?Repeat@CEvtBasicEventInfo@@QBEHXZ @ 83 NONAME ; int CEvtBasicEventInfo::Repeat(void) const
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventsengine/eabi/evtengineu.def	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,114 @@
+EXPORTS
+	_ZN10CEvtAction10ConstructLEv @ 1 NONAME
+	_ZN10CEvtAction4NewLEv @ 2 NONAME
+	_ZN10CEvtAction5NewLCEv @ 3 NONAME
+	_ZN10CEvtActionC1Ev @ 4 NONAME
+	_ZN10CEvtActionC2Ev @ 5 NONAME
+	_ZN10CEvtActionD0Ev @ 6 NONAME
+	_ZN10CEvtActionD1Ev @ 7 NONAME
+	_ZN10CEvtActionD2Ev @ 8 NONAME
+	_ZN14CEvtToneAction10ConstructLEv @ 9 NONAME
+	_ZN14CEvtToneAction11SetToneLoopEi @ 10 NONAME
+	_ZN14CEvtToneAction12ExternalizeLER10CEvtAction @ 11 NONAME
+	_ZN14CEvtToneAction12InternalizeLER10CEvtAction @ 12 NONAME
+	_ZN14CEvtToneAction12SetFileNameLERK7TDesC16 @ 13 NONAME
+	_ZN14CEvtToneAction4NewLEv @ 14 NONAME
+	_ZN14CEvtToneAction5NewLCEv @ 15 NONAME
+	_ZN14CEvtToneActionC1Ev @ 16 NONAME
+	_ZN14CEvtToneActionC2Ev @ 17 NONAME
+	_ZN14CEvtToneActionD0Ev @ 18 NONAME
+	_ZN14CEvtToneActionD1Ev @ 19 NONAME
+	_ZN14CEvtToneActionD2Ev @ 20 NONAME
+	_ZN16CEvtEventManager10GetEventsLE15TEvtEventStatusR13RPointerArrayI18CEvtBasicEventInfoE @ 21 NONAME
+	_ZN16CEvtEventManager10GetEventsLER13RPointerArrayI18CEvtBasicEventInfoE @ 22 NONAME
+	_ZN16CEvtEventManager11SetObserverEP21MEvtStorageDbObserver @ 23 NONAME
+	_ZN16CEvtEventManager12RemoveEventLEm @ 24 NONAME
+	_ZN16CEvtEventManager12UpdateEventLER9CEvtEvent @ 25 NONAME
+	_ZN16CEvtEventManager13RemoveEventsLERK6RArrayImE @ 26 NONAME
+	_ZN16CEvtEventManager18UpdateEventStatusLEm15TEvtEventStatus @ 27 NONAME
+	_ZN16CEvtEventManager19UpdateEventsStatusLERK6RArrayImE15TEvtEventStatus @ 28 NONAME
+	_ZN16CEvtEventManager4NewLEv @ 29 NONAME
+	_ZN16CEvtEventManager5NewLCEv @ 30 NONAME
+	_ZN16CEvtEventManager9AddEventLER9CEvtEvent @ 31 NONAME
+	_ZN16CEvtEventManager9GetEventLEm @ 32 NONAME
+	_ZN16CEvtEventManagerD0Ev @ 33 NONAME
+	_ZN16CEvtEventManagerD1Ev @ 34 NONAME
+	_ZN16CEvtEventManagerD2Ev @ 35 NONAME
+	_ZN16CEvtMgmtUiEngine11SetObserverEP24MEvtMgmtUiEngineObserver @ 36 NONAME
+	_ZN16CEvtMgmtUiEngine12DeleteEventLEm @ 37 NONAME
+	_ZN16CEvtMgmtUiEngine12ModifyEventLER9CEvtEventm @ 38 NONAME
+	_ZN16CEvtMgmtUiEngine12UpdateModelLER13RPointerArrayI18CEvtBasicEventInfoENS_21TEvtEventStatusFilterE @ 39 NONAME
+	_ZN16CEvtMgmtUiEngine13CancelRequestEv @ 40 NONAME
+	_ZN16CEvtMgmtUiEngine13DeleteEventsLEPK6RArrayImE @ 41 NONAME
+	_ZN16CEvtMgmtUiEngine14RemoveObserverEP24MEvtMgmtUiEngineObserver @ 42 NONAME
+	_ZN16CEvtMgmtUiEngine14SetEventStateLE15TEvtEventStatusm @ 43 NONAME
+	_ZN16CEvtMgmtUiEngine15SetEventsStateLE15TEvtEventStatusPK6RArrayImE @ 44 NONAME
+	_ZN16CEvtMgmtUiEngine17RetrieveLocationLEmR11TCoordinate @ 45 NONAME
+	_ZN16CEvtMgmtUiEngine23CalculateFiredAccuracyLEm @ 46 NONAME
+	_ZN16CEvtMgmtUiEngine24HandleFiredTriggerStateLEm @ 47 NONAME
+	_ZN16CEvtMgmtUiEngine4NewLEv @ 48 NONAME
+	_ZN16CEvtMgmtUiEngine5NewLCEv @ 49 NONAME
+	_ZN16CEvtMgmtUiEngine6EventLEm @ 50 NONAME
+	_ZN16CEvtMgmtUiEngine8SyncDbsLEv @ 51 NONAME
+	_ZN16CEvtMgmtUiEngine9AddEventLER9CEvtEvent @ 52 NONAME
+	_ZN18CEvtBasicEventInfo10ConstructLEv @ 53 NONAME
+	_ZN18CEvtBasicEventInfo10SetEventIdEm @ 54 NONAME
+	_ZN18CEvtBasicEventInfo11SetSubjectLERK7TDesC16 @ 55 NONAME
+	_ZN18CEvtBasicEventInfo14SetEventStatusE15TEvtEventStatus @ 56 NONAME
+	_ZN18CEvtBasicEventInfo4NewLEv @ 57 NONAME
+	_ZN18CEvtBasicEventInfo5NewLCEv @ 58 NONAME
+	_ZN18CEvtBasicEventInfo9SetPlaceLERK7TDesC16 @ 59 NONAME
+	_ZN18CEvtBasicEventInfo9SetRepeatEi @ 60 NONAME
+	_ZN18CEvtBasicEventInfoC1Ev @ 61 NONAME
+	_ZN18CEvtBasicEventInfoC2Ev @ 62 NONAME
+	_ZN18CEvtBasicEventInfoD0Ev @ 63 NONAME
+	_ZN18CEvtBasicEventInfoD1Ev @ 64 NONAME
+	_ZN18CEvtBasicEventInfoD2Ev @ 65 NONAME
+	_ZN9CEvtEvent10ConstructLEv @ 66 NONAME
+	_ZN9CEvtEvent10SetActionLEP10CEvtAction @ 67 NONAME
+	_ZN9CEvtEvent10SetEventIdEm @ 68 NONAME
+	_ZN9CEvtEvent11SetSubjectLERK7TDesC16 @ 69 NONAME
+	_ZN9CEvtEvent14SetEventStatusE15TEvtEventStatus @ 70 NONAME
+	_ZN9CEvtEvent15SetDescriptionLERK7TDesC16 @ 71 NONAME
+	_ZN9CEvtEvent4NewLEv @ 72 NONAME
+	_ZN9CEvtEvent5NewLCEv @ 73 NONAME
+	_ZN9CEvtEvent9HasActionEv @ 74 NONAME
+	_ZN9CEvtEvent9SetPlaceLERK7TDesC16 @ 75 NONAME
+	_ZN9CEvtEvent9SetRadiusEd @ 76 NONAME
+	_ZN9CEvtEvent9SetRepeatEi @ 77 NONAME
+	_ZNK10CEvtAction4TypeEv @ 78 NONAME
+	_ZNK14CEvtToneAction8FileNameEv @ 79 NONAME
+	_ZNK14CEvtToneAction8ToneLoopEv @ 80 NONAME
+	_ZNK18CEvtBasicEventInfo11EventStatusEv @ 81 NONAME
+	_ZNK18CEvtBasicEventInfo5PlaceEv @ 82 NONAME
+	_ZNK18CEvtBasicEventInfo6RepeatEv @ 83 NONAME
+	_ZNK18CEvtBasicEventInfo7EventIdEv @ 84 NONAME
+	_ZNK18CEvtBasicEventInfo7SubjectEv @ 85 NONAME
+	_ZNK9CEvtEvent11DescriptionEv @ 86 NONAME
+	_ZNK9CEvtEvent11EventStatusEv @ 87 NONAME
+	_ZNK9CEvtEvent5PlaceEv @ 88 NONAME
+	_ZNK9CEvtEvent6ActionEv @ 89 NONAME
+	_ZNK9CEvtEvent6RadiusEv @ 90 NONAME
+	_ZNK9CEvtEvent6RepeatEv @ 91 NONAME
+	_ZNK9CEvtEvent7EventIdEv @ 92 NONAME
+	_ZNK9CEvtEvent7SubjectEv @ 93 NONAME
+	_ZNK9CEvtEvent8LocationEv @ 94 NONAME
+	_ZTI10CEvtAction @ 95 NONAME ; #<TI>#
+	_ZTI12CEvtDatabase @ 96 NONAME ; #<TI>#
+	_ZTI14CEvtDbNotifier @ 97 NONAME ; #<TI>#
+	_ZTI14CEvtToneAction @ 98 NONAME ; #<TI>#
+	_ZTI16CEvtEventManager @ 99 NONAME ; #<TI>#
+	_ZTI16CEvtMgmtUiEngine @ 100 NONAME ; #<TI>#
+	_ZTI18CEvtBasicEventInfo @ 101 NONAME ; #<TI>#
+	_ZTI20CEvtMgmtUiLbtAdapter @ 102 NONAME ; #<TI>#
+	_ZTI9CEvtEvent @ 103 NONAME ; #<TI>#
+	_ZTV10CEvtAction @ 104 NONAME ; #<VT>#
+	_ZTV12CEvtDatabase @ 105 NONAME ; #<VT>#
+	_ZTV14CEvtDbNotifier @ 106 NONAME ; #<VT>#
+	_ZTV14CEvtToneAction @ 107 NONAME ; #<VT>#
+	_ZTV16CEvtEventManager @ 108 NONAME ; #<VT>#
+	_ZTV16CEvtMgmtUiEngine @ 109 NONAME ; #<VT>#
+	_ZTV18CEvtBasicEventInfo @ 110 NONAME ; #<VT>#
+	_ZTV20CEvtMgmtUiLbtAdapter @ 111 NONAME ; #<VT>#
+	_ZTV9CEvtEvent @ 112 NONAME ; #<VT>#
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventsengine/group/bld.inf	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,38 @@
+/*
+* 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:  Build information file for Events Engine
+*
+*/
+
+
+
+PRJ_PLATFORMS
+DEFAULT    
+
+PRJ_EXPORTS
+../inc/evtmgmtuiengine.h                 |../../inc/evtmgmtuiengine.h
+../inc/evtmgmtuilbtadapter.h             |../../inc/evtmgmtuilbtadapter.h 
+../inc/evtmgmtuilbtobserver.h            |../../inc/evtmgmtuilbtobserver.h
+
+../inc/evteventmanager.h                 |../../inc/evteventmanager.h 
+../inc/evtdefs.h                         |../../inc/evtdefs.h 
+../inc/evtbasiceventinfo.h               |../../inc/evtbasiceventinfo.h 
+../inc/evtevent.h                        |../../inc/evtevent.h 
+../inc/evtaction.h                       |../../inc/evtaction.h 
+../inc/evttoneaction.h                   |../../inc/evttoneaction.h 
+../inc/evtstoragedbobserver.h            |../../inc/evtstoragedbobserver.h
+../inc/evtstoragedomaincrkeys.h          |../../inc/evtstoragedomaincrkeys.h
+
+PRJ_MMPFILES
+evtengine.mmp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventsengine/group/evtengine.mmp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,58 @@
+/*
+* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Project definition file for Events Engine
+*
+*/
+
+
+// Includes 
+#include "../inc/evtengineuid.hrh"		// For UID3
+
+// SYSTEM INCLUDE
+#include <data_caging_paths.hrh>
+#include <platform_paths.hrh> // For the APP_LAYER_SYSTEMINCLUDE
+
+// Target information
+TARGET  		evtengine.dll
+TARGETTYPE  	dll
+UID  			0x0 EVTENGINE_UID3
+CAPABILITY 		CAP_GENERAL_DLL
+VENDORID 		VID_DEFAULT
+
+// System Includes
+APP_LAYER_SYSTEMINCLUDE
+
+// User Includes
+USERINCLUDE     ../inc ../../inc
+SOURCEPATH      ../src
+
+SOURCE 			        evtmgmtuiengine.cpp
+SOURCE 			        evtmgmtuilbtadapter.cpp
+SOURCE                  evteventmanager.cpp
+SOURCE                  evtbasiceventinfo.cpp
+SOURCE                  evtevent.cpp
+SOURCE                  evtaction.cpp
+SOURCE                  evttoneaction.cpp
+SOURCE                  evtdatabase.cpp
+SOURCE                  evtdbnotifier.cpp
+
+LIBRARY                 estor.lib	
+LIBRARY                 euser.lib 			
+LIBRARY                 sqldb.lib               // Sqlite
+LIBRARY                 centralrepository.lib   // CRepository
+LIBRARY                 evtutils.lib
+LIBRARY		            lbt.lib
+LiBRARY		            lbs.lib 
+
+DEFFILE                 evtengine.def
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventsengine/inc/evtaction.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,195 @@
+/*
+* 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:  Class for the Location Events Action.
+*
+*/
+
+
+#ifndef C_EVTACTION_H
+#define C_EVTACTION_H
+
+// System Includes
+
+// User Includes
+#include "evtdefs.h"
+
+// Forward Declarations
+
+// extern data types
+
+// global Functions
+/**
+ * @enum TEvtActionType
+ * Action Type for an Event.
+ *
+ */
+enum TEvtActionType
+    {
+    /**
+     * The Action for the Event is to play Alarm Tone.
+     */
+    EAlarm                               = 0
+    };
+        
+/**
+ *  @class CEvtAction
+ *  Class that represents the action for an Event
+ *
+ *  This class encapsultes the Action information like action type
+ *  and generic string for action. This class allows for Internalizing
+ *	Externalizing the action.
+ *
+ *  @lib evtstorage.lib
+ *  @since S60 v9.1
+ */
+class CEvtAction : public CBase
+    {
+public:  
+    /**
+     * Constructs a new instance of Event Action.
+     *
+     * @return The new instance of Event Action object.
+     * @leave System wide error code if the object creation fails.         
+     */
+    IMPORT_C static CEvtAction* NewL();
+    
+    /**
+     * Constructs a new instance of Event Action.
+     * Leaves the created instance on the cleanup stack.
+     *
+     * @return The new instance of Event object.
+     * @leave System wide error code if the object creation fails.
+     */
+    IMPORT_C static CEvtAction* NewLC();  
+
+    /**
+    * Destructor.
+    */
+    virtual ~CEvtAction();
+
+public: // Get and Set methods
+    
+    /**
+     * Gets the Action id, identifying the Location Event's Action.
+     * This identifier is definded by Storage Db on creation.   
+     *
+     * @since S60 v9.1     
+     * @return Identifier identifying the Location Event's Action.
+     */
+    TInt64 Id() const;
+ 
+    /**
+     * Set the Action id, identifying the Location Event's Action. 
+     * This identifier is definded by Storage Db on creation.
+     *
+     * @since S60 v9.1   
+     * @param[in] aId Action identifier identifying the Location 
+     * 					Event's Action.
+     */
+    void SetId( const TInt64 aId );
+    
+    /**
+     * Gets the Trigger id, identifying the Location Event to which
+     * Action is associated with.
+     * This identifier is definded by Storage Db on creation.   
+     *
+     * @since S60 v9.1     
+     * @return Event identifier identifying the Location Event.
+     */
+    TEvtEventId EvtId() const;
+ 
+    /**
+     * Set the Trigger id, identifying the Location Event to which
+     * Action is associated with.
+     * This identifer is definded by Storage Db on creation.
+     *
+     * @since S60 v9.1   
+     * @param[in] aId Action identifier identifying the Location 
+     * 					Event's Action.
+     */
+    void SetEvtId( const TEvtEventId aId );
+    
+    /**
+     * Gets the Action type for the Location Event.
+     * The Type is defined when an event is created.
+     *
+     * @since S60 v9.1    
+     * @return TEvtActionType Type of Location Event.
+     */
+    IMPORT_C TEvtActionType Type() const;
+
+    /** 
+     * Set the Action type for the Location Event.
+     *
+     * @since S60 v9.1  
+     * @param[in] TEvtActionType Type for Location Event. 
+     */
+    void SetType( const TEvtActionType aType );
+    
+    /**
+     * Gets the Action for the Location Events.
+     * The Action is defined by the Location EventsUi on Creation.
+     * A reference to the object's internal string is returned.
+     *
+     * @since S60 v9.1    
+     * @return Action String for the Location Event.
+     */
+    TPtrC Action() const;
+
+    /** 
+     * Set the Action String for the Location Event. The Action is 
+     * copied.
+     *
+     * @since S60 v9.1  
+     * @param[in] aAction Action String for the Location Event. 
+     *                  The Action string is copied.
+     * @leave KErrNoMemory If there is not enough memory to copy the string.
+     */
+    void SetActionL( const TDesC& aAction );
+
+private: // methods
+    /**
+     * Default C++ Constructor.
+     */
+    CEvtAction();
+
+    /**
+     * Second phase of the two phase constructor.
+     */
+    void ConstructL();
+
+private: // data
+	
+	/**
+	 * Action Id for an Event.
+	 */
+	TInt64					iId;
+	
+	/**
+	 * Event Id to which the Action is associated with.
+	 */
+	TEvtEventId				iEvtId;
+	
+	/**
+	 * Action Type for an Event.
+	 */
+	TEvtActionType				    iType;
+	
+	/**
+	 * Action String for an Event.
+	 */
+	HBufC*				            iActionString;
+    };
+
+#endif // C_EVTACTION_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventsengine/inc/evtbasiceventinfo.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,227 @@
+/*
+* 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:  Basic Classes for the Location Events.
+*
+*/
+
+
+#ifndef C_EVTBASICEVENTINFO_H
+#define C_EVTBASICEVENTINFO_H
+
+// System Includes
+#include <e32base.h>
+
+// User Includes
+#include "evtdefs.h"
+
+// Forward Declarations
+
+// extern data types
+
+// global Functions
+
+// constants go here
+/**
+ *  @class CEvtBasicEventInfoInfo
+ *  Class for the basic Location Event information.
+ *
+ *  This class is used to store the basic information for an event.
+ *
+ *  @lib evtstorage.lib
+ *  @since S60 v9.1
+ */
+class CEvtBasicEventInfo : public CBase
+    {
+public:  
+    /**
+     * Constructs a new instance of CEvtBasicEventInfo.
+     *
+     * @return The new instance of CEvtBasicEventInfo object.
+     * @leave System wide error code if the object creation fails.         
+     */
+    IMPORT_C static CEvtBasicEventInfo* NewL();
+    
+    /**
+     * Constructs a new instance of CEvtBasicEventInfo Object.
+     * Leaves the created instance on the cleanup stack.
+     *
+     * @return The new instance of CEvtBasicEventInfo object.
+     * @leave System wide error code if the object creation fails.         
+     */
+    IMPORT_C static CEvtBasicEventInfo* NewLC();  
+
+    /**
+    * Destructor.
+    */
+    virtual ~CEvtBasicEventInfo();
+
+public: // Get and Set methods
+    
+    /**
+     * Gets the Trigger id, identifying the Location Event.
+     * This identifier is definded by Location Triggering Engine.   
+     *
+     * @since S60 v9.1     
+     * @return Event identifier identifying the Location Event.
+     */
+    IMPORT_C TEvtEventId EventId() const;
+ 
+    /**
+     * Set the Trigger id, identifying the Location Event. The
+     * identifer is definded by Location Triggering Engine.
+     *
+     * @since S60 v9.1   
+     * @param[in] aId Event identifier identifying the Location Event.
+     */
+    IMPORT_C void SetEventId( const TEvtEventId aId );
+    
+    /**
+     * Gets the Subject for the Location Events.
+     * The Subject is defined by the Location EventsUi on Creation.
+     * A reference to the object's internal string is returned.
+     *
+     * @since S60 v9.1    
+     * @return Subject for the Location Event. If the Subject has not 
+     *         been set for the Location Event, then a NULL
+     *         string is returned.
+     */
+    IMPORT_C TPtrC Subject() const;
+
+    /** 
+     * Set the Subject String for the Location Event. The Subject is 
+     * copied.
+     *
+     * @since S60 v9.1  
+     * @param[in] aSubject Subject String for the Location Event. 
+     *                  The Subject string is copied.
+     * @leave KErrNoMemory If there is not enough memory to copy the string.
+     */
+    IMPORT_C void SetSubjectL( const TDesC& aSubject );
+    
+    /**
+     * Gets the Place for the Location Events.
+     * The Place is defined by the Location EventsUi on Creation.
+     * A reference to the object's internal string is returned.
+     *
+     * @since S60 v9.1    
+     * @return Place String for the Location Event. If the Place has not 
+     *         been set for the Location Event, then a NULL
+     *         string is returned.
+     */
+    IMPORT_C TPtrC Place() const;
+
+    /** 
+     * Set the Place String for the Location Event. The Place is 
+     * copied.
+     *
+     * @since S60 v9.1  
+     * @param[in] aPlace Place String for the Location Event. 
+     *                  The Place string is copied.
+     * @leave KErrNoMemory If there is not enough memory to copy the string.
+     */
+    IMPORT_C void SetPlaceL( const TDesC& aPlace );
+    
+    /**
+     * Gets the Status of the Location Event.
+     * The Status is defined by the Location EventsUi on Creation.
+     * Status is updated as and when the Event moves to different state.
+     *
+     * @since S60 v9.1    
+     * @return TEvtBasicEventStatus Status for the Location Event.
+     */
+    IMPORT_C TEvtEventStatus EventStatus() const;
+
+    /** 
+     * Set the Status for the Location Event.
+     *
+     * @since S60 v9.1  
+     * @param[in] aEventStatus Status for the Location Event. 
+     */
+    IMPORT_C void SetEventStatus( 
+                            const TEvtEventStatus aEventStatus );
+
+    /**
+     * Gets the Repeast flag for the Location Event.
+     * The Repeast is defined by the Location EventsUi on Creation.
+     *
+     * @since S60 v9.1    
+     * @return TBool Repeat flag for the Location Event.
+     */
+    IMPORT_C TBool Repeat() const;
+
+    /** 
+     * Set the Repeat flag for the Location Event.
+     *
+     * @since S60 v9.1  
+     * @param[in] TBool Repeat flag for the Location Event. 
+     */
+    IMPORT_C void SetRepeat( const TBool aRepeat );
+    
+private: // methods
+    /**
+     * Default C++ Constructor.
+     */
+    CEvtBasicEventInfo();
+    
+    /**
+     * Default Copy Constructor.
+     */
+    CEvtBasicEventInfo(CEvtBasicEventInfo& );
+
+    /**
+     * Second phase of the two phase constructor.
+     */
+    void ConstructL();
+
+private: // data
+    
+    /**
+     * System wide unique identifier identifying the Location Event. 
+     * This identifier is defined by the Location Triggering Engine.
+     *
+     * Owns
+     */
+    TEvtEventId                          iEventId;
+    
+    /**
+     * Event Subject.
+     * Subject for the Location Event. The Subject is defined by the Location
+     * Events Ui.
+     * 
+     * Owns
+     */
+    HBufC*                          iSubject;
+    
+    /**
+     * Event Place.
+     * Place for the Location Event. The String is defined by the Location
+     * Events Ui.
+     * 
+     * Owns
+     */
+    HBufC*                          iPlace;
+    
+    /**
+     * Repeat Event.
+     */
+    TBool                           iRepeat;
+	
+	/**
+	 * Event Status.
+	 */
+	TEvtEventStatus					iEventStatus;
+
+    };
+
+#endif // C_EVTBASICEVENTINFO_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventsengine/inc/evtconsts.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,190 @@
+/*
+* 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:  Constants for project Storage API
+*
+*/
+
+
+#ifndef EVTCONSTS_H
+#define EVTCONSTS_H
+
+//-- Database Names
+_LIT(KEventsDbSecureFName, "c:[2001E663]EvtStorage.db");
+
+//-- Config 
+_LIT8(KServerConfigString, ";cache_size =  1024 ;page_size =1024 ;encoding =  \"UTF-8\" ");
+
+//===============================
+// Create Table:
+//===============================
+_LIT8(KCreateEventTable, "\
+CREATE TABLE Event(\
+EventId INTEGER,\
+Status INTEGER,\
+Subject VARCHAR(160) DEFAULT NULL,\
+Place VARCHAR(160) DEFAULT NULL,\
+Radius REAL,\
+Description VARCHAR(160) DEFAULT NULL,\
+Repeat BOOLEAN)\
+");
+
+_LIT8(KCreateActionTable, "\
+CREATE TABLE Action(\
+Id INTEGER PRIMARY KEY,\
+Action VARCHAR(160) DEFAULT NULL,\
+EvtId INTEGER)\
+");
+//===============================
+// Indexes:
+//===============================
+_LIT8(KCreateEventStatusSubjectIndex, "CREATE INDEX EventStatus ON Event (Status)");
+_LIT8(KCreateEventEvtIdIndex, "CREATE INDEX EventEvtID ON Event (EventId)");
+_LIT8(KCreateActionEvtIdIndex, "CREATE INDEX ActionID ON Action (EvtId)");
+
+//===============================
+// Trigger: for Action and Place
+//===============================
+//-- Foreign Key Preventing insert
+_LIT8(KCreateTriggerActionEventInsert, "\
+CREATE TRIGGER fki_Action_EvtId_Event_EventId\
+BEFORE INSERT ON [Action]\
+FOR EACH ROW BEGIN\
+  SELECT RAISE(ROLLBACK, 'insert on table \"Action\" violates foreign key constraint \"fki_Action_EvtId_Event_EventId\"')\
+  WHERE NEW.EvtId IS NOT NULL AND (SELECT EventId FROM Event WHERE EventId = NEW.EvtId) IS NULL;\
+END;\
+");
+
+//-- Foreign key preventing update
+_LIT8(KCreateTriggerActionEventUpdate, "\
+CREATE TRIGGER fku_Action_EvtId_Event_EventId\
+BEFORE UPDATE ON [Action] \
+FOR EACH ROW BEGIN\
+    SELECT RAISE(ROLLBACK, 'update on table \"Action\" violates foreign key constraint \"fku_Action_EvtId_Event_EventId\"')\
+      WHERE NEW.EvtId IS NOT NULL AND (SELECT EventId FROM Event WHERE EventId = NEW.EvtId) IS NULL;\
+END;\
+");
+
+//-- Cascading Delete
+_LIT8(KCreateTriggerActionEventDelete, "\
+CREATE TRIGGER fkdc_Action_EvtId_Event_EventId\
+BEFORE DELETE ON Event \
+FOR EACH ROW BEGIN\
+    DELETE FROM Action WHERE Action.EvtId = OLD.EventId;\
+END;\
+");
+
+//-- Drop Trigger
+_LIT8(KDropTriggerActionEventInsert, "\
+DROP TRIGGER fki_Action_EvtId_Event_EventId;\
+");
+_LIT8(KDropTriggerActionEventUpdate, "\
+DROP TRIGGER fku_Action_EvtId_Event_EventId;\
+");
+_LIT8(KDropTriggerActionEventDelete, "\
+DROP TRIGGER fkdc_Action_EvtId_Event_EventId;\
+");
+
+//===============================
+// Queries: 
+//===============================
+
+// Define Literals that are used in Query
+_LIT(KId, ":IdVal");
+_LIT(KEventId, ":EventIdVal");
+_LIT(KStatus, ":StatusVal");
+_LIT(KSubject, ":SubjectVal");
+_LIT(KPlace, ":PlaceVal");
+_LIT(KRadius, ":RadiusVal");
+_LIT(KUnit, ":UnitVal");
+_LIT(KDescription, ":DescVal");
+_LIT(KRepeat, ":RepeatVal");
+_LIT(KAction, ":ActionVal");
+_LIT(KEvtId, ":EvtIdVal");
+
+// Query to select Event based on LBT's event Id
+_LIT8(KSelectEventFromEventId, "SELECT Event.Status,Event.Subject,Event.Place,Event.Radius,Event.Description,Event.Repeat,Action.Id,Action.Action,Action.EvtId FROM Event INNER JOIN Action ON (Event.EventId=:EventIdVal AND Event.EventId=Action.EvtId);");
+
+// Query to select All Events - Only Basic Information
+_LIT8(KSelectBasicEvent, "SELECT Event.EventId,Event.Status,Event.Subject,Event.Place,Event.Repeat FROM Event ORDER BY Status,Subject COLLATE CompareC3;");
+
+// Query to select All Events based on Status - Only Basic Information
+_LIT8(KSelectBasicEventOnStatus, "SELECT Event.EventId,Event.Status,Event.Subject,Event.Place,Event.Repeat FROM Event WHERE Event.Status=:StatusVal ORDER BY Event.Subject COLLATE CompareC3;");
+
+// Query to select All Events based on Status
+_LIT8(KSelectEventOnStatus, "SELECT Event.EventId,Event.Status,Event.Subject,Event.Place,Event.Radius,Event.Description,Event.Repeat,Action.Action,Action.Id,Action.EvtId FROM Event INNER JOIN Action ON (Event.EventId=Action.EvtId) WHERE Event.Status=:StatusVal ORDER BY Event.Subject COLLATE CompareC3;");
+
+// Query to check the prsence of Event
+_LIT8(KSelectEvent, "SELECT EventId FROM Event WHERE Event.EventId=:EventIdVal;");
+
+// Query to select All Action based on Status
+_LIT8(KSelectAction, "SELECT Id FROM Action WHERE Action.Id=:IdVal;");
+
+// Query to select Action based on Event Id
+_LIT8(KSelectActionFromEvent, "SELECT Id FROM Action WHERE Action.EvtId=:EvtIdVal;");
+
+// Query to Insert an Event into Event Table
+_LIT8(KInsertEvent, "INSERT INTO Event(EventId,Status,Subject,Place,Radius,Description,Repeat) VALUES(:EventIdVal,:StatusVal,:SubjectVal,:PlaceVal,:RadiusVal,:DescVal,:RepeatVal)");
+
+// Query to Insert an Action into Action Table
+_LIT8(KInsertAction, "INSERT INTO Action(Action,EvtId) VALUES(:ActionVal,:EvtIdVal)");
+
+// Queries to Inserts using TSqlRowSetUtil
+_LIT(KInsertEventRowDesc, "INSERT INTO Event(EventId) VALUES(%ld)"); // Not Used
+_LIT(KInsertActionRowDesc, "INSERT INTO Action(EvtId) VALUES(%d)");
+_LIT(KInsertEventDesc, "INSERT INTO Event(EventId,Status,Subject,Place,Radius,Description,Repeat) VALUES(%ld,%d,'%S','%S',%f,'%S',%d)");
+_LIT(KInsertActionDesc, "INSERT INTO Action(Action,EvtId) VALUES('%S',%d)");
+
+// Query to Update Event table based on Event/Trigger Id
+_LIT8(KUpdateEvent, "UPDATE Event SET Status=:StatusVal,Subject=:SubjectVal,Place=:PlaceVal,Radius=:RadiusVal,Description=:DescVal,Repeat=:RepeatVal WHERE EventId=:EventIdVal");
+
+// Query to Update Action table based on Event/Trigger Id
+_LIT8(KUpdateAction, "UPDATE Action SET Action=:ActionVal,EvtId=:EvtIdVal WHERE Id=:IdVal");
+
+// Query to Update Event status based on Event/Trigger Id
+_LIT8(KUpdateEventStatus, "UPDATE Event SET Status=:StatusVal WHERE EventId=:EventIdVal");
+
+// Query to Delete Action based on Event/Trigger Id
+_LIT8(KDeleteAction, "DELETE FROM Action WHERE Action.EvtId=:EvtIdVal");
+
+// Query to Delete Event based on Event/Trigger Id
+_LIT8(KDeleteEvent, "DELETE FROM Event WHERE Event.EventId=:EventIdVal");
+
+// -- New Strings for Delete Multiple
+// OR String
+_LIT8(KOr, " OR ");
+
+// AND String
+_LIT8(KAnd, " AND ");
+
+// AND String
+_LIT8(KWhere, " WHERE ");
+
+// Action String Id
+_LIT8(KMultiActionId, "Action.EvtId = ");
+
+// Event String Id
+_LIT8(KMultiEventId, "Event.EventId = ");
+
+// Query to Delete Action based on Event/Trigger Id
+_LIT8(KDeleteMultiAction, "DELETE FROM Action WHERE ");
+
+// Query to Delete Event based on Event/Trigger Id
+_LIT8(KDeleteMultiEvent, "DELETE FROM Event WHERE ");
+
+// Query to Delete Action based on Event/Trigger Id
+_LIT8(KUpdateMultiStatus, "UPDATE Event SET Status = ");
+
+#endif      // EVTCONSTS_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventsengine/inc/evtdatabase.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,248 @@
+/*
+* 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:  Class that directly interacts with Sqlite database.
+*
+*/
+
+
+#ifndef C_EVTDATABASE_H
+#define C_EVTDATABASE_H
+
+// System Includes
+#include <sqldb.h>
+
+// User Includes
+#include "evtbasiceventinfo.h"
+#include "evtevent.h"
+#include "evtdbobserver.h"
+#include "evtstoragedbobserver.h"
+
+// Forward Declarations
+class CEvtDbNotifier;
+
+// extern data types
+
+// global Functions
+
+// constants
+const TInt KTempStringLength=32;
+
+/**
+ *  Interface class to Location Events Database.
+ *  This class allows for Events to be stored in persistent database
+ *   - Sqlite. Events can be added, deleted and modified from 
+ *  database.
+ *
+ *  @lib evtstorage.lib
+ *  @since S60 v9.1
+ */
+class CEvtDatabase : public CBase, 
+					   public MEvtDbObserver
+    {   
+public:  // Member Functions
+    /**
+     * Constructs a new instance of CEvtDatabase.
+     *
+     * @return The new instance of CEvtDatabase.
+     * @leave System wide error code if the object creation fails.         
+     */
+    static CEvtDatabase* NewL( );
+    
+    /**
+     * Constructs a new instance of Event Storage Manager interface.
+     * Leaves the created instance on the cleanup stack.
+     *
+     * @return The new instance of CEvtDatabase.
+     * @leave System wide error code if the object creation fails.         
+     */
+    static CEvtDatabase* NewLC( );  
+
+    /**
+    * Destructor.
+    */
+    virtual ~CEvtDatabase();
+                    
+    /**
+     * Get Events List based on status.
+     */                
+    void GetEventsL( TEvtEventStatus 	aEvtStatus,
+                     RPointerArray<CEvtBasicEventInfo>& aEvtEventArray );
+                    
+    /**
+     * Get Events List based on status.
+     */                
+    void GetEventsL( RPointerArray<CEvtBasicEventInfo>& aEvtEventArray );
+		
+    /**
+     * Get Event based on unique Id.
+     */    
+    CEvtEvent* GetEventL( TEvtEventId aEvtId  );
+	
+    /**
+     * Update Event based on unique Id.
+     */    
+    void UpdateEventL( CEvtEvent& aEvtEvent );
+	
+    /**
+     * Insert Event to database.
+     */    
+    void AddEventL( CEvtEvent&     aEvtEvent );
+	
+    /**
+     * Remove Events from database.
+     */    
+    void RemoveEventsL( const RArray<TEvtEventId>& aEvtIdArray );
+	
+    /**
+     * Update Event Status.
+     */ 
+    void UpdateEventsStatusL( const RArray<TEvtEventId>& aEventArray,  TEvtEventStatus  aEvtStatus );
+
+    /**
+     * Update Event Status based on unique Id.
+     */    
+    void UpdateEventStatusL( 
+                            TEvtEventId      aEvtId,
+                            TEvtEventStatus    aEvtStatus);
+                            
+    /**
+     * Remove Event from database based on unique Id.
+     */    
+    void RemoveEventL( TEvtEventId      aEvtId );	
+	
+    /**
+     * Set the Observer fo Storage Database.
+     */
+    void SetObserver( MEvtStorageDbObserver* aStorageDbObserver );
+	
+	 // Inherited from MEvtDbObserver
+    /**
+     * Observer for TDbChangeType changes in Storage Database.
+     */
+    void HandleDbChangedL( );
+
+   
+private:
+
+    /**
+     * Open Database Connection.
+     */
+	void OpenDatabaseL( );
+
+    /**
+     * Create and Open Database Connection.
+     */
+	void CreateOpenDatabaseL( );
+
+    /**
+     * Close Database Connection.
+     */
+	void CloseDatabase();
+
+    /**
+     * Create the Schema for Events Storage.
+     */
+	void CreateSchemaL();
+
+    /**
+     * Create All the Tables.
+     */
+	void CreateTablesL();
+
+    /**
+     * Create All the Indexes.
+     */
+	void CreateIndexL();
+
+    /**
+     * Create All the related Triggers.
+     */
+	void CreateTriggerL();
+
+    /**
+     * Get Events based on Query String.
+     */
+    void GetEventsL( RSqlStatement& 	aStmt,
+                     RPointerArray<CEvtBasicEventInfo>& aEvtEventArray );
+                     
+    /**
+     * Update Event Table.
+     */
+    void UpdateEventTableL( CEvtEvent&          aEvtEvent );
+
+    /**
+     * Delete Event.
+     */
+	void DeleteEventL( TEvtEventId          aEventId );
+
+    /**
+     * check if Event is present.
+     */
+	TBool CheckIfEventPresentL( TEvtEventId          aId );
+
+    /**
+     * check if Action is present.
+     */
+	TBool CheckIfActionPresentL( TInt64          aId );
+
+    /**
+     * Get the action Id based on Event Id.
+     */
+	TInt64 GetActionId( TEvtEventId          aId );
+
+    /**
+     * Create Action.
+     */
+    void CreateActionL( CEvtAction&   aEvtAction );
+    
+    /**
+     * Update Action.
+     */
+    void UpdateActionL( CEvtAction&   aEvtAction );
+    
+    /**
+     * Delete Action.
+     */
+	void DeleteActionL( TEvtEventId          aEventId );
+
+    /**
+     * Default C++ Constructor.
+     */
+    CEvtDatabase( );
+
+    /**
+     * Second phase of the two phase constructor.
+     */
+    void ConstructL();
+
+private: // data
+
+    /**
+     *  RSqlDatabase Instance
+     */
+    RSqlDatabase iDb;
+
+    /**
+     *  CEvtDbNotifier Instance
+     */
+    CEvtDbNotifier* iDbNotifier;
+
+    /**
+     *  CEvtDbNotifier Instance
+     */
+    MEvtStorageDbObserver* iStorageDbObserver;
+    
+    };
+
+#endif // C_EVTDATABASE_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventsengine/inc/evtdbnotifier.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,123 @@
+/*
+* 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:  Notifier class for any change in Storage API database.
+*
+*/
+
+
+#ifndef C_EVTDBNOTIFIER_H
+#define C_EVTDBNOTIFIER_H
+
+// System Includes
+
+//  System Includes
+#include <e32base.h>
+
+// User Includes
+
+// User Includes
+#include "evtdbobserver.h"
+#include "evtstoragedbobserver.h"
+#include "evtstoragedomaincrkeys.h"
+
+// Forward Declarations
+class CRepository;
+
+// extern data types
+
+// global Functions
+
+// constants go here
+
+/**
+ *  Class that monitors Storage Database for any change.
+ *  This class requests for any change in the Stroage database. 
+ *
+ *  @lib evtstorage.lib
+ *  @since S60 v9.1
+ */
+class CEvtDbNotifier : public CActive
+    {  
+public:
+    /**
+     * Constructs a new instance of Event Notifier.
+     *
+     * @return The new instance of Event Notifier.
+     * @leave System wide error code if the object creation fails.         
+     */
+    static CEvtDbNotifier* NewL( MEvtDbObserver&    aObserver );
+    
+    /**
+     * Constructs a new instance of Event Notifier.
+     * Leaves the created instance on the cleanup stack.
+     *
+     * @return The new instance of Event Notifier object.
+     * @leave System wide error code if the object creation fails.         
+     */
+    static CEvtDbNotifier* NewLC( MEvtDbObserver&    aObserver );  
+    
+    /**
+     * Destructor
+     */
+    virtual ~CEvtDbNotifier ();
+    
+    /**
+     * Observer for TDbChangeType changes in Storage Database.
+     */
+    void DbChangedL( );
+
+	// Inherited from CActive 
+    void RunL();
+    
+    void DoCancel();
+    
+    TInt RunError( TInt aError ); 
+
+private: 
+    /**
+     * Handle any change to database.
+     */   
+    void HandleDbChangedL( );
+    
+    /**
+     * Request to get database notifications on change.
+     */   
+    void StartNotification();
+    
+    /**
+     * Default C++ Constructor.
+     */
+    CEvtDbNotifier( MEvtDbObserver&    aObserver ); 
+
+    /**
+     * Second phase of the two phase constructor.
+     */
+    void ConstructL();
+
+private: // data
+    
+    /**
+     *  Reference to Observer
+     * 	Does Not own
+     */
+    MEvtDbObserver&					iDbObserver;
+    
+    /**
+     *  CRepository Instance
+     */
+    CRepository*                    iRepository;
+
+    };
+
+#endif // C_EVTDBNOTIFIER_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventsengine/inc/evtdbobserver.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,37 @@
+/*
+* 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:  Events Storage database Observer
+*
+*/
+
+
+#ifndef M_EVTDBOBSERVER_H_
+#define M_EVTDBOBSERVER_H_
+ 
+
+// Class Declaration
+/**
+ * Internal class to observe the change in Events Storage database.
+ */
+class MEvtDbObserver
+    {
+    public:
+	    /**
+	     * Notifies a change in the Events Storage database
+	     */
+	    virtual void HandleDbChangedL( ) = 0;
+    };
+    
+#endif // M_EVTDBOBSERVER_H_
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventsengine/inc/evtdefs.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,93 @@
+/*
+* 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 file for defining the Events unique Id and Status.
+*
+*/
+
+
+#ifndef EVTDEFS_H
+#define EVTDEFS_H
+
+// extern data types
+typedef TUint32 TEvtEventId;
+
+// constants go here
+/**
+ * @enum TEvtEventStatus
+ * Status of the Event.
+ *
+ */
+enum TEvtEventStatus
+    {
+    /**
+     * The Status of an Event when it is Active
+     */
+    EActive                               = 0,
+    
+    /**
+     * The Status of an Event when it is in Draft
+     */
+    EDraft                                = 1,
+    
+    /**
+     * The Status of an Event when it is complete
+     */
+    ECompleted                            = 2
+    };
+    
+/**
+ * @enum TEvtFireAccuracy
+ * Accuracy of Fired Trigger.
+ *
+ */
+enum TEvtFireAccuracy
+    {
+    /**
+     * Trigger Fired with High Accuracy
+     */
+    EHighAccuracy                          = 0,
+    
+    /**
+     * Trigger Fired with Mid Accuracy
+     */
+    EMidAccuracy,
+    /**
+     * Trigger Fired with Low Accuracy
+     */
+    ELowAccuracy
+    };
+    
+/**
+ * @enum TEvtConsoleAction
+ * Action for the ConsoleUi.
+ *
+ */
+enum TEvtConsoleAction
+    {
+    /**
+     * No Action
+     */
+    EEvtActionNone                          = 0,
+    
+    /**
+     * Action for ConsoleUi to handle Fired trigger
+     */
+    EEvtActionFired,
+    
+    /**
+     * Action for ConsoleUi to change state
+     */
+    EEvtActionChangeState
+    };
+#endif // EVTDEFS_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventsengine/inc/evtengineuid.hrh	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,27 @@
+/*
+* 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:  Resource headers for Events Engine
+*
+*/
+
+
+#ifndef EVTENGINEUID_HRH
+#define EVTENGINEUID_HRH
+
+// Events Engine API UID3
+#define EVTENGINE_UID3          0x2001E664
+
+#endif      // EVTENGINEUID_HRH
+
+// End of File
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventsengine/inc/evtevent.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,349 @@
+/*
+* 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:  Concrete Class for Location Events.
+*
+*/
+
+
+#ifndef C_EVTEVENT_H
+#define C_EVTEVENT_H
+
+// System Includes
+#include <e32base.h>
+#include <lbs.h>
+
+// User Includes
+#include "evtdefs.h"
+
+// Forward Declarations
+class CEvtAction;
+
+// extern data types
+
+// global Functions
+
+// constants go here
+
+/**
+ *  @class CEvtEvent
+ *  Concrete class that encapsulates all the information related for
+ *	Event.
+ *
+ *  This class is used to store the detailed information for an event.
+ *
+ *  @lib evtstorage.lib
+ *  @since S60 v9.1
+ */
+class CEvtEvent : public CBase
+    {
+public:  
+    /**
+     * Constructs a new instance of Event.
+     *
+     * @return The new instance of Event object.
+     * @leave System wide error code if the object creation fails.         
+     */
+    IMPORT_C static CEvtEvent* NewL();
+    
+    /**
+     * Constructs a new instance of Event Object.
+     * Leaves the created instance on the cleanup stack.
+     *
+     * @return The new instance of Event object.
+     * @leave System wide error code if the object creation fails.         
+     */
+    IMPORT_C static CEvtEvent* NewLC();  
+
+    /**
+    * Destructor.
+    */
+    virtual ~CEvtEvent();
+
+public: // Get and Set methods
+    
+    /**
+     * Gets the Trigger id, identifying the Location Event.
+     * This identifier is definded by Location Triggering Engine.   
+     *
+     * @since S60 v9.1     
+     * @return Event identifier identifying the Location Event.
+     */
+    IMPORT_C TEvtEventId EventId() const;
+ 
+    /**
+     * Set the Trigger id, identifying the Location Event. The
+     * identifer is definded by Location Triggering Engine.
+     *
+     * @since S60 v9.1   
+     * @param[in] aId Event identifier identifying the Location Event.
+     */
+    IMPORT_C void SetEventId( const TEvtEventId aId );
+    
+    /**
+     * Gets the Subject for the Location Events.
+     * The Subject is defined by the Location EventsUi on Creation.
+     * A reference to the object's internal string is returned.
+     *
+     * @since S60 v9.1    
+     * @return Subject for the Location Event. If the Subject has not 
+     *         been set for the Location Event, then a NULL
+     *         string is returned.
+     */
+    IMPORT_C TPtrC Subject() const;
+
+    /** 
+     * Set the Subject String for the Location Event. The Subject is 
+     * copied.
+     *
+     * @since S60 v9.1  
+     * @param[in] aSubject Subject String for the Location Event. 
+     *                  The Subject string is copied.
+     * @leave KErrNoMemory If there is not enough memory to copy the string.
+     */
+    IMPORT_C void SetSubjectL( const TDesC& aSubject );
+    
+    /**
+     * Gets the Place for the Location Events.
+     * The Place is defined by the Location EventsUi on Creation.
+     * A reference to the object's internal string is returned.
+     *
+     * @since S60 v9.1    
+     * @return Place String for the Location Event. If the Place has not 
+     *         been set for the Location Event, then a NULL
+     *         string is returned.
+     */
+    IMPORT_C TPtrC Place() const;
+
+    /** 
+     * Set the Place String for the Location Event. The Place is 
+     * copied.
+     *
+     * @since S60 v9.1  
+     * @param[in] aPlace Place String for the Location Event. 
+     *                  The Place string is copied.
+     * @leave KErrNoMemory If there is not enough memory to copy the string.
+     */
+    IMPORT_C void SetPlaceL( const TDesC& aPlace );
+    
+    /**
+     * Gets the Status of the Location Event.
+     * The Status is defined by the Location EventsUi on Creation.
+     * Status is updated as and when the Event moves to different state.
+     *
+     * @since S60 v9.1    
+     * @return TEvtEventStatus Status for the Location Event.
+     */
+    IMPORT_C TEvtEventStatus EventStatus() const;
+
+    /** 
+     * Set the Status for the Location Event.
+     *
+     * @since S60 v9.1  
+     * @param[in] aEventStatus Status for the Location Event. 
+     */
+    IMPORT_C void SetEventStatus( 
+                            const TEvtEventStatus aEventStatus );
+                            
+    /**
+     * Gets the Radius for the Location Events.
+     * The Radius is defined by the Location EventsUi on Creation.
+     * Radius is defined based on the place.
+     *
+     * @since S60 v9.1    
+     * @return Radius for the Location Event.
+     */
+    IMPORT_C TReal Radius() const;
+
+    /** 
+     * Set the Radius for the Location Event.
+     *
+     * @since S60 v9.1  
+     * @param[in] aRadius Radius for the Location Event. 
+     */
+    IMPORT_C void SetRadius( const TReal aRadius );
+             
+    /**
+     * Gets the Repeast flag for the Location Event.
+     * The Repeast is defined by the Location EventsUi on Creation.
+     *
+     * @since S60 v9.1    
+     * @return TBool Repeat flag for the Location Event.
+     */
+    IMPORT_C TBool Repeat() const;
+
+    /** 
+     * Set the Repeat flag for the Location Event.
+     *
+     * @since S60 v9.1  
+     * @param[in] TBool Repeat flag for the Location Event. 
+     */
+    IMPORT_C void SetRepeat( const TBool aRepeat );
+        
+    /**
+     * Gets the Description for the Location Events.
+     * The Description is defined by Location EventsUi on Creation.
+     * A reference to the object's internal string is returned.
+     *
+     * @since S60 v9.1    
+     * @return Description for the Location Event. If the Description 
+     *          has not been set for the Location Event, then a NULL
+     *         string is returned.
+     */
+    IMPORT_C TPtrC Description() const;
+
+    /** 
+     * Set the Description String for the Location Event. The  
+     * Description is copied.
+     *
+     * @since S60 v9.1  
+     * @param[in] aDescription Description String for the Location Event. 
+     *                  The Description string is copied.
+     * @leave KErrNoMemory If there is not enough memory to copy the string.
+     */
+    IMPORT_C void SetDescriptionL( const TDesC& aDescription );
+    
+    /**
+     * Gets the Action for the Location Events.
+     * The Action is defined by the Location EventsUi on Creation.
+     * A reference to the object's action is returned.
+     *
+     * @since S60 v9.1    
+     * @return Action for the Location Event. If the Action has 
+     *          not been set for the Location Event, then a NULL
+     *          is returned.
+     */
+    IMPORT_C CEvtAction& Action() const;
+
+    /** 
+     * Set the Action for the Location Event. The Action is 
+     * copied.
+     *
+     * @since S60 v9.1  
+     * @param[in] aAction Action for the Location Event. 
+     *                  The ownership of Action is transferred to Event.
+     * @leave KErrNoMemory If there is not enough memory to copy the string.
+     */
+    IMPORT_C void SetActionL( CEvtAction* aAction );
+
+    /** 
+     * Check if Action is assigned to the Event.
+     *
+     * @since S60 v9.1  
+     * @TBool Returns ETrue if action is present Or else EFalse.
+     */
+    IMPORT_C TBool HasAction( );
+
+    /** 
+     * Set the Location for the Location Event.
+     *
+     * @since S60 v9.1  
+     * @param[in] aLocation Location for the Location Event. 
+     * @leave KErrNoMemory If there is not enough memory to copy the string.
+     */
+     void SetLocationL( TPosition& aLocation );
+    
+    /**
+     * Gets the Location for the Location Events.
+     * The Location is defined by the Location EventsUi on Creation.
+     * A reference to the object's action is returned.
+     *
+     * @since S60 v9.1    
+     * @return Location for the Location Event. If the Action has 
+     *          not been set for the Location Event, then a NULL
+     *          is returned.
+     */
+     IMPORT_C TPosition& Location() const;
+
+private: // methods
+    /**
+     * Default C++ Constructor.
+     */
+    CEvtEvent();
+    
+    /**
+     * Default Copy Constructor.
+     */
+    CEvtEvent(CEvtEvent& );
+
+    /**
+     * Second phase of the two phase constructor.
+     */
+    void ConstructL();
+
+private: // data
+    
+    /**
+     * System wide unique identifier identifying the Location Event. 
+     * This identifier is defined by the Location Triggering Engine.
+     *
+     * Owns
+     */
+    TEvtEventId                      iEventId;
+    
+    /**
+     * Event Subject.
+     * Subject for the Location Event. The Subject is defined by the Location
+     * Events Ui.
+     * 
+     * Owns
+     */
+    HBufC*                          iSubject;
+    
+    /**
+     * Event Place.
+     * Place for the Location Event. The String is defined by the Location
+     * Events Ui.
+     * 
+     * Owns
+     */
+    HBufC*                          iPlace;
+	
+	/**
+	 * Event Status.
+	 */
+	TEvtEventStatus					iEventStatus;
+    
+	/**
+	 * Radius for Accuracy.
+	 */
+	TReal							iRadius;
+    
+	/**
+	 * Repeat Event.
+	 */
+	TBool							iRepeat;
+    
+    /**
+     * Event Description.
+     * Description for the Location Event. The String is defined by the
+     * Location Events Ui.
+     * 
+     * Owns
+     */
+    HBufC*                          iDescription;
+	    
+	/**
+	 * Tone String for Event.
+	 */
+	CEvtAction*				        iAction;
+    
+    /**
+     * lat-long information 
+     * 
+     */
+    TPosition*             			iLocation;
+
+    };
+
+#endif // C_EVTEVENT_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventsengine/inc/evteventmanager.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,273 @@
+/*
+* 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:  Interface to store and access the Location Events.
+*
+*/
+
+
+#ifndef C_EVTEVENTMANAGER_H
+#define C_EVTEVENTMANAGER_H
+
+// System Includes
+#include <e32base.h>
+
+// User Includes
+#include "evtbasiceventinfo.h"
+#include "evtevent.h"
+
+// Forward Declarations
+class CEvtDatabase;
+class CEvtBasicEventInfo;
+class CEvtEvent;
+class MEvtStorageDbObserver;
+
+// extern data types
+
+// global Functions
+
+// constants go here
+
+/**
+ *  Interface class to store and access the Location Events.
+ *  This class allows for Events to be stored in persistent database. 
+ *  Events can be added, deleted and modified from database.
+ *  This class also allows for monitoring any changes to the database. This
+ *  is achieved by setting observer to the database.
+ *
+ *  @lib evtstorage.lib
+ *  @since S60 v9.1
+ */
+class CEvtEventManager : public CBase
+    {        
+public:  // Exported Functions
+    /**
+     * Constructs a new instance of Event Storage Manager interface.
+     *
+     * @return The new instance of Event Storage Manager object.
+     * @leave System wide error code if the object creation fails.         
+     */
+    IMPORT_C static CEvtEventManager* NewL();
+    
+    /**
+     * Constructs a new instance of Event Storage Manager interface.
+     * Leaves the created instance on the cleanup stack.
+     *
+     * @return The new instance of Event Storage Manager object.
+     * @leave System wide error code if the object creation fails.         
+     */
+    IMPORT_C static CEvtEventManager* NewLC();  
+
+    /**
+    * Destructor.
+    */
+    virtual ~CEvtEventManager();
+
+    /**
+     * Gets a sorted list of Events based on Event Status Criteria. The sort
+     * is based on Event's Subject Field.
+     *
+     * The application can decide upon the list of Events returned.
+     * This can be achieved by passing a Event Status as the parameter
+     * to this function. The status of the Events is defined by 
+     * @ref TEvtEventStatus      
+     *  
+     * The ownership of the list of Events is transferred to the caller.
+     * 
+     * @since S60 v9.1
+     * @param[in] TEvtEventStatus Event Status that decides the 
+     *                    list of Events to be returned.   
+     * @param[out] aEventArray Reference to an array of pointers to Event.
+     *                           This Array would be updated with the
+     *                           @ref CEvtBasicEventInfo objects.
+     * @return One of the following error values.
+     *         - KErrNone, If the Events were successfully retrieved.
+     *         - System wide error code if the database operation
+     *                fails for any other reason.     
+     */
+    IMPORT_C void GetEventsL( 
+    						TEvtEventStatus 	aEvtStatus,
+                     		RPointerArray<CEvtBasicEventInfo>& aEvtEventArray );
+
+    /**
+     * Gets a sorted list of ALL Events. The sort is based on Event's 
+     * Subject Field.
+     *
+     * The application gets all the Events entry from the database.     
+     *  
+     * The ownership of the list of Events is transferred to the caller.
+     * 
+     * @since S60 v9.1  
+     * @param[out] aEventArray Reference to an array of pointers to Event.
+     *                           This Array would be updated with the
+     *                           @ref CEvtBasicEventInfo objects.
+     * @return One of the following error values.
+     *         - KErrNone, If the Events were successfully retrieved.
+     *         - System wide error code if the database operation
+     *                fails for any other reason.    
+     */
+    IMPORT_C void GetEventsL( 
+                     		RPointerArray<CEvtBasicEventInfo>& aEvtEventArray );
+
+    /**
+     * Gets an Event based on Event Id passed.
+     *
+     * The application can get the Event info based on the EventId passed.  
+     *  
+     * The ownership of the returned Event is transferred to the caller.
+     * 
+     * @since S60 v9.1
+     * @param[in] aEvtId EventId that decides the Event to be returned.   
+     * @return CEvtEvent - Pointer to @ref CEvtEvent, if the Event was found
+                         in the database.
+                         - NULL, if the event was not present in the database.
+     */
+    IMPORT_C CEvtEvent* GetEventL( TEvtEventId            aEvtId );
+
+    /**
+     * Deletes the List of Events from Database.
+     *
+     * The application delete the list of Events from the database.     
+     * 
+     * @since S60 v9.1
+     * @param[in] aEventArray Reference to the Events Id array that are to 
+     *                          be removed form the database.  
+     * @return One of the following error values.
+     *         - KErrNone, If the Event was successfully deleted.
+     *         - System wide error code if the database operation
+     *                fails for any other reason. 
+     */
+    IMPORT_C void RemoveEventsL( 
+                            const RArray<TEvtEventId>&     aEvtIdArray );
+    
+    /**
+     * Update the status of events in Database.
+     *
+     * The application will pass the list of Events whose status are updated in the 
+     * database.  
+     * 
+     * @since S60 v9.1
+     * @param[in] aEventArray Reference to the Events Id array that are to 
+     *                          be updated in database.  
+     * @param[in] TEvtEventStatus Event Status that decides the 
+     *                    list of Events to be returned.      
+     * @return One of the following error values.
+     *         - KErrNone, If the Event was successfully deleted.
+     *         - System wide error code if the database operation
+     *                fails for any other reason. 
+     */
+    IMPORT_C void UpdateEventsStatusL( 
+                                const RArray<TEvtEventId>&     aEvtIdArray,
+                                TEvtEventStatus    aEvtStatus );
+
+    /**
+     * Updates the given Event to Database.
+     *
+     * The application will pass the Event that has to be updated in the 
+     * database.    
+     * 
+     * @since S60 v9.1
+     * @param[in] aEvtEvent Reference to the Event that is to be updated in
+     *                          the database.  
+     * @return One of the following error values.
+     *         - KErrNone, If the Event was successfully updated.
+     *         - System wide error code if the database operation
+     *                fails for any other reason. 
+     */
+    IMPORT_C void UpdateEventL( 
+                            CEvtEvent&          aEvtEvent );
+
+    /**
+     * Inserts a new Event to Database.
+     *
+     * The application will pass the Event that has to be inserted in the 
+     * database.
+     *  
+     * @since S60 v9.1
+     * @param[in] CEvtEvent Reference to the Event that has to 
+     *                          be inserted into the database. 
+     * @return One of the following error values.
+     *         - KErrNone, If the Event was successfully inserted.
+     *         - System wide error code if the database operation
+     *                fails for any other reason.
+     */
+    IMPORT_C void AddEventL( CEvtEvent&     aEvtEvent );
+
+    /**
+     * Update the status of an Event in Database.
+     *
+     * The application will pass the Event whose status is updated in the 
+     * database.
+     *  
+     * @since S60 v9.1
+     * @param[in] TEvtEventStatus Event Status that decides the 
+     *                    list of Events to be returned.   
+     * @param[in] CEvtEvent Reference to the Event that has to 
+     *                          be updated into the database. 
+     * @return One of the following error values.
+     *         - KErrNone, If the Event was successfully updated.
+     *         - System wide error code if the database update
+     *                fails for any other reason.  
+     */
+    IMPORT_C void UpdateEventStatusL(
+                            TEvtEventId      aEvtId,
+                            TEvtEventStatus    aEvtStatus);
+    
+    /**
+     * Delete an Event from Database.
+     *
+     * The application will pass the Event that has to be deleted from the
+     * database.
+     *  
+     * @since S60 v9.1
+     * @param[in] aEventId Id of the Event that is to be removed form
+     *                          the database. 
+     * @return One of the following error values.
+     *         - KErrNone, If the Event was successfully deleted.
+     *         - System wide error code if the database operation
+     *                fails for any other reason.  
+     */
+    IMPORT_C void RemoveEventL( TEvtEventId      aEvtId );
+    
+    /**
+     * Set the Observer for the Storage Database.
+     *
+     * The application can listen to the change in the Storage database 
+     * by setting the Observer.
+     *  
+     * @since S60 v9.1
+     * @param[in] aDbObserver An Observer to listen to Storage database
+     * 						changes. 
+     */
+    IMPORT_C void SetObserver( MEvtStorageDbObserver*      aDbObserver );
+
+private:
+    /**
+     * Default C++ Constructor.
+     */
+    CEvtEventManager();
+
+    /**
+     * Second phase of the two phase constructor.
+     */
+    void ConstructL();
+
+private: // data
+    /**
+     *  CEvtDatabaseRequest Instance
+     */
+    CEvtDatabase* iEvtDb;
+
+    };
+
+#endif // C_EVTEVENTMANAGER_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventsengine/inc/evtmgmtuiengine.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,305 @@
+/*
+* 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:  Engine class for Events Management UI.
+*
+*/
+
+
+#ifndef EVTMGMTUIENGINE_H
+#define EVTMGMTUIENGINE_H
+
+#include <e32base.h>
+#include "evtstoragedbobserver.h"
+#include "evtmgmtuilbtobserver.h"
+#include "evtdefs.h"
+#include "evtbasiceventinfo.h"
+#include "evtevent.h"
+
+// forward declarations go here:
+class CEvtEventManager;
+class CEvtEvent;
+class CEvtMgmtUiLbtAdapter;
+typedef TUint32 TEvtEventAttributeMask;
+
+class MEvtMgmtUiEngineObserver
+    {
+public:
+    /**
+     * It will be used to notify observer that event operation
+     * has been completed
+     * @param aTriggerId trigger id of newly created trigger
+     * @param aErrorCode It will contain the status of the operation
+     *                KErrNone if successful otherwise error status code          
+     */
+    virtual void NotifyEventChangeL(TInt aErrorCode, TInt aState ) = 0;
+    
+    /**
+     * It will be used to notify observer that database
+     * has been completed
+     */
+    virtual void NotifyModelChangeL() = 0;
+    };
+
+
+/**
+ *  @class CEvtMgmtUiEngine
+ *  Class that represents the engine for evtmgmtui application
+ *  
+ *  It  is used to create, update, delete, retrive events.
+ *  It is also used to change state of the event.
+ *
+ *  @since Symbian v9.1
+ */
+class CEvtMgmtUiEngine : public CBase,
+                         public MEvtMgmtUiLbtObserver,
+                         public MEvtStorageDbObserver
+    {
+    public:
+        /**
+         * Enumeration to Filter based on status.
+         */
+        enum TEvtEventStatusFilter
+            {
+            /**
+             * To retrive active events
+             */
+            EEvtFilterActive                               = 0,
+            
+            /**
+             * To retrive draft events
+             */
+            EEvtFilterDraft                                = 1,
+            
+            /**
+             * To retrive completed events
+             */
+            EEvtFilterCompleted                            = 2,
+            
+            /**
+             * To retrieve all events
+             */
+            EEvtFilterAll                                  = 3
+            };
+
+        /**
+         * Enumeration to identify the modified attributes for an event
+         */
+        enum TEvtEventAttribute
+            {
+            EEvtEventAttributeSubject = 1,
+            EEvtEventAttributePlace = 2,
+            EEvtEventAttributeRadius = 16,
+            EEvtEventAttributeRepeat = 32,
+            EEvtEventAttributeDesc = 64,
+            EEvtEventAttributeTone = 128,
+            EEvtEventAttributeAudioLoop = 256,
+            EEvtEventAttributeStatus = 512
+            };
+    public: // Constructor and destructor  
+        /**
+         * Static Two phase constructor
+         */
+        IMPORT_C static CEvtMgmtUiEngine* NewL();
+        /**
+         * Static Two phase constructor
+         */
+        IMPORT_C static CEvtMgmtUiEngine* NewLC();
+    
+        /**
+         * Virtual destructor
+         */
+         virtual ~CEvtMgmtUiEngine();
+     
+    public://new functions
+        
+        /**
+          * Set observer to notify engine operation is completed.
+          *
+          * @since S60 v5.0    
+          * @paramp[in] aObserver - Observer which wants to get notifications.
+          */
+        IMPORT_C void SetObserver(MEvtMgmtUiEngineObserver* aObserver);
+        
+        /**
+          * Remove observer to notify engine operation is completed.
+          *
+          * @since S60 v5.0    
+          * @paramp[in] aObserver - Observer which wants to get notifications.
+          */    
+        IMPORT_C void RemoveObserver(MEvtMgmtUiEngineObserver* aObserver);
+        
+        /**
+         * returns event object
+         *
+         * @since S60 v5.0    
+         * 
+         * @param[in] aId - event id of the event to be retrieved. 
+         * @ret event object 
+         */
+        IMPORT_C CEvtEvent* EventL( TEvtEventId aId );
+              
+        /**
+          * Updates model
+          *
+          * @since S60 v5.0 
+          * 
+          * TODO: should be removed
+          */
+        IMPORT_C void UpdateModelL( RPointerArray<CEvtBasicEventInfo>& aEventsArray,
+                                        TEvtEventStatusFilter  aEventStatusFilter );
+        
+         /**
+          * It will add an event to database
+          * @since S60 v5.0    
+          */
+         IMPORT_C void AddEventL( CEvtEvent& aEvtEvent );
+         
+         /**
+           * It will modify event to database
+           * @since S60 v5.0    
+           */
+         IMPORT_C void ModifyEventL( CEvtEvent& aEvtEvent, 
+                             TEvtEventAttributeMask aEventAttributeMask );
+          
+         /**
+           * It will delete the list of Events from the database.
+           * @param[in] aId id of event to be deleted
+           * @since S60 v5.0    
+           */
+         IMPORT_C void DeleteEventL(  TEvtEventId aId = -1 );
+         
+         /**
+          * It will delete event from database
+          * @param[in] aEvtIdArray aEventArray Reference to the Events Id array that  
+          *                          are to be removed form the database.  
+          * @since S60 v5.0    
+          */
+         IMPORT_C void DeleteEventsL(  const RArray<TEvtEventId>* aEvtIdArray );
+         
+         /*
+          * Retrieve location details
+          */
+         IMPORT_C void RetrieveLocationL( TEvtEventId aEventId, TCoordinate& aCoordinate );
+         
+         /**
+           * It will set state of the event.   
+           * @param[in] aId id of event to be updated
+           * @param aEvtStatus status of the event
+           * @since S60 v5.0    
+           */
+         IMPORT_C void SetEventStateL( TEvtEventStatus aEvtStatus, TEvtEventId aId = -1 );
+         
+         /**
+          * It will set state of the events.   
+          * @param[in] aEvtIdArray idlist of events to be updated
+          * @param aEvtStatus status of the event
+          * @since S60 v5.0    
+          */
+         IMPORT_C void SetEventsStateL( TEvtEventStatus aEvtStatus, 
+                     const RArray<TEvtEventId>* aEvtIdArray );
+    
+         /**
+          * Synchronizes the LBT and EvtStorage Db.     
+          * @since S60 v5.0    
+          */
+         IMPORT_C void SyncDbsL();     
+         
+         /**
+          * Calculates the Accuracy of Fired Trigger.     
+          * @since S60 v5.0    
+          */
+         IMPORT_C TEvtFireAccuracy CalculateFiredAccuracyL( 
+                                                const TEvtEventId aEventId );
+                                                
+         /**
+          * Handle Fired Trigger state.    
+          * Trigger State should be completed if fired Event is not repetitive. 
+          * @since S60 v5.0    
+          */
+         IMPORT_C void HandleFiredTriggerStateL( 
+                                                const TEvtEventId aEventId );
+         /**
+          * Cancels all the outstanding lbt request.    
+          * @since S60 v5.0    
+          */
+         IMPORT_C void CancelRequest();
+          
+    public: //Derived
+        /**
+         * Derived from MEvtMgmtUiLbtObserver
+         */
+        void NotifyTriggerChangeL( const TLbtTriggerId &  /*aTriggerId*/,
+                                        TLbtTriggerChangeType aType );
+        /**
+         * Derived from MEvtMgmtUiLbtObserver
+         */
+        void NotifyLbtChangeL(TLbtTriggerId &  aTriggerId, TInt aState );
+        
+        /**
+        * Derived from MEvtMgmtUiLbtObserver
+        */
+        void NotifyLbtError(TInt aErrorCode, TInt aState );
+        /**
+        * Derived from MEvtStorageDbObserver
+        */
+        void HandleStorageDbChangedL();
+    
+    private:
+    // constructor and the Symbian second-phase constructor
+    
+        CEvtMgmtUiEngine();
+    
+        void ConstructL();
+       
+    private: // data
+         
+        /**
+        * event manager
+        * Owns
+        */
+        CEvtEventManager*       iEventManager; 
+       
+        /**
+        * event 
+        * Owns
+        */
+        CEvtMgmtUiLbtAdapter*   iLbtAdapter;
+        
+        /*
+         * Observer to notify engine operation is completed.
+         * Does not own
+         */
+        RPointerArray< MEvtMgmtUiEngineObserver > iObserverArray;
+        
+        /*
+         * Temporary Event to hold till the Event is added/Updated to lbt.
+         * Does not own
+         */
+        CEvtEvent* iEvent;
+        
+        /*
+         * Temporary array to hold idlist till the Events are deleted/status changed to lbt.
+         * Does not own
+         */
+        const RArray<TEvtEventId>* iEvtIdArray;
+        
+        /*
+         * Temporary variable to hold state till the Events status changed to lbt.
+         * 
+         */
+        TEvtEventStatus iEvtStatus;
+
+    };
+
+#endif // C_EVTMGMTUIMODEL_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventsengine/inc/evtmgmtuilbtadapter.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,389 @@
+/*
+* 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:  It is adapter class to handle lbt operations
+*
+*/
+
+
+#ifndef EVTMGMTUILBTADAPTER_H_
+#define EVTMGMTUILBTADAPTER_H_
+
+#include <e32base.h>        // CBase
+
+#include <lbs.h>
+#include <lbtcommon.h>
+#include <lbtserver.h> 
+#include <lbt.h>
+#include <lbttriggerchangeeventobserver.h> 
+#include <lbttriggerdynamicinfo.h>
+
+#include "evtmgmtuilbtobserver.h"
+#include "evtdefs.h"
+
+class CLbtStartupTrigger;
+class CLbtGeoCircle;
+class CLbtTriggerConditionArea;
+class CLbtTriggerChangeEventNotifier;
+class CLbtTriggerFilterByAttribute;
+
+/**
+ *  @class CEvtMgmtUiLbtAdapter
+ *  Class that represents the adapter for lbt operation
+ *
+ *  This class acts as an adapter for lbt engine. 
+ *  It  is used to create, update, delete, retrive triggers.
+ *  It is also used to change state of the trigger
+ *
+ *  @since S60 v9.1
+ */
+
+class CEvtMgmtUiLbtAdapter : public CActive,
+								public MLbtTriggerChangeEventObserver
+    {
+public:
+    /*
+     *  state machine for lbt operation
+     */
+    enum TLbtAdtapterState
+        {        
+        /*
+         * state for creating trigger
+         */
+        ELbtAdapterCreate,
+        
+        /*
+         *  state for updating trigger
+         */
+        ELbtAdapterUpdate,
+        
+        /*
+        *  state for updating command line argument of trigger
+        */
+        ELbtAdapterUpdateCmdLineArg,
+        
+        /*
+         *  state for deleting trigger
+         */
+        ELbtAdapterDelete,
+        
+        /*
+         *  state for deleting triggers
+         */
+        ELbtAdapterDeleteTriggers,
+
+        /*
+         *  state for changing state of the trigger
+         */
+        ELbtAdapterSetTriggerState,
+        
+        /*
+         *  state for changing state of the triggers
+         */
+       ELbtAdapterSetTriggersState,
+        
+        /**
+         * Default option
+         */
+        ENone
+        };
+    
+    public:  // Constructor and destructor  
+      /**
+       * Static Two phase constructor
+       *         
+       */
+      static CEvtMgmtUiLbtAdapter* NewL(MEvtMgmtUiLbtObserver&  aObserver);
+
+      /**
+       * Virtual destructor
+       */
+      virtual ~CEvtMgmtUiLbtAdapter(); 
+         
+    public: // new functions
+        /*
+         * It is the wrapper function to trap leaving function CreateTriggerL()
+         * 
+         * @since S60 v9.1
+         * 
+         * @param [in] aCenter - location of the trigger.
+         * @param [in] aRadiusInKiloMeters - radius of the trigger
+         * @param [in] aTriggerName - name of the trigger
+         * @param [in] aState - state of the trigger
+         * @param [in] aTriggerId - trigger id of the trigger -
+         *              if it is zero, trigger will be created
+         *              othewise it will be updated
+         * @param [in] aEventId - event id of the triggering event
+         *              It will be passed as command line argument.
+         */
+        void CreateTrigger(const TCoordinate& aCenter,
+                TReal aRadiusInKiloMeters, const TPtrC& aTriggerName,
+                CLbtTriggerEntry::TLbtTriggerState aState );
+
+        
+        /*
+        * CEvtMgmtUiLbtAdapter ::UpdateCmdLineArgL()
+        * Update the command line argument of the give trigger
+        * @param[in] aTriggerId - id of the trigger
+        * @param[in] aEventId - event id of the triggering event
+        *              It will be passed as command line argument.
+        */
+        void UpdateCmdLineArgL( TLbtTriggerId aTriggerId, TEvtEventId aEventId );
+        
+        /*
+        * CEvtMgmtUiLbtAdapter ::UpdateLocationL()
+        * Update the location of the give trigger
+        * @param[in] aTriggerId - id of the trigger
+        * @param [in] aCenter - location of the trigger.
+        * @param [in] aRadiusInMeters - radius of the trigger
+        * @param [in] aState - state of the trigger      
+        */
+        void UpdateTriggerL( TLbtTriggerId aTriggerId,
+                const TCoordinate& aCenter, TReal aRadiusInKiloMeters,
+                CLbtTriggerEntry::TLbtTriggerState aState );
+        /*
+         * It is used to delete trigger from lbt database
+         * 
+         * @since S60 v9.1
+         * 
+         * @param [in] aTriggerId - trigger id of the trigger
+         * TODO: @param [in] aDeleteTriggerOnly remove
+         * 
+         */ 
+         void DeleteTriggerL( TLbtTriggerId  aTriggerId );
+           
+         /*
+          * It is used to delete triggers from lbt database
+          * 
+          * @since S60 v9.1
+          * 
+          * @param [in] aTriggerIdList - id-list of triggers to be deleted.
+          * 
+          */
+         void DeleteTriggersL( const RArray<TLbtTriggerId>& aTriggerIdList );  
+         
+         /*
+          * It is used to change the state of the trigger.
+          * 
+          * @since S60 v9.1
+          * 
+          * @param [in] aTriggerId - trigger id of the trigger
+          * @param [in] aState - value to which given trigger's state should be changed
+          *  
+          */    
+        void SetTriggerStateL( TLbtTriggerId  aTriggerId,
+									CLbtTriggerEntry::TLbtTriggerState aState );
+        
+        /*
+         * It is used to change the state of the triggers.
+         * 
+         * @since S60 v9.1
+         * 
+         * @param [in] aTriggerIdList - trigger id list of the triggers
+         * @param [in] aState - value to which given trigger's state should be changed
+         *  
+         */ 
+        void SetTriggersStateL( const RArray<TLbtTriggerId>& aTriggerIdList,
+                                            CLbtTriggerEntry::TLbtTriggerState aState ) ; 
+
+        /*
+          * It is used to retrieve location information of given trigger
+          * from lbt database
+          * 
+          * @since S60 v9.1
+          * 
+          * @param [in] aTriggerId - trigger id of the trigger
+          * @param [out] aCenter -  location details of the given trigger
+          *  
+          */
+        void RetrieveLocationL( TLbtTriggerId aTriggerId, TCoordinate& aCenter );
+         
+        /*
+          * It is used to retrieve list of triggers created by EventsUi
+          * 
+          * @since S60 v9.1
+          * 
+          * @param [in] triggerList - Reference to trigger array
+          * @param [out] aState -  Active/Inactive State of Trigger
+          *  
+          */
+		void GetTriggerListL( RArray<TLbtTriggerId>& aTriggerList,
+								CLbtTriggerEntry::TLbtTriggerState aState ); 
+
+        /*
+          * It is used to retrieve list of triggers created by EventsUi
+          * 
+          * @since S60 v9.1
+          * 
+          * @param [in] triggerList - Reference to trigger array
+          * @param [out] aState -  Valid/Invalid State of Trigger
+          *  
+          */
+		void GetTriggerListL( RArray<TLbtTriggerId>& aTriggerList,
+                TLbtTriggerDynamicInfo::TLbtTriggerValidity aValid );
+        /*
+          * It is used to returns the Position Accuracy of Fired Trigger.
+          * 
+          * @since S60 v9.1
+          * 
+          * @param [in] aPosition - Contains the Position Accuracy for Fired Trigger
+          * @param [in] aTriggerId - Trigger Id
+          * @param [out] TBool - Boolean value for Trigger Fired or Not.
+          *  
+          */
+		TBool GetFiredPositionL( TPosition& aPosition,
+											const TLbtTriggerId aTriggerId );
+
+        /*
+          * It is used to get the distance accuracy for Fired trigger.
+          * 
+          * @since S60 v9.1
+          * 
+          * @param [in] aTriggerId - Trigger Id
+          * @param [out] aDistance - Accuracy in metres at which the trigger fired.
+          *  
+          */
+		void GetFiredTriggerAccuracyL( TLbtTriggerId aTriggerId, TReal32& aDistance );
+
+        /*
+          * It is used to retrieve State of given trigger
+          * from lbt database
+          * 
+          * @since S60 v9.1
+          * 
+          * @param [in] aTriggerId - trigger id of the trigger
+          * @param [out] TLbtTriggerState -  State of the given trigger
+          *  
+          */
+		CLbtTriggerEntry::TLbtTriggerState GetTriggerStateL( 
+											TLbtTriggerId  aTriggerId );
+		
+		void CancelRequest();
+ 
+    public: //derived
+        
+        /*
+         * Derived from CActive
+         */
+        void RunL();
+        
+        /*
+         * Derived from CActive
+         */
+        void DoCancel();
+        
+        /*
+         * Derived from CActive
+         */
+        TInt RunError( TInt aError );
+        
+        /*
+         * Derived from MLbtTriggerChangeEventObserver
+         */
+    	void TriggerChangedL(const TLbtTriggerChangeEvent &aEvent);
+      
+    private:  // Constructor
+        /**
+         * C++ Default constructor
+         */       
+        CEvtMgmtUiLbtAdapter(MEvtMgmtUiLbtObserver&  aObserver);
+  
+        /**
+         * Second phase of the two phase constructor
+         */ 
+         void ConstructL();
+    
+    private: // New functions
+        /*
+         * It is used to create of update trigger.
+         * If trigger id is zero, it will create trigger.
+         * If trigger id is non-zero, it will update the trigger.
+         * 
+         * @since S60 v9.1
+         * 
+         * @param [in] aCenter - location of the trigger.
+         * @param [in] aRadiusInKiloMeters - radius of the trigger
+         * @param [in] aTriggerName - name of the trigger
+         * @param [in] aState - state of the trigger
+         * @param [in] aTriggerId - trigger id of the trigger -
+         *              if it is zero, trigger will be created
+         *              othewise it will be updated
+         * @param [in] aEventId - event id of the triggering event
+         *              It will be passed as command line argument.
+         */
+        void CreateTriggerL(const TCoordinate& aCenter,
+                           TReal aRadiusInKiloMeters, const TPtrC& aTriggerName,
+                           CLbtTriggerEntry::TLbtTriggerState aState );
+        
+        /*
+         * It is used to create the Codition Area for a trigger depending on the trigger type.
+         * 
+         * @since S60 v9.1
+         * 
+         * @param [in] aCenter - location of the trigger.
+         * @param [out] CLbtTriggerConditionArea - Condition Area for Trigger.
+         */
+        CLbtTriggerConditionArea* GetConditionAreaL( 
+                        const TCoordinate& aCenter,
+                        TReal aRadiusInKiloMeters );
+    private:
+        /*
+         *  Handler to lbt session
+         */
+        RLbt                    iLbt;
+        
+        /*
+         *  Handler to lbt session
+         */
+        RLbt                    iLbtObserver;
+        
+        /*
+         *  Handler to lbt server
+         */
+        RLbtServer              iLbtServer;
+       	 
+        /**
+         * Reference Trigger Change Notifier
+         *
+         */
+       	CLbtTriggerChangeEventNotifier * iEventChangeObserver;
+        
+        /*
+         * Id of a trigger
+         */
+        TLbtTriggerId           iTriggerId;
+       
+        /*
+         *  State machine's current state
+         */
+        TLbtAdtapterState       iState;       
+        
+        /*
+         *  start up trigger object
+         *  owns
+         */
+        CLbtStartupTrigger*     iTrigger;
+        
+        /*
+         * Observer to notify lbt changes or errors
+         */
+        MEvtMgmtUiLbtObserver&  iObserver;    
+       
+        /*
+         * Filter to do any lbt operation(Update State).
+         * Does not own
+         */
+        CLbtTriggerFilterByAttribute* iAttrFilter;    
+    };
+
+#endif //EVTMGMTUILBTADAPTER_H_
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventsengine/inc/evtmgmtuilbtobserver.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,78 @@
+/*
+* 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:  It is observer class to handle lbt operations
+*
+*/
+
+
+#ifndef EVTMGMTUILBTOBSERVER_H_
+#define EVTMGMTUILBTOBSERVER_H_
+
+#include <e32base.h>        // CBase
+
+#include <lbtcommon.h>
+
+class MEvtMgmtUiLbtObserver
+    {
+public:
+    /*
+     *  Type of Trigger Change
+     */
+    enum TLbtTriggerChangeType
+        {
+        /*
+         * If multiple triggers are modified
+         */
+        ETriggerMultipleModified,
+        /*
+         * If a trigger is modified
+         */
+        ETriggerModified,
+        /*
+         * If a trigger is deleted
+         */
+        ETriggerDeleted
+        };
+public:
+    /**
+     * It will be used to notify observer that the trigger which is
+     * owned by EventsUi has been modified outside, either by Manger Ui
+     * or Event Handler
+     * @param aTriggerId trigger id of newly created trigger
+     * @param aType It will contain type of trigger change              
+     */
+    virtual void NotifyTriggerChangeL( const TLbtTriggerId &  aTriggerId,
+    											TLbtTriggerChangeType aType )=0;
+    
+    /**
+     * It will be used to notify observer that lbt operation
+     * has be completed
+     * @param aTriggerId trigger id of newly created trigger
+     * @param aState It will contain the the operation type              
+     */
+    virtual void NotifyLbtChangeL(TLbtTriggerId &  aTriggerId,TInt aState )=0;
+    
+    /**
+     * It will be used to notify observer that lbt operation
+     * has be failed
+     * @param aState It will contain the the operation type
+     * @param aErrorCode It will contain the status of the operation
+     *                KErrNone if successful otherwise error status code          
+     */
+    virtual void NotifyLbtError(TInt aErrorCode, TInt aState )=0;
+    };
+
+
+
+#endif //EVTMGMTUILBTOBSERVER_H_
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventsengine/inc/evtstoragedbobserver.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,38 @@
+/*
+* 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:  Events Storage database Observer.
+*
+*/
+
+
+#ifndef M_EVTSTORAGEDBOBSERVER_H_
+#define M_EVTSTORAGEDBOBSERVER_H_
+
+// Class Declaration
+/**
+ * Observer to the change in Events Storage database.
+ */
+ 
+class MEvtStorageDbObserver
+    {
+    public:
+        /**
+         * Notifies a change in the Events Storage database
+         */
+        virtual void HandleStorageDbChangedL( ) = 0;
+           
+    };
+    
+#endif // M_EVTSTORAGEDBOBSERVER_H_
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventsengine/inc/evtstoragedomaincrkeys.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,50 @@
+/*
+* 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 Repository keys for Events Storage API.
+*                This key defines and updates the type of Change to Storage 
+*                database.
+*                
+*
+*/
+
+
+#ifndef EVTSTORAGEPLUGINDOMAINCRKEYS_H
+#define EVTSTORAGEPLUGINDOMAINCRKEYS_H
+
+/**
+ * UID value for the Central Repository Key used for Events Storage API.
+ */
+const TInt KCRUidEvtStorageDb = 0x2001E66D;
+
+/**
+ * Central repository Key identifer value for Events Storage database change.
+ */
+const TInt KEvtDbChangeType = 0x00000001;
+
+/**
+ * Central repository Key identifer value for Disclaimer Setting.
+ */
+const TInt KEvtDisclaimerSetting = 0x00000002;
+
+/**
+ * Central repository Key identifer value for Snooze Interval.
+ */
+const TInt KEvtSnoozeInterval = 0x00000003;
+
+/**
+ * Central repository Key identifer value for Snooze Period.
+ */
+const TInt KEvtSnoozePeriod = 0x00000004;
+
+#endif      // EVTSTORAGEPLUGINDOMAINCRKEYS_H
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventsengine/inc/evttoneaction.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,180 @@
+/*
+* 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:  Tone class definition.
+*
+*/
+
+
+#ifndef C_EVTTONEACTION_H
+#define C_EVTTONEACTION_H
+
+// System Includes
+
+// User Includes
+#include "evtaction.h"
+
+// Forward Declarations
+
+// extern data types
+
+// global Functions
+        
+/**
+ *  @class CEvtToneAction
+ *  Class that captures information for the Tone action Type.
+ *	This class allows for Internalizing and Externalizing
+ *	the Tone action.
+ *  This class is used to store the information of Tone action.
+ *
+ *  @lib evtstorage.lib
+ *  @since S60 v9.1
+ */
+class CEvtToneAction : public CBase
+    {
+        
+public:  
+    /**
+     * Constructs a new instance of Event Tone.
+     *
+     * @return The new instance of Event Tone object.
+     * @leave System wide error code if the object creation fails.         
+     */
+    IMPORT_C static CEvtToneAction* NewL();
+    
+    /**
+     * Constructs a new instance of Event Tone.
+     * Leaves the created instance on the cleanup stack.
+     *
+     * @return The new instance of Event object.
+     * @leave System wide error code if the object creation fails.
+     */
+    IMPORT_C static CEvtToneAction* NewLC();  
+
+    /**
+    * Destructor.
+    */
+    virtual ~CEvtToneAction();
+
+public: // Get and Set methods
+        
+    /**
+     * Gets the Tone for the Location Events.
+     * The Tone is defined by the Location EventsUi on Creation.
+     * A reference to the object's internal string is returned.
+     *
+     * @since S60 v9.1    
+     * @return Tone String for the Location Event.
+     */
+    IMPORT_C TPtrC FileName() const;
+
+    /** 
+     * Set the Tone String for the Location Event. The Tone is 
+     * copied.
+     *
+     * @since S60 v9.1  
+     * @param[in] aTone Tone String for the Location Event. 
+     *                  The Tone string is copied.
+     * @leave KErrNoMemory If there is not enough memory to copy the string.
+     */
+    IMPORT_C void SetFileNameL( const TDesC& aFileName );
+    
+    /**
+     * Gets the ToneLoop flag for the Location Event.
+     * The ToneLoop is defined by the Location EventsUi on Creation.
+     *
+     * @since S60 v9.1    
+     * @return TBool ToneLoop flag for the Location Event.
+     */
+    IMPORT_C TBool ToneLoop() const;
+    
+    /** 
+     * Set the ToneLoop flag for playing tone for Location Event.
+     *
+     * @since S60 v9.1  
+     * @param[in] TBool ToneLoop flag for the Location Event. 
+     */
+    IMPORT_C void SetToneLoop( const TBool aRepeat );
+
+    /**
+     * Externalizes the contents into a CEvtAction.
+     *
+     * @since S60 v5.0
+     * @param aAction  CEvtAction onto which the contents of 
+     *                      would be externalized.
+     */
+    IMPORT_C void ExternalizeL( CEvtAction&   aAction );
+   
+    /**
+     * Internalized the contents of the CEvtAction.
+     * 
+     * @since S60 v5.0
+     * @param aAction  CEvtAction from which the contents would be
+     *                      populated.
+     */
+    IMPORT_C void InternalizeL( CEvtAction&   aAction );
+
+private:
+
+    /**
+     * Externalizes the contents into a buffer.
+     *
+     * @since S60 v5.0
+     * @param aWriteStream  Buffer onto which the contents of 
+     *                      would be externalized.
+     */
+    void ExternalizeL( RWriteStream&   aWriteStream );
+   
+    /**
+     * Internalized the contents of the buffer.
+     * 
+     * @since S60 v5.0
+     * @param aReadStream   Buffer from which the contents would be
+     *                      populated.
+     */
+    void InternalizeL( RReadStream&    aReadStream );
+
+    /**
+     * Returns the total size for the Internalize/Externalize buffer.
+     *
+     * @since S60 v5.0
+     * @return TInt Total Size of Interalize/Externalize buffer
+     */
+    TInt TotalSize( );
+
+private: // methods
+    /**
+     * Default C++ Constructor.
+     */
+    CEvtToneAction();
+
+    /**
+     * Second phase of the two phase constructor.
+     */
+    void ConstructL();
+
+private: // data
+	    
+	/**
+	 * Tone String for Event.
+	 */
+	HBufC*				            iFileName;
+    
+	/**
+	 * Loop for tone.
+	 */
+	TBool					        iToneLoop;
+
+    };
+
+#endif // C_EVTTONEACTION_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventsengine/src/evtaction.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,175 @@
+/*
+* 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:  Class for the Location Events Action.
+*
+*/
+
+
+// System Includesc
+#include <s32mem.h>
+
+// User Includes
+#include "evtaction.h"
+#include "evtdebug.h"
+
+// ================ Member funtions for CEvtAction class ======================
+
+// ---------------------------------------------------------------------------
+// CEvtAction::CEvtAction
+// ---------------------------------------------------------------------------
+//
+EXPORT_C CEvtAction::CEvtAction():iId(0),
+	iType( EAlarm )
+    {    
+    }
+    
+// ---------------------------------------------------------------------------
+// CEvtAction::~CEvtAction
+// ---------------------------------------------------------------------------
+//
+EXPORT_C CEvtAction::~CEvtAction()
+    {
+    delete iActionString;
+    
+    } 
+    
+// ---------------------------------------------------------------------------
+// CEvtAction::NewL
+// ---------------------------------------------------------------------------
+//
+EXPORT_C CEvtAction* CEvtAction::NewL()
+    {
+	CEvtAction* self = NewLC( );
+	CleanupStack::Pop( self );
+	return self;
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtAction::NewLC
+// ---------------------------------------------------------------------------
+//
+EXPORT_C CEvtAction* CEvtAction::NewLC()
+    {
+	CEvtAction* self = new ( ELeave )CEvtAction( );
+	CleanupStack::PushL( self );
+	self->ConstructL( );
+	return self;
+    } 
+
+// ---------------------------------------------------------------------------
+// CEvtAction::ConstructL
+// ---------------------------------------------------------------------------
+//
+EXPORT_C void CEvtAction::ConstructL()
+    {
+    // Allocate the Null string by default
+    iActionString = KNullDesC().AllocL();
+    } 
+    
+// ---------------------------------------------------------------------------
+// CEvtAction::Id
+// ---------------------------------------------------------------------------
+//
+TInt64 CEvtAction::Id() const
+    {
+    return iId;
+    } 
+    
+// ---------------------------------------------------------------------------
+// CEvtAction::SetId
+// ---------------------------------------------------------------------------
+//
+void CEvtAction::SetId( const TInt64 aId )
+    {
+    iId = aId;
+    } 
+    
+// ---------------------------------------------------------------------------
+// CEvtAction::EvtId
+// ---------------------------------------------------------------------------
+//
+TEvtEventId CEvtAction::EvtId() const
+    {
+    return iEvtId;
+    } 
+    
+// ---------------------------------------------------------------------------
+// CEvtAction::SetEvtId
+// ---------------------------------------------------------------------------
+//
+void CEvtAction::SetEvtId( const TEvtEventId aEvtId )
+    {
+    iEvtId = aEvtId;
+    } 
+
+// ---------------------------------------------------------------------------
+// CEvtAction::Action
+// ---------------------------------------------------------------------------
+//
+TPtrC CEvtAction::Action() const
+    {
+    return iActionString->Des();
+    } 
+    
+// ---------------------------------------------------------------------------
+// CEvtAction::SetActionL
+// ---------------------------------------------------------------------------
+//
+void CEvtAction::SetActionL( const TDesC& aAction )
+    {
+    delete iActionString;
+    iActionString = NULL;
+    iActionString = aAction.AllocL();
+    
+    // return, if the String length is 0.
+    // Since we can not retrieve type of Action
+    if( 0 == iActionString->Length() )
+        return;
+    
+	// Retrieve action type
+    CBufFlat* lengthBuf = CBufFlat::NewL( iActionString->Length() );
+    CleanupStack::PushL( lengthBuf );
+    lengthBuf->InsertL( 0, iActionString->Ptr(), iActionString->Length() );
+    
+    // Create a stream to buffer
+    RBufReadStream writeStream( *lengthBuf, 0 );
+    CleanupClosePushL( writeStream ); 
+    
+    // Extract action type info
+    iType = static_cast<TEvtActionType>( writeStream.ReadInt8L() );
+    
+    CleanupStack::PopAndDestroy(); // writeStream
+    CleanupStack::PopAndDestroy( lengthBuf ); // lengthBuf
+      
+    } 
+    
+// ---------------------------------------------------------------------------
+// CEvtAction::Type
+// ---------------------------------------------------------------------------
+//
+EXPORT_C TEvtActionType CEvtAction::Type() const
+    {
+    return iType;
+    } 
+    
+// ---------------------------------------------------------------------------
+// CEvtAction::SetType
+// ---------------------------------------------------------------------------
+//
+void CEvtAction::SetType( const TEvtActionType aType )
+    {
+    iType = aType;
+    } 
+    
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventsengine/src/evtbasiceventinfo.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,174 @@
+/*
+* 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:  Basic Classes for the Location Events.
+*
+*/
+
+
+// System Includes
+
+// User Includes
+#include "evtbasiceventinfo.h"
+
+// ================ Member funtions for CEvtBasicEventInfo class =============
+
+// ---------------------------------------------------------------------------
+// CEvtBasicEventInfo::CEvtBasicEventInfo
+// ---------------------------------------------------------------------------
+//
+EXPORT_C CEvtBasicEventInfo::CEvtBasicEventInfo():
+	iEventId( 0 )
+    {    
+    }
+    
+// ---------------------------------------------------------------------------
+// CEvtBasicEventInfo::~CEvtBasicEventInfo
+// ---------------------------------------------------------------------------
+//
+EXPORT_C CEvtBasicEventInfo::~CEvtBasicEventInfo()
+    {
+    delete iSubject;
+    delete iPlace;
+    } 
+    
+// ---------------------------------------------------------------------------
+// CEvtBasicEventInfo::NewL
+// ---------------------------------------------------------------------------
+//
+EXPORT_C CEvtBasicEventInfo* CEvtBasicEventInfo::NewL()
+    {
+	CEvtBasicEventInfo* self = NewLC( );
+	CleanupStack::Pop( self );
+	return self;
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtBasicEventInfo::NewLC
+// ---------------------------------------------------------------------------
+//
+EXPORT_C CEvtBasicEventInfo* CEvtBasicEventInfo::NewLC()
+    {
+	CEvtBasicEventInfo* self = new ( ELeave )CEvtBasicEventInfo( );
+	CleanupStack::PushL( self );
+	self->ConstructL( );
+	return self;
+    } 
+
+// ---------------------------------------------------------------------------
+// CEvtBasicEventInfo::ConstructL
+// ---------------------------------------------------------------------------
+//
+EXPORT_C void CEvtBasicEventInfo::ConstructL()
+    {
+    // Allocate empty string.
+    iSubject = KNullDesC().AllocL();
+    iPlace = KNullDesC().AllocL();
+    } 
+    
+// ---------------------------------------------------------------------------
+// CEvtBasicEventInfo::EventId
+// ---------------------------------------------------------------------------
+//
+EXPORT_C TEvtEventId CEvtBasicEventInfo::EventId() const
+    {
+    return iEventId;
+    } 
+    
+// ---------------------------------------------------------------------------
+// CEvtBasicEventInfo::SetEventId
+// ---------------------------------------------------------------------------
+//
+EXPORT_C void CEvtBasicEventInfo::SetEventId( const TEvtEventId aId )
+    {
+    iEventId = aId;
+    } 
+    
+// ---------------------------------------------------------------------------
+// CEvtBasicEventInfo::Subject
+// ---------------------------------------------------------------------------
+//
+EXPORT_C TPtrC CEvtBasicEventInfo::Subject() const
+    {
+    return iSubject->Des();
+    } 
+    
+// ---------------------------------------------------------------------------
+// CEvtBasicEventInfo::SetSubjectL
+// ---------------------------------------------------------------------------
+//
+EXPORT_C void CEvtBasicEventInfo::SetSubjectL( const TDesC& aSubject )
+    {
+    delete iSubject;
+    iSubject = NULL;
+    iSubject = aSubject.AllocL();
+    } 
+    
+// ---------------------------------------------------------------------------
+// CEvtBasicEventInfo::Place
+// ---------------------------------------------------------------------------
+//
+EXPORT_C TPtrC CEvtBasicEventInfo::Place() const
+    {
+    return iPlace->Des();
+    } 
+    
+// ---------------------------------------------------------------------------
+// CEvtBasicEventInfo::SetPlaceL
+// ---------------------------------------------------------------------------
+//
+EXPORT_C void CEvtBasicEventInfo::SetPlaceL( const TDesC& aPlace )
+    {
+    delete iPlace;
+    iPlace = NULL;
+    iPlace = aPlace.AllocL();
+    } 
+    
+// ---------------------------------------------------------------------------
+// CEvtEvent::Repeat
+// ---------------------------------------------------------------------------
+//
+EXPORT_C TBool CEvtBasicEventInfo::Repeat() const
+    {
+    return iRepeat;
+    } 
+    
+// ---------------------------------------------------------------------------
+// CEvtEvent::SetRepeat
+// ---------------------------------------------------------------------------
+//
+EXPORT_C void CEvtBasicEventInfo::SetRepeat( const TBool aRepeat )
+    {
+    iRepeat = aRepeat;
+    } 
+
+// ---------------------------------------------------------------------------
+// CEvtBasicEventInfo::EventStatus
+// ---------------------------------------------------------------------------
+//
+EXPORT_C TEvtEventStatus CEvtBasicEventInfo::EventStatus() const
+    {
+    return iEventStatus;
+    } 
+    
+// ---------------------------------------------------------------------------
+// CEvtBasicEventInfo::SetEventStatus
+// ---------------------------------------------------------------------------
+//
+EXPORT_C void CEvtBasicEventInfo::SetEventStatus( 
+                            const TEvtEventStatus aEventStatus )
+    {
+    iEventStatus = aEventStatus;
+    } 
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventsengine/src/evtdatabase.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,1147 @@
+/*
+* 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:  Class that directly interacts with Sqlite database.
+*
+*/
+
+
+// System Includes
+#include <s32strm.h>
+
+// User Includes
+#include "evtdatabase.h"
+#include "evtdbnotifier.h"
+#include "evtaction.h"
+#include "evtconsts.h"
+#include "evtdebug.h"
+
+// Constant
+const TInt KBufferLength = 512;
+const TInt KMaxIntLength = 22;
+
+// ================ Member funtions for CEvtDatabase class ==================
+
+// ---------------------------------------------------------------------------
+// CEvtDatabase::CEvtDatabase
+// ---------------------------------------------------------------------------
+//
+CEvtDatabase::CEvtDatabase( )
+    {
+    }
+    
+// ---------------------------------------------------------------------------
+// CEvtDatabase::~CEvtDatabase
+// ---------------------------------------------------------------------------
+//
+CEvtDatabase::~CEvtDatabase()
+    {
+    // Close Database handle
+    CloseDatabase();
+    
+    delete iDbNotifier;
+    } 
+    
+// ---------------------------------------------------------------------------
+// CEvtDatabase::NewL
+// ---------------------------------------------------------------------------
+//
+CEvtDatabase* CEvtDatabase::NewL( )
+    {
+	CEvtDatabase* self = NewLC( );
+	CleanupStack::Pop( self );
+	return self;
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtDatabase::NewLC
+// ---------------------------------------------------------------------------
+//
+CEvtDatabase* CEvtDatabase::NewLC( )
+    {
+	CEvtDatabase* self = new ( ELeave )CEvtDatabase( );
+	CleanupStack::PushL( self );
+	self->ConstructL( );
+	return self;
+    } 
+
+// ---------------------------------------------------------------------------
+// CEvtDatabase::ConstructL
+// ---------------------------------------------------------------------------
+//
+void CEvtDatabase::ConstructL()
+    {
+	EVTUIDEBUG( "+ CEvtDatabase::OpenDatabaseL()" );
+	EVTUIDEBUG( "Calling OpenDatabaseL()" );
+    // Open the handle to Database
+    OpenDatabaseL( );
+    
+	EVTUIDEBUG( "Calling CEvtDbNotifier::NewL()" );
+    // Notifier is instantiated to notify and listen to database change.
+    iDbNotifier = CEvtDbNotifier::NewL( *this );
+	EVTUIDEBUG( "+ CEvtDatabase::OpenDatabaseL()" );
+    } 
+
+// ---------------------------------------------------------------------------
+// CEvtDatabase::CreateOpenDatabaseL
+// ---------------------------------------------------------------------------
+//
+void CEvtDatabase::OpenDatabaseL( )
+	{
+	EVTUIDEBUG( "+ CEvtDatabase::OpenDatabaseL()" );
+  	
+  	// First try to open the database.
+	TInt err = iDb.Open( KEventsDbSecureFName() );
+	
+	// If the database is not present, then a database and schema has to be
+  	// created
+	if( KErrNotFound == err )
+		{
+		CreateOpenDatabaseL( );		// Create Database
+		CreateSchemaL( );			// Create Schema
+		}
+	else if( KErrNone != err )
+		User::LeaveIfError( err );	// Leave if Open fails for any other reason
+	EVTUIDEBUG( "- CEvtDatabase::OpenDatabaseL()" );
+	}
+
+// ---------------------------------------------------------------------------
+// CEvtDatabase::CloseDatabaseL
+// ---------------------------------------------------------------------------
+//
+void CEvtDatabase::CloseDatabase()
+	{
+	EVTUIDEBUG( "+ CEvtDatabase::CloseDatabase()" );
+	// Close db handle
+	iDb.Close();
+	EVTUIDEBUG( "- CEvtDatabase::CloseDatabase()" );
+	}
+
+// ---------------------------------------------------------------------------
+// CEvtDatabase::CreateDatabaseL
+// ---------------------------------------------------------------------------
+//
+void CEvtDatabase::CreateOpenDatabaseL( )
+	{
+	EVTUIDEBUG( "+ CEvtDatabase::CreateOpenDatabaseL()" );
+
+	// To create a Secure Database, we first need to create the Security policy.
+	// Security policy once defined for a database, can not be changed.
+	TSecurityPolicy defaultPolicy( TSecurityPolicy::EAlwaysPass );
+	RSqlSecurityPolicy securityPolicy;
+	TInt err = securityPolicy.Create( defaultPolicy );
+	User::LeaveIfError( err );
+
+    // Define Security Policy
+    const TSecurityPolicy KSchemaPolicy( ECapabilityLocation );
+    const TSecurityPolicy KReadWritePolicy( ECapabilityLocation );
+
+	// Set the security Policy for Schema and tables
+	securityPolicy.SetDbPolicy( RSqlSecurityPolicy::ESchemaPolicy, 
+															KSchemaPolicy );
+	securityPolicy.SetDbPolicy( RSqlSecurityPolicy::EReadPolicy, 
+															KReadWritePolicy );
+	securityPolicy.SetDbPolicy( RSqlSecurityPolicy::EWritePolicy, 
+															KReadWritePolicy );
+	
+	// CreateL will create and open the handle to database.
+	iDb.CreateL( KEventsDbSecureFName(), securityPolicy );
+	
+	// Close the Security Policy
+	securityPolicy.Close();
+	
+	EVTUIDEBUG( "- CEvtDatabase::CreateOpenDatabaseL()" );
+	}
+
+// ---------------------------------------------------------------------------
+// CEvtDatabase::CreateSchemaL
+// ---------------------------------------------------------------------------
+//
+void CEvtDatabase::CreateSchemaL()
+	{
+	EVTUIDEBUG( "+ CEvtDatabase::CreateSchemaL()" );
+	// Create Tables in database
+	CreateTablesL();
+	// Create Triggers in database
+	CreateTriggerL();
+	// Create Indexes in database
+	CreateIndexL();
+	EVTUIDEBUG( "- CEvtDatabase::CreateSchemaL()" );
+	}
+
+// ---------------------------------------------------------------------------
+// CEvtDatabase::CreateTablesL
+// ---------------------------------------------------------------------------
+//
+void CEvtDatabase::CreateTablesL()
+	{
+	EVTUIDEBUG( "+ CEvtDatabase::CreateTablesL()" );
+	
+	// Leave if the creation of tables fail.
+	User::LeaveIfError( 
+			iDb.Exec( KCreateEventTable ) );
+	User::LeaveIfError( 
+			iDb.Exec( KCreateActionTable ) );
+	EVTUIDEBUG( "- CEvtDatabase::CreateTablesL()" );
+	}
+	
+// ---------------------------------------------------------------------------
+// CEvtDatabase::CreateTriggerL
+// ---------------------------------------------------------------------------
+//
+void CEvtDatabase::CreateTriggerL()
+	{
+	EVTUIDEBUG( "+ CEvtDatabase::CreateTriggerL()" );
+	// Triggers are used to maintain the referential integrity between
+	// Event and Action tables.
+	// This avoids Insert, Update and Delete anamolies.
+	 
+	// Leave if the creation of triggers fail.
+	User::LeaveIfError( 
+			iDb.Exec( KCreateTriggerActionEventInsert ) );
+	User::LeaveIfError( 
+			iDb.Exec( KCreateTriggerActionEventUpdate ) );
+	User::LeaveIfError( 
+			iDb.Exec( KCreateTriggerActionEventDelete ) );
+				
+	EVTUIDEBUG( "- CEvtDatabase::CreateTriggerL()" );
+	}
+
+// ---------------------------------------------------------------------------
+// CEvtDatabase::CreateIndexL
+// ---------------------------------------------------------------------------
+//
+void CEvtDatabase::CreateIndexL()
+	{
+	EVTUIDEBUG( "+ CEvtDatabase::CreateIndexL()" );
+    // Indexes are created to improve the performance of select Queries
+    // Following indexes are created
+    // 1. Index to "Select Event based on Status and Sort by Subject"
+    // 2. Index to "Select Event based on Unique Event Id"
+    // 3. Index to "Select Event based on Event Id" - (LBT Engine's Id)
+    // 4. Index to "Select Action based on Unique Event Id"
+	 
+	// Leave if the creation of indexes fail.
+	User::LeaveIfError( 
+			iDb.Exec( KCreateEventStatusSubjectIndex ) );
+	User::LeaveIfError( 
+			iDb.Exec( KCreateEventEvtIdIndex ) );
+	User::LeaveIfError( 
+			iDb.Exec( KCreateActionEvtIdIndex ) );
+			
+	EVTUIDEBUG( "- CEvtDatabase::CreateIndexL()" );
+	}
+
+// ---------------------------------------------------------------------------
+// CEvtDatabase::GetEventsL
+// ---------------------------------------------------------------------------
+//
+void CEvtDatabase::GetEventsL( 
+                            TEvtEventStatus    aEventStatus,
+                            RPointerArray<CEvtBasicEventInfo>&     aEventArray )
+    {
+	EVTUIDEBUG( "+ CEvtDatabase::GetEventsL() - Status" );
+    RSqlStatement stmt;
+    
+    // Prepare the SQL statement to Get Events based on Status
+	stmt.Prepare( iDb, KSelectBasicEventOnStatus );
+	
+	// Set the Status parameter in SQL statement
+	TInt paramIndex = stmt.ParameterIndex( KStatus );
+	stmt.BindInt( paramIndex,aEventStatus );
+	
+	// Pass the SQL statement to get events.
+    GetEventsL( stmt, aEventArray );
+	
+	// Close statement
+	stmt.Close();
+	EVTUIDEBUG( "- CEvtDatabase::GetEventsL() - Status" );
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtDatabase::GetEventsL
+// ---------------------------------------------------------------------------
+//
+void CEvtDatabase::GetEventsL( 
+                            RPointerArray<CEvtBasicEventInfo>&     aEventArray )
+    {
+	EVTUIDEBUG( "+ CEvtDatabase::GetEventsL() - without Status" );
+    RSqlStatement stmt;
+    
+    // Prepare the SQL statement to Get Events based on Status
+	stmt.Prepare( iDb, KSelectBasicEvent );
+	
+	// Pass the SQL statement to get events.
+    GetEventsL( stmt, aEventArray );
+	
+	// Close statement
+	stmt.Close();
+	EVTUIDEBUG( "- CEvtDatabase::GetEventsL() - without Status" );
+    } 
+    
+// ---------------------------------------------------------------------------
+// CEvtDatabase::GetEventL
+// ---------------------------------------------------------------------------
+//
+CEvtEvent* CEvtDatabase::GetEventL( TEvtEventId      aEventId )
+    {
+	EVTUIDEBUG( "+ CEvtDatabase::GetEventL()" );
+
+	RSqlStatement stmt;
+	CEvtEvent* evt = NULL;
+	
+	// Prepare the SQL statement to Get Events based on Id
+	stmt.Prepare( iDb, KSelectEventFromEventId );
+	
+	// Set the Id parameter in SQL statement
+	TInt paramIndex=stmt.ParameterIndex( KEventId );
+	stmt.BindInt( paramIndex, aEventId );
+	
+	// Constants representing the columns in Query
+	TInt columnIndexStatus=0; 
+	TInt columnIndexSubject=1; 
+	TInt columnIndexPlace=2; 
+	TInt columnIndexRadius=3; 
+	TInt columnIndexDescription=4; 
+	TInt columnIndexRepeat=5; 
+	TInt columnIndexActionId=6;
+	TInt columnIndexAction=7;  
+	TInt columnIndexActionEvtId=8; 
+
+    // Flag to loop out after the first element is found in database
+    // This is not required as we maintain unique Id for every event.
+    // But to ensure that we do not allocate many events object to evt,
+    // this flag is defined.
+    TBool flag( ETrue );
+
+	// Set the other attributes of the Requested Event
+	while( flag && stmt.Next() == KSqlAtRow )
+		{
+		flag = EFalse;
+        evt = CEvtEvent::NewLC();
+
+    	// Set the Id of the Requested Event
+    	evt->SetEventId(aEventId);
+
+		TInt value = stmt.ColumnInt( columnIndexStatus );
+		evt->SetEventStatus( static_cast<TEvtEventStatus>(value) );
+		
+		TPtrC subject=stmt.ColumnTextL( columnIndexSubject );
+		evt->SetSubjectL(subject);
+		
+		TPtrC place=stmt.ColumnTextL( columnIndexPlace );
+		evt->SetPlaceL(place);
+    
+		TReal realvalue = stmt.ColumnReal( columnIndexRadius );
+        evt->SetRadius( realvalue );
+		
+		TPtrC desc=stmt.ColumnTextL( columnIndexDescription );
+		evt->SetDescriptionL(desc);
+        
+		value = stmt.ColumnInt( columnIndexRepeat );
+        evt->SetRepeat(value);
+        
+		TInt64 value64 = stmt.ColumnInt64( columnIndexActionId );
+		if( value64 != 0 )
+			{			
+    		// Create action instance to set for Event
+    		// ownership is not passed.
+    		CEvtAction* actn = CEvtAction::NewLC();
+			
+			// Set the Unique Id for Action
+			actn->SetId( value64 );
+			
+			// Set Action to an Event only if there is an Action String.
+			TPtrC action = stmt.ColumnTextL( columnIndexAction );
+	    	actn->SetActionL( action );
+    		
+    		// Set the Event Id
+			TUint32 value32 = stmt.ColumnInt( columnIndexActionEvtId );
+	    	actn->SetEvtId( value32 );
+        
+        	// Set the Action to Event
+	    	evt->SetActionL( actn );
+	    	
+    		// Pop action after setting.
+    		CleanupStack::Pop( actn );
+			}
+		
+		// Pop the Event object
+		CleanupStack::Pop( evt );
+		}
+	stmt.Close();
+	
+	if( flag )
+        User::Leave( KErrNotFound );	
+        
+	EVTUIDEBUG( "- CEvtDatabase::GetEventL()" );
+	return evt;
+    } 
+    
+// ---------------------------------------------------------------------------
+// CEvtDatabase::UpdateEvent
+// ---------------------------------------------------------------------------
+//
+void CEvtDatabase::UpdateEventL( 
+                            CEvtEvent&          aEvtEvent )
+    {
+	EVTUIDEBUG( "+ CEvtDatabase::UpdateEventL()" );
+	
+	// Update Event's Attributes.
+    UpdateEventTableL( aEvtEvent );
+	
+	if( aEvtEvent.HasAction() )
+		{
+		aEvtEvent.Action().SetEvtId( aEvtEvent.EventId() );
+		if( CheckIfActionPresentL( aEvtEvent.Action().Id() ) )
+			UpdateActionL( aEvtEvent.Action() );
+		else
+			CreateActionL( aEvtEvent.Action() );
+		}
+	else
+		{
+			DeleteActionL( aEvtEvent.EventId() );
+		}
+		
+	// Notify the database change for Modify
+	iDbNotifier->DbChangedL( );
+	EVTUIDEBUG( "- CEvtDatabase::UpdateEventL()" );
+    } 
+    
+// ---------------------------------------------------------------------------
+// CEvtDatabase::AddEventL
+// ---------------------------------------------------------------------------
+//
+void CEvtDatabase::AddEventL( CEvtEvent&     aEvtEvent )
+    {
+	EVTUIDEBUG( "+ CEvtDatabase::AddEventL()" );
+    
+	RSqlStatement stmt;
+	TInt paramIndex;
+	
+	// We need to create the streams to insert large texts.
+	RSqlParamWriteStream subjectStream;
+	RSqlParamWriteStream placeStream;
+	RSqlParamWriteStream descStream;
+	CleanupClosePushL( subjectStream );
+	CleanupClosePushL( placeStream );
+	CleanupClosePushL( descStream );
+	
+	// Prepare the SQL statement to Get Events based on Status
+	stmt.Prepare( iDb, KInsertEvent );
+	
+	// Set Status
+	paramIndex = stmt.ParameterIndex( KStatus );
+	stmt.BindInt( paramIndex, aEvtEvent.EventStatus() );
+	
+	// Set Subject
+	paramIndex = stmt.ParameterIndex( KSubject );
+	if( KNullDesC() == aEvtEvent.Subject() )
+		{
+	    stmt.BindNull( paramIndex );
+		}
+	else
+		{
+		subjectStream.BindText( stmt, paramIndex );
+		subjectStream.WriteL( aEvtEvent.Subject() );
+		subjectStream.CommitL();
+		}
+	
+	// Set Place
+	paramIndex = stmt.ParameterIndex( KPlace );
+	if( KNullDesC() == aEvtEvent.Place() )
+		{
+	    stmt.BindNull( paramIndex );
+		}
+	else
+		{
+		placeStream.BindText( stmt, paramIndex );
+		placeStream.WriteL( aEvtEvent.Place() );
+		placeStream.CommitL();
+		}
+	
+	// Set Radius
+	paramIndex = stmt.ParameterIndex( KRadius );
+	stmt.BindReal( paramIndex, aEvtEvent.Radius() );
+	
+	// Set Description
+	paramIndex = stmt.ParameterIndex( KDescription );
+	if( KNullDesC() == aEvtEvent.Description() )
+		{
+	    stmt.BindNull( paramIndex );
+		}
+	else
+		{
+		descStream.BindText( stmt, paramIndex );
+		descStream.WriteL( aEvtEvent.Description() );
+		descStream.CommitL();
+		}
+	
+	// Set Repeat
+	paramIndex = stmt.ParameterIndex( KRepeat );
+	stmt.BindInt( paramIndex, aEvtEvent.Repeat() );
+    
+    // Set Event Id
+	paramIndex = stmt.ParameterIndex( KEventId );
+	stmt.BindInt( paramIndex, aEvtEvent.EventId() );
+	
+	// Execute the Remove SQL statement
+	User::LeaveIfError( stmt.Exec() );
+	
+	//Close the streams
+	CleanupStack::PopAndDestroy( &descStream );
+	CleanupStack::PopAndDestroy( &placeStream );
+	CleanupStack::PopAndDestroy( &subjectStream );
+	    
+	stmt.Close();
+    
+	// Insert into Action table If action is present for the event.  
+	if( aEvtEvent.HasAction() )
+		{
+		aEvtEvent.Action().SetEvtId( aEvtEvent.EventId() );
+			CreateActionL( aEvtEvent.Action() );
+		}
+        
+	// Notify the database change for Insert
+	iDbNotifier->DbChangedL( );
+	EVTUIDEBUG( "- CEvtDatabase::AddEventL()" );
+    }  
+ 
+// ---------------------------------------------------------------------------
+// CEvtDatabase::RemoveEventsL
+// ---------------------------------------------------------------------------
+//
+void CEvtDatabase::RemoveEventsL( const RArray<TEvtEventId>&     aEventArray )
+    {
+	EVTUIDEBUG( "+ CEvtDatabase::RemoveEventsL()" ); 
+    // Removing an Event in database should be done in an order of
+    // - remove Action entry and then remove Event entry
+    
+    // Leave if there are no array elements
+    if( aEventArray.Count() == 0 )
+        User::Leave( KErrArgument );
+    
+    RSqlStatement stmt;
+    
+    HBufC8* buf = HBufC8::NewLC(KBufferLength);
+    
+    buf->Des().Zero();
+    TInt tempLength = KOr().Length()+KMultiActionId().Length()+KMaxIntLength;
+
+    for(TInt i=0; i<aEventArray.Count(); i++ )
+        {
+        if(buf->Length() == 0)
+            {
+            buf->Des().Zero();
+            buf->Des().Append(KDeleteMultiAction());
+            buf->Des().Append(KMultiActionId());
+            buf->Des().AppendNum(aEventArray[i]);
+            }
+        else
+            {
+            buf->Des().Append(KOr());
+            buf->Des().Append(KMultiActionId());
+            buf->Des().AppendNum(aEventArray[i]);
+            }
+
+        if( i == aEventArray.Count()-1 || KBufferLength - buf->Length() < tempLength )
+            {
+            // Prepare the SQL statement to Update Status based on Id
+            stmt.Prepare( iDb, *buf );
+            
+            // Execute the Remove SQL statement
+            User::LeaveIfError( stmt.Exec() );
+            buf->Des().Zero();
+            
+            // Close the Connection
+            stmt.Close();
+            }
+        }
+    
+    buf->Des().Zero();
+    tempLength = KOr().Length()+KMultiEventId().Length()+KMaxIntLength;
+
+    for(TInt i=0; i<aEventArray.Count(); i++ )
+        {
+        if(buf->Length() == 0)
+            {
+            buf->Des().Zero();
+            buf->Des().Append(KDeleteMultiEvent());
+            buf->Des().Append(KMultiEventId());
+            buf->Des().AppendNum(aEventArray[i]);
+            }
+        else
+            {
+            buf->Des().Append(KOr());
+            buf->Des().Append(KMultiEventId());
+            buf->Des().AppendNum(aEventArray[i]);
+            }
+
+        if( i == aEventArray.Count()-1 || KBufferLength - buf->Length() < tempLength )
+            {
+            // Prepare the SQL statement to Update Status based on Id
+            stmt.Prepare( iDb, *buf );
+            
+            // Execute the Remove SQL statement
+            User::LeaveIfError( stmt.Exec() );
+            buf->Des().Zero();
+            
+            // Close the Connection
+            stmt.Close();
+            }
+        }
+    
+    CleanupStack::PopAndDestroy( buf ); //buf
+	        	
+	// Notify the database change for Delete
+	iDbNotifier->DbChangedL( );
+	EVTUIDEBUG( "- CEvtDatabase::RemoveEventsL()" ); 
+    }       
+ 
+// ---------------------------------------------------------------------------
+// CEvtDatabase::UpdateEventsStatusL
+// ---------------------------------------------------------------------------
+//
+void CEvtDatabase::UpdateEventsStatusL( const RArray<TEvtEventId>& aEventArray,  TEvtEventStatus  aEvtStatus )
+    {
+    EVTUIDEBUG( "Sync UpdateEventsStatusL"); 
+    
+    // Leave if there are no array elements
+    if( aEventArray.Count() == 0 )
+        User::Leave( KErrArgument );
+    
+    RSqlStatement stmt;
+    
+    HBufC8* buf = HBufC8::NewLC(KBufferLength);
+    buf->Des().Zero();
+    TInt tempLength = KOr().Length()+KMultiEventId().Length()+KMaxIntLength;
+
+    for(TInt i=0; i<aEventArray.Count(); i++ )
+        {
+        if(buf->Length() == 0)
+            {
+            buf->Des().Zero();
+            buf->Des().Append(KUpdateMultiStatus());
+            buf->Des().AppendNum(aEvtStatus);
+            buf->Des().Append(KWhere());
+            buf->Des().Append(KMultiEventId());
+            buf->Des().AppendNum(aEventArray[i]);
+            }
+        else
+            {
+            buf->Des().Append(KOr());
+            buf->Des().Append(KMultiEventId());
+            buf->Des().AppendNum(aEventArray[i]);
+            }
+
+        if( i == aEventArray.Count()-1 || KBufferLength - buf->Length() < tempLength )
+            {
+            // Prepare the SQL statement to Update Status based on Id
+            stmt.Prepare( iDb, *buf );
+            
+            // Execute the Remove SQL statement
+            User::LeaveIfError( stmt.Exec() );
+            buf->Des().Zero();
+            
+            // Close the Connection
+            stmt.Close();
+            }
+        }
+
+    CleanupStack::PopAndDestroy( buf ); //buf
+                
+    // Notify the database change for Delete
+    iDbNotifier->DbChangedL( );
+    }     
+ 
+// ---------------------------------------------------------------------------
+// CEvtDatabase::UpdateEventStatusL
+// ---------------------------------------------------------------------------
+//
+void CEvtDatabase::UpdateEventStatusL( 
+                            TEvtEventId      aEvtId,
+                            TEvtEventStatus    aEvtStatus)
+    {
+	EVTUIDEBUG( "+ CEvtDatabase::UpdateEventStatusL()" ); 
+	RSqlStatement stmt;
+	TInt paramIndex;
+	
+	// Prepare the SQL statement for Status updation
+	stmt.Prepare( iDb, KUpdateEventStatus );
+	
+	// Set the Status parameter in SQL statement
+	paramIndex=stmt.ParameterIndex( KStatus );
+	stmt.BindInt( paramIndex, aEvtStatus );
+	
+	// Set the Id parameter in SQL statement
+	paramIndex=stmt.ParameterIndex( KEventId );
+	stmt.BindInt64( paramIndex, aEvtId );
+	
+	// Execute the Update SQL statement
+	User::LeaveIfError( stmt.Exec() );
+	
+	stmt.Close();
+	
+	// Notify the database change for Modify
+	iDbNotifier->DbChangedL( );
+	EVTUIDEBUG( "- CEvtDatabase::UpdateEventStatusL()" ); 
+    } 
+         
+// ---------------------------------------------------------------------------
+// CEvtDatabase::RemoveEventL
+// ---------------------------------------------------------------------------
+//
+void CEvtDatabase::RemoveEventL( TEvtEventId      aEventId )
+    {
+	EVTUIDEBUG( "+ CEvtDatabase::RemoveEventL()" ); 
+    
+    // To maintain the Referential Integrity, we have to first delete
+    // Action and then Event
+	DeleteActionL( aEventId );
+	DeleteEventL( aEventId );
+	
+	// Notify the database change for Delete
+	iDbNotifier->DbChangedL( );
+	EVTUIDEBUG( "- CEvtDatabase::RemoveEventL()" ); 
+	} 
+	
+// ---------------------------------------------------------------------------
+// CEvtDatabase::GetEventsL
+// ---------------------------------------------------------------------------
+//
+void CEvtDatabase::GetEventsL( 
+                            RSqlStatement&      aStmt,
+                            RPointerArray<CEvtBasicEventInfo>&     aEventArray )
+    {
+	EVTUIDEBUG( "+ CEvtDatabase::GetEventsL() - Generic" ); 
+    
+	TInt columnIndexEventId=0; 
+	TInt columnIndexStatus=1; 
+	TInt columnIndexSubject=2; 
+	TInt columnIndexPlace=3;  
+	TInt columnIndexRepeat=4; 
+	/*
+	Note that the column can be looked up if necessary
+	although this is more expensive
+	TInt columnIndex=aStmt.ColumnIndex("location");
+	*/
+	
+	// Keep the count of the number of Events object that are pushed on to
+	// Cleanup Stack. So that those many objects can be popped up later.
+	TInt count=0;
+	
+	while( aStmt.Next() == KSqlAtRow )
+		{
+        count++;
+		CEvtBasicEventInfo* evt = CEvtBasicEventInfo::NewLC();
+		
+        TUint32 value32 = aStmt.ColumnInt( columnIndexEventId );
+		evt->SetEventId( value32 );
+
+		TInt value = aStmt.ColumnInt( columnIndexStatus );
+		evt->SetEventStatus( static_cast<TEvtEventStatus>( value ) );
+		
+		TPtrC subject=aStmt.ColumnTextL( columnIndexSubject );
+		evt->SetSubjectL( subject );
+		
+		TPtrC place=aStmt.ColumnTextL( columnIndexPlace );
+		evt->SetPlaceL( place );
+        
+		value = aStmt.ColumnInt( columnIndexRepeat );
+		evt->SetRepeat(value);
+		        
+        aEventArray.Append( evt );
+		}
+	
+	// count number of objects from Cleanup stack
+    CleanupStack::Pop( count );
+	EVTUIDEBUG( "- CEvtDatabase::GetEventsL() - Generic" ); 
+    } 
+    
+// ---------------------------------------------------------------------------
+// CEvtDatabase::UpdateEventTableL
+// ---------------------------------------------------------------------------
+//
+void CEvtDatabase::UpdateEventTableL( 
+                            CEvtEvent&          aEvtEvent )
+    {
+	EVTUIDEBUG( "+ CEvtDatabase::UpdateEventTableL()" ); 
+    // Update all the attributes of an Event
+	  
+	RSqlStatement stmt;
+	TInt paramIndex;
+	
+	// We need to create the streams to insert large texts.
+	RSqlParamWriteStream subjectStream;
+	RSqlParamWriteStream placeStream;
+	RSqlParamWriteStream descStream;
+	CleanupClosePushL( subjectStream );
+	CleanupClosePushL( placeStream );
+	CleanupClosePushL( descStream );
+	
+	// Prepare the SQL statement to Get Events based on Status
+	stmt.Prepare( iDb, KUpdateEvent );
+	
+	// Set Status
+	paramIndex = stmt.ParameterIndex( KStatus );
+	stmt.BindInt( paramIndex, aEvtEvent.EventStatus() );
+	
+	// Set Subject
+	paramIndex = stmt.ParameterIndex( KSubject );
+	if( KNullDesC() == aEvtEvent.Subject() )
+		{
+	    stmt.BindNull( paramIndex );
+		}
+	else
+		{
+		subjectStream.BindText( stmt, paramIndex );
+		subjectStream.WriteL( aEvtEvent.Subject() );
+		subjectStream.CommitL();
+		}
+	
+	// Set Place
+	paramIndex = stmt.ParameterIndex( KPlace );
+	if( KNullDesC() == aEvtEvent.Place() )
+		{
+	    stmt.BindNull( paramIndex );
+		}
+	else
+		{
+		placeStream.BindText( stmt, paramIndex );
+		placeStream.WriteL( aEvtEvent.Place() );
+		placeStream.CommitL();
+		}
+	
+	// Set Radius
+	paramIndex = stmt.ParameterIndex( KRadius );
+	stmt.BindReal( paramIndex, aEvtEvent.Radius() );
+	
+	// Set Description
+	paramIndex = stmt.ParameterIndex( KDescription );
+	if( KNullDesC() == aEvtEvent.Description() )
+		{
+	    stmt.BindNull( paramIndex );
+		}
+	else
+		{
+		descStream.BindText( stmt, paramIndex );
+		descStream.WriteL( aEvtEvent.Description() );
+		descStream.CommitL();
+		}
+	
+	// Set Repeat
+	paramIndex = stmt.ParameterIndex( KRepeat );
+	stmt.BindInt( paramIndex, aEvtEvent.Repeat() );
+    
+    // Set Id
+	paramIndex = stmt.ParameterIndex( KEventId );
+	stmt.BindInt( paramIndex, aEvtEvent.EventId() );
+	
+	// Execute the Remove SQL statement
+	User::LeaveIfError( stmt.Exec() );
+	
+	//Close the streams
+	CleanupStack::PopAndDestroy( &descStream );
+	CleanupStack::PopAndDestroy( &placeStream );
+	CleanupStack::PopAndDestroy( &subjectStream );
+	    
+	stmt.Close();
+
+	EVTUIDEBUG( "- CEvtDatabase::UpdateEventTableL()" );
+    }
+    
+// ---------------------------------------------------------------------------
+// CEvtDatabase::DeleteEventL
+// ---------------------------------------------------------------------------
+//
+void CEvtDatabase::DeleteEventL( 
+                            	TEvtEventId          aEventId )
+    {
+	EVTUIDEBUG( "+ CEvtDatabase::DeleteEventL()" );
+    
+	RSqlStatement stmt;
+	TInt paramIndex;
+	
+	// Prepare the SQL statement to Remove Action based on Id
+	stmt.Prepare( iDb, KDeleteEvent );
+	
+	// Set the Id parameter in SQL statement
+	paramIndex = stmt.ParameterIndex( KEventId );
+	stmt.BindInt( paramIndex, aEventId );
+	
+	// Execute the Remove SQL statement
+	User::LeaveIfError( stmt.Exec() );
+	
+	stmt.Reset();
+	stmt.Close();
+
+	EVTUIDEBUG( "- CEvtDatabase::DeleteEventL()" );
+    }
+    
+// ---------------------------------------------------------------------------
+// CEvtDatabase::CheckIfEventPresentL
+// ---------------------------------------------------------------------------
+//
+TBool CEvtDatabase::CheckIfEventPresentL( 
+                            TEvtEventId          aId )
+    {
+	EVTUIDEBUG( "+ CEvtDatabase::DeleteEventL()" );
+
+	RSqlStatement stmt;
+	
+	// Prepare the SQL statement to Get Action based on EvtId
+	stmt.Prepare( iDb, KSelectEvent );
+	
+	// Set the Id parameter in SQL statement
+	TInt paramIndex=stmt.ParameterIndex( KEventId );
+	stmt.BindInt( paramIndex, aId ); 
+
+    // Flag to Check if the the Action is present
+    TBool flag( EFalse );
+
+	// Set the other attributes of the Requested Event
+	while( !flag && stmt.Next() == KSqlAtRow )
+		{
+		flag = ETrue;
+		}
+    
+    stmt.Close();
+	EVTUIDEBUG( "- CEvtDatabase::DeleteEventL()" );
+	
+    return flag;
+    }
+    
+// ---------------------------------------------------------------------------
+// CEvtDatabase::CheckIfActionPresentL
+// ---------------------------------------------------------------------------
+//
+TBool CEvtDatabase::CheckIfActionPresentL( 
+                            TInt64          aId )
+    {
+	EVTUIDEBUG( "+ CEvtDatabase::CheckIfActionPresentL()" );
+
+	RSqlStatement stmt;
+	
+	// Prepare the SQL statement to Get Action based on EvtId
+	stmt.Prepare( iDb, KSelectAction );
+	
+	// Set the Id parameter in SQL statement
+	TInt paramIndex=stmt.ParameterIndex( KId );
+	stmt.BindInt64( paramIndex, aId ); 
+
+    // Flag to Check if the the Action is present
+    TBool flag( EFalse );
+
+	// Set the other attributes of the Requested Event
+	while( !flag && stmt.Next() == KSqlAtRow )
+		{
+		flag = ETrue;
+		}
+    
+    stmt.Close();
+	EVTUIDEBUG( "- CEvtDatabase::CheckIfActionPresentL()" );
+	
+    return flag;
+    }
+    
+// ---------------------------------------------------------------------------
+// CEvtDatabase::GetActionId
+// ---------------------------------------------------------------------------
+//
+TInt64 CEvtDatabase::GetActionId( 
+                            TEvtEventId          aId )
+    {
+	EVTUIDEBUG( "+ CEvtDatabase::GetActionId()" );
+    TInt64 id=0;
+	TInt columnIndexActionId=0;
+    
+	RSqlStatement stmt;
+	
+	// Prepare the SQL statement to Get Action based on EvtId
+	stmt.Prepare( iDb, KSelectActionFromEvent );
+	
+	// Set the Id parameter in SQL statement
+	TInt paramIndex=stmt.ParameterIndex( KEvtId );
+	stmt.BindInt( paramIndex, aId ); 
+
+    // Flag to Check if the the Action is present
+    TBool flag( EFalse );
+
+	// Set the other attributes of the Requested Event
+	while( !flag && stmt.Next() == KSqlAtRow )
+		{
+		id = stmt.ColumnInt64( columnIndexActionId );
+		flag = ETrue;
+		}
+    
+    stmt.Close();
+	EVTUIDEBUG( "- CEvtDatabase::GetActionId()" );
+	
+    return id;
+    }
+    
+// ---------------------------------------------------------------------------
+// CEvtDatabase::CreateActionL
+// ---------------------------------------------------------------------------
+//
+void CEvtDatabase::CreateActionL( 
+								CEvtAction&          aEvtAction )
+    {
+	EVTUIDEBUG( "+ CEvtDatabase::CreateActionL()" );
+    
+    RSqlStatement stmt;
+	
+	// Update Action table.
+	RSqlParamWriteStream actionStream;
+	CleanupClosePushL( actionStream );
+	
+	// Prepare the SQL statement to update Action based on Id
+	stmt.Prepare( iDb, KInsertAction );
+	
+	// Set the Action parameter in SQL statement
+	TInt paramIndex=stmt.ParameterIndex( KAction );
+	if( KNullDesC() == aEvtAction.Action() )
+		{
+	    stmt.BindNull( paramIndex );
+		}
+	else
+		{
+		actionStream.BindText( stmt, paramIndex );
+		actionStream.WriteL( aEvtAction.Action() );
+		actionStream.CommitL();
+		}
+	
+	// Set the EvtId parameter in SQL statement
+	paramIndex=stmt.ParameterIndex( KEvtId );
+	stmt.BindInt( paramIndex, aEvtAction.EvtId() );
+	
+	// Actual Query execution that updates the database.
+	User::LeaveIfError( stmt.Exec() );
+	
+	//Close the stream
+	CleanupStack::PopAndDestroy( &actionStream );
+	stmt.Close();
+	
+	//Set the new Action Id
+	aEvtAction.SetId( GetActionId( aEvtAction.EvtId() ) );
+	
+	EVTUIDEBUG( "- CEvtDatabase::CreateActionL()" );
+
+    }
+    
+// ---------------------------------------------------------------------------
+// CEvtDatabase::UpdateActionL
+// ---------------------------------------------------------------------------
+//
+void CEvtDatabase::UpdateActionL( 
+                            	CEvtAction&          aEvtAction )
+    {
+	EVTUIDEBUG( "+ CEvtDatabase::UpdateActionL()" );
+    
+    RSqlStatement stmt;
+	
+	// Update Action table.
+	RSqlParamWriteStream actionStream;
+	CleanupClosePushL( actionStream );
+	
+	// Prepare the SQL statement to update Action based on Id
+	stmt.Prepare( iDb, KUpdateAction );
+	
+	// Set the Action parameter in SQL statement
+	TInt paramIndex=stmt.ParameterIndex( KAction );
+	if( KNullDesC() == aEvtAction.Action() )
+		{
+	    stmt.BindNull( paramIndex );
+		}
+	else
+		{
+		actionStream.BindText( stmt, paramIndex );
+		actionStream.WriteL( aEvtAction.Action() );
+		actionStream.CommitL();
+		}
+	
+	// Set the EvtId parameter in SQL statement
+	paramIndex=stmt.ParameterIndex( KEvtId );
+	stmt.BindInt( paramIndex, aEvtAction.EvtId() );
+	
+	// Set the Id parameter in SQL statement
+	paramIndex=stmt.ParameterIndex( KId );
+	stmt.BindInt64( paramIndex, aEvtAction.Id() );
+	
+	// Actual Query execution that updates the database.
+	User::LeaveIfError( stmt.Exec() );
+	
+	//Close the stream
+	CleanupStack::PopAndDestroy( &actionStream );
+	stmt.Close();
+
+	EVTUIDEBUG( "- CEvtDatabase::UpdateActionL()" );
+    }
+    
+// ---------------------------------------------------------------------------
+// CEvtDatabase::DeleteActionL
+// ---------------------------------------------------------------------------
+//
+void CEvtDatabase::DeleteActionL( 
+                            	TEvtEventId          aEventId )
+    {
+	EVTUIDEBUG( "+ CEvtDatabase::DeleteActionL()" );
+    
+	RSqlStatement stmt;
+	TInt paramIndex;
+	
+	// Prepare the SQL statement to Remove Action based on Id
+	stmt.Prepare( iDb, KDeleteAction );
+	
+	// Set the Id parameter in SQL statement
+	paramIndex = stmt.ParameterIndex( KEvtId );
+	stmt.BindInt( paramIndex, aEventId );
+	
+	// Execute the Remove SQL statement
+	User::LeaveIfError( stmt.Exec() );
+	
+	stmt.Close();
+
+	EVTUIDEBUG( "- CEvtDatabase::DeleteActionL()" );
+    }
+    
+// ---------------------------------------------------------------------------
+// CEvtDatabase::SetObserver
+// ---------------------------------------------------------------------------
+//
+void CEvtDatabase::SetObserver( MEvtStorageDbObserver*      
+														aStorageDbObserver )
+    {
+	EVTUIDEBUG( "+ CEvtDatabase::SetObserver()" );
+    // Set the Observer to the database
+	iStorageDbObserver = aStorageDbObserver;
+	EVTUIDEBUG( "- CEvtDatabase::SetObserver()" );
+    } 
+
+// ---------------------------------------------------------------------------
+// CEvtDatabase::HandleDbChangedL
+// ---------------------------------------------------------------------------
+//
+void CEvtDatabase::HandleDbChangedL( )
+    {
+	EVTUIDEBUG( "+ CEvtDatabase::HandleDbChangedL()" );
+    
+    // If there is an observer to the database, notify it.
+	if( iStorageDbObserver )
+		{
+		iStorageDbObserver->HandleStorageDbChangedL( );
+		}
+	EVTUIDEBUG( "- CEvtDatabase::HandleDbChangedL()" );
+    } 
+    
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventsengine/src/evtdbnotifier.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,181 @@
+/*
+* 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:  Notifier class for any change in Storage API dtabase.
+*
+*/
+
+
+// System Includes
+#include <centralrepository.h>
+
+// User Includes
+#include "evtdbnotifier.h"
+#include "evtdebug.h"
+
+// ================ Member funtions for CEvtDatabase class ==================
+
+// ---------------------------------------------------------------------------
+// CEvtDbNotifier::CEvtDbNotifier
+// ---------------------------------------------------------------------------
+//
+CEvtDbNotifier::CEvtDbNotifier( MEvtDbObserver&    aObserver )
+						:CActive( EPriorityStandard ),
+						iDbObserver( aObserver )
+    {
+    }
+    
+// ---------------------------------------------------------------------------
+// CEvtDbNotifier::~CEvtDbNotifier
+// ---------------------------------------------------------------------------
+//
+CEvtDbNotifier::~CEvtDbNotifier()
+    {
+	Cancel();
+    delete iRepository; 
+    } 
+    
+// ---------------------------------------------------------------------------
+// CEvtDbNotifier::NewL
+// ---------------------------------------------------------------------------
+//
+CEvtDbNotifier* CEvtDbNotifier::NewL( MEvtDbObserver&    aObserver )
+    {
+	CEvtDbNotifier* self = NewLC( aObserver );
+	CleanupStack::Pop( self );
+	return self;
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtDbNotifier::NewLC
+// ---------------------------------------------------------------------------
+//
+CEvtDbNotifier* CEvtDbNotifier::NewLC( MEvtDbObserver&    aObserver )
+    {
+	CEvtDbNotifier* self = new ( ELeave )CEvtDbNotifier( aObserver );
+	CleanupStack::PushL( self );
+	self->ConstructL( );
+	return self;
+    } 
+
+// ---------------------------------------------------------------------------
+// CEvtDbNotifier::ConstructL
+// ---------------------------------------------------------------------------
+//
+void CEvtDbNotifier::ConstructL()
+    {
+	EVTUIDEBUG( "+ CEvtDbNotifier::ConstructL()" );
+    CActiveScheduler::Add(this);
+    
+	EVTUIDEBUG( "Calling CRepository::NewL" );
+    // Create the Central repository object notifying the Db change
+    TRAPD(err, iRepository = CRepository::NewL( TUid::Uid( KCRUidEvtStorageDb ) ) );
+	EVTUIDEBUG1( "Calling CRepository::NewL Cenrep Error Code- %d", err );
+	User::LeaveIfError( err );
+    // Request for notification
+    StartNotification();
+    
+	EVTUIDEBUG( "- CEvtDbNotifier::ConstructL()" );
+    } 
+
+// ---------------------------------------------------------------------------
+// void CEvtDbNotifier::RunL()
+// ---------------------------------------------------------------------------
+//                             
+void CEvtDbNotifier::RunL()
+    {
+	EVTUIDEBUG( "+ CEvtDbNotifier::RunL()" );
+    // resubscribe before processing new value to prevent missing updates
+	StartNotification();
+	
+	// processing new value
+	HandleDbChangedL();
+	
+	EVTUIDEBUG( "- CEvtDbNotifier::RunL()" );
+    }
+    
+// ---------------------------------------------------------------------------
+// void CEvtDbNotifier::DoCancel()
+// ---------------------------------------------------------------------------
+// 
+void CEvtDbNotifier::DoCancel()
+    {
+	EVTUIDEBUG( "+ CEvtDbNotifier::DoCancel()" );
+    // Cancel the outstanding CR notification request
+    if( iRepository )
+        {
+        iRepository->NotifyCancel( KEvtDbChangeType );        
+        }
+	EVTUIDEBUG( "- CEvtDbNotifier::DoCancel()" );
+    }
+
+// ---------------------------------------------------------------------------
+// TInt CEvtDbNotifier::RunError()
+// ---------------------------------------------------------------------------
+//    
+TInt CEvtDbNotifier::RunError( TInt aError )
+	{    	
+	return CActive::RunError( aError );	
+	} 
+
+// ---------------------------------------------------------------------------
+// void CEvtDbNotifier::StartNotification()
+// ---------------------------------------------------------------------------
+//  
+void CEvtDbNotifier::StartNotification()
+    {
+	EVTUIDEBUG( "+ CEvtDbNotifier::StartNotification()" );
+    if( !IsActive() )
+        {
+        iStatus = KRequestPending;
+        // Request for notification
+    	iRepository->NotifyRequest( KEvtDbChangeType, iStatus );
+        SetActive();          
+        }  
+	EVTUIDEBUG( "- CEvtDbNotifier::StartNotification()" );
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtDbNotifier::HandleDbChangedL
+// ---------------------------------------------------------------------------
+//
+void CEvtDbNotifier::HandleDbChangedL( )
+    {    
+	EVTUIDEBUG( "+ CEvtDbNotifier::HandleDbChangedL()" );
+    // Notify the Observer for the database change type
+    iDbObserver.HandleDbChangedL( );
+	EVTUIDEBUG( "- CEvtDbNotifier::HandleDbChangedL()" );
+    }
+    
+// ---------------------------------------------------------------------------
+// CEvtDbNotifier::DbChangedL
+// ---------------------------------------------------------------------------
+//
+void CEvtDbNotifier::DbChangedL( )
+    {
+	EVTUIDEBUG( "+ CEvtDbNotifier::DbChangedL()" );
+    // Get the type of database change from Cenrep key
+    TInt flag = 0;
+    User::LeaveIfError( iRepository->Get( KEvtDbChangeType, flag ) );  
+    
+    EVTUIDEBUG1( "In DbChangedL Get %d", flag );
+    flag = ( flag == 0 ) ? 1 : 0;
+    EVTUIDEBUG1( "In DbChangedL Set %d", flag );
+    
+    // Set the KEvtDbChangeType key of the Cenrep, So that other database
+    // connection can get the notifications
+    User::LeaveIfError( iRepository->Set( KEvtDbChangeType, flag ) );
+	EVTUIDEBUG( "- CEvtDbNotifier::DbChangedL()" );
+    }
+    
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventsengine/src/evtevent.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,288 @@
+/*
+* 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:  Concrete Class for Location Events.
+*
+*/
+
+
+// System Includes
+
+// User Includes
+#include "evtevent.h"
+#include "evtaction.h"
+
+// ================ Member funtions for CEvtEvent class ======================
+
+// ---------------------------------------------------------------------------
+// CEvtEvent::CEvtEvent
+// ---------------------------------------------------------------------------
+//
+CEvtEvent::CEvtEvent():
+	iEventId( 0 ),
+	iEventStatus( EDraft ),
+	iRadius( 0.1 ),
+	iRepeat( EFalse )
+    {    
+    }
+    
+// ---------------------------------------------------------------------------
+// CEvtEvent::~CEvtEvent
+// ---------------------------------------------------------------------------
+//
+CEvtEvent::~CEvtEvent()
+    {
+    delete iSubject;
+    delete iPlace;
+    delete iDescription;
+    if( iAction )
+    	delete iAction;
+    delete iLocation;
+    } 
+    
+// ---------------------------------------------------------------------------
+// CEvtEvent::NewL
+// ---------------------------------------------------------------------------
+//
+EXPORT_C CEvtEvent* CEvtEvent::NewL()
+    {
+	CEvtEvent* self = NewLC( );
+	CleanupStack::Pop( self );
+	return self;
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtEvent::NewLC
+// ---------------------------------------------------------------------------
+//
+EXPORT_C CEvtEvent* CEvtEvent::NewLC()
+    {
+	CEvtEvent* self = new ( ELeave )CEvtEvent( );
+	CleanupStack::PushL( self );
+	self->ConstructL( );
+	return self;
+    } 
+
+// ---------------------------------------------------------------------------
+// CEvtEvent::ConstructL
+// ---------------------------------------------------------------------------
+//
+EXPORT_C void CEvtEvent::ConstructL()
+    {
+    // Allocate the Null string by default
+    iSubject = KNullDesC().AllocL();
+    iPlace = KNullDesC().AllocL();
+    iDescription = KNullDesC().AllocL();
+    iLocation = new TPosition();
+    }
+    
+// ---------------------------------------------------------------------------
+// CEvtEvent::EventId
+// ---------------------------------------------------------------------------
+//
+EXPORT_C TEvtEventId CEvtEvent::EventId() const
+    {
+    return iEventId;
+    } 
+    
+// ---------------------------------------------------------------------------
+// CEvtEvent::SetEventId
+// ---------------------------------------------------------------------------
+//
+EXPORT_C void CEvtEvent::SetEventId( const TEvtEventId aId )
+    {
+    iEventId = aId;
+    } 
+    
+// ---------------------------------------------------------------------------
+// CEvtEvent::Subject
+// ---------------------------------------------------------------------------
+//
+EXPORT_C TPtrC CEvtEvent::Subject() const
+    {
+    return iSubject->Des();
+    } 
+    
+// ---------------------------------------------------------------------------
+// CEvtEvent::SetSubjectL
+// ---------------------------------------------------------------------------
+//
+EXPORT_C void CEvtEvent::SetSubjectL( const TDesC& aSubject )
+    {
+    delete iSubject;
+    iSubject = NULL;
+    iSubject = aSubject.AllocL();
+    } 
+    
+// ---------------------------------------------------------------------------
+// CEvtEvent::Place
+// ---------------------------------------------------------------------------
+//
+EXPORT_C TPtrC CEvtEvent::Place() const
+    {
+    return *iPlace;
+    } 
+    
+// ---------------------------------------------------------------------------
+// CEvtEvent::SetPlaceL
+// ---------------------------------------------------------------------------
+//
+EXPORT_C void CEvtEvent::SetPlaceL( const TDesC& aPlace )
+    {
+    delete iPlace;
+    iPlace = NULL;
+    iPlace = aPlace.AllocL();
+    } 
+  
+// ---------------------------------------------------------------------------
+// CEvtEvent::EventStatus
+// ---------------------------------------------------------------------------
+//
+EXPORT_C TEvtEventStatus CEvtEvent::EventStatus() const
+    {
+    return iEventStatus;
+    } 
+    
+// ---------------------------------------------------------------------------
+// CEvtEvent::SetEventStatus
+// ---------------------------------------------------------------------------
+//
+EXPORT_C void CEvtEvent::SetEventStatus( 
+                            const TEvtEventStatus aEventStatus )
+    {
+    iEventStatus = aEventStatus;
+    } 
+    
+// ---------------------------------------------------------------------------
+// CEvtEvent::Radius
+// ---------------------------------------------------------------------------
+//
+EXPORT_C TReal CEvtEvent::Radius() const
+    {
+    return iRadius;
+    }
+    
+// ---------------------------------------------------------------------------
+// CEvtEvent::SetRadius
+// radius will always be in km.
+// ---------------------------------------------------------------------------
+//
+EXPORT_C void CEvtEvent::SetRadius( const TReal aRadius )
+    {
+    iRadius = aRadius;
+    } 
+    
+// ---------------------------------------------------------------------------
+// CEvtEvent::Repeat
+// ---------------------------------------------------------------------------
+//
+EXPORT_C TBool CEvtEvent::Repeat() const
+    {
+    return iRepeat;
+    } 
+    
+// ---------------------------------------------------------------------------
+// CEvtEvent::SetRepeat
+// ---------------------------------------------------------------------------
+//
+EXPORT_C void CEvtEvent::SetRepeat( const TBool aRepeat )
+    {
+    iRepeat = aRepeat;
+    } 
+    
+// ---------------------------------------------------------------------------
+// CEvtEvent::Description
+// ---------------------------------------------------------------------------
+//
+EXPORT_C TPtrC CEvtEvent::Description() const
+    {
+    return iDescription->Des();
+    } 
+    
+// ---------------------------------------------------------------------------
+// CEvtEvent::SetDescriptionL
+// ---------------------------------------------------------------------------
+//
+EXPORT_C void CEvtEvent::SetDescriptionL( const TDesC& aDescription )
+    {
+    delete iDescription;
+    iDescription = NULL;
+    iDescription = aDescription.AllocL();
+    } 
+    
+// ---------------------------------------------------------------------------
+// CEvtEvent::Action
+// ---------------------------------------------------------------------------
+//
+EXPORT_C CEvtAction& CEvtEvent::Action() const
+    {
+    return *iAction;
+    } 
+    
+// ---------------------------------------------------------------------------
+// CEvtEvent::SetActionL
+// ---------------------------------------------------------------------------
+//
+EXPORT_C void CEvtEvent::SetActionL( CEvtAction* aAction )
+    {
+	// Clear Action , if the aAction is NULL
+    if( !aAction  ) 
+        {
+        if( iAction )
+            {
+            delete iAction;
+            iAction = NULL;
+            }
+        return;
+        }
+		
+	// Set the Action Id and String if aAction is present.	
+    TInt64 id = aAction->Id();
+    if(iAction)
+        {
+        id = iAction->Id();
+        delete iAction;
+    	iAction = NULL;
+        }
+    iAction = aAction;
+    iAction->SetId( id );
+    iAction->SetEvtId(EventId());
+    } 
+    
+// ---------------------------------------------------------------------------
+// CEvtEvent::HasAction
+// ---------------------------------------------------------------------------
+//
+EXPORT_C TBool CEvtEvent::HasAction( )
+	{
+	return (iAction)?ETrue:EFalse;
+	}
+
+// ---------------------------------------------------------------------------
+// CEvtEvent::Location
+// ---------------------------------------------------------------------------
+//
+EXPORT_C TPosition& CEvtEvent::Location() const
+    {
+    return *iLocation;
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtEvent::HasAction
+// ---------------------------------------------------------------------------
+//
+void CEvtEvent::SetLocationL(TPosition& aLocation)
+    {
+    *iLocation = aLocation;
+    }
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventsengine/src/evteventmanager.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,204 @@
+/*
+* 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:  Interface to store and access the Location Events.
+*
+*/
+
+
+// System Includes
+
+// User Includes
+#include "evteventmanager.h"
+#include "evtdatabase.h"
+#include "evtdebug.h"
+
+// ================ Member funtions for CEvtEventManager class ===============
+
+// ---------------------------------------------------------------------------
+// CEvtEventManager::CEvtEventManager
+// ---------------------------------------------------------------------------
+//
+CEvtEventManager::CEvtEventManager()
+    {
+    }
+    
+// ---------------------------------------------------------------------------
+// CEvtEventManager::~CEvtEventManager
+// ---------------------------------------------------------------------------
+//
+EXPORT_C CEvtEventManager::~CEvtEventManager()
+    {
+    delete iEvtDb;
+    } 
+    
+// ---------------------------------------------------------------------------
+// CEvtEventManager::NewL
+// ---------------------------------------------------------------------------
+//
+EXPORT_C CEvtEventManager* CEvtEventManager::NewL()
+    {
+	CEvtEventManager* self = NewLC( );
+	CleanupStack::Pop( self );
+	return self;
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtEventManager::NewLC
+// ---------------------------------------------------------------------------
+//
+EXPORT_C CEvtEventManager* CEvtEventManager::NewLC()
+    {
+	CEvtEventManager* self = new ( ELeave )CEvtEventManager( );
+	CleanupStack::PushL( self );
+	self->ConstructL( );
+	return self;
+    } 
+
+// ---------------------------------------------------------------------------
+// CEvtEventManager::ConstructL
+// ---------------------------------------------------------------------------
+//
+void CEvtEventManager::ConstructL()
+    {
+    iEvtDb = CEvtDatabase::NewL( );
+    } 
+
+// ---------------------------------------------------------------------------
+// CEvtEventManager::GetEventsL
+// ---------------------------------------------------------------------------
+//
+EXPORT_C void CEvtEventManager::GetEventsL( 
+                            TEvtEventStatus    aEvtStatus,
+                            RPointerArray<CEvtBasicEventInfo>&     aEvtEventArray )
+    {
+	EVTUIDEBUG( "+ CEvtEventManager::GetEventsL()" );
+    // redirect the call to CEvtDatabase
+	iEvtDb->GetEventsL( aEvtStatus, aEvtEventArray );
+	EVTUIDEBUG( "- CEvtEventManager::GetEventsL()" );
+    } 
+
+// ---------------------------------------------------------------------------
+// CEvtEventManager::GetEventsL
+// ---------------------------------------------------------------------------
+//
+EXPORT_C void CEvtEventManager::GetEventsL( 
+                            RPointerArray<CEvtBasicEventInfo>&     aEvtEventArray )
+    {
+	EVTUIDEBUG( "+ CEvtEventManager::GetEventsL()" );
+    // redirect the call to CEvtDatabase
+	iEvtDb->GetEventsL( aEvtEventArray );
+	EVTUIDEBUG( "- CEvtEventManager::GetEventsL()" );
+    } 
+    
+// ---------------------------------------------------------------------------
+// CEvtEventManager::GetEventL
+// ---------------------------------------------------------------------------
+//
+EXPORT_C CEvtEvent* CEvtEventManager::GetEventL( TEvtEventId    aEvtId )
+    {
+	EVTUIDEBUG( "+ CEvtEventManager::GetEventL()" );
+    // redirect the call to CEvtDatabase
+	return iEvtDb->GetEventL( aEvtId );
+    } 
+    
+// ---------------------------------------------------------------------------
+// CEvtEventManager::RemoveEventsL
+// ---------------------------------------------------------------------------
+//
+EXPORT_C void CEvtEventManager::RemoveEventsL( 
+                            const RArray<TEvtEventId>&     aEvtIdArray )
+    {
+	EVTUIDEBUG( "+ CEvtEventManager::RemoveEventsL()" );
+    // redirect the call to CEvtDatabase
+	iEvtDb->RemoveEventsL( aEvtIdArray );
+	EVTUIDEBUG( "- CEvtEventManager::RemoveEventsL()" );
+    } 
+
+// ---------------------------------------------------------------------------
+// CEvtEventManager::UpdateEventsStatusL
+// ---------------------------------------------------------------------------
+//
+EXPORT_C void CEvtEventManager::UpdateEventsStatusL( 
+                            const RArray<TEvtEventId>&     aEvtIdArray,
+                            TEvtEventStatus    aEvtStatus)
+    {
+    // redirect the call to CEvtDatabase
+    iEvtDb->UpdateEventsStatusL( aEvtIdArray, aEvtStatus );
+    } 
+    
+// ---------------------------------------------------------------------------
+// CEvtEventManager::UpdateEventL
+// ---------------------------------------------------------------------------
+//
+EXPORT_C void CEvtEventManager::UpdateEventL( 
+                            CEvtEvent&          aEvtEvent )
+    {
+	EVTUIDEBUG( "+ CEvtEventManager::UpdateEventL()" );
+    // redirect the call to CEvtDatabase
+	iEvtDb->UpdateEventL( aEvtEvent );
+	EVTUIDEBUG( "- CEvtEventManager::UpdateEventL()" );
+    } 
+    
+// ---------------------------------------------------------------------------
+// CEvtEventManager::AddEventL
+// ---------------------------------------------------------------------------
+//
+EXPORT_C void CEvtEventManager::AddEventL( CEvtEvent&     aEvtEvent )
+    {
+	EVTUIDEBUG( "+ CEvtEventManager::AddEventL()" );
+    // redirect the call to CEvtDatabase
+	iEvtDb->AddEventL( aEvtEvent );
+	EVTUIDEBUG( "- CEvtEventManager::AddEventL()" );
+    } 
+ 
+// ---------------------------------------------------------------------------
+// CEvtEventManager::UpdateEventStatus
+// ---------------------------------------------------------------------------
+//
+EXPORT_C void CEvtEventManager::UpdateEventStatusL( 
+                            TEvtEventId      aEvtId,
+                            TEvtEventStatus    aEvtStatus)
+    {
+	EVTUIDEBUG( "+ CEvtEventManager::UpdateEventStatusL()" );
+    // redirect the call to CEvtDatabase
+	iEvtDb->UpdateEventStatusL( aEvtId, aEvtStatus );
+	EVTUIDEBUG( "- CEvtEventManager::UpdateEventStatusL()" );
+    } 
+    
+// ---------------------------------------------------------------------------
+// CEvtEventManager::RemoveEvent
+// ---------------------------------------------------------------------------
+//
+EXPORT_C void CEvtEventManager::RemoveEventL( TEvtEventId      aEvtId )
+    {
+	EVTUIDEBUG( "+ CEvtEventManager::RemoveEventL()" );
+    // redirect the call to CEvtDatabase
+	iEvtDb->RemoveEventL( aEvtId );
+	EVTUIDEBUG( "- CEvtEventManager::RemoveEventL()" );
+    } 
+    
+// ---------------------------------------------------------------------------
+// CEvtEventManager::SetObserver
+// ---------------------------------------------------------------------------
+//
+EXPORT_C void CEvtEventManager::SetObserver( MEvtStorageDbObserver*      
+																aDbObserver )
+    {
+	EVTUIDEBUG( "+ CEvtEventManager::SetObserver()" );
+    // redirect the call to CEvtDatabase
+	iEvtDb->SetObserver( aDbObserver );
+	EVTUIDEBUG( "- CEvtEventManager::SetObserver()" );
+    } 
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventsengine/src/evtmgmtuiengine.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,695 @@
+/*
+* 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:  Engine class for Events Management UI.
+*
+*/
+
+#include <lbt.h> 
+
+#include "evtevent.h"
+#include "evtmgmtuilbtadapter.h"
+#include "evteventmanager.h"
+#include "evtmgmtuiengine.h"
+#include "evtdebug.h"
+#include "evttoneaction.h"
+
+// Constants
+static const TInt KHighAccValue = 500;
+static const TInt KMidAccValue = 1500;
+
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiModel::ConstructL()
+// ---------------------------------------------------------------------------
+//
+void CEvtMgmtUiEngine::ConstructL()
+    {
+    EVTUIDEBUG("+ CEvtMgmtUiEngine::ConstructL()" );
+    
+    iEventManager = CEvtEventManager::NewL();
+    iEventManager->SetObserver(this);
+           
+    EVTUIDEBUG("Create lbtadapter object" );      
+    iLbtAdapter = CEvtMgmtUiLbtAdapter::NewL(*this);
+    
+    EVTUIDEBUG("- CEvtMgmtUiEngine::ConstructL()" );
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiEngine::NewL()
+// ---------------------------------------------------------------------------
+//
+EXPORT_C CEvtMgmtUiEngine* CEvtMgmtUiEngine::NewL()
+    {
+    CEvtMgmtUiEngine* self = CEvtMgmtUiEngine::NewLC();
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiEngine::NewLC()
+// ---------------------------------------------------------------------------
+//
+EXPORT_C CEvtMgmtUiEngine* CEvtMgmtUiEngine::NewLC()
+    {
+    CEvtMgmtUiEngine* self = new( ELeave ) CEvtMgmtUiEngine();
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    return self;
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiEngine::CEvtMgmtUiEngine()
+// ---------------------------------------------------------------------------
+//
+CEvtMgmtUiEngine::CEvtMgmtUiEngine()
+    {       
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiEngine::~CEvtMgmtUiEngine()
+// ---------------------------------------------------------------------------
+//
+CEvtMgmtUiEngine::~CEvtMgmtUiEngine()
+    {        
+    // Reseting the Observer array
+    iObserverArray.Reset();
+    iObserverArray.Close();
+    
+    delete iEventManager;   
+    iEventManager = NULL;
+    
+    delete iLbtAdapter;
+    iLbtAdapter = NULL;
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiEngine::SetObserver()
+// ---------------------------------------------------------------------------
+//
+EXPORT_C void CEvtMgmtUiEngine::SetObserver(MEvtMgmtUiEngineObserver* aObserver)
+    {
+    // Append the observer to the observer array waiting for notifications
+    iObserverArray.Append( aObserver );
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiEngine::RemoveObserver()
+// ---------------------------------------------------------------------------
+//
+EXPORT_C void CEvtMgmtUiEngine::RemoveObserver(MEvtMgmtUiEngineObserver* aObserver)
+    {
+    // Remove the observer from receiving notifications
+    for( TInt i = 0; i < iObserverArray.Count(); i++ )
+        {
+        if ( iObserverArray[i] == aObserver )
+            {
+            iObserverArray.Remove( i );
+            break;   
+            }
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiEngine::EventL()
+// ---------------------------------------------------------------------------
+//
+EXPORT_C CEvtEvent* CEvtMgmtUiEngine::EventL( TEvtEventId aId )
+    {        
+    EVTUIDEBUG1("+ CEvtMgmtUiEngine::EventL() event id = %d", aId);
+    
+    CEvtEvent* evt = NULL;
+    if( aId!= 0 )
+	    {
+	    evt = iEventManager->GetEventL( aId ); 
+	    CleanupStack::PushL( evt );
+	    RetrieveLocationL( aId, evt->Location() );
+	    CleanupStack::Pop();
+	    }
+    else
+	    {
+	    evt = CEvtEvent::NewL();	
+	    }
+    
+    EVTUIDEBUG("- CEvtMgmtUiEngine::EventL()" );
+    return evt;
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiEngine::AddEventL()
+// ---------------------------------------------------------------------------
+//
+EXPORT_C void CEvtMgmtUiEngine::AddEventL( CEvtEvent& aEvtEvent )
+    {  
+    EVTUIDEBUG("+ CEvtMgmtUiEngine::AddEventL()" );
+   
+    CLbtTriggerEntry::TLbtTriggerState state;
+    if(aEvtEvent.EventStatus()==EActive)
+        {
+        state = CLbtTriggerEntry::EStateEnabled;
+        }
+    else
+        {
+        state = CLbtTriggerEntry::EStateDisabled;
+        }
+        
+    iEvent = &aEvtEvent;
+     
+    //create trigger
+    if(iEvent->Subject().Compare(KNullDesC) == 0)
+       iLbtAdapter->CreateTrigger(iEvent->Location(),TReal(iEvent->Radius()),_L("Un Named Location Event"), state );
+    else
+       iLbtAdapter->CreateTrigger(iEvent->Location(),TReal(iEvent->Radius()),iEvent->Subject(), state );
+
+    EVTUIDEBUG("- CEvtMgmtUiEngine::AddEventL()" );  
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiEngine::ModifyEventL()
+// ---------------------------------------------------------------------------
+//
+EXPORT_C void CEvtMgmtUiEngine::ModifyEventL( CEvtEvent& aEvtEvent, TEvtEventAttributeMask aEventAttributeMask )
+    {  
+    EVTUIDEBUG("+ CEvtMgmtUiEngine::ModifyEventL()" );
+  
+    //if loc and/or state information are changed
+    if( (aEventAttributeMask & EEvtEventAttributeStatus) == EEvtEventAttributeStatus ||
+       (aEventAttributeMask & EEvtEventAttributePlace) == EEvtEventAttributePlace ||
+       (aEventAttributeMask & EEvtEventAttributeRadius) == EEvtEventAttributeRadius )
+        {
+        CLbtTriggerEntry::TLbtTriggerState state;
+        if( aEvtEvent.EventStatus() == EActive )
+          {
+          state = CLbtTriggerEntry::EStateEnabled;
+          }
+        else
+          {
+          state = CLbtTriggerEntry::EStateDisabled;
+          }
+        
+        iEvent = &aEvtEvent;
+        
+        iLbtAdapter->UpdateTriggerL(aEvtEvent.EventId(), aEvtEvent.Location(), 
+                                aEvtEvent.Radius(), state );
+        } 
+    else
+        {
+        iEventManager->UpdateEventL(aEvtEvent);
+        
+        if ( iObserverArray.Count())
+            {
+            for( TInt i = 0; i < iObserverArray.Count(); i++ )
+                {
+                iObserverArray[i]->NotifyEventChangeL( KErrNone,CEvtMgmtUiLbtAdapter::ELbtAdapterUpdate );
+                }
+            }
+        }
+
+    EVTUIDEBUG("- CEvtMgmtUiEngine::ModifyEventL()" );  
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiEngine::DeleteEventL()
+// ---------------------------------------------------------------------------
+//
+EXPORT_C void CEvtMgmtUiEngine::DeleteEventL( TEvtEventId aEventId )
+    {   
+    EVTUIDEBUG1("+ CEvtMgmtUiEngine::DeleteEventL() event id =%d", aEventId );   
+    TInt err = KErrNone;
+    if( aEventId!=0 ) //if it is present in lbt database        
+        {      
+        iLbtAdapter->DeleteTriggerL( aEventId );
+        iEventManager->RemoveEventL( aEventId );
+        }
+        
+    if ( iObserverArray.Count())
+        {
+        for( TInt i = 0; i < iObserverArray.Count(); i++ )
+            {
+            iObserverArray[i]->NotifyEventChangeL( err,CEvtMgmtUiLbtAdapter::ELbtAdapterDelete );
+            }
+        }
+    EVTUIDEBUG("- CEvtMgmtUiEngine::DeleteEventL()" );  
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiEngine::DeleteEventsL()
+// ---------------------------------------------------------------------------
+//
+EXPORT_C void CEvtMgmtUiEngine::DeleteEventsL( const RArray<TEvtEventId>* aEvtIdArray )
+    {    
+    iEvtIdArray = aEvtIdArray;
+    iLbtAdapter->DeleteTriggersL( *aEvtIdArray );  
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiEngine::SetEventStateL()
+// ---------------------------------------------------------------------------
+//
+EXPORT_C void CEvtMgmtUiEngine::SetEventStateL( TEvtEventStatus aEvtStatus, TEvtEventId aEventId)
+    {
+    EVTUIDEBUG("+ CEvtMgmtUiEngine::SetEventStateL()" );  
+    TInt err = KErrNone;
+    if( aEventId != 0 )
+    	{ 
+	    switch(aEvtStatus)
+	        {
+	        case EActive:
+	            {            
+	            iLbtAdapter->SetTriggerStateL( aEventId, CLbtTriggerEntry::EStateEnabled);
+                iEventManager->UpdateEventStatusL( aEventId, aEvtStatus );
+	            break;
+	            }
+	        case EDraft:
+	            { 
+	            iLbtAdapter->SetTriggerStateL( aEventId, CLbtTriggerEntry::EStateDisabled );
+                iEventManager->UpdateEventStatusL( aEventId, aEvtStatus ); 
+	            break;
+	            }  
+	        case ECompleted:
+	            { 
+                iEventManager->UpdateEventStatusL( aEventId, aEvtStatus ); 
+	            iLbtAdapter->SetTriggerStateL( aEventId, CLbtTriggerEntry::EStateDisabled );
+	            break;
+	            }  
+	        default:
+	        	break;                  
+	        } 
+        }   
+        
+    if ( iObserverArray.Count())
+        {
+        for( TInt i = 0; i < iObserverArray.Count(); i++ )
+            {
+            iObserverArray[i]->NotifyEventChangeL( err,CEvtMgmtUiLbtAdapter::ELbtAdapterSetTriggerState );
+            }
+        }
+	EVTUIDEBUG("- CEvtMgmtUiEngine::SetEventStateL()" ); 
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiEngine::SetEventsStateL()
+// ---------------------------------------------------------------------------
+//
+EXPORT_C void CEvtMgmtUiEngine::SetEventsStateL( TEvtEventStatus aEvtStatus, const RArray<TEvtEventId>* aEvtIdArray )
+    {
+    EVTUIDEBUG("+ CEvtMgmtUiEngine::SetEventsStateL()" );
+    iEvtIdArray = aEvtIdArray;
+    iEvtStatus = aEvtStatus;
+    switch(aEvtStatus)
+        {
+        case EActive:
+            {            
+            iLbtAdapter->SetTriggersStateL( *aEvtIdArray, CLbtTriggerEntry::EStateEnabled);
+            break;
+            }
+        case EDraft:
+        case ECompleted:
+            {  
+            iLbtAdapter->SetTriggersStateL( *aEvtIdArray, CLbtTriggerEntry::EStateDisabled);
+            break;
+            }  
+        default:
+            break;                  
+        }                
+    EVTUIDEBUG("- CEvtMgmtUiEngine::SetEventsStateL()" );
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiEngine::UpdateModelL()
+// ---------------------------------------------------------------------------
+//
+EXPORT_C void CEvtMgmtUiEngine::UpdateModelL( RPointerArray<CEvtBasicEventInfo>& aEventsArray,
+												TEvtEventStatusFilter  aEventStatusFilter )
+    {
+    EVTUIDEBUG("+ CEvtMgmtUiEngine::UpdateModelL()" );
+  
+    if( aEventsArray.Count() )
+         {
+         aEventsArray.ResetAndDestroy();         
+         } 
+         
+    if( aEventStatusFilter == EEvtFilterAll )
+        iEventManager->GetEventsL( aEventsArray );
+    else
+        iEventManager->GetEventsL( static_cast<TEvtEventStatus>(aEventStatusFilter), aEventsArray );
+    
+    EVTUIDEBUG("- CEvtMgmtUiEngine::UpdateModelL()" );  
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiEngine::SyncDbsL()
+// ---------------------------------------------------------------------------
+//
+EXPORT_C void CEvtMgmtUiEngine::SyncDbsL()
+    {
+    EVTUIDEBUG("+ CEvtMgmtUiEngine::SyncDbsL()" );
+	TInt err;
+    
+    // Handle the Enabled and Disabled Trigger list from LBT 
+    RArray<TLbtTriggerId> enabledtriggerList;
+    RArray<TLbtTriggerId> disabledtriggerList;
+    
+	TRAP(err, iLbtAdapter->GetTriggerListL(disabledtriggerList, CLbtTriggerEntry::EStateDisabled ) );
+	if(err != KErrNone)
+		{
+		EVTUIDEBUG1("CEvtMgmtUiEngine::SyncDbsL:Error while retrieving trigger ids = %d", err);
+		disabledtriggerList.Close();
+		enabledtriggerList.Close();
+		User::Leave( err );
+		}
+		
+	TRAP(err, iLbtAdapter->GetTriggerListL(enabledtriggerList, CLbtTriggerEntry::EStateEnabled ) );
+	if(err != KErrNone)
+		{
+		EVTUIDEBUG1("CEvtMgmtUiEngine::SyncDbsL:Error while retrieving trigger ids = %d", err);
+		disabledtriggerList.Close();
+		enabledtriggerList.Close();
+		User::Leave( err );
+		}
+				
+	// Get Events list from EvtStorage
+	RPointerArray<CEvtBasicEventInfo> eventsArray;
+	RArray<TEvtEventId> removeArray;
+	iEventManager->GetEventsL( eventsArray );
+	
+	// Compute
+	TInt count = eventsArray.Count();
+	TInt index=KErrNotFound;
+	for(TInt i=0; i<count; i++)
+	{
+    if( eventsArray[i]->EventStatus() == EActive )
+		{
+        if( KErrNotFound != (index = disabledtriggerList.Find(eventsArray[i]->EventId())) )
+            {
+			iEventManager->UpdateEventStatusL( eventsArray[i]->EventId(), EDraft );
+			disabledtriggerList.Remove(index);
+            }
+		else if( KErrNotFound == (index = enabledtriggerList.Find(eventsArray[i]->EventId())) )
+		    {
+			removeArray.Append(eventsArray[i]->EventId());
+		    }
+		else
+		    {
+		    enabledtriggerList.Remove(index);
+		    }
+		}
+	else
+		{
+        if( KErrNotFound != (index = enabledtriggerList.Find(eventsArray[i]->EventId())) )
+            {
+			iEventManager->UpdateEventStatusL( eventsArray[i]->EventId(), EActive );
+			enabledtriggerList.Remove(index);
+            }
+		else if( KErrNotFound == (index = disabledtriggerList.Find(eventsArray[i]->EventId())) )
+		    {
+			removeArray.Append(eventsArray[i]->EventId());
+		    }
+        else
+            {
+            disabledtriggerList.Remove(index);
+            }
+		}
+	}
+
+	// Update the Storage Db for removed triggers.
+	if( removeArray.Count() != 0 )
+		iEventManager->RemoveEventsL( removeArray );
+	
+	// Update the LBT Db for non existant triggers.
+	count = enabledtriggerList.Count();
+	for(TInt i=0; i<count; i++)
+	    disabledtriggerList.Append(enabledtriggerList[i]);
+	
+	// We Nullify iEvtIdArray to ensure that observers are not notified of this delete triggers
+	iEvtIdArray = NULL;
+	if( disabledtriggerList.Count() != 0 )
+    	iLbtAdapter->DeleteTriggersL( disabledtriggerList );  
+
+	removeArray.Close();
+	disabledtriggerList.Close();
+	enabledtriggerList.Close();
+	eventsArray.ResetAndDestroy();
+	eventsArray.Close();
+	EVTUIDEBUG("- CEvtMgmtUiEngine::SyncDbsL()" );
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiEngine::CalculateFiredAccuracyL()
+// ---------------------------------------------------------------------------
+//
+EXPORT_C TEvtFireAccuracy CEvtMgmtUiEngine::CalculateFiredAccuracyL( 
+											const TEvtEventId aEventId )
+	{
+	EVTUIDEBUG1("+ CEvtMgmtUiEngine::CalculateFiredAccuracyL() - %d", aEventId );
+	TEvtFireAccuracy accuracy = ELowAccuracy;
+	TReal32 distance(KMidAccValue+1);
+	iLbtAdapter->GetFiredTriggerAccuracyL(aEventId, distance);
+	
+	EVTUIDEBUG1("= CalculateFiredAccuracyL() distance = %d", distance );
+	
+	if( distance <= KHighAccValue )
+		accuracy = EHighAccuracy;
+	else if( distance <= KMidAccValue )
+		accuracy = EMidAccuracy;
+	else
+		accuracy = ELowAccuracy;
+	
+	EVTUIDEBUG("- CEvtMgmtUiEngine::CalculateFiredAccuracyL()" );
+	return accuracy;
+	}
+
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiEngine::HandleFiredTriggerStateL()
+// ---------------------------------------------------------------------------
+//
+EXPORT_C void CEvtMgmtUiEngine::HandleFiredTriggerStateL( 
+											const TEvtEventId aEventId )
+	{	
+	EVTUIDEBUG1("+ CEvtMgmtUiEngine::HandleFiredTriggerStateL() - %d", aEventId );    
+    CEvtEvent* evt = NULL;
+    if( aEventId!= 0 )
+	    {
+	    evt = iEventManager->GetEventL( aEventId ); 
+	    if( evt )
+		    {
+		    CleanupStack::PushL( evt );	
+			if( !evt->Repeat() )
+				{
+				SetEventStateL( ECompleted, aEventId );
+				}
+		    CleanupStack::PopAndDestroy( evt );
+		    }	
+	    }
+	EVTUIDEBUG("- CEvtMgmtUiEngine::HandleFiredTriggerStateL()" );
+	}
+
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiEngine::CancelRequest()
+// ---------------------------------------------------------------------------
+//
+EXPORT_C void CEvtMgmtUiEngine::CancelRequest()
+    {     
+    EVTUIDEBUG("+ CEvtMgmtUiEngine::CancelRequest()" );
+	if( iLbtAdapter->IsActive() )
+    	iLbtAdapter->CancelRequest();
+    EVTUIDEBUG("- CEvtMgmtUiEngine::CancelRequest()" );
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiEngine::HandleStorageDbChangedL()
+// ---------------------------------------------------------------------------
+//
+void CEvtMgmtUiEngine::HandleStorageDbChangedL()
+    {     
+    // Notify all observers
+    if ( iObserverArray.Count())
+        {
+        for( TInt i = 0; i < iObserverArray.Count(); i++ )
+            {
+            iObserverArray[i]->NotifyModelChangeL();
+            }
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiEngine::RetrieveLocationL()
+// ---------------------------------------------------------------------------
+//
+EXPORT_C void CEvtMgmtUiEngine::RetrieveLocationL( TEvtEventId aEventId, TCoordinate& aCoordinate )
+    {
+    EVTUIDEBUG("+ CEvtMgmtUiEngine::RetrieveLocationL()" );
+    iLbtAdapter->RetrieveLocationL( aEventId, aCoordinate);
+    EVTUIDEBUG("- CEvtMgmtUiEngine::RetrieveLocationL()" );
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiEngine::NotifyLbtChangeL()
+// ---------------------------------------------------------------------------
+//
+void CEvtMgmtUiEngine::NotifyLbtChangeL(TLbtTriggerId &  aTriggerId, TInt aState )
+    {   
+    EVTUIDEBUG("+ CEvtMgmtUiEngine::NotifyLbtChangeL()" );
+    
+    // Notify all observers
+    if ( iObserverArray.Count() )
+        {
+        for( TInt i = 0; i < iObserverArray.Count(); i++ )
+            {
+            iObserverArray[i]->NotifyEventChangeL( KErrNone,aState );
+            }
+        }
+    
+    //iState = aState;
+    switch(aState)
+        {
+        case CEvtMgmtUiLbtAdapter::ELbtAdapterCreate:       
+            {
+            EVTUIDEBUG1("Trigger is created TriggerId=%d", aTriggerId );
+            
+            // Update the the command Line argument (Temporarily commented)
+            iLbtAdapter->UpdateCmdLineArgL( aTriggerId, aTriggerId );
+            
+			// Add the new Event to the Local Db.
+			if( iEvent->EventId() == 0 )
+			   {
+			   iEvent->SetEventId( aTriggerId );
+			   
+			   EVTUIDEBUG("========== Event Details ============================" );
+			   TBuf<256>debug;
+			   debug.Copy( iEvent->Subject() );
+			   EVTUIDEBUG1("Subject: %S", &debug);
+			   debug.Copy( iEvent->Place() );
+			   EVTUIDEBUG1("Place: %S", &debug);
+			   EVTUIDEBUG1("Radius: %f", iEvent->Radius());
+			   EVTUIDEBUG1("Repeat: %d", iEvent->Repeat());
+			   
+			   CEvtToneAction* tone = CEvtToneAction::NewLC();
+				if( iEvent->HasAction() )
+					{              
+					tone->InternalizeL( iEvent->Action() );
+					debug.Copy( tone->FileName() );
+					EVTUIDEBUG1("Ringtone: %S", &debug);
+					EVTUIDEBUG1("Audio Loop: %d", tone->ToneLoop());    
+					}
+			    CleanupStack::PopAndDestroy(tone);
+			    
+			   EVTUIDEBUG("==========End Event Details ============================" );    
+			   iEventManager->AddEventL( *iEvent );       
+			   
+			   EVTUIDEBUG1( "Event is added to local database eventid = %d" , iEvent->EventId() );
+			   }
+            break;
+            }
+        case CEvtMgmtUiLbtAdapter::ELbtAdapterUpdate:       
+            {         
+            iEventManager->UpdateEventL(*iEvent);
+            break;
+            }    
+        case CEvtMgmtUiLbtAdapter::ELbtAdapterDeleteTriggers:
+            {           
+            if(iEvtIdArray && iEvtIdArray->Count())
+                {
+                iEventManager->RemoveEventsL( *iEvtIdArray );
+                iEvtIdArray = NULL;
+                }
+            else
+                {
+                return; // This condition is satisfied by DeleteTriggers in SyncDbL
+                }
+            break;
+            }
+        case CEvtMgmtUiLbtAdapter::ELbtAdapterSetTriggersState:
+            {
+            if(iEvtIdArray && iEvtIdArray->Count())
+                {
+                iEventManager->UpdateEventsStatusL( *iEvtIdArray, iEvtStatus );
+                iEvtIdArray = NULL;
+                }
+            }
+            break;
+        default:
+            {
+            //error
+            break;
+            }
+        }
+		
+    EVTUIDEBUG("- CEvtMgmtUiEngine::NotifyLbtChangeL()" );
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiEngine::NotifyLbtError()
+// ---------------------------------------------------------------------------
+//
+void CEvtMgmtUiEngine::NotifyLbtError(TInt aErrorCode, TInt aState )
+    {   
+    EVTUIDEBUG1("+ CEvtMgmtUiEngine::NotifyLbtErrorL() error =%d", aErrorCode);
+    // Notify all observers
+    if ( iObserverArray.Count())
+        {
+        for( TInt i = 0; i < iObserverArray.Count(); i++ )
+            {
+            TRAP_IGNORE( iObserverArray[i]->NotifyEventChangeL( aErrorCode, aState ));
+            }
+        }
+    
+    EVTUIDEBUG("- CEvtMgmtUiEngine::NotifyLbtErrorL()" );
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiEngine::NotifyTriggerChangeL()
+// ---------------------------------------------------------------------------
+//
+void CEvtMgmtUiEngine::NotifyTriggerChangeL( const TLbtTriggerId &  aTriggerId,
+    								TLbtTriggerChangeType aType )
+	{
+	EVTUIDEBUG("+ CEvtMgmtUiEngine::NotifyTriggerChangeL()" );
+	CLbtTriggerEntry::TLbtTriggerState state = CLbtTriggerEntry::EStateDisabled;
+	CEvtEvent* evt = NULL;
+	switch( aType )
+		{
+		case ETriggerMultipleModified:
+			SyncDbsL();
+			break;
+		case ETriggerModified:
+			state = iLbtAdapter->GetTriggerStateL( aTriggerId );
+			
+			evt = iEventManager->GetEventL( aTriggerId );
+			CleanupStack::PushL( evt );
+			if( evt->EventStatus() == EActive )
+				{
+				if( CLbtTriggerEntry::EStateDisabled == state )
+					{
+					iEventManager->UpdateEventStatusL( evt->EventId(), ECompleted );
+					}
+				}
+			else
+				{
+				if( CLbtTriggerEntry::EStateEnabled == state )
+					{
+					iEventManager->UpdateEventStatusL( evt->EventId(), EActive );
+					}
+				}
+			CleanupStack::PopAndDestroy( evt );
+			break;
+		case ETriggerDeleted:
+			iEventManager->RemoveEventL( aTriggerId );
+			break;
+		default:
+			break;
+		}
+	EVTUIDEBUG("- CEvtMgmtUiEngine::NotifyTriggerChangeL()" );
+	}
+//End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventsengine/src/evtmgmtuilbtadapter.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,737 @@
+/*
+* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  It is adapter class to handle lbt operations
+*
+*/
+
+#include <lbtgeocircle.h> 
+#include <lbttriggerconditionarea.h> 
+#include <lbttriggerfilterbyattribute.h> 
+#include <lbtlisttriggeroptions.h>
+#include <lbtstartuptrigger.h> 
+#include <lbsrequestor.h> 
+#include <lbttriggerinfo.h> 
+#include <lbttriggerchangeeventnotifier.h>
+#include <e32cmn.h>
+
+#include "evtmgmtuilbtadapter.h"
+#include "evtdebug.h"
+
+// CONSTANTS
+const TInt KUnitConversion = 1000;                        // Unit Converter
+_LIT( KTriggerHandlingProcessName, "evthandler.exe" );    // Handler Process Name
+_LIT_SECURE_ID( KTriggerHandlingProcessSID,  0x2001E667); // Handler Process UID
+_LIT_SECURE_ID( KManagerProcessSID,  0x2001E668);         // Manager Process UID
+_LIT( KMyRequestor , "Requestor" );                       //Set requestor information
+
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiLbtAdapter ::CEvtMgmtUiLbtAdapter()
+// ---------------------------------------------------------------------------
+//
+CEvtMgmtUiLbtAdapter::CEvtMgmtUiLbtAdapter(MEvtMgmtUiLbtObserver&  aObserver)
+:CActive( EPriorityStandard ), iObserver(aObserver)
+    {   
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiLbtAdapter ::ConstructL()
+// ---------------------------------------------------------------------------
+//
+void CEvtMgmtUiLbtAdapter::ConstructL()
+    {   
+    EVTUIDEBUG("+ CEvtMgmtUiLbtAdapter::ConstructL()" );
+    
+    CActiveScheduler::Add(this);  
+    EVTUIDEBUG("scheduler added" );
+    
+    // Create a Connection to LBT Sever.
+    User::LeaveIfError( iLbtServer.Connect() );
+    EVTUIDEBUG("lbtserver connected" );
+    
+    // Open 2 Sessions - One for LBT operation and Other for LBT observer 
+    User::LeaveIfError( iLbt.Open(iLbtServer) );
+    User::LeaveIfError( iLbtObserver.Open(iLbtServer) );
+    EVTUIDEBUG("lbt is opened" );
+    
+    // Create a Trigger change notifier to listen to any changes to triggers. 
+    iEventChangeObserver = CLbtTriggerChangeEventNotifier::NewL( iLbtObserver, *this );
+    iEventChangeObserver->Start();
+    EVTUIDEBUG("Trigger Change Notifier is started" );
+    
+    EVTUIDEBUG("- CEvtMgmtUiLbtAdapter::ConstructL()" );
+    }
+    
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiLbtAdapter ::NewL()
+// ---------------------------------------------------------------------------
+//
+CEvtMgmtUiLbtAdapter* CEvtMgmtUiLbtAdapter::NewL(MEvtMgmtUiLbtObserver&  aObserver)
+    {
+    EVTUIDEBUG("+ CEvtMgmtUiLbtAdapter::NewL()" );
+    CEvtMgmtUiLbtAdapter * self = new (ELeave) CEvtMgmtUiLbtAdapter(aObserver);
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    CleanupStack::Pop(self);
+    EVTUIDEBUG("- CEvtMgmtUiLbtAdapter::NewL()" );
+    return self;
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiLbtAdapter ::~CEvtMgmtUiLbtAdapter()
+// ---------------------------------------------------------------------------
+//
+CEvtMgmtUiLbtAdapter::~CEvtMgmtUiLbtAdapter()
+    {     
+    EVTUIDEBUG("+ CEvtMgmtUiLbtAdapter::~CEvtMgmtUiLbtAdapter()" );
+    Cancel();
+    if(iAttrFilter)
+        {
+        delete iAttrFilter;
+        iAttrFilter = NULL;
+        }
+        
+    if(iTrigger)
+        {
+        delete iTrigger;
+        iTrigger = NULL;
+        }
+    	
+    delete iEventChangeObserver;
+    
+    //Close lbt session and server
+    iLbtObserver.Close();
+    iLbt.Close();
+    iLbtServer.Close();
+    EVTUIDEBUG("- CEvtMgmtUiLbtAdapter::~CEvtMgmtUiLbtAdapter()" );
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiLbtAdapter::CreateTrigger
+// ---------------------------------------------------------------------------
+//
+void CEvtMgmtUiLbtAdapter::CreateTrigger(const TCoordinate& aCenter,
+        TReal aRadiusInKiloMeters, const TPtrC& aTriggerName,
+        CLbtTriggerEntry::TLbtTriggerState aState )
+    {       
+    EVTUIDEBUG("+ CEvtMgmtUiLbtAdapter::CreateOrUpdateTrigger()" );
+    
+    TRAPD(err, CreateTriggerL( aCenter, aRadiusInKiloMeters, aTriggerName, 
+                            aState ) );
+    
+    if( err!=KErrNone )
+        iObserver.NotifyLbtError(err, iState);
+    
+    EVTUIDEBUG("- CEvtMgmtUiLbtAdapter::CreateOrUpdateTrigger()" );
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiLbtAdapter::CreateTriggerL
+// ---------------------------------------------------------------------------
+//
+void CEvtMgmtUiLbtAdapter::CreateTriggerL(const TCoordinate& aCenter,
+        TReal aRadiusInKiloMeters, const TPtrC& aTriggerName,
+        CLbtTriggerEntry::TLbtTriggerState aState )
+    {        
+    EVTUIDEBUG("+ CEvtMgmtUiLbtAdapter::CreateTriggerL()");
+    
+    if ( IsActive() )
+        {
+        User::Leave( KErrInUse );            
+        }
+	
+    //set state of the machine
+    iState = ELbtAdapterCreate;
+    
+    EVTUIDEBUG("========== Trigger Parameter Details ===============" );   
+    CLbtTriggerConditionArea* cond = GetConditionAreaL(aCenter, aRadiusInKiloMeters);
+    CleanupStack::PushL(cond);     
+   
+    /*********************** Debug ******************************************/
+    TBuf<256> debug;
+    debug.Copy( aTriggerName );
+    EVTUIDEBUG1("Trigger Name = %S", &debug );
+    EVTUIDEBUG1("Event State = %d", aState );
+    EVTUIDEBUG1("Radius = %f", aRadiusInKiloMeters*KUnitConversion );
+	debug.Copy( KTriggerHandlingProcessName() );
+	EVTUIDEBUG1("Trigger handling process name: %S", &debug );
+	EVTUIDEBUG1("Trigger handling process SID: %x", KTriggerHandlingProcessSID);
+	EVTUIDEBUG1("Manager process SID: %x", KManagerProcessSID);
+    /*********************** Debug ******************************************/
+    EVTUIDEBUG("========== Trigger Parameter Details end ===============" );   
+    
+    if(iTrigger)
+       {
+       delete iTrigger;
+       iTrigger = NULL;
+       }
+   
+    // Create the Startup trigegr without the command line.
+    iTrigger = CLbtStartupTrigger::NewL(          
+                            aTriggerName,                           // Trigger name
+                            aState,                                 // Trigger state
+                            CRequestorBase::ERequestorService,      // Requestor type
+                            CRequestorBase::EFormatApplication,     // Requestor format
+                            KMyRequestor,                           // Requestor data
+                            KManagerProcessSID,                     // Manager Uid
+                            cond,                                   // Trigger condition
+                            KTriggerHandlingProcessName,            // Trigger handler app
+                            KTriggerHandlingProcessSID
+                            );          //Trigger state
+   
+  	CleanupStack::Pop( cond ); //ownership of cond is transferred.    
+	
+    SetActive();
+    iStatus = KRequestPending;
+    
+    EVTUIDEBUG("Before CreateTrigger" );      
+    iLbt.CreateTrigger( *iTrigger, iTriggerId, EFalse, iStatus );            
+    EVTUIDEBUG("After CreateTrigger" );      
+
+    EVTUIDEBUG("- CEvtMgmtUiLbtAdapter::CreateTriggerL()");
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiLbtAdapter::GetConditionAreaL
+// ---------------------------------------------------------------------------
+//
+CLbtTriggerConditionArea* CEvtMgmtUiLbtAdapter::GetConditionAreaL( 
+                const TCoordinate& aCenter, TReal aRadiusInKiloMeters )
+    {
+    EVTUIDEBUG("+ CEvtMgmtUiLbtAdapter::GetConditionAreaL()");
+    // Create the Condition Area object depending on the trigger type.
+    CLbtTriggerConditionArea* cond = NULL;
+
+    if( Math::IsNaN( aCenter.Latitude() ) || Math::IsNaN( aCenter.Longitude() ) )
+        {
+        //Define the triggering area   
+        CLbtGeoCircle * trigArea = CLbtGeoCircle ::NewLC( TCoordinate(TReal(0), TReal(0), TReal(0) ),1*KUnitConversion );
+        //Construct trigger condition
+        cond = CLbtTriggerConditionArea::NewL
+                    (trigArea,CLbtTriggerConditionArea::EFireOnEnter );
+        CleanupStack::Pop( trigArea ); //ownership of trigArea is transferred.
+        }
+    else
+        {
+        //Define the triggering area   
+        CLbtGeoCircle * trigArea = CLbtGeoCircle ::NewLC( aCenter,aRadiusInKiloMeters*KUnitConversion );
+        //Construct trigger condition
+        cond = CLbtTriggerConditionArea::NewL
+                    (trigArea,CLbtTriggerConditionArea::EFireOnEnter );
+        CleanupStack::Pop( trigArea ); //ownership of trigArea is transferred.                
+        }
+    EVTUIDEBUG1("Lat = %f", aCenter.Latitude() );
+    EVTUIDEBUG1("Long = %f", aCenter.Longitude() );
+    EVTUIDEBUG("- CEvtMgmtUiLbtAdapter::GetConditionAreaL()");
+    return cond;
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiLbtAdapter::UpdateCmdLineArgL
+// ---------------------------------------------------------------------------
+//
+void CEvtMgmtUiLbtAdapter::UpdateCmdLineArgL( TLbtTriggerId aTriggerId, 
+                                                        TEvtEventId aEventId )
+    {
+    EVTUIDEBUG1("+ CEvtMgmtUiLbtAdapter::UpdateCmdLineArgL() - %d", aTriggerId );
+    //set commandline argument
+    const TInt KTriggerIdLength(132); 
+    _LIT(KDelimiter, ":");
+    TBuf<KTriggerIdLength> cmdArg;
+    cmdArg.Zero();
+    cmdArg.AppendNumUC(EEvtActionFired);
+    cmdArg.Append(KDelimiter());
+    cmdArg.AppendNumUC(aEventId);
+       
+    CLbtStartupTrigger* trigger = CLbtStartupTrigger::NewLC();
+    trigger->SetId( aTriggerId );
+    trigger->SetCommandLineL( cmdArg );    
+    iState = ELbtAdapterUpdateCmdLineArg;
+    
+	EVTUIDEBUG1("Before UpdateTriggerL  - %d", aTriggerId );
+    iLbt.UpdateTriggerL( *trigger, CLbtTriggerEntry::EAttributeStartUpCommandLine, ELbtFalse );  
+	EVTUIDEBUG1("After UpdateTriggerL  - %d", aTriggerId ); 
+    
+    CleanupStack::PopAndDestroy(trigger);
+    EVTUIDEBUG1("- CEvtMgmtUiLbtAdapter::UpdateCmdLineArgL() - %d", aTriggerId );
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiLbtAdapter::UpdateTriggerL
+// ---------------------------------------------------------------------------
+//
+void CEvtMgmtUiLbtAdapter::UpdateTriggerL( TLbtTriggerId aTriggerId,
+        const TCoordinate& aCenter, TReal aRadiusInKiloMeters,
+        CLbtTriggerEntry::TLbtTriggerState aState )
+    {
+    EVTUIDEBUG1("+ CEvtMgmtUiLbtAdapter::UpdateTriggerL() - %d", aTriggerId )
+    EVTUIDEBUG1("Event State = %d", aState );
+    
+    if ( IsActive() )
+       {    
+       User::Leave( KErrInUse );            
+       }
+    
+    //Set state of the machine
+    iState = ELbtAdapterUpdate;   
+
+    // Create the Condition Area object depending on the trigger type.
+    CLbtTriggerConditionArea* cond = GetConditionAreaL(aCenter, aRadiusInKiloMeters );
+    CleanupStack::PushL(cond); 
+       
+    //create startup trigger object
+    if(iTrigger)
+       {
+       delete iTrigger;
+       iTrigger = NULL;
+       }
+    iTrigger = CLbtStartupTrigger::NewL();
+    iTrigger->SetId( aTriggerId );
+    iTrigger->SetCondition(cond);    
+    CleanupStack::Pop(cond);    //ownership is transferred to trigger.
+    iTrigger->SetState(aState);
+    
+    // Create the Trigger update attributes mask. 
+    TLbtTriggerAttributeFieldsMask fieldsMask;
+    fieldsMask = CLbtTriggerEntry::EAttributeState | CLbtTriggerEntry::EAttributeCondition;
+    
+    SetActive();
+    iStatus = KRequestPending;
+    
+    EVTUIDEBUG1("Before UpdateTriggerL  - %d", aTriggerId );
+    iLbt.UpdateTrigger( *iTrigger, fieldsMask, ELbtFalse, iStatus);  
+    EVTUIDEBUG1("After UpdateTriggerL  - %d", aTriggerId ); 
+    
+    EVTUIDEBUG1("- CEvtMgmtUiLbtAdapter::UpdateTriggerL() - %d", aTriggerId );
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiLbtAdapter::SetTriggerStateL
+// ---------------------------------------------------------------------------
+//
+void CEvtMgmtUiLbtAdapter::SetTriggerStateL( TLbtTriggerId  aTriggerId,
+									CLbtTriggerEntry::TLbtTriggerState aState )  
+    {
+    EVTUIDEBUG1("+ CEvtMgmtUiLbtAdapter::SetTriggerStateL() - %d", aTriggerId );
+    EVTUIDEBUG2("SetTriggerState for Triggerid =%d eventstatus = %d ", aTriggerId, aState);
+    
+    //Set state of the machine
+    iState = ELbtAdapterSetTriggerState;
+    iTriggerId = aTriggerId;
+    
+	EVTUIDEBUG1("Before SetTriggerStateL  - %d", aTriggerId );
+    iLbt.SetTriggerStateL(aTriggerId, aState, ELbtFalse );
+	EVTUIDEBUG1("After SetTriggerStateL  - %d", aTriggerId );
+	
+    EVTUIDEBUG1("- CEvtMgmtUiLbtAdapter::SetTriggerStateL() - %d", aTriggerId );
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiLbtAdapter::SetTriggersStateL
+// ---------------------------------------------------------------------------
+//
+void CEvtMgmtUiLbtAdapter::SetTriggersStateL( const RArray<TLbtTriggerId>& aTriggerIdList,
+                                    CLbtTriggerEntry::TLbtTriggerState aState )  
+    {
+    EVTUIDEBUG1("+ CEvtMgmtUiLbtAdapter::SetTriggersStateL() Count - %d", aTriggerIdList.Count() );
+    
+    if ( IsActive() )
+       {    
+       User::Leave( KErrInUse );            
+       }
+    
+    //Set state of the machine
+    iState = ELbtAdapterSetTriggersState;  
+    
+    if( iAttrFilter )
+    	{
+    	delete iAttrFilter;
+    	iAttrFilter = NULL;
+    	}
+        
+    // Create an attribute filter to include all the trigger ids
+    iAttrFilter = CLbtTriggerFilterByAttribute::NewL();
+    
+    for( TInt index=0; index<aTriggerIdList.Count(); index++ )
+        {
+        iAttrFilter->AddTriggerIdL(aTriggerIdList[index]);
+        }
+            
+    SetActive();
+    iStatus = KRequestPending;
+    iLbt.SetTriggersState( iStatus, aState, ELbtFalse, iAttrFilter );
+    
+    EVTUIDEBUG("- CEvtMgmtUiLbtAdapter::SetTriggersState()");
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiLbtAdapter::DeleteTriggerL
+// ---------------------------------------------------------------------------
+//
+void CEvtMgmtUiLbtAdapter::DeleteTriggerL( TLbtTriggerId  aTriggerId )  
+    {
+    EVTUIDEBUG1("+ CEvtMgmtUiLbtAdapter::DeleteTriggerL() TriggerID = %d" , aTriggerId);
+    EVTUIDEBUG2("SetTriggerState for Triggerid =%d eventstatus = %d ", aTriggerId, iState);
+      
+    //set state 
+    iState = ELbtAdapterDelete;
+    
+    //Set it to member variable so that it can be used in RunL to delete trigger
+    iTriggerId = aTriggerId;
+    
+	EVTUIDEBUG1("Before DeleteTriggerL  - %d", aTriggerId );
+    iLbt.DeleteTriggerL( iTriggerId );
+	EVTUIDEBUG1("After DeleteTriggerL  - %d", aTriggerId );
+    
+    EVTUIDEBUG1("- CEvtMgmtUiLbtAdapter::DeleteTriggerL() TriggerID = %d" , aTriggerId);
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiLbtAdapter::DeleteTriggersL
+// ---------------------------------------------------------------------------
+//
+void CEvtMgmtUiLbtAdapter::DeleteTriggersL( const RArray<TLbtTriggerId>& aTriggerIdList )  
+    {
+    EVTUIDEBUG1("+ CEvtMgmtUiLbtAdapter::DeleteTriggersL() Count - %d", aTriggerIdList.Count() );
+    
+    if ( IsActive() )
+        {
+        User::Leave( KErrInUse );            
+        }
+    iState = ELbtAdapterDeleteTriggers;
+    SetActive();
+    iStatus = KRequestPending;
+        
+    iLbt.DeleteTriggers( aTriggerIdList, iStatus );
+    
+    EVTUIDEBUG("- CEvtMgmtUiLbtAdapter::DeleteTriggersL()");
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiLbtAdapter::GetTriggerStateL
+// ---------------------------------------------------------------------------
+//
+CLbtTriggerEntry::TLbtTriggerState CEvtMgmtUiLbtAdapter::GetTriggerStateL( TLbtTriggerId  aTriggerId )
+    {
+    EVTUIDEBUG1("+ CEvtMgmtUiLbtAdapter::GetTriggerStateL = %d ", aTriggerId);
+    CLbtTriggerEntry::TLbtTriggerState state = CLbtTriggerEntry::EStateDisabled;
+    
+	EVTUIDEBUG1("Before GetTriggerLC  - %d", aTriggerId );
+    CLbtTriggerInfo * info = iLbt.GetTriggerLC( aTriggerId );
+	EVTUIDEBUG1("After GetTriggerLC  - %d", aTriggerId );
+    
+    if(info)
+        {
+        CLbtTriggerEntry* entry = info->TriggerEntry();
+        state = entry->State();
+        CleanupStack::PopAndDestroy(info);
+        }
+    
+    EVTUIDEBUG1("- CEvtMgmtUiLbtAdapter::GetTriggerStateL = %d ", aTriggerId);
+    
+    return state;
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiLbtAdapter::CancelRequest()
+// ---------------------------------------------------------------------------
+//
+void CEvtMgmtUiLbtAdapter::CancelRequest()
+    {     
+    EVTUIDEBUG("+ CEvtMgmtUiLbtAdapter::CancelRequest()" );
+    Cancel();
+    if(iStatus.Int()==KErrCancel)
+        {       
+		iObserver.NotifyLbtError(KErrCancel, iState);
+		}
+    EVTUIDEBUG("- CEvtMgmtUiLbtAdapter::CancelRequest()" );
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiLbtAdapter::RetrieveLocationL
+// ---------------------------------------------------------------------------
+//
+void CEvtMgmtUiLbtAdapter::RetrieveLocationL( TLbtTriggerId aTriggerId, TCoordinate& aCenter )
+    {
+    EVTUIDEBUG1("+ CEvtMgmtUiLbtAdapter::RetrieveLocationL() TriggerId = %d ", aTriggerId );   
+    
+	EVTUIDEBUG1("Before GetTriggerLC  - %d", aTriggerId );
+    CLbtTriggerInfo * info = iLbt.GetTriggerLC( aTriggerId );
+	EVTUIDEBUG1("After GetTriggerLC  - %d", aTriggerId );
+    
+    if(info)
+           {
+           CLbtTriggerEntry* entry = info->TriggerEntry();
+           CLbtTriggerConditionArea* triggArea =  static_cast< CLbtTriggerConditionArea*>( entry->GetCondition());
+           CLbtGeoAreaBase* triggGeoArea = static_cast< CLbtGeoAreaBase*>( triggArea->TriggerArea());
+           if( triggGeoArea->Type() == CLbtGeoAreaBase::ECircle)
+               {
+               CLbtGeoCircle* loc = static_cast<CLbtGeoCircle*>( triggArea->TriggerArea() );          
+               aCenter = loc->Center();
+               EVTUIDEBUG1("GetTriggerLC: Latitude = %f", aCenter.Latitude() );
+               EVTUIDEBUG1("GetTriggerLC: Longitude = %f", aCenter.Longitude() );
+               }
+           else
+               {
+               User::Leave(KErrNotSupported);
+               }
+    	   CleanupStack::PopAndDestroy(); //info
+           }   
+    
+    EVTUIDEBUG1("- CEvtMgmtUiLbtAdapter::RetrieveLocationL() TriggerId = %d ", aTriggerId );  
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiLbtAdapter::GetFiredTriggerAccuracyL
+// ---------------------------------------------------------------------------
+//
+void CEvtMgmtUiLbtAdapter::GetFiredTriggerAccuracyL( TLbtTriggerId aTriggerId, TReal32& aDistance )
+    {
+    EVTUIDEBUG1("+ CEvtMgmtUiLbtAdapter::GetFiredTriggerAccuracyL() TriggerId = %d ", aTriggerId );   
+    
+	EVTUIDEBUG1("Before GetTriggerLC  - %d", aTriggerId );
+    CLbtTriggerInfo * info = iLbt.GetTriggerLC( aTriggerId );
+	EVTUIDEBUG1("After GetTriggerLC  - %d", aTriggerId );
+    
+    if(info)
+		{
+        CLbtTriggerEntry* entry = info->TriggerEntry();
+        CLbtTriggerConditionArea* triggArea =  static_cast< CLbtTriggerConditionArea*>( entry->GetCondition());
+        CLbtGeoAreaBase* triggGeoArea = static_cast< CLbtGeoAreaBase*>( triggArea->TriggerArea());
+        if( triggGeoArea->Type() == CLbtGeoAreaBase::ECircle)
+            {
+            TLbtTriggerDynamicInfo* dynInfo = info->DynInfo();
+            CLbtGeoCircle* circle = static_cast<CLbtGeoCircle*> (triggGeoArea);
+            TCoordinate cord = circle->Center();
+            cord.Distance(dynInfo->iFiredLocality, aDistance);
+            aDistance = aDistance - circle->Radius();
+            aDistance = Abs(aDistance);
+            }
+        EVTUIDEBUG1( "Fired Trigger Accuracy in Distance = %f", aDistance );
+        CleanupStack::PopAndDestroy(); //info
+		}   
+    
+    EVTUIDEBUG1("- CEvtMgmtUiLbtAdapter::GetFiredTriggerAccuracyL() TriggerId = %d ", aTriggerId );
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiLbtAdapter::RunError
+// ---------------------------------------------------------------------------
+//
+TInt CEvtMgmtUiLbtAdapter::RunError( TInt aError )
+    {
+    EVTUIDEBUG("+ CEvtMgmtUiLbtAdapter::RunError()" );
+    if( aError != KErrNone )
+        {
+        //if error, notify it to the engine.      
+        EVTUIDEBUG1("CEvtMgmtUiLbtAdapter RunError error = %d", aError );
+        iObserver.NotifyLbtError( aError, iState);
+        }
+    EVTUIDEBUG("- CEvtMgmtUiLbtAdapter::RunError()" );
+    return KErrNone;
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiLbtAdapter ::RunL()
+// Inherited from CActive
+// ---------------------------------------------------------------------------
+//
+void CEvtMgmtUiLbtAdapter::RunL() 
+    {
+    EVTUIDEBUG("+ CEvtMgmtUiLbtAdapter::RunL()" );
+        
+    if(iStatus.Int()!=KErrNone)
+        {       
+        EVTUIDEBUG1("- CEvtMgmtUiLbtAdapter::RunL() error =%d", iStatus.Int());
+        User::Leave( iStatus.Int() );
+        return;
+        }
+    
+    EVTUIDEBUG("LbtAdapter error = 0" );
+    
+    switch(iState)
+        {
+        case ELbtAdapterCreate: 
+            {
+			 iState = ELbtAdapterCreate;
+			 
+            //delete trigger object when trigger is successfuly created
+            if(iTrigger)            
+                {
+        		EVTUIDEBUG("Deleting trigger entry after Create" );
+                delete iTrigger;
+                iTrigger = NULL;
+                }
+            break;
+            }
+        case ELbtAdapterUpdate:
+            {			 
+            //delete trigger object when trigger is successfuly updated
+            if(iTrigger)            
+                {
+        		EVTUIDEBUG("Deleting trigger entry after Update" );
+                delete iTrigger;
+                iTrigger = NULL;
+                }
+            break;
+            }
+        case ELbtAdapterDeleteTriggers:
+            {
+            EVTUIDEBUG("Triggers are deleted successfully");
+            }
+            break;
+        case ELbtAdapterSetTriggersState:
+            {
+		    if(iAttrFilter)
+		        {
+		        delete iAttrFilter;
+		        iAttrFilter = NULL;
+		        }
+            EVTUIDEBUG("State of triggers are changed successfully");
+            break;
+            }
+        default:
+            { 
+            break;
+            }
+        }
+    //Notify engine about lbt changes
+    iObserver.NotifyLbtChangeL(iTriggerId, iState);               
+    
+    EVTUIDEBUG("- CEvtMgmtUiLbtAdapter::RunL()" );
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiLbtAdapter ::DoCancel()
+// Inherited from CActive
+// ---------------------------------------------------------------------------
+//
+void CEvtMgmtUiLbtAdapter::DoCancel()
+    {    
+    EVTUIDEBUG("+ CEvtMgmtUiLbtAdapter::DoCancel()" );
+    iLbt.CancelAll();
+    //iObserver.NotifyLbtError(KErrCancel, iState);
+    EVTUIDEBUG("- CEvtMgmtUiLbtAdapter::DoCancel()" );
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiLbtAdapter::GetTriggerListL
+// ---------------------------------------------------------------------------
+//
+void CEvtMgmtUiLbtAdapter::GetTriggerListL( RArray<TLbtTriggerId>& aTriggerList,
+								CLbtTriggerEntry::TLbtTriggerState aState )
+    {
+    EVTUIDEBUG("+ CEvtMgmtUiLbtAdapter::GetTriggerListL()" );
+	CLbtListTriggerOptions *listOptions = CLbtListTriggerOptions::NewL();
+    CleanupStack::PushL(listOptions);  
+      
+	CLbtTriggerFilterByAttribute* filter = CLbtTriggerFilterByAttribute::NewLC();
+	
+    // List only valid triggers and whose state is aState.
+	filter->AddTriggerStateL( aState );
+    filter->AddTriggerValidityL( TLbtTriggerDynamicInfo::EValid );
+    
+	listOptions->SetFilter( filter );
+	
+	EVTUIDEBUG("Before ListTriggerIdsL");
+	iLbt.ListTriggerIdsL( aTriggerList, listOptions );
+	EVTUIDEBUG("After ListTriggerIdsL");
+
+    CleanupStack::PopAndDestroy(2);// filter, listOptions
+    EVTUIDEBUG("- CEvtMgmtUiLbtAdapter::GetTriggerListL()" );
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiLbtAdapter::GetTriggerListL
+// ---------------------------------------------------------------------------
+//
+void CEvtMgmtUiLbtAdapter::GetTriggerListL( RArray<TLbtTriggerId>& aTriggerList,
+                TLbtTriggerDynamicInfo::TLbtTriggerValidity aValid )
+    {
+    EVTUIDEBUG("+ CEvtMgmtUiLbtAdapter::GetTriggerListL()" );
+    CLbtListTriggerOptions *listOptions = CLbtListTriggerOptions::NewL();
+    CleanupStack::PushL(listOptions);  
+      
+    CLbtTriggerFilterByAttribute* filter = CLbtTriggerFilterByAttribute::NewLC();
+    
+    // List only triggers of status aValid
+    filter->AddTriggerValidityL( aValid );
+    
+    listOptions->SetFilter( filter );
+    
+    EVTUIDEBUG("Before ListTriggerIdsL");
+    iLbt.ListTriggerIdsL( aTriggerList, listOptions );
+    EVTUIDEBUG("After ListTriggerIdsL");
+
+    CleanupStack::PopAndDestroy(2);// filter, listOptions
+    EVTUIDEBUG("- CEvtMgmtUiLbtAdapter::GetTriggerListL()" );
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiLbtAdapter::TriggerChangedL
+// ---------------------------------------------------------------------------
+//
+void CEvtMgmtUiLbtAdapter::TriggerChangedL(
+							const TLbtTriggerChangeEvent &aEvent)
+	{
+	EVTUIDEBUG("+ CEvtMgmtUiLbtAdapter::TriggerChangedL()" );
+	switch( aEvent.iEventType )
+		{
+		case ELbtTriggerChangeEventMultiple:
+		iObserver.NotifyTriggerChangeL(aEvent.iTriggerId, MEvtMgmtUiLbtObserver::ETriggerMultipleModified);
+		break;
+		case ELbtTriggerChangeEventDeleted:
+		iObserver.NotifyTriggerChangeL(aEvent.iTriggerId, MEvtMgmtUiLbtObserver::ETriggerDeleted);
+		break;
+		case ELbtTriggerChangeEventUpdated:
+		iObserver.NotifyTriggerChangeL(aEvent.iTriggerId, MEvtMgmtUiLbtObserver::ETriggerModified);
+		break;
+		default:
+		break;
+		}
+	EVTUIDEBUG("- CEvtMgmtUiLbtAdapter::TriggerChangedL()" );
+	}
+
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiLbtAdapter::GetFiredPositionL
+// ---------------------------------------------------------------------------
+//
+TBool CEvtMgmtUiLbtAdapter::GetFiredPositionL( TPosition& aPosition,
+											const TLbtTriggerId aTriggerId )
+	{
+	EVTUIDEBUG1("+ CEvtMgmtUiLbtAdapter::GetFiredPositionL() - %d", aTriggerId );
+	RArray<TLbtTriggerFireInfo> aTriggerInfoList;
+	
+	EVTUIDEBUG1("Before GetFiredTriggersL  - %d", aTriggerId );
+	iLbt.GetFiredTriggersL( aTriggerInfoList );
+	EVTUIDEBUG1("After GetFiredTriggersL  - %d", aTriggerId );
+	
+	TInt count = aTriggerInfoList.Count();
+	TBool found(EFalse);
+	
+	for( TInt i=0; i<count; i++ )
+		{
+		if ( aTriggerInfoList[i].iTriggerId == aTriggerId )
+			{
+			if(aTriggerInfoList[i].iAreaType == CLbtGeoAreaBase::ECircle)
+				{ 
+				found = ETrue;
+				aTriggerInfoList[i].iFiredPositionInfo.GetPosition( aPosition );
+				}
+			}
+		}
+	aTriggerInfoList.Close();
+	EVTUIDEBUG1("- CEvtMgmtUiLbtAdapter::GetFiredPositionL() - %d", aTriggerId );
+	return found;
+	}
+//end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventsengine/src/evttoneaction.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,252 @@
+/*
+* 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:  Tone class definition.
+*
+*/
+
+
+// System Includes
+#include <e32math.h>
+#include <s32mem.h>
+
+// User Includes
+#include "evttoneaction.h"
+#include "evtdebug.h"
+
+// ================ Member funtions for CEvtToneAction class ======================
+
+// ---------------------------------------------------------------------------
+// CEvtToneAction::CEvtToneAction
+// ---------------------------------------------------------------------------
+//
+EXPORT_C CEvtToneAction::CEvtToneAction():
+	iToneLoop( EFalse )
+    {    
+    }
+    
+// ---------------------------------------------------------------------------
+// CEvtToneAction::~CEvtToneAction
+// ---------------------------------------------------------------------------
+//
+EXPORT_C CEvtToneAction::~CEvtToneAction()
+    {
+    delete iFileName;
+    } 
+    
+// ---------------------------------------------------------------------------
+// CEvtToneAction::NewL
+// ---------------------------------------------------------------------------
+//
+EXPORT_C CEvtToneAction* CEvtToneAction::NewL()
+    {
+	CEvtToneAction* self = NewLC( );
+	CleanupStack::Pop( self );
+	return self;
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtToneAction::NewLC
+// ---------------------------------------------------------------------------
+//
+EXPORT_C CEvtToneAction* CEvtToneAction::NewLC()
+    {
+	CEvtToneAction* self = new ( ELeave )CEvtToneAction( );
+	CleanupStack::PushL( self );
+	self->ConstructL( );
+	return self;
+    } 
+
+// ---------------------------------------------------------------------------
+// CEvtToneAction::ConstructL
+// ---------------------------------------------------------------------------
+//
+EXPORT_C void CEvtToneAction::ConstructL()
+    {
+    // Allocate the Null string by default
+    iFileName = KNullDesC().AllocL();
+    } 
+
+// ---------------------------------------------------------------------------
+// CEvtToneAction::Tone
+// ---------------------------------------------------------------------------
+//
+
+EXPORT_C TPtrC CEvtToneAction::FileName() const
+    {
+    return iFileName->Des();
+    } 
+    
+// ---------------------------------------------------------------------------
+// CEvtToneAction::SetToneL
+// ---------------------------------------------------------------------------
+//
+
+EXPORT_C void CEvtToneAction::SetFileNameL( const TDesC& aFileName )
+    {
+    delete iFileName;
+	iFileName = NULL;
+    iFileName = aFileName.AllocL();
+    } 
+    
+// ---------------------------------------------------------------------------
+// CEvtToneAction::ToneLoop
+// ---------------------------------------------------------------------------
+//
+
+EXPORT_C TBool CEvtToneAction::ToneLoop() const
+    {
+    return iToneLoop;
+    } 
+    
+// ---------------------------------------------------------------------------
+// CEvtToneAction::SetToneLoop
+// ---------------------------------------------------------------------------
+//
+
+EXPORT_C void CEvtToneAction::SetToneLoop( const TBool aToneLoop )
+    {
+    iToneLoop = aToneLoop;
+    } 
+    
+// ---------------------------------------------------------------------------
+// CEvtToneAction::ExternalizeL
+// ---------------------------------------------------------------------------
+//
+EXPORT_C void CEvtToneAction::ExternalizeL( CEvtAction&   aAction )
+    {
+    CBufFlat* buffer = CBufFlat::NewL( TotalSize() );
+    CleanupStack::PushL( buffer );
+    
+    // Allocate a common buffer for both read and write streams
+    RBufWriteStream writestream( *buffer, 0 );
+    
+    // Externalize from CEvtToneAction
+    ExternalizeL( writestream );
+    
+    // Covert the 8 bit Stream to 16 bit descriptor.
+    TPtr8 bufPtr = buffer->Ptr(0);
+    TPtrC display;
+    display.Set( (TUint16*)bufPtr.Ptr(), (bufPtr.Length()>>1) );
+
+    // Internalize from CEvtAction
+    aAction.SetActionL( display );
+    
+    CleanupStack::PopAndDestroy( buffer );
+    } 
+    
+// ---------------------------------------------------------------------------
+// CEvtToneAction::InternalizeL
+// ---------------------------------------------------------------------------
+//
+EXPORT_C void CEvtToneAction::InternalizeL( CEvtAction&   aAction )
+    {
+    // Internalize from CEvtAction
+    TPtrC ptr = aAction.Action( );
+    
+    // Create a buffer of ptr's size granularity
+    CBufFlat* buffer = CBufFlat::NewL( ptr.Size() );
+    CleanupStack::PushL( buffer );
+	
+	// Insert the action String into buffer
+    buffer->InsertL( 0, (TAny*)ptr.Ptr(), (ptr.Length()<<1) );
+    
+    // Allocate a common buffer for both read and write streams
+    RBufReadStream readstream( *buffer, 0 );
+        
+    // Internalize from CEvtToneAction
+    InternalizeL( readstream );
+    
+    CleanupStack::PopAndDestroy( buffer );
+    } 
+
+// ---------------------------------------------------------------------------
+// CEvtToneAction::ExternalizeL
+// ---------------------------------------------------------------------------
+//
+void CEvtToneAction::ExternalizeL( RWriteStream&   aWriteStream )
+    {
+    // Externalize will happen in the order of
+    // - Action Type
+    // - Tone String length
+    // - Tone String
+    // - Tone Loop
+    TInt length = iFileName->Length();
+    aWriteStream.WriteUint8L( EAlarm );
+    aWriteStream.WriteUint32L( length );
+    
+    // Avoid WriteL, if the Tone String length is 0.
+    if( 0 != length )
+        aWriteStream.WriteL( iFileName->Des(), length );
+    aWriteStream.WriteUint8L( iToneLoop );
+    
+    } 
+    
+// ---------------------------------------------------------------------------
+// CEvtToneAction::InternalizeL
+// ---------------------------------------------------------------------------
+//
+void CEvtToneAction::InternalizeL( RReadStream&    aReadStream )
+    {
+    // Internalize will happen in the order of
+    // - Action Type
+    // - Tone String length
+    // - Tone String
+    // - Tone Loop
+    TEvtActionType type;    
+    type = static_cast<TEvtActionType>(aReadStream.ReadUint8L());
+    
+    // Leave if the Action type is not EAlarm
+    if( EAlarm != type )
+        User::Leave( KErrArgument );
+    
+    // Get the length of tone String.
+    TInt length = aReadStream.ReadUint32L();
+    if( iFileName )
+        delete iFileName;
+    
+    // Avoid ReadL, if the Tone String length is 0.
+    if( 0 != length )
+        {
+        iFileName = HBufC::NewL( length );
+        TPtr actn( iFileName->Des() );
+    
+	    // ReadL can leave if we try to read any intermediate 8 bit 
+	    // descriptor. So we can ignore it.
+        TRAP_IGNORE( aReadStream.ReadL(actn, length));
+        }
+    else
+        {
+        iFileName = KNullDesC().AllocL();
+        }
+    
+    // Get the Toon Loop
+    iToneLoop = static_cast<TBool>( aReadStream.ReadUint8L() );
+    } 
+    
+// ---------------------------------------------------------------------------
+// CEvtToneAction::TotalSize
+// ---------------------------------------------------------------------------
+//
+TInt CEvtToneAction::TotalSize( )
+    {
+    TInt size=0;
+    size += sizeof( TUint8 );                   // Type Size
+    size += sizeof( TUint32 );                  // Tone Length Size
+    size += iFileName->Des().MaxSize();       // Tone Size
+    size += sizeof( TUint8 );                   // Loop Size
+    
+	return size;
+    } 
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventshandlerui/eventshandler/group/bld.inf	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,29 @@
+/*
+* 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:  Build information file for project Events Handler.
+*
+*/
+
+
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_EXPORTS
+
+PRJ_MMPFILES
+evthandler.mmp
+
+PRJ_TESTMMPFILES
+
+PRJ_TESTEXPORTS
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventshandlerui/eventshandler/group/evthandler.mmp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,51 @@
+/*
+* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Project definition file for project Events Hanlder
+*
+*/
+
+// using relative paths for source and userinclude directories
+// To get the APP_LAYER_SYSTEMINCLUDE-definition
+#include <platform_paths.hrh>
+#include <data_caging_paths.hrh>
+
+
+TARGET      evthandler.exe
+TARGETTYPE  exe
+UID         0 0x2001E667
+VENDORID    VID_DEFAULT
+CAPABILITY 	CAP_SERVER
+
+// Project source directory
+SOURCEPATH  ../src
+
+// Source files
+SOURCE      evthandler.cpp
+SOURCE      evthandlerclient.cpp
+
+// Include paths
+USERINCLUDE     . 
+USERINCLUDE     ../inc 
+USERINCLUDE     ../../inc
+USERINCLUDE     ../../../inc
+
+// Default system include paths for application layer modules.
+APP_LAYER_SYSTEMINCLUDE
+
+
+// Libraries
+LIBRARY         euser.lib efsrv.lib
+LIBRARY         estor.lib 
+LIBRARY 		bafl.lib  // commandline arguments
+LIBRARY         evtengine.lib evtutils.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventshandlerui/eventshandler/inc/evthandler.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,55 @@
+/*
+* 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:  Client Provider for Events Handler Server
+*
+*/
+
+
+#ifndef __EVTHANDLER_H
+#define __EVTHANDLER_H
+
+// SYSTEM INCLUDES
+#include <e32base.h>
+
+/**
+ *  Events Handler server start up routines.
+ *
+ *  It contains static funtions which start up the Events Handler server.
+ *
+ *  @since S60 v5.0
+ */
+NONSHARABLE_CLASS( EvtHandlerStartup )
+    {
+public:
+    /**
+     * Starts the Events Handler.
+     *
+     * @since S60 v5.0
+     * @return KErrNone, If the process has been started successfully.
+     *         System wide error codes incase the startup fails.
+     */
+    static TInt StartEvtHandler();
+
+private:
+    /**
+     * Handles the Event Fired
+	 * Logs the event id into log file and handles the fired event.     
+	 *
+     * @since S60 v5.0
+     * @leave System wide error codes incase the startup fails.
+     */
+    static void HandleEventL();     
+    };
+
+#endif // __EVTHANDLER_H
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventshandlerui/eventshandler/inc/evthandlerclient.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,49 @@
+/*
+* 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:  Client for Events Handler Server
+*
+*/
+
+
+#ifndef C_EVTHANDLERCLIENT_H
+#define C_EVTHANDLERCLIENT_H
+
+#include <e32std.h>
+
+/**
+ *  Client class for the Event Handler Server.
+ *
+ *  @lib 
+ *  @since S60 v9.1
+ */
+class REvtHandlerSession : public RSessionBase
+	{
+public:
+        /**
+        * Connect to the Event Handler Server
+        */
+		IMPORT_C TInt Connect();
+	
+	    /**
+        * Sends the Event Id to the Event handler Server to perform the 
+		* required action.
+        * @param aMessage Message containg the Event Id.
+        * @param aAccuracy Accuracy of the Event Id.
+        */
+		IMPORT_C TInt SendEventId( const TDesC& aMessage, const TInt aAccuracy );
+	};
+
+#endif  // C_EVTHANDLERCLIENT_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventshandlerui/eventshandler/src/evthandler.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,181 @@
+/*
+* 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:  Client Provider for Events Handler Server
+*
+*/
+
+
+//INCLUDE FILES
+
+//SYSTEM INCLUDES
+#include <e32base.h>
+#include <bacline.h> 		// CCommandLineArguments
+
+//USER INCLUDES
+#include "evthandler.h"
+#include "evthandlerclientserver.h"
+#include "evthandlerclient.h"
+#include "evthandlerserverconsts.h"
+#include "evtdebug.h"
+#include "evtmgmtuiengine.h"
+#include "evtevent.h"
+#include "evteventmanager.h"
+
+//CONSTANTS
+_LIT( KEventId,"%d");
+_LIT(KEvtHandler,"Handler Ui Panic");
+static const TInt KSchedulerCreate = 1;
+
+// ----------------------------------------------------------------------------
+// void EvtHandlerStartup::HandleEventL()
+// ----------------------------------------------------------------------------
+//
+void EvtHandlerStartup::HandleEventL()
+	{
+	EVTUIDEBUG("+ EvtHandlerStartup::HandleEventL()");
+	TBuf<KEvtCommandMessageLength> cmdArg;
+	TBuf<KEventIdLength> eventId;
+    TEvtConsoleAction evtAction = EEvtActionNone;
+	TEvtEventId evtId = 0;
+	TInt action=0;
+	TBool isValidEventId = EFalse;
+	
+	// create and install the active scheduler we need
+	CActiveScheduler* scheduler=new(ELeave) CActiveScheduler;
+	__ASSERT_ALWAYS(scheduler!=NULL,User::Panic(KEvtHandler, KSchedulerCreate));
+	CleanupStack::PushL(scheduler);
+	CActiveScheduler::Install(scheduler);  
+
+	while( ETrue )
+		{
+		//Create CommandLine Arguments and read it.
+		CCommandLineArguments* args = CCommandLineArguments::NewLC();
+		// check for valid argument count
+		TInt cnt = args->Count();
+        TPtrC cmdPrt1( args->Arg( 0 ) );
+		if( cnt == 2 ) // 2 - Process name, Console Action:Event Id
+			{
+			TPtrC cmdPrt( args->Arg( 1 ) ); // read first argument - Console Action:Event Id
+			cmdArg.Copy( cmdPrt );
+			}
+		CleanupStack::PopAndDestroy( args );
+		
+		// Check for valid arguments 
+		if( cmdArg.Length() <= 0 )
+			{
+			break;
+			}
+		
+		// Extract the Action for Event
+		TLex lex( cmdArg );
+		TInt errorCode = lex.Val( action );
+		if( errorCode != KErrNone)
+			{
+			break;
+			}
+		
+		// Get the meaningful Action.
+		evtAction = static_cast<TEvtConsoleAction>(action);
+        
+        // Increment the Delimiter
+        lex.Inc();
+
+        // Extract the Id of Event
+		errorCode = lex.Val( evtId, EDecimal );
+        if( errorCode != KErrNone)
+            {
+            break;
+            }
+        
+        // Format the Event Id buffer
+		eventId.Format( KEventId, evtId );
+		
+		// Set the Valid Event Id flag as True 
+		isValidEventId = ETrue;
+		break;
+		}
+
+	if ( isValidEventId )
+		{
+		EVTUIDEBUG1("EvtHandlerStartup::HandleEventL - Event Id %S",&eventId);
+		
+		// Create an engine instance to handle the requested actions.
+		CEvtMgmtUiEngine* engine = CEvtMgmtUiEngine::NewLC();
+		
+		switch( evtAction )
+		    {
+		    case EEvtActionFired:
+				{
+		        // Calculate the Accuracy of the Fired Event
+		        TEvtFireAccuracy accuracy = engine->CalculateFiredAccuracyL( evtId );
+		        
+		        // Launch the Server to handle the fired event
+		        REvtHandlerSession popupClient;
+		        CleanupClosePushL( popupClient );
+		        User::LeaveIfError( popupClient.Connect() );
+		        popupClient.SendEventId( eventId, accuracy );
+		        CleanupStack::PopAndDestroy( );   // popupClient
+		        break;
+				}
+		    case EEvtActionChangeState:
+		        {
+				// Handle the Change State
+		        engine->HandleFiredTriggerStateL( evtId );
+		        break;
+				}
+		    default:
+		        break;
+		    }
+		
+		CleanupStack::PopAndDestroy( );	// engine
+		}
+	
+	// Delete active scheduler
+   	CleanupStack::PopAndDestroy(scheduler);
+   	
+	EVTUIDEBUG("- EvtHandlerStartup::HandleEventL()");
+	}
+
+// ---------------------------------------------------------------------------
+// TInt EvtHandlerServerStartup::StartEvtHandlerServer()
+// ---------------------------------------------------------------------------
+//
+TInt EvtHandlerStartup::StartEvtHandler()
+    {
+	EVTUIDEBUG("+ EvtHandlerStartup::StartEvtHandler()");
+    __UHEAP_MARK;
+    CTrapCleanup* cleanupStack = CTrapCleanup::New();
+    TInt ret = KErrNoMemory;
+    if ( cleanupStack )
+        {
+        TRAP(ret, HandleEventL());
+        delete cleanupStack;
+        }
+    __UHEAP_MARKEND;
+	EVTUIDEBUG("- EvtHandlerStartup::StartEvtHandler()");
+    return ret;    
+    }
+
+// -----------------------------------------------------------------------------
+// TInt E32Main
+// Server process entry-point
+// -----------------------------------------------------------------------------
+//
+TInt E32Main()
+    {
+	EVTUIDEBUG("+ E32Main()");
+    return EvtHandlerStartup::StartEvtHandler();    
+    }
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventshandlerui/eventshandler/src/evthandlerclient.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,94 @@
+/*
+* 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:  Client for Events Handler Server
+*
+*/
+
+
+#include "evthandlerclientserver.h"
+#include "evthandlerclient.h"
+#include "evthandlerserverconsts.h"
+#include "evtdebug.h"
+
+// ----------------------------------------------------------------------------
+// StartServer()
+// ----------------------------------------------------------------------------
+//
+static TInt StartServer()
+/*
+ * Start the server process. Simultaneous launching
+ * of two such processes should be detected when the second one attempts to
+ * create the server object, failing with KErrAlreadyExists.
+ */
+	{
+	EVTUIDEBUG("+ StartServer()");
+	const TUidType serverUid( KNullUid, KNullUid, KServerUid3);
+	RProcess server;
+	TInt r = server.Create( KEvtHandlerServerImg, KNullDesC, serverUid );
+	if (r != KErrNone)
+		return r;
+	TRequestStatus stat;
+	server.Rendezvous(stat);
+	if (stat != KRequestPending)
+		server.Kill( 0 );		// abort startup
+	else
+		server.Resume();	// logon OK - start the server
+	User::WaitForRequest( stat );		// wait for start or death
+	// we can't use the 'exit reason' if the server panicked as this
+	// is the panic 'reason' and may be '0' which cannot be distinguished
+	// from KErrNone
+	r = ( server.ExitType() == EExitPanic ) ? KErrGeneral : stat.Int();
+	server.Close();
+	EVTUIDEBUG("- StartServer()");
+	return r;
+	}
+
+// ----------------------------------------------------------------------------
+// REvtHandlerSession::Connect()
+// ----------------------------------------------------------------------------
+//
+EXPORT_C TInt REvtHandlerSession::Connect()
+/*
+ * Connect to the server, attempting to start it if necessary
+ */
+	{
+	EVTUIDEBUG("+ REvtHandlerSession::Connect()");
+	TInt retry = 2;
+	for (;;)
+		{
+		TInt r = CreateSession( KEvtHandlerServerName, TVersion( 0, 0, 0), 1 );
+		if ( r != KErrNotFound && r != KErrServerTerminated )
+			return r;
+
+		if ( --retry == 0 )
+			return r;
+
+		r = StartServer();
+		if ( r !=KErrNone && r != KErrAlreadyExists )
+			return r;
+		}
+	}
+
+// ----------------------------------------------------------------------------
+// REvtHandlerSession::SendEventId()
+// ----------------------------------------------------------------------------
+//
+EXPORT_C TInt REvtHandlerSession::SendEventId( const TDesC& aMessage, const TInt aAccuracy )
+	{
+	EVTUIDEBUG("+ REvtHandlerSession::SendEventId()");
+
+	if ( aMessage.Length() > KMaxEvtHandlerMessage )
+		return KErrArgument;
+	return SendReceive( ESendEventId, TIpcArgs( &aMessage, aAccuracy )  );
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventshandlerui/eventshandlerapp/data/evthandlerapp.rss	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,84 @@
+/*
+* 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:  Resource file defintion for project Events Handler Application
+*
+*/
+
+
+//  RESOURCE IDENTIFIER
+NAME    EVHN // 4 letter ID
+
+//  SYSTEM INCLUDES
+#include <eikon.rh>
+#include <appinfo.rh>
+#include <avkon.rsg>
+#include <avkon.rh>
+#include <avkon.mbg>
+#include <bldvariant.hrh>
+#include <avkon.hrh>
+#include <avkon.loc>
+#include <data_caging_paths_strings.hrh>
+
+// USER INCLUDES
+#include <evtui.loc>
+
+// CONSTANT DEFINTIONS
+#define EVT_ICON_FILE_NAME APP_RESOURCE_DIR"\\evthandlerapp_aif.mif"
+
+//  RESOURCE DEFINITIONS 
+
+// ---------------------------------------------------------------------------
+// RESOURCE RSS_SIGNATURE 
+// ---------------------------------------------------------------------------
+//
+RESOURCE RSS_SIGNATURE 
+    {
+    }
+
+// ---------------------------------------------------------------------------
+// RESOURCE RSS_SIGNATURE 
+// ---------------------------------------------------------------------------
+//
+RESOURCE TBUF 
+    {
+    buf="evthandler";
+    }
+
+// ---------------------------------------------------------------------------
+// RESOURCE RSS_SIGNATURE 
+// ---------------------------------------------------------------------------
+//
+RESOURCE EIK_APP_INFO
+    {     
+    }
+
+
+RESOURCE LOCALISABLE_APP_INFO r_evthnd_localisable_app_info
+	{
+	short_caption = qtn_apps_locev_grid;
+	caption_and_icon = CAPTION_AND_ICON_INFO
+		{
+		caption = qtn_apps_locev_list;
+        number_of_icons = 1; 
+        icon_file = EVT_ICON_FILE_NAME;		
+		};
+	}
+    
+RESOURCE HOTKEYS r_evthandlerapp_hotkeys
+   {
+   control=
+        {
+        };
+    }
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventshandlerui/eventshandlerapp/data/evthandlerapp_reg.rss	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,50 @@
+/*
+* 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:  Application registration information file for Events Handler 
+*  				 Application
+*
+*/
+
+
+// SYSTEM INCLUDES
+#include <appinfo.rh>
+#include <data_caging_paths_strings.hrh>
+#include <evthandlerapp.rsg>
+
+// USER INCLUDES
+#include "../inc/evthandlerappuid.hrh"
+
+#define EVTHND_RESOURCE_FILE_NAME APP_RESOURCE_DIR"\\evthandlerapp"
+
+// ---------------------------------------------------------------------------
+// UID Defintions
+// ---------------------------------------------------------------------------
+//
+UID2 KUidAppRegistrationResourceFile
+UID3 KEvtHandlerAppUid
+
+// ---------------------------------------------------------------------------
+// Application Information registration resource
+// ---------------------------------------------------------------------------
+//
+RESOURCE APP_REGISTRATION_INFO
+    {    
+    app_file = "evthandlerapp";
+    hidden = KAppIsHidden;
+    embeddability = KAppEmbeddable;  
+    localisable_resource_file = EVTHND_RESOURCE_FILE_NAME;
+    localisable_resource_id = R_EVTHND_LOCALISABLE_APP_INFO;
+    }
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventshandlerui/eventshandlerapp/group/bld.inf	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,38 @@
+/*
+* 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:  Build information file for project Location Centre Application
+*
+*/
+
+
+// To get the APP_LAYER_PLATFORM_EXPORT_PATH macro definitions
+#include <platform_paths.hrh>
+
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_EXPORTS
+
+PRJ_MMPFILES
+// Location Centre Application Project defintion file.
+evthandlerapp.mmp
+
+PRJ_TESTMMPFILES
+
+PRJ_EXTENSIONS
+START EXTENSION s60/mifconv
+OPTION TARGETFILE evthandlerapp_aif.mif
+OPTION SOURCES -c32 qgn_menu_locev.svg
+END
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventshandlerui/eventshandlerapp/group/evthandlerapp.mmp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,68 @@
+/*
+* 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:  Project definition file for project Events Handler Application
+*
+*/
+
+
+// SYSTEM INCLUDES
+#include <platform_paths.hrh> // For the APP_LAYER_SYSTEMINCLUDE
+#include <data_caging_paths.hrh>
+
+// USER INCLUDES
+#include "../inc/evthandlerappuid.hrh"
+
+TARGET          evthandlerapp.exe
+TARGETTYPE      exe
+UID             0x100039ce KEvtHandlerAppUid
+
+VERSION         1.0
+
+VENDORID        VID_DEFAULT
+CAPABILITY      CAP_APPLICATION TrustedUI
+
+SOURCEPATH      ../src
+SOURCE          evthandlerapp.cpp
+SOURCE          evthandlerappdocument.cpp
+SOURCE          evthandlerappui.cpp
+SOURCE          evtdlglauncher.cpp
+SOURCE          evtrequest.cpp
+
+USERINCLUDE     ../inc
+USERINCLUDE     ../../inc
+USERINCLUDE 	../../../inc
+
+SOURCEPATH      ../data 
+START RESOURCE  evthandlerapp.rss
+HEADER
+TARGETPATH      APP_RESOURCE_DIR
+LANGUAGE_IDS
+END
+
+START RESOURCE evthandlerapp_reg.rss
+DEPENDS evthandlerapp.rsg
+TARGETPATH /private/10003a3f/apps
+END
+
+APP_LAYER_SYSTEMINCLUDE
+
+LIBRARY         euser.lib 
+LIBRARY         apparc.lib 
+LIBRARY         cone.lib 
+LIBRARY         eikcore.lib 
+LIBRARY         avkon.lib apgrfx.lib ws32.lib
+LIBRARY         evtengine.lib evtutils.lib
+LIBRARY         evteditor.lib
+LIBRARY         NpdLib.lib // Notepad libraries
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventshandlerui/eventshandlerapp/inc/evtdlglauncher.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,155 @@
+/*
+* 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:  Events Dialog Launcher.
+*
+*/
+
+
+#ifndef C_EVTDLGLAUNCHER_H
+#define C_EVTDLGLAUNCHER_H
+
+// System Includes
+#include <e32base.h>
+
+#include "evtmgmtuiengine.h"
+#include "evtdefs.h"
+
+// Forward Declarations
+class CEvtEventsDlg;
+class CEvtRequest;	
+
+/**
+ * Events Dialog Exit Handler.
+ * 
+ * @since v5.0 
+ */
+class MEvtDlgObserver
+    {
+public:
+    /**
+     * It will be used to notify observer that event editor is 
+     * dismissed         
+     */    
+    virtual void NotifyDlgDismissedL() = 0;
+    };
+
+/**
+ *  Interface class to Handle the Event's Dialog launching Request.
+ *  This class allows for 
+ *  1. launching of an event viewer dialog.
+ *  2. launching of Notepad Editor for Viewing description.
+ *  3. Cancelling of any outstanding Dialogs
+ *
+ *  @lib 
+ *  @since S60 v9.1
+ */
+class CEvtDlgLauncher : public CActive,
+                              public MEvtMgmtUiEngineObserver
+{
+public:
+    /**
+     * Constructs a new instance of Dialog Launcher.
+     *
+     * @return The new instance of Dialog Launcher object.
+     * @leave System wide error code if the object creation fails.         
+     */
+    IMPORT_C static CEvtDlgLauncher* NewL( CEvtMgmtUiEngine& aEngine, MEvtDlgObserver& aObserver );
+    
+    /**
+     * Constructs a new instance of Dialog Launcher.
+     * Leaves the created instance on the cleanup stack.
+     *
+     * @return The new instance of Dialog Launcher object.
+     * @leave System wide error code if the object creation fails.         
+     */
+    IMPORT_C static CEvtDlgLauncher* NewLC( CEvtMgmtUiEngine& aEngine, MEvtDlgObserver& aObserver );  
+
+    /**
+    * Destructor.
+    */
+    virtual ~CEvtDlgLauncher();
+
+public:  // Public Functions	
+    /**
+     * Launch the dialog for the given Event Request.
+     *
+     * @since S60 v9.1  
+     * @param[in] aRequest Event Request
+     * @leave System wide Leave error code.
+     */
+	void LaunchDlgL( CEvtRequest& aRequest );
+	
+    /**
+     * Cancel the currently open dialog.
+     *
+     * @since S60 v9.1  
+     * @leave System wide Leave error code.
+     */
+	void CancelDlgL( TBool aIsForcedCancel );
+
+    /**
+     * Inherited from MEvtMgmtUiEngineObserver
+     */
+    void NotifyEventChangeL(TInt aErrorCode, TInt aState );
+    
+    /**
+     * Inherited from MEvtMgmtUiEngineObserver
+     */
+    void NotifyModelChangeL();
+    
+private: // Inherited from CActive
+    virtual void RunL();
+    
+    virtual void DoCancel();
+    
+    virtual TInt RunError( TInt aError ); 
+
+private: 
+
+    /**
+     * Default C++ Constructor.
+     */
+	CEvtDlgLauncher( CEvtMgmtUiEngine& aEngine, MEvtDlgObserver& aObserver );
+
+    /**
+     * Second phase of the two phase constructor.
+     */
+    void ConstructL();
+    
+private: // data
+
+    /**
+     * Observer for Dialog Exit
+     */ 
+     MEvtDlgObserver& iObserver;
+     
+    /**
+     * Events Engine
+     */
+    CEvtMgmtUiEngine& iEngine;
+    
+    /**
+     * Event for which the Dialog has to be launched
+     * Not owned
+     */
+    CEvtRequest* iRequest;
+    
+    /**
+     * Dialog Launcher for Editing the Events.
+     */
+    CEvtEventsDlg* iDialog;
+        
+};
+
+#endif C_EVTDLGLAUNCHER_H
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventshandlerui/eventshandlerapp/inc/evthandlerapp.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,49 @@
+/*
+* 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:  Application class for Events Handler Application.
+*
+*/
+
+
+#ifndef C_EVTHANDLERAPP_H
+#define C_EVTHANDLERAPP_H
+
+// SYSTEM INCLUDES
+#include <aknapp.h>
+
+/**
+ *  Events Handler App's App class. This class extents the CAknApplication
+ *  class for Events Handler Application.
+ *
+ *  @lib lcapp.exe
+ *  @since S60 v5.0
+ */	
+class CEvtHandlerApp : public CAknApplication
+	{
+private: // Inherited from Base classes
+	/**
+	 * Inherited from CAknApplication
+	 */ 
+    CApaDocument* CreateDocumentL();
+    
+	/**
+	 * Inherited from CAknApplication
+	 */         
+    TUid AppDllUid() const;
+    };
+
+#endif  // C_EVTHANDLERAPP_H
+
+// End of File
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventshandlerui/eventshandlerapp/inc/evthandlerappdocument.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,69 @@
+/*
+* 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:  Document class for Events Handler Application.
+*
+*/
+
+
+#ifndef C_EVTHANDLERAPPDOCUMENT_H
+#define C_EVTHANDLERAPPDOCUMENT_H
+
+// SYSTEM INCLUDES
+#include <AknDoc.h>
+
+// FORWARD DECLARATIONS
+class  CEikAppUi;
+
+/**
+ *  Events Handler App's document class.
+ *
+ *  @lib lcapp.exe
+ *  @since S60 v5.0
+ */
+class CEvtHandlerAppDocument : public CAknDocument
+    {
+public:
+	/**
+	 * Static Two phase constructor
+	 */
+    static CEvtHandlerAppDocument* NewL( CEikApplication&    aApp );
+
+  	/**
+  	 * Virtual destructor
+  	 */
+    virtual ~CEvtHandlerAppDocument();
+
+private:
+	/**
+	 * C++ Default constructor
+	 */
+    CEvtHandlerAppDocument( CEikApplication&     aApp );
+
+	/**
+	 * Second phase of the two phase constructor
+	 */
+    void ConstructL();
+
+private: // Inherited from Base class
+
+	/**
+	 * Inherited from CAknDocument
+	 */
+    CEikAppUi* CreateAppUiL();
+    };
+
+#endif  // C_EVTHANDLERAPPDOCUMENT_H
+
+// End of File
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventshandlerui/eventshandlerapp/inc/evthandlerappui.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,130 @@
+/*
+* 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:  Application class for Events Handler Application UI.
+*
+*/
+
+
+#ifndef C_EVTHANDLERAPPUI_H
+#define C_EVTHANDLERAPPUI_H
+
+// SYSTEM INCLUDES
+#include <eikapp.h>
+#include <eikdoc.h>
+#include <e32std.h>
+#include <coeccntx.h>
+#include <aknViewAppUi.h>
+
+#include "evtdlglauncher.h"	// Dialog Launcher
+#include "evtdefs.h"
+#include "evtrequesttype.h"
+
+// FORWARD DECLARATIONS
+class CEvtRequest;	
+class CEvtMgmtUiEngine;
+	
+/**
+ *  Events Handler Application's App UI class. This class extents the CAknAppUi
+ *  class for Events Handler Application.
+ *
+ *  @since S60 v5.0
+ */
+class CEvtHandlerAppUi : public CAknAppUi,
+                 public MEvtDlgObserver
+    {
+public:   
+	/**
+	 * Second phase of the two phase constructor
+	 *
+	 * Called by the Application framework
+	 */ 
+    void ConstructL();
+  
+  	/**
+  	 * Virtual destructor
+  	 */
+    virtual ~CEvtHandlerAppUi();   
+  
+public: // Inherited from Base classes
+
+  	/**
+  	 * Inherited from CAknViewAppUi
+  	 */
+    void HandleCommandL(TInt aCommand);
+        
+    /**
+     * Inherited from MEvtDlgObserver
+     */
+    void NotifyDlgDismissedL( );
+                       
+private: // Inherited from Base classes
+
+  	/**
+  	 * Inherited from CAknViewAppUi
+  	 */
+    virtual TKeyResponse HandleKeyEventL( const TKeyEvent& aKeyEvent,
+                                                TEventCode aType );
+                                                
+    /**
+     * Inherited from EEikAppUi
+     */  
+	TBool ProcessCommandParametersL( CApaCommandLine &aCommandLine );
+	
+    /**
+     * Inherited from EEikAppUi
+     */  
+	void HandleWsEventL(const TWsEvent &aEvent, CCoeControl *aDestination);
+	
+    /**
+     * Inherited from EEikAppUi
+     */                                                
+    void ProcessMessageL( TUid aUid, 
+                          const TDesC8& aParams );   
+	
+    /**
+     * Method to handle the Next Message in the Queue
+     */                                 
+	void HandleNextMessageL( );
+	
+    /**
+     * Method to handle the Recieved message
+     */                                           
+	void HandleRecievedMessageL( const TLbtTriggerId &  aTriggerId, 
+                      TEvtRequestType aReqestType );
+                           
+private:
+    /**
+     * Events Engine
+     */
+    CEvtMgmtUiEngine* iEngine;
+    
+	/**
+	 * Generic Dialog Launcher for Events
+	 */       
+    CEvtDlgLauncher*    		iDlg;
+    
+	/**
+	 * Stack which maitains the requests for Events
+	 */       
+    RPointerArray<CEvtRequest>   iEventQue;
+    
+	/**
+	 * Flag to maintain the Frameworks's Cancel method.
+	 */       
+    TBool iFlag;
+    };
+
+#endif  // C_EVTHANDLERAPPUI_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventshandlerui/eventshandlerapp/inc/evthandlerappuid.hrh	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,27 @@
+/*
+* 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:  UID Defintions for Events Handler Application.
+*
+*/
+
+
+#ifndef EVTHANDLERAPPUID_HRH
+#define EVTHANDLERAPPUID_HRH
+
+/**
+ * Application UID Definitions for Events Handler Application
+ */
+#define KEvtHandlerAppUid    			0x2001E668
+
+#endif //EVTHANDLERAPPUID_HRH
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventshandlerui/eventshandlerapp/inc/evtrequest.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,130 @@
+/*
+* 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:  Container for Request and Type.
+*
+*/
+
+
+#ifndef C_EVTREQUEST_H
+#define C_EVTREQUEST_H
+
+// System Includes
+#include <e32base.h>
+
+// User Includes
+#include "evtrequesttype.h"
+#include "evtevent.h"
+
+/**
+ *  @class CEvtRequest
+ *  A class that encapsulates all the Ui Requests from Handler Server.
+ *
+ *  This class is used to store information about Ui Request type.
+ *
+ *  @since S60 v9.1
+ */
+class CEvtRequest : public CBase
+    {
+public:  
+    /**
+     * Constructs a new instance of CEvtRequest.
+     *
+     * @return The new instance of CEvtRequest object.
+     * @leave System wide error code if the object creation fails.         
+     */
+    IMPORT_C static CEvtRequest* NewL();
+    
+    /**
+     * Constructs a new instance of CEvtRequest Object.
+     * Leaves the created instance on the cleanup stack.
+     *
+     * @return The new instance of CEvtRequest object.
+     * @leave System wide error code if the object creation fails.         
+     */
+    IMPORT_C static CEvtRequest* NewLC();  
+
+    /**
+    * Destructor.
+    */
+    virtual ~CEvtRequest();
+
+public: // Get and Set methods
+    
+    /**
+     * Event object for which we have got request.
+     * This Ownership is NOT transferred.   
+     *
+     * @since S60 v9.1     
+     * @return Event identifier identifying the Location Event.
+     */
+    IMPORT_C CEvtEvent& Event();
+ 
+    /**
+     * Set the Event Object for which the request has come. The
+     * ownership of the aEvent will resides with CEvtRequest.
+     *
+     * @since S60 v9.1   
+     * @param[in] aEvent Event object.
+     */
+    IMPORT_C void SetEventL( CEvtEvent* aEvent );
+    
+    /**
+     * Gets the Type of Ui request associated with Event.
+     *
+     * @since S60 v9.1    
+     * @return TEvtRequestType Type of Request.
+     */
+    IMPORT_C TEvtRequestType RequestType() const;
+
+    /** 
+     * Sets the type of the request associated with Event.
+     *
+     * @since S60 v9.1  
+     * @param[in] aRequestType Type of Ui Request. 
+     */
+    IMPORT_C void SetRequestType( 
+                            const TEvtRequestType aRequestType );
+
+private: // methods
+    /**
+     * Default C++ Constructor.
+     */
+    CEvtRequest();
+    
+    /**
+     * Default Copy Constructor.
+     */
+    CEvtRequest(CEvtRequest& );
+
+    /**
+     * Second phase of the two phase constructor.
+     */
+    void ConstructL();
+
+private: // data
+	    
+	/**
+	 * Event Object.
+	 * Owned.
+	 */
+	CEvtEvent*				        iEvent;
+    
+	/**
+	 * Request Type.
+	 */
+	TEvtRequestType					iRequestType;
+
+    };
+
+#endif // C_EVTREQUEST_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventshandlerui/eventshandlerapp/inc/evtrequesttype.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,41 @@
+/*
+* 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:  Header file that holds all the Request type.
+*
+*/
+
+
+#ifndef EVTREQUESTTYPE_H
+#define EVTREQUESTTYPE_H
+
+// constants go here
+/**
+ * @enum TEvtRequestType
+ * Type of Request that will be communicated to the Ui App.
+ *
+ */
+enum TEvtRequestType
+    {
+    /**
+     * The Request to Display Editor
+     */
+    ERequestEditor                                = 6000,
+    
+    /**
+     * The Request to Display Notepad
+     */
+    ERequestNotepad
+    };
+
+#endif // EVTREQUESTTYPE_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventshandlerui/eventshandlerapp/src/evtdlglauncher.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,198 @@
+/*
+* 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:  Events Dialog Launcher.
+*
+*/
+
+
+// System Includes
+#include <e32base.h>
+#include <eikenv.h>
+#include <eikappui.h>
+#include <NpdApi.h>					// Notepad
+#include <avkon.hrh>	
+
+// User Includes
+#include "evtdlglauncher.h"
+#include "evteventsdlg.h"
+#include "evtrequest.h"
+
+// ================ Member funtions for CEvtDlgLauncher class ===============
+
+// ---------------------------------------------------------------------------
+// CEvtDlgLauncher::CEvtDlgLauncher
+// ---------------------------------------------------------------------------
+//
+CEvtDlgLauncher::CEvtDlgLauncher( CEvtMgmtUiEngine& aEngine, MEvtDlgObserver& aObserver ):
+							CActive( EPriorityStandard ),iObserver(aObserver),iEngine(aEngine)
+	{
+	}
+
+// ---------------------------------------------------------------------------
+// CEvtDlgLauncher::~CEvtDlgLauncher
+// ---------------------------------------------------------------------------
+//
+CEvtDlgLauncher::~CEvtDlgLauncher()
+	{
+    CActive::Cancel();
+    iEngine.RemoveObserver(this);
+	}
+	
+// ---------------------------------------------------------------------------
+// CEvtDlgLauncher::NewL
+// ---------------------------------------------------------------------------
+//
+CEvtDlgLauncher* CEvtDlgLauncher::NewL( CEvtMgmtUiEngine& aEngine, MEvtDlgObserver& aObserver )
+    {
+	CEvtDlgLauncher* self = NewLC( aEngine, aObserver );
+	CleanupStack::Pop( self );
+	return self;
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtDlgLauncher::NewLC
+// ---------------------------------------------------------------------------
+//
+CEvtDlgLauncher* CEvtDlgLauncher::NewLC( CEvtMgmtUiEngine& aEngine, MEvtDlgObserver& aObserver )
+    {
+	CEvtDlgLauncher* self = new ( ELeave )CEvtDlgLauncher( aEngine, aObserver );
+	CleanupStack::PushL( self );
+	self->ConstructL( );
+	return self;
+    } 
+
+// ---------------------------------------------------------------------------
+// CEvtDlgLauncher::ConstructL
+// ---------------------------------------------------------------------------
+//
+void CEvtDlgLauncher::ConstructL()
+    {
+    // Add the object to the Active scheduler
+    CActiveScheduler::Add( this );
+    iEngine.SetObserver(this);
+    }
+    
+// ---------------------------------------------------------------------------
+// void CEvtDlgLauncher::RunL()
+// ---------------------------------------------------------------------------
+//                             
+void CEvtDlgLauncher::RunL()
+    {
+    switch( iRequest->RequestType() )
+    	{
+    	case ERequestEditor:
+    		{
+		    iDialog = CEvtEventsDlg::NewL( 
+		    	EFalse, 
+		    	iRequest->Event(),  
+		    	iEngine, EFalse );            
+		     
+		    iDialog->ExecuteLD( );
+            iObserver.NotifyDlgDismissedL();
+            
+    		break;
+    		}
+    	case ERequestNotepad:        
+	    	{
+	    	TInt ret = CNotepadApi::ExecReadOnlyTextViewerL( iRequest->Event().Description(), iRequest->Event().Subject(), KNullDesC );
+		    if( !ret )
+	            {
+	            iObserver.NotifyDlgDismissedL();
+	            }
+    		break;
+    		}
+    	default:
+    		break;
+    	}
+    }
+    
+// ---------------------------------------------------------------------------
+// void CEvtDlgLauncher::DoCancel()
+// ---------------------------------------------------------------------------
+// 
+void CEvtDlgLauncher::DoCancel()
+    {
+    }
+
+// ---------------------------------------------------------------------------
+// TInt CEvtDlgLauncher::RunError()
+// ---------------------------------------------------------------------------
+//    
+TInt CEvtDlgLauncher::RunError( TInt aError )
+	{
+	return CActive::RunError( aError );	
+	}
+	
+// ---------------------------------------------------------------------------
+// CEvtDlgLauncher::LaunchEventDlg
+// ---------------------------------------------------------------------------
+//
+void CEvtDlgLauncher::LaunchDlgL( CEvtRequest& aRequest )
+	{
+    if ( IsActive( ) )
+        {
+        User::Leave ( KErrInUse );
+        }
+    
+    iRequest = &aRequest;
+    
+    TRequestStatus* status = &iStatus;
+    SetActive();    
+    User::RequestComplete( status, KErrNone );
+
+	}
+
+// ---------------------------------------------------------------------------
+// CEvtDlgLauncher::CancelDlgL
+// ---------------------------------------------------------------------------
+//
+void CEvtDlgLauncher::CancelDlgL( TBool aIsForcedCancel )
+	{
+	// We have to dismiss any Dialog which is launched on top of Editor
+	// So are looking for dismiss.
+	if( iDialog )
+		{
+	    delete iDialog;
+	    iDialog = NULL;	
+		}
+	if( aIsForcedCancel )
+		{
+	    TKeyEvent key;
+	    key.iCode = EKeyEscape;
+	    key.iModifiers = 0;
+	    CEikonEnv::Static()->SimulateKeyEventL( key, EEventKey );
+		}
+    CActive::Cancel();
+	}
+		
+// ---------------------------------------------------------------------------
+// CEvtDlgLauncher::NotifyEventChangeL()
+// Derived from MEvtMgmtUiEngineObserver
+// ---------------------------------------------------------------------------
+//
+void CEvtDlgLauncher::NotifyEventChangeL(TInt /*aErrorCode*/, TInt /*aState */)
+    {
+    // Not needed     
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtDlgLauncher::NotifyModelChangeL()
+// Derived from MEvtMgmtUiEngineObserver
+// ---------------------------------------------------------------------------
+//
+void CEvtDlgLauncher::NotifyModelChangeL()
+    {
+    // Not needed 
+    }  
+    
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventshandlerui/eventshandlerapp/src/evthandlerapp.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,70 @@
+/*
+* 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:  App class for Events Handler Application UI.
+*
+*/
+
+
+// SYSTEM INCLUDES
+#include <eikstart.h>
+
+// USER INCLUDES
+#include "evthandlerapp.h"
+#include "evthandlerappdocument.h"
+#include "evthandlerappuid.hrh"
+
+// ------------------------ Local Functions ----------------------------------
+
+// ---------------------------------------------------------------------------
+// CApaApplication* NewApplication
+// ---------------------------------------------------------------------------
+//
+LOCAL_C CApaApplication* NewApplication()
+    {
+    return new CEvtHandlerApp;
+    }
+
+// ----------------- Member funtions for CEvtHandlerApp-----------------------
+	
+// ---------------------------------------------------------------------------
+// TUid CEvtHandlerApp::AppDllUid
+// ---------------------------------------------------------------------------
+//
+TUid CEvtHandlerApp::AppDllUid() const
+    {
+    return TUid::Uid( KEvtHandlerAppUid );
+    }
+
+// ---------------------------------------------------------------------------
+// CApaDocument* CEvtHandlerApp::CreateDocumentL
+// ---------------------------------------------------------------------------
+//
+CApaDocument* CEvtHandlerApp::CreateDocumentL()
+    {
+    return CEvtHandlerAppDocument::NewL( *this );
+    }
+
+// ------------------------ Global Functions ----------------------------------
+
+// ---------------------------------------------------------------------------
+// TInt E32Main
+// ---------------------------------------------------------------------------
+//
+GLDEF_C TInt E32Main()
+    {
+    return EikStart::RunApplication( NewApplication );
+    }
+
+// End of File  
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventshandlerui/eventshandlerapp/src/evthandlerappdocument.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,73 @@
+/*
+* 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:  Document class for Events Handler Application.
+*
+*/
+
+
+// INCLUDE FILES
+#include "evthandlerappdocument.h"
+#include "evthandlerappui.h"
+
+// ----------------- Member funtions for CEvtHandlerAppDocument class ---------
+
+// ---------------------------------------------------------------------------
+// CEvtHandlerAppDocument::CEvtHandlerAppDocument
+// ---------------------------------------------------------------------------
+//
+CEvtHandlerAppDocument::CEvtHandlerAppDocument( CEikApplication&  aApp )
+	:CAknDocument( aApp )    
+    {
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtHandlerAppDocument::~CEvtHandlerAppDocument
+// ---------------------------------------------------------------------------
+//
+CEvtHandlerAppDocument::~CEvtHandlerAppDocument()
+    { 
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtHandlerAppDocument* CEvtHandlerAppDocument::NewL
+// ---------------------------------------------------------------------------
+//
+CEvtHandlerAppDocument* CEvtHandlerAppDocument::NewL( CEikApplication&    aApp )     
+    {
+    CEvtHandlerAppDocument* self = new (ELeave) CEvtHandlerAppDocument( aApp );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop();
+    
+    return self;
+    }
+    
+// ---------------------------------------------------------------------------
+// CEvtHandlerAppDocument::ConstructL
+// ---------------------------------------------------------------------------
+//
+void CEvtHandlerAppDocument::ConstructL()
+    {
+    }
+    
+// ---------------------------------------------------------------------------
+// CEvtHandlerAppDocument::CEvtHandlerAppDocument
+// ---------------------------------------------------------------------------
+//    
+CEikAppUi* CEvtHandlerAppDocument::CreateAppUiL()
+    {
+    return new (ELeave) CEvtHandlerAppUi;
+    }
+
+// End of File  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventshandlerui/eventshandlerapp/src/evthandlerappui.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,250 @@
+/*
+* 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:  Application class for Events Handler Application UI.
+*
+*/
+
+
+// SYSTEM FILES
+#include <avkon.hrh>
+#include <AknsConstants.h>
+#include <aknnotewrappers.h>
+#include <textresolver.h>
+
+// USER INCLUDES
+#include "evthandlerappui.h"
+#include "evtrequest.h"
+#include "evtmgmtuiengine.h"
+#include "evtdebug.h"
+
+// ----------------- Member funtions for CEvtHandlerAppUi --------------------
+
+// ---------------------------------------------------------------------------
+// void CEvtHandlerAppUi::ConstructL
+// ---------------------------------------------------------------------------
+//
+void CEvtHandlerAppUi::ConstructL()
+    {
+    BaseConstructL( EAknEnableSkin | EAknEnableMSK ); 
+    iEngine = CEvtMgmtUiEngine::NewL(); 
+    iDlg = CEvtDlgLauncher::NewL( *iEngine, *this ); 
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtHandlerAppUi::~CEvtHandlerAppUi
+// ---------------------------------------------------------------------------
+//
+CEvtHandlerAppUi::~CEvtHandlerAppUi()
+    {	
+    delete iDlg;
+    iEventQue.ResetAndDestroy();
+	iEventQue.Close();
+   	delete iEngine;
+    }
+
+// ---------------------------------------------------------------------------
+// TKeyResponse CEvtHandlerAppUi::HandleKeyEventL
+// ---------------------------------------------------------------------------
+//
+TKeyResponse CEvtHandlerAppUi::HandleKeyEventL( const TKeyEvent& /*aKeyEvent*/,
+                                              TEventCode /*aType*/ )
+    {
+    return EKeyWasNotConsumed;
+    }
+
+// ---------------------------------------------------------------------------
+// void CEvtHandlerAppUi::HandleCommandL
+// ---------------------------------------------------------------------------
+//
+void CEvtHandlerAppUi::HandleCommandL( TInt aCommand )
+    {
+    switch ( aCommand )
+        {
+        case EAknSoftkeyExit: 
+        case EEikCmdExit:
+            {
+            Exit();
+            break;
+            }
+       default: 
+       	    { 	          	           	    
+       	    break; 
+       	    }
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// void CEvtHandlerAppUi::HandleWsEventL
+// ---------------------------------------------------------------------------
+// 	
+void CEvtHandlerAppUi::HandleWsEventL(const TWsEvent &aEvent, CCoeControl* aDestination)
+	{
+	TInt eventType = aEvent.Type();
+	switch ( eventType )
+		{
+		case EEventKey:
+			{
+			// Handle Key Escape key.
+			if( aEvent.Key()->iCode == EKeyEscape  )
+				{
+				if( !iFlag )
+					iFlag = ETrue;	
+				else
+					iFlag = EFalse;
+	    		iDlg->CancelDlgL( EFalse );
+				}
+			break;
+			}
+		case KAknUidValueEndKeyCloseEvent:
+			{
+			// Handle End key.
+			if( iDlg )
+				{
+				EVTUIDEBUG("= CEvtHandlerAppUi::HandleWsEventL() - End Key");
+				// Construct the TApaTask object.
+				TApaTask task(iEikonEnv->WsSession( ));
+				task.SetWgId(CEikonEnv::Static()->RootWin().Identifier());
+				task.BringToForeground();
+				
+				// We Cancel any outstanding Dialog.
+				iFlag = ETrue;
+	    		iDlg->CancelDlgL( ETrue );
+				return;
+				}
+			break;
+			}
+		default:
+		break;
+		}
+		
+	return CEikAppUi::HandleWsEventL( aEvent, aDestination );
+	}
+	
+// ---------------------------------------------------------------------------
+// void CEvtHandlerAppUi::NotifyDlgDismissedL
+// ---------------------------------------------------------------------------
+//    
+void CEvtHandlerAppUi::NotifyDlgDismissedL( )
+	{	
+	if( !iFlag )
+		{
+		EVTUIDEBUG1("+ CEvtHandlerAppUi::NotifyDlgDismissedL() - %d", iEventQue[0]->Event().EventId());
+		CEvtRequest* evtReq = iEventQue[0];
+		iEventQue.Remove( 0 );
+		delete evtReq;
+		if( iEventQue.Count() == 0 )
+			{
+			Exit();	
+			}
+		
+		HandleNextMessageL( );
+		EVTUIDEBUG("- CEvtHandlerAppUi::NotifyDlgDismissedL()");
+		}
+	}
+	
+// ---------------------------------------------------------------------------
+// void CEvtHandlerAppUi::ProcessCommandParametersL
+// ---------------------------------------------------------------------------
+//
+TBool CEvtHandlerAppUi::ProcessCommandParametersL( CApaCommandLine &aCommandLine )
+	{
+	EVTUIDEBUG("+ CEvtHandlerAppUi::ProcessCommandParametersL()");
+	// Process Command Parameters
+
+    TBuf8<128> temp;
+	temp.Copy(aCommandLine.TailEnd()); 
+        
+    TLex8 input( temp );
+    
+    TEvtEventId triggerId(0);
+    TInt type(0);
+
+    User::LeaveIfError( input.Val(triggerId, EDecimal) );
+    input.Inc();
+    User::LeaveIfError( input.Val(type) );
+    
+    HandleRecievedMessageL(triggerId, static_cast<TEvtRequestType>(type));
+
+	EVTUIDEBUG("- CEvtHandlerAppUi::ProcessCommandParametersL()");
+	return CEikAppUi::ProcessCommandParametersL( aCommandLine );
+	}
+
+// ---------------------------------------------------------------------------
+// void CEvtHandlerAppUi::ProcessMessageL
+// ---------------------------------------------------------------------------
+//	
+void CEvtHandlerAppUi::ProcessMessageL( TUid /*aUid*/, 
+                      const TDesC8& aParams )
+    {
+	EVTUIDEBUG("+ CEvtHandlerAppUi::ProcessMessageL()");
+    TBuf8<128> temp;
+    temp.Copy( aParams );   
+        
+    TLex8 input( temp );
+    
+    TEvtEventId triggerId(0);
+    TInt type(0);
+
+    User::LeaveIfError( input.Val(triggerId, EDecimal) );
+    input.Inc();
+    User::LeaveIfError( input.Val(type) );
+    
+    HandleRecievedMessageL(triggerId, static_cast<TEvtRequestType>(type));
+    
+	EVTUIDEBUG("- CEvtHandlerAppUi::ProcessMessageL()");
+    }
+
+// ---------------------------------------------------------------------------
+// void CEvtHandlerAppUi::HandleRecievedMessageL
+// ---------------------------------------------------------------------------
+//	
+void CEvtHandlerAppUi::HandleRecievedMessageL( const TLbtTriggerId &  aTriggerId, 
+                      TEvtRequestType aReqestType )
+    {
+	EVTUIDEBUG2("+ CEvtHandlerAppUi::HandleRecievedMessageL() - Id:%d, Type:%d", aTriggerId, aReqestType );
+    
+	// We first update the Trigger state.
+	iEngine->HandleFiredTriggerStateL( aTriggerId );
+	
+    CEvtRequest* evtReq = CEvtRequest::NewL();
+    CEvtEvent* evt = iEngine->EventL( aTriggerId );
+    evtReq->SetEventL( evt );
+    evtReq->SetRequestType( aReqestType );
+    iEventQue.Insert(evtReq, 0);
+	
+	iFlag = ETrue;
+	iDlg->CancelDlgL( ETrue );
+	HandleNextMessageL( );
+	
+	EVTUIDEBUG("- CEvtHandlerAppUi::HandleRecievedMessageL()");
+    }
+
+// ---------------------------------------------------------------------------
+// void CEvtHandlerAppUi::HandleNextMessageL
+// ---------------------------------------------------------------------------
+//	
+void CEvtHandlerAppUi::HandleNextMessageL( )
+    {
+	EVTUIDEBUG("+ CEvtHandlerAppUi::HandleNextMessageL()");
+	if( iEventQue.Count() > 0 )
+		{
+		EVTUIDEBUG1("= CEvtHandlerAppUi::HandleNextMessageL() - TriggerId:%d", iEventQue[0]->Event().EventId() );
+	    CEvtRequest* evtReq = iEventQue[0];
+	    iFlag = EFalse;
+	    iDlg->LaunchDlgL( *evtReq );
+		}
+	EVTUIDEBUG("- CEvtHandlerAppUi::HandleNextMessageL()");
+    }
+                          	
+// End of File  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventshandlerui/eventshandlerapp/src/evtrequest.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,111 @@
+/*
+* 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:  Container for Request and Type.
+*
+*/
+
+
+// System Includes
+
+// User Includes
+#include "evtrequest.h"
+
+// ================ Member funtions for CEvtRequest class ======================
+
+// ---------------------------------------------------------------------------
+// CEvtRequest::CEvtRequest
+// ---------------------------------------------------------------------------
+//
+CEvtRequest::CEvtRequest():
+	iEvent( NULL )
+    {    
+    }
+    
+// ---------------------------------------------------------------------------
+// CEvtRequest::~CEvtRequest
+// ---------------------------------------------------------------------------
+//
+CEvtRequest::~CEvtRequest()
+    {
+    delete iEvent;
+    } 
+    
+// ---------------------------------------------------------------------------
+// CEvtRequest::NewL
+// ---------------------------------------------------------------------------
+//
+EXPORT_C CEvtRequest* CEvtRequest::NewL()
+    {
+	CEvtRequest* self = NewLC( );
+	CleanupStack::Pop( self );
+	return self;
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtRequest::NewLC
+// ---------------------------------------------------------------------------
+//
+EXPORT_C CEvtRequest* CEvtRequest::NewLC()
+    {
+	CEvtRequest* self = new ( ELeave )CEvtRequest( );
+	CleanupStack::PushL( self );
+	self->ConstructL( );
+	return self;
+    } 
+
+// ---------------------------------------------------------------------------
+// CEvtRequest::ConstructL
+// ---------------------------------------------------------------------------
+//
+EXPORT_C void CEvtRequest::ConstructL()
+    {
+    }
+    
+// ---------------------------------------------------------------------------
+// CEvtRequest::Action
+// ---------------------------------------------------------------------------
+//
+CEvtEvent& CEvtRequest::Event()
+    {
+    return *iEvent;
+    } 
+    
+// ---------------------------------------------------------------------------
+// CEvtRequest::SetActionL
+// ---------------------------------------------------------------------------
+//
+void CEvtRequest::SetEventL( CEvtEvent* aEvent )
+    {
+    iEvent = aEvent;
+    } 
+    
+// ---------------------------------------------------------------------------
+// CEvtRequest::EventId
+// ---------------------------------------------------------------------------
+//
+EXPORT_C TEvtRequestType CEvtRequest::RequestType() const
+    {
+    return iRequestType;
+    } 
+    
+// ---------------------------------------------------------------------------
+// CEvtRequest::SetEventId
+// ---------------------------------------------------------------------------
+//
+EXPORT_C void CEvtRequest::SetRequestType( const TEvtRequestType aRequestType )
+    {
+    iRequestType = aRequestType;
+    } 
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventshandlerui/eventshandlerserver/group/bld.inf	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,36 @@
+/*
+* 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:  Build information file for project Events Handler UI.
+*
+*/
+
+
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_EXPORTS
+
+PRJ_EXTENSIONS
+START EXTENSION s60/mifconv
+OPTION TARGETFILE evthandlerserver.mif
+OPTION HEADERFILE evthandlerserver.mbg
+OPTION SOURCES -c32,8 qgn_note_locev_alarm_inacc_heavy.svg -c32,8 qgn_note_locev_alarm_inacc.svg -c32,8 qgn_note_locev_alarm_acc.svg
+END
+
+PRJ_MMPFILES
+evthandlerserver.mmp
+
+PRJ_TESTMMPFILES
+
+PRJ_TESTEXPORTS
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventshandlerui/eventshandlerserver/group/evthandlerserver.mmp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,78 @@
+/*
+* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Project definition file for project Events Management UI
+*                Application
+*
+*/
+
+
+// SYSTEM INCLUDES
+#include <platform_paths.hrh> // For the APP_LAYER_SYSTEMINCLUDE
+#include <data_caging_paths.hrh>
+
+
+TARGET          evthandlerserver.exe
+TARGETTYPE      exe
+
+UID             0 0x2001E669
+
+VERSION         1.0
+
+VENDORID        VID_DEFAULT
+CAPABILITY      CAP_SERVER
+
+APP_LAYER_SYSTEMINCLUDE
+
+USERINCLUDE     ../inc
+USERINCLUDE     ../../inc
+USERINCLUDE     ../../../inc
+USERINCLUDE     ../../eventsnotifier/inc
+USERINCLUDE     ../../eventshandlerapp/inc
+
+SOURCEPATH      ../src
+
+SOURCE          evthandlerserverstartup.cpp
+SOURCE          evthandlershutdowntimer.cpp
+SOURCE          evthandlerserver.cpp
+SOURCE          evthandlerserversession.cpp
+SOURCE          evtnotifierhandler.cpp
+SOURCE          evtglobalquery.cpp
+SOURCE          evtserverappui.cpp evtserverappdocument.cpp evtserverapp.cpp
+SOURCE          evtsnoozehandler.cpp
+
+LIBRARY         euser.lib 
+LIBRARY 		aknnotify.lib eiksrv.lib    //CAknGlobalNote 
+LIBRARY         apgrfx.lib
+LIBRARY         apparc.lib
+LIBRARY         bafl.lib
+LIBRARY         avkon.lib
+LIBRARY         cone.lib 
+LIBRARY         eikcore.lib
+LIBRARY         efsrv.lib
+LIBRARY         eikdlg.lib
+LIBRARY         estor.lib
+LIBRARY        	ws32.lib
+LIBRARY         eikcoctl.lib
+LIBRARY         egul.lib
+LIBRARY         fbscli.lib
+LIBRARY         aknicon.lib
+LIBRARY         eikcdlg.lib
+LIBRARY         eikctl.lib 
+LIBRARY         aknskins.lib aknskinsrv.lib aknswallpaperutils.lib
+LIBRARY         centralrepository.lib   // CRepository
+LIBRARY 		cenrepnotifhandler.lib	// CRepository Handler
+
+//eventsui libraries
+LIBRARY 		evtengine.lib
+LIBRARY         evtutils.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventshandlerui/eventshandlerserver/inc/evteventinfo.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,65 @@
+/*
+* 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:  event Info Struct
+*
+*/
+
+
+#ifndef C_EVTEVENTINFO_H
+#define C_EVTEVENTINFO_H
+
+#include <e32base.h>
+
+#include "evtdefs.h"
+
+/**
+*  Event Strucutre to Que.
+*
+*  @since Series 60 9.2
+*/
+class TEvtEventInfo
+    { 
+    public :        
+		/**
+        * Copy constructor
+        */
+        TEvtEventInfo(TEvtEventId aId, TEvtFireAccuracy aAcc, TBool aPlayTone, TBool aSnooze)
+	        {
+	        iEventId = aId;
+	        iAccuracy = aAcc;
+	        iPlayTone = aPlayTone;
+	        iSnooze = aSnooze;
+	        };
+			
+		/**
+        * inline function used for comparision
+        */
+        static inline TInt Match(const TEvtEventInfo& aFirst, const TEvtEventInfo& aSecond)
+            {
+            if (aFirst.iEventId == aSecond.iEventId)
+                return 1;
+            return 0;
+            };
+			
+    public :
+		// Event's Information like Event Id, Accuracy, Playtone and Snooze
+    	TEvtEventId iEventId;
+    	TEvtFireAccuracy iAccuracy;
+    	TBool iPlayTone;
+    	TBool iSnooze;
+ };
+
+#endif //C_EVTEVENTINFO_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventshandlerui/eventshandlerserver/inc/evtglobalquery.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,146 @@
+/*
+* 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:  Interface class for showing Events Global Query.
+*
+*/
+
+
+
+#ifndef EVTGLOBALQUERY_H
+#define EVTGLOBALQUERY_H
+ 
+// System Includes
+#include <e32base.h>  //CActive
+
+// User Includes
+#include "evttoneplayer.h"
+
+//Forward Declaration
+class CAknGlobalMsgQuery;
+class CEvtInfoNoteInputParam;
+class CEvtTonePlayer;
+class CEvtKeyLockHandler;
+
+// CLASS DECLARATION
+
+/**
+*  Global Query class which handles the pop up of the global query. 
+*
+*  @since Series 60 9.1
+*/
+class CEvtGlobalQuery : public CActive,
+						public MEvtTonePlayObserver
+    {
+	public:
+        /**
+        * Destructor
+        */
+	    IMPORT_C virtual ~CEvtGlobalQuery();
+		
+		/**
+		 * Constructs a new instance of Global Query.
+		 *
+		 * @return The new instance of Global Query object.
+		 * @leave System wide error code if the object creation fails.         
+		 */
+	    IMPORT_C static CEvtGlobalQuery* NewL( CEvtInfoNoteInputParam&      aInputParam );
+		
+	    /**
+	     * Constructs a new instance of Global Query.
+	     * Leaves the created instance on the cleanup stack.
+	     *
+	     * @return The new instance of Global Query object.
+	     * @leave System wide error code if the object creation fails.         
+	     */
+	    IMPORT_C static CEvtGlobalQuery* NewLC( CEvtInfoNoteInputParam&      aInputParam );   
+		
+	public: 
+	    /**
+	     * Starts the Global Query.
+	     *
+	     * @since S60 v9.1  
+	     * @param[in] aStatus Asynchronous request status
+	     * @param[in] aRetBuffer Buffer which holds the return value
+	     */
+	    IMPORT_C void StartGlobalQueryL(TRequestStatus& aStatus, TDes8& aRetBuffer);   
+		
+	    /**
+	     * Cancels the currently outstanding Global Query.
+	     *
+	     * @since S60 v9.1  
+	     */
+	    IMPORT_C void CancelDialog();   
+    
+	    // Inherited from MEvtTonePlayObserver 
+	    void TonePlayCompleteL( TBool aTimeout ); 
+		
+	private:    
+		/**
+		 * Gets the Icon details from the Icon File.
+		 */
+	    void GetIconDetailsL( TFileName& aFileName, TInt& aBmpID, TInt& aBmpMaskID );
+	
+	private: 
+		/**
+		 * Default C++ Constructor.
+		 */
+	    CEvtGlobalQuery( CEvtInfoNoteInputParam&      aInputParam );
+
+	    /**
+	     * Second phase of the two phase constructor.
+	     */
+	    void ConstructL();  
+		
+	private: // from CActive    
+	    void RunL();
+	    void DoCancel();
+	    TInt RunError( TInt aError ); 
+		
+	private: // data
+	    /**
+		 * Asynchronous return status
+		 */
+	    TRequestStatus* iReturnStatus;
+		
+	    /**
+		 * Buffer value which holds the return value
+		 * NOT Own:
+		 */
+	    TDes8* iReturnBuffer;
+		
+	    /**
+		 * Avkon's Global Message Query
+		 * Owns:
+		 */
+	    CAknGlobalMsgQuery* iGlobalMsgQuery;
+		
+	    /**
+		 * Event Info Note parameters
+		 */
+	    CEvtInfoNoteInputParam&      iInputParam ;
+    
+	    /**
+	     * Tone player
+	     * Owns
+	     */
+	    CEvtTonePlayer*                 iTonePlayer;
+    
+	    /**
+	     * Key Lock Handler
+	     * Owns
+	     */
+	    CEvtKeyLockHandler* 			iKeyLockHandler;
+    };
+ 
+#endif  // EVTGLOBALQUERY_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventshandlerui/eventshandlerserver/inc/evthandlerserver.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,123 @@
+/*
+* 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:  Server class for Events Handler Server
+*
+*/
+
+
+#ifndef C_EVTHANDLERSERVER_H
+#define C_EVTHANDLERSERVER_H
+
+#include <e32base.h>
+
+#include "evthandlershutdowntimer.h"
+#include "evtnotifierobserver.h"
+#include "evtdefs.h"
+#include "evteventinfo.h"
+#include "evtsnoozehandler.h"
+
+// CONSTANTS
+
+// MACROS
+
+// DATA TYPES
+
+// FUNCTION  PROTOTYPES
+
+// FORWARD DECLARATIONS
+class CEvtMgmtUiEngine;
+class CEvtNotifierHandler;
+
+// CLASS DECLARATION
+
+/**
+ * Events Handler Server class. This class extends the CServer2
+ * class for Events Handler Server.
+ *
+ * @lib evthandlerserver.exe
+ * @since S60 v9.1
+ */
+class CEvtHandlerServer : public CServer2, 
+		                  public MEvtNotifierObserver, 
+		                  public MEvtSnoozeObserver
+	{
+public:
+	static CServer2* NewLC();
+	virtual ~CEvtHandlerServer();
+	
+	/**
+	 * Handles the Event
+	 */
+	void HandleNewEventL( const TEvtEventId aEventId, const TInt aAccuracy );
+	
+private:
+	CEvtHandlerServer();
+	void ConstructL();
+	CSession2* NewSessionL( const TVersion& aVersion, const RMessage2& aMessage ) const;
+	void HandleEventIdL( const TDesC& aMessage );
+	void HandleNextEventL();
+	void UpdateEventsQueueL( CEvtEvent* aEvent );
+	
+    void LaunchAppL(       TUid       aApplicationUid,
+                     const TDesC8&     aCmdLineArg );
+    
+    void ChangeStateL( TEvtEventId aEvtId );
+	
+private: // derived methods	
+	// derived from MEvtNotifierObserver
+    void HandlerCompleteL( 
+    	TEvtInfoNoteResult aResult,
+        CEvtEvent* aEvent );
+	
+	// derived from MEvtSnoozeObserver
+    void SnoozeCompleteL( 
+    	TEvtSnoozeItem& aSnoozeItem, 
+    	TBool aSnoozeAgain );
+	
+private:
+	TInt iSessionCount;
+    /**
+    * event handler shutdown timer
+    * Owns
+    */
+	CEvtHandlerShutdownTimer iShutdownTimer;
+
+    /**
+    * event notifier handler 
+    * Owns
+    */    
+    CEvtNotifierHandler*	iEvtNotifierHandler;	    
+
+    /**
+    * event snooze handler 
+    * Owns
+    */    
+    CEvtSnoozeHandler*	iEvtSnoozeHandler;	   
+
+    /**
+    * event managment engine
+    * Owns
+    */    
+    CEvtMgmtUiEngine*		iEvtMgmtUiEngine;
+
+    /**
+    * events id queue for notifier handler
+    * Owns
+    */    
+	RArray<TEvtEventInfo> iEventsQueue;
+	};
+	
+#endif  // C_EVTHANDLERSERVER_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventshandlerui/eventshandlerserver/inc/evthandlerserverpanic.h	Wed Sep 01 12:31:27 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:  panic definition for Events Handler Server
+*
+*/
+
+
+#include <e32cmn.h>
+
+enum TEvtHandlerServerPanic
+	{
+	EPanicBadDescriptor,
+	EPanicIllegalFunction,
+	EPanicAlreadyReceiving
+	};
+
+// ---------------------------------------------------------------------------
+// PanicClient()
+// ---------------------------------------------------------------------------
+//
+void PanicClient( const RMessagePtr2& aMessage, TEvtHandlerServerPanic aPanic )
+/*
+ * RMessage::Panic() also completes the message. This is:
+ * (a) important for efficient cleanup within the kernel
+ * (b) a problem if the message is completed a second time
+ */
+	{
+	_LIT( KPanic,"evthandlerserver" );
+	aMessage.Panic( KPanic, aPanic );
+	}
+	
+// end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventshandlerui/eventshandlerserver/inc/evthandlerserversession.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,56 @@
+/*
+* 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:  Session class for Events Handler Server
+*
+*/
+
+
+#ifndef C_EVTHANDLERSERVERSESSION_H
+#define C_EVTHANDLERSERVERSESSION_H
+
+
+#include <e32base.h>
+#include "evthandlerserver.h"
+
+/**
+ * Events Handler Server Session class. This class extents the CSession2
+ * class for Events Handler Server.
+ *
+ * @lib evthandlerserver.exe
+ * @since S60 v9.1
+ */
+class CEvtHandlerServerSession : public CSession2
+	{
+public:
+	CEvtHandlerServerSession();
+	void ResolveMessageL( const RMessage2& aMessage );
+	void CreateL();
+
+private:
+	~CEvtHandlerServerSession();
+	inline CEvtHandlerServer& Server();
+	void ServiceL( const RMessage2& aMessage );
+	void ServiceError( const RMessage2& aMessage, TInt aError );
+	inline TBool ReceivePending() const;
+
+private:
+	RMessagePtr2 iReceiveMsg;
+	TInt iReceiveLen;
+	};
+
+#include "evthandlerserversession.inl"
+
+#endif  // C_EVTHANDLERSERVERSESSION_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventshandlerui/eventshandlerserver/inc/evthandlerserversession.inl	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,41 @@
+/*
+* 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:  session handling for Events Handler Server
+*
+*/
+
+
+// ---------------------------------------------------------------------------
+// CEvtHandlerServerSession::CEvtHandlerServerSession()
+// ---------------------------------------------------------------------------
+//
+inline CEvtHandlerServerSession::CEvtHandlerServerSession()
+	{}
+
+// ---------------------------------------------------------------------------
+// CEvtHandlerServerSession::Server()
+// ---------------------------------------------------------------------------
+//
+inline CEvtHandlerServer& CEvtHandlerServerSession::Server()
+	{return *static_cast<CEvtHandlerServer*>(const_cast<CServer2*>(CSession2::Server()));}
+
+// ---------------------------------------------------------------------------
+// CEvtHandlerServerSession::ReceivePending()
+// ---------------------------------------------------------------------------
+//
+inline TBool CEvtHandlerServerSession::ReceivePending() const
+	{return !iReceiveMsg.IsNull();}
+
+
+// end of file
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventshandlerui/eventshandlerserver/inc/evthandlerserverstartup.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,54 @@
+/*
+* 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:  Events Handler Server start up.
+*
+*/
+
+
+#ifndef C_EVTHANDLERSERVERSTARTUP_H
+#define C_EVTHANDLERSERVERSTARTUP_H
+
+// SYSTEM INCLUDES
+#include <e32base.h>
+
+/**
+ *  Events Handler server start up routines.
+ *
+ *  It contains static funtions which start up the Events Handler server.
+ *
+ *  @since S60 v5.0
+ */
+NONSHARABLE_CLASS( EvtHandlerServerStartup )
+    {
+public:
+    /**
+     * Starts the Events Handler server.
+     *
+     * @since S60 v5.0
+     * @return KErrNone, If the server has been started successfully.
+     *         System wide error codes incase the startup fails.
+     */
+    static TInt StartEvtHandlerServer();
+
+private:
+    /**
+     * Starts the Events Handler server.
+     *
+     * @since S60 v5.0
+     * @leave System wide error codes incase the startup fails.
+     */
+    static void StartEvtHandlerServerL();     
+    };
+
+#endif // C_EVTHANDLERSERVERSTARTUP_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventshandlerui/eventshandlerserver/inc/evthandlerserveruid.hrh	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,27 @@
+/*
+* 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:  UID Defintions for Events Management UI
+*
+*/
+
+
+#ifndef EVTMGMTUIUID_HRH
+#define EVTMGMTUIUID_HRH
+
+/**
+ * Application UID Definitions for Events Management UI
+ */
+#define KEvtHandlerServerUid    			0x2001E669
+
+#endif //EVTMGMTUIUID_HRH
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventshandlerui/eventshandlerserver/inc/evthandlershutdowntimer.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,48 @@
+/*
+* 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:  Shutdown Timer class for Events Handler Server
+*
+*/
+
+
+#ifndef C_EVTHANDLERSERVERSHUTDOWNTIMER_H
+#define C_EVTHANDLERSERVERSHUTDOWNTIMER_H
+
+#include <e32base.h>
+
+/**
+ * Events Handler Server shutdown timer class. This class extents the CTimer
+ * class for Events Handler Server.
+ *
+ * @lib evthandlerserver.exe
+ * @since S60 v5.0
+ */
+class CEvtHandlerShutdownTimer : public CTimer
+	{
+	enum { KCEvtHandlerShutdownDelay = 0x500000 }; // approx 5s
+
+public:
+	inline CEvtHandlerShutdownTimer();
+	inline void ConstructL();
+	inline void Start();
+
+private: // from CTimer
+	void RunL();
+	};
+
+#include "evthandlershutdowntimer.inl"
+
+#endif  // C_EVTHANDLERSERVERSHUTDOWNTIMER_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventshandlerui/eventshandlerserver/inc/evthandlershutdowntimer.inl	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,42 @@
+/*
+* 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:  Shutdown Timer for Events Handler Server
+*
+*/
+
+
+// ---------------------------------------------------------------------------
+// CEvtHandlerShutdownTimer::CEvtHandlerShutdownTimer()
+// ---------------------------------------------------------------------------
+//
+inline CEvtHandlerShutdownTimer::CEvtHandlerShutdownTimer()
+	:CTimer(-1)
+	{CActiveScheduler::Add(this);}
+
+// ---------------------------------------------------------------------------
+// CEvtHandlerShutdownTimer::ConstructL()
+// ---------------------------------------------------------------------------
+//
+inline void CEvtHandlerShutdownTimer::ConstructL()
+	{CTimer::ConstructL();}
+
+// ---------------------------------------------------------------------------
+// CEvtHandlerShutdownTimer::Start()
+// ---------------------------------------------------------------------------
+//
+inline void CEvtHandlerShutdownTimer::Start()
+	{After(KCEvtHandlerShutdownDelay);}
+
+
+// end of file
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventshandlerui/eventshandlerserver/inc/evtnotifierhandler.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,184 @@
+/*
+* 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:  Handler for notifier on Event
+*
+*/
+
+
+
+#ifndef EVTNOTIFIERHANDLER_H
+#define EVTNOTIFIERHANDLER_H
+
+//  INCLUDES
+
+#include <e32base.h> 
+
+#include <apgcli.h>
+#include <apacmdln.h>
+#include <bacline.h>
+#include <AknNotifierWrapper.h>
+#include <s32mem.h>
+
+#include "evtinfonoteparams.h"
+#include "evthandlerserverconsts.h"
+#include "evteventmanager.h"
+#include "evtevent.h"
+#include "evteventinfo.h"
+
+
+// CONSTANTS
+
+// MACROS
+
+// DATA TYPES
+
+// FUNCTION  PROTOTYPES
+
+// FORWARD DECLARATIONS
+class MEvtNotifierObserver;
+class CEvtGlobalQuery;
+
+// CLASS DECLARATION
+
+/**
+*  Handler for query on Event. This handler show query notifier
+*  and return result to connect manager.
+*
+*  @since Series 60 9.1
+*/
+class CEvtNotifierHandler: public CActive
+    {
+    public:
+    //Handler id
+    enum THandlerType
+        {
+        EHandlerNotifier,   ///Device selection handler id
+        EHandlerGlobalNote
+        };
+    
+    public: 
+        /**
+        * Two-phase construction.
+        */
+        static CEvtNotifierHandler * NewL(
+        	MEvtNotifierObserver& aNotifierObserver,
+        	TEvtEventInfo aEventInfo );
+
+        /**
+        * Destructor
+        */
+        virtual ~CEvtNotifierHandler();
+		
+        /**
+        * Check if Event is Launchable - Is it present and Active
+        */
+		TBool IsLaunchable();
+        
+        /**
+        * Starting the Notifier
+        */
+        void StartEvtNotifierL();
+
+    private:
+        /**
+        * From CActive
+        */
+        void RunL();
+
+        /**
+        * From CActive
+        */
+        void DoCancel();
+
+        /**
+        * From CActive
+        */
+        TInt RunError( TInt aError );
+
+    private:
+
+        /**
+        * Second phase of the construction
+        */
+        void ConstructL( );
+
+        /**
+        * Private constructor
+        */
+        CEvtNotifierHandler(
+        	MEvtNotifierObserver& aNotifierObserver,
+        	TEvtEventInfo aEventInfo );
+        
+    private:
+		
+	    /**
+		 * Notifier Observer.
+		 */
+        MEvtNotifierObserver& iNotifierObserver;
+		
+	    /**
+		 * RNotifer Instance.
+		 */
+        RNotifier iNotifier;
+		
+	    /**
+		 * Event Global Query.
+		 * Owns:
+		 */
+        CEvtGlobalQuery* iEvtGlobalQuery;
+		
+	    /**
+		 * Event's Info note object to internalize and externalize
+		 * the information required by Info Note.
+		 * Owns:
+		 */
+        CEvtInfoNoteInputParam* iInputParam;
+		
+	    /**
+		 * Buffer which contains the Input parameters to notifier
+		 * Owns:
+		 */
+        CBufFlat* iInputBuffer;
+		
+	    /**
+		 * Response buffer to pass to the notifier
+		 */
+	    TBuf8<KEvtNotifierBufferLength>  iResponseBuffer;
+		
+	    /**
+		 * Current Event's dynamic Info
+		 */
+	    TEvtEventInfo iEventInfo;
+		
+	    /**
+		 * Handler type which can be either RNotifier or Global query
+		 */
+	    THandlerType iHandlerType;
+		
+	    /**
+		 * Engine Class to get the Event object
+		 * Owns:
+		 */
+	    CEvtEventManager* iEventManager;
+		
+	    /**
+		 * Event object for which the notifier has to be launched
+		 * Owns:
+		 */
+	    CEvtEvent* iEvent;
+    };
+
+#endif //EVTNOTIFIERHANDLER_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventshandlerui/eventshandlerserver/inc/evtnotifierobserver.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,66 @@
+/*
+* 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 class for event notifier handler
+*
+*/
+
+
+
+#ifndef EVTNOTIFIEROBSERVER_H
+#define EVTNOTIFIEROBSERVER_H
+
+//  INCLUDES
+
+#include <e32base.h> 
+
+#include "evtinfonoteinterface.h"
+#include "evtevent.h"
+
+// CONSTANTS
+
+// MACROS
+
+// DATA TYPES
+
+// FUNCTION  PROTOTYPES
+
+// FORWARD DECLARATIONS
+
+// CLASS DECLARATION
+
+/**
+*  Interface class for event handlers. event handlers will
+*  use reference of this interface to get event viewer response & 
+*  other global objects. 
+*
+*  @since Series 60 9.1
+*/
+class MEvtNotifierObserver
+    {
+    public: 
+
+        /**
+        * Interface for handler to report operation result.
+		* @param aId The id of current handler
+		* @param aErr The operation err code. KErrNone if operation
+		*        has been executed successfully.
+        */
+        virtual void HandlerCompleteL( 
+        	TEvtInfoNoteResult aResult,
+        	CEvtEvent* aEvent ) = 0;
+    };
+
+#endif  // EVTNOTIFIEROBSERVER_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventshandlerui/eventshandlerserver/inc/evtserverapp.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,49 @@
+/*
+* 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:  Application class for Events Handler Server.
+*
+*/
+
+
+#ifndef C_EVTSERVERAPP_H
+#define C_EVTSERVERAPP_H
+
+// SYSTEM INCLUDES
+#include <aknapp.h>
+
+/**
+ * Events Management UI's App class. This class extents the CAknApplication
+ * class for Events Management UI.
+ *
+ * @lib evtmgmtui.exe
+ * @since S60 v5.0
+ */	
+class CEvtServerApp : public CAknApplication
+	{
+private: // Inherited from Base classes
+	/**
+	 * Inherited from CAknApplication
+	 */ 
+    CApaDocument* CreateDocumentL();
+    
+	/**
+	 * Inherited from CAknApplication
+	 */         
+    TUid AppDllUid() const;
+    };
+
+#endif  // C_EVTSERVERAPP_H
+
+// End of File
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventshandlerui/eventshandlerserver/inc/evtserverappdocument.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,69 @@
+/*
+* 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:  Document class for Events Handler Server.
+*
+*/
+
+
+#ifndef C_EVTSERVERAPPDOCUMENT_H
+#define C_EVTSERVERAPPDOCUMENT_H
+
+// SYSTEM INCLUDES
+#include <AknDoc.h>
+
+// FORWARD DECLARATIONS
+class  CEikAppUi;
+
+/**
+ * Event Management UI document class.
+ *
+ * @lib evtmgmtui.exe
+ * @since S60 v5.0
+ */
+class CEvtServerAppDocument : public CAknDocument
+    {
+public:
+	/**
+	 * Static Two phase constructor
+	 */
+    static CEvtServerAppDocument* NewL( CEikApplication&    aApp );
+
+  	/**
+  	 * Virtual destructor
+  	 */
+    virtual ~CEvtServerAppDocument();
+
+//private:
+	/**
+	 * C++ Default constructor
+	 */
+    CEvtServerAppDocument( CEikApplication&     aApp );
+
+	/**
+	 * Second phase of the two phase constructor
+	 */
+    void ConstructL();
+
+private: // Inherited from Base class
+
+	/**
+	 * Inherited from CAknDocument
+	 */
+    CEikAppUi* CreateAppUiL();
+    };
+
+#endif  // C_EVTSERVERAPPDOCUMENT_H
+
+// End of File
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventshandlerui/eventshandlerserver/inc/evtserverappui.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,74 @@
+/*
+* 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:  Events Handler Server App Ui.
+*
+*/
+
+#ifndef C_EVTSERVERAPPUI_H
+#define C_EVTSERVERAPPUI_H
+
+// INCLUDES
+#include <aknappui.h> 
+
+    class CEventReceiver;
+        
+    class CEvtServerAppUi : public CAknAppUi
+    {
+    public:
+        /**
+         * Default Constructor
+         */
+        CEvtServerAppUi();
+        
+        /**
+         * Default Destructor
+         */
+        ~CEvtServerAppUi();        
+        
+        /**
+         * ConstructL.
+         * 2nd phase constructor.
+         */
+        void ConstructL();
+        
+        /**
+         * Sets the event receiver.
+         *
+         * @param aEventReceiver is set while creating AppUi.
+         *        Appui will send wssession events( EEventScreenDeviceChanged,
+         *        & EEventWindowVisibilityChanged) to CEventReceiver that 
+         *        distributes it to its listeners.
+         *         
+         */
+       void SetEventReceiver( CEventReceiver& aEventReceiver );
+
+        
+    protected:
+
+       /**
+        * Handles window server events.
+        *
+        * @param aEvent The window server event that occurred.
+        * @param aDestination The control associated with the event.
+        *
+        */      
+        void HandleWsEventL( const TWsEvent& aEvent, CCoeControl* aDestination );
+
+    private:
+        //handle to the event reciever.
+        CEventReceiver* iEventReceiver;
+    }; 
+
+#endif  //C_EVTSERVERAPPUI_H
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventshandlerui/eventshandlerserver/inc/evtsnoozehandler.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,219 @@
+/*
+* 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:  Handler for Snoozing of Event
+*
+*/
+
+
+
+#ifndef EVTSNOOZEHANDLER_H
+#define EVTSNOOZEHANDLER_H
+
+//  INCLUDES
+
+#include <e32base.h> 
+#include <e32std.h>
+#include <cenrepnotifyhandler.h>
+
+#include "evtdefs.h"
+
+// CONSTANTS
+
+// MACROS
+
+// DATA TYPES
+	
+// FUNCTION  PROTOTYPES
+
+// FORWARD DECLARATIONS
+
+// CLASS DECLARATION
+
+/**
+*  Event Strucutre for Snooze.
+*
+*  @since Series 60 9.2
+*/
+class TEvtSnoozeItem
+    { 
+    public :  
+		/**
+        * Copy constructor
+        */
+        TEvtSnoozeItem(TEvtEventId aId, TEvtFireAccuracy aAcc, TTime aTime, TUint8 aCount = 1)
+            	    {
+        	        iEventId = aId;
+        	        iAccuracy = aAcc;
+        	        iTime = aTime;
+        	        iCount = aCount;
+            	    };
+			
+		/**
+        * inline function used for comparision
+        */
+        static inline TInt Match(const TEvtSnoozeItem& aFirst, const TEvtSnoozeItem& aSecond)
+            {
+            if (aFirst.iEventId == aSecond.iEventId)
+                return 1;
+            return 0;
+            };
+			
+		/**
+        * inline function used for comparision
+        */
+        static inline TInt Compare(const TEvtSnoozeItem& aFirst, const TEvtSnoozeItem& aSecond)
+            {
+            if (aFirst.iTime < aSecond.iTime)
+                return -1;
+            if (aFirst.iTime > aSecond.iTime)
+                return 1;
+            return 0;
+            };
+    public :
+		// Event's Information like Event Id, Accuracy, Time and Count
+    	TEvtEventId iEventId;
+    	TEvtFireAccuracy iAccuracy;
+    	TTime iTime;
+    	TUint8 iCount;
+ };
+
+/**
+*  Observer class for snooze handlers. Observer will get the call back when
+*  Snooze for a particular event is complete.
+*
+*  @since Series 60 9.1
+*/
+class MEvtSnoozeObserver
+    {
+    public: 
+        /**
+        * Call back function when the Snooze is complete.
+		* @param aSnoozeItem Snooze Item
+		* @param aSnoozeAgain Snooze again flag which indicates if the event
+		* has to be snnozed again.
+        */
+        virtual void SnoozeCompleteL( 
+        	TEvtSnoozeItem& aSnoozeItem, TBool aSnoozeAgain ) = 0;
+    };
+    
+    
+/**
+*  Handler for Snoozing the Event.
+*
+*  @since Series 60 9.1
+*/
+class CEvtSnoozeHandler: public CTimer, public MCenRepNotifyHandlerCallback
+    {
+    public: 
+        /**
+        * Two-phase construction.
+        */
+        static CEvtSnoozeHandler * NewL(
+        	MEvtSnoozeObserver& aSnoozeObserver );
+
+        /**
+        * Destructor
+        */
+        virtual ~CEvtSnoozeHandler();
+        
+        /**
+        * Remove the Event from the Snooze Que
+		* @param[in] aSnoozeItem Snooze Item
+        */
+        void RemoveIfPresent(const TEvtSnoozeItem& aSnoozeItem);
+        
+        /**
+        * Add the Event to Snooze
+		* @param[in] aSnoozeItem Snooze Item
+        */
+        void Snooze(TEvtSnoozeItem aSnoozeItem);
+        
+        /**
+        * Check if the Snooze Que is empty.
+		* @ret Return ETrue if the Snooze Que is empty.
+        */
+        TBool IsSnoozeQueEmpty();
+
+    private: 	// Methods derived from MCenRepNotifyHandlerCallback
+        void HandleNotifyInt(TUint32 aId, TInt aNewValue);
+
+    private:
+        /**
+        * From CActive
+        */
+        void RunL();
+
+    private:
+
+        /**
+        * Second phase of the construction
+        */
+        void ConstructL( );
+
+        /**
+        * Private constructor
+        */
+        CEvtSnoozeHandler(
+        	MEvtSnoozeObserver& aSnoozeObserver );
+        
+    private:
+        /**
+        * Snoozer Observer
+        */   
+        MEvtSnoozeObserver& iSnoozeObserver;
+
+        /**
+        * events id queue for snooze
+        * Owns
+        */    
+    	RArray<TEvtSnoozeItem> iSnoozeQueue;
+
+        /**
+        * events id queue for snooze
+        * Owns
+        */    
+    	RArray<TEvtSnoozeItem> iSnoozeCompleteQueue;
+
+    	/**
+    	 * Cenrep Session to Snooze Settings.
+    	 * Own
+    	 */
+         CRepository* iSettingSession;
+    	 
+    	/**
+    	 * Handler to Cenrep Interval key Notifier
+    	 * Own
+    	 */
+    	CCenRepNotifyHandler* iIntervalNotifyHandler;
+    	 
+    	/**
+    	 * Handler to Cenrep Period key Notifier
+    	 * Own
+    	 */
+    	CCenRepNotifyHandler* iPeriodNotifyHandler;
+
+        /**
+        * Snooze Interval in minutes
+        */    
+    	TInt iSnoozeInterval;
+
+        /**
+        * Snooze Count
+        */    
+    	TInt iSnoozeCount;
+    };
+
+#endif //EVTSNOOZEHANDLER_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventshandlerui/eventshandlerserver/src/evtglobalquery.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,295 @@
+/*
+* 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:  Handler for displaying the Events Global Query
+*
+*/
+
+// System Includes
+#include <coecntrl.h> // CCoeControl
+#include <AknGlobalMsgQuery.h> //CAknGlobalMsgQuery
+#include <avkon.rsg>
+#include <avkon.hrh>
+#include <gulicon.h>
+#include <AknsUtils.h>
+#include <avkon.mbg>
+#include <evthandlerserver.mbg>
+#include <eikimage.h>
+#include <data_caging_path_literals.hrh>
+#include <AknsConstants.h> 		// Skin Ids
+#include <AknIconUtils.h>
+#include <AknsSkinInstance.h>
+
+// User Includes
+#include "evtglobalquery.h"
+#include "evtinfonoteparams.h"
+#include "evtkeylockhandler.h"
+#include "evtdebug.h"
+#include "evtinfonoteinterface.h"
+
+_LIT( KEvtDefaultIconFileName, "evthandlerserver.mif" );
+static const TInt KTimetoPlay = 60;
+
+// ================ Member funtions for CEvtGlobalQuery class ===============
+
+// ---------------------------------------------------------------------------
+// CEvtGlobalQuery::CEvtGlobalQuery
+// ---------------------------------------------------------------------------
+//
+CEvtGlobalQuery::CEvtGlobalQuery( CEvtInfoNoteInputParam&      aInputParam ) 
+        : CActive (EPriorityStandard),  iInputParam( aInputParam )
+	{
+    CActiveScheduler::Add( this );
+	}
+
+// ---------------------------------------------------------------------------
+// CEvtGlobalQuery::~CEvtGlobalQuery
+// ---------------------------------------------------------------------------
+//
+CEvtGlobalQuery::~CEvtGlobalQuery()
+	{
+	Cancel();
+	
+    // Delete the Query
+	delete iGlobalMsgQuery;
+	
+    // Delete the tone player
+    delete iTonePlayer;
+    
+    // Delete Key Lock Handler
+    if( iKeyLockHandler )
+        {
+        delete iKeyLockHandler;
+        }
+	}
+	
+// ---------------------------------------------------------------------------
+// CEvtGlobalQuery::NewL
+// ---------------------------------------------------------------------------
+//
+EXPORT_C CEvtGlobalQuery* CEvtGlobalQuery::NewL( CEvtInfoNoteInputParam&      aInputParam )
+    {
+	CEvtGlobalQuery* self = NewLC(aInputParam);
+	CleanupStack::Pop( self );
+	return self;
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtGlobalQuery::NewLC
+// ---------------------------------------------------------------------------
+//
+EXPORT_C CEvtGlobalQuery* CEvtGlobalQuery::NewLC( CEvtInfoNoteInputParam&      aInputParam )
+    {
+	CEvtGlobalQuery* self = new ( ELeave )CEvtGlobalQuery(aInputParam);
+	CleanupStack::PushL( self );
+	self->ConstructL( );
+	return self;
+    } 
+
+// ---------------------------------------------------------------------------
+// CEvtGlobalQuery::ConstructL
+// ---------------------------------------------------------------------------
+//
+void CEvtGlobalQuery::ConstructL()
+    {
+    EVTUIDEBUG( "+ CEvtGlobalQuery::ConstructL()" );
+	    	
+    iGlobalMsgQuery = CAknGlobalMsgQuery::NewL();
+        
+    iKeyLockHandler = CEvtKeyLockHandler::NewL( );
+    
+    iTonePlayer = CEvtTonePlayer::NewL( *this );     
+	
+    EVTUIDEBUG( "- CEvtGlobalQuery::ConstructL()" );
+    }
+
+// ---------------------------------------------------------------------------
+// void CEvtGlobalQuery::RunL()
+// ---------------------------------------------------------------------------
+//                             
+void CEvtGlobalQuery::RunL()
+    {
+	EVTUIDEBUG( "+ CEvtGlobalQuery::RunL()" );
+    iReturnBuffer->Zero( );
+	if(iStatus.Int() == EAknSoftkeyOpen)
+		{
+		iReturnBuffer->AppendNum( EOpenTrigger );
+		
+		// Disable the Key Lock irrespective of previously maintained state.
+		// Update the Key Lock state.
+	    if ( iKeyLockHandler )
+	        {
+	        iKeyLockHandler->EnableKeyLock( EFalse );
+			iKeyLockHandler->UpdateStateWithoutNote();
+	        }
+		}
+	else
+		{
+		iReturnBuffer->AppendNum( ECloseInfoNote );
+	
+		// Update the Key Lock state.
+	    if ( iKeyLockHandler )
+	        {
+			iKeyLockHandler->UpdateStateWithNote();
+	        }
+		}
+    User::RequestComplete( iReturnStatus, KErrNone );
+	
+	EVTUIDEBUG( "- CEvtGlobalQuery::RunL()" );
+    }
+    
+// ---------------------------------------------------------------------------
+// void CEvtGlobalQuery::DoCancel()
+// ---------------------------------------------------------------------------
+// 
+void CEvtGlobalQuery::DoCancel()
+    {
+	EVTUIDEBUG( "+ CEvtGlobalQuery::DoCancel()" );
+    // Cancel the outstanding CR notification request
+    if( iGlobalMsgQuery )
+        {
+        iGlobalMsgQuery->CancelMsgQuery();      
+        User::RequestComplete( iReturnStatus, KErrCancel );  
+        }
+	EVTUIDEBUG( "- CEvtGlobalQuery::DoCancel()" );
+    }
+
+// ---------------------------------------------------------------------------
+// TInt CEvtGlobalQuery::RunError()
+// ---------------------------------------------------------------------------
+//    
+TInt CEvtGlobalQuery::RunError( TInt aError )
+	{    	
+	return aError;	
+	} 
+
+// ---------------------------------------------------------------------------
+// void CEvtGlobalQuery::CancelDialog()
+// ---------------------------------------------------------------------------
+//
+EXPORT_C void CEvtGlobalQuery::CancelDialog()
+	{    	
+    EVTUIDEBUG( "+ CEvtGlobalQuery::CancelDialog()" );
+	Cancel();
+    EVTUIDEBUG( "- CEvtGlobalQuery::CancelDialog()" );
+	} 
+
+// ---------------------------------------------------------------------------
+// TInt CEvtGlobalQuery::RunError()
+// ---------------------------------------------------------------------------
+//  
+EXPORT_C void CEvtGlobalQuery::StartGlobalQueryL(TRequestStatus& aStatus, TDes8& aRetBuffer)
+    {
+    EVTUIDEBUG( "+ CEvtGlobalQuery::StartGlobalQueryL()" );
+    iReturnStatus = &aStatus;
+    iReturnBuffer = &aRetBuffer;
+    
+    *iReturnStatus = KRequestPending;
+    
+    if( iGlobalMsgQuery )
+        {
+        iGlobalMsgQuery->CancelMsgQuery();  
+        delete iGlobalMsgQuery;
+        iGlobalMsgQuery = NULL;
+        }
+    
+    TFileName fileName;    
+    TInt bmpID;
+    TInt bmpMaskID;
+    
+    GetIconDetailsL(fileName, bmpID, bmpMaskID);
+    
+    // Maintain the Key Lock State and Enable if it is already not enabled
+    if ( iKeyLockHandler )
+        {
+        iKeyLockHandler->MaintainState();
+        }
+        
+    // If tone player is there, then start tone playing
+    if ( iInputParam.ToneEnabled() )
+        {
+        iGlobalMsgQuery = CAknGlobalMsgQuery::NewL();
+        iGlobalMsgQuery->ShowMsgQueryL(iStatus, iInputParam.Description(), R_AVKON_SOFTKEYS_OPEN_CLOSE, iInputParam.Subject(), fileName, bmpID, bmpMaskID );
+        SetActive();
+        iTonePlayer->PlayFileL( iInputParam.Tone(), iInputParam.ToneRepeat(), KTimetoPlay );
+        }
+    else
+        {
+        iGlobalMsgQuery = CAknGlobalMsgQuery::NewL();
+        iGlobalMsgQuery->ShowMsgQueryL(iStatus, iInputParam.Description(), R_AVKON_SOFTKEYS_OPEN_CLOSE, iInputParam.Subject(), fileName, bmpID, bmpMaskID );
+        SetActive();
+        }
+
+    EVTUIDEBUG( "- CEvtGlobalQuery::StartGlobalQueryL()" );
+    }  
+
+// ---------------------------------------------------------------------------
+// void CEvtGlobalQuery::GetIconDetailsL()
+// ---------------------------------------------------------------------------
+//    
+void CEvtGlobalQuery::GetIconDetailsL( TFileName& aFileName, TInt& aBmpID, TInt& aBmpMaskID )
+	{    	
+    EVTUIDEBUG( "+ CEvtGlobalQuery::GetIconDetailsL()" );
+	RProcess currentProcess;
+	TParse parser;
+	
+	parser.Set( currentProcess.FileName(), NULL, NULL );
+	TPtrC filename( parser.FullName() );
+    //filename.Copy( KTempDrive );
+	
+	User::LeaveIfError( parser.Set( KEvtDefaultIconFileName, &KDC_APP_BITMAP_DIR, &filename ));
+    aFileName = parser.FullName();
+    
+     //retrieve accuracy level       
+    CEvtInfoNoteInputParam::TEvtTriggerAccuracy accuracy = iInputParam.TrigerringAccuracy();
+    EVTUIDEBUG1( "Icon creation:Accuracy level = %d", accuracy )
+    
+    switch( accuracy )
+    	{
+    	case CEvtInfoNoteInputParam::EEvtAccurateTrigger:
+    		aBmpID = EMbmEvthandlerserverQgn_note_locev_alarm_acc;
+    		aBmpMaskID = EMbmEvthandlerserverQgn_note_locev_alarm_acc_mask;
+    		break;
+    	case CEvtInfoNoteInputParam::EEvtInaccurateTrigger:
+    		aBmpID = EMbmEvthandlerserverQgn_note_locev_alarm_inacc;
+    		aBmpMaskID = EMbmEvthandlerserverQgn_note_locev_alarm_inacc_mask;
+    		break;
+    	case CEvtInfoNoteInputParam::EEvtHighlyInaccurateTrigger:
+    	default:
+    		aBmpID = EMbmEvthandlerserverQgn_note_locev_alarm_inacc_heavy;
+    		aBmpMaskID = EMbmEvthandlerserverQgn_note_locev_alarm_inacc_heavy_mask;
+    		break;
+    	}
+    EVTUIDEBUG( "- CEvtGlobalQuery::GetIconDetailsL()" );
+	} 
+
+// ---------------------------------------------------------------------------
+// void CEvtGlobalQuery::TonePlayCompleteL()
+// ---------------------------------------------------------------------------
+//  
+void CEvtGlobalQuery::TonePlayCompleteL( TBool aTimeout )
+	{
+    EVTUIDEBUG( "+ CEvtGlobalQuery::TonePlayCompleteL()" );
+		// Enable KeyLock on Timeout.
+    if ( iKeyLockHandler && aTimeout )
+        {
+        iKeyLockHandler->EnableKeyLock( ETrue );
+        iKeyLockHandler->UpdateStateWithoutNote();
+        }
+        
+    // Update the CBA
+    iGlobalMsgQuery->UpdateMsgQuery( R_AVKON_SOFTKEYS_OPEN_CLOSE );
+    EVTUIDEBUG( "- CEvtGlobalQuery::TonePlayCompleteL()" );
+	}
+	
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventshandlerui/eventshandlerserver/src/evthandlerserver.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,416 @@
+/*
+* 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:  server implementation for Events Handler Server
+*
+*/
+
+
+#include "evthandlerclientserver.h"
+#include "evthandlerserversession.h"
+#include "evthandlerserverconsts.h"
+#include "evtnotifierhandler.h"
+#include "evtmgmtuiengine.h"
+#include "evtevent.h"
+#include "evtdebug.h"
+
+#include "evthandlerserver.h"
+
+#include <AknGlobalNote.h>  // CAknGlobalNote
+#include <w32std.h>
+#include <apgtask.h>
+#include <apgcli.h>
+#include <apacmdln.h>
+#include <bacline.h>
+
+static const TInt KHandlerAppUid = 0x2001E668;
+_LIT(KHandlerEXE, "evthandler.exe");
+_LIT( KDelimiter, ":");
+
+// ---------------------------------------------------------------------------
+// CEvtHandlerServer::CEvtHandlerServer()
+// ---------------------------------------------------------------------------
+//
+inline CEvtHandlerServer::CEvtHandlerServer()
+		:CServer2( 0, ESharableSessions ), 
+		iEventsQueue( KEvtItemArrayGranularity )
+	{}
+
+// ---------------------------------------------------------------------------
+// CEvtHandlerServer::~CEvtHandlerServer()
+// ---------------------------------------------------------------------------
+//
+CEvtHandlerServer::~CEvtHandlerServer()
+	{
+    EVTUIDEBUG( "+ CEvtHandlerServer::~CEvtHandlerServer()" );	
+	if( iEvtSnoozeHandler )
+		{
+		delete iEvtSnoozeHandler;		
+		}
+		
+	if( iEvtNotifierHandler )
+		{
+		delete iEvtNotifierHandler;		
+		}    
+    
+    iEventsQueue.Close();
+    
+    EVTUIDEBUG( "- CEvtHandlerServer::~CEvtHandlerServer()" );
+	}
+
+// ---------------------------------------------------------------------------
+// CEvtHandlerServer::NewLC()
+// ---------------------------------------------------------------------------
+//
+CServer2* CEvtHandlerServer::NewLC()
+	{
+    EVTUIDEBUG( "+ CEvtHandlerServer::NewLC()" );
+	CEvtHandlerServer* self = new ( ELeave ) CEvtHandlerServer;
+	CleanupStack::PushL( self );
+	self->ConstructL();
+	EVTUIDEBUG( "- CEvtHandlerServer::NewLC()" );
+	return self;
+	}
+
+// ---------------------------------------------------------------------------
+// CEvtHandlerServer::ConstructL()
+// ---------------------------------------------------------------------------
+//
+void CEvtHandlerServer::ConstructL()
+/*
+ * 2nd phase construction - ensure the timer and server objects are running
+ */
+	{
+    EVTUIDEBUG( "+ CEvtHandlerServer::ConstructL()" );
+	StartL( KEvtHandlerServerName );
+	iShutdownTimer.ConstructL();
+	iEvtSnoozeHandler = CEvtSnoozeHandler::NewL( *this );	
+    EVTUIDEBUG( "- CEvtHandlerServer::ConstructL()" );
+	}
+
+// ---------------------------------------------------------------------------
+// CEvtHandlerServer::NewSessionL()
+// ---------------------------------------------------------------------------
+//
+CSession2* CEvtHandlerServer::NewSessionL( const TVersion&, const RMessage2& ) const
+/*
+ * Cretae a new client session. This should really check the version number.
+ */
+	{
+    EVTUIDEBUG( "+ CEvtHandlerServer::NewSessionL()" );
+	return new ( ELeave ) CEvtHandlerServerSession();
+	}
+
+// ---------------------------------------------------------------------------
+// CEvtHandlerServer::HandleNewEventL()
+// ---------------------------------------------------------------------------
+//
+void CEvtHandlerServer::HandleNewEventL( const TEvtEventId aEventId, const TInt aAccuracy )
+    {
+	EVTUIDEBUG2("+ CEvtHandlerServer::HandleNewEventL() - EventId = %d, Accuracy = %d", aEventId, aAccuracy);
+    iShutdownTimer.Cancel();
+       
+    // Stop any running request
+	delete iEvtNotifierHandler;		
+	iEvtNotifierHandler = NULL;    
+    
+    // Remove if it was present in Snooze Que
+	TTime time;
+	time.HomeTime();
+	TEvtSnoozeItem snoozeItem( aEventId, static_cast<TEvtFireAccuracy>(aAccuracy), time );
+    iEvtSnoozeHandler->RemoveIfPresent( snoozeItem );	
+     
+    // Create an Event Info structure
+    TEvtEventInfo evtInfo( aEventId, static_cast<TEvtFireAccuracy>(aAccuracy), ETrue, ETrue );
+     
+    TIdentityRelation<TEvtEventInfo> matcher(TEvtEventInfo::Match);
+    TInt index = iEventsQueue.Find(evtInfo,matcher);
+
+    // Remove if it was present in Notifier Que
+    if( index != KErrNotFound )
+        {
+        iEventsQueue.Remove( index );
+        }
+        
+    // Append this element to the front of queue
+    iEventsQueue.Insert( evtInfo, 0 );
+    
+    // Restart the request handling process
+    HandleNextEventL();
+	EVTUIDEBUG("- CEvtHandlerServer::HandleNewEventL()");
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtHandlerServer::HandleNextEventL()
+// ---------------------------------------------------------------------------
+//
+void CEvtHandlerServer::HandleNextEventL()
+	{
+	EVTUIDEBUG( "+ CEvtHandlerServer::HandleNextEventL()")
+	TInt evtCount  = iEventsQueue.Count();
+	if( evtCount )
+		{		
+		EVTUIDEBUG1( "EventId = %d", iEventsQueue[ 0 ].iEventId );
+		iEvtNotifierHandler = CEvtNotifierHandler::NewL( *this, iEventsQueue[ 0 ] );
+		
+		// Check if the Event is Launchable - Is it present and Active	
+		if( iEvtNotifierHandler->IsLaunchable() )
+			{
+			iEvtNotifierHandler->StartEvtNotifierL();
+		
+	        // Set the tone play to False So that it does not play tone next time.
+	        if( iEventsQueue[ 0 ].iPlayTone )
+	        	iEventsQueue[ 0 ].iPlayTone = EFalse;
+			}
+		else
+			{
+			delete iEvtNotifierHandler;		
+			iEvtNotifierHandler = NULL;    
+			
+			iEventsQueue.Remove( 0 );
+			evtCount  = iEventsQueue.Count();
+			}
+		}
+    
+	if( !evtCount )
+        {
+        if( iEvtSnoozeHandler->IsSnoozeQueEmpty() )
+            {
+            EVTUIDEBUG( "Handler Server shutdown")
+            iShutdownTimer.Start();    
+            }
+        }
+    EVTUIDEBUG( "- CEvtHandlerServer::HandleNextEventL()" );
+	}
+	
+// ---------------------------------------------------------------------------
+// CEvtHandlerServer::SnoozeCompleteL()
+// 
+// Derived from MEvtSnoozeObserver 
+// ---------------------------------------------------------------------------
+//
+void CEvtHandlerServer::SnoozeCompleteL( 
+    	TEvtSnoozeItem& aSnoozeItem, 
+    	TBool aSnoozeAgain )
+    {
+	EVTUIDEBUG2("+ CEvtHandlerServer::SnoozeCompleteL() - EventId = %d, Snooze = %d", 
+	                    aSnoozeItem.iEventId, aSnoozeAgain);
+       
+    // Stop any running request
+	delete iEvtNotifierHandler;		
+	iEvtNotifierHandler = NULL;    
+     
+    // Create an Event Info structure
+    TEvtEventInfo evtInfo( aSnoozeItem.iEventId, aSnoozeItem.iAccuracy, ETrue, aSnoozeAgain );
+     
+    // Append this element to the front of queue
+    iEventsQueue.Insert( evtInfo, 0 );
+    
+    // Restart the request handling process
+    HandleNextEventL();
+	EVTUIDEBUG("- CEvtHandlerServer::SnoozeCompleteL()");
+    }
+	
+// ---------------------------------------------------------------------------
+// CEvtHandlerServer::HandlerCompleteL()
+// 
+// Derived from MEvtNotifierObserver 
+// ---------------------------------------------------------------------------
+//
+void CEvtHandlerServer::HandlerCompleteL( 
+    	TEvtInfoNoteResult aResult,
+        CEvtEvent* aEvent )
+	{	
+    EVTUIDEBUG2( "+ CEvtHandlerServer::HandlerCompleteL() - EventId = %d, Notifier Action = %d", iEventsQueue[ 0 ].iEventId, aResult );
+	
+	TEvtEventId evtId = aEvent->EventId();
+	TBool repeat = aEvent->Repeat();
+	
+	// Delete the previous running instance of the server
+	delete iEvtNotifierHandler;
+	iEvtNotifierHandler = NULL;
+	
+	switch( aResult )
+		{
+		case EOpenTrigger:
+		case EShowDetails:
+			{
+			EVTUIDEBUG( "Open Event" );
+			
+	        TBuf8< KEvtCommandMessageLength > buffer;
+	        buffer.AppendNum( evtId );
+	        buffer.Append( KDelimiter );
+	        buffer.AppendNum( aResult );
+	        buffer.Append( KDelimiter );
+	        
+	        // Create a session to Windows server to check the running of 
+	        // handler ui
+		    RWsSession  ws;
+		    User::LeaveIfError( ws.Connect() );
+		    CleanupClosePushL( ws ); // pushing to cleanupstack
+		    
+		    // Check if Handler Application is already running. Incase its
+		    // send the command message to the application
+		    TApaTaskList taskList( ws );
+		    TApaTask task = taskList.FindApp( TUid::Uid( KHandlerAppUid ) );
+		    if ( task.Exists() )
+		        {
+		        // Bring the task to the foreground and send a message to it.		        	       
+		        task.BringToForeground();
+		        User::LeaveIfError( task.SendMessage( TUid::Uid( KUidApaMessageSwitchOpenFileValue ), buffer ));		        
+		        }
+		    else
+		    	{
+
+		    	// Start and instance of the new application
+		    	LaunchAppL( TUid::Uid( KHandlerAppUid), buffer );			    
+	            }
+	        CleanupStack::PopAndDestroy();	// ws	
+	        
+	        // Remove if it was present in Snooze Que
+			TTime time;
+			time.HomeTime();
+			TEvtSnoozeItem snoozeItem( iEventsQueue[0].iEventId, iEventsQueue[0].iAccuracy, time );
+            iEvtSnoozeHandler->RemoveIfPresent( snoozeItem );		    		
+	        break;
+			}		
+		case ESnoozeTrigger:
+			{
+			EVTUIDEBUG( "Snooze Event" );		
+			TTime time;
+			time.HomeTime();
+			TEvtSnoozeItem snoozeItem( iEventsQueue[0].iEventId, iEventsQueue[0].iAccuracy, time );
+			iEvtSnoozeHandler->Snooze( snoozeItem );
+            break;			
+			}
+		case ECloseInfoNote:
+			{
+			EVTUIDEBUG( "Closing Note" );	
+            
+            // Update State if needed.
+            if( !repeat )
+                ChangeStateL( evtId );
+            
+	        // Remove if it was present in Snooze Que
+			TTime time;
+			time.HomeTime();
+			TEvtSnoozeItem snoozeItem( iEventsQueue[0].iEventId, iEventsQueue[0].iAccuracy, time );
+            iEvtSnoozeHandler->RemoveIfPresent( snoozeItem );		
+            break;			
+			}
+		default:
+		    {
+	        // Remove if it was present in Snooze Que
+			TTime time;
+			time.HomeTime();
+			TEvtSnoozeItem snoozeItem( iEventsQueue[0].iEventId, iEventsQueue[0].iAccuracy, time );
+            iEvtSnoozeHandler->RemoveIfPresent( snoozeItem );	
+		    break;    
+		    }					
+		}
+			
+    // The note has been handled. Remove the note from the queue		
+	iEventsQueue.Remove( 0 );
+	
+	HandleNextEventL();	
+    EVTUIDEBUG( "- CEvtHandlerServer::HandlerCompleteL()" );
+	}
+
+// ---------------------------------------------------------------------------
+// CEvtHandlerServer::ChangeStateL() 
+// ---------------------------------------------------------------------------
+//
+void CEvtHandlerServer::ChangeStateL( TEvtEventId aEvtId )
+    {  
+    EVTUIDEBUG1( "Change State of %d", aEvtId );
+    TBuf16< KEvtCommandMessageLength > buffer;
+    buffer.AppendNum( EEvtActionChangeState );
+    buffer.Append( KDelimiter );
+    buffer.AppendNum( aEvtId );
+
+    RProcess proc;
+    TInt retVal = proc.Create( KHandlerEXE(), buffer);
+    if(retVal == KErrNone)
+        {
+        proc.Resume();
+        }
+    proc.Close();
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtHandlerServer::LaunchAppL() 
+// ---------------------------------------------------------------------------
+//
+void CEvtHandlerServer::LaunchAppL(
+                                TUid                    aApplicationUid,
+                          const TDesC8&                  aCmdLineArg )
+    {  
+    DEBUG("+ CEvtHandlerServer::LaunchAppL");
+    
+    // Create the Session handle and connect to the Application architecture
+    // server. This is required to obtain the details of the application from
+    // the Application UID.
+    RApaLsSession lsSession;
+    User::LeaveIfError( lsSession.Connect() );
+    CleanupClosePushL( lsSession );
+		            
+    DEBUG("+ CEvtHandlerServer::LaunchAppL - Get the Application Information");
+    // Get the Application Information.
+    TApaAppInfo appInfo;    
+    TInt error = lsSession.GetAppInfo( appInfo, aApplicationUid );
+    if ( error )
+    	{
+    	EVTUIDEBUG1("Get the Application Information Error : %d", error );
+    	User::Leave( error );
+    	}
+    
+    DEBUG("+ CEvtHandlerServer::LaunchAppL - Fill the command line argument structure");
+    // Fill the command line argument structure
+    CApaCommandLine* cmdLine = CApaCommandLine::NewLC();
+    
+    DEBUG("+ CEvtHandlerServer::LaunchAppL - Set the Application name");
+    // Set the Application name.    
+    TFileName appName = appInfo.iFullName;
+    cmdLine->SetExecutableNameL( appName );
+    
+    DEBUG("+ CEvtHandlerServer::LaunchAppL - Set the Command");
+    // Set the Command
+    cmdLine->SetCommandL( EApaCommandRun );
+
+    DEBUG("+ CEvtHandlerServer::LaunchAppL - Set the Command line arguments");
+    // Set the Command line arguments.
+    if ( aCmdLineArg.Length())
+        {
+        // These arguments would be sent as Tail end arguments to the launched
+        // Application. Its left to the application to handle those
+        HBufC8* tailEnd = HBufC8::NewLC( aCmdLineArg.Length());
+        tailEnd->Des().Copy( aCmdLineArg );
+        
+        // The Tail end buffer is copied to the Command line structure. Hence,
+        // can delete this variable after the set operation succeeds.
+        cmdLine->SetTailEndL( tailEnd->Des());
+        
+        CleanupStack::PopAndDestroy( tailEnd );
+        }
+
+    DEBUG("+ CEvtHandlerServer::LaunchAppL - Start the Application");
+	// Start the Application
+	User::LeaveIfError( lsSession.StartApp( *cmdLine ));
+    
+    // Clean up all the allocated heap variables.
+    CleanupStack::PopAndDestroy( cmdLine );
+    CleanupStack::PopAndDestroy(); //lsSession 		         
+    
+    DEBUG("- CEvtHandlerServer::LaunchAppL");
+    }
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventshandlerui/eventshandlerserver/src/evthandlerserversession.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,97 @@
+/*
+* 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:  session handling for Events Handler Server
+*
+*/
+
+
+#include <AknGlobalNote.h> 	// CAknGlobalNote
+
+#include "evthandlerserverconsts.h"
+#include "evthandlerclientserver.h"
+#include "evthandlerserverpanic.h"
+#include "evtdebug.h"
+
+#include "evthandlerserversession.h"
+
+// ---------------------------------------------------------------------------
+// CEvtHandlerServerSession::CreateL()
+// ---------------------------------------------------------------------------
+//
+void CEvtHandlerServerSession::CreateL()
+	{
+	}
+
+// ---------------------------------------------------------------------------
+// CEvtHandlerServerSession::~CEvtHandlerServerSession()
+// ---------------------------------------------------------------------------
+//
+CEvtHandlerServerSession::~CEvtHandlerServerSession()
+	{
+	}
+
+// ---------------------------------------------------------------------------
+// CEvtHandlerServerSession::ServiceL()
+// ---------------------------------------------------------------------------
+//
+void CEvtHandlerServerSession::ServiceL( const RMessage2& aMessage )
+	{
+    EVTUIDEBUG( "+ CEvtHandlerServerSession::ServiceL()" );
+    TInt function = aMessage.Function();
+	switch ( function )
+		{
+		case ESendEventId:
+			{
+			EVTUIDEBUG( "Received Client Message" );
+			// Read the Event ID from the message structure
+            TBuf<KMaxEvtHandlerMessage> message;
+            aMessage.ReadL( 0, message );
+			
+            TInt64 eventId = 0;	
+            TLex lex( message );
+            User::LeaveIfError( lex.Val( eventId ));	
+			
+			// Get the Accuracy Value
+			TInt accuracy = aMessage.Int1();
+				
+			// Pass it along to the server to handle the message
+			Server().HandleNewEventL( eventId, accuracy );
+		    
+		    // Successful handling complete. Complete the outstanding message
+		    aMessage.Complete( KErrNone );	
+			break;
+			}
+		default:
+			{
+			aMessage.Complete( KErrArgument );
+			break;
+			}
+		}
+    EVTUIDEBUG( "- CEvtHandlerServerSession::ServiceL()" );
+	}
+
+// ---------------------------------------------------------------------------
+// CEvtHandlerServerSession::ServiceError()
+// ---------------------------------------------------------------------------
+//
+void CEvtHandlerServerSession::ServiceError( 
+                                    const RMessage2& aMessage, 
+                                          TInt      aError )
+	{
+    EVTUIDEBUG( "+ CEvtHandlerServerSession::ServiceError()" );
+	aMessage.Complete( aError );
+    EVTUIDEBUG( "- CEvtHandlerServerSession::ServiceError()" );
+	}
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventshandlerui/eventshandlerserver/src/evthandlerserverstartup.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,126 @@
+/*
+* 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:  Server Main for Events Handler Server
+*
+*/
+
+// SYSTEM INCLUDES
+#include <e32std.h>
+#include <e32base.h>
+#include <coemain.h>
+#include <eikenv.h>
+#include <eikproc.h>
+
+// USER INCLUDES
+#include "evthandlerserver.h"
+#include "evthandlerclientserver.h"
+#include "evthandlerserverstartup.h"
+#include "evtserverappui.h"
+#include "evtserverapp.h"
+#include "evtserverappdocument.h"
+#include "evtdebug.h"
+
+// ---------------------------------------------------------------------------
+// void EvtHandlerServerStartup::StartEvtHandlerServerL()
+// ---------------------------------------------------------------------------
+//
+void EvtHandlerServerStartup::StartEvtHandlerServerL()
+/*
+ * Perform all server initialisation, in particular creation of the
+ * scheduler and server and then run the scheduler
+ */
+	{
+    EVTUIDEBUG( "+ EvtHandlerServerStartup::StartEvtHandlerServerL()" );
+
+	// naming the server thread after the server helps to debug panics
+	User::LeaveIfError( RThread::RenameMe( KEvtHandlerServerName ) );
+	//
+	// create the server (leave it on the cleanup stack)
+	CEvtHandlerServer::NewLC();
+	//
+	// Initialisation complete, now signal the client
+	RProcess::Rendezvous( KErrNone );
+	//
+	// Ready to run - Start the Scheduler
+	CEikonEnv::Static()->Execute();
+	//
+	// Cleanup the server
+	CleanupStack::PopAndDestroy( );
+
+    EVTUIDEBUG( "- EvtHandlerServerStartup::StartEvtHandlerServerL()" );
+	}
+
+// ---------------------------------------------------------------------------
+// TInt EvtHandlerServerStartup::StartEvtHandlerServer()
+// ---------------------------------------------------------------------------
+//
+TInt EvtHandlerServerStartup::StartEvtHandlerServer()
+    {
+    EVTUIDEBUG( "+ EvtHandlerServerStartup::StartEvtHandlerServer()" );
+    __UHEAP_MARK;
+    TInt ret = KErrNoMemory;
+	// We need the Control Environment for handling Key lock while launching the Global note
+	// We need AppUi to Hide the Server from Fast Swap Window(FSW).
+    CEikonEnv* env = new CEikonEnv();
+    if ( env )
+        {
+		TRAP(ret, env->ConstructL());
+	    if( !ret && env->AppUi() == NULL )
+	    {
+        CApaApplication* app = new CEvtServerApp;
+        if ( app )
+            {
+            env->WsSession().Flush();
+            CEikDocument* doc = NULL;
+            TRAP_IGNORE( doc = static_cast<CEikDocument*>(app->CreateDocumentL( env->Process() )) );
+            if( doc )
+                {
+                CEikAppUi* appUi = NULL;
+                TRAP_IGNORE( appUi = static_cast<CEikAppUi*>( doc->CreateAppUiL() ) );
+                if(appUi)
+                    {
+                    appUi->SetDocument( doc );
+                    TRAPD( err, appUi->ConstructL());
+                    if(!err)
+                        {
+                        env->SetAppUi( appUi );
+                        TRAP( ret, StartEvtHandlerServerL() );
+                        }
+                    appUi->SetDocument( NULL );
+                    }
+                delete doc;
+                }
+            delete app;
+            }
+	    }
+        env->PrepareToExit();
+        env->DestroyEnvironment();
+        }
+    __UHEAP_MARKEND;
+    EVTUIDEBUG1( "- EvtHandlerServerStartup::StartEvtHandlerServer()", ret );
+    return ret;    
+    }
+
+// -----------------------------------------------------------------------------
+// TInt E32Main
+// Server process entry-point
+// -----------------------------------------------------------------------------
+//
+TInt E32Main()
+    {
+    EVTUIDEBUG( "+ E32Main() start" );    
+    return EvtHandlerServerStartup::StartEvtHandlerServer();        
+    }    
+                                                               
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventshandlerui/eventshandlerserver/src/evthandlershutdowntimer.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,37 @@
+/*
+* 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:  Shutdown Timer for Events Handler Server
+*
+*/
+
+
+#include "evthandlerclientserver.h"
+#include "evthandlershutdowntimer.h"
+#include "evtdebug.h"
+
+// ---------------------------------------------------------------------------
+// CEvtHandlerShutdownTimer::RunL()
+// ---------------------------------------------------------------------------
+//
+void CEvtHandlerShutdownTimer::RunL()
+//
+// Initiate server exit when the timer expires
+//
+    {
+    EVTUIDEBUG( "+ CEvtHandlerShutdownTimer::RunL()" );
+	CActiveScheduler::Stop();
+    EVTUIDEBUG( "- CEvtHandlerShutdownTimer::RunL()" );
+	}
+
+// end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventshandlerui/eventshandlerserver/src/evtnotifierhandler.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,280 @@
+/*
+* 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:  Handler for notifier on Event
+*
+*/
+
+
+// INCLUDE FILES
+#include <e32std.h>
+#include <AknGlobalNote.h>  // CAknGlobalNote
+
+#include "evtdebug.h"
+#include "evtnotifierhandler.h"
+#include "evtnotifierobserver.h"
+#include "evttoneaction.h"
+#include "evtglobalquery.h"
+
+// EXTERNAL DATA STRUCTURES
+
+// EXTERNAL FUNCTION PROTOTYPES  
+
+// CONSTANTS
+//S60 Event Notifier plugin id
+const TUid KEvtNotifierUidS60 = { 0x2001E66C };
+
+// MACROS
+
+// LOCAL CONSTANTS AND MACROS
+
+// MODULE DATA STRUCTURES
+
+// LOCAL FUNCTION PROTOTYPES
+
+// FORWARD DECLARATIONS
+
+// ============================= LOCAL FUNCTIONS ===============================
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CEvtNotifierHandler::NewL
+// -----------------------------------------------------------------------------
+CEvtNotifierHandler* CEvtNotifierHandler::NewL(
+        	MEvtNotifierObserver& aNotifierObserver,
+        	TEvtEventInfo aEventInfo )
+    {
+    CEvtNotifierHandler* self = new ( ELeave ) CEvtNotifierHandler( aNotifierObserver, aEventInfo );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop();
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CEvtNotifierHandler::CEvtNotifierHandler
+// -----------------------------------------------------------------------------
+CEvtNotifierHandler::CEvtNotifierHandler( 
+	MEvtNotifierObserver& aNotifierObserver, TEvtEventInfo aEventInfo )
+    : CActive( EPriorityStandard ), 
+      iNotifierObserver( aNotifierObserver ),iEventInfo(aEventInfo)
+    {
+    CActiveScheduler::Add( this );
+    }
+
+// -----------------------------------------------------------------------------
+// CEvtNotifierHandler::~CEvtNotifierHandler
+// -----------------------------------------------------------------------------
+CEvtNotifierHandler::~CEvtNotifierHandler()
+    {
+    delete iInputParam;
+    delete iInputBuffer;
+    
+    Cancel();
+    
+    if(iEvtGlobalQuery)
+        {
+        delete iEvtGlobalQuery;
+        iEvtGlobalQuery = NULL;
+        }
+        
+    iNotifier.Close();
+    
+    delete iEvent;
+    delete iEventManager;
+    }
+
+// -----------------------------------------------------------------------------
+// CEvtNotifierHandler::ConstructL
+// -----------------------------------------------------------------------------
+void CEvtNotifierHandler::ConstructL()
+    {
+    EVTUIDEBUG("+ CEvtNotifierHandler::ConstructL");    
+    iInputBuffer = CBufFlat::NewL( KEvtNotifierBufferLength );        
+    iInputParam  = CEvtInfoNoteInputParam::NewL();    
+    iResponseBuffer.Zero();
+    iResponseBuffer.SetLength( KEventIdLength );  
+    iEventManager = CEvtEventManager::NewL();
+    EVTUIDEBUG( "- CEvtNotifierHandler::ConstructL" );
+    }
+
+// -----------------------------------------------------------------------------
+// CEvtNotifierHandler::IsLaunchable
+// -----------------------------------------------------------------------------
+TBool CEvtNotifierHandler::IsLaunchable()
+	{    
+    EVTUIDEBUG( "+ CEvtNotifierHandler::IsLaunchable" );	
+	TBool launchable = EFalse;
+	
+    TRAPD( evtErr, iEvent = iEventManager->GetEventL( iEventInfo.iEventId ) );
+    if( !evtErr && iEvent && iEvent->EventStatus() == EActive )
+		{
+		launchable = ETrue;
+		}
+		
+    return launchable;
+	}
+
+// -----------------------------------------------------------------------------
+// CEvtNotifierHandler::StartEvtNotifier
+// -----------------------------------------------------------------------------
+void CEvtNotifierHandler::StartEvtNotifierL()
+	{    
+    EVTUIDEBUG( "+ CEvtNotifierHandler::StartEvtNotifierL" );	
+	
+    if( iEvent )
+    	{
+    	CEvtInfoNoteInputParam::TEvtTriggerAccuracy accuracy;
+    	accuracy = static_cast<	CEvtInfoNoteInputParam::TEvtTriggerAccuracy>(iEventInfo.iAccuracy);
+		// set the subject and description of notifier
+	    iInputParam->SetSubjectL( iEvent->Subject() );
+	    iInputParam->SetDescriptionL( iEvent->Description() );
+	    iInputParam->SetTrigerringAccuracy( accuracy );    
+	    iInputParam->SetToneEnabled( iEventInfo.iPlayTone );    	      
+	    iInputParam->SetShowSnooze( iEventInfo.iSnooze );
+        if( iEventInfo.iPlayTone && iEvent->HasAction() )
+            {      
+            // Populate the Tone.
+       		CEvtToneAction* tone = CEvtToneAction::NewLC();
+            tone->InternalizeL( iEvent->Action() );
+            iInputParam->SetToneL( tone->FileName() );
+            iInputParam->SetToneRepeat( tone->ToneLoop() );    
+        	CleanupStack::PopAndDestroy(tone);      
+            }
+        
+        EVTUIDEBUG( "Trigger Fired Event" );
+        
+        if(iEvent->Subject().Length())
+	        {
+	        TPtrC subject( iEvent->Subject() );        
+        	EVTUIDEBUG1( "Subject  = %S", &subject );	
+	        }
+        EVTUIDEBUG1( "Tigger ID  = %d", iEvent->EventId() );
+                
+	    RBufWriteStream writeStream( *iInputBuffer, 0 );
+	    CleanupClosePushL( writeStream );                
+	    
+	    iInputParam->ExternalizeL( writeStream );
+	    
+	    TPtr8 bufPtr( const_cast< TUint8 *>( iInputBuffer->Ptr( 0 ).Ptr() ),
+	                  iInputBuffer->Ptr( 0 ).Length(),
+	                  iInputBuffer->Ptr( 0 ).Length() );
+	                  
+	    iHandlerType = EHandlerNotifier;
+	    User::LeaveIfError( iNotifier.Connect());
+	    iNotifier.StartNotifierAndGetResponse( iStatus, KEvtNotifierUidS60, bufPtr, iResponseBuffer );
+	    SetActive();
+
+	    CleanupStack::Pop(); // writeStream	    	
+    	}	    
+    EVTUIDEBUG( "- CEvtNotifierHandler::StartEvtNotifierL" );
+	}
+
+// -----------------------------------------------------------------------------
+// CEvtNotifierHandler::RunL
+// -----------------------------------------------------------------------------
+void CEvtNotifierHandler::RunL()
+    {
+    EVTUIDEBUG1( "+ CEvtNotifierHandler::RunL %d", iStatus.Int() );
+    TEvtInfoNoteResult result = ECloseInfoNote; 
+    switch( iStatus.Int() )
+        {
+        case KErrNone:
+            {
+    	    TInt retVal = 0;
+    	    TLex8  lexer( iResponseBuffer );
+    	    TInt   error = lexer.Val( retVal );    
+    	    
+    	    EVTUIDEBUG1( "Event %d", retVal ); 
+    	    switch( retVal )
+    	    	{
+    			case EOpenTrigger:
+    				{
+    				result = EOpenTrigger;
+    				break;				
+    				}			
+    			case EShowDetails:
+    				{
+    				result = EShowDetails;
+    				break;				
+    				}		 
+                case ESnoozeTrigger:
+                    {
+                    result = ESnoozeTrigger;
+                    break;              
+                    }   
+    			case ECloseInfoNote:
+    			default:
+    				{
+    				result = ECloseInfoNote;
+    				break;				
+    				}  			
+    	    	}
+            // Complete the event note launching
+            iNotifierObserver.HandlerCompleteL( result, iEvent ); 
+            break;
+            }
+		default:
+			{
+			if(iHandlerType == EHandlerNotifier)
+			    {
+			    iHandlerType = EHandlerGlobalNote;
+                iStatus = KRequestPending;
+				if(iEvtGlobalQuery)
+					{
+					delete iEvtGlobalQuery;
+					iEvtGlobalQuery = NULL;
+					}
+                iEvtGlobalQuery = CEvtGlobalQuery::NewL(*iInputParam);
+                iEvtGlobalQuery->StartGlobalQueryL( iStatus, iResponseBuffer );
+                SetActive();
+			    }
+			else
+			    {
+			    // Complete the event note launching
+		        iNotifierObserver.HandlerCompleteL( result, iEvent ); 
+			    }
+			break;				
+			}
+        }
+        
+    EVTUIDEBUG( "- CEvtNotifierHandler::RunL" );
+    }
+
+// -----------------------------------------------------------------------------
+// CEvtNotifierHandler::DoCancel
+// -----------------------------------------------------------------------------
+void CEvtNotifierHandler::DoCancel()
+    {
+    EVTUIDEBUG( "+ CEvtNotifierHandler::DoCancel()" );
+	if(iHandlerType == EHandlerNotifier)
+	    {
+    	iNotifier.CancelNotifier( KEvtNotifierUidS60 );
+		}
+	else
+		{
+		iEvtGlobalQuery->CancelDialog();
+		}
+    EVTUIDEBUG( "- CEvtNotifierHandler::DoCancel()" );
+    }
+
+// -----------------------------------------------------------------------------
+// CEvtNotifierHandler::RunError
+// -----------------------------------------------------------------------------
+TInt CEvtNotifierHandler::RunError( TInt /*aError*/ )
+    {
+    return KErrNone;    
+    }
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventshandlerui/eventshandlerserver/src/evtserverapp.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,50 @@
+/*
+* 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:  Application class for Events Handler Server.
+*
+*/
+
+
+// SYSTEM INCLUDES
+#include <eikstart.h>
+
+// USER INCLUDES
+#include "evtserverapp.h"
+#include "evtserverappdocument.h"
+#include "evthandlerserveruid.hrh"
+
+// ------------------------ Local Functions ----------------------------------
+
+// ----------------- Member funtions for CEvtServerApp ------------------------------
+	
+// ---------------------------------------------------------------------------
+// TUid CEvtServerApp::AppDllUid
+// ---------------------------------------------------------------------------
+//
+TUid CEvtServerApp::AppDllUid() const
+    {
+    return TUid::Uid( KEvtHandlerServerUid );
+    }
+
+// ---------------------------------------------------------------------------
+// CApaDocument* CEvtServerApp::CreateDocumentL
+// ---------------------------------------------------------------------------
+//
+CApaDocument* CEvtServerApp::CreateDocumentL()
+    {
+    return new (ELeave) CEvtServerAppDocument( *this );
+    }
+
+// End of File  
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventshandlerui/eventshandlerserver/src/evtserverappdocument.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,73 @@
+/*
+* 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:  Document class for Events Handler Server.
+*
+*/
+
+
+// INCLUDE FILES
+#include "evtserverappdocument.h"
+#include "evtserverappui.h"
+
+// ----------------- Member funtions for CEvtServerAppDocument class ------------------
+
+// ---------------------------------------------------------------------------
+// CEvtServerAppDocument::CEvtServerAppDocument
+// ---------------------------------------------------------------------------
+//
+CEvtServerAppDocument::CEvtServerAppDocument( CEikApplication&  aApp )
+	:CAknDocument( aApp )    
+    {
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtServerAppDocument::~CEvtServerAppDocument
+// ---------------------------------------------------------------------------
+//
+CEvtServerAppDocument::~CEvtServerAppDocument()
+    { 
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtServerAppDocument* CEvtServerAppDocument::NewL
+// ---------------------------------------------------------------------------
+//
+CEvtServerAppDocument* CEvtServerAppDocument::NewL( CEikApplication&    aApp )     
+    {
+    CEvtServerAppDocument* self = new (ELeave) CEvtServerAppDocument( aApp );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop();
+    
+    return self;
+    }
+    
+// ---------------------------------------------------------------------------
+// CEvtServerAppDocument::ConstructL
+// ---------------------------------------------------------------------------
+//
+void CEvtServerAppDocument::ConstructL()
+    {
+    }
+    
+// ---------------------------------------------------------------------------
+// CEvtServerAppDocument::CEvtServerAppDocument
+// ---------------------------------------------------------------------------
+//    
+CEikAppUi* CEvtServerAppDocument::CreateAppUiL()
+    {
+    return new (ELeave) CEvtServerAppUi;
+    }
+
+// End of File  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventshandlerui/eventshandlerserver/src/evtserverappui.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,89 @@
+/*
+* 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:  Events Handler Server App Ui.
+*
+*/
+ 
+//#include <internaleventdispatcher.h>
+#include "evtserverappui.h"
+#include "evtdebug.h"
+
+
+// -----------------------------------------------------------------------------
+// CEvtServerAppUi::ConstructL()
+// Symbian 2nd phase constructor can leave.
+// -----------------------------------------------------------------------------
+//
+void CEvtServerAppUi::ConstructL()
+{
+    // Initialise app UI with no resource file.
+    BaseConstructL( ENoAppResourceFile );
+
+    // Hide S60 signal strength icons etc.
+    //StatusPane()->MakeVisible( EFalse );
+    
+    // Disable Focus
+    //iCoeEnv->RootWin().EnableReceiptOfFocus(EFalse);
+
+    EVTUIDEBUG( "= before HideApplicationFromFSW( ETrue )" );
+    // Send to background
+    TApaTask task(iEikonEnv->WsSession());
+    task.SetWgId( CEikonEnv::Static()->RootWin().Identifier());
+    task.SendToBackground();
+    
+    // Hide from Fast swap
+    HideApplicationFromFSW( ETrue );
+    EVTUIDEBUG( "= after HideApplicationFromFSW( ETrue )" );
+}
+
+// -----------------------------------------------------------------------------
+// CEvtServerAppUi::CEvtServerAppUi()
+// C++ default constructor can NOT contain any code, that might leave.
+// -----------------------------------------------------------------------------
+//
+CEvtServerAppUi::CEvtServerAppUi() : iEventReceiver( NULL )
+{
+  
+}
+
+// -----------------------------------------------------------------------------
+// CEvtServerAppUi::~CEvtServerAppUi()
+// Destructor.
+// -----------------------------------------------------------------------------
+//
+CEvtServerAppUi::~CEvtServerAppUi()
+{
+    
+}
+
+// -----------------------------------------------------------------------------
+// CEvtServerAppUi::HandleWsEventL
+// Takes care of WsSwssion events
+// -----------------------------------------------------------------------------
+//
+void CEvtServerAppUi::HandleWsEventL( const TWsEvent &aEvent, CCoeControl *aDestination )
+{
+    CAknAppUi::HandleWsEventL( aEvent,aDestination );
+}
+
+// -----------------------------------------------------------------------------
+// CEvtServerAppUi::HandleCommandL()
+// Sets the event reciever
+// -----------------------------------------------------------------------------
+//
+void CEvtServerAppUi::SetEventReceiver( CEventReceiver& aEventReceiver )
+{
+    iEventReceiver = &aEventReceiver;
+}
+//end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventshandlerui/eventshandlerserver/src/evtsnoozehandler.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,295 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Handler for Snoozing of Event
+*
+*/
+
+
+// INCLUDE FILES
+#include <centralrepository.h>
+
+#include "evthandlerserverconsts.h"
+#include "evtdebug.h"
+#include "evtsnoozehandler.h"
+#include "evtstoragedomaincrkeys.h"
+
+// EXTERNAL DATA STRUCTURES
+
+// EXTERNAL FUNCTION PROTOTYPES  
+
+// CONSTANTS
+
+// MACROS
+
+// LOCAL CONSTANTS AND MACROS
+
+// MODULE DATA STRUCTURES
+
+// LOCAL FUNCTION PROTOTYPES
+
+// FORWARD DECLARATIONS
+
+// ============================= LOCAL FUNCTIONS ===============================
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CEvtSnoozeHandler::NewL
+// -----------------------------------------------------------------------------
+CEvtSnoozeHandler* CEvtSnoozeHandler::NewL(
+        	MEvtSnoozeObserver& aSnoozeObserver )
+    {
+    CEvtSnoozeHandler* self = new ( ELeave ) CEvtSnoozeHandler( aSnoozeObserver );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop();
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CEvtSnoozeHandler::CEvtSnoozeHandler
+// -----------------------------------------------------------------------------
+CEvtSnoozeHandler::CEvtSnoozeHandler( 
+	MEvtSnoozeObserver& aSnoozeObserver )
+    : CTimer( EPriorityStandard ), iSnoozeObserver( aSnoozeObserver ), 
+		iSnoozeQueue( KEvtItemArrayGranularity ), 
+		iSnoozeCompleteQueue( KEvtItemArrayGranularity )
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CEvtSnoozeHandler::~CEvtSnoozeHandler
+// -----------------------------------------------------------------------------
+CEvtSnoozeHandler::~CEvtSnoozeHandler()
+    {
+	if( iIntervalNotifyHandler )
+		{
+		iIntervalNotifyHandler->StopListening();
+		}
+
+	if( iPeriodNotifyHandler )
+		{
+		iPeriodNotifyHandler->StopListening();
+		}
+
+    delete iIntervalNotifyHandler;
+	delete iPeriodNotifyHandler;
+	delete iSettingSession;
+	
+	iSnoozeQueue.Reset();
+    iSnoozeQueue.Close();
+	iSnoozeCompleteQueue.Reset();
+    iSnoozeCompleteQueue.Close();
+    }
+
+// -----------------------------------------------------------------------------
+// CEvtSnoozeHandler::ConstructL
+// -----------------------------------------------------------------------------
+void CEvtSnoozeHandler::ConstructL()
+    {
+    EVTUIDEBUG("+ CEvtSnoozeHandler::ConstructL");    
+    CTimer::ConstructL();
+    CActiveScheduler::Add( this );
+    
+	// Create the Session to EventsUi Settings
+	iSettingSession = CRepository::NewL( TUid::Uid( KCRUidEvtStorageDb ) );
+	
+	// Create the Cenrep Key observer for Interval and Period.
+    iIntervalNotifyHandler = CCenRepNotifyHandler::NewL(*this,
+                                                     *iSettingSession,
+                                                     CCenRepNotifyHandler::EIntKey,
+                                                     KEvtSnoozeInterval);
+
+	iPeriodNotifyHandler = CCenRepNotifyHandler::NewL(*this,
+                                                     *iSettingSession,
+                                                     CCenRepNotifyHandler::EIntKey,
+                                                     KEvtSnoozePeriod);
+
+	// Get the Initial values from settings.
+    TInt period;
+	User::LeaveIfError( iSettingSession->Get( KEvtSnoozeInterval, iSnoozeInterval ) );
+    User::LeaveIfError( iSettingSession->Get( KEvtSnoozePeriod, period ) );
+
+	// Start Listening.
+    iIntervalNotifyHandler->StartListeningL();
+    iPeriodNotifyHandler->StartListeningL();
+    
+    iSnoozeCount = 1;
+    if( period && iSnoozeInterval/period )
+        iSnoozeCount = iSnoozeInterval/period;
+        
+    EVTUIDEBUG( "- CEvtSnoozeHandler::ConstructL" );
+    }
+
+// -----------------------------------------------------------------------------
+// CEvtSnoozeHandler::RemoveIfPresent
+// -----------------------------------------------------------------------------
+void CEvtSnoozeHandler::RemoveIfPresent(const TEvtSnoozeItem& aSnoozeItem)
+	{    
+    EVTUIDEBUG( "+ CEvtSnoozeHandler::RemoveIfPresent" );	
+    
+    // Remove if already present
+    TIdentityRelation<TEvtSnoozeItem> matcher(TEvtSnoozeItem::Match);
+    TInt index = iSnoozeCompleteQueue.Find(aSnoozeItem,matcher);
+
+    if( index != KErrNotFound )
+        { 
+        iSnoozeCompleteQueue.Remove( index );
+        }
+    else
+        {
+        index = iSnoozeQueue.Find(aSnoozeItem,matcher);
+        if( index != KErrNotFound )
+            { 
+            iSnoozeQueue.Remove( index );
+            
+            // Cancel the timer if it is already snoozing for
+            // requested event id
+            if( index == 0 )
+                {
+                Cancel();
+                
+                // Start the Timer for next Item
+                if( !IsActive() && iSnoozeQueue.Count() )
+                    At( iSnoozeQueue[ 0 ].iTime );
+                }
+            }
+        }
+    
+    EVTUIDEBUG( "- CEvtSnoozeHandler::RemoveIfPresent" );
+	}
+
+// -----------------------------------------------------------------------------
+// CEvtSnoozeHandler::IsSnoozeQueEmpty
+// -----------------------------------------------------------------------------
+TBool CEvtSnoozeHandler::IsSnoozeQueEmpty()
+	{    
+    EVTUIDEBUG( "+ CEvtSnoozeHandler::IsSnoozeQueEmpty" );	
+    
+    if( IsActive() || iSnoozeCompleteQueue.Count() || iSnoozeCompleteQueue.Count() )
+        { 
+        return EFalse;
+        }
+    return ETrue;
+	}
+
+// -----------------------------------------------------------------------------
+// CEvtSnoozeHandler::Snooze
+// -----------------------------------------------------------------------------
+void CEvtSnoozeHandler::Snooze(TEvtSnoozeItem aSnoozeItem)
+	{    
+    EVTUIDEBUG( "+ CEvtSnoozeHandler::Snooze" );	
+    
+    TTimeIntervalMinutes interval(iSnoozeInterval); 
+    aSnoozeItem.iTime.HomeTime();
+    
+    // Add the Snooze Time
+    aSnoozeItem.iTime = aSnoozeItem.iTime + interval;
+     
+    TIdentityRelation<TEvtSnoozeItem> matcher(TEvtSnoozeItem::Match);
+    TInt index = iSnoozeCompleteQueue.Find(aSnoozeItem,matcher);
+
+    if( index != KErrNotFound )
+        { 
+        // Increment Snooze count
+        aSnoozeItem.iCount = iSnoozeCompleteQueue[index].iCount + 1;
+        
+        // Remove the already present item
+        iSnoozeCompleteQueue.Remove( index );
+        }
+    else
+        {
+        index = iSnoozeQueue.Find(aSnoozeItem,matcher);
+        if( index != KErrNotFound )
+            { 
+            // Cancel the timer if it is already snoozing for
+            // requested event id
+            if( index == 0 )
+                {
+                Cancel();
+                }
+            
+            // Increment Snooze count
+            aSnoozeItem.iCount = iSnoozeQueue[index].iCount + 1;
+            
+            // Remove the already present item
+            iSnoozeQueue.Remove( index );
+            }
+        else
+            {
+            // First Snooze
+            aSnoozeItem.iCount = 1;
+            }
+        }
+    
+    // Append this element to the queue
+    iSnoozeQueue.Append( aSnoozeItem );
+    
+    // Start the Timer if it is not already started
+    if(!IsActive())
+        At( iSnoozeQueue[ 0 ].iTime );
+    
+    EVTUIDEBUG( "- CEvtSnoozeHandler::Snooze" );
+	}
+
+// -----------------------------------------------------------------------------
+// CEvtSnoozeHandler::RunL
+// -----------------------------------------------------------------------------
+void CEvtSnoozeHandler::RunL()
+    {
+    EVTUIDEBUG1( "+ CEvtSnoozeHandler::RunL %d", iStatus.Int() );
+    
+    if( iSnoozeQueue.Count() > 1 )
+        At( iSnoozeQueue[ 1 ].iTime );
+        
+    if( iSnoozeQueue[ 0 ].iCount < iSnoozeCount )
+        {
+        // Notify on Snooze complete
+        iSnoozeObserver.SnoozeCompleteL( iSnoozeQueue[ 0 ], ETrue ); 
+        
+        // Move the snooze item to complete
+        iSnoozeCompleteQueue.Append( iSnoozeQueue[ 0 ] );
+        iSnoozeQueue.Remove(0);
+        }
+    else
+        {
+        // Notify on Snooze complete
+        iSnoozeObserver.SnoozeCompleteL( iSnoozeQueue[ 0 ], EFalse); 
+        
+        // Remove Snoozed Item
+        iSnoozeQueue.Remove(0);
+        }
+        
+    EVTUIDEBUG( "- CEvtSnoozeHandler::RunL" );
+    }
+
+// -----------------------------------------------------------------------------
+// CEvtSnoozeHandler::HandleNotifyInt()
+// -----------------------------------------------------------------------------
+//
+void CEvtSnoozeHandler::HandleNotifyInt(TUint32 aId, TInt aNewValue)
+    {
+
+   	if ( aId == KEvtSnoozeInterval )
+   		{
+   		iSnoozeInterval = aNewValue;
+   		}
+   	else if ( aId == KEvtSnoozePeriod )
+		{
+        if( aNewValue && iSnoozeInterval/aNewValue )
+            iSnoozeCount = iSnoozeInterval/aNewValue;
+   		}
+    }
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventshandlerui/eventsnotifier/ecom/data/2001E66A.rss	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,56 @@
+/*
+* Copyright (c) 2001 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies 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 Resource file definition for Events Handler notifiers
+*
+*/
+
+
+// System Includes
+#include <ecom/registryinfo.rh>
+#include <uikon.hrh>
+
+// User Includes
+#include "evtnotifierpluginuid.hrh"
+
+// Constant Definitions
+#define KEVTNOTDISPLAYNAME "Events Notifier"
+#define KEVTNOTDEFAULTDATA "Events Notifier"
+#define KEVTNOTOPAQUEDATA  "0"
+
+/**
+ * ECOM Resource structure definition
+ */
+RESOURCE REGISTRY_INFO theInfo
+    {
+	dll_uid = KEvtNotiferPluginImplUid;
+	interfaces =
+	    {
+	    INTERFACE_INFO
+		    {
+		    interface_uid = KUikonUidPluginInterfaceNotifiers; // ECOM Notifier Plugin 
+		    implementations =
+				{
+				IMPLEMENTATION_INFO
+					{
+					implementation_uid = KEvtNotiferPluginImplUid;
+					version_no = 1;
+					display_name = KEVTNOTDISPLAYNAME;
+					default_data = KEVTNOTDEFAULTDATA;
+					opaque_data	 = KEVTNOTOPAQUEDATA;
+					}
+				};
+		    }
+	    };
+    }
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventshandlerui/eventsnotifier/ecom/group/bld.inf	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,31 @@
+/*
+* 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:  Build information file for project SUPL Notifiers
+*
+*/
+
+
+// Projects platforms
+PRJ_PLATFORMS
+DEFAULT
+
+// Project exports
+PRJ_EXPORTS
+
+// Project MMP files
+PRJ_MMPFILES
+evtnotifierplugin.mmp
+
+// Project test exports
+PRJ_TESTEXPORTS
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventshandlerui/eventsnotifier/ecom/group/evtnotifierplugin.mmp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,51 @@
+/*
+* 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:  Project definition file for project Events Handler notifiers
+*
+*/
+
+
+// System Includes
+#include <data_caging_paths.hrh>
+#include <platform_paths.hrh> // For the APP_LAYER_SYSTEMINCLUDE
+
+// User Includes
+#include "../inc/evtnotifierpluginuid.hrh"
+
+TARGET                  evtnotifierplugin.dll
+TARGETTYPE              PLUGIN
+UID                     0x10009D8D KEvtNotiferPluginImplUid
+
+CAPABILITY              CAP_ECOM_PLUGIN
+VENDORID                VID_DEFAULT
+
+USERINCLUDE		        . 
+USERINCLUDE		        ../inc
+USERINCLUDE             ../../inc
+USERINCLUDE             ../../../../inc
+
+// System Include
+APP_LAYER_SYSTEMINCLUDE
+
+SOURCEPATH              ../src
+SOURCE                  evtnotifierplugin.cpp             
+
+SOURCEPATH              ../data
+START RESOURCE          2001E66A.rss
+TARGET                  evtnotifierplugin.rsc
+END // RESOURCE
+
+LIBRARY 		        ecom.lib
+LIBRARY 		        euser.lib
+LIBRARY                 aknnotifierwrapper.lib evtutils.lib
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventshandlerui/eventsnotifier/ecom/inc/evtnotifierpluginuid.hrh	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,27 @@
+/*
+* 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:  UID definition for Events Notifer ECOM plugin
+*
+*/
+
+
+#ifndef EVTNOTIFIERPLUGINUID_HRH
+#define EVTNOTIFIERPLUGINUID_HRH
+
+/**
+ * UID Defintion for the Events UI Notifier ECOM plugin
+ */
+#define KEvtNotiferPluginImplUid 0x2001E66A
+
+#endif // EVTNOTIFIERPLUGINUID_HRH
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventshandlerui/eventsnotifier/ecom/src/evtnotifierplugin.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,120 @@
+/*
+* 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:  Entry function definition and ECOM plugin definition
+*
+*/
+
+
+// System Includes
+#include <ecom/implementationproxy.h>
+#include <AknNotifierWrapper.h>
+
+//User Includes
+#include "evtnotifierpluginuid.hrh"
+#include  "evtinfonoteinterface.h"
+#include "evtdebug.h"
+
+const MEikSrvNotifierBase2::TNotifierPriority KNotifierPriority = 
+                                        MEikSrvNotifierBase2::ENotifierPriorityHigh;
+                                        
+// Constant Definitions
+const TInt KMaxSynchReplyBufLength = 256;                                        
+	
+// ======== LOCAL FUNCTIONS ========
+
+// ---------------------------------------------------------------------------
+// Helper method to perform cleanup of the CArrayPtrFlat array object.
+// ---------------------------------------------------------------------------
+//
+void CleanupArray( TAny*        aArray )
+    {
+	EVTUIDEBUG( "+ CEvtInfoNotePlugin::CleanupArray" );
+    CArrayPtrFlat< MEikSrvNotifierBase2 >* subjects = 
+            static_cast< CArrayPtrFlat< MEikSrvNotifierBase2 >* >( aArray );
+    TInt lastInd = subjects->Count() - 1;
+    for ( TInt i = lastInd; i >= 0; i-- )
+        {
+        subjects->At( i )->Release();
+        }    	    
+    delete subjects;
+	EVTUIDEBUG( "- CEvtInfoNotePlugin::CleanupArray" );
+    }
+
+// ---------------------------------------------------------------------------
+// Creates an array of Notifer objects
+// ---------------------------------------------------------------------------
+//
+CArrayPtr< MEikSrvNotifierBase2 >* DoCreateNotifierArrayL()
+    {
+	EVTUIDEBUG( "+ CEvtInfoNotePlugin::DoCreateNotifierArrayL" );
+    // Create an array of Notifier objects
+    CArrayPtrFlat< MEikSrvNotifierBase2 >* subjects =
+                    new ( ELeave )CArrayPtrFlat< MEikSrvNotifierBase2 >( 3 );    
+    CleanupStack::PushL( TCleanupItem( CleanupArray, subjects ));
+
+    CAknCommonNotifierWrapper* master = 
+        CAknCommonNotifierWrapper::NewL( 
+                                    KEvtInfoNote,
+                                    KEvtInfoNoteChannel,
+                                    KNotifierPriority,
+                                    _L("evtinfonote.dll"),
+                                   KMaxSynchReplyBufLength);
+	  		   
+    subjects->AppendL( master );
+    
+    CleanupStack::Pop( subjects );
+	EVTUIDEBUG( "- CEvtInfoNotePlugin::DoCreateNotifierArrayL" );
+    return( subjects );
+    }
+
+// ---------------------------------------------------------------------------
+// ECOM plugin instantiation function
+// ---------------------------------------------------------------------------
+//
+CArrayPtr< MEikSrvNotifierBase2 >* NotifierArray()
+    {
+	EVTUIDEBUG( "+ CEvtInfoNotePlugin::NotifierArray" );
+    CArrayPtr< MEikSrvNotifierBase2 >* array = NULL;
+    TRAPD( error, array = DoCreateNotifierArrayL());
+    if ( error )
+        {
+        return NULL;
+        }
+	EVTUIDEBUG( "- CEvtInfoNotePlugin::NotifierArray" );
+    return array;
+    }
+
+/**
+ * Events UI Notifier ECom implementation table.
+ */
+const TImplementationProxy KEvtNotifiersImplTable[] = 
+	{
+	IMPLEMENTATION_PROXY_ENTRY( KEvtNotiferPluginImplUid, NotifierArray )
+	};
+
+// ======== GLOBAL FUNCTIONS ========
+
+// ---------------------------------------------------------------------------
+// ImplementationGroupProxy
+// Gate/factory function
+//
+// ---------------------------------------------------------------------------
+//
+EXPORT_C const TImplementationProxy* ImplementationGroupProxy( TInt& aTableCount )
+	{
+	EVTUIDEBUG( "+ CEvtInfoNotePlugin::ImplementationGroupProxy" );
+	aTableCount = sizeof( KEvtNotifiersImplTable ) / sizeof( TImplementationProxy );
+	EVTUIDEBUG( "- CEvtInfoNotePlugin::ImplementationGroupProxy" );
+	return KEvtNotifiersImplTable;
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventshandlerui/eventsnotifier/evtinfonote/bwins/evtinfonoteu.def	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,3 @@
+EXPORTS
+	?NotifierArray@@YAPAV?$CArrayPtr@VMEikSrvNotifierBase2@@@@XZ @ 1 NONAME ; class CArrayPtr<class MEikSrvNotifierBase2> * NotifierArray(void)
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventshandlerui/eventsnotifier/evtinfonote/data/evtinfonote.rss	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,201 @@
+/*
+* 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:  Resource definitions for project Events Info Note
+*
+*/
+
+
+// System Includes
+#include <data_caging_paths_strings.hrh>
+#include <bldvariant.hrh>
+#include <avkon.rh>
+#include <avkon.rsg>
+#include <avkon.mbg>
+#include <eikcore.rsg>
+#include <eikon.rh>
+#include <eikon.rsg>
+#include <avkon.loc>
+
+#include <evtui.loc>
+
+// User Includes
+#include "evtinfonoteconsts.hrh"
+
+//  RESOURCE IDENTIFIER
+NAME EVIN   // 4 Letter Identifier
+
+RESOURCE RSS_SIGNATURE 
+    {
+    }
+// ---------------------------------------------------------------------------
+// r_loc_evt_info_query
+// Query dialog communicating the triggering of an Events UI trigger
+// ---------------------------------------------------------------------------
+//
+RESOURCE DIALOG r_loc_evt_info_query
+    {
+    flags = EGeneralQueryFlags | EEikDialogFlagNoBorder | EEikDialogFlagNoShadow;
+    buttons = r_loc_evt_infonote_open_cba;
+    items =
+        {
+		DLG_LINE 
+	        {
+            type = EAknCtPopupHeadingPane;
+            id = EAknMessageQueryHeaderId;
+            control = AVKON_HEADING
+                {
+                headinglayout = R_AVKON_WML_SIGN_QUERY_HEADING_PANE;
+                };
+            },
+        DLG_LINE
+            {
+            type = EAknCtQuery;
+            id = EGeneralQuery;
+            control = AVKON_CONFIRMATION_QUERY
+                {
+                layout = EConfirmationQueryLayout;              
+                };
+            }           
+        };
+    }  
+
+// ---------------------------------------------------------------------------
+// RESOURCE CBA r_loc_evt_infonote_open_tone_cba
+// Control button array for query text when the tone is being played
+// ---------------------------------------------------------------------------
+//  
+RESOURCE CBA r_loc_evt_infonote_open_tone_cba
+    {
+    flags = 0;
+    buttons = 
+        {
+        CBA_BUTTON 
+            {
+            id = EEvtCmdOpenEvent; 
+            txt = text_softkey_open;
+            },
+        CBA_BUTTON 
+            {
+            id = EEvtCmdSilence; 
+            txt = text_softkey_silent;
+            },            
+        CBA_BUTTON
+            {
+            id = EAknSoftkeyContextOptions; 
+            }      
+        };
+    }
+ 
+// ---------------------------------------------------------------------------
+// RESOURCE CBA r_loc_evt_infonote_open_cba
+// Control button array for query text
+// ---------------------------------------------------------------------------
+//  
+RESOURCE CBA r_loc_evt_infonote_open_cba
+    {
+    flags = 0;
+    buttons = 
+        {
+        CBA_BUTTON 
+            {
+            id = EEvtCmdOpenEvent; 
+            txt = text_softkey_open;
+            },
+        CBA_BUTTON 
+            {
+            id = EEvtCloseInfoNote; 
+            txt = text_softkey_close;
+            },            
+        CBA_BUTTON
+            {
+            id = EAknSoftkeyContextOptions; 
+            }     
+        };
+    }
+
+// ---------------------------------------------------------------------------
+// RESOURCE CBA r_loc_evt_infonote_snooze_tone_cba
+// Control button array for query text when the tone is being played
+// ---------------------------------------------------------------------------
+//  
+RESOURCE CBA r_loc_evt_infonote_snooze_tone_cba
+    {
+    flags = 0;
+    buttons = 
+        {
+        CBA_BUTTON 
+            {
+            id = EEvtCmdSnoozeEvent; 
+            txt = qtn_locev_softkey_snooze;
+            },
+        CBA_BUTTON 
+            {
+            id = EEvtCmdSilence; 
+            txt = text_softkey_silent;
+            },            
+        CBA_BUTTON
+            {
+            id = EAknSoftkeyContextOptions; 
+            }      
+        };
+    }
+ 
+// ---------------------------------------------------------------------------
+// RESOURCE CBA r_loc_evt_infonote_snooze_cba
+// Control button array for query text
+// ---------------------------------------------------------------------------
+//  
+RESOURCE CBA r_loc_evt_infonote_snooze_cba
+    {
+    flags = 0;
+    buttons = 
+        {
+        CBA_BUTTON 
+            {
+            id = EEvtCmdSnoozeEvent; 
+            txt = qtn_locev_softkey_snooze;
+            },
+        CBA_BUTTON 
+            {
+            id = EEvtCloseInfoNote; 
+            txt = text_softkey_close;
+            },            
+        CBA_BUTTON
+            {
+            id = EAknSoftkeyContextOptions; 
+            }     
+        };
+    }
+    
+//----------------------------------------------------
+// RESOURCE TBUF r_locev_options_open_event
+// Popup List box item for open event
+//----------------------------------------------------
+//
+RESOURCE TBUF r_locev_options_open_event
+    {
+    buf = qtn_locev_options_open_event;
+    }
+    
+//----------------------------------------------------
+// RESOURCE TBUF r_locev_options_view_description
+// Popup List box item for View description
+//----------------------------------------------------
+//
+RESOURCE TBUF r_locev_options_view_description
+    {
+    buf = qtn_locev_options_view_description;
+    }
+              	          
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventshandlerui/eventsnotifier/evtinfonote/eabi/evtinfonoteu.def	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,5 @@
+EXPORTS
+	_Z13NotifierArrayv @ 1 NONAME
+	_ZTI12CEvtInfoNote @ 2 NONAME ; #<TI>#
+	_ZTV12CEvtInfoNote @ 3 NONAME ; #<VT>#
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventshandlerui/eventsnotifier/evtinfonote/group/bld.inf	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,40 @@
+/*
+* 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:  Build information file for project Events Info Note
+*
+*/
+
+#include <platform_paths.hrh> // For the APP_LAYER_LOC_EXPORT_PATH
+
+// Projects platforms
+PRJ_PLATFORMS
+DEFAULT
+
+// Project exports
+PRJ_EXPORTS
+../inc/evtinfonoteinterface.h   |../../inc/evtinfonoteinterface.h
+
+PRJ_EXTENSIONS
+START EXTENSION s60/mifconv
+OPTION TARGETFILE evtinfonote.mif
+OPTION HEADERFILE evtinfonote.mbg
+OPTION SOURCES -c32,8 qgn_note_locev_alarm_inacc_heavy.svg -c32,8 qgn_note_locev_alarm_inacc.svg -c32,8 qgn_note_locev_alarm_acc.svg
+END
+
+// Project MMP files
+PRJ_MMPFILES
+evtinfonote.mmp
+
+// Project test exports
+PRJ_TESTEXPORTS
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventshandlerui/eventsnotifier/evtinfonote/group/evtinfonote.mmp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,74 @@
+/*
+* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Project definition file for project Events UI / Events Info 
+*                Note plymorphic DLL
+*
+*/
+
+
+// System Includes
+#include <data_caging_paths.hrh>
+#include <platform_paths.hrh> // For the APP_LAYER_SYSTEMINCLUDE
+
+// User Includes
+#include "../inc/evtinfonoteuid.hrh"
+
+TARGET                  evtinfonote.dll
+TARGETTYPE              DLL
+UID                     0x101FDFAE KEvtInfoNoteUid
+
+CAPABILITY              ALL -TCB
+VENDORID                VID_DEFAULT
+
+USERINCLUDE		        . 
+USERINCLUDE		        ../inc
+USERINCLUDE             ../../inc
+USERINCLUDE             ../../../inc
+USERINCLUDE             ../../../../inc
+
+// System Include
+APP_LAYER_SYSTEMINCLUDE
+
+SOURCEPATH              ../src         
+SOURCE                  evtinfonoteinterface.cpp
+SOURCE                  evtinfonote.cpp
+SOURCE                  evtinfonoteimpl.cpp
+
+SOURCEPATH              ../data
+START RESOURCE          evtinfonote.rss
+HEADER
+TARGETPATH              RESOURCE_FILES_DIR
+LANGUAGE_IDS
+END
+
+LIBRARY 		        ecom.lib
+LIBRARY 		        euser.lib
+LIBRARY                 eiksrv.lib
+LIBRARY 		        avkon.lib
+LIBRARY			        cone.lib 
+LIBRARY			        eikcore.lib
+LIBRARY                 bafl.lib 
+LIBRARY                 efsrv.lib
+LIBRARY			        eikdlg.lib
+LIBRARY					commonengine.lib
+LIBRARY 		        aknnotifierwrapper.lib
+LIBRARY                 evtutils.lib
+LIBRARY                 estor.lib
+LIBRARY                 eikcoctl.lib
+LIBRARY                 egul.lib
+LIBRARY                 fbscli.lib
+LIBRARY                 aknicon.lib
+LIBRARY                 eikcdlg.lib
+LIBRARY                 eikctl.lib 
+LIBRARY                 aknskins.lib aknskinsrv.lib aknswallpaperutils.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventshandlerui/eventsnotifier/evtinfonote/inc/evtinfonote.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,203 @@
+/*
+* 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:  Info Note implementation
+*
+*/
+
+
+#ifndef C_EVTINFONOTE_H
+#define C_EVTINFONOTE_H
+
+// System Includes
+#include <eiknotapi.h>
+
+// User Includes
+
+// Forward Declarations
+class CEikonEnv;
+class CEvtInfoNoteImpl;
+class CAknNotifierAppServerAppUi;
+class CEvtInfoNoteInputParam;
+
+/**
+ * Info Note implementation for Event UI Triggers
+ *
+ * This class provides the notifier implementation which displays the
+ * Events UI trigger notifiers. This class is displays the subject,
+ * description and the accuracy levels of the triggers fired.
+ *
+ * @since S60 v9.1
+ */
+class CEvtInfoNote : public CActive,
+                     public MEikSrvNotifierBase2
+    {
+private: // Constants and Enumerations
+	enum TEvtInfoNoteEvent    
+		{
+		// No event
+		ENone,
+		
+		// Display the event trigger info note
+		EDisplayNotifier,
+		
+		};
+		
+public:
+    /**
+     * Static two phase constructor
+     */
+    static CEvtInfoNote* NewL();
+    
+    /**
+     * Destructor.
+     */
+    virtual ~CEvtInfoNote();
+    
+public: // Inherited from MEikSrvNotifierBase2
+
+    /**
+     * Frees all the resources owned by the notifier
+     */
+    virtual void Release();
+
+    /**
+     * Gets the notifier parameters.
+     */
+    TNotifierInfo Info() const;
+     
+    /**
+     * Starts the notifier.
+     */
+    virtual TPtrC8 StartL( const TDesC8&        aBuffer );
+     
+    /**
+     * Starts the notifier. This is an asynchronous function. The completion
+     * of the request can be communicated through the RMessagePtr2 object
+     */
+    virtual void StartL( const TDesC8&          aBuffer,
+                               TInt             aReplySlot,
+                         const RMessagePtr2&    aMessage );
+     
+    /**
+     * Cancels an active notifier.
+     */
+    virtual void Cancel();
+     
+    /**
+     * Updates a currently active notifier with new data.
+     */
+    virtual TPtrC8 UpdateL( const TDesC8&   aBuffer );
+    
+    /**
+     * Updates a currently active notifier with new data.
+     */    
+    virtual void UpdateL( const TDesC8&         aBuffer, 
+                                TInt            aReplySlot, 
+                          const RMessagePtr2&   aMessage);
+       
+    /**
+     * Registers the Info Note display
+     */
+    virtual TNotifierInfo RegisterL();
+	                
+protected:
+    /**
+     * C++ constructor made protected for this class must not be instantiated
+     * directly
+     */
+    CEvtInfoNote();
+    
+    /**
+     * Second phase of the two phase constructor
+     */
+    void ConstructL();
+    
+protected: // Inherited from CActive
+    virtual void RunL();
+    
+    virtual void DoCancel();
+    
+    virtual TInt RunError( TInt aError ); 
+        
+private:
+	/**
+	 * Completes any outstanding request with the requested error code.
+	 */
+	void CompleteMessage( TInt          aError,
+	                      TInt          aKeyPressEvent = ENone );
+	                      
+    /**
+     * Converts the current input buffer into the Input parameter
+     * structure.
+     */
+    CEvtInfoNoteInputParam*     GetInputParametersLC();
+     
+protected:    
+    /**
+     * Eikon Env pointer
+     */
+    CEikonEnv*                  iEikEnv;
+        
+    /**
+     * Notifier information structure
+     * Owns
+     */
+    TNotifierInfo               iInfo;
+            
+private:  // Data members
+
+    /**
+     * Handle to the current message
+     */
+    RMessagePtr2                iMessage;
+    
+    /** 
+     * Confirmation query dialog
+     */
+    CEvtInfoNoteImpl*    	    iInfoNote;
+    
+    /**
+     * Resource file handle
+     */
+    TInt                        iResourceFileFlag;
+    
+	/**
+	 * Current Trigger event
+	 */
+	TEvtInfoNoteEvent			iTriggerEvent;
+	
+	/**
+	 * Boolean flag to indicate whether App switching has been
+	 * enabled.
+	 */
+	TBool                       iAppSwitchSupress;
+	
+	/**
+	 * Reference to the Notifier App server's Application UI
+	 */
+	CAknNotifierAppServerAppUi* iAppUi;
+	
+	/**
+	 * Input Buffer
+	 * Owns
+	 */
+	HBufC8*                     iInputBuffer;
+	
+	/**
+	 * Reply Slot
+	 */
+	TInt                        iReplySlot;
+    };
+
+#endif // C_EVTINFONOTE_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventshandlerui/eventsnotifier/evtinfonote/inc/evtinfonoteconsts.hrh	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,52 @@
+/*
+* 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:  Constant defintion for Events UI
+*
+*/
+
+#ifndef EVTINFONOTECONSTS_HRH
+#define EVTINFONOTECONSTS_HRH
+
+/**
+ * Enumeration value for the commands from Events UI info note
+ */
+enum TEvtInfoNoteCmds
+    {
+    /**
+     * Enumeration value requesting the display of the trigger
+     */
+    EEvtCmdOpenEvent  = 6000,
+
+    /**
+     * Enumeration value requesting the Event Description to be showed
+     */
+    EEvtCmdShowDetails,
+    
+    /**
+     * Enumeration value requesting the display of the trigger
+     */
+    EEvtCmdSnoozeEvent,
+    
+    /**
+     * Enumeration value requesting closure of the info note
+     */
+    EEvtCloseInfoNote,
+    
+    /**
+     * Enumeration value requesting the tone to be switched off
+     */
+    EEvtCmdSilence
+    };
+
+#endif // EVTINFONOTECONSTS_HRH
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventshandlerui/eventsnotifier/evtinfonote/inc/evtinfonoteimpl.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,137 @@
+/*
+* 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:  Info Note implementation
+*
+*/
+
+
+#ifndef C_EVTINFONOTEIMPL_H
+#define C_EVTINFONOTEIMPL_H
+
+// System Includes
+#include <e32base.h>
+#include <AknQueryDialog.h>
+
+// User Includes
+#include "evttoneplayer.h"
+#include "evtinfonoteconsts.hrh"
+
+// Forward Declarations
+class CEikonEnv;
+class CEvtInfoNoteInputParam;
+class CEvtTonePlayer;
+class CEvtKeyLockHandler;
+
+/**
+ * Info Note implementation for Event UI Triggers
+ *
+ * This class provides the notifier pop-up implementation.
+ *
+ * @since S60 v9.1
+ */
+NONSHARABLE_CLASS( CEvtInfoNoteImpl ): public CAknQueryDialog, 
+									   public MEvtTonePlayObserver
+    {
+public:
+    /**
+     * Static two phase constructor
+     */
+    static CEvtInfoNoteImpl* NewLC( CEvtInfoNoteInputParam*      aInputParam );
+    
+    /**
+     * Destructor.
+     */
+    virtual ~CEvtInfoNoteImpl();
+    
+public:
+    // Inherited from CAknQueryDialog    
+    TInt RunLD();
+    
+    // Inherited from MEvtTonePlayObserver 
+    void TonePlayCompleteL( TBool aTimeout );
+    
+    //     
+    TInt RunLD( TEvtInfoNoteCmds* aKey );
+                                       
+protected:
+    // Inherited from CAknQueryDialog
+    TBool OkToExitL( TInt aButtonId );
+    
+    void PostLayoutDynInitL();        
+
+    /**
+     * Handles pointer events
+    */
+    void HandlePointerEventL(const TPointerEvent& aPointerEvent);                                   
+
+private:
+    /**
+     * Get Msk Option from Popup
+     */
+	TInt GetMskOptionL();
+    
+    /**
+     * Default Constructor Implementation
+     */
+    CEvtInfoNoteImpl( CEvtInfoNoteInputParam*         aInputParam );
+    
+    /**
+     * Called when timer is expired
+     */
+    static TInt TickL( TAny* aObject );
+    
+    /**
+     * Second phase constructor
+     */
+    void ConstructLC();
+    
+    /**
+     * Loads the Image for the control
+     */
+    void LoadImageL();
+        
+private:
+
+    /**
+     * Input parameters for the dialog
+     * Owns
+     */
+    CEvtInfoNoteInputParam*         iInputParam;
+    
+    /**
+     * Tone player
+     * Owns
+     */
+    CEvtTonePlayer*                 iTonePlayer;
+    
+    /**
+     * Key Lock Handler
+     * Owns
+     */
+    CEvtKeyLockHandler* 			iKeyLockHandler;
+    
+    /**
+     * Dialog Exit Flag
+     */
+    TEvtInfoNoteCmds* iExitFlag;
+    
+    /**
+     * Periodic Timer active object.
+     * Own:
+     */
+    CPeriodic* iTimer; 
+    
+    };
+
+#endif // C_EVTINFONOTEIMPL_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventshandlerui/eventsnotifier/evtinfonote/inc/evtinfonoteinterface.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,55 @@
+/*
+* 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:  Events Info Note Interface definition
+*
+*/
+
+#ifndef EVTINFONOTEINTERFACE_HRH
+#define EVTINFONOTEINTERFACE_HRH
+
+/**
+ * Interfaces for display the Events UI trigger fire Information
+ */
+const TUid KEvtInfoNote                 = { 0x2001E66C };
+const TUid KEvtInfoNoteChannel          = { 0x10009D48 };
+
+
+/**
+ * Enumeration value for the result from the Event info note
+ */
+enum TEvtInfoNoteResult
+    {
+    /**
+     * Enumeration value requesting the display of the trigger
+     */
+    EOpenTrigger    = 6000,
+    
+    /**
+     * Enumeration value request the client application to
+     * expand the description field
+     */
+    EShowDetails,
+    
+    /**
+     * Enumeration value requesting to snooze the trigger
+     */
+    ESnoozeTrigger,
+    
+    /**
+     * Enumeration value requesting closure of the info note
+     */
+    ECloseInfoNote
+    };
+
+#endif // EVTINFONOTEINTERFACE_HRH
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventshandlerui/eventsnotifier/evtinfonote/inc/evtinfonoteuid.hrh	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,26 @@
+/*
+* 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:  Events Info Note UID definition
+*
+*/
+
+#ifndef EVTINFONOTEUID_HRH
+#define EVTINFONOTEUID_HRH
+
+/**
+ * UID Defintion for Events Info Note polymorphic library
+ */
+#define KEvtInfoNoteUid 0x2001E66B
+
+#endif // EVTINFONOTEUID_HRH
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventshandlerui/eventsnotifier/evtinfonote/src/evtinfonote.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,470 @@
+/*
+* 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:  Info Note implementation
+*
+*/
+
+
+// System Includes
+#include <eikenv.h>
+#include <e32std.h>
+#include <aknmessagequerydialog.h>
+#include <bautils.h>
+#include <StringLoader.h>
+#include <data_caging_path_literals.hrh>
+#include <AknNotiferAppServerApplication.h>
+#include <aknPopupHeadingPane.h>
+#include <evtinfonote.rsg>
+#include <s32mem.h>
+#include <eikbtgpc.h>
+#include <gulicon.h>
+#include <AknsUtils.h>
+#include <eikimage.h>
+
+#include <aknnotedialog.h>
+
+// User Includes
+#include "evtinfonoteparams.h"
+#include "evtinfonote.h"
+#include "evtinfonoteinterface.h"
+#include "evtinfonoteconsts.hrh"
+#include "evtinfonoteimpl.h"
+
+#include "evtdebug.h"
+
+// Constant Definitions
+_LIT(KResourceFileName, "evtinfonote.rsc");
+static const TInt KLengthOfNum = 64;
+
+//
+// ------------------------- Member Function definition ----------------------
+
+// ---------------------------------------------------------------------------
+// CEvtInfoNote::CEvtInfoNote()
+// ---------------------------------------------------------------------------
+//
+CEvtInfoNote::CEvtInfoNote()
+    : CActive( EPriorityStandard )
+    {
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtInfoNote::~CEvtInfoNote()
+// ---------------------------------------------------------------------------
+//
+CEvtInfoNote::~CEvtInfoNote()
+    {    
+    // If there is an existing message outstanding then
+    // terminate the message
+    CompleteMessage( KErrServerTerminated );
+        
+    Cancel();
+    
+    delete iInputBuffer;
+    
+    // Free the resources
+    iEikEnv->DeleteResourceFile( iResourceFileFlag );
+        
+    if ( iAppSwitchSupress && iAppUi )
+        {
+        iAppUi->SuppressAppSwitching( EFalse ); 
+        iAppSwitchSupress = EFalse;                        
+        }            
+    }
+
+// ---------------------------------------------------------------------------
+// void CEvtInfoNote::ConstructL()
+// ---------------------------------------------------------------------------
+//    
+void CEvtInfoNote::ConstructL()
+    {
+    EVTUIDEBUG( "+ CEvtInfoNote::ConstructL" );
+    
+    // Store a Local pointer for Eikon Env
+    iEikEnv = CEikonEnv::Static();
+    iAppUi = static_cast< CAknNotifierAppServerAppUi* >( iEikEnv->EikAppUi());
+    
+    // Open the localized resource file
+    TFileName dllDrive;;
+    Dll::FileName( dllDrive );
+
+    // File name without the drive letter.
+    TFileName filename;
+    filename += KDC_RESOURCE_FILES_DIR; 
+    filename += KResourceFileName;        
+        
+    // Append the drive letter to the file name.    
+    TParse parse;
+	User::LeaveIfError( parse.Set( dllDrive, NULL, NULL ) );
+    User::LeaveIfError( parse.Set( parse.Drive(), &filename, NULL ) );
+	filename = parse.FullName();	                        
+    
+    BaflUtils::NearestLanguageFile(iEikEnv->FsSession(),filename);
+    
+    EVTUIDEBUG( "Before Resource File" );
+    
+    iResourceFileFlag=iEikEnv->AddResourceFileL(filename);
+    
+    EVTUIDEBUG( "After Resource File" );
+    // Add the object to the Active scheduler
+    CActiveScheduler::Add( this );
+    
+    EVTUIDEBUG( "- CEvtInfoNote::ConstructL" );
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtInfoNote* CEvtInfoNote::NewL()
+// ---------------------------------------------------------------------------
+//
+CEvtInfoNote* CEvtInfoNote::NewL()
+    {
+    CEvtInfoNote* self = new ( ELeave ) CEvtInfoNote;
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+// ---------------------------------------------------------------------------
+// void CEvtInfoNote::Release()
+// ---------------------------------------------------------------------------
+//    
+void CEvtInfoNote::Release()  
+    {
+    EVTUIDEBUG( "+ CEvtInfoNote::Release" );
+    // This method is called to free all the resources
+    // associated with the Notifier. Here it would mean deleting
+    // the notifier handle
+    delete this;
+    EVTUIDEBUG( "- CEvtInfoNote::Release" );        
+    }
+    
+// ---------------------------------------------------------------------------
+// MEikSrvNotifierBase2::TNotifierInfo CEvtInfoNote::Info() const
+// ---------------------------------------------------------------------------
+//    
+MEikSrvNotifierBase2::TNotifierInfo CEvtInfoNote::Info() const
+    {
+    EVTUIDEBUG( "+ CEvtInfoNote::Info" );
+    // Return the notifier information
+    return iInfo;
+    }
+    
+// ---------------------------------------------------------------------------
+// TPtrC8 CEvtInfoNote::StartL
+// ---------------------------------------------------------------------------
+//    
+TPtrC8 CEvtInfoNote::StartL( const TDesC8&        /* aBuffer */ )
+    {    
+    TPtrC8 ret( KNullDesC8 );
+    return ( ret );    
+    }
+
+// ---------------------------------------------------------------------------
+// void CEvtInfoNote::StartL
+// ---------------------------------------------------------------------------
+//    
+void CEvtInfoNote::StartL( const TDesC8&          aBuffer,
+                                  TInt            aReplySlot,
+                            const RMessagePtr2&   aMessage )          
+    {
+    EVTUIDEBUG( "+ CEvtInfoNote::StartL" );
+    // The notifier will handle only one request at a time.
+    if ( IsActive())
+        {
+        User::Leave ( KErrInUse );
+        }
+    
+    iTriggerEvent = EDisplayNotifier;      
+    iMessage = aMessage;    
+    
+    // Delete the old buffer and copy the contents of the argument into this
+    // buffer
+    // This buffer needs to be stored because, the user is going to handle
+    // the request asynchrnously.     
+    delete iInputBuffer;  
+    iInputBuffer = NULL;
+    iInputBuffer = aBuffer.AllocL();
+    
+    // Copy the reply Slot
+    iReplySlot = aReplySlot;
+    
+    TRequestStatus* status = &iStatus;
+    SetActive();    
+    User::RequestComplete( status, KErrNone );    
+    EVTUIDEBUG( "- CEvtInfoNote::StartL" );
+    }
+    
+// ---------------------------------------------------------------------------
+// void CEvtInfoNote::Cancel
+// ---------------------------------------------------------------------------
+//    
+void CEvtInfoNote::Cancel()
+    {
+    EVTUIDEBUG( "+ CEvtInfoNote::Cancel" );
+    // Delete the running Information note
+    delete iInfoNote;
+    iInfoNote = NULL;
+    
+    CompleteMessage( KErrCancel );
+    
+    delete iInputBuffer;
+    iInputBuffer = NULL;
+        	        
+    iTriggerEvent = ENone;   	         
+    CActive::Cancel();
+    EVTUIDEBUG( "- CEvtInfoNote::Cancel" );
+    }
+
+// ---------------------------------------------------------------------------
+// TPtrC8 CEvtInfoNote::UpdateL
+// ---------------------------------------------------------------------------
+//    
+TPtrC8 CEvtInfoNote::UpdateL( const TDesC8&   /* aBuffer */ )
+    {
+    TPtrC8 ret( KNullDesC8 );
+    return ( ret );    
+    }
+
+// ---------------------------------------------------------------------------
+// TPtrC8 CEvtInfoNote::UpdateL
+// ---------------------------------------------------------------------------
+//
+void CEvtInfoNote::UpdateL( const TDesC8&         /* aBuffer */, 
+                                   TInt            /* aReplySlot */, 
+                             const RMessagePtr2&   aMessage)
+    {
+    aMessage.Complete( KErrNotSupported );
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtInfoNote::TNotifierInfo CEvtInfoNote::RegisterL()
+// ---------------------------------------------------------------------------
+//
+CEvtInfoNote::TNotifierInfo CEvtInfoNote::RegisterL()
+    {
+    iInfo.iUid          = KEvtInfoNote;
+    iInfo.iChannel      = KEvtInfoNoteChannel;
+    iInfo.iPriority     = ENotifierPriorityHigh; 
+    return iInfo;    
+    }
+    
+
+// ---------------------------------------------------------------------------
+// void CEvtInfoNote::CompleteMessage()
+// ---------------------------------------------------------------------------
+// 
+void CEvtInfoNote::CompleteMessage( TInt        aError,
+                                    TInt        aKeyPressEvent )
+	{
+	EVTUIDEBUG( "+ CEvtInfoNote::CompleteMessage" );
+	// Check if the message is not NULL
+	if ( !iMessage.IsNull() )
+		{
+		
+		// Obtain the Reply slot and communicate the response
+		// to the user
+		TInt desLength = iMessage.GetDesLength( iReplySlot );
+		if (  desLength >= KLengthOfNum )
+		    {
+		    TBuf8< KLengthOfNum > returnBuf;
+		    returnBuf.AppendNum( aKeyPressEvent );
+		    
+		    TInt length = returnBuf.Length();
+		    length = length + 1;
+		    TInt error = iMessage.Write( iReplySlot, returnBuf );
+		    if ( !error )
+		        {
+		        EVTUIDEBUG1( "CEvtInfoNote::CompleteMessage - Write Error : %d", error );
+		        }
+		    }
+		    
+		iMessage.Complete( aError );	
+		}
+    
+    if ( iAppSwitchSupress && iAppUi )
+        {
+        iAppUi->SuppressAppSwitching( EFalse ); 
+        iAppSwitchSupress = EFalse;                        
+        }
+        
+    iTriggerEvent = ENone;
+    EVTUIDEBUG( "- CEvtInfoNote::CompleteMessage" );		
+	}
+	
+// ---------------------------------------------------------------------------
+// void CEvtInfoNote::RunL()
+// ---------------------------------------------------------------------------
+//                             
+void CEvtInfoNote::RunL()
+    {
+    EVTUIDEBUG( "+ CEvtInfoNote::RunL" );  
+    // Do this only on KErrNone
+    if ( !iStatus.Int())
+    	{
+    	switch( iTriggerEvent )
+    		{
+    		case EDisplayNotifier:
+    			{
+    			// Fetch the input parameters 
+    			CEvtInfoNoteInputParam* param = GetInputParametersLC();
+    			CleanupStack::Pop( param );
+    			
+    			// Create a new dialog instance
+    			CEvtInfoNoteImpl* queryDialog = CEvtInfoNoteImpl::NewLC( param );
+    			
+	            // Display the dialog in cover UI
+	            // queryDialog->PublishDialogL( SuplQueryId(), KCatUidSuplQuery );
+	                	         			    
+			    // Store the value for the Query dialog. this would be useful
+			    // for cancelling it.			    			    
+			    iInfoNote = queryDialog;
+			        	
+			    // Supress the App switching
+			    if ( !iAppSwitchSupress )
+			        {
+                    iAppUi->SuppressAppSwitching( ETrue );    	         
+    	            iAppSwitchSupress = ETrue;			        
+			        }
+			    TEvtInfoNoteCmds flag;
+			    TInt keypress = KErrNone;
+			        
+		    	keypress = queryDialog->RunLD( &flag );
+		    	iInfoNote = NULL;
+		    	
+		    	EVTUIDEBUG1( "Key Press : %d", keypress );
+				EVTUIDEBUG1( "Return Code : %d", flag );
+				
+		    	if ( keypress )
+			    	{
+				    switch( flag )
+				    	{
+						case EEvtCmdOpenEvent:
+							{
+							CompleteMessage( KErrNone, EOpenTrigger );
+							break;				
+							}		
+						case EEvtCmdSnoozeEvent:
+							{
+							CompleteMessage( KErrNone, ESnoozeTrigger );
+							break;				
+							}		
+						case EEvtCmdShowDetails:
+							{
+							CompleteMessage( KErrNone, EShowDetails );
+							break;				
+							}	
+						case ECloseInfoNote:
+							{
+							CompleteMessage( KErrNone, ECloseInfoNote );
+							break;				
+							}
+						default:
+							{
+							break;				
+							}    			
+				    	}	
+			    	}
+			    else
+			    	{
+			    	CompleteMessage( KErrNone, ECloseInfoNote );
+			    	}
+			    	
+		    	// Reset the trigger Event
+		    	iTriggerEvent = ENone;
+		    	    
+		    	break;
+    			}   			
+    		default:
+    			{
+    			User::Leave( KErrNotSupported );
+    			break;
+    			}
+    		}
+    	}
+	else
+		{
+		EVTUIDEBUG1( "- CEvtInfoNote::Error %d ", iStatus.Int() );
+		// Error Handling for non-KErrNone status
+		CompleteMessage( iStatus.Int());
+		}				
+    EVTUIDEBUG( "- CEvtInfoNote::RunL" );
+    }
+
+// ---------------------------------------------------------------------------
+// void CEvtInfoNote::DoCancel()
+// ---------------------------------------------------------------------------
+// 
+void CEvtInfoNote::DoCancel()
+    {    
+    // Reset the state machine
+    iTriggerEvent = ENone;    
+    }
+
+// ---------------------------------------------------------------------------
+// TInt CEvtInfoNote::RunError()
+// ---------------------------------------------------------------------------
+//    
+TInt CEvtInfoNote::RunError( TInt aError )
+	{
+	EVTUIDEBUG( "+ CEvtInfoNote::RunError" );
+	// If the dialog value is set then the dialog must be
+	// set to NULL because the dialog would have been destroyed
+	// already since its present on the cleanup stack
+    iInfoNote= NULL;
+	
+	// Complete the outstanding request with the error code
+	CompleteMessage( aError );
+    
+    // Reset the state machine.
+    iTriggerEvent = ENone;  
+    
+    EVTUIDEBUG( "- CEvtInfoNote::RunError" );	
+	return CActive::RunError( aError );	
+	}
+	
+// ---------------------------------------------------------------------------
+// TInt CEvtInfoNoteInputParam::GetInputParametersLC()
+// ---------------------------------------------------------------------------
+//	
+CEvtInfoNoteInputParam* CEvtInfoNote::GetInputParametersLC()
+    {
+    EVTUIDEBUG( "+ CEvtInfoNote::GetInputParametersLC" );
+    // Create a new input paramter object. The ownership of 
+    // this object will be transferred back to the calling
+    // function.
+	CEvtInfoNoteInputParam* input = CEvtInfoNoteInputParam::NewL();
+	CleanupStack::PushL( input );
+				
+	// Obtain the parameters from the Input Buffer
+	CBufFlat* inputParams = 
+	            CBufFlat::NewL( iInputBuffer->Des().Length() );
+	CleanupStack::PushL( inputParams );
+	inputParams->ResizeL( iInputBuffer->Des().Length());
+	
+    inputParams->Ptr( 0 ).Copy( *iInputBuffer );
+    
+    // Set the Read buffer to read the values from input buffer
+    RBufReadStream  readStream( *inputParams, 0 );
+    CleanupClosePushL( readStream );
+
+    // Internalize the input buffer string to the current object.
+    input->InternalizeL( readStream );
+    
+    CleanupStack::PopAndDestroy( 2, inputParams );
+    
+    EVTUIDEBUG( "- CEvtInfoNote::GetInputParametersLC" );
+    
+    return input;  
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventshandlerui/eventsnotifier/evtinfonote/src/evtinfonoteimpl.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,502 @@
+/*
+* 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:  Info Note implementation
+*
+*/
+
+
+// System Includes
+#include <evtinfonote.rsg>
+#include <eikbtgpc.h>
+#include <gulicon.h>
+#include <AknsUtils.h>
+#include <avkon.mbg>
+#include <evtinfonote.mbg>
+#include <eikimage.h>
+#include <StringLoader.h>
+#include <aknlists.h> 
+#include <aknPopup.h> 
+#include <badesca.h> 
+#include <data_caging_path_literals.hrh>
+#include <AknsConstants.h> 		// Skin Ids
+#include <AknIconUtils.h>
+#include <AknsSkinInstance.h>
+
+// User Includes
+#include "evtinfonoteimpl.h"
+#include "evtinfonoteparams.h"
+#include "evtinfonoteconsts.hrh"
+#include "evtkeylockhandler.h"
+
+// Constant Defintions
+_LIT( KEvtDefaultIconFileName, "evtinfonote.mif" );
+static const TInt KTimetoPlay = 60;
+static const TInt KTimetoSnooze = 60;
+
+// Context menu Array
+ 	const TInt KListGranularity = 5;
+static const TInt KEvtOpenEvent = 0;
+static const TInt KEvtViewDesc = 1;
+static const TInt KEvtNone = 2;
+
+#include "evtdebug.h"
+
+//
+// ------------------------- Member Function definition ----------------------
+
+// ---------------------------------------------------------------------------
+// CEvtInfoNoteImpl::CEvtInfoNoteImpl()
+// ---------------------------------------------------------------------------
+//
+CEvtInfoNoteImpl::CEvtInfoNoteImpl( CEvtInfoNoteInputParam*      aInputParam )
+    :CAknQueryDialog( CAknQueryDialog::ENoTone ),
+    iInputParam( aInputParam )
+    {
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtInfoNoteImpl::~CEvtInfoNoteImpl()
+// ---------------------------------------------------------------------------
+//
+CEvtInfoNoteImpl::~CEvtInfoNoteImpl()
+    {
+    // Delete the tone player
+    delete iTonePlayer;
+
+    // Delete the timer
+    if( iTimer )
+        {
+        iTimer->Cancel();
+        delete iTimer;
+        }
+    
+		// Update the Key Lock state before Close.
+    if(iKeyLockHandler)
+    		{
+    		if(*iExitFlag == EEvtCloseInfoNote || *iExitFlag == EEvtCmdSnoozeEvent )
+						iKeyLockHandler->UpdateStateWithNote();
+				else
+						iKeyLockHandler->UpdateStateWithoutNote();
+    		}
+    
+    // Delete Key Lock Handler
+    delete iKeyLockHandler;
+    
+    // Delete the Input parameter object
+    delete iInputParam;          
+    }
+
+// ---------------------------------------------------------------------------
+// void CEvtInfoNoteImpl::ConstructL()
+// ---------------------------------------------------------------------------
+//    
+void CEvtInfoNoteImpl::ConstructLC()
+    {
+    EVTUIDEBUG( "+ CEvtInfoNoteImpl::ConstructL" );
+    
+    CAknQueryDialog::PrepareLC( R_LOC_EVT_INFO_QUERY );
+    
+    // Prepare the Heading resource
+    TPtrC debug( iInputParam->Subject() );
+    EVTUIDEBUG1( "Notifier for - Subject = %S", &debug );
+    
+	// Set the Heading
+    QueryHeading()->SetTextL( iInputParam->Subject());
+    
+    // Set the Query Text   
+    SetPromptL( iInputParam->Description());
+    
+    // Load the Image fpr the query
+    LoadImageL();
+        
+    iKeyLockHandler = CEvtKeyLockHandler::NewL( );
+    
+    // Check if the tone needs to be played. In case, it is true then
+    // create the player and update the CBA
+    if ( iInputParam->ShowSnooze() )
+        {
+        if ( iInputParam->ToneEnabled() )
+            {
+            // Create the tone player
+            iTonePlayer = CEvtTonePlayer::NewL( *this );
+            
+            // Update the CBA - Snooze context silence
+            ButtonGroupContainer().SetCommandSetL( R_LOC_EVT_INFONOTE_SNOOZE_TONE_CBA );            
+            }
+        else
+            {
+            // Update the CBA - Snooze context close
+            ButtonGroupContainer().SetCommandSetL( R_LOC_EVT_INFONOTE_SNOOZE_CBA );     
+            }
+        }
+        else
+        {
+        if ( iInputParam->ToneEnabled() )
+            {
+            // Create the tone player
+            iTonePlayer = CEvtTonePlayer::NewL( *this );
+            
+            // Update the CBA - open context silence
+            ButtonGroupContainer().SetCommandSetL( R_LOC_EVT_INFONOTE_OPEN_TONE_CBA );            
+            }
+        }
+    EVTUIDEBUG( "- CEvtInfoNoteImpl::ConstructL" )     		           		             
+    }
+
+// ---------------------------------------------------------------------------
+// void CEvtInfoNoteImpl::NewL()
+// ---------------------------------------------------------------------------
+//     
+CEvtInfoNoteImpl* CEvtInfoNoteImpl::NewLC( CEvtInfoNoteInputParam*      aInputParam )
+    {
+    CEvtInfoNoteImpl* self = new ( ELeave ) CEvtInfoNoteImpl( aInputParam );
+    CleanupStack::PushL( self );
+    self->ConstructLC();
+    CleanupStack::Pop( self );
+    return self;    
+    }
+
+// ---------------------------------------------------------------------------
+// TInt CEvtInfoNoteImpl::RunLD()
+// ---------------------------------------------------------------------------
+//  
+TInt CEvtInfoNoteImpl::RunLD(TEvtInfoNoteCmds* aFlag)
+    {
+    // Call RunLD
+    iExitFlag = aFlag;
+    return RunLD();
+    } 
+
+// ---------------------------------------------------------------------------
+// TInt CEvtInfoNoteImpl::RunLD()
+// ---------------------------------------------------------------------------
+//  
+TInt CEvtInfoNoteImpl::RunLD()
+    {
+    // Maintain the Key Lock State and Enable if it is already not enabled
+    if ( iKeyLockHandler )
+        {
+        iKeyLockHandler->MaintainState();
+        }
+    
+    TInt timeToPlay = KTimetoPlay;
+    if ( iInputParam->ShowSnooze() )
+        {
+		// Start the Timer if the Event has to be snoozed.
+        if( !iTimer )
+            {
+            iTimer = CPeriodic::NewL( 0 ); // neutral priority
+            }
+        iTimer->Start( TTimeIntervalMicroSeconds32( KTimetoSnooze * 1000000 ),
+                          TTimeIntervalMicroSeconds32( KTimetoSnooze * 1000000 ),
+                          TCallBack(TickL, this));
+        
+        timeToPlay = 0;
+        }
+    
+    // If tone player is there, then start tone playing
+    if ( iTonePlayer )
+        {
+        iTonePlayer->PlayFileL( iInputParam->Tone(), iInputParam->ToneRepeat(), timeToPlay );
+        }
+        
+    // Pass the function to the base class
+    return CAknQueryDialog::RunLD();
+    }                  
+                         
+// ---------------------------------------------------------------------------
+// void CEvtInfoNoteImpl::OkToExitL()
+// ---------------------------------------------------------------------------
+//                                       
+TBool CEvtInfoNoteImpl::OkToExitL( TInt aButtonId )
+    {
+    EVTUIDEBUG1( "+ CEvtInfoNoteImpl::OkToExitL - ButtonId = %d", aButtonId );
+    switch(aButtonId)
+        {
+        case EEvtCmdSnoozeEvent: // when LSK Snooze is pressed
+            {
+	        *iExitFlag = EEvtCmdSnoozeEvent; 
+	        return ETrue;
+            }
+        case EEvtCmdOpenEvent: // when LSK Open is pressed
+            {
+			// Disable the Key Lock irrespective of previously maintained state.
+		    if ( iKeyLockHandler )
+		        {
+		        iKeyLockHandler->EnableKeyLock( EFalse );
+		        }
+	        *iExitFlag = EEvtCmdOpenEvent; 
+	        return ETrue;
+            }
+        case EEvtCmdSilence: // when RSK Silence is pressed
+            {
+	        // If tone player is there, then start tone playing
+	        if ( iTonePlayer )
+	            {
+	            iTonePlayer->StopPlayingL( EFalse );
+	            } 
+	        *iExitFlag = EEvtCmdSilence; 
+	        return EFalse;
+            }
+        case EAknSoftkeyContextOptions: //when MSK is pressed
+            {
+ 
+	    	switch( GetMskOptionL() )
+	    		{
+	    		case KEvtOpenEvent:
+	    			// Disable the Key Lock irrespective of previously maintained state.
+				    if ( iKeyLockHandler )
+				        {
+				        iKeyLockHandler->EnableKeyLock( EFalse );
+				        }
+	    			*iExitFlag = EEvtCmdOpenEvent;
+	    			 return ETrue;
+	    		case KEvtViewDesc:
+	    			// Disable the Key Lock irrespective of previously maintained state.
+				    if ( iKeyLockHandler )
+				        {
+				        iKeyLockHandler->EnableKeyLock( EFalse );
+				        }
+	    			*iExitFlag = EEvtCmdShowDetails;
+	    			 return ETrue;
+	    		default:
+	    			 return EFalse;
+	    		}
+            }
+        case EEvtCloseInfoNote: // when RSK Silence is pressed
+            {
+		    *iExitFlag = EEvtCloseInfoNote;
+	        return ETrue;
+            }
+        default: // close dialog
+            {
+            return ETrue;
+            }
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// void CEvtInfoNoteImpl::PostLayoutDynInitL()
+// ---------------------------------------------------------------------------
+//     
+void CEvtInfoNoteImpl::PostLayoutDynInitL()
+    {
+    }
+
+// ---------------------------------------------------------------------------
+// void CEvtInfoNoteImpl::TonePlayCompleteL()
+// ---------------------------------------------------------------------------
+//  
+void CEvtInfoNoteImpl::TonePlayCompleteL( TBool aTimeout )
+	{
+		// Enable KeyLock on Timeout.
+    if ( iKeyLockHandler && aTimeout )
+        {
+        iKeyLockHandler->EnableKeyLock( ETrue );
+        iKeyLockHandler->UpdateStateWithoutNote();
+        }
+        
+    // Update the CBA
+    if ( iInputParam->ShowSnooze() )
+        {
+        ButtonGroupContainer().SetCommandSetL( R_LOC_EVT_INFONOTE_SNOOZE_CBA );
+        }
+    else
+        {
+        ButtonGroupContainer().SetCommandSetL( R_LOC_EVT_INFONOTE_OPEN_CBA );
+        }
+	}
+
+
+// ---------------------------------------------------------------------------
+// TInt CEvtInfoNoteImpl::GetMskOptionL()
+// ---------------------------------------------------------------------------
+//  
+TInt CEvtInfoNoteImpl::GetMskOptionL()
+	{
+    EVTUIDEBUG( "+ CEvtInfoNoteImpl::GetMskOptionL()" );
+	TInt selected(KEvtNone);
+	
+    CAknSinglePopupMenuStyleListBox* list = new(ELeave)CAknSinglePopupMenuStyleListBox;
+    CleanupStack::PushL(list);
+ 
+    CAknPopupList* popupList = CAknPopupList::NewL(list, R_AVKON_SOFTKEYS_OK_CANCEL,
+												 AknPopupLayouts::EMenuWindow);  
+    CleanupStack::PushL(popupList);
+ 
+    list->ConstructL(popupList, 0);
+    list->CreateScrollBarFrameL(ETrue);
+    list->ScrollBarFrame()->SetScrollBarVisibilityL(CEikScrollBarFrame::EOff,
+														CEikScrollBarFrame::EAuto);
+ 	
+    CDesCArrayFlat* itemArray = new(ELeave)CDesCArrayFlat( KListGranularity );
+    CleanupStack::PushL(itemArray);
+ 
+    // add the item popup item here
+    HBufC* openevent = StringLoader::LoadLC( R_LOCEV_OPTIONS_OPEN_EVENT );
+    itemArray->AppendL(*openevent);
+    CleanupStack::PopAndDestroy(); // openevent
+    
+    if( iInputParam->Description().Length() != 0 )
+    	{
+	    HBufC* viewdesc = StringLoader::LoadLC( R_LOCEV_OPTIONS_VIEW_DESCRIPTION );
+	    itemArray->AppendL(*viewdesc);
+	    CleanupStack::PopAndDestroy(); // viewdesc
+    	}
+ 
+    CleanupStack::Pop();            //itemArray
+    list->Model()->SetItemTextArray(itemArray);
+    list->Model()->SetOwnershipType(ELbmOwnsItemArray);
+  
+    // Show popup list and then show return value.
+    TInt popupOk = popupList->ExecuteLD();
+    if (popupOk)
+    {
+    selected = list->CurrentItemIndex();
+    }
+	
+    CleanupStack::Pop();            // popuplist
+    CleanupStack::PopAndDestroy(); // list
+    
+    EVTUIDEBUG1( "- CEvtInfoNoteImpl::GetMskOptionL() - Selected = %d", selected );
+    return selected;
+	}
+	
+// ---------------------------------------------------------------------------
+// void CEvtInfoNoteImpl::LoadImageL()
+// ---------------------------------------------------------------------------
+//     
+void CEvtInfoNoteImpl::LoadImageL()
+    {   
+    EVTUIDEBUG( "+ CEvtInfoNoteImpl::LoadImageL" )
+        
+    // Obtain the text query control
+    CAknQueryControl* control = QueryControl();
+    if ( control )
+        {
+        TFileName dllFileName;    
+        Dll::FileName( dllFileName );
+        //dllFileName.Copy( KTempDrive );
+    	
+    	TParse parse;
+    	User::LeaveIfError( parse.Set( KEvtDefaultIconFileName, &KDC_APP_BITMAP_DIR, &dllFileName ));
+        TFileName fileName( parse.FullName() );
+        
+
+         //retrieve accuracy level       
+        CEvtInfoNoteInputParam::TEvtTriggerAccuracy accuracy = iInputParam->TrigerringAccuracy();
+        EVTUIDEBUG1( "Icon creation:Accuracy level = %d", accuracy )
+        
+	    MAknsSkinInstance* skin = AknsUtils::SkinInstance();
+	
+	    EVTUIDEBUG( "AknsUtils::SkinInstance" );
+	    
+	    CFbsBitmap* bitmap = NULL;
+	    CFbsBitmap* bitmapMask = NULL;
+	    TAknsItemID aSkinID;
+	    TInt bmpID;
+	    TInt bmpMaskID;
+	    
+	    switch( accuracy )
+	    	{
+	    	case CEvtInfoNoteInputParam::EEvtAccurateTrigger:
+	    		aSkinID = KAknsIIDQgnNoteLocevAlarmAcc;
+	    		bmpID = EMbmEvtinfonoteQgn_note_locev_alarm_acc;
+	    		bmpMaskID = EMbmEvtinfonoteQgn_note_locev_alarm_acc_mask;
+	    		break;
+	    	case CEvtInfoNoteInputParam::EEvtInaccurateTrigger:
+	    		aSkinID = KAknsIIDQgnNoteLocevAlarmInacc;
+	    		bmpID = EMbmEvtinfonoteQgn_note_locev_alarm_inacc;
+	    		bmpMaskID = EMbmEvtinfonoteQgn_note_locev_alarm_inacc_mask;
+	    		break;
+	    	case CEvtInfoNoteInputParam::EEvtHighlyInaccurateTrigger:
+	    	default:
+	    		aSkinID = KAknsIIDQgnNoteLocevAlarmInaccHeavy;
+	    		bmpID = EMbmEvtinfonoteQgn_note_locev_alarm_inacc_heavy;
+	    		bmpMaskID = EMbmEvtinfonoteQgn_note_locev_alarm_inacc_heavy_mask;
+	    		break;
+	    	}
+	    
+	    TRAPD( err, AknsUtils::CreateIconL( skin,
+	                            aSkinID,
+	                            bitmap,
+	                            bitmapMask,
+	                            fileName,
+	                            bmpID,
+	                            bmpMaskID ) );
+	
+		
+	    EVTUIDEBUG1( "AknsUtils::CreateIconL - %d", err );
+	    if(err != KErrNone)
+		    {
+		    TRAP( err, AknIconUtils::CreateIconL( bitmap,
+		                            bitmapMask,
+		                            fileName,
+		                            bmpID,
+		                            bmpMaskID ) );
+	    	EVTUIDEBUG1( "AknIconUtils::CreateIconL - %d", err );
+		    }
+		    
+    	User::LeaveIfError( err );
+    	
+        EVTUIDEBUG( "Bitmap validation" )
+        
+        User::LeaveIfNull( bitmap );
+        
+        EVTUIDEBUG( "Mask validation" )
+        User::LeaveIfNull( bitmapMask );               
+
+	    CleanupStack::PushL( bitmap );
+	    CleanupStack::PushL( bitmapMask );
+
+		CEikImage*  image = new ( ELeave ) CEikImage;
+		CleanupStack::PushL( image );
+		
+		EVTUIDEBUG( "Settings image" )
+		image->SetPicture( bitmap, bitmapMask );
+		
+		control->SetImageL( image );
+    			        
+        // Set the image			    		
+	    // control->SetImageL( fileName, EMbmAvkonQgn_note_query, EMbmAvkonQgn_note_query_mask );
+	    
+		CleanupStack::Pop( 3 );	    
+        }
+        
+    EVTUIDEBUG( "- CEvtInfoNoteImpl::LoadImageL" )      
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtInfoNoteImpl::TickL()
+// ---------------------------------------------------------------------------
+//
+TInt CEvtInfoNoteImpl::TickL(TAny* aObject)
+    {
+    ((CEvtInfoNoteImpl*)aObject)->TryExitL(EEvtCmdSnoozeEvent);
+    return KErrNone;
+    }
+    
+// ---------------------------------------------------------------------------
+// void CEvtInfoNoteImpl::HandlePointerEventL()
+// ---------------------------------------------------------------------------
+//  
+void CEvtInfoNoteImpl::HandlePointerEventL(const TPointerEvent& aPointerEvent)
+    {
+    CEikDialog::HandlePointerEventL( aPointerEvent );      
+        if(aPointerEvent.iType == TPointerEvent::EButton1Down )
+           {
+           TryExitL(EAknSoftkeyContextOptions);
+           }
+    }
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventshandlerui/eventsnotifier/evtinfonote/src/evtinfonoteinterface.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,79 @@
+/*
+* 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:  Interface class for Events Info Note DLL
+*
+*/
+
+
+// System Includes
+#include <eikenv.h>
+#include <eiknotapi.h>
+
+// User Includes
+#include "evtinfonote.h"
+#include "evtdebug.h"
+
+// Constant Definitions
+
+// CONSTANTS
+const TInt KEvtInfoNoteArrayIncrement = 2;
+
+
+// ----------------------- Local Functions -----------------------------------
+
+// ---------------------------------------------------------
+// LOCAL_C void CreateEventsInfoNoteNotifiersL
+// Instantiates all the components of Events Info Note
+// notifiers
+// ---------------------------------------------------------
+LOCAL_C void CreateEventsInfoNoteNotifiersL( 
+                    CArrayPtrFlat< MEikSrvNotifierBase2 >* aNotifiers )
+    {      
+    // Create the Trigger Event fire info note
+    CEvtInfoNote* infoNote = CEvtInfoNote::NewL();
+    CleanupStack::PushL( infoNote );
+    aNotifiers->AppendL( infoNote );
+    CleanupStack::Pop( infoNote );  
+    }
+
+// ------------------------- Global Functions -----------------------------------
+
+// ---------------------------------------------------------
+// EXPORT_C CArrayPtr< MEikSrvNotifierBase2 >* NotifierArray
+// Polymorphic DLL entry point
+// ---------------------------------------------------------
+
+EXPORT_C CArrayPtr< MEikSrvNotifierBase2 >* NotifierArray()
+    {
+	EVTUIDEBUG( "+ CEvtInfoNoteInterface::NotifierArray" );
+    CArrayPtrFlat< MEikSrvNotifierBase2 >* notifiers = NULL;
+	TRAPD( err, notifiers = 
+	           new CArrayPtrFlat< MEikSrvNotifierBase2 >( KEvtInfoNoteArrayIncrement ));
+	if ( !err && notifiers )
+    	{
+    	TRAPD( err, CreateEventsInfoNoteNotifiersL( notifiers ));
+    	if( err )
+        	{
+        	TInt count = notifiers->Count();
+        	while( count-- )
+        	    {
+        	    ( *notifiers )[ count ]->Release();
+        	    }           	
+        	delete notifiers;
+        	notifiers = NULL;
+        	}   	    
+    	}           
+	EVTUIDEBUG( "- CEvtInfoNoteInterface::NotifierArray" );
+    return notifiers;
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventshandlerui/eventsnotifier/group/bld.inf	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,21 @@
+/*
+* 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:  Build information file for project Events Notifers
+*
+*/
+
+
+// Project Includes
+#include "../ecom/group/bld.inf"
+#include "../evtinfonote/group/bld.inf"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventshandlerui/eventsnotifier/inc/evtinfonoteinterface.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,55 @@
+/*
+* 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:  Events Info Note Interface definition
+*
+*/
+
+#ifndef EVTINFONOTEINTERFACE_HRH
+#define EVTINFONOTEINTERFACE_HRH
+
+/**
+ * Interfaces for display the Events UI trigger fire Information
+ */
+const TUid KEvtInfoNote                 = { 0x2001E66C };
+const TUid KEvtInfoNoteChannel          = { 0x10009D48 };
+
+
+/**
+ * Enumeration value for the result from the Event info note
+ */
+enum TEvtInfoNoteResult
+    {
+    /**
+     * Enumeration value requesting the display of the trigger
+     */
+    EOpenTrigger    = 6000,
+    
+    /**
+     * Enumeration value request the client application to
+     * expand the description field
+     */
+    EShowDetails,
+    
+    /**
+     * Enumeration value requesting to snooze the trigger
+     */
+    ESnoozeTrigger,
+    
+    /**
+     * Enumeration value requesting closure of the info note
+     */
+    ECloseInfoNote
+    };
+
+#endif // EVTINFONOTEINTERFACE_HRH
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventshandlerui/group/bld.inf	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,24 @@
+/*
+* 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:  Master build information file for all components of
+*                Events Handler
+*
+*/
+
+
+// Project Includes
+#include "../eventshandler/group/bld.inf"
+#include "../eventshandlerserver/group/bld.inf"
+#include "../eventsnotifier/group/bld.inf"
+#include "../eventshandlerapp/group/bld.inf"
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventshandlerui/inc/evthandlerclientserver.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,40 @@
+/*
+* 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:  messages & constants for Events Handler Server
+*
+*/
+
+
+#ifndef C_EVTHANDLERCLIENTSERVER_H
+#define C_EVTHANDLERCLIENTSERVER_H
+
+#include <e32std.h>
+#include <e32base.h>
+
+_LIT( KEvtHandlerServerName, "evthandlerserver" );
+_LIT( KEvtHandlerServerImg, "evthandlerserver" );		// EXE name
+
+const TUid KServerUid3 = {0x2001E669};
+
+enum TEvtHandlerServerMessages
+	{
+	ESendEventId,
+	EReceiveEventId,
+	ECancelReceive
+	};
+
+
+#endif  // C_EVTHANDLERCLIENTSERVER_H
+
+// End of File
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventshandlerui/inc/evthandlerserverconsts.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,33 @@
+/*
+* 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:  Contains common constants
+*
+*/
+
+
+#ifndef EVTHANDLERSERVERCONSTS_H
+#define EVTHANDLERSERVERCONSTS_H
+
+// CONSTANTS
+const TInt KEvtItemArrayGranularity( 100 );
+const TInt KEvtNotifierBufferLength( 256 );
+const TInt KEvtCommandMessageLength( 256 );
+const TInt KEventIdLength( 64 );
+const TInt KMaxEvtHandlerMessage( 100 );
+
+_LIT( KInvalidEventId, "Invalid Event Id" );
+
+#endif // EVTHANDLERSERVERCONSTS_H
+
+// End of File
Binary file eventsui/eventsmgmtui/data/eventsuistub.sis has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventsmgmtui/data/evtmgmtui.rss	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,944 @@
+/*
+* 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:  Resource file defintion for project Events Management UI
+*
+*/
+
+
+//  RESOURCE IDENTIFIER
+NAME    EVNT // 4 letter ID
+
+//  SYSTEM INCLUDES
+#include <eikon.rh>
+#include <appinfo.rh>
+#include <avkon.rsg>
+#include <avkon.rh>
+#include <avkon.mbg>
+#include <bldvariant.hrh>
+#include <avkon.hrh>
+#include <avkon.loc>
+#include <data_caging_paths_strings.hrh>
+#include <evtui.loc>
+#include <AiwCommon.hrh>
+#include <AiwCommon.rh>
+
+// USER INCLUDES
+#include "evtmgmtui.hrh"
+
+// CONSTANT DEFINTIONS
+#define EVTMGMTUI_ICON_FILE_NAME APP_RESOURCE_DIR"\\evtmgmtui_aif.mif"
+
+//  RESOURCE DEFINITIONS 
+
+// ---------------------------------------------------------------------------
+// RESOURCE RSS_SIGNATURE 
+// ---------------------------------------------------------------------------
+//
+RESOURCE RSS_SIGNATURE 
+    {
+    }
+
+// ---------------------------------------------------------------------------
+// RESOURCE TBUF
+// ---------------------------------------------------------------------------
+//
+RESOURCE TBUF 
+    {
+    buf="evtmgmtui";
+    }
+
+// ---------------------------------------------------------------------------
+// RESOURCE EIK_APP_INFO
+// Application Information structure
+// ---------------------------------------------------------------------------
+//
+RESOURCE EIK_APP_INFO
+    {     
+    }
+
+// ---------------------------------------------------------------------------
+// RESOURCE HOTKEYS r_evtmgmtuiapp_hotkeys
+// Hotkets for events ui application
+// ---------------------------------------------------------------------------
+//    
+RESOURCE HOTKEYS r_evtmgmtuiapp_hotkeys
+   {
+   control=
+        {
+        };
+    }
+
+// ---------------------------------------------------------------------------
+// RESOURCE LOCALISABLE_APP_INFO r_evtmgmtui_localisable_app_info
+// Localizable application information structure
+// ---------------------------------------------------------------------------
+//
+RESOURCE LOCALISABLE_APP_INFO r_evtmgmtui_localisable_app_info
+    {
+    short_caption = qtn_apps_locev_grid ;
+    caption_and_icon = CAPTION_AND_ICON_INFO
+        {
+        caption = qtn_apps_locev_list;
+        number_of_icons = 1; 
+        icon_file = EVTMGMTUI_ICON_FILE_NAME;       
+        };
+    }
+
+// ---------------------------------------------------------------------------
+// RESOURCE AVKON_VIEW r_evtmgmtui_startup_view
+// Events UI start-up view
+// ---------------------------------------------------------------------------
+//  
+RESOURCE AVKON_VIEW r_evtmgmtui_startup_view
+    {
+    menubar = r_evtmgmtui_startup_menubar;
+    cba = r_evtmgmtui_startup_cba;    
+    }
+
+// ---------------------------------------------------------------------------
+// RESOURCE AVKON_VIEW r_evtmgmtui_startup_view_embedded
+// Events UI start-up view if app is launched as embedded
+// ---------------------------------------------------------------------------
+//  
+RESOURCE AVKON_VIEW r_evtmgmtui_startup_view_embedded
+    {
+    menubar = r_evtmgmtui_startup_menubar;
+    cba = r_evtmgmtui_startup_cba_embedded;    
+    }
+
+// ---------------------------------------------------------------------------
+// RESOURCE MENU_BAR r_evtmgmtui_startup_menubar_mark
+// Events UI start-up view's menubar structure
+// ---------------------------------------------------------------------------
+//
+RESOURCE MENU_BAR r_evtmgmtui_startup_menubar_mark
+    {
+    titles=
+        {
+        MENU_TITLE 
+            {
+            menu_pane = r_evtmgmtui_startup_appmenu; 
+            txt = ""; 
+            },
+        MENU_TITLE 
+            {
+            menu_pane = R_AVKON_MENUPANE_MARKABLE_LIST;
+            txt = ""; 
+            },
+        MENU_TITLE 
+            {
+            menu_pane = r_evtmgmtui_startup_mainviewmenu;
+            txt = ""; 
+            }        
+        };
+    }
+
+// ---------------------------------------------------------------------------
+// RESOURCE MENU_BAR r_evtmgmtui_startup_menubar
+// Events UI start-up view's menubar structure
+// ---------------------------------------------------------------------------
+//
+RESOURCE MENU_BAR r_evtmgmtui_startup_menubar
+    {
+    titles=
+        {
+        MENU_TITLE 
+            {
+            menu_pane = r_evtmgmtui_startup_appmenu; 
+            txt = ""; 
+            },      
+        MENU_TITLE 
+            {
+            menu_pane = r_evtmgmtui_startup_mainviewmenu;
+            txt = ""; 
+            }        
+        };
+    }
+
+//----------------------------------------------------
+//   
+//    r_evtmgmtui_startup_contextmenubar
+//
+//----------------------------------------------------
+//
+RESOURCE MENU_BAR r_evtmgmtui_startup_contextmenubar
+    {
+    titles=
+        {
+        MENU_TITLE { menu_pane = r_evtmgmtui_startup_changestatusmenu; txt = ""; },        
+        MENU_TITLE { menu_pane = R_AVKON_MENUPANE_MARKABLE_LIST; },
+        MENU_TITLE { menu_pane = r_evtmgmtui_startup_deletemenu; txt=""; }        
+        };
+    }
+
+RESOURCE MENU_PANE r_evtmgmtui_startup_deletemenu
+    {
+    items =
+        {
+        MENU_ITEM
+            {
+            command = EEvtEditorCmdDelete; 
+            txt = qtn_locev_options_delete;
+            }
+        };
+    }
+
+RESOURCE MENU_PANE r_evtmgmtui_startup_changestatusmenu
+    {
+    items =
+        {
+        MENU_ITEM 
+            {
+            command = EEvtEditorCmdActivate; 
+            txt = qtn_locev_options_activate; 
+            }, 
+        MENU_ITEM 
+           {
+           command = EEvtEditorCmdSaveDraft; 
+           txt = qtn_locev_options_setdraft; 
+           }
+        };
+    }
+
+RESOURCE MENU_PANE r_evtmgmtui_startup_markmenu
+    {
+    items =
+        {
+        MENU_ITEM
+            {
+            command = EAknCmdMark;
+            txt = qtn_options_list_mark_one;
+            },
+        MENU_ITEM
+            {
+            command = EAknCmdUnmark;
+            txt = qtn_options_list_unmark_one;
+            },
+        MENU_ITEM
+            {
+            command = EAknMarkAll;
+            txt = qtn_options_list_mark_all;
+            },
+        MENU_ITEM
+            {
+            command = EAknUnmarkAll;
+            txt = qtn_options_list_unmark_all;
+            }
+        };
+    }
+// ---------------------------------------------------------------------------
+// RESOURCE MENU_PANE r_evtmgmtui_startup_mainviewmenu
+// Menu pane for events ui main view
+// ---------------------------------------------------------------------------
+//
+RESOURCE MENU_PANE r_evtmgmtui_startup_mainviewmenu
+    {
+    items=
+        {
+        MENU_ITEM 
+            { 
+            command = EEvtMgmtUiStartupViewOpen; 
+            txt = qtn_locev_options_open;
+	    flags = EEikMenuItemAction;
+            },
+        MENU_ITEM 
+            { 
+            command = EEvtMgmtUiStartupViewCreate; 
+            txt = qtn_locev_options_create_new_event;
+	    flags = EEikMenuItemAction;
+            },
+        MENU_ITEM 
+            {
+            command = EEvtEditorCmdActivate; 
+            txt = qtn_locev_options_activate; 
+            flags = EEikMenuItemSpecific;
+            }, 
+        MENU_ITEM 
+           {
+           command = EEvtEditorCmdSaveDraft; 
+           txt = qtn_locev_options_setdraft; 
+           flags = EEikMenuItemSpecific;
+           },
+        MENU_ITEM 
+            { 
+            command = EEvtEditorCmdDelete; 
+            txt = qtn_locev_options_delete;
+            flags = EEikMenuItemSpecific;
+            },
+        MENU_ITEM 
+            {
+            command = EEvtEditorCmdShowOnMap; 
+            txt = qtn_locev_options_show_map; 
+            flags = EEikMenuItemSpecific;
+            },
+        MENU_ITEM 
+            {
+            command = EEvtEditorCmdNavigateToPlace; 
+            txt = qtn_locev_options_navigate; 
+            flags = EEikMenuItemSpecific;
+            },    
+        MENU_ITEM 
+            { 
+            command = EEvtMgmtUiEventUiEvtShow; 
+            txt = qtn_locev_options_show; 
+            cascade = r_evtmgmtui_startup_evtshowmenu;
+            }
+        };
+    }
+
+// ---------------------------------------------------------------------------
+// RESOURCE MENU_PANE r_evtmgmtui_startup_evtshowmenu
+// Menu pane for events ui 'Show' menu item
+// ---------------------------------------------------------------------------
+//
+RESOURCE MENU_PANE r_evtmgmtui_startup_evtshowmenu
+    {
+    items=
+        {
+        MENU_ITEM 
+            {
+            command = EEvtEditorCmdShowAll; 
+            txt = qtn_locev_options_show_all; 
+            }, 
+        MENU_ITEM 
+           {
+           command = EEvtEditorCmdShowActive; 
+           txt = qtn_locev_options_active; 
+           }, 
+       MENU_ITEM 
+           { 
+           command = EEvtEditorCmdShowDrafts; 
+           txt = qtn_locev_options_draft;
+           }, 
+       MENU_ITEM 
+           { 
+           command = EEvtEditorCmdShowCompleted; 
+           txt = qtn_locev_options_completed;
+           }
+        };
+    }
+
+// ---------------------------------------------------------------------------
+// RESOURCE MENU_PANE r_evtmgmtui_startup_evtstatmenu
+// Menu pane for events ui 'event status' menu item
+// ---------------------------------------------------------------------------
+//
+RESOURCE MENU_PANE r_evtmgmtui_startup_evtstatmenu
+    {
+    items=
+        {
+        MENU_ITEM 
+            {
+            command = EEvtEditorCmdActivate; 
+            txt = qtn_locev_options_activate; 
+            }, 
+        MENU_ITEM 
+           {
+           command = EEvtEditorCmdSaveDraft; 
+           txt = qtn_locev_options_setdraft; 
+           }
+        };
+    }
+// ---------------------------------------------------------------------------
+// RESOURCE MENU_PANE r_evtmgmtui_startup_appmenu
+// Menu pane for generic application level settings
+// ---------------------------------------------------------------------------
+//
+RESOURCE MENU_PANE r_evtmgmtui_startup_appmenu
+    {
+    items=
+        {
+        MENU_ITEM 
+            {
+            command = EEvtMgmtUiEventUiPosSettings; 
+            txt = qtn_locev_options_posi_settings; 
+            },
+        MENU_ITEM 
+            { 
+            command = EAknCmdHelp; 
+            txt = qtn_options_help; 
+            },
+        MENU_ITEM 
+            {
+            command = EAknCmdExit;  
+            txt = qtn_options_exit; 
+            }
+        };
+    }
+
+// ---------------------------------------------------------------------------
+// RESOURCE CBA r_evtmgmtui_startup_cba_embedded
+// Control button array for events ui start-up view if app is launched as embedded.
+// ---------------------------------------------------------------------------
+//  
+RESOURCE CBA r_evtmgmtui_startup_cba_embedded
+    {
+    flags = 0;
+    buttons = 
+        {
+        CBA_BUTTON 
+            {
+            id = EAknSoftkeyOptions; 
+            txt = text_softkey_option;
+            },
+        CBA_BUTTON 
+            {
+            id = EAknSoftkeyBack; 
+            txt = text_softkey_back;
+            },
+        CBA_BUTTON
+            {
+            id = EEvtMgmtUiStartupViewCreate; 
+            txt = qtn_msk_create;
+            }
+        };
+    }
+
+// ---------------------------------------------------------------------------
+// RESOURCE CBA r_evtmgmtui_startup_cba_open_embedded
+// Control button array for events ui start-up view if app is launched as embedded.
+// ---------------------------------------------------------------------------
+//  
+RESOURCE CBA r_evtmgmtui_startup_cba_open_embedded
+    {
+    flags = 0;
+    buttons = 
+        {
+        CBA_BUTTON 
+            {
+            id = EAknSoftkeyOptions; 
+            txt = text_softkey_option;
+            },
+        CBA_BUTTON 
+            {
+            id = EAknSoftkeyBack; 
+            txt = text_softkey_back;
+            },
+        CBA_BUTTON
+            {
+            id = EEvtMgmtUiStartupViewOpen; 
+            txt = qtn_msk_open;
+            }
+        };
+    }
+
+// ---------------------------------------------------------------------------
+// RESOURCE CBA r_evtmgmtui_startup_cba_embedded
+// Control button array for events ui start-up view 
+// if app is launched as embedded.
+// ---------------------------------------------------------------------------
+//  
+RESOURCE CBA r_evtmgmtui_startup_cba_options_embedded
+    {
+    flags = 0;
+    buttons = 
+        {
+        CBA_BUTTON 
+            {
+            id = EAknSoftkeyOptions; 
+            txt = text_softkey_option;
+            },
+        CBA_BUTTON 
+            {
+            id = EAknSoftkeyBack; 
+            txt = text_softkey_back;
+            },
+        CBA_BUTTON
+            {
+            id = EAknSoftkeyContextOptions;             
+            txt = text_softkey_option;
+            }
+        };
+    }
+// ---------------------------------------------------------------------------
+// RESOURCE CBA r_evtmgmtui_startup_cba
+// Control button array for events ui start-up view
+// ---------------------------------------------------------------------------
+//  
+RESOURCE CBA r_evtmgmtui_startup_cba
+    {
+    flags = 0;
+    buttons = 
+        {
+        CBA_BUTTON 
+            {
+            id = EAknSoftkeyOptions; 
+            txt = text_softkey_option;
+            },
+        CBA_BUTTON 
+            {
+            id = EAknSoftkeyExit; 
+            txt = text_softkey_exit;
+            },
+        CBA_BUTTON
+            {
+            id = EEvtMgmtUiStartupViewCreate; 
+            txt = qtn_msk_create;
+            }
+        };
+    }
+
+// ---------------------------------------------------------------------------
+// RESOURCE CBA r_evtmgmtui_startup_cba_open
+// Control button array for events ui start-up view
+// ---------------------------------------------------------------------------
+//  
+RESOURCE CBA r_evtmgmtui_startup_cba_open
+    {
+    flags = 0;
+    buttons = 
+        {
+        CBA_BUTTON 
+            {
+            id = EAknSoftkeyOptions; 
+            txt = text_softkey_option;
+            },
+        CBA_BUTTON 
+            {
+            id = EAknSoftkeyExit; 
+            txt = text_softkey_exit;
+            },
+        CBA_BUTTON
+            {
+            id = EEvtMgmtUiStartupViewOpen; 
+            txt = qtn_msk_open;
+            }
+        };
+    }
+
+// ---------------------------------------------------------------------------
+// RESOURCE CBA r_evtmgmtui_startup_cba_options
+// Control button array for events ui start-up view
+// ---------------------------------------------------------------------------
+//  
+RESOURCE CBA r_evtmgmtui_startup_cba_options
+    {
+    flags = 0;
+    buttons = 
+        {
+        CBA_BUTTON 
+            {
+            id = EAknSoftkeyOptions; 
+            txt = text_softkey_option;
+            },
+        CBA_BUTTON 
+            {
+            id = EAknSoftkeyExit; 
+            txt = text_softkey_exit;
+            },
+        CBA_BUTTON
+            {   
+            id = EAknSoftkeyContextOptions;   
+            txt = text_softkey_option;
+            }
+        };
+    }
+
+//----------------------------------------------------
+//   
+//    r_evtmgmtui_aiw_interest_showonmap
+//    AIW interest for option show on map
+//
+//----------------------------------------------------
+//
+RESOURCE AIW_INTEREST r_evtmgmtui_aiw_interest_showonmap
+    {
+    items =
+        {
+        AIW_CRITERIA_ITEM
+            {
+            id = EEvtMgmtUiShowOnMapPlaceHolder;
+            serviceCmd = KAiwCmdMnShowMap;
+            contentType = "application/x-landmark";
+            serviceClass = KAiwClassBase;
+            }
+        };
+    }
+
+//----------------------------------------------------
+//   
+//    r_evtmgmtui_aiw_interest_navigateto
+//    AIW interest for option navigate to
+//
+//----------------------------------------------------
+//
+RESOURCE AIW_INTEREST r_evtmgmtui_aiw_interest_navigateto
+    {
+    items =
+        {
+        AIW_CRITERIA_ITEM
+            {
+            id = EEvtMgmtUiNavigateToPlaceHolder;
+            serviceCmd = KAiwCmdMnNavigateTo;
+            contentType = "application/x-landmark";
+            serviceClass = KAiwClassBase;
+            }
+        };
+    }
+
+//----------------------------------------------------
+//   
+//    r_evtmgmtui_waitdlg_cancel
+//    Progress note 
+//
+//----------------------------------------------------
+//
+RESOURCE DIALOG r_evtmgmtui_waitdlg_cancel
+    {   
+    flags = EAknWaitNoteFlags ;
+    buttons = R_AVKON_SOFTKEYS_CANCEL;
+    items =
+        {
+        DLG_LINE
+            {
+            type = EAknCtNote;
+            id = EGeneralNote;
+            control= AVKON_NOTE 
+                { 
+                layout = EWaitLayout;
+                singular_label = qtn_locev_note_request_loc;
+                animation = R_QGN_GRAF_WAIT_BAR_ANIM;
+                };
+            }
+        };
+    }
+
+
+//----------------------------------------------------
+//   
+//    r_evtmgmtui_waitdlg
+//    Progress note 
+//
+//----------------------------------------------------
+//
+RESOURCE DIALOG r_evtmgmtui_waitdlg
+    {   
+    flags = EAknWaitNoteFlags ;
+    buttons = R_AVKON_SOFTKEYS_EMPTY;
+    items =
+        {
+        DLG_LINE
+            {
+            type = EAknCtNote;
+            id = EGeneralNote;
+            control= AVKON_NOTE 
+                { 
+                layout = EWaitLayout;
+                singular_label = qtn_locev_note_deleting;
+                animation = R_QGN_GRAF_WAIT_BAR_ANIM;
+                };
+            }
+        };
+    }
+
+//----------------------------------------------------
+// RESOURCE TBUF r_evtui_title
+// Title text for Events UI application
+//----------------------------------------------------
+//
+RESOURCE TBUF r_evtui_title
+    {
+    buf = qtn_locev_title_location_events;
+    }
+
+//----------------------------------------------------
+// RESOURCE TBUF r_evtui_mandatoryfields_warning
+// Warning message if mandatory fields are not filled before activating event 
+//----------------------------------------------------
+//
+RESOURCE TBUF r_evtui_mandatoryfields_warning
+    {
+    buf = qtn_locev_note_activatingdraft;
+    }
+
+//----------------------------------------------------
+// RESOURCE TBUF r_locev_confirm_delete_event
+// Confirmation text while deleting single events
+//----------------------------------------------------
+//
+RESOURCE TBUF r_locev_confirm_delete_event
+    {
+    buf = qtn_locev_confirm_delete_event;
+    }
+
+//----------------------------------------------------
+// RESOURCE TBUF r_locev_confirm_multidelete_event
+// Confirmation text while deleting multiple events
+//----------------------------------------------------
+//
+RESOURCE TBUF r_locev_confirm_multidelete_event
+    {
+    buf = qtn_locev_confirm_multidelete_event;
+    }
+
+//----------------------------------------------------
+// RESOURCE TBUF r_evtui_maxevents_error
+// Error message when user tries to create new event beyound the peremitted limit
+//----------------------------------------------------
+//
+RESOURCE TBUF r_evtui_maxevents_error
+    {
+    buf = qtn_locev_note_many_events;
+    }  
+
+//------------------------------------------------------------------------------
+// RESOURCE DIALOG r_evtui_confirmation_query
+// Confirmation Query Dialog
+//------------------------------------------------------------------------------
+//
+RESOURCE DIALOG r_evtui_confirmation_query
+    {
+    flags = EGeneralQueryFlags;
+    buttons = R_AVKON_SOFTKEYS_YES_NO;
+    items =
+        {
+        DLG_LINE
+            {
+            type = EAknCtQuery;
+            id = EGeneralQuery;
+            control = AVKON_CONFIRMATION_QUERY
+                {
+                layout = EConfirmationQueryLayout;                
+                };
+            }
+        };
+    }
+
+//------------------------------------------------------------------------------
+// RESOURCE DIALOG r_evtui_message_query
+// Message Query Dialog
+//------------------------------------------------------------------------------
+//
+RESOURCE DIALOG r_evtui_message_query
+{
+   flags = EGeneralQueryFlags;
+   buttons = R_AVKON_SOFTKEYS_OK_EMPTY;
+   items=
+       {
+       DLG_LINE
+          {
+            type = EAknCtPopupHeadingPane;
+            id = EAknMessageQueryHeaderId;
+            itemflags = EEikDlgItemNonFocusing;
+            control = AVKON_HEADING
+                {                  
+                headinglayout=R_AVKON_LIST_HEADING_PANE_POPUPS;
+                };
+          },
+       DLG_LINE
+          {
+            type = EAknCtMessageQuery;
+            id = EAknMessageQueryContentId;
+            control = AVKON_MESSAGE_QUERY
+                {
+                };
+          }
+       };
+}
+
+//----------------------------------------------------
+// RESOURCE TBUF r_evtui_createnew_list
+// List box item for creating new event
+//----------------------------------------------------
+//
+RESOURCE TBUF r_evtui_createnew_list
+    {
+    buf = qtn_locev_list_create_new_event;
+    }
+
+//----------------------------------------------------
+// RESOURCE TBUF r_evtui_unnamed
+// List box entry for unnamed trigger 
+//----------------------------------------------------
+//
+RESOURCE TBUF r_evtui_unnamed
+    {
+    buf = qtn_locev_list_unnamed;
+    }
+
+//----------------------------------------------------
+// RESOURCE TBUF r_locev_not deleting
+// Wait note while deleting event
+//----------------------------------------------------
+//
+RESOURCE TBUF r_locev_note_deleting
+    {
+    buf = qtn_locev_note_deleting;
+    }
+
+//----------------------------------------------------
+// RESOURCE TBUF r_evtui_wait_processing
+// Wait note text while processing event
+//----------------------------------------------------
+//
+RESOURCE TBUF r_locev_note_processing
+    {
+    buf = qtn_locev_note_processing;
+    }
+    
+// New
+
+// ---------------------------------------------------------------------------
+// RESOURCE CBA r_evtmgmtui_disclaimer_cba
+// Control button array for events ui disclaimer
+// ---------------------------------------------------------------------------
+//  
+RESOURCE CBA r_evtmgmtui_disclaimer_cba
+    {
+    flags = 0;
+    buttons = 
+        {
+        CBA_BUTTON 
+            {
+            id = EEikBidOk; 
+            txt = qtn_locev_softkey_accept;
+            },
+        CBA_BUTTON
+            {   
+            id = EEikBidCancel;   
+            txt = qtn_locev_softkey_reject;
+            },
+        CBA_BUTTON 
+            {
+            id = EEikBidOk; 
+            txt = qtn_locev_softkey_accept;
+            }
+        };
+    }
+
+//------------------------------------------------------------------------------
+// RESOURCE DIALOG r_evtui_disclaimer_query
+// Message Query Dialog
+//------------------------------------------------------------------------------
+//
+RESOURCE DIALOG r_evtui_disclaimer_query
+{
+   flags = EGeneralQueryFlags;
+   buttons = r_evtmgmtui_disclaimer_cba;
+   items=
+       {
+       DLG_LINE
+          {
+            type = EAknCtPopupHeadingPane;
+            id = EAknMessageQueryHeaderId;
+            itemflags = EEikDlgItemNonFocusing;
+            control = AVKON_HEADING
+                {                  
+                headinglayout=R_AVKON_LIST_HEADING_PANE_POPUPS;
+                //txt = qtn_locev_note_disclaimer_heading;
+                };
+          },
+       DLG_LINE
+          {
+            type = EAknCtMessageQuery;
+            id = EAknMessageQueryContentId;
+            control = AVKON_MESSAGE_QUERY
+                {
+                //txt = qtn_locev_note_disclaimer_text;
+                };
+          }
+       };
+}
+
+//----------------------------------------------------
+// RESOURCE TBUF r_locev_note_disclaimer_heading
+// Disclaimer dialog heading
+//----------------------------------------------------
+//
+RESOURCE TBUF r_locev_note_disclaimer_heading
+    {
+    buf = qtn_locev_note_disclaimer_heading;
+    }
+
+//----------------------------------------------------
+// RESOURCE TBUF r_locev_note_disclaimer_text
+// Disclaimer dialog text
+//----------------------------------------------------
+//
+RESOURCE TBUF r_locev_note_disclaimer_text
+    {
+    buf = qtn_locev_note_disclaimer_text;
+    }
+
+//----------------------------------------------------
+// RESOURCE TBUF r_locev_confirmation_note_text
+// Confirmation note to save Disclaimer show settings
+//----------------------------------------------------
+//
+RESOURCE TBUF r_locev_confirmation_note_text
+    {
+    buf = qtn_locev_confirmation_note_text;
+    }
+
+//----------------------------------------------------
+// RESOURCE TBUF r_locev_note_singleevt_delete
+// Wait note text while deleting single event
+//----------------------------------------------------
+//
+RESOURCE TBUF r_locev_note_singleevt_delete
+    {
+    buf = qtn_locev_note_singleevt_delete;
+    }
+
+//----------------------------------------------------
+// RESOURCE TBUF r_locev_note_multipleevt_delete
+// Wait note text while deleting multiple event
+//----------------------------------------------------
+//
+RESOURCE TBUF r_locev_note_multipleevt_delete
+    {
+    buf = qtn_locev_note_multipleevt_delete;
+    }
+
+//----------------------------------------------------
+// RESOURCE TBUF r_locev_note_singleevt_draft
+// Wait note text while saving single event as Draft
+//----------------------------------------------------
+//
+RESOURCE TBUF r_locev_note_singleevt_draft
+    {
+    buf = qtn_locev_note_singleevt_draft;
+    }
+
+//----------------------------------------------------
+// RESOURCE TBUF r_locev_note_multipleevt_draft
+// Wait note text while saving multiple events as Draft
+//----------------------------------------------------
+//
+RESOURCE TBUF r_locev_note_multipleevt_draft
+    {
+    buf = qtn_locev_note_multipleevt_draft;
+    }
+
+//----------------------------------------------------
+// RESOURCE TBUF r_locev_note_singleevt_activate
+// Wait note text while Activating single event
+//----------------------------------------------------
+//
+RESOURCE TBUF r_locev_note_singleevt_activate
+    {
+    buf = qtn_locev_note_singleevt_activate;
+    }
+
+//----------------------------------------------------
+// RESOURCE TBUF r_locev_note_multipleevt_activate
+// Wait note text while Activating multiple events
+//----------------------------------------------------
+//
+RESOURCE TBUF r_locev_note_multipleevt_activate
+    {
+    buf = qtn_locev_note_multipleevt_activate;
+    }
+    
+//End file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventsmgmtui/data/evtmgmtui_reg.rss	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,48 @@
+/*
+* 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:  Resource file defintion for project Events Management UI
+*
+*/
+
+
+// SYSTEM INCLUDES
+#include <appinfo.rh>
+#include <data_caging_paths_strings.hrh>
+#include <evtmgmtui.rsg>
+
+// USER INCLUDES
+#include "evtmgmtuiuid.hrh"
+
+#define EVTMGMTUI_RESOURCE_FILE_NAME APP_RESOURCE_DIR"\\evtmgmtui"
+
+// ---------------------------------------------------------------------------
+// UID Defintions
+// ---------------------------------------------------------------------------
+//
+UID2 KUidAppRegistrationResourceFile
+UID3 KEvtMgmtUiUid
+
+// ---------------------------------------------------------------------------
+// Application Information registration resource
+// ---------------------------------------------------------------------------
+//
+RESOURCE APP_REGISTRATION_INFO
+    {    
+    app_file = "evtmgmtui";
+    embeddability = KAppEmbeddable;    
+    localisable_resource_file = EVTMGMTUI_RESOURCE_FILE_NAME;
+    localisable_resource_id = R_EVTMGMTUI_LOCALISABLE_APP_INFO;
+    }
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventsmgmtui/group/bld.inf	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,44 @@
+/*
+* 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:  Build information file for project Events Management UI
+*
+*/
+
+
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_EXPORTS
+../data/eventsuistub.sis        /epoc32/data/z/system/install/eventsuistub.sis
+
+PRJ_MMPFILES
+// MMP Files
+evtmgmtui.mmp
+
+
+PRJ_EXTENSIONS
+//application icon
+START EXTENSION s60/mifconv
+OPTION TARGETFILE evtmgmtui_aif.mif
+OPTION SOURCES -c8 qgn_menu_locev.svg
+END
+
+
+//icons in application
+START EXTENSION s60/mifconv
+OPTION TARGETFILE evtmgmtui.mif
+OPTION HEADERFILE evtmgmtui.mbg
+OPTION SOURCES -c32,8 qgn_prop_locev_new.svg -c32,8 qgn_prop_locev_draft.svg -c32,8 qgn_prop_locev_invalid.svg -c32,8 qgn_prop_locev_completed.svg -c32,8 qgn_prop_locev_trigger -c8,8 qgn_indi_repeat_add
+END
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventsmgmtui/group/evtmgmtui.mmp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,89 @@
+/*
+* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Project definition file for project Events Management UI
+*                Application
+*
+*/
+
+
+// SYSTEM INCLUDES
+#include <platform_paths.hrh> // For the APP_LAYER_SYSTEMINCLUDE
+#include <data_caging_paths.hrh>
+
+// USER INCLUDES
+#include "../inc/evtmgmtuiuid.hrh"
+
+TARGET          evtmgmtui.exe
+TARGETTYPE      exe
+UID             0x100039ce KEvtMgmtUiUid
+
+VERSION         1.0
+
+VENDORID        VID_DEFAULT
+CAPABILITY      CAP_APPLICATION TrustedUI
+
+APP_LAYER_SYSTEMINCLUDE
+
+
+USERINCLUDE     ../inc ../../inc
+
+SOURCEPATH      ../src
+SOURCE          evtmgmtuiapp.cpp
+SOURCE		    evtmgmtuiappui.cpp 
+SOURCE		    evtmgmtuistartupcontainer.cpp
+SOURCE          evtmgmtuistartupview.cpp
+SOURCE 		    evtmgmtuidocument.cpp
+SOURCE evtmgmtuilocsettinglauncher.cpp
+
+SOURCEPATH      ../data 
+START RESOURCE  evtmgmtui.rss
+HEADER
+TARGETPATH      APP_RESOURCE_DIR
+LANGUAGE_IDS
+END
+
+START RESOURCE evtmgmtui_reg.rss
+DEPENDS evtmgmtui.rsg
+TARGETPATH /private/10003a3f/apps
+END
+
+LIBRARY         featmgr.lib
+LIBRARY         euser.lib 
+LIBRARY         apparc.lib 
+LIBRARY         cone.lib 
+LIBRARY         eikcore.lib 
+LIBRARY         avkon.lib 
+LIBRARY		    bafl.lib
+LIBRARY         eikcoctl.lib
+LIBRARY         efsrv.lib 
+LIBRARY		    eikctl.lib
+LIBRARY         egul.lib
+LIBRARY         fbscli.lib
+LIBRARY         estor.lib					
+LIBRARY         commonengine.lib
+LIBRARY		    aknskins.lib
+LIBRARY		    aknskinsrv.lib
+LIBRARY		    aknswallpaperutils.lib
+LIBRARY         hlplch.lib aknlayout.lib
+LIBRARY		    aknicon.lib eikdlg.lib npdlib.lib lmkcommonui.lib eposlandmarks.lib
+LiBRARY		    lbs.lib 
+LIBRARY         centralrepository.lib   // CRepository
+LIBRARY			servicehandler.lib
+LIBRARY		evtutils.lib
+LIBRARY			evtengine.lib
+LIBRARY			evteditor.lib
+LIBRARY locsettingsuiclient.lib mnclientlib.lib
+
+SOURCEPATH ../src
+SOURCE evtmgmtuimodel.cpp evtmgmtuilegalnote.cpp evtmgmtuimapnavigationadapter.cpp evtmgmtuilistboxmodel.cpp evtmgmtuilistbox.cpp evtmgmtuifiltermodel.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventsmgmtui/inc/evtmgmtui.hrh	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,44 @@
+/*
+* 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:  Enumeration for Events Management UI command set.
+*
+*/
+
+
+/**
+ * Enumeration for Events Management UI command set
+ */
+enum TEvtMgmtUiCommands
+	{
+	EEvtMgmtUiCommandNone = 0x5000,
+	EEvtMgmtUiStartupViewOpen,
+	EEvtMgmtUiStartupViewCreate,
+
+	EEvtMgmtUiEventUiEvtShow,
+	EEvtEditorCmdShowAll,
+	EEvtEditorCmdShowActive,
+	EEvtEditorCmdShowDrafts,
+	EEvtEditorCmdShowCompleted,
+	EEvtEditorCmdActivate,
+	EEvtEditorCmdSaveDraft,
+	EEvtEditorCmdDelete, 
+	EEvtEditorCmdNavigateToPlace,
+	EEvtEditorCmdShowOnMap,
+	
+	EEvtMgmtUiEventUiPosSettings,
+	
+	EEvtMgmtUiShowOnMapPlaceHolder,
+	EEvtMgmtUiNavigateToPlaceHolder
+	};           
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventsmgmtui/inc/evtmgmtuiapp.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,49 @@
+/*
+* 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:  Application class for Events Management UI.
+*
+*/
+
+
+#ifndef C_EVTMGMTUIAPP_H
+#define C_EVTMGMTUIAPP_H
+
+// SYSTEM INCLUDES
+#include <aknapp.h>
+
+/**
+ * Events Management UI's App class. This class extents the CAknApplication
+ * class for Events Management UI.
+ *
+ * @lib evtmgmtui.exe
+ * @since S60 v5.0
+ */	
+class CEvtMgmtUiApp : public CAknApplication
+	{
+private: // Inherited from Base classes
+	/**
+	 * Inherited from CAknApplication
+	 */ 
+    CApaDocument* CreateDocumentL();
+    
+	/**
+	 * Inherited from CAknApplication
+	 */         
+    TUid AppDllUid() const;
+    };
+
+#endif  // C_EVTMGMTUIAPP_H
+
+// End of File
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventsmgmtui/inc/evtmgmtuiappui.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,90 @@
+/*
+* 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:  Application class for Events Management UI.
+*
+*/
+
+
+#ifndef C_EVTMGMTUIAPPUI_H
+#define C_EVTMGMTUIAPPUI_H
+
+// SYSTEM INCLUDES
+#include <eikapp.h>
+#include <eikdoc.h>
+#include <e32std.h>
+#include <coeccntx.h>
+#include <aknViewAppUi.h>
+
+// FORWARD DECLARATIONS
+class CEikStatusPane;
+class CEvtMgmtUiLegalNote;
+
+/**
+ * Events Management UI application class. This class extends the Location
+ * S60 Application UI class to provide the Events management UI related
+ * Application
+ *
+ * @lib evtmgmtui.exe
+ * @since S60 v5.0
+ */
+class CEvtMgmtUiAppUi : public CAknViewAppUi
+    {
+public:   
+	/**
+	 * Second phase of the two phase constructor
+	 *
+	 * Called by the Application framework
+	 */ 
+    void ConstructL();
+  
+  	/**
+  	 * Virtual destructor
+  	 */
+    virtual ~CEvtMgmtUiAppUi();  
+  
+public: // Inherited from Base classes
+
+  	/**
+  	 * Inherited from CAknViewAppUi
+  	 */
+    void HandleCommandL( TInt aCommand );
+                       
+private: // Inherited from Base classes
+  	/**
+  	 * Inherited from CAknViewAppUi
+  	 */
+    virtual TKeyResponse HandleKeyEventL( const TKeyEvent& aKeyEvent,
+                                                TEventCode aType );
+                                                
+private:
+    /**
+     * Create Events UI title text
+     */                      
+    void MakeTitleL( TInt aResourceText );
+    
+private: //Data
+    /**
+     * Retrieve the application specific status pane
+     */
+    CEikStatusPane* StatusPane();
+    
+    /**
+     * Legal Note
+     */
+    CEvtMgmtUiLegalNote* iLegalNote;
+    };
+
+#endif  // C_EVTMGMTUIAPPUI_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventsmgmtui/inc/evtmgmtuicmdhdlr.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,81 @@
+/*
+* 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:  Interface class that provides the command handling functionality.
+*                The class implementing it should be prepared to handle all commands
+*                except those internal to the calling UI
+*
+*/
+
+
+#ifndef M_EVTMGMTUICMDHDLR_H_
+#define M_EVTMGMTUICMDHDLR_H_
+
+// System Include 
+#include <e32base.h>
+
+// Class Definition
+
+/**
+ *  Interface class that provides the command handling functionality.
+ */
+class MEvtMgmtUiCmdHdlr
+    {
+    public:
+        /**
+         * Enumeration for Command Handler commands
+         */
+         enum TEvtMgmtUiCmd
+            {
+            /**
+             * List box item selection
+             */
+            EListBoxItemSelected,
+            
+            /**
+             * List box item Focused
+             */
+            EListBoxItemFocused,
+            
+            /**
+             * Screen size changed
+             */
+            EScreenSizeChanged,
+            
+            /**
+             * Item two-taps event
+             */
+            EListBoxItemDoubleClicked,
+            
+            /*
+             *  when c key is pressed
+             */
+            EListBoxItemDeleted,
+            
+            /*
+             *  when Listbox Filter count changed
+             */
+            EListBoxFilterCountChanged
+            };
+    public:
+        /**
+         * Command handling function
+         *
+         * @param aCommand Command that needs to be handled
+         */
+         virtual void HandleCmdL( TEvtMgmtUiCmd aCommand )   = 0;
+         
+    };
+
+#endif // M_EVTMGMTUICMDHDLR_H_
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventsmgmtui/inc/evtmgmtuidocument.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,69 @@
+/*
+* 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:  Document class for Events Management UI.
+*
+*/
+
+
+#ifndef C_EVTMGMTUIDOCUMENT_H
+#define C_EVTMGMTUIDOCUMENT_H
+
+// SYSTEM INCLUDES
+#include <AknDoc.h>
+
+// FORWARD DECLARATIONS
+class  CEikAppUi;
+
+/**
+ * Event Management UI document class.
+ *
+ * @lib evtmgmtui.exe
+ * @since S60 v5.0
+ */
+class CEvtMgmtUiDocument : public CAknDocument
+    {
+public:
+	/**
+	 * Static Two phase constructor
+	 */
+    static CEvtMgmtUiDocument* NewL( CEikApplication&    aApp );
+
+  	/**
+  	 * Virtual destructor
+  	 */
+    virtual ~CEvtMgmtUiDocument();
+
+private:
+	/**
+	 * C++ Default constructor
+	 */
+    CEvtMgmtUiDocument( CEikApplication&     aApp );
+
+	/**
+	 * Second phase of the two phase constructor
+	 */
+    void ConstructL();
+
+private: // Inherited from Base class
+
+	/**
+	 * Inherited from CAknDocument
+	 */
+    CEikAppUi* CreateAppUiL();
+    };
+
+#endif  // C_EVTMGMTUIDOCUMENT_H
+
+// End of File
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventsmgmtui/inc/evtmgmtuifiltermodel.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,125 @@
+/*
+* 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:  Filter Model class for Events management UI start-up view.
+*
+*/
+
+
+#ifndef CEVTMGMTUIFILTERMODEL_H
+#define CEVTMGMTUIFILTERMODEL_H
+
+// SYSTEM INCLUDES
+#include <e32base.h>        // CBase
+#include <bamdesca.h>       // MDesCArray
+
+// FORWARD DECLARATIONS
+class CAknSearchField;
+
+/**
+ * Events Management UI start-up view listbox Filter model
+ *
+ * @lib evtmgmtui.exe
+ * @since S60 v5.0
+ */
+class CEvtMgmtUiFilterModel : public CBase, public MDesCArray
+    {
+public: 
+    
+  	/**
+  	 * Virtual destructor
+  	 */
+    virtual ~CEvtMgmtUiFilterModel();
+
+	/**
+	 * Static Two phase constructor
+	 *
+	 * @return CEvtMgmtUiFilterModel*, Pointer to the newly created object.
+	 */  
+    static CEvtMgmtUiFilterModel* NewLC();
+
+	/**
+	 * Static Two phase constructor
+	 *
+	 * @return CEvtMgmtUiFilterModel*, Pointer to the newly created object.
+	 */  
+    static CEvtMgmtUiFilterModel* NewL();
+    
+protected:   
+    /**
+    * Default constructor
+    */
+    CEvtMgmtUiFilterModel();
+       
+  	/**
+  	 * Two phased constructor
+  	 */    
+    void ConstructL();
+    
+public:
+  	/**
+  	 * Set the Item text Array
+  	 */
+	void SetItemTextArray(MDesCArray* aActualItemTextArray);
+
+  	/**
+  	 * Set the Search Field
+  	 */
+	void SetSearchField(CAknSearchField* aSearchField);
+
+  	/**
+  	 * Returns the String at zero index.
+  	 */
+	TPtrC16 GetZeroIndex();
+	
+  	/**
+  	 * Inherited from MDesCArray
+  	 */
+    TInt    MdcaCount() const;
+    
+  	/**
+  	 * Inherited from MDesCArray
+  	 */    
+    TPtrC16 MdcaPoint( TInt aIndex ) const;
+                                        
+private:
+
+  	/**
+  	 * Obtain the current Search text.
+  	 */
+    void GetSearchTextL(HBufC*& aString) const;
+
+  	/**
+  	 * Update the text based on search string.
+  	 */
+    void UpdateTextL() const;
+    
+    
+private:
+    /**
+      * events array
+      * Owns
+      */
+   CAknSearchField* iSearchField;
+   
+    /**
+      * events array
+      * Owns
+      */
+   MDesCArray* iActualItemTextArray;
+   
+   HBufC* iBuffer;
+    };
+
+#endif // CEVTMGMTUIFILTERMODEL_H
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventsmgmtui/inc/evtmgmtuilegalnote.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,106 @@
+/*
+* 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:  Asynchronous display of legal and disclaimer note.
+*
+*/
+
+
+#ifndef C_EVTMGMTUILEGALNOTE_H
+#define C_EVTMGMTUILEGALNOTE_H
+
+// System Includes
+
+//  System Includes
+#include <e32base.h>
+
+// User Includes
+
+// User Includes
+
+// Forward Declarations
+class CRepository;
+
+// extern data types
+
+// global Functions
+
+// constants go here
+
+/**
+ *  Class that displays the Legal and disclaimer note.
+ *  This class asynchronously displays the legal note.. 
+ *
+ *  @since S60 v9.1
+ */
+class CEvtMgmtUiLegalNote : public CActive
+    {    
+public:
+    /**
+     * Constructs a new instance of Legal Note launcher.
+     *
+     * @return The new instance of Legal Note launcher.
+     * @leave System wide error code if the object creation fails.         
+     */
+    static CEvtMgmtUiLegalNote* NewL( CAknAppUi& aAppUi );
+    
+    /**
+     * Constructs a new instance of Legal Note launcher.
+     * Leaves the created instance on the cleanup stack.
+     *
+     * @return The new instance of Legal Note launcher.
+     * @leave System wide error code if the object creation fails.         
+     */
+    static CEvtMgmtUiLegalNote* NewLC( CAknAppUi& aAppUi );  
+    
+    /**
+     * Destructor
+     */
+    virtual ~CEvtMgmtUiLegalNote ();
+    
+    /**
+     * Display the Legal and Disclaimer Note.
+     */
+    void DisplayNoteL( );
+
+	// Inherited from CActive 
+    void RunL();
+    
+    void DoCancel();
+    
+    TInt RunError( TInt aError ); 
+
+private: 
+    
+    /**
+     * Default C++ Constructor.
+     */
+    CEvtMgmtUiLegalNote( CAknAppUi& aAppUi ); 
+
+    /**
+     * Second phase of the two phase constructor.
+     */
+    void ConstructL();
+
+private: // data
+    
+    /**
+     *  CRepository Instance
+     */
+    CRepository*                    iRepository;
+    
+    CAknAppUi&												iAppUi;
+
+    };
+
+#endif // C_EVTMGMTUILEGALNOTE_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventsmgmtui/inc/evtmgmtuilistbox.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,67 @@
+/*
+* 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:  List box class for Events Management UI.
+*
+*/
+
+#ifndef C_EVTMGMTUILISTBOX_H
+#define C_EVTMGMTUILISTBOX_H
+
+
+#include <aknlists.h>
+
+
+class CEvtMgmtUiListBoxModel;
+
+/**
+*  CEvtMgmtUiListBox exists because the list boxes in EventsUi 
+*  application needs a specialized version of CAknFilteredTextListBoxModel 
+*  called CEvtMgmtUiListBoxModel. CEvtMgmtUiListBox creates an instance of 
+*  CEvtMgmtUiListBoxModel instead of the default CAknFilteredTextListBoxModel.
+*/
+class CEvtMgmtUiListBox : public CAknDoubleLargeStyleListBox
+    {
+    public: // Constructors and destructor
+    
+        /**
+        * Symbian 2nd phase constructor. Should be called after the 
+        * constructor.
+        *
+        * @param aParent the parent control
+        * @param aFlags flags defining the behaviour of the listbox
+        */
+        void ConstructL(
+            const CCoeControl* aParent,
+            TInt aFlags);
+
+    public: // from CAknColumnListBox
+
+        /**
+        * Creates the listbox model.
+        */
+        void CreateModelL();
+
+    public: // from CEikColumnListBox
+
+        /**
+        * Returns a pointer to the listbox model.
+        *
+        * @return a pointer to the listbox model
+        */
+        CEvtMgmtUiListBoxModel* Model() const;
+
+    };
+
+#endif // C_EVTMGMTUILISTBOX_H
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventsmgmtui/inc/evtmgmtuilistboxmodel.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,135 @@
+/*
+* 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:  List box model class for Events Management UI.
+*
+*/
+
+#ifndef C_EVTMGMTUILISTBOXMODEL_H
+#define C_EVTMGMTUILISTBOXMODEL_H
+
+// INCLUDES
+#include <AknUtils.h>
+
+// FORWARD DECLARATIONS
+class CEvtMgmtUiFilterModel;
+
+// CLASS DECLARATION
+
+/**
+*  CEvtMgmtUiListBoxModel bypasses the default filtering algorithm provided by 
+*  CAknFilteredTextListBoxModel. The filtering responsibility is forwarded to 
+*  the CCoeControl instance owning the list box. That instance must update the
+*  model when the filter has been modified.
+*/
+class CEvtMgmtUiListBoxModel : public CAknFilteredTextListBoxModel
+    {
+    public:
+	    /**
+	     * Constructs a new instance of List box Model.
+	     *
+	     * @return The new instance of List box Model.
+	     * @leave System wide error code if the object creation fails.         
+	     */
+	    static CEvtMgmtUiListBoxModel* NewL( );
+    
+		/**
+		 * Constructs a new instance of List box Model.
+		 * Leaves the created instance on the cleanup stack.
+		 *
+		 * @return The new instance of List box Model.
+		 * @leave System wide error code if the object creation fails.         
+		 */
+		static CEvtMgmtUiListBoxModel* NewLC( );  
+		
+    public: // from CAknFilteredTextListBoxModel
+
+        /**
+        * Gets an array of strings to be displayed in the listbox for 
+        * incremental matching of typed characters. This array always contains 
+        * the total number of items rather than a subset filtered out from the 
+        * model.
+        *
+        * @return A text array for matching.
+        */
+        const MDesCArray* MatchableTextArray() const;
+
+        /**
+        * Gets the number of text items in this list box model. This number is 
+        * always the total number of items in the model rather than a subset 
+        * filtered out from the model
+        *
+        * @return The number of text items in this list box model
+        */
+        TInt NumberOfItems() const;
+
+        /**
+        * Gets the text to be displayed in the list box control for a specific 
+        * item.
+        *
+        * @param aItemIndex Index of an item
+        * @return Text string to be displayed
+        */
+        TPtrC ItemText(TInt aItemIndex) const;
+
+        /**
+        * Set the Zero Row String.
+        *
+        * @param aZeroIndexString Zero Index String
+        */
+        void SetItemTextArrayToFilterModel();
+        
+        /**
+         * Set the FindBox to Filter model.
+         */
+        void SetFindToFilterModel(CAknSearchField* aSearchField);
+    public:
+        /**
+         * Inherited from MDesCArray
+         */
+        TInt    MdcaCount() const;
+        
+        /**
+         * Inherited from MDesCArray
+         */    
+        TPtrC16 MdcaPoint( TInt aIndex ) const;
+
+        /**
+         * Destructor
+         */    
+        ~CEvtMgmtUiListBoxModel();
+
+    private:
+        /**
+         * 2nd phase constructor
+         */ 
+        void ConstructL();
+
+        /**
+         * Default constructor
+         */ 
+        CEvtMgmtUiListBoxModel();
+        
+    private:
+
+        /**
+         * FilterModel Instance
+		 * Own:
+         */    
+        CEvtMgmtUiFilterModel* iEvtMgmtUiFilterModel;
+
+    };
+
+#endif // C_EVTMGMTUILISTBOXMODEL_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventsmgmtui/inc/evtmgmtuilocsettinglauncher.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,74 @@
+/*
+* Copyright (c) 2002-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:  Responsible for launching positioning settings
+*
+*/
+
+#ifndef EvtMgmtUiLocSettingsLauncher_H
+#define EvtMgmtUiLocSettingsLauncher_H
+
+// INCLUDES
+#include <e32base.h>
+#include <locsettingsuiclient.h>
+
+// CLASS DECLARATION
+/**
+*  CEvtMgmtUiLocSettingsLauncher class
+*  This class is a wrapper for launching Position settings
+*/
+class CEvtMgmtUiLocSettingsLauncher : public CActive
+	{
+	private : // Constructors and destructor
+	      /**
+	       * C++ default constructor.
+	       */
+	    CEvtMgmtUiLocSettingsLauncher();
+	      
+	public:
+	      /**
+	       * Destructor.
+	       */
+	      ~CEvtMgmtUiLocSettingsLauncher();		
+	
+	public:	
+		/**
+         * Two-phased constructor.
+         *
+         */
+	     static CEvtMgmtUiLocSettingsLauncher* NewL();
+			      
+	private: 
+		 /**
+          * Second phase of construction.
+          */
+	      void ConstructL();
+	      
+	public: // new functions
+	      void LaunchL();	      
+	      	      
+	protected: // from CActive
+	      void RunL();
+	      
+	      void DoCancel();
+	      
+	      void CancelRequest();
+	      
+	private:
+	    // Pointer to Location setings client library
+        CLocSettingsUiClient*       iClientLibrary;
+	};
+	
+#endif // EvtMgmtUiLocSettingsLauncher_H
+
+// End of file
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventsmgmtui/inc/evtmgmtuimapnavigationadapter.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,116 @@
+/*
+* 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:  Application's adapter class to Map and Navigation use cases
+*
+*/
+
+
+#ifndef CEVTMGMTUIMAPNAVIGATIONADAPTER_H
+#define CEVTMGMTUIMAPNAVIGATIONADAPTER_H
+
+// INCLUDES
+#include <AiwCommon.h>
+#include <e32std.h>
+
+class CAiwServiceHandler;
+class TCoordinate;
+
+/**
+* The class CEvtMgmtUiMapNavigationAdapter contains the implemenation 
+* for all the uses cases of Map and Navigation.
+* Functionality:
+*   To check map service providers
+*   To show location on map
+*   To navigate to the location
+*/
+
+class CEvtMgmtUiMapNavigationAdapter : public CBase, 
+                                       public MAiwNotifyCallback
+	{
+
+	public: // Constructors and destructor
+		/**
+        * Symbian 1st phase static constructor. 
+        *       
+        */        
+        static CEvtMgmtUiMapNavigationAdapter* NewL();
+         
+        static CEvtMgmtUiMapNavigationAdapter* NewLC();
+        /**
+        * Destructor.
+        */
+        ~CEvtMgmtUiMapNavigationAdapter();		
+    
+    public: // New methods       	
+        
+    	/**
+    	 * It will return total map service providers.
+    	 * 
+    	 * @since S60 v9.1
+    	 * 
+    	 * @ret total number of map service providers
+    	 */
+    	TInt MapServiceProvidersL();
+    	
+    	/**
+         * It will show location on map
+         * 
+         * @since S60 v9.1
+         */
+    	void ShowOnMapL( const TCoordinate& aCoordinate );
+    	
+    	/**
+         * It will navigate to location
+         * 
+         * @since S60 v9.1
+         */
+    	void NavigateToPlaceL( const TCoordinate& aCoordinate );
+   
+    public: // from MAiwNotifyCallback
+           /**
+           * The callback function for the get landmark from map use case
+           * This function gets a callback once the user selects a location
+           * from map to save as a landmark.
+           */
+           TInt HandleNotifyL( TInt aCmdId, 
+                               TInt aEventId, 
+                               CAiwGenericParamList &aEventParamList, 
+                               const CAiwGenericParamList &aInParamList );
+           	
+    private:
+    	/**
+        * C++ default constructor.                 
+        */
+        CEvtMgmtUiMapNavigationAdapter(); 
+        
+        /**
+        * Symbian 2nd phase constructor. 
+        */
+        void ConstructL();
+    	    	
+    private: // Data    	
+    	// Owns : Pointer to AIW service handler to send service commands     	
+    	CAiwServiceHandler*     iAiwServiceHandler;
+    	
+    	// Owns : Generic parameter input list     
+    	CAiwGenericParamList*   iInList;
+    	
+    	// Owns : Generic parameter output list    	     	
+        CAiwGenericParamList*   iOutList;      
+	};
+
+#endif //CEVTMGMTUIMAPNAVIGATIONADAPTER_H
+
+// End of file
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventsmgmtui/inc/evtmgmtuimodel.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,257 @@
+/*
+* 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:  Model class for Events management UI start-up view.
+*
+*/
+
+
+#ifndef CEVTMGMTUIMODEL_H
+#define CEVTMGMTUIMODEL_H
+
+// SYSTEM INCLUDES
+#include <e32base.h>        // CBase
+#include <bamdesca.h>       // MDesCArray
+#include "evtdefs.h"
+#include "evtmgmtuiengine.h"
+
+// Forward Declarations
+class CEvtBasicEventInfo;
+typedef TUint32 TEvtEventsStatusMask;
+
+/**
+ * Events Management UI start-up view listbox model
+ *
+ * @lib evtmgmtui.exe
+ * @since S60 v5.0
+ */
+class CEvtMgmtUiModel : public CBase, public MDesCArray
+    {
+public: 
+  	/**
+  	 * Enumeration to Currently shown Events
+  	 */
+    enum TEvtShowAttribute
+        {
+        EEvtShowAttributeActive = 0x0001,
+        EEvtShowAttributeDraft = 0x0002,
+        EEvtShowAttributeCompleted = 0x0004
+        };
+public: 
+    
+  	/**
+  	 * Virtual destructor
+  	 */
+    virtual ~CEvtMgmtUiModel();
+
+	/**
+	 * Static Two phase constructor
+	 *
+	 * @return CEvtMgmtUiModel*, Pointer to the newly created object.
+	 */  
+    static CEvtMgmtUiModel* NewLC();
+
+	/**
+	 * Static Two phase constructor
+	 *
+	 * @return CEvtMgmtUiModel*, Pointer to the newly created object.
+	 */  
+    static CEvtMgmtUiModel* NewL();
+    
+protected:   
+    /**
+    * Default constructor
+    */
+    CEvtMgmtUiModel();
+       
+  	/**
+  	 * Two phased constructor
+  	 */    
+    void ConstructL();
+    
+public:
+    /*
+     * It will return Events array object reference.
+     * @ret Events array object reference
+     */
+    RPointerArray<CEvtBasicEventInfo>& EventsArray();
+    
+	/**
+     * returns eventinfo object.
+     * @param[in] aIndex index of event in array
+     */
+	CEvtBasicEventInfo& EventFromModel( TInt aIndex );
+	
+	/**
+     * Returns total events.     
+	 * @ret Number of Events in the model
+     */
+	TInt TotalEvents();
+	
+  	/**
+  	 * Return Event Id based on the Index
+     * @param[in] aIndex index of event in array
+	 * @ret Event Id
+  	 */ 
+	TEvtEventId EventId( TInt aIndex );
+	
+  	/**
+  	 * Returns the Updated current Item Index
+	 * Called after the model is updated.
+	 * @ret Updated current item Index
+  	 */ 
+	TInt UpdatedCurrentItemIndex();
+	
+  	/**
+  	 * Set the Current Item Index
+	 * Called before the model is updated.
+     * @param[in] aIndex index of event in array
+  	 */ 
+	void SetCurrentItemId( TInt aItemIndex  );
+ 
+  	/**
+  	 * Check for Mandatory Fields of an Event
+	 * @param aIndex Index in the model.
+     * @param[in] aIndex index of event in array
+	 * @ret ETrue If mandatory fields are filled.
+  	 */ 
+	TBool MandatoryFieldsFilled(  TInt aIndex  );
+	
+  	/**
+  	 * Return Event status based on the Index on the model
+     * @param[in] aIndex index of event in array
+	 * @ret Event Status based on the Index
+  	 */ 
+	TEvtEventStatus EventStatus( TInt aIndex );
+	
+  	/**
+  	 * Update the Events Status Mask
+	 * Called after the Model is updated.
+  	 */ 
+	void UpdateEventsStatus();
+	
+  	/**
+  	 * Return Bit Mask which has the Status of all the 
+	 * Events present in the Model
+	 * @ret Status Bit Mask of the events present in model
+  	 */ 
+	TEvtEventsStatusMask EventsStatus();
+	
+  	/**
+  	 * Currently active Status Filter
+	 * @ret Currently active Status Filter
+  	 */ 
+	CEvtMgmtUiEngine::TEvtEventStatusFilter StatusFilter( );
+	
+  	/**
+  	 * Set the Status Filter
+     * @param[in] aFilter Filter to be Set for the model
+  	 */ 
+	void SetStatusFilter( CEvtMgmtUiEngine::TEvtEventStatusFilter
+                                        aFilter );
+	                          
+private:
+  	/**
+  	 * Return Index based on the Status Filter
+  	 */ 
+	TInt IndexBasedOnFilter( TInt aIndex ) const;
+	
+  	/**
+  	 * Return Index without the Status Filter
+  	 */ 
+	TInt IndexWithoutFilter( TInt aIndex ) const;
+                                        
+private:
+  	/**
+  	 * Inherited from MDesCArray
+  	 */
+    TInt    MdcaCount() const;
+    
+  	/**
+  	 * Inherited from MDesCArray
+  	 */    
+    TPtrC16 MdcaPoint( TInt aIndex ) const;
+
+private:
+    /**
+      * Update Type
+      */
+    enum TEvtModelUpdateState
+        {
+        EEvtCreate = 0x0001,
+        EEvtModify,
+        EEvtDelete 
+        };
+private:
+    /**
+      * events array
+      * Owns
+      */
+   RPointerArray<CEvtBasicEventInfo> iEventsArray;
+       
+    /**
+     * Conversion buffer
+     * Owns
+     */
+    HBufC*          iBuffer;
+    
+    /**
+     * Buffer containing the text for Create new trigger
+     * Owns
+     */    
+    HBufC*          iCreateNew;   
+    
+    /**
+     * Buffer containing the text for Unnamed String
+     * Owns
+     */    
+    HBufC* 	        iUnnamed;
+    
+    /**
+     * Active Triggers count
+     */    
+    TInt 			iActiveTriggers;
+    
+    /**
+     * Draft Triggers count
+     */    
+    TInt 			iDraftTriggers;
+    
+    /**
+     * Completed Triggers count
+     */    
+    TInt            iCompletedTriggers;
+    
+    /**
+     * Currently Focused Event Id to be maintained before model Update
+     */    
+    TEvtEventId 	iCurrentEventId;
+    
+    /**
+     * Currently Focused Event Index to be maintained before model Update
+     */    
+    TInt		 	iCurrentEventIndex;
+    
+    /**
+     * Bitmask Flag to hold the status of the currently present Events
+     */    
+    TEvtEventsStatusMask iEventsStatusMask;
+    
+    /**
+     * Status Filter used to show the events based on Event Status
+     */    
+    CEvtMgmtUiEngine::TEvtEventStatusFilter iStatusFilter;
+    };
+
+#endif // CEVTMGMTUIMODEL_H
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventsmgmtui/inc/evtmgmtuistartupcontainer.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,256 @@
+/*
+* 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:  Container class for Events Management UI startup view view.
+*
+*/
+
+
+#ifndef C_EVTMGMTUISTARTUPCONTAINER_H
+#define C_EVTMGMTUISTARTUPCONTAINER_H
+
+// SYSTEM INCLUDES
+#include <coecntrl.h>
+#include <eiklbo.h>
+
+#include "evtdefs.h"
+#include "evtmgmtuicmdhdlr.h"
+
+// FORWARD DECLARATIONS
+class CAknIconArray;
+class CEvtMgmtUiListBox;
+class CEvtMgmtUiModel;
+class CEikMenuPane;
+class CAknSearchField;
+/**
+ * Events management UI start-up view's container class. This class is 
+ * the chief windowing component of Events management UI start-up view
+ *
+ * @lib evtmgmtui.exe
+ * @since S60 v5.0
+ */
+class CEvtMgmtUiStartupContainer : public CCoeControl,
+					               public MEikListBoxObserver
+    {
+public: 
+	/**
+	 * Static Two phase constructor
+	 *
+	 * @param[in] aRect, 		 Client Rectangle for this window owning control.
+	 */
+	static CEvtMgmtUiStartupContainer* NewL( const TRect&  aRect, CEvtMgmtUiModel* aModel,
+                                    MEvtMgmtUiCmdHdlr& aCmdHandler );
+	
+  	/**
+  	 * Virtual destructor
+  	 */
+    ~CEvtMgmtUiStartupContainer();
+    
+    /**
+     * Returns the help context
+     *
+     * @param aContext  The help context that has to be determined
+     */
+    void GetHelpContext( TCoeHelpContext& aContext ) const;
+ 	
+public : //New functions
+    
+    /**
+   * Update listbox
+   */
+    void UpdateListBoxL(TInt aSelectedItemIndex);
+   
+    /**
+    * Return the index of the selected item 
+    */
+    TInt CurrentItemIndex();
+  
+    /** 
+    * Set the Title text
+    */ 
+    void MakeTitleL();    
+    
+    /** 
+     * It will handle mark functionality.
+     */ 
+    void HandleMarkCmdL( TInt aIndex, TBool aIsMarked );
+    
+    /** 
+     * It will display mark menu items dynamically.
+     */ 
+    void HandleMarkableListDynInitMenuPane(TInt aResourceId, CEikMenuPane *aMenu);
+    
+    /*
+     * It will return count of marked items
+     */
+    TInt NumberOfMarkedItems(); 
+    
+    /*
+     * It will return marked items
+     */
+    const CArrayFix<TInt>* MarkItems();
+    
+    /*
+     * It will return Filtered Index of the passed index
+     */
+    TInt FilteredIndex(TInt aIndex);
+    
+    /*
+     * It will return Filtered number of list items
+     */
+    TInt FilteredCount();
+     
+private: //new functions
+    
+    /**
+     * Creates the List box and List box model.
+     */     
+    void CreateListboxL(CEvtMgmtUiModel* aModel);
+    
+    /**
+     * Creates the Find Box.
+     */     
+    void CreateFindBoxL();
+    
+    /**
+     * Check for FindBox Visibilty.
+     */     
+    void HandleFindBoxVisibility();
+    
+    /**
+     * Update icons
+     */
+    void UpdateIconsL();    
+     
+    /**
+     * Append icon to icon array. CAknIconArray owns icons so it is 
+     * easier to it leave safely.
+     * @param aIcons icon array
+     * @param aIconFileWithPath icon file name with path
+     * @param aSkinID skin id of the icon
+     * @param aIconGraphicsIndex picture index
+     * @param aIconGraphicsMaskIndex mask index
+     */
+    void AddIconL( CAknIconArray&       aIcons,
+                   const TDesC&         aIconFileWithPath,
+                   TAknsItemID          aSkinID,
+                   TInt                 aIconGraphicsIndex,
+                   TInt                 aIconGraphicsMaskIndex );
+     
+    /**
+     * Append Color icon to icon array. CAknIconArray owns icons so it is 
+     * easier to it leave safely.
+     * @param aIcons icon array
+     * @param aIconFileWithPath icon file name with path
+     * @param aSkinID skin id of the icon
+     * @param aIconGraphicsIndex picture index
+     * @param aIconGraphicsMaskIndex mask index
+     */
+    void AddColorIconL( CAknIconArray&      aIcons,
+	                   const TDesC&         aIconFileWithPath,
+	                   TAknsItemID          aSkinID,
+	                   TInt                 aIconGraphicsIndex,
+	                   TInt                 aIconGraphicsMaskIndex );
+                         
+    /**
+     * Gets Events Management UI icon file path and name. Ownership
+     * is transferred, item is left in the cleanup stack.
+     * @return TFileName* The full name of the Events UI icon file.
+     */        
+    TFileName* IconFileNameLC() const;
+
+   
+    
+protected: // Inherited from Base classes
+  	/**
+  	 * Inherited from CCoeControl
+  	 */  
+    void SizeChanged();
+
+    /**
+     * Inherited from CCoeControl
+     */  
+    void FocusChanged( TDrawNow aDrawNow );
+
+  	/**
+  	 * Inherited from CCoeControl
+  	 */
+    TInt CountComponentControls() const;
+
+  	/**
+  	 * Inherited from CCoeControl
+  	 */
+    CCoeControl* ComponentControl( TInt aIndex ) const;
+    
+  	/**
+  	 * Inherited from CCoeControl
+  	 */    
+    TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent,
+                         			   TEventCode aType );
+                         			   
+	/**
+	 * Inherited from CCoeControl
+	 */
+	void HandleResourceChange( TInt aType );	                         			                    			                   			   
+                         			           
+    /**
+     * Inherited from MEikListBoxObserver
+     */
+    void HandleListBoxEventL( CEikListBox*      aListBox, 
+                              TListBoxEvent     aEventType );
+                                                           			            
+private:
+	
+	/**
+	 * C++ Default constructor
+	 */
+    CEvtMgmtUiStartupContainer(MEvtMgmtUiCmdHdlr& aCmdHandler);
+    
+	/**
+	 * Second phase of the two phase constructor
+	 */     
+    void ConstructL( const TRect& 	aRect, CEvtMgmtUiModel* aModel );
+    
+private:
+	/**
+	 * List box
+	 * Owns
+	 */
+    CEvtMgmtUiListBox*	iListBox;
+	
+	/**
+	 * Find box
+	 * Owns
+	 */
+	CAknSearchField*				iFindBox;
+
+    /**
+     * Help context
+     */
+    TCoeContextName                 iContextName;     
+
+    /**
+     * Command Handler
+     */
+    MEvtMgmtUiCmdHdlr& 				iCmdHandler;
+
+    /**
+     * List Model Count before List model is updated.
+     */
+    TInt iPrevCount;
+    
+	};
+
+#endif  // C_EVTMGMTUISTARTUPCONTAINER_H
+
+// End of File  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventsmgmtui/inc/evtmgmtuistartupview.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,304 @@
+/*
+* 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:  View class for Events Management UI.
+*
+*/
+
+
+#ifndef C_EVTMGMTUISTARTUPVIEWAPPVIEW_H
+#define C_EVTMGMTUISTARTUPVIEWAPPVIEW_H
+
+//  SYSTEM INCLUDES
+#include <aknview.h>
+#include <aknViewAppUi.h>
+#include <AknWaitNoteWrapper.h> // MAknBackgroundProcess
+
+#include "evtmgmtuiengine.h"
+#include "evtmgmtuicmdhdlr.h"
+
+
+// FORWARD DECLARATIONS
+class CEvtMgmtUiStartupContainer;
+class CEvtMgmtUiLocSettingsLauncher;
+class CEvtMgmtUiModel;
+/**
+ * Events Management UI Start-up view class.
+ *
+ * @lib evtmgmtui.exe
+ * @since S60 v5.0
+ */
+class CEvtMgmtUiStartupView : public CAknView,
+                              public MEvtMgmtUiEngineObserver,
+                              public MEvtMgmtUiCmdHdlr,
+                              public MAknBackgroundProcess
+    {
+    
+public:
+	/**
+	 * Static Two phase constructor
+	 *
+	 * @return CEvtMgmtUiStartupView*, Pointer to the newly created object.
+	 */                                              
+    static CEvtMgmtUiStartupView* NewL();
+    
+    /**
+     * C++ Destructor.
+     */
+    virtual ~CEvtMgmtUiStartupView();
+    
+private://new functions
+    /**
+     * It will update view
+     */ 
+    void UpdateViewL();
+    
+    /** 
+     * It will delete event from database
+     */ 
+    void DeleteEventL();
+   
+    /** 
+     * It shows confirmation query dialog
+     */    
+    TBool DisplayConfirmationQueryDlgL( const TDesC& aMsg );
+    /** 
+     * Change status of the event
+     * param[in] aStatus -  value to which event status should be changed
+     */ 
+    void ChangeEventStatusL(TEvtEventStatus aStatus);
+    
+    /** 
+     * Show all events with given status
+     * param[in] aStatusFilter -  status filter to display events
+     */
+    void ShowEventsL( CEvtMgmtUiEngine::TEvtEventStatusFilter aStatusFilter );
+    
+    /** 
+     * It will handle 'show on map' command.
+    */
+    void HandleShowOnMapCommandL();
+    
+    /** 
+     * It will handle 'navigate to place' command.
+     */
+    void HandleNavigateToPlaceCommandL();
+    
+public: // Inherited from Base classes    
+  	/**
+  	 * Inherited from CAknView
+  	 */     
+    void DoActivateL( const TVwsViewId& aPrevViewId,
+                            TUid        aCustomMessageId,
+                      const TDesC8&     aCustomMessage );
+
+  	/**
+  	 * Inherited from CAknView
+  	 */ 
+    void DoDeactivate();
+
+  	/**
+  	 * Inherited from CAknView
+  	 */ 
+    TUid Id() const;
+
+  	/**
+  	 * Inherited from CAknView
+  	 */ 
+    void HandleCommandL( TInt aCommand );
+   
+  	/**
+  	 * Inherited from CAknView
+  	 */    
+    void DynInitMenuPaneL( TInt 			aResourceId, 
+    					   CEikMenuPane* 	aMenuPane );
+    					   
+    /**
+     * Inherited from MEvtMgmtUiEngineObserver
+     */
+    void NotifyEventChangeL(TInt aErrorCode, TInt aState );
+    
+    /**
+     * Inherited from MEvtMgmtUiEngineObserver
+     */
+    void NotifyModelChangeL();
+    
+    /**
+     * Inherited from MEvtMgmtUiCmdHdlr
+     */
+    void HandleCmdL( TEvtMgmtUiCmd aCommand );
+     
+private:
+	/**
+	 * Overloaded C++ Contructor.
+	 */
+    CEvtMgmtUiStartupView();
+
+	/**
+	 * Second phase of the two phase constructor.
+	 */
+    void ConstructL();
+    
+    /**
+     * Handles the visbility of the S60 Help feature.
+     *
+     * @param aMenuPane, Menu pane object on which the Help feature must
+     *                   be evaluated.
+     */
+    void HandleHelpFeature( CEikMenuPane& aMenuPane ) const;
+
+	/**
+	 * To change the CBA
+	 */
+    void SetCba( TInt aResourceId );  
+    
+    /**
+     * It will return the event-id of the selected item. 
+     */
+    TEvtEventId EventIdOfCurrentItem();
+    
+    /**
+     * It will return the event id of event.
+     */
+    TEvtEventId EventId( TInt aIndex );
+    
+    /*
+     * It will return type of marked events
+     */
+    TInt  MarkedEventsStatus();
+    
+    /*
+     * It will start wait dialog.
+     */
+    void StartWaitDialogL();
+    
+   /*
+    * Check wether map functionality can be enabled.
+    * ret ETrue if map functionality should be enabled else EFalse
+    */
+    TBool EnableMapFunctionalityL( );
+    
+private: // from MAknBackgroundProcess
+    /**
+    * Called by the wait note wrapper when the note is dismissed. 
+    * This is as a result of either the user cancelling the note,
+    * or the process finishing.
+    */
+    void DialogDismissedL(TInt /*aButtonId*/); 
+
+    /**
+    * Called by the wait note wrapper following StepL. Unless the user has cancelled the note, 
+    * if this returns EFalse, it will call StepL again, otherwise, it will call ProcessFinished.
+    * @return ETrue if processing is complete, EFalse otherwise
+    */
+    TBool IsProcessDone() const;
+
+    /**
+    * Called by the wait note wrapper if the process is complete or if the user cancelled the note.
+    * Completes the game save and resets the steps completed counter.
+    */
+    void ProcessFinished();  
+
+    /**
+    * Called by the wait note wrapper if the processing is not yet complete. 
+    * Completes a step in the processing, by saving part of the game to a file, and incrementing the
+    * number of steps completed. This is a synchronous method.
+    */
+    void StepL();  
+
+    /**
+    * Handles error occurred in StepL
+    * @param aError error code that occurred
+    * @return translated error code. If this is != KErrNone process will be stopped.
+    */
+    TInt CycleError(TInt aError);
+       
+private: // Enumerations
+    /**
+     * Enumeration to Flag the Marked Event's Status.
+     */
+    enum TMarkedEventsStatus
+        {
+        EMarkedEventsStatusActive,
+        EMarkedEventsStatusDraft,
+        EMarkedEventsStatusCompleted,
+        EMarkedEventsStatusInvalid,
+        EMarkedEventsStatusMix
+        };
+    
+    /**
+     * Wait Dialog's States.
+     */
+    enum TWaitDlgState
+        {
+        EWaitDlgLaunchToDelete,
+        EWaitDlgLaunchToChangeStatus,        
+        EWaitDlgInitiateProcess,
+        EWaitDlgDestroy       
+        };
+    
+private: // Data members
+	/**
+	 * Events Management UI Start-up container.
+	 * Owns.
+	 */
+    CEvtMgmtUiStartupContainer*   	iContainer;
+    
+    /**
+     * Model to perform all events (data only) manipulation
+     */
+    CEvtMgmtUiEngine* iEngine;
+    
+    /*
+     *  Position Settings Launcher
+     *  Owns
+     */
+    CEvtMgmtUiLocSettingsLauncher* iPosSetLauncher;
+    
+    /*
+     *  Boolean to maintain the application launch type
+     */
+    TBool iIsEmbeddedApp;
+    
+    /*
+     *  Model
+     *  Owns
+     */
+    CEvtMgmtUiModel*                iModel;
+  
+    /*
+     * List of events id to be deleted/updated
+     * Owns
+     */
+    RArray<TEvtEventId>* iEvtIdArray;
+      
+    /*
+     * It is used as state-machine for wait dialog
+     */
+    TInt iWaitState;
+    
+    /*
+     * It stores event status .... used for 'change event status'
+     */
+    TEvtEventStatus iEvtStatus;
+    
+    /*
+     *  It will determine if error note should be displayed
+     *  once 'Activate' operation is completed for multiple events
+     *  An error note is required when event doesnt contain mandatory fields.
+     */
+    TBool iDisplayNote;
+    };          
+
+#endif // C_EVTMGMTUISTARTUPVIEWAPPVIEW_H
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventsmgmtui/inc/evtmgmtuiuid.hrh	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,27 @@
+/*
+* 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:  UID Defintions for Events Management UI
+*
+*/
+
+
+#ifndef EVTMGMTUIUID_HRH
+#define EVTMGMTUIUID_HRH
+
+/**
+ * Application UID Definitions for Events Management UI
+ */
+#define KEvtMgmtUiUid    			0x2001E663
+
+#endif //EVTMGMTUIUID_HRH
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventsmgmtui/src/evtmgmtuiapp.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,70 @@
+/*
+* 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:  Application class for Events Management UI.
+*
+*/
+
+
+// SYSTEM INCLUDES
+#include <eikstart.h>
+
+// USER INCLUDES
+#include "evtmgmtuiapp.h"
+#include "evtmgmtuidocument.h"
+#include "evtmgmtuiuid.hrh"
+
+// ------------------------ Local Functions ----------------------------------
+
+// ---------------------------------------------------------------------------
+// CApaApplication* NewApplication
+// ---------------------------------------------------------------------------
+//
+LOCAL_C CApaApplication* NewApplication()
+    {
+    return new CEvtMgmtUiApp;
+    }
+
+// ----------------- Member funtions for CEvtMgmtUiApp ------------------------------
+	
+// ---------------------------------------------------------------------------
+// TUid CEvtMgmtUiApp::AppDllUid
+// ---------------------------------------------------------------------------
+//
+TUid CEvtMgmtUiApp::AppDllUid() const
+    {
+    return TUid::Uid( KEvtMgmtUiUid );
+    }
+
+// ---------------------------------------------------------------------------
+// CApaDocument* CEvtMgmtUiApp::CreateDocumentL
+// ---------------------------------------------------------------------------
+//
+CApaDocument* CEvtMgmtUiApp::CreateDocumentL()
+    {
+    return CEvtMgmtUiDocument::NewL( *this );
+    }
+
+// ------------------------ Global Functions ----------------------------------
+
+// ---------------------------------------------------------------------------
+// TInt E32Main
+// ---------------------------------------------------------------------------
+//
+GLDEF_C TInt E32Main()
+    {
+    return EikStart::RunApplication( NewApplication );
+    }
+
+// End of File  
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventsmgmtui/src/evtmgmtuiappui.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,149 @@
+/*
+* 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:  Application class for Events Management UI.
+*
+*/
+
+
+// SYSTEM FILES
+#include <avkon.hrh>
+#include <AknsConstants.h>
+#include <aknnotewrappers.h>
+#include <textresolver.h>
+#include <evtmgmtui.rsg>
+#include <eikspane.h> 		// Status pane
+#include <akntitle.h>   	// CAknTitlePane
+#include <StringLoader.h>
+#include <eikserverapp.h>
+#include <aknmessagequerydialog.h>
+#include <aknnotewrappers.h> 
+#include <evtmgmtui.rsg>
+
+// USER INCLUDES
+#include "evtmgmtuiappui.h"
+#include "evtmgmtui.hrh"
+#include "evtmgmtuistartupview.h"
+#include "evtmgmtuilegalnote.h"
+#include "evtdebug.h"
+
+// ----------------- Member funtions for CEvtMgmtUiAppUi ------------------------------
+
+// ---------------------------------------------------------------------------
+// void CEvtMgmtUiAppUi::ConstructL
+// ---------------------------------------------------------------------------
+//
+void CEvtMgmtUiAppUi::ConstructL()
+    {
+    EVTUIDEBUG( "=================================== EventsUi is launched ===========================" );
+    
+    
+    BaseConstructL( EAknEnableSkin | EAknEnableMSK | EAknSingleClickCompatible );
+    MakeTitleL( R_EVTUI_TITLE );
+    
+    // Create the View object and add it to the View stack
+    CEvtMgmtUiStartupView* startupview = CEvtMgmtUiStartupView::NewL();
+    CleanupStack::PushL( startupview );  	
+    AddViewL( startupview );
+    CleanupStack::Pop( startupview );
+    
+    iLegalNote = CEvtMgmtUiLegalNote::NewL(*this);
+    iLegalNote->DisplayNoteL();
+	
+    EVTUIDEBUG( "CEvtMgmtUiAppUi::ConstructL() Ends" );
+      
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiAppUi::~CEvtMgmtUiAppUi
+// ---------------------------------------------------------------------------
+//
+CEvtMgmtUiAppUi::~CEvtMgmtUiAppUi()
+    {
+    delete iLegalNote;
+    EVTUIDEBUG( "=================================== EventsUi is terminated ===========================" );
+    }
+
+// ---------------------------------------------------------------------------
+// TKeyResponse CEvtMgmtUiAppUi::HandleKeyEventL
+// ---------------------------------------------------------------------------
+//
+TKeyResponse CEvtMgmtUiAppUi::HandleKeyEventL( const TKeyEvent& /*aKeyEvent*/,
+                                                     TEventCode /*aType*/ )
+    {
+    return EKeyWasNotConsumed;
+    }
+
+// ---------------------------------------------------------------------------
+// void CEvtMgmtUiAppUi::HandleCommandL
+// ---------------------------------------------------------------------------
+//
+void CEvtMgmtUiAppUi::HandleCommandL( TInt aCommand )
+    {
+    switch ( aCommand )
+        {        
+        case EAknSoftkeyExit:
+        case EAknSoftkeyBack:
+        case EEikCmdExit:
+        	{
+        	Exit();
+            break;
+        	}
+        case EAknCmdExit:
+            {
+			// The User has exited the application using the Exit option from
+            //.Options menu.  But, thats possible only if we exit the application
+            // with EAknCmdExit.
+            // A bit of convoluted logic but needed because we are using the
+            // same components for the Settings UI Server as well as LC.
+
+           	CEikAppServer* server = iEikonEnv->AppServer();
+			if ( server )
+				{
+				server->NotifyServerExit(EAknCmdExit);
+				}            
+            Exit();            
+            break;
+            }
+       default: 
+       	    { 	          	           	    
+       	    break; 
+       	    }
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// void CEvtMgmtUiAppUi::MakeTitleL
+// ---------------------------------------------------------------------------
+//
+void CEvtMgmtUiAppUi::MakeTitleL( TInt aResourceText )
+	{
+	// Obtain the title from the Status Pane
+	CAknTitlePane* title = static_cast<CAknTitlePane*>( StatusPane()->
+        ControlL( TUid::Uid( EEikStatusPaneUidTitle )));
+       
+    // Set the Title's buffer    
+    HBufC* buf = StringLoader::LoadL( aResourceText );
+    title->SetText( buf ); // Takes ownership of buf
+	}
+
+// ---------------------------------------------------------------------------
+// CEikStatusPane* CEvtMgmtUiAppUi::StatusPane
+// ---------------------------------------------------------------------------
+//
+CEikStatusPane* CEvtMgmtUiAppUi::StatusPane()
+	{
+	return iEikonEnv->AppUiFactory()->StatusPane();	
+	}
+	
+// End of File  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventsmgmtui/src/evtmgmtuidocument.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,73 @@
+/*
+* 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:  Document class for Events Management UI.
+*
+*/
+
+
+// INCLUDE FILES
+#include "evtmgmtuidocument.h"
+#include "evtmgmtuiappui.h"
+
+// ----------------- Member funtions for CEvtMgmtUiDocument class ------------------
+
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiDocument::CEvtMgmtUiDocument
+// ---------------------------------------------------------------------------
+//
+CEvtMgmtUiDocument::CEvtMgmtUiDocument( CEikApplication&  aApp )
+	:CAknDocument( aApp )    
+    {
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiDocument::~CEvtMgmtUiDocument
+// ---------------------------------------------------------------------------
+//
+CEvtMgmtUiDocument::~CEvtMgmtUiDocument()
+    { 
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiDocument* CEvtMgmtUiDocument::NewL
+// ---------------------------------------------------------------------------
+//
+CEvtMgmtUiDocument* CEvtMgmtUiDocument::NewL( CEikApplication&    aApp )     
+    {
+    CEvtMgmtUiDocument* self = new (ELeave) CEvtMgmtUiDocument( aApp );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop();
+    
+    return self;
+    }
+    
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiDocument::ConstructL
+// ---------------------------------------------------------------------------
+//
+void CEvtMgmtUiDocument::ConstructL()
+    {
+    }
+    
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiDocument::CEvtMgmtUiDocument
+// ---------------------------------------------------------------------------
+//    
+CEikAppUi* CEvtMgmtUiDocument::CreateAppUiL()
+    {
+    return new (ELeave) CEvtMgmtUiAppUi;
+    }
+
+// End of File  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventsmgmtui/src/evtmgmtuifiltermodel.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,224 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Model class for Events management UI start-up view.
+*
+*/
+
+
+// System Includes
+#include <e32keys.h>
+#include <barsread.h>               // For TResourceReader
+#include <bautils.h>    
+#include <StringLoader.h>
+#include <evtmgmtui.rsg>
+#include <eikenv.h>
+#include <AknUtils.h>
+#include <aknsfld.h> // For SearchField
+	
+// User Includes	  	
+#include "evtmgmtuifiltermodel.h"
+				   	  
+// Constants
+const TInt KMaxConversionBufferLength = 0x200;
+
+// ========================= MEMBER FUNCTIONS ================================
+
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiStartupLBModel::CEvtMgmtUiStartupLBModel
+// ---------------------------------------------------------------------------
+//
+CEvtMgmtUiFilterModel::CEvtMgmtUiFilterModel()
+	{		
+	}
+
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiFilterModel::~CEvtMgmtUiFilterModel
+// ---------------------------------------------------------------------------
+//
+CEvtMgmtUiFilterModel::~CEvtMgmtUiFilterModel()
+	{	    
+	// Delete the Buffers
+	delete iBuffer;
+	iBuffer = NULL;
+	}
+	
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiFilterModel* CEvtMgmtUiFilterModel::NewL
+// ---------------------------------------------------------------------------
+//
+CEvtMgmtUiFilterModel* CEvtMgmtUiFilterModel::NewL()
+	{
+	CEvtMgmtUiFilterModel* self = CEvtMgmtUiFilterModel::NewLC();
+	CleanupStack::Pop( self );
+	return self;
+	}
+
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiFilterModel* CEvtMgmtUiFilterModel::NewLC
+// ---------------------------------------------------------------------------
+//
+CEvtMgmtUiFilterModel* CEvtMgmtUiFilterModel::NewLC()
+	{
+	CEvtMgmtUiFilterModel* self = new( ELeave )CEvtMgmtUiFilterModel();
+	CleanupStack::PushL( self );
+	self->ConstructL();
+	return self;
+	}
+		
+// ---------------------------------------------------------------------------
+// void CEvtMgmtUiFilterModel::ConstructL
+// ---------------------------------------------------------------------------
+//
+void CEvtMgmtUiFilterModel::ConstructL()
+	{
+    // Allocate the Conversion Buffer
+	iBuffer = HBufC16::NewL( KMaxConversionBufferLength );
+	}
+        
+// ---------------------------------------------------------------------------
+// TInt CEvtMgmtUiFilterModel::MdcaCount() const
+// ---------------------------------------------------------------------------
+//
+TInt CEvtMgmtUiFilterModel::MdcaCount() const
+	{
+  	return iActualItemTextArray->MdcaCount();
+	}
+	
+// ---------------------------------------------------------------------------
+// TPtrC16 CEvtMgmtUiFilterModel::MdcaPoint() const
+// ---------------------------------------------------------------------------
+//
+TPtrC16 CEvtMgmtUiFilterModel::MdcaPoint( TInt  aIndex ) const
+	{
+	if( !aIndex )
+	    {
+	    TRAP_IGNORE( UpdateTextL() );
+        return *iBuffer;
+	    }
+	else
+	    {
+	    return iActualItemTextArray->MdcaPoint(aIndex);
+	    }
+	}
+
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiFilterModel::GetZeroIndex()
+// It will return Search Text
+// ---------------------------------------------------------------------------
+//
+TPtrC16 CEvtMgmtUiFilterModel::GetZeroIndex()
+    {
+    return iActualItemTextArray->MdcaPoint(0);
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiFilterModel::GetSearchTextL()
+// It will return Search Text
+// ---------------------------------------------------------------------------
+//
+void CEvtMgmtUiFilterModel::SetItemTextArray(MDesCArray* aActualItemTextArray)
+    {
+    iActualItemTextArray = NULL;
+    iActualItemTextArray = aActualItemTextArray;
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiFilterModel::GetSearchTextL()
+// It will return Search Text
+// ---------------------------------------------------------------------------
+//
+void CEvtMgmtUiFilterModel::SetSearchField(CAknSearchField* aSearchField)
+    {
+    iSearchField = NULL;
+    iSearchField = aSearchField;
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiFilterModel::GetSearchTextL()
+// It will return Search Text
+// ---------------------------------------------------------------------------
+//
+void CEvtMgmtUiFilterModel::GetSearchTextL(HBufC*& aString) const
+    {
+    if( aString )
+        {
+        delete aString;
+        aString = NULL;
+        }
+    
+    if(!iSearchField)
+		{
+        aString = KNullDesC().AllocL();
+        return;
+		}
+    
+    // Fetch filter from search field
+    TInt searchTextLength = iSearchField->TextLength();
+        
+    if( searchTextLength )
+        {
+        aString = HBufC::NewL(searchTextLength);
+        TPtr filter = aString->Des();
+        iSearchField->GetSearchText(filter);
+        }
+    else
+        {
+        aString = KNullDesC().AllocL();
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiFilterModel::UpdateTextL()
+// It will return type of events
+// ---------------------------------------------------------------------------
+//
+void CEvtMgmtUiFilterModel::UpdateTextL() const
+    {
+    // Allocate the Conversion Buffer
+	HBufC* buffer = NULL;
+	
+	GetSearchTextL(buffer);
+	
+    // Zero the internal buffer
+    TPtr16 ptr( iBuffer->Des());
+    ptr.Zero();
+    
+    if( buffer->Length() )
+        {
+        // Format "%d\t%S\t%S\t%d"
+        ptr.AppendNum( 0 );
+        ptr.Append( EKeyTab );
+        ptr.Append( *buffer );
+        ptr.Append( EKeyTab );
+        ptr.Append( EKeyTab );
+        }
+    else
+        {
+        if( iActualItemTextArray->MdcaCount() > 1 )
+			{
+            ptr.Append( iActualItemTextArray->MdcaPoint(1) );
+			}
+		else
+			{
+	        // Format "%d\t%S\t%S\t%d"
+	        ptr.AppendNum( 0 );
+	        ptr.Append( EKeyTab );
+	        ptr.Append( *buffer );
+	        ptr.Append( EKeyTab );
+	        ptr.Append( EKeyTab );
+			}
+        }
+        
+    delete buffer; 
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventsmgmtui/src/evtmgmtuilegalnote.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,169 @@
+/*
+* 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:  Asynchronous display of legal and disclaimer note.
+*
+*/
+
+
+// System Includes
+#include <centralrepository.h>
+#include <StringLoader.h>
+#include <aknmessagequerydialog.h>
+#include <aknnotewrappers.h> 
+#include <evtmgmtui.rsg>
+#include <coemain.h>
+#include <aknappui.h>
+
+// User Includes
+#include "evtmgmtuilegalnote.h"
+#include "evtdebug.h"
+#include "evtstoragedomaincrkeys.h"
+
+// Constants
+const TInt KDisclaimerValueOff = 0;
+
+// ================ Member funtions for CEvtDatabase class ==================
+
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiLegalNote::CEvtMgmtUiLegalNote
+// ---------------------------------------------------------------------------
+//
+CEvtMgmtUiLegalNote::CEvtMgmtUiLegalNote( CAknAppUi& aAppUi )
+						:CActive( EPriorityStandard ), iAppUi(aAppUi)
+    {
+    }
+    
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiLegalNote::~CEvtMgmtUiLegalNote
+// ---------------------------------------------------------------------------
+//
+CEvtMgmtUiLegalNote::~CEvtMgmtUiLegalNote()
+    {
+		Cancel();
+    delete iRepository; 
+    } 
+    
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiLegalNote::NewL
+// ---------------------------------------------------------------------------
+//
+CEvtMgmtUiLegalNote* CEvtMgmtUiLegalNote::NewL( CAknAppUi& aAppUi )
+    {
+	CEvtMgmtUiLegalNote* self = NewLC( aAppUi );
+	CleanupStack::Pop( self );
+	return self;
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiLegalNote::NewLC
+// ---------------------------------------------------------------------------
+//
+CEvtMgmtUiLegalNote* CEvtMgmtUiLegalNote::NewLC( CAknAppUi& aAppUi )
+    {
+	CEvtMgmtUiLegalNote* self = new ( ELeave )CEvtMgmtUiLegalNote( aAppUi );
+	CleanupStack::PushL( self );
+	self->ConstructL( );
+	return self;
+    } 
+
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiLegalNote::ConstructL
+// ---------------------------------------------------------------------------
+//
+void CEvtMgmtUiLegalNote::ConstructL()
+    {
+	EVTUIDEBUG( "+ CEvtMgmtUiLegalNote::ConstructL()" );
+    CActiveScheduler::Add(this);
+    
+	EVTUIDEBUG( "Calling CRepository::NewL" );
+  // Create the Central repository object notifying the Disclaimer display
+  TRAPD(err, iRepository = CRepository::NewL( TUid::Uid( KCRUidEvtStorageDb ) ) );
+	EVTUIDEBUG1( "Calling CRepository::NewL Cenrep Error Code- %d", err );
+	User::LeaveIfError( err );
+    
+	EVTUIDEBUG( "- CEvtMgmtUiLegalNote::ConstructL()" );
+    } 
+
+// ---------------------------------------------------------------------------
+// void CEvtMgmtUiLegalNote::RunL()
+// ---------------------------------------------------------------------------
+//                             
+void CEvtMgmtUiLegalNote::RunL()
+    {
+	EVTUIDEBUG( "+ CEvtMgmtUiLegalNote::RunL()" );
+    
+    HBufC* queryHeader = StringLoader::LoadLC( R_LOCEV_NOTE_DISCLAIMER_HEADING, CCoeEnv::Static() );
+    HBufC* queryText = StringLoader::LoadLC( R_LOCEV_NOTE_DISCLAIMER_TEXT, CCoeEnv::Static() );
+    CAknMessageQueryDialog* dlg = new ( ELeave ) CAknMessageQueryDialog ( queryText, queryHeader );
+    TInt buttonId = dlg->ExecuteLD( R_EVTUI_DISCLAIMER_QUERY );
+    CleanupStack::Pop(2);
+    if( EEikBidOk == buttonId )
+            {
+            HBufC* msg = StringLoader::LoadLC( R_LOCEV_CONFIRMATION_NOTE_TEXT );
+            CAknQueryDialog* confirmationQuery = CAknQueryDialog::NewL();     
+            if( EAknSoftkeyYes == confirmationQuery->ExecuteLD(R_EVTUI_CONFIRMATION_QUERY, *msg) )
+                    {
+                    User::LeaveIfError( iRepository->Set( KEvtDisclaimerSetting, KDisclaimerValueOff ) );
+                    }         
+            CleanupStack::PopAndDestroy(msg);
+            }
+    else		// if( EEikBidCancel == buttonId )
+            {
+            iAppUi.Exit();
+            }
+	
+	EVTUIDEBUG( "- CEvtMgmtUiLegalNote::RunL()" );
+    }
+    
+// ---------------------------------------------------------------------------
+// void CEvtMgmtUiLegalNote::DoCancel()
+// ---------------------------------------------------------------------------
+// 
+void CEvtMgmtUiLegalNote::DoCancel()
+    {
+		EVTUIDEBUG( "+ CEvtMgmtUiLegalNote::DoCancel()" );
+		// Nothing to do.
+		EVTUIDEBUG( "- CEvtMgmtUiLegalNote::DoCancel()" );
+    }
+
+// ---------------------------------------------------------------------------
+// TInt CEvtMgmtUiLegalNote::RunError()
+// ---------------------------------------------------------------------------
+//    
+TInt CEvtMgmtUiLegalNote::RunError( TInt aError )
+	{    	
+	return CActive::RunError( aError );	
+	} 
+
+// ---------------------------------------------------------------------------
+// void CEvtMgmtUiLegalNote::StartNotification()
+// ---------------------------------------------------------------------------
+//  
+void CEvtMgmtUiLegalNote::DisplayNoteL()
+    {
+	EVTUIDEBUG( "+ CEvtMgmtUiLegalNote::DisplayNoteL()" );
+    // Get the type of database change from Cenrep key
+    TInt flag = 1;
+    User::LeaveIfError( iRepository->Get( KEvtDisclaimerSetting, flag ) ); 
+    
+    if( flag && !IsActive() )
+        {
+		    TRequestStatus* status = &iStatus;
+		    User::RequestComplete( status, KErrNone );
+		    SetActive();      
+        }  
+	EVTUIDEBUG( "- CEvtMgmtUiLegalNote::DisplayNoteL()" );
+    }
+    
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventsmgmtui/src/evtmgmtuilistbox.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,61 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  List box class for Events Management UI.
+*
+*/
+
+#include "evtmgmtuilistbox.h"
+#include "evtmgmtuilistboxmodel.h"
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CEvtMgmtUiListBox::ConstructL(
+    const CCoeControl* aParent,
+    TInt aFlags)
+    {
+    // Continue construction of the object.
+    CEikFormattedCellListBox::ConstructL(aParent, aFlags);
+    
+    if(iModel)
+        {
+        delete iModel;
+        iModel = NULL;
+        }
+    
+    // Create a specialized model.
+    iModel = CEvtMgmtUiListBoxModel::NewL();
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CEvtMgmtUiListBox::CreateModelL()
+    {
+    // Do nothing. Model is already constructed in constructor.
+    // This method must be overridden to prevent base class to recreate a new, 
+    // for our purpuses, non-suitable model.
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+CEvtMgmtUiListBoxModel* CEvtMgmtUiListBox::Model() const
+    {
+    return static_cast <CEvtMgmtUiListBoxModel*> (iModel);
+    }
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventsmgmtui/src/evtmgmtuilistboxmodel.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,174 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  List box model class for Events Management UI.
+*
+*/
+
+// INCLUDES
+#include <aknsfld.h> // For SearchField
+#include "evtmgmtuilistboxmodel.h"
+#include "evtmgmtuimodel.h"
+#include "evtmgmtuifiltermodel.h"
+
+// -----------------------------------------------------------------------------
+// CEvtMgmtUiListBoxModel::~CEvtMgmtUiListBoxModel
+// 
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+CEvtMgmtUiListBoxModel::~CEvtMgmtUiListBoxModel()
+    {        
+    delete iEvtMgmtUiFilterModel;
+    }
+
+// -----------------------------------------------------------------------------
+// CEvtMgmtUiListBoxModel::NewLC
+// 
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+CEvtMgmtUiListBoxModel* CEvtMgmtUiListBoxModel::NewL( )
+    {
+	CEvtMgmtUiListBoxModel* self = NewLC( );
+	CleanupStack::Pop( self );
+	return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CEvtMgmtUiListBoxModel::NewLC
+// 
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+CEvtMgmtUiListBoxModel* CEvtMgmtUiListBoxModel::NewLC( )
+    {
+	CEvtMgmtUiListBoxModel* self = new ( ELeave )CEvtMgmtUiListBoxModel( );
+	CleanupStack::PushL( self );
+	self->ConstructL( );
+	return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CEvtMgmtUiListBoxModel::CEvtMgmtUiListBoxModel
+// 
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+CEvtMgmtUiListBoxModel::CEvtMgmtUiListBoxModel()
+    {    
+    }
+
+// -----------------------------------------------------------------------------
+// CEvtMgmtUiListBoxModel::ConstructL
+// 
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+void CEvtMgmtUiListBoxModel::ConstructL()
+    {    
+    iEvtMgmtUiFilterModel = CEvtMgmtUiFilterModel::NewL();
+    }
+
+// -----------------------------------------------------------------------------
+// CEvtMgmtUiListBoxModel::MatchableTextArray
+// 
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+const MDesCArray* CEvtMgmtUiListBoxModel::MatchableTextArray() const
+    {    
+    return this;
+    }
+        
+// ---------------------------------------------------------------------------
+// TInt CEvtMgmtUiListBoxModel::MdcaCount() const
+// ---------------------------------------------------------------------------
+//
+TInt CEvtMgmtUiListBoxModel::MdcaCount() const
+    {
+    return iEvtMgmtUiFilterModel->MdcaCount();
+    }
+    
+// ---------------------------------------------------------------------------
+// TPtrC16 CEvtMgmtUiListBoxModel::MdcaPoint() const
+// ---------------------------------------------------------------------------
+//
+TPtrC16 CEvtMgmtUiListBoxModel::MdcaPoint( TInt  aIndex ) const
+    {
+    if (Filter())
+        {
+        return Filter()->DefaultMatchableItemFromItem(iEvtMgmtUiFilterModel->MdcaPoint(aIndex));
+        }   
+    else
+        {
+        return iEvtMgmtUiFilterModel->MdcaPoint(aIndex);
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CEvtMgmtUiListBoxModel::NumberOfItems
+// 
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+TInt CEvtMgmtUiListBoxModel::NumberOfItems() const
+    {
+    return Filter() ? 
+           Filter()->FilteredNumberOfItems(): CTextListBoxModel::NumberOfItems();
+    }
+
+// -----------------------------------------------------------------------------
+// CEvtMgmtUiListBoxModel::ItemText
+// 
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+TPtrC CEvtMgmtUiListBoxModel::ItemText(TInt aItemIndex) const
+    {
+    if(aItemIndex==0)
+        {
+        return iEvtMgmtUiFilterModel->GetZeroIndex();
+        }
+    else
+        {
+        return CTextListBoxModel::ItemText( Filter() ? 
+                          Filter()->FilteredItemIndex(aItemIndex) : aItemIndex);
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CEvtMgmtUiListBoxModel::NumberOfItems
+// 
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+void CEvtMgmtUiListBoxModel::SetItemTextArrayToFilterModel()
+    {
+    iEvtMgmtUiFilterModel->SetItemTextArray(ItemTextArray());
+    SetItemTextArray(iEvtMgmtUiFilterModel);
+    }
+
+// -----------------------------------------------------------------------------
+// CEvtMgmtUiListBoxModel::NumberOfItems
+// 
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+void CEvtMgmtUiListBoxModel::SetFindToFilterModel(CAknSearchField* aSearchField)
+    {
+    iEvtMgmtUiFilterModel->SetSearchField(aSearchField);
+    }
+
+// End of File
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventsmgmtui/src/evtmgmtuilocsettinglauncher.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,109 @@
+/*
+* Copyright (c) 2002-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:  Responsible for launching positioning settings
+*
+*/
+
+
+// INCLUDE FILES
+#include "evtmgmtuilocsettinglauncher.h"
+
+// ================= MEMBER FUNCTIONS =======================
+// ----------------------------------------------------------------------------
+// CLmkLocSettingsLauncher::NewL
+// Two-phased constructor.
+// ----------------------------------------------------------------------------
+//
+CEvtMgmtUiLocSettingsLauncher* CEvtMgmtUiLocSettingsLauncher:: NewL()
+	{
+	CEvtMgmtUiLocSettingsLauncher* self = new (ELeave) CEvtMgmtUiLocSettingsLauncher();
+	CleanupStack::PushL(self);
+	self->ConstructL();
+	CleanupStack::Pop(); // self
+	return self;
+	}
+
+// ----------------------------------------------------------------------------
+// CLmkLocSettingsLauncher::CLmkLocSettingsLauncher
+// ----------------------------------------------------------------------------
+//
+CEvtMgmtUiLocSettingsLauncher::CEvtMgmtUiLocSettingsLauncher()
+	: CActive( EPriorityStandard )
+	{
+	}
+
+// ----------------------------------------------------------------------------
+// CEvtMgmtUiLocSettingsLauncher::~CEvtMgmtUiLocSettingsLauncher
+// ----------------------------------------------------------------------------
+//
+CEvtMgmtUiLocSettingsLauncher::~CEvtMgmtUiLocSettingsLauncher()
+	{
+	Cancel();
+    delete iClientLibrary;
+	}
+
+// ----------------------------------------------------------------------------
+// CEvtMgmtUiLocSettingsLauncher::ConstructL
+// ----------------------------------------------------------------------------
+//
+void CEvtMgmtUiLocSettingsLauncher::ConstructL()
+	{
+	iClientLibrary  = CLocSettingsUiClient::NewL();    
+    CActiveScheduler::Add( this );
+	}
+
+// ----------------------------------------------------------------------------
+// CEvtMgmtUiLocSettingsLauncher::LaunchL
+// ----------------------------------------------------------------------------
+//
+void CEvtMgmtUiLocSettingsLauncher::LaunchL()
+	{
+	iClientLibrary->LaunchPosSettingsAsEmbeddedAppL( iStatus );
+	SetActive();
+	}
+
+// ----------------------------------------------------------------------------
+// CEvtMgmtUiLocSettingsLauncher::RunL
+// ----------------------------------------------------------------------------
+//
+void CEvtMgmtUiLocSettingsLauncher::RunL()
+    {
+    switch( iStatus.Int())
+        {
+        case KErrNone:
+            {
+            break;
+            }
+        case KErrCancel:
+            {
+            break;
+            }
+        default:
+            {
+            break;    
+            }
+        }
+    }
+
+// ----------------------------------------------------------------------------
+// CEvtMgmtUiLocSettingsLauncher::DoCancel
+// ----------------------------------------------------------------------------
+//
+void CEvtMgmtUiLocSettingsLauncher::DoCancel()
+    {
+    iClientLibrary->ClosePosSettings();
+    }
+
+// End of File
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventsmgmtui/src/evtmgmtuimapnavigationadapter.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,195 @@
+/*
+* 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:  Applications interface class to map and navigation use cases
+*
+*/
+
+
+// INCLUDE FILES
+#include <epos_poslandmarkserialization.h>
+#include <EPos_CPosLandmark.h>
+#include <AiwGenericParam.h>
+#include <eikenv.h>
+#include <StringLoader.h>
+#include <evtmgmtui.rsg>
+#include <AiwServiceHandler.h>
+#include <AiwCommon.h> 
+#include <mnaiwservices.h>
+#include <mnmapview.h>
+#include <mnprovider.h>
+#include <mnproviderfinder.h>
+
+#include "evtdebug.h"
+#include "evtmgmtuimapnavigationadapter.h"
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CEvtMgmtUiMapNavigationAdapter::CLmkMapNavigationInterface
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+CEvtMgmtUiMapNavigationAdapter::CEvtMgmtUiMapNavigationAdapter()
+	{	
+	}
+
+// -----------------------------------------------------------------------------
+// CEvtMgmtUiMapNavigationAdapter::ConstructL
+// Symbian 2nd phase constructor can leave.
+// -----------------------------------------------------------------------------
+void CEvtMgmtUiMapNavigationAdapter::ConstructL()
+	{
+	iAiwServiceHandler = CAiwServiceHandler::NewL();
+	iInList = CAiwGenericParamList::NewL();
+    iOutList = CAiwGenericParamList::NewL();  
+	}
+
+// -----------------------------------------------------------------------------
+// CEvtMgmtUiMapNavigationAdapter::NewL
+// Symbian 1st phase constructor can leave.
+// -----------------------------------------------------------------------------
+CEvtMgmtUiMapNavigationAdapter* CEvtMgmtUiMapNavigationAdapter::NewL()
+	{	
+	CEvtMgmtUiMapNavigationAdapter* self = new (ELeave) CEvtMgmtUiMapNavigationAdapter();
+	CleanupStack::PushL( self );
+	self->ConstructL();
+	CleanupStack::Pop();//self
+	return self;
+	}
+	
+// -----------------------------------------------------------------------------
+// CEvtMgmtUiMapNavigationAdapter::NewLC
+// Symbian 1st phase constructor can leave.
+// -----------------------------------------------------------------------------
+CEvtMgmtUiMapNavigationAdapter* CEvtMgmtUiMapNavigationAdapter::NewLC()
+    {   
+    CEvtMgmtUiMapNavigationAdapter* self = new (ELeave) CEvtMgmtUiMapNavigationAdapter();
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop();//self
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CEvtMgmtUiMapNavigationAdapter::~CEvtMgmtUiMapNavigationAdapter
+// C++ Destructor
+// -----------------------------------------------------------------------------
+ CEvtMgmtUiMapNavigationAdapter::~CEvtMgmtUiMapNavigationAdapter()
+	{	
+	delete iAiwServiceHandler;    
+	iAiwServiceHandler = NULL;
+    delete iInList;
+    iInList = NULL;
+    delete iOutList;   
+    iOutList = NULL;  
+	}
+
+// -----------------------------------------------------------------------------
+// CEvtMgmtUiMapNavigationAdapter::ShowOnMapL
+// It will show location on map
+// -----------------------------------------------------------------------------
+void CEvtMgmtUiMapNavigationAdapter::ShowOnMapL( const TCoordinate& aCoordinate )
+    {
+    CPosLandmark* lmk = CPosLandmark::NewLC();
+    TLocality locality;
+    HBufC8* lmBuf;
+    
+    //set location
+    locality.SetCoordinate( aCoordinate.Latitude(), aCoordinate.Longitude(), aCoordinate.Altitude() );
+ 
+    lmk->SetPositionL(locality);
+    
+    //set  in parameters
+    iInList->Reset();
+    lmBuf =PosLandmarkSerialization::PackL( *lmk );
+    CleanupStack::PushL( lmBuf );
+    TAiwGenericParam param( EGenericParamLandmark, TAiwVariant( *lmBuf ) );     
+    iInList->AppendL( param );       
+    TMnAiwCommonOptionsParam options;
+    options.iRunChained = EFalse;
+    TPckg<TMnAiwCommonOptionsParam> optionsPack( options );
+    TAiwGenericParam optParam( EGenericParamMnCommonOptions, TAiwVariant( optionsPack ) );
+    iInList->AppendL( optParam );
+            
+    //show location on map
+    iAiwServiceHandler->AttachL( R_EVTMGMTUI_AIW_INTEREST_SHOWONMAP );
+    iAiwServiceHandler->ExecuteServiceCmdL( KAiwCmdMnShowMap, *iInList, *iOutList, 0, this ); 
+    
+    CleanupStack::PopAndDestroy( 2 ); //lmbuf, lmk
+    }
+
+// -----------------------------------------------------------------------------
+// CEvtMgmtUiMapNavigationAdapter::NavigateToPlaceL
+// It will navigate to location
+// -----------------------------------------------------------------------------
+void CEvtMgmtUiMapNavigationAdapter::NavigateToPlaceL(  const TCoordinate& aCoordinate )
+    {
+    CPosLandmark* lmk = CPosLandmark::NewLC();
+    TLocality locality;
+    HBufC8* lmBuf;
+    
+    //set location
+    locality.SetCoordinate( aCoordinate.Latitude(), aCoordinate.Longitude(), aCoordinate.Altitude() );
+    lmk->SetPositionL(locality);
+    
+    //set in parameters
+    iInList->Reset();
+    lmBuf =PosLandmarkSerialization::PackL( *lmk );
+    CleanupStack::PushL( lmBuf );
+    TAiwGenericParam param( EGenericParamLandmark, TAiwVariant( *lmBuf ) );     
+    iInList->AppendL( param );       
+    TMnAiwCommonOptionsParam options;
+    options.iRunChained = EFalse;
+    TPckg<TMnAiwCommonOptionsParam> optionsPack( options );
+    TAiwGenericParam optParam( EGenericParamMnCommonOptions, TAiwVariant( optionsPack ) );
+    iInList->AppendL( optParam );
+        
+    //navigate to location
+    iAiwServiceHandler->AttachL( R_EVTMGMTUI_AIW_INTEREST_NAVIGATETO );
+    iAiwServiceHandler->ExecuteServiceCmdL( KAiwCmdMnNavigateTo, *iInList, *iOutList, 0, this ); 
+    
+    CleanupStack::PopAndDestroy( 2 ); //lmbuf, lmk
+    }
+        
+        
+// -----------------------------------------------------------------------------
+// CEvtMgmtUiMapNavigationAdapter::MapServiceProvidersL
+// It will return total map service providers.
+// @ret total number of map service providers
+// -----------------------------------------------------------------------------
+//
+TInt CEvtMgmtUiMapNavigationAdapter::MapServiceProvidersL()
+        {
+        RPointerArray<CMnProvider> providers;
+        // get all providers
+        MnProviderFinder::FindProvidersL( providers );
+        TInt total = providers.Count();
+        providers.ResetAndDestroy();
+        providers.Close();
+        Debug(_L("Total map service providers = %d"), total);
+        return total;
+        }
+
+// -----------------------------------------------------------------------------
+// CEvtMgmtUiMapNavigationAdapter::HandleNotifyL
+// Derived from MAiwNotifyCallback
+// -----------------------------------------------------------------------------
+ TInt CEvtMgmtUiMapNavigationAdapter::HandleNotifyL( TInt /*aCmdId*/, 
+                                                        TInt /*aEventId*/, 
+                                                        CAiwGenericParamList& /*aEventParamList*/,
+                                                        const CAiwGenericParamList& /*aInParamList*/ )
+    {
+    return KErrNone;
+    }
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventsmgmtui/src/evtmgmtuimodel.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,514 @@
+/*
+* 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:  Model class for Events management UI start-up view.
+*
+*/
+
+
+// System Includes
+#include <e32keys.h>
+#include <barsread.h>               // For TResourceReader
+#include <bautils.h>    
+#include <StringLoader.h>
+#include <evtmgmtui.rsg>
+#include <eikenv.h>
+#include <AknUtils.h>
+
+// User Include
+#include "evtmgmtuimodel.h"
+#include "evtbasiceventinfo.h"
+#include "evtdebug.h"
+		  					   	  
+// Constants
+const TInt KPreDefinedItems = 1;
+const TInt KMaxConversionBufferLength = 0x200;
+
+// ========================= MEMBER FUNCTIONS ================================
+
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiStartupLBModel::CEvtMgmtUiStartupLBModel
+// ---------------------------------------------------------------------------
+//
+CEvtMgmtUiModel::CEvtMgmtUiModel()
+	{		
+	}
+
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiModel::~CEvtMgmtUiModel
+// ---------------------------------------------------------------------------
+//
+CEvtMgmtUiModel::~CEvtMgmtUiModel()
+	{	    
+	// Delete the Buffers
+	delete iBuffer;
+	iBuffer = NULL;
+	
+	delete iCreateNew;
+	iCreateNew = NULL;
+	
+	delete iUnnamed;
+	iUnnamed = NULL;
+	
+	iEventsArray.ResetAndDestroy();
+	iEventsArray.Close();
+	}
+	
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiModel* CEvtMgmtUiModel::NewL
+// ---------------------------------------------------------------------------
+//
+CEvtMgmtUiModel* CEvtMgmtUiModel::NewL()
+	{
+	CEvtMgmtUiModel* self = CEvtMgmtUiModel::NewLC();
+	CleanupStack::Pop( self );
+	return self;
+	}
+
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiModel* CEvtMgmtUiModel::NewLC
+// ---------------------------------------------------------------------------
+//
+CEvtMgmtUiModel* CEvtMgmtUiModel::NewLC()
+	{
+	CEvtMgmtUiModel* self = new( ELeave )CEvtMgmtUiModel();
+	CleanupStack::PushL( self );
+	self->ConstructL();
+	return self;
+	}
+		
+// ---------------------------------------------------------------------------
+// void CEvtMgmtUiModel::ConstructL
+// ---------------------------------------------------------------------------
+//
+void CEvtMgmtUiModel::ConstructL()
+	{
+	EVTUIDEBUG( "+ CEvtMgmtUiModel::ConstructL()" );
+	    
+    // Allocate the Conversion Buffer
+	iBuffer = HBufC16::NewL( KMaxConversionBufferLength );
+        
+    // Open the Resource File
+  //  OpenLocalizedResourceFileL( KEvtEngineResFileName, iResourceLoader );
+	
+	// Allocate and set the access point title
+ 	iCreateNew = StringLoader::LoadL( R_EVTUI_CREATENEW_LIST );
+ 	iUnnamed = StringLoader::LoadL( R_EVTUI_UNNAMED ); 
+ 	
+ 	iStatusFilter = CEvtMgmtUiEngine::EEvtFilterAll;
+ 	
+ 	EVTUIDEBUG( "- CEvtMgmtUiModel::ConstructL()" );
+ 	    
+	}
+        
+// ---------------------------------------------------------------------------
+// TInt CEvtMgmtUiModel::MdcaCount() const
+// ---------------------------------------------------------------------------
+//
+TInt CEvtMgmtUiModel::MdcaCount() const
+	{
+	// Return the Model count based on the Status Filter
+  	switch( iStatusFilter )
+  		{
+  		case CEvtMgmtUiEngine::EEvtFilterAll:
+  			return KPreDefinedItems + iActiveTriggers + iDraftTriggers + iCompletedTriggers;
+  		case CEvtMgmtUiEngine::EEvtFilterActive:
+  			return KPreDefinedItems + iActiveTriggers;
+  		case CEvtMgmtUiEngine::EEvtFilterDraft:
+  			return KPreDefinedItems + iDraftTriggers;
+        case CEvtMgmtUiEngine::EEvtFilterCompleted:
+            return KPreDefinedItems + iCompletedTriggers;
+  		default:
+  			return KPreDefinedItems + iActiveTriggers + iDraftTriggers + iCompletedTriggers;
+		}
+	}
+	
+// ---------------------------------------------------------------------------
+// TPtrC16 CEvtMgmtUiModel::MdcaPoint() const
+// ---------------------------------------------------------------------------
+//
+TPtrC16 CEvtMgmtUiModel::MdcaPoint( TInt  aIndex ) const
+	{
+	// Zero the internal buffer
+	TPtr16 ptr( iBuffer->Des());
+	TPtrC subject(KNullDesC);
+	TPtrC place(KNullDesC);
+	ptr.Zero();
+	
+	// Format "%d\t%S\t%S\t%d"
+	
+	// Append the Icon ID
+	if( aIndex==0 )
+	    ptr.AppendNum( 1 );
+	else
+	    {	
+		// Get the Index based on the Status Filter
+		aIndex = IndexBasedOnFilter( aIndex );    
+	    switch(iEventsArray[aIndex-1]->EventStatus())
+            {
+            case EActive:
+                {
+                ptr.AppendNum( 2 );
+                break;
+                }
+            case EDraft:
+                {
+                ptr.AppendNum( 3 );
+                break;
+                }           
+            case ECompleted:
+                {
+                ptr.AppendNum( 4 );
+                break;
+                }
+            }
+	    }
+	
+	// Append the first tab
+	ptr.Append( EKeyTab );
+	
+	// Subject
+	if(aIndex==0)
+	    {
+	    ptr.Append( *iCreateNew );
+	    ptr.Append( EKeyTab );
+	    ptr.Append( EKeyTab );
+	    }
+	else
+	    {
+	    subject.Set(iEventsArray[aIndex-1]->Subject());
+	    place.Set(iEventsArray[aIndex-1]->Place());
+	    if(subject.Compare(KNullDesC)==0 && place.Compare(KNullDesC)==0)
+            {
+            ptr.Append(*iUnnamed);            
+            }
+        else
+            ptr.Append(subject);
+	    
+    	//Place
+    	ptr.Append( EKeyTab );
+    	
+    	    {
+    	    HBufC* localPlace = place.Alloc();   
+			if( localPlace )
+				{
+	            TPtr placePtr = localPlace->Des();
+	    	    ptr.Append(placePtr);
+	    	    delete localPlace;   
+				} 
+    	    }
+    	ptr.Append( EKeyTab );	
+    	if( iEventsArray[aIndex-1]->Repeat() )
+    	    ptr.AppendNum(5);
+	    }	
+	
+    return *iBuffer;
+	}
+        
+// ---------------------------------------------------------------------------
+// TInt CEvtMgmtUiModel::IndexBasedOnFilter() const
+// ---------------------------------------------------------------------------
+//
+TInt CEvtMgmtUiModel::IndexBasedOnFilter( TInt aIndex ) const
+	{
+	// We calculate the Index based on the Status Filter
+	// This is calculated based on the assumption of the Order of the Events
+	// which is in the order of Active->Draft->Completed
+  	switch( iStatusFilter )
+  		{
+  		case CEvtMgmtUiEngine::EEvtFilterAll:
+  		case CEvtMgmtUiEngine::EEvtFilterActive:
+  			return aIndex;
+  		case CEvtMgmtUiEngine::EEvtFilterDraft:
+  			return iActiveTriggers + aIndex;
+  		case CEvtMgmtUiEngine::EEvtFilterCompleted:
+  			return iActiveTriggers + iDraftTriggers + aIndex;
+  		default:
+  			return aIndex;
+		}
+	}
+
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiModel::IndexWithoutFilter()
+// It will Index without filter provided the index based on filter.
+// ---------------------------------------------------------------------------
+//
+TInt CEvtMgmtUiModel::IndexWithoutFilter( TInt aIndex ) const
+    {
+	// The Actual Index in the model is calculated based on the Status Filter
+  	switch( iStatusFilter )
+  		{
+  		case CEvtMgmtUiEngine::EEvtFilterAll:
+  		case CEvtMgmtUiEngine::EEvtFilterActive:
+  			return KPreDefinedItems + aIndex;
+  		case CEvtMgmtUiEngine::EEvtFilterDraft:
+  			return KPreDefinedItems + aIndex - iActiveTriggers;
+        case CEvtMgmtUiEngine::EEvtFilterCompleted:
+            return KPreDefinedItems + aIndex - ( iActiveTriggers + iDraftTriggers );
+  		default:
+  			return KPreDefinedItems + aIndex;
+		}
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiModel::EventsArray()
+// It will return Events array object reference.
+// ---------------------------------------------------------------------------
+//
+RPointerArray<CEvtBasicEventInfo>& CEvtMgmtUiModel::EventsArray()
+    {
+    return iEventsArray;
+    }
+    
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiModel::TotalEvents()
+// It will return total events
+// ---------------------------------------------------------------------------
+//
+TInt CEvtMgmtUiModel::TotalEvents()
+	{
+	return iEventsArray.Count();
+	}
+    
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiModel::StatusFilter()
+// It will Show Events based on Filter
+// ---------------------------------------------------------------------------
+//
+CEvtMgmtUiEngine::TEvtEventStatusFilter CEvtMgmtUiModel::StatusFilter( )
+	{
+	return iStatusFilter;
+	}
+    
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiModel::SetStatusFilter()
+// ---------------------------------------------------------------------------
+//
+void CEvtMgmtUiModel::SetStatusFilter( CEvtMgmtUiEngine::TEvtEventStatusFilter
+                                        aFilter )
+	{
+	iStatusFilter = aFilter;
+	}
+    
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiModel::EventFromModel()
+// It will return  eventinfo object.
+// ---------------------------------------------------------------------------
+//
+CEvtBasicEventInfo& CEvtMgmtUiModel::EventFromModel( TInt aIndex )
+    {
+    return *(iEventsArray[IndexBasedOnFilter( aIndex )-1]);
+    }
+    
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiModel::MandatoryFieldsFilled()
+// ---------------------------------------------------------------------------
+//
+TBool CEvtMgmtUiModel::MandatoryFieldsFilled(  TInt aIndex  )
+    {
+	// Check the Array boundary conditions
+    if( aIndex == 0 || aIndex > iEventsArray.Count())
+        return EFalse;
+    
+	// Check the Status of the event considering the current Status Filter
+    if( iEventsArray[IndexBasedOnFilter( aIndex )-1]->Subject().Compare(KNullDesC)==0 || 
+    			iEventsArray[IndexBasedOnFilter( aIndex )-1]->Place().Compare(KNullDesC)==0 )
+       return EFalse;
+    else
+        return ETrue;
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiModel::EventId()
+// It will return  event id.
+// ---------------------------------------------------------------------------
+//
+TEvtEventId CEvtMgmtUiModel::EventId( TInt aIndex )
+    {  
+	// Check the Array boundary conditions
+    if(aIndex<1 || aIndex > iEventsArray.Count() )
+        return 0;
+    return iEventsArray[IndexBasedOnFilter( aIndex )-1]->EventId();
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiModel::EventStatus()
+// It will return  event status.
+// ---------------------------------------------------------------------------
+//
+TEvtEventStatus CEvtMgmtUiModel::EventStatus( TInt aIndex )
+    {
+	// Check the Array boundary conditions
+    if(aIndex<1 || aIndex > iEventsArray.Count() )
+        return EActive;
+    return iEventsArray[IndexBasedOnFilter( aIndex )-1]->EventStatus();
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiModel::UpdatedCurrentItemIndex()
+// It will return  updated current item index
+// ---------------------------------------------------------------------------
+//
+TInt CEvtMgmtUiModel::UpdatedCurrentItemIndex( )
+    {
+  	switch( iStatusFilter )
+  		{
+  		case CEvtMgmtUiEngine::EEvtFilterAll:
+  			if(iCurrentEventIndex<0 || iCurrentEventIndex > (iActiveTriggers+iDraftTriggers+iCompletedTriggers) )
+  				iCurrentEventIndex = KPreDefinedItems + iActiveTriggers + iDraftTriggers + iCompletedTriggers;
+  			break;
+  		case CEvtMgmtUiEngine::EEvtFilterActive:
+  			if(iCurrentEventIndex<0 || iCurrentEventIndex > iActiveTriggers )
+  				iCurrentEventIndex = KPreDefinedItems + iActiveTriggers;
+  			break;
+  		case CEvtMgmtUiEngine::EEvtFilterDraft:
+  			if(iCurrentEventIndex<0 || iCurrentEventIndex > iDraftTriggers )
+  				iCurrentEventIndex = KPreDefinedItems + iDraftTriggers;
+  			break;
+        case CEvtMgmtUiEngine::EEvtFilterCompleted:
+            if(iCurrentEventIndex<0 || iCurrentEventIndex > iCompletedTriggers )
+                iCurrentEventIndex = KPreDefinedItems + iCompletedTriggers;
+            break;
+  		default:
+  			iCurrentEventIndex = 0;
+  			break;
+		}
+	return iCurrentEventIndex;
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiModel::SetCurrentItemId()
+// ---------------------------------------------------------------------------
+//
+void CEvtMgmtUiModel::SetCurrentItemId( TInt aItemIndex )
+    {
+    if(aItemIndex > 0 && aItemIndex <= iEventsArray.Count() )
+ 		{
+        iCurrentEventId = iEventsArray[IndexBasedOnFilter( aItemIndex )-1]->EventId();
+		iCurrentEventIndex = aItemIndex - 1;
+    	}
+    else
+    	{
+        iCurrentEventId = 0; //if focus is on 'create new event'
+		iCurrentEventIndex = 0;
+    	}
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiModel::UpdateEventsStatus()
+// ---------------------------------------------------------------------------
+//
+void CEvtMgmtUiModel::UpdateEventsStatus()
+    {
+	// Maintain the previous count to compare with the updated model
+    TInt prevCount = iActiveTriggers + iDraftTriggers + iCompletedTriggers;
+    iActiveTriggers = 0;
+    iDraftTriggers = 0;
+    iCompletedTriggers = 0;
+    TInt cnt = iEventsArray.Count();
+	TEvtModelUpdateState updateState;
+    
+	// Get the update type based on the previous and current model count.
+    if( prevCount < cnt )
+    	{
+    	updateState = EEvtCreate;
+    	}
+    else if( prevCount > cnt )
+    	{
+    	updateState = EEvtDelete;
+    	iCurrentEventId = 0;
+    	}
+    else
+    	{
+    	updateState = EEvtModify;
+    	}
+    
+	// Loop through the model to update the Event Status mask.
+    TInt index;
+    iEventsStatusMask = 0;
+    for( index = 0; index<cnt; index++ )
+        {
+        
+        if( updateState == EEvtCreate && iCurrentEventId < iEventsArray[index]->EventId() )	
+        	{
+        	iCurrentEventId = iEventsArray[index]->EventId();
+        	iCurrentEventIndex = index;
+        	}
+        	
+        if( updateState == EEvtModify && iCurrentEventId == iEventsArray[index]->EventId() )	
+        	{
+        	iCurrentEventId = iEventsArray[index]->EventId();
+        	iCurrentEventIndex = index;
+        	}
+        	
+		// Append the Event status to Event status mask.	
+        switch(iEventsArray[index]->EventStatus())
+            {
+            case EActive:
+                {
+                iActiveTriggers++;
+                iEventsStatusMask|= EEvtShowAttributeActive;
+                break;
+                }
+            case EDraft:
+                {
+                iDraftTriggers++;
+                iEventsStatusMask|= EEvtShowAttributeDraft;
+                break;
+                }
+            case ECompleted:
+                {
+                iCompletedTriggers++;
+                iEventsStatusMask|= EEvtShowAttributeCompleted;
+                break;
+                }
+            }        
+        }   
+    
+    // If the current view(show) is empty, then switch to Filter All View
+    switch(iStatusFilter)
+        {
+        case CEvtMgmtUiEngine::EEvtFilterActive:
+            {
+            if( !iActiveTriggers )
+                iStatusFilter = CEvtMgmtUiEngine::EEvtFilterAll;
+            break;
+            }
+        case CEvtMgmtUiEngine::EEvtFilterDraft:
+            {
+            if( !iDraftTriggers )
+                iStatusFilter = CEvtMgmtUiEngine::EEvtFilterAll;
+            break;
+            }
+        case CEvtMgmtUiEngine::EEvtFilterCompleted:
+            {
+            if( !iCompletedTriggers )
+                iStatusFilter = CEvtMgmtUiEngine::EEvtFilterAll;
+            break;
+            }
+        } 
+    
+	// Update the index for create and modify
+	if( updateState == EEvtCreate || updateState == EEvtModify )
+		iCurrentEventIndex = IndexWithoutFilter( iCurrentEventIndex );
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiModel::EventsStatus()
+// It will return type of events
+// ---------------------------------------------------------------------------
+//
+TEvtEventsStatusMask CEvtMgmtUiModel::EventsStatus()
+    {
+    return iEventsStatusMask;   
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventsmgmtui/src/evtmgmtuistartupcontainer.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,845 @@
+/*
+* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Container class for Events Management UI startup view.
+*
+*/
+
+
+// SYSTEM INCLUDES
+#include <avkon.hrh>
+#include <avkon.mbg>
+#include <barsread.h> 
+#include <aknlists.h>
+#include <AknIconArray.h>		// Icon Array
+#include <eikclbd.h>			// Column Listbox
+#include <gulicon.h>			// Gul Icon
+#include <barsread.h>   		// TResourceReader
+#include <eikspane.h>       // Status pane
+#include <akntitle.h>       // CAknTitlePane
+#include <StringLoader.h>   // String Loader
+#include <evtmgmtui.rsg>
+#include <csxhelp/loc.hlp.hrh>
+#include <AknUtils.h>
+#include <evtmgmtui.mbg>
+#include <featmgr.h>
+#include <data_caging_path_literals.hrh>
+#include <AknUtils.h> 
+#include <eikmenup.h> 
+#include <AknsConstants.h> 		// Skin Ids
+#include <AknIconUtils.h>
+#include <AknLayout.lag>          // AVKON LAF layouts
+#include <AknLayoutDef.h>
+#include <aknsfld.h> // For SearchField
+
+// USER INCLUDES
+#include "evtmgmtui.hrh"
+#include "evtmgmtuiuid.hrh"
+#include "evtmgmtuiappui.h"
+#include "evtmgmtuimodel.h"
+#include "evtmgmtuistartupcontainer.h"
+#include "evtmgmtuilistbox.h"
+#include "evtmgmtuilistboxmodel.h"
+#include "evtdebug.h"
+
+// CONSTANT DEFINITIONS
+const TInt KIconArrayGranularity = 5; // The number of default icons
+const TInt KFindBoxTextLength = 32;	// Find Box text length.
+const TInt KMinCountForFilter = 2;
+_LIT( KEvtMgmtUiIconFileName, "evtmgmtui.mif" );
+ 
+// ----------------- Member funtions for CEvtMgmtUiStartupContainer class ------------------
+
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiStartupContainer::CEvtMgmtUiStartupContainer
+// ---------------------------------------------------------------------------
+//
+CEvtMgmtUiStartupContainer::CEvtMgmtUiStartupContainer( MEvtMgmtUiCmdHdlr& aCmdHandler )
+									:iCmdHandler(aCmdHandler)
+    {
+    }
+
+
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiStartupContainer::~CEvtMgmtUiStartupContainer
+// ---------------------------------------------------------------------------
+//
+CEvtMgmtUiStartupContainer::~CEvtMgmtUiStartupContainer()
+    {
+    // Delete the List box
+	delete iListBox;
+	
+	delete iFindBox;
+    }
+    
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiStartupContainer::NewL
+// ---------------------------------------------------------------------------
+//
+CEvtMgmtUiStartupContainer* CEvtMgmtUiStartupContainer::NewL( 
+                                    const TRect&	aRect, CEvtMgmtUiModel* aModel,
+                                    MEvtMgmtUiCmdHdlr& aCmdHandler )     
+    {
+    CEvtMgmtUiStartupContainer* self = new ( ELeave ) CEvtMgmtUiStartupContainer( aCmdHandler );
+    CleanupStack::PushL( self );
+    self->ConstructL( aRect, aModel );
+    CleanupStack::Pop();    
+    return self;
+    }
+    
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiStartupContainer::CEvtMgmtUiStartupContainer
+// ---------------------------------------------------------------------------
+//
+void CEvtMgmtUiStartupContainer::ConstructL( const TRect& 	aRect, CEvtMgmtUiModel* aModel )
+    {
+    // This is the cheif control for this application. This has to be made a 
+    // Window owning control
+    CreateWindowL();
+    
+    // Create the List box
+    EVTUIDEBUG( "Listbox creation" );
+    CreateListboxL(aModel); 
+    CreateFindBoxL();
+    
+    // Check for FindBox Visiblity
+    HandleFindBoxVisibility();
+    
+    // Get the Help context
+    iContextName = KHLP_LOC_EVENTS_VIEW();
+    
+    // Set Title
+    MakeTitleL();
+            
+    SetRect(aRect);
+    ActivateL();
+    }
+
+// ---------------------------------------------------------------------------
+// void CEvtMgmtUiStartupContainer::GetHelpContext
+// ---------------------------------------------------------------------------
+//
+void CEvtMgmtUiStartupContainer::GetHelpContext( TCoeHelpContext& aContext ) const
+	{
+    aContext.iContext = iContextName;
+    aContext.iMajor = TUid::Uid( KEvtMgmtUiUid );	
+	}
+
+// --------------------------------------------------------------------------
+// CEvtMgmtUiStartupContainer::FocusChanged
+// --------------------------------------------------------------------------
+//
+void CEvtMgmtUiStartupContainer::FocusChanged( TDrawNow aDrawNow )
+    {
+    if ( iListBox )
+        {
+        iListBox->SetFocus( IsFocused(), aDrawNow );
+        }
+        
+    if ( iFindBox && iFindBox->IsVisible() )
+        {
+        iFindBox->SetFocus( IsFocused(), aDrawNow );
+        if ( aDrawNow == EDrawNow && IsFocused() )
+            {
+            iFindBox->DrawDeferred();
+            }
+        }
+    }
+		
+// ---------------------------------------------------------------------------
+// void CEvtMgmtUiStartupContainer::SizeChanged
+// ---------------------------------------------------------------------------
+//
+void CEvtMgmtUiStartupContainer::SizeChanged()
+    {
+    EVTUIDEBUG("+ CEvtMgmtUiStartupContainer::SizeChanged()" );
+	const TRect rect( Rect() );
+    TAknLayoutRect controlRect;
+
+    // Since iFindBox->IsVisible() returns EFalse if Adaptive Chars are shown, 
+    // We check on FilteredNumberOfItems meaning the FindBox should be visible when 
+    // FilteredNumberOfItems is greater than 1
+    if( iListBox && iFindBox && 
+            ( iFindBox->IsVisible() || iListBox->Model()->Filter()->FilteredNumberOfItems() > 1 ) )
+        {
+        controlRect.LayoutRect(rect, AknLayout::list_gen_pane( 1 ) );
+        iListBox->SetRect( controlRect.Rect() );
+        controlRect.LayoutRect(rect, AknLayout::find_pane() );
+        iFindBox->SetRect( controlRect.Rect() );  
+        }
+    else if( iListBox )
+        {
+        controlRect.LayoutRect(rect, AknLayout::list_gen_pane( 0 ) );
+        iListBox->SetRect( controlRect.Rect() );
+        }
+    EVTUIDEBUG("- CEvtMgmtUiStartupContainer::SizeChanged()" );
+    }
+
+// ---------------------------------------------------------------------------
+// TInt CEvtMgmtUiStartupContainer::CountComponentControls
+// ---------------------------------------------------------------------------
+//
+TInt CEvtMgmtUiStartupContainer::CountComponentControls() const
+    {
+    TInt count = 0;
+    CCoeControl* controls[] = { iListBox, iFindBox };
+
+    for ( TUint i = 0; i < sizeof( controls ) / sizeof( CCoeControl* ); i++ )
+    {
+        if ( controls[i] ) // Test for valid controls
+        {
+        count++;
+        }
+    }
+
+    return count;
+    }
+
+// ---------------------------------------------------------------------------
+// CCoeControl* CEvtMgmtUiStartupContainer::CEvtMgmtUiStartupContainer
+// ---------------------------------------------------------------------------
+//
+CCoeControl* CEvtMgmtUiStartupContainer::ComponentControl(TInt aIndex ) const
+    {
+    CCoeControl* controls[] = { iListBox,
+                                iFindBox};
+
+    for ( TUint i = 0; i < sizeof( controls ) / sizeof( CCoeControl* ); i++ )
+    {
+        // Index is decremented only if control is not NULL
+        if ( controls[i] && aIndex-- == 0 ) 
+        {
+        return controls[i];
+        }
+    }
+
+    return NULL;
+    }
+
+// ---------------------------------------------------------------------------
+// TKeyResponse CEvtMgmtUiStartupContainer::OfferKeyEventL
+// ---------------------------------------------------------------------------
+//    
+TKeyResponse CEvtMgmtUiStartupContainer::OfferKeyEventL( const TKeyEvent& aKeyEvent,
+								  				               TEventCode aType )
+    {
+    TKeyResponse keyresponse;
+    
+    TBool needRefresh = EFalse;
+    TInt keyConsumed = iFindBox->TextLength();
+	
+	// Key is first offered to the Find box based on the key press.
+    keyresponse = AknFind::HandleFindOfferKeyEventL(aKeyEvent, aType,
+                        this, iListBox, iFindBox, EFalse, needRefresh);
+    
+    // Handle the ListBox Filter count changed event
+    iCmdHandler.HandleCmdL( MEvtMgmtUiCmdHdlr::EListBoxFilterCountChanged ); 
+    
+	// This is to avoid the Mark for the First item of the list box.
+	// We reset the modifier attribute
+    TKeyEvent& keyEvent = const_cast<TKeyEvent&>(aKeyEvent);
+    TInt index = CurrentItemIndex();
+    if(index == 0 || 
+       (index == iListBox->Model()->NumberOfItems() - 1) && aKeyEvent.iScanCode == EStdKeyDownArrow ||
+       (index == 1) && aKeyEvent.iScanCode == EStdKeyUpArrow )
+        {
+        if(keyEvent.iModifiers & EModifierShift)
+            keyEvent.iModifiers&= ~EModifierShift;
+        if(keyEvent.iModifiers & EModifierLeftShift)
+            keyEvent.iModifiers&= ~EModifierLeftShift;
+        if(keyEvent.iModifiers & EModifierRightShift)
+            keyEvent.iModifiers&= ~EModifierRightShift;
+        if(keyEvent.iModifiers & EModifierCtrl)
+            keyEvent.iModifiers&= ~EModifierCtrl;
+        if(keyEvent.iModifiers & EModifierRightCtrl)
+            keyEvent.iModifiers&= ~EModifierRightCtrl;
+        }
+    
+	// Now handle the Key Event based on the Key type
+    switch ( aKeyEvent.iScanCode )
+        {            
+        case EStdKeyUpArrow:
+        case EStdKeyDownArrow:
+            {
+    	    keyresponse = iListBox->OfferKeyEventL( aKeyEvent, aType );
+            iCmdHandler.HandleCmdL( MEvtMgmtUiCmdHdlr::EListBoxItemFocused );    
+            return keyresponse;        	
+            }
+        case EStdKeyBackspace:
+        case EStdKeyDelete:
+            {
+            if(aType == EEventKey && !keyConsumed )
+                {
+                keyresponse = iListBox->OfferKeyEventL( aKeyEvent, aType );
+                iCmdHandler.HandleCmdL( MEvtMgmtUiCmdHdlr::EListBoxItemDeleted );
+                }
+            return keyresponse;               
+            }
+        case EStdKeyHash:
+			{
+            if(!index)
+                {
+                keyresponse = EKeyWasConsumed;
+                }
+            else
+                {
+                TBool shiftKeyPressed = ( aKeyEvent.iModifiers & EModifierShift );
+                keyresponse = iListBox->OfferKeyEventL( aKeyEvent, aType );
+                if( aType == EEventKeyUp && ( EKeyWasConsumed == keyresponse || !shiftKeyPressed ) )
+                    iCmdHandler.HandleCmdL( MEvtMgmtUiCmdHdlr::EListBoxItemFocused );  
+                }
+            return keyresponse; 
+			}
+        default:
+            {
+            break;  
+            }
+        }
+    // Now it's List box's job to process the key event
+    return iListBox->OfferKeyEventL( aKeyEvent, aType ); 
+    }   
+
+// ---------------------------------------------------------------------------
+// void CEvtMgmtUiStartupContainer::HandleResourceChange
+// ---------------------------------------------------------------------------
+//
+void CEvtMgmtUiStartupContainer::HandleResourceChange( TInt aType )
+	{
+    // Pass the event to the base class
+    CCoeControl::HandleResourceChange(aType);
+    
+    switch( aType )
+        {
+    	case KAknsMessageSkinChange:
+        	{
+        	TRAPD( error, UpdateIconsL() );
+        	if ( error != KErrNone )
+            	{
+            	iEikonEnv->HandleError( error );
+            	}                 
+        	DrawDeferred();
+        	   	
+        	break;
+        	}
+        // Dynamic Layout switch
+        case KEikDynamicLayoutVariantSwitch:
+            {
+            // Handle the screen change event
+            // Trap and Ignore the error
+            TRAP_IGNORE(
+                iCmdHandler.HandleCmdL( MEvtMgmtUiCmdHdlr::EScreenSizeChanged ));
+            break;
+            }
+        default:
+            {
+            break;
+            }
+        }
+	}
+
+// ---------------------------------------------------------------------------
+// void CEvtMgmtUiStartupContainer::HandleListBoxEventL
+// ---------------------------------------------------------------------------
+//	
+void CEvtMgmtUiStartupContainer::HandleListBoxEventL( 
+                                    CEikListBox*      /* aListBox */, 
+                          		    TListBoxEvent      aEventType  )
+	{
+    switch (aEventType)
+        {
+        // List box Item Selection
+        case EEventEnterKeyPressed:
+        case EEventItemSingleClicked:
+            {            
+            iCmdHandler.HandleCmdL( MEvtMgmtUiCmdHdlr::EListBoxItemDoubleClicked );
+            break;  
+            }
+        case EEventItemClicked:
+            {
+            iCmdHandler.HandleCmdL( MEvtMgmtUiCmdHdlr::EListBoxItemFocused);
+            break;
+            }
+        default:
+           break;
+        }	
+	}
+	
+// ---------------------------------------------------------------------------
+// void CEvtMgmtUiStartupContainer::CreateListboxL
+// ---------------------------------------------------------------------------
+// 	
+void CEvtMgmtUiStartupContainer::CreateListboxL( CEvtMgmtUiModel* aModel )
+    {	
+    EVTUIDEBUG("+ CEvtMgmtUiStartupContainer::CreateListboxL()" );
+	// Create the List box
+	iListBox = new ( ELeave ) CEvtMgmtUiListBox();
+    iListBox->ConstructL( this, EAknListBoxStylusMarkableList );
+    iListBox->SetContainerWindowL( *this ); 
+    iListBox->SetListBoxObserver( this );
+    iListBox->CreateScrollBarFrameL(ETrue);
+    iListBox->ScrollBarFrame()->SetScrollBarVisibilityL( CEikScrollBarFrame::EOff,
+    													 CEikScrollBarFrame::EAuto ); 
+ 
+    UpdateIconsL();
+     
+	// Create the Listbox model
+    CEvtMgmtUiListBoxModel* model = static_cast<CEvtMgmtUiListBoxModel*>(iListBox->Model());
+    model->SetItemTextArray( aModel );	
+    model->SetOwnershipType( ELbmDoesNotOwnItemArray ); 
+    model->SetItemTextArrayToFilterModel();
+   								
+    iListBox->ItemDrawer()->ColumnData()->EnableMarqueeL( ETrue );
+        								
+    iListBox->ActivateL();    
+    
+    EVTUIDEBUG("- CEvtMgmtUiStartupContainer::CreateListboxL()" );
+    }
+
+// -----------------------------------------------------------------------------
+// CEvtMgmtUiStartupContainer::CreateFindBoxL()
+//
+// Creates the member iFindBox
+// -----------------------------------------------------------------------------
+//
+void CEvtMgmtUiStartupContainer::CreateFindBoxL()
+    {
+    EVTUIDEBUG("+ CEvtMgmtUiStartupContainer::CreateFindBoxL()" );
+
+    // Create the findbox.
+    iFindBox = CAknSearchField::NewL( *this, CAknSearchField::EAdaptiveSearch, 
+        NULL, KFindBoxTextLength );
+    
+    // Set default input mode to Katakana if current UI language is Japanese
+    if (FeatureManager::FeatureSupported(KFeatureIdJapanese) &&
+        (User::Language() == ELangJapanese))
+        {
+        iFindBox->Editor().SetAknEditorInputMode(EAknEditorKatakanaInputMode);
+        }
+    else
+        {
+        iFindBox->Editor().SetAknEditorCurrentInputMode(EAknEditorTextInputMode);
+        }
+
+    // Set Column mask
+    iFindBox->SetListColumnFilterFlags(2); // This is set to search only "Subject" column
+
+    STATIC_CAST(CAknFilteredTextListBoxModel*, iListBox->Model())->CreateFilterL(iListBox,iFindBox);
+    STATIC_CAST(CAknFilteredTextListBoxModel*, iListBox->Model())->Filter()->SetParentControl( this );
+    iListBox->Model()->SetFindToFilterModel(iFindBox);
+        
+    iFindBox->ActivateL();    
+    
+    EVTUIDEBUG("- CEvtMgmtUiStartupContainer::CreateFindBoxL()" );
+    }
+
+// -----------------------------------------------------------------------------
+// CEvtMgmtUiStartupContainer::MakeFindBoxVisible()
+//
+// Deletes the member iFindBox
+// -----------------------------------------------------------------------------
+//
+void CEvtMgmtUiStartupContainer::HandleFindBoxVisibility()
+    {
+    if( iListBox && iFindBox )
+        {
+        if(iListBox->Model()->Filter()->FilteredNumberOfItems() < KMinCountForFilter )
+            {
+            iFindBox->SetFocusing( EFalse );
+            iFindBox->MakeVisible( EFalse );
+            iListBox->SetFocusing( ETrue );
+            }
+        else
+            {
+            iFindBox->SetFocusing( ETrue );
+            iFindBox->MakeVisible( ETrue );
+            iListBox->SetFocusing( EFalse );
+            }
+        
+        SizeChanged();
+        DrawNow();
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CEvtMgmtUiStartupContainer::UpdateIconsL
+// -----------------------------------------------------------------------------
+void CEvtMgmtUiStartupContainer::UpdateIconsL()
+    {
+    EVTUIDEBUG( "+ CEvtMgmtUiStartupContainer::UpdateIconsL()" );
+    
+    CAknIconArray* icons = new( ELeave ) CAknIconArray( KIconArrayGranularity );
+    CleanupStack::PushL( icons );
+
+	TFileName *iconFile = IconFileNameLC();
+
+    //mark
+    AddColorIconL( *icons, 
+              AknIconUtils::AvkonIconFileName(),
+              KAknsIIDQgnIndiMarkedAdd,
+              EMbmAvkonQgn_indi_marked_add, EMbmAvkonQgn_indi_marked_add_mask );
+
+//Create new event
+    AddIconL( *icons, 
+    		  *iconFile,
+    		  KAknsIIDQgnPropLocevNew, 
+    		  EMbmEvtmgmtuiQgn_prop_locev_new, EMbmEvtmgmtuiQgn_prop_locev_new_mask);
+    
+    //active
+     AddIconL( *icons, 
+             *iconFile,
+             KAknsIIDQgnPropLocevTrigger, 
+             EMbmEvtmgmtuiQgn_prop_locev_trigger, EMbmEvtmgmtuiQgn_prop_locev_trigger_mask);
+            
+    //draft            
+    AddIconL( *icons, 
+             *iconFile,
+             KAknsIIDQgnPropLocevDraft, 
+             EMbmEvtmgmtuiQgn_prop_locev_draft, EMbmEvtmgmtuiQgn_prop_locev_draft_mask);
+       
+   //completed       
+    AddIconL( *icons, 
+                *iconFile,
+                KAknsIIDQgnPropLocevCompleted, 
+                EMbmEvtmgmtuiQgn_prop_locev_completed, EMbmEvtmgmtuiQgn_prop_locev_completed_mask);
+               
+  // repeat                
+	AddColorIconL( *icons, 
+                *iconFile,
+                KAknsIIDQgnIndiRepeatAdd, 
+                EMbmEvtmgmtuiQgn_indi_repeat_add, EMbmEvtmgmtuiQgn_indi_repeat_add_mask);
+                
+    CleanupStack::PopAndDestroy(iconFile);
+
+    //get old icons and delete those
+    CAknIconArray* oldIcons = static_cast<CAknIconArray*>(
+        iListBox->ItemDrawer()->ColumnData()->IconArray() );    
+    delete oldIcons;
+
+    //set new icons to array
+    iListBox->ItemDrawer()->ColumnData()->SetIconArray( icons );  
+    CleanupStack::Pop(icons);
+    
+    EVTUIDEBUG( "- CEvtMgmtUiStartupContainer::UpdateIconsL()" );
+        
+    }
+    
+// -----------------------------------------------------------------------------
+// CEvtMgmtUiStartupContainer::AddIconL
+// -----------------------------------------------------------------------------
+void CEvtMgmtUiStartupContainer::AddIconL( CAknIconArray&  aIcons,
+                                           const TDesC&    aIconFileWithPath,
+                                           TAknsItemID     aSkinID,
+                                           TInt            aIconGraphicsIndex,
+                                           TInt            aIconGraphicsMaskIndex )
+    {
+    MAknsSkinInstance* skin = AknsUtils::SkinInstance();
+
+    EVTUIDEBUG( "AknsUtils::SkinInstance" );
+    
+    CFbsBitmap* bitmap = NULL;
+    CFbsBitmap* bitmapMask = NULL;
+    TRAPD( err, AknsUtils::CreateIconL( skin,
+                            aSkinID,
+                            bitmap,
+                            bitmapMask,
+                            aIconFileWithPath,
+                            aIconGraphicsIndex,
+                            aIconGraphicsMaskIndex ) );
+
+	
+    EVTUIDEBUG1( "AknsUtils::CreateIconL - %d", err );
+    if(err != KErrNone)
+	    {
+	    TRAP( err, AknIconUtils::CreateIconL( bitmap,
+	                            bitmapMask,
+	                            aIconFileWithPath,
+	                            aIconGraphicsIndex,
+	                            aIconGraphicsMaskIndex ) );
+    	EVTUIDEBUG1( "AknIconUtils::CreateIconL - %d", err );
+	    }
+    User::LeaveIfError( err );
+    
+    CleanupStack::PushL( bitmap );
+    CleanupStack::PushL( bitmapMask );
+    
+    CGulIcon* icon = CGulIcon::NewL( bitmap, bitmapMask );
+    
+    // Remove the Bitmap and the Bitmap Icon from the Clean up stack since 
+    // the ownership is taken over by the icon
+    CleanupStack::Pop( bitmapMask );
+    CleanupStack::Pop( bitmap ); 
+    
+    CleanupStack::PushL( icon );
+    aIcons.AppendL( icon );
+    CleanupStack::Pop( icon ); // icon
+    }
+    
+// -----------------------------------------------------------------------------
+// CEvtMgmtUiStartupContainer::AddColorIconL
+// -----------------------------------------------------------------------------
+void CEvtMgmtUiStartupContainer::AddColorIconL( CAknIconArray&  aIcons,
+                                           const TDesC&    aIconFileWithPath,
+                                           TAknsItemID     aSkinID,
+                                           TInt            aIconGraphicsIndex,
+                                           TInt            aIconGraphicsMaskIndex )
+    {
+    MAknsSkinInstance* skin = AknsUtils::SkinInstance();
+
+    // Repeat icon. Color skinned with day view icon color 
+    // FIXME: highlight coloring in lists doesn't work for icons.
+    // When Avkon suplies some method to do that, change these 
+    TAknsItemID colorGroup = KAknsIIDQsnIconColors;
+    TInt colorIndex = EAknsCIQsnIconColorsCG19;
+    TRgb nonSkinColor = AKN_LAF_COLOR(215);
+    
+    CFbsBitmap* bitmap = NULL;
+    CFbsBitmap* bitmapMask = NULL;
+    AknsUtils::CreateColorIconLC( skin,
+                            aSkinID,
+                            colorGroup,
+                            colorIndex,
+                            bitmap,
+                            bitmapMask,
+                            aIconFileWithPath,
+                            aIconGraphicsIndex,
+                            aIconGraphicsMaskIndex,
+                            nonSkinColor );
+    
+    CGulIcon* icon = CGulIcon::NewL( bitmap, bitmapMask );
+    
+    // Remove the Bitmap and the Bitmap Icon from the Clean up stack since 
+    // the ownership is taken over by the icon
+    CleanupStack::Pop( bitmapMask );
+    CleanupStack::Pop( bitmap ); 
+    
+    CleanupStack::PushL( icon );
+    aIcons.AppendL( icon );
+    CleanupStack::Pop( icon ); // icon
+    }
+
+// -----------------------------------------------------------------------------
+// CEvtMgmtUiStartupContainer::IconFileNameLC
+// -----------------------------------------------------------------------------
+TFileName* CEvtMgmtUiStartupContainer::IconFileNameLC() const
+    {
+    TFileName* fileName = new(ELeave) TFileName;
+    CleanupStack::PushL( fileName );
+    
+	TFileName* tmpName = new(ELeave) TFileName;
+    CleanupStack::PushL( tmpName );
+	
+    tmpName->Append( KDC_BITMAP_DIR );
+    tmpName->Append( KEvtMgmtUiIconFileName );
+
+    CEikAppUi *appUi = ( CEikAppUi *)( CEikonEnv::Static()->AppUi());
+    TFileName appDrive = appUi->Application()->AppFullName();
+    
+    TParse parse;
+    User::LeaveIfError( parse.Set( appDrive, NULL, NULL ) );
+    User::LeaveIfError( parse.Set( parse.Drive(), tmpName, NULL ) );
+    
+	fileName->Copy(parse.FullName());
+
+    CleanupStack::PopAndDestroy( tmpName );
+
+    return fileName;
+    }    
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiModel::UpdateListBoxL()
+// It will update listbox
+// ---------------------------------------------------------------------------
+//
+void CEvtMgmtUiStartupContainer::UpdateListBoxL(TInt aSelectedItemIndex)
+    {   
+    iListBox->Model()->Filter()->ResetFilteringL();
+    iFindBox->ResetL();
+    iListBox->ClearSelection();
+    
+    TInt count = iListBox->Model()->NumberOfItems();
+    if( iPrevCount > count )
+		{
+        iListBox->HandleItemRemovalL();
+		iListBox->DrawNow();
+		}
+    else
+		{
+        iListBox->HandleItemAdditionL();
+		}
+            
+    iPrevCount = count;
+               
+    if( aSelectedItemIndex >= count )
+        aSelectedItemIndex = count-1;
+    if(aSelectedItemIndex<0)
+          aSelectedItemIndex = 0;
+
+    iListBox->SetCurrentItemIndexAndDraw( aSelectedItemIndex );   
+    
+    // Check for FindBox Visiblity
+    HandleFindBoxVisibility();
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiStartupContainer::CurrentItemIndex()
+// It will return the index of the selected item 
+// ---------------------------------------------------------------------------
+//
+TInt CEvtMgmtUiStartupContainer::CurrentItemIndex()
+    {
+        return iListBox->Model()->Filter()->FilteredItemIndex( iListBox->CurrentItemIndex() );
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiStartupContainer::HandleMarkCmd()
+// It will handle mark functionality.
+// ---------------------------------------------------------------------------
+//
+void CEvtMgmtUiStartupContainer::HandleMarkCmdL( TInt aIndex, TBool aIsMarked )
+    {
+    CListBoxView* listBoxView = iListBox->View();
+    CAknFilteredTextListBoxModel* model = iListBox->Model();
+    if( aIndex != KErrNotFound )
+        {
+        TInt visibleIndex = model->Filter()->VisibleItemIndex(aIndex);
+        if (aIsMarked)
+             {
+             listBoxView->SelectItemL(visibleIndex);
+             }
+        else
+            {
+            listBoxView->DeselectItem(visibleIndex);
+            }
+        }
+    else
+        {
+        TInt itemCount = model->NumberOfItems();
+        for (TUint i = 1; i < itemCount; i++)
+            {
+            TInt visibleIndex = model->Filter()->VisibleItemIndex(i);
+            if (aIsMarked)
+                {
+                listBoxView->SelectItemL(i);
+                }
+            else
+                {
+                listBoxView->DeselectItem(i);
+                }
+            }
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiStartupContainer::HandleMarkableListDynInitMenuPane()
+// It will display mark menu items dynamically
+// ---------------------------------------------------------------------------
+//
+void CEvtMgmtUiStartupContainer::HandleMarkableListDynInitMenuPane( TInt /*ResourceId */, CEikMenuPane *aMenuPane )
+    {
+    TInt pos;
+    if( !aMenuPane->MenuItemExists(EAknCmdMark, pos) )
+        return;
+    
+    TInt markItems = iListBox->SelectionIndexes()->Count();
+    if( iListBox->CurrentItemIndex() == 0 ) //if 'Create New Event'
+        {
+        aMenuPane->SetItemDimmed( EAknCmdMark, ETrue );
+        aMenuPane->SetItemDimmed( EAknCmdUnmark, ETrue );        
+        }
+    else
+        {
+        if(iListBox->View()->ItemIsSelected(iListBox->CurrentItemIndex()) )
+            {
+            aMenuPane->SetItemDimmed( EAknCmdMark, ETrue );
+            aMenuPane->SetItemDimmed( EAknCmdUnmark, EFalse );
+            }
+        else
+            {
+            aMenuPane->SetItemDimmed( EAknCmdMark, EFalse );
+            aMenuPane->SetItemDimmed( EAknCmdUnmark, ETrue );
+            }       
+        }
+    if( markItems < 1 )// if no item is selected
+        {
+        aMenuPane->SetItemDimmed( EAknUnmarkAll, ETrue );
+        }
+    else
+        {
+       aMenuPane->SetItemDimmed( EAknUnmarkAll, EFalse );
+        }
+    
+    if( markItems == iListBox->Model()->NumberOfItems()-1 )// if all items are selected
+        {
+        aMenuPane->SetItemDimmed( EAknMarkAll, ETrue );
+        }
+    else
+        {
+        aMenuPane->SetItemDimmed( EAknMarkAll, EFalse );
+        }   
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiStartupContainer::NumberOfMarkedItems()
+// It will return count of marked items
+// ---------------------------------------------------------------------------
+//
+TInt CEvtMgmtUiStartupContainer::NumberOfMarkedItems()
+    {
+    return iListBox->SelectionIndexes()->Count();
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiStartupContainer::MarkItems()
+// It will return marked items
+// ---------------------------------------------------------------------------
+//
+const CArrayFix<TInt>* CEvtMgmtUiStartupContainer::MarkItems()
+    {
+    return iListBox->SelectionIndexes();
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiStartupContainer::FilteredIndex()
+// It will return marked items
+// ---------------------------------------------------------------------------
+//
+TInt CEvtMgmtUiStartupContainer::FilteredIndex(TInt aIndex)
+    {
+    return iListBox->Model()->Filter()->FilteredItemIndex( aIndex );
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiStartupContainer::FilteredCount()
+// It will return count of marked items
+// ---------------------------------------------------------------------------
+//
+TInt CEvtMgmtUiStartupContainer::FilteredCount()
+    {
+    return iListBox->Model()->Filter()->FilteredNumberOfItems();
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiStartupContainer::MakeTitleL()
+// Set the Title Text
+// ---------------------------------------------------------------------------
+//
+void CEvtMgmtUiStartupContainer::MakeTitleL()
+    {
+    // Obtain the title from the Status Pane
+    CAknTitlePane* title = static_cast<CAknTitlePane*>( iEikonEnv->AppUiFactory()->
+    	StatusPane()->ControlL( TUid::Uid( EEikStatusPaneUidTitle )));
+       
+    // Set the Title's buffer    
+    HBufC* buf = StringLoader::LoadL( R_EVTUI_TITLE );    
+    title->SetText( buf ); // Takes ownership of buf 
+    }    
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventsmgmtui/src/evtmgmtuistartupview.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,1206 @@
+/*
+* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  View class for Events Management UI.
+*
+*/
+
+// SYSTEM INCLUDES
+#include <evtmgmtui.rsg>
+#include <hlplch.h>
+#include <featmgr.h>
+#include <eikmenup.h>
+#include <eikbtgpc.h>
+#include <StringLoader.h>
+#include <aknmessagequerydialog.h>
+#include <aknnotewrappers.h> 
+#include <eikserverapp.h>
+#include <textresolver.h>
+#include <csxhelp/loc.hlp.hrh>
+
+// USER INCLUDES
+#include "evtmgmtuiuid.hrh"
+#include "evtmgmtuistartupview.h"
+#include "evtmgmtuistartupcontainer.h"
+#include "evtmgmtuiappui.h"
+#include "evtmgmtui.hrh"
+#include "evteventsdlg.h"
+#include "evtdebug.h"
+#include "evtmgmtuilocsettinglauncher.h"
+#include "evtmgmtuimodel.h"
+#include "evtmgmtuilbtadapter.h"
+#include "evtmgmtuimapnavigationadapter.h"
+
+// CONSTANT DEFINTIONS
+const TUid	KEvtMgmtUiStartupViewId = TUid::Uid( 1 );
+const TInt KMaxEvents = 50;
+_LIT( KWaitCycleError, "Wait Cycle Error" );
+
+// ----------------- Member funtions for CEvtMgmtUiStartupView class -----------------------
+
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiStartupView::CEvtMgmtUiStartupView
+// ---------------------------------------------------------------------------
+//  
+CEvtMgmtUiStartupView::CEvtMgmtUiStartupView()
+    {
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiStartupView::~CEvtMgmtUiStartupView
+// ---------------------------------------------------------------------------
+//  
+CEvtMgmtUiStartupView::~CEvtMgmtUiStartupView()
+    {
+    if ( iContainer )
+        {
+        AppUi()->RemoveFromViewStack( *this, iContainer );
+    	delete iContainer; 
+        }
+    
+    // Unregister the command handler as an observer
+    if( iEngine )
+	{
+	iEngine->RemoveObserver( this );
+       	delete iEngine;
+	}
+    
+    delete iPosSetLauncher;
+    
+    if(iEvtIdArray)
+        {
+        iEvtIdArray->Close();
+        delete iEvtIdArray;
+        }
+    
+    delete iModel;
+    FeatureManager::UnInitializeLib();
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiStartupView* CEvtMgmtUiStartupView::NewL
+// ---------------------------------------------------------------------------
+//        
+CEvtMgmtUiStartupView* CEvtMgmtUiStartupView::NewL()
+    {
+    CEvtMgmtUiStartupView* self = new ( ELeave ) CEvtMgmtUiStartupView();
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    CleanupStack::Pop(self);
+    return self;
+    }
+
+// ---------------------------------------------------------------------------
+// void CEvtMgmtUiStartupView::ConstructL
+// ---------------------------------------------------------------------------
+//  
+void CEvtMgmtUiStartupView::ConstructL()
+    {
+    if(iEikonEnv->StartedAsServerApp())
+        {
+        iIsEmbeddedApp = ETrue;
+        BaseConstructL( R_EVTMGMTUI_STARTUP_VIEW_EMBEDDED );
+        }
+    else
+        {
+        iIsEmbeddedApp = EFalse;
+        BaseConstructL( R_EVTMGMTUI_STARTUP_VIEW );
+        }
+    // Create Log Directory.
+    //CREATELOGDIR();
+    
+    // Feature manager required for Help feature check
+    FeatureManager::InitializeLibL();
+    
+    iEngine = CEvtMgmtUiEngine::NewL();    
+    iEngine->SetObserver(this);  
+    
+    iEngine->SyncDbsL();
+    
+    iModel = CEvtMgmtUiModel::NewL();
+    iEngine->UpdateModelL(iModel->EventsArray(), CEvtMgmtUiEngine::EEvtFilterAll ); 
+    iModel->SetStatusFilter( CEvtMgmtUiEngine::EEvtFilterAll );  
+    iModel->UpdateEventsStatus( );
+    }
+			
+// ---------------------------------------------------------------------------
+// void CEvtMgmtUiStartupView::DoActivateL
+// ---------------------------------------------------------------------------
+//  	
+void CEvtMgmtUiStartupView::DoActivateL( const TVwsViewId&  /* PrevViewId*/,
+                                             TUid           /* aCustomMessageId*/,
+                                       const TDesC8&        /* aCustomMessage */)
+    {
+    // Destroy the existing container if it exists
+    if( iContainer )
+        {
+        AppUi()->RemoveFromViewStack( *this, iContainer );
+        delete iContainer;
+        iContainer=NULL;
+        }                       
+    
+    // Create new Container 
+    iContainer = CEvtMgmtUiStartupContainer::NewL( ClientRect(), iModel, *this);
+    iContainer->SetMopParent( this );
+    AppUi()->AddToViewStackL( *this, iContainer );   	   
+    if(iModel->TotalEvents())
+        MenuBar()->SetMenuTitleResourceId ( R_EVTMGMTUI_STARTUP_MENUBAR_MARK );
+    else
+        MenuBar()->SetMenuTitleResourceId ( R_EVTMGMTUI_STARTUP_MENUBAR );
+    }
+    
+// ---------------------------------------------------------------------------
+// void CEvtMgmtUiStartupView::DoDeactivate
+// ---------------------------------------------------------------------------
+//           
+void CEvtMgmtUiStartupView::DoDeactivate()
+    {
+    // Destroy Container
+    if ( iContainer )
+        {
+        AppUi()->RemoveFromViewStack( *this, iContainer );
+        delete iContainer;
+        iContainer = NULL;
+        }
+    }
+    
+// ---------------------------------------------------------------------------
+// TUid CEvtMgmtUiStartupView::Id
+// ---------------------------------------------------------------------------
+//   
+TUid CEvtMgmtUiStartupView::Id() const
+    {
+    return KEvtMgmtUiStartupViewId;
+    }
+
+// -----------------------------------------------------------------------------
+//  CEvtMgmtUiStartupView::HandleShowOnMapCommandL
+//  It will handle 'show on map' command.
+// -----------------------------------------------------------------------------
+//
+void CEvtMgmtUiStartupView::HandleShowOnMapCommandL()
+    {
+    EVTUIDEBUG("+ CEvtMgmtUiStartupView::HandleShowOnMapCommandL()" );
+    CEvtMgmtUiMapNavigationAdapter* map = CEvtMgmtUiMapNavigationAdapter::NewL();
+    CleanupStack::PushL(map);
+    TCoordinate loc;
+    iEngine->RetrieveLocationL( iModel->EventId( iContainer->CurrentItemIndex() ), loc );        
+    map->ShowOnMapL( loc );
+    CleanupStack::PopAndDestroy(); //map
+    EVTUIDEBUG("- CEvtMgmtUiStartupView::HandleShowOnMapCommandL()" );
+    }
+
+// -----------------------------------------------------------------------------
+//  CEvtMgmtUiStartupView::HandleNavigateToPlaceCommandL
+//  It will handle 'navigate to place' command.
+// -----------------------------------------------------------------------------
+//
+void CEvtMgmtUiStartupView::HandleNavigateToPlaceCommandL()
+    {
+    EVTUIDEBUG("+ CEvtMgmtUiStartupView::HandleNavigateToPlaceCommandL()" );
+    CEvtMgmtUiMapNavigationAdapter* map = CEvtMgmtUiMapNavigationAdapter::NewL();
+    CleanupStack::PushL(map);    
+    TCoordinate loc;
+    iEngine->RetrieveLocationL( iModel->EventId( iContainer->CurrentItemIndex() ), loc );
+    map->NavigateToPlaceL( loc );
+    CleanupStack::PopAndDestroy(); //map
+    EVTUIDEBUG("- CEvtMgmtUiStartupView::HandleNavigateToPlaceCommandL()" );
+    }
+// ---------------------------------------------------------------------------
+// void CEvtMgmtUiStartupView::HandleCommandL
+// ---------------------------------------------------------------------------
+//       
+void CEvtMgmtUiStartupView::HandleCommandL( TInt aCommand )   
+    {
+    EVTUIDEBUG1("+ CEvtMgmtUiStartupView::HandleCommandL = %d", aCommand);
+    
+    TInt currentItemIndex= iContainer->CurrentItemIndex();
+    // This class only handles the commands specific to this view
+    switch( aCommand )
+    	{
+    	case EEvtMgmtUiStartupViewOpen:
+			{			
+			if(currentItemIndex>0)
+				{ 
+                TCoeHelpContext context;
+                context.iContext = KHLP_LOC_EVENTS_EDITOR();
+                context.iMajor = TUid::Uid( KEvtMgmtUiUid );	
+                
+				CEvtEvent* evt = iEngine->EventL( EventIdOfCurrentItem() );	
+				CleanupStack::PushL( evt );
+				CEvtEventsDlg* form = CEvtEventsDlg::NewL(EFalse, *evt, *iEngine);  
+				form->SetHelpContext( context );            
+				form->ExecuteLD( ); 	
+				CleanupStack::PopAndDestroy( evt );
+				iContainer->MakeTitleL();
+				}           
+			break;
+			} 
+    	case EEvtMgmtUiStartupViewCreate:
+			{
+			currentItemIndex = KErrNotFound;
+			if(iModel->TotalEvents() < KMaxEvents )
+			    {
+                TCoeHelpContext context;
+                context.iContext = KHLP_LOC_EVENTS_EDITOR();
+                context.iMajor = TUid::Uid( KEvtMgmtUiUid );	
+                
+				CEvtEvent* evt = iEngine->EventL( 0 );	
+				CleanupStack::PushL( evt );
+			    CEvtEventsDlg* form = CEvtEventsDlg::NewL(ETrue, *evt, *iEngine );                
+				form->SetHelpContext( context );            
+			    form->ExecuteLD( );
+				CleanupStack::PopAndDestroy( evt );
+				iContainer->MakeTitleL();
+				if(iModel->TotalEvents())
+			        MenuBar()->SetMenuTitleResourceId ( R_EVTMGMTUI_STARTUP_MENUBAR_MARK );
+			    else
+			        MenuBar()->SetMenuTitleResourceId ( R_EVTMGMTUI_STARTUP_MENUBAR );
+			    }
+			else
+			    {
+			    HBufC* errMsg = StringLoader::LoadLC( R_EVTUI_MAXEVENTS_ERROR, iCoeEnv );
+                CAknInformationNote* errNote = new(ELeave) CAknInformationNote();
+                errNote->ExecuteLD( *errMsg );
+                CleanupStack::PopAndDestroy(errMsg);   
+			    }
+			break;
+			}   
+    	case EEvtEditorCmdDelete:
+    	    {
+    	    TInt cnt = iContainer->NumberOfMarkedItems();
+    	    if( currentItemIndex != 0 || cnt )
+    	        {
+                HBufC* msg = NULL;
+                if(cnt>1)
+                    msg = StringLoader::LoadLC(R_LOCEV_CONFIRM_MULTIDELETE_EVENT, cnt, CEikonEnv::Static() );
+                else
+                    msg = StringLoader::LoadLC(R_LOCEV_CONFIRM_DELETE_EVENT, CEikonEnv::Static() );
+                
+                //if not deleted, do nothing
+               if(DisplayConfirmationQueryDlgL(*msg))
+                   { 	         
+                    iWaitState = EWaitDlgLaunchToDelete;   
+                    StartWaitDialogL();
+                   }
+                CleanupStack::PopAndDestroy(msg);
+    	        }
+            break;
+            }   	
+    	case EEvtEditorCmdShowAll:
+    		{
+    		iModel->SetCurrentItemId( iContainer->CurrentItemIndex() );
+    		iModel->SetStatusFilter( CEvtMgmtUiEngine::EEvtFilterAll );
+    		UpdateViewL(); 
+    		break;
+    		}
+    	case EEvtEditorCmdShowDrafts:
+    		{    		
+    		iModel->SetCurrentItemId( iContainer->CurrentItemIndex() );
+    		iModel->SetStatusFilter( CEvtMgmtUiEngine::EEvtFilterDraft );
+    		UpdateViewL(); 
+    		break;
+    		}
+    	case EEvtEditorCmdShowActive:
+    		{ 
+    		iModel->SetCurrentItemId( iContainer->CurrentItemIndex() );
+    		iModel->SetStatusFilter( CEvtMgmtUiEngine::EEvtFilterActive );
+    		UpdateViewL(); 
+    		break;
+    		}
+        case EEvtEditorCmdShowCompleted:
+            {           
+            iModel->SetCurrentItemId( iContainer->CurrentItemIndex() );
+            iModel->SetStatusFilter( CEvtMgmtUiEngine::EEvtFilterCompleted );
+            UpdateViewL(); 
+            break;
+            }
+    	case EEvtEditorCmdActivate:
+    	    {    	    
+    	    iEvtStatus = EActive;
+    	    iWaitState = EWaitDlgLaunchToChangeStatus;   
+    	    StartWaitDialogL();    	        	    
+    	    break;
+    	    }
+	   case EEvtEditorCmdSaveDraft:
+            {
+            iEvtStatus = EDraft;  
+            iWaitState = EWaitDlgLaunchToChangeStatus;   
+            StartWaitDialogL();                    
+            break;
+            }
+	   case EAknCmdMark:
+	   case EAknSoftkeyMark:
+	       {
+	       if(currentItemIndex != KErrNotFound)
+	           {
+	           iContainer->HandleMarkCmdL(currentItemIndex, ETrue);
+	           HandleCmdL( EListBoxItemFocused );
+	           }
+	       break;
+	       }
+	   case EAknCmdUnmark:
+	   case EAknSoftkeyUnmark:
+	       {
+	       if(currentItemIndex != KErrNotFound)
+	           {
+    	       iContainer->HandleMarkCmdL(currentItemIndex, EFalse);
+    	       HandleCmdL( EListBoxItemFocused );
+	           }
+	       break;
+	       }
+	   case EAknMarkAll:
+	       {
+	       iContainer->HandleMarkCmdL(KErrNotFound, ETrue);
+	       HandleCmdL( EListBoxItemFocused );
+	       break;
+	       }
+	   case EAknUnmarkAll:
+	        {	                   
+	        iContainer->HandleMarkCmdL(KErrNotFound, EFalse);
+	        HandleCmdL( EListBoxItemFocused );
+	        }
+		    break;  
+	   case EEvtEditorCmdNavigateToPlace:
+	       {
+	       HandleNavigateToPlaceCommandL();
+	       break;
+	       }
+	   case EEvtEditorCmdShowOnMap:
+	       {
+	       HandleShowOnMapCommandL();
+	       break;
+	       }
+	   case EEvtMgmtUiEventUiPosSettings:
+	       {
+	       if(!iPosSetLauncher)
+               {
+               iPosSetLauncher = CEvtMgmtUiLocSettingsLauncher::NewL();                
+               }
+	       iPosSetLauncher->LaunchL();
+           break;
+	       }
+    	case EAknCmdHelp:
+            {
+            HlpLauncher::LaunchHelpApplicationL( iCoeEnv->WsSession(),
+                                                 AppUi()->AppHelpContextL());
+            break;  
+            }
+        default:
+        	{
+			AppUi()->HandleCommandL( aCommand );
+			break;        	
+        	}
+    	}
+    EVTUIDEBUG("- CEvtMgmtUiStartupView::HandleCommandL");
+    }
+
+// ---------------------------------------------------------------------------
+// void CEvtMgmtUiStartupView::ChangeEventStatus
+// Change status of the event
+// param[in] aStatus -  value to which event status should be changed
+// ---------------------------------------------------------------------------
+//  
+void CEvtMgmtUiStartupView::ChangeEventStatusL( TEvtEventStatus aStatus )
+    {      
+    TInt cnt = iContainer->NumberOfMarkedItems();
+    TInt index;
+    if(iEvtIdArray)
+        iEvtIdArray->Reset();
+    else
+        iEvtIdArray = new(ELeave) RArray<TEvtEventId>();
+    
+    if(cnt)
+          {
+          iDisplayNote = EFalse;
+          EVTUIDEBUG1("CEvtMgmtUiStartupView::ChangeEventStatusL() selected items = %d", cnt );  
+          const CArrayFix<TInt>* evtarray = iContainer->MarkItems();          
+          TInt itemIndex = 0;             
+          for(index=0;index<cnt;index++)
+              {        
+              itemIndex = iContainer->FilteredIndex((*evtarray)[index]);
+              EVTUIDEBUG1("CEvtMgmtUiStartupView::ChangeEventStatusL() listboxindexid = %d", itemIndex);          
+              EVTUIDEBUG1("Changing status of event Event id = %u", EventId(itemIndex) );
+              
+              //retrieve event details from model
+              CEvtBasicEventInfo& event = iModel->EventFromModel(itemIndex);
+              
+              if( aStatus == EActive )
+                 {               
+                 //if manadatory fields are empty, display info note
+                 if( event.Subject().Compare(KNullDesC)==0 || event.Place().Compare(KNullDesC)==0 )
+                     {                    
+                     iDisplayNote  = ETrue;
+                     }
+                 else
+                     {
+                     //if event is not having state to which it is supposed to change 
+                     // then add it to id-list
+                     if( event.EventStatus() !=  aStatus )
+                         iEvtIdArray->Append( event.EventId() );
+                     }
+                  }  
+              else
+                  {
+                  //if event is not having state to which it is supposed to change 
+                  // then add it to id-list
+                  if( event.EventStatus() !=  aStatus )
+                      iEvtIdArray->Append( event.EventId() );
+                  }
+              }
+          if(iEvtIdArray->Count())
+              {
+              iEngine->SetEventsStateL( aStatus, iEvtIdArray );
+              }
+          else
+              {
+              iWaitState = EWaitDlgDestroy;
+              }
+          HandleCommandL(EAknUnmarkAll);
+          }
+     else
+          {
+           TInt currentItemIndex = iContainer->CurrentItemIndex();
+           if(aStatus == EActive)
+                {
+                if( iModel->EventFromModel(currentItemIndex).Subject().Compare(KNullDesC)==0 || 
+					iModel->EventFromModel(currentItemIndex).Place().Compare(KNullDesC)==0 )
+                    {                   
+                    
+                    HBufC* warningMsg = StringLoader::LoadLC( R_EVTUI_MANDATORYFIELDS_WARNING, iCoeEnv );
+                    CAknMessageQueryDialog* dlg = CAknMessageQueryDialog::NewL(*warningMsg);
+                    dlg->PrepareLC(R_EVTUI_MESSAGE_QUERY);
+                    dlg->RunLD();
+                    CleanupStack::PopAndDestroy(warningMsg);
+                    return;
+                    }
+                } 
+           iEvtIdArray->Append( EventId( currentItemIndex ) ); 
+           iEngine->SetEventsStateL(aStatus, iEvtIdArray  );
+          }
+    }
+
+// ---------------------------------------------------------------------------
+// void CEvtMgmtUiStartupView::ShowEvents
+// Show all events with given status
+// param[in] aStatusFilter - status filter to display events
+// ---------------------------------------------------------------------------
+//
+void CEvtMgmtUiStartupView::ShowEventsL( CEvtMgmtUiEngine::TEvtEventStatusFilter aStatusFilter )
+    {
+	iModel->SetCurrentItemId( iContainer->CurrentItemIndex() );
+	iModel->SetStatusFilter( aStatusFilter );
+    UpdateViewL();
+    }
+
+// ---------------------------------------------------------------------------
+// void CEvtMgmtUiStartupView::EnableMapFunctionalityL
+// Check wether map functionality can be disabled.
+// ret ETrue if map functionality should be enabled else EFalse
+// ---------------------------------------------------------------------------
+//
+TBool CEvtMgmtUiStartupView::EnableMapFunctionalityL( )
+    {
+    EVTUIDEBUG("+ CEvtMgmtUiStartupView::DisableMapFunctionality()" );
+    CEvtMgmtUiMapNavigationAdapter* map = CEvtMgmtUiMapNavigationAdapter::NewL();
+    CleanupStack::PushL(map);
+    //if no map service provider
+    if ( map->MapServiceProvidersL() == 0 ) 
+        {
+        CleanupStack::PopAndDestroy(); //map
+        EVTUIDEBUG("- CEvtMgmtUiStartupView::DisableMapFunctionality() EFalse" );
+        return EFalse;
+        }
+    
+    //Retrieve coordinate info
+    TCoordinate loc;
+    iEngine->RetrieveLocationL( iModel->EventId( iContainer->CurrentItemIndex() ), loc );        
+    CleanupStack::PopAndDestroy(); //map
+    
+    if( Math::IsNaN( loc.Latitude() ) || Math::IsNaN( loc.Latitude() )
+                                || loc.Latitude() == 0 || loc.Latitude() == 0 )
+        { //if loc is not defined or it is not coordinate based
+        EVTUIDEBUG("- CEvtMgmtUiStartupView::DisableMapFunctionality() EFalse" );
+        return EFalse;
+        }
+    else
+        {
+        EVTUIDEBUG("- CEvtMgmtUiStartupView::DisableMapFunctionality() ETrue" );
+        return ETrue;
+        }    
+    }
+
+// ---------------------------------------------------------------------------
+// void CEvtMgmtUiStartupView::DynInitMenuPaneL
+// ---------------------------------------------------------------------------
+//  
+void CEvtMgmtUiStartupView::DynInitMenuPaneL( TInt aResourceId, 
+                                              CEikMenuPane*  aMenuPane  )
+    {   
+    iContainer->HandleMarkableListDynInitMenuPane( aResourceId, aMenuPane );
+    
+    TInt index = iContainer->CurrentItemIndex();
+    TInt markItems = iContainer->NumberOfMarkedItems();
+    switch ( aResourceId )
+        {
+        case R_EVTMGMTUI_STARTUP_MAINVIEWMENU:
+        	{
+        	// Order is
+        	// 1. Marked
+        	// 2. Index
+        	// 3. Total Events 
+        	
+        	if(iContainer->NumberOfMarkedItems() == 0) // no item is marked
+        	    {
+            	//if no events then disable 'show'
+            	if( iModel->TotalEvents() )
+            	    {    
+            		TEvtEventsStatusMask mask = iModel->EventsStatus();   	    
+            	    
+            	    switch( mask )
+            	    	{
+            	    	case CEvtMgmtUiModel::EEvtShowAttributeActive:
+            	    	case CEvtMgmtUiModel::EEvtShowAttributeDraft:
+            	    	case CEvtMgmtUiModel::EEvtShowAttributeCompleted:
+          	        		aMenuPane->SetItemDimmed( EEvtMgmtUiEventUiEvtShow, ETrue ); 
+          	        		break;
+            	    	default:
+          	        		aMenuPane->SetItemDimmed( EEvtMgmtUiEventUiEvtShow, EFalse ); 
+            	    		break;	
+            	    	}     	        
+            	    }
+            	 else
+          	        aMenuPane->SetItemDimmed( EEvtMgmtUiEventUiEvtShow, ETrue ); 
+            	 	
+            	    
+            	//if focus on 'create event'
+    		    if( index == 0 )
+    			    {
+    				aMenuPane->SetItemDimmed( EEvtMgmtUiStartupViewOpen, ETrue );
+    				aMenuPane->SetItemDimmed( EEvtEditorCmdDelete, ETrue );
+    				aMenuPane->SetItemDimmed( EEvtEditorCmdActivate, ETrue ); 
+    				aMenuPane->SetItemDimmed( EEvtEditorCmdSaveDraft, ETrue );
+    				aMenuPane->SetItemDimmed(EEvtEditorCmdNavigateToPlace, ETrue);
+    				aMenuPane->SetItemDimmed(EEvtEditorCmdShowOnMap, ETrue);
+    			    }
+    			else
+    			    {
+    			    if( iModel->TotalEvents() ) //if events are present 
+    				    {
+    				    aMenuPane->SetItemDimmed( EEvtMgmtUiStartupViewOpen, EFalse );
+    					aMenuPane->SetItemDimmed( EEvtEditorCmdDelete, EFalse );
+    					aMenuPane->SetItemDimmed( EEvtEditorCmdActivate, EFalse );
+    					aMenuPane->SetItemDimmed( EEvtEditorCmdSaveDraft, EFalse );
+    					
+    					//change status
+                        switch(iModel->EventFromModel(index).EventStatus())
+                            {
+                            case EActive:
+                               {
+                               aMenuPane->SetItemDimmed( EEvtEditorCmdActivate, ETrue ); // State                          
+                               break;
+                               }
+                            case EDraft:
+                               {
+                               aMenuPane->SetItemDimmed( EEvtEditorCmdSaveDraft, ETrue ); // State
+                               if( !iModel->MandatoryFieldsFilled(index))
+                                   aMenuPane->SetItemDimmed( EEvtEditorCmdActivate, ETrue );    
+                               break;
+                               }
+                            default:                      
+                               break;
+                            }
+                        
+                        // if support for map functionality is there
+                       if( EnableMapFunctionalityL() )
+                            {
+                            aMenuPane->SetItemDimmed(EEvtEditorCmdNavigateToPlace, EFalse);
+                            aMenuPane->SetItemDimmed(EEvtEditorCmdShowOnMap, EFalse);
+                            }
+                        else
+                            {
+                            aMenuPane->SetItemDimmed(EEvtEditorCmdNavigateToPlace, ETrue);
+                            aMenuPane->SetItemDimmed(EEvtEditorCmdShowOnMap, ETrue);
+                            }
+    				    }
+    				else
+    					{
+    					aMenuPane->SetItemDimmed( EEvtMgmtUiStartupViewOpen, ETrue );
+    					aMenuPane->SetItemDimmed( EEvtEditorCmdDelete, ETrue );	
+    					aMenuPane->SetItemDimmed( EEvtEditorCmdActivate, ETrue ); 
+    					aMenuPane->SetItemDimmed( EEvtEditorCmdSaveDraft, ETrue );
+    					aMenuPane->SetItemDimmed(EEvtEditorCmdNavigateToPlace, ETrue);
+    					aMenuPane->SetItemDimmed(EEvtEditorCmdShowOnMap, ETrue);
+    					}
+    				} 
+        	    }
+        	else // if there are marked items
+        	    {
+        	    aMenuPane->SetItemDimmed( EEvtMgmtUiEventUiEvtShow, ETrue );
+        	    aMenuPane->SetItemDimmed( EEvtMgmtUiStartupViewCreate, ETrue );
+        	    aMenuPane->SetItemDimmed( EEvtMgmtUiStartupViewOpen, ETrue );   
+        	    aMenuPane->SetItemDimmed(EEvtEditorCmdNavigateToPlace, ETrue);
+        	    aMenuPane->SetItemDimmed(EEvtEditorCmdShowOnMap, ETrue);
+      	    
+        	    switch(MarkedEventsStatus())
+                    {
+                    case EMarkedEventsStatusDraft:
+                        {
+                        aMenuPane->SetItemDimmed( EEvtEditorCmdActivate, EFalse ); 
+                        aMenuPane->SetItemDimmed( EEvtEditorCmdSaveDraft, ETrue );
+                        }
+                        break;
+                    case EMarkedEventsStatusActive:
+                        {
+                        aMenuPane->SetItemDimmed( EEvtEditorCmdActivate, ETrue ); 
+                        aMenuPane->SetItemDimmed( EEvtEditorCmdSaveDraft, EFalse );
+                        }
+                        break;       
+                   case EMarkedEventsStatusCompleted:       
+                    default:
+                        {
+                        aMenuPane->SetItemDimmed( EEvtEditorCmdActivate, EFalse ); 
+                        aMenuPane->SetItemDimmed( EEvtEditorCmdSaveDraft, EFalse );
+                        }
+                        break;        
+                    }
+        	    }
+		   
+			 break;           
+             }
+        case R_EVTMGMTUI_STARTUP_EVTSHOWMENU:
+            {
+            TEvtEventsStatusMask mask = iModel->EventsStatus();
+           
+	        aMenuPane->SetItemDimmed( EEvtEditorCmdShowAll, EFalse );
+	        aMenuPane->SetItemDimmed( EEvtEditorCmdShowActive, EFalse );
+	        aMenuPane->SetItemDimmed( EEvtEditorCmdShowDrafts, EFalse );
+	        aMenuPane->SetItemDimmed( EEvtEditorCmdShowCompleted, EFalse );
+            
+            switch( iModel->StatusFilter() )
+            	{
+            	case CEvtMgmtUiEngine::EEvtFilterActive:
+	            	{
+			        aMenuPane->SetItemDimmed( EEvtEditorCmdShowActive, ETrue );
+            		break;
+	            	}
+            	case CEvtMgmtUiEngine::EEvtFilterDraft:
+	            	{
+			        aMenuPane->SetItemDimmed( EEvtEditorCmdShowDrafts, ETrue );
+            		break;
+	            	}
+                case CEvtMgmtUiEngine::EEvtFilterCompleted:
+                    {
+                    aMenuPane->SetItemDimmed( EEvtEditorCmdShowCompleted, ETrue );
+                    break;
+                    }
+            	case CEvtMgmtUiEngine::EEvtFilterAll:
+	            	{
+			        aMenuPane->SetItemDimmed( EEvtEditorCmdShowAll, ETrue );
+            		break;
+	            	}
+            	default:
+            		break;
+            	}
+            	
+        	if( !(mask & CEvtMgmtUiModel::EEvtShowAttributeActive) )
+              	aMenuPane->SetItemDimmed( EEvtEditorCmdShowActive, ETrue );
+            if( !(mask & CEvtMgmtUiModel::EEvtShowAttributeDraft) )
+              	aMenuPane->SetItemDimmed( EEvtEditorCmdShowDrafts, ETrue );
+            if( !(mask & CEvtMgmtUiModel::EEvtShowAttributeCompleted) )
+                aMenuPane->SetItemDimmed( EEvtEditorCmdShowCompleted, ETrue );         
+            
+            break;
+            }
+        case R_EVTMGMTUI_STARTUP_CHANGESTATUSMENU:
+            {
+
+            switch(MarkedEventsStatus())
+               {
+               case EMarkedEventsStatusDraft:
+                   {
+                   aMenuPane->SetItemDimmed( EEvtEditorCmdActivate, EFalse ); 
+                   aMenuPane->SetItemDimmed( EEvtEditorCmdSaveDraft, ETrue );
+                   }
+                   break;
+               case EMarkedEventsStatusActive:
+                   {
+                   aMenuPane->SetItemDimmed( EEvtEditorCmdActivate, ETrue ); 
+                   aMenuPane->SetItemDimmed( EEvtEditorCmdSaveDraft, EFalse );
+                   }
+                   break;       
+               case EMarkedEventsStatusCompleted:  
+               default:
+                   {
+                   aMenuPane->SetItemDimmed( EEvtEditorCmdActivate, EFalse ); 
+                   aMenuPane->SetItemDimmed( EEvtEditorCmdSaveDraft, EFalse );
+                   }
+                   break;        
+               }
+            }
+            break;     
+        case R_EVTMGMTUI_STARTUP_APPMENU:
+        	{
+			HandleHelpFeature(*aMenuPane);
+        	}
+			break; 
+		default:
+			break;
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// void CEvtMgmtUiStartupView::HandleHelpFeature
+// ---------------------------------------------------------------------------
+//      
+void CEvtMgmtUiStartupView::HandleHelpFeature( CEikMenuPane& aMenuPane ) const
+    {
+    // The Help menu item must be displayed only if the Feature is supported.
+    // If not, the Help item must be dimmed in the Options menu.
+    if ( FeatureManager::FeatureSupported( KFeatureIdHelp ))
+        {
+        aMenuPane.SetItemDimmed( EAknCmdHelp, EFalse );
+        }
+    else
+        {
+        aMenuPane.SetItemDimmed( EAknCmdHelp, ETrue );
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiStartupView::DeleteEventL()
+// It will delete event from database
+// ---------------------------------------------------------------------------
+//
+void CEvtMgmtUiStartupView::DeleteEventL()
+    { 
+    TInt cnt = iContainer->NumberOfMarkedItems();
+    TInt index; 
+    if(iEvtIdArray)
+        iEvtIdArray->Reset();
+    else
+        iEvtIdArray = new(ELeave) RArray<TEvtEventId>();
+    if(cnt)
+        {
+        EVTUIDEBUG1("CEvtMgmtUiStartupView::DeleteEventL() selected items = %d", cnt );  
+
+        const CArrayFix<TInt>* evtarray = iContainer->MarkItems();  
+        for(index=0;index<cnt;index++)
+            {        
+            TInt orginalIndex = iContainer->FilteredIndex((*evtarray)[index]);
+            EVTUIDEBUG1("CEvtMgmtUiStartupView::DeleteEventL() listboxindexid = %d", orginalIndex );          
+            EVTUIDEBUG1("Deleting event Event id = %d", EventId( orginalIndex ) );
+            iEvtIdArray->Append( EventId( orginalIndex ) );
+            }
+        iEngine->DeleteEventsL( iEvtIdArray );
+        }
+    else
+        {
+        index = iContainer->CurrentItemIndex();
+        EVTUIDEBUG1("CEvtMgmtUiStartupView::DeleteEventL() listboxindexid = %d", index );          
+        if(index==KErrNotFound)
+            return;        
+        EVTUIDEBUG1("Deleting event Event id = %d", EventId(index) );
+        iEvtIdArray->Append( EventId( index ) );
+        iEngine->DeleteEventsL( iEvtIdArray );   
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CEvtMgmtUiEditorCmdHandler::DisplayConfirmationQueryDlg()
+// It shows confirmation query dialog
+// -----------------------------------------------------------------------------
+//
+TBool CEvtMgmtUiStartupView::DisplayConfirmationQueryDlgL( const TDesC& aMsg )
+    {
+    TBool response= EFalse;
+    CAknQueryDialog* confirmationQuery = CAknQueryDialog::NewL();     
+    response = confirmationQuery->ExecuteLD(R_EVTUI_CONFIRMATION_QUERY, aMsg);         
+    return response;
+    }
+    
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiStartupView::UpdateViewL()
+// It will update view
+// ---------------------------------------------------------------------------
+//
+void CEvtMgmtUiStartupView::UpdateViewL( )
+    {     
+    TInt index = iModel->UpdatedCurrentItemIndex( );
+    
+    iContainer->UpdateListBoxL( index );
+    
+    HandleCmdL( EListBoxItemFocused );
+    
+    if(iModel->TotalEvents())
+       MenuBar()->SetMenuTitleResourceId ( R_EVTMGMTUI_STARTUP_MENUBAR_MARK );
+    else
+       MenuBar()->SetMenuTitleResourceId ( R_EVTMGMTUI_STARTUP_MENUBAR );
+    }
+	
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiStartupView::HandleCmdL()
+// Derived from MEvtMgmtUiEditorExitCmdHandler
+// ---------------------------------------------------------------------------
+//
+void CEvtMgmtUiStartupView::HandleCmdL( TEvtMgmtUiCmd aCommand )
+	{
+
+    switch( aCommand )
+        {
+        // Handle any plug-in specific internal commands here
+        case EListBoxItemDoubleClicked:
+            {
+            if( iContainer->NumberOfMarkedItems() )
+                {
+                TRAPD( err, MenuBar()->TryDisplayContextMenuBarL() );
+                User::LeaveIfError( err );  
+                }
+            else
+                {
+    			TInt index = iContainer->CurrentItemIndex();
+    			if(index>0)
+    				{
+    				HandleCommandL(EEvtMgmtUiStartupViewOpen);
+    				}
+    			else
+    			    {
+                    HandleCommandL(EEvtMgmtUiStartupViewCreate);
+                    }		
+                }
+			break;
+            }
+        case EListBoxItemFocused:
+        		{
+        		if(iIsEmbeddedApp)
+        		    {
+        		    if(iContainer->NumberOfMarkedItems())       
+        		        {
+        		        MenuBar()->SetContextMenuTitleResourceId( R_EVTMGMTUI_STARTUP_CONTEXTMENUBAR );
+        		        SetCba(R_EVTMGMTUI_STARTUP_CBA_OPTIONS_EMBEDDED);
+        		        }
+        		    else
+        		        {
+        	        	if( 0 == iContainer->CurrentItemIndex() )    	        	    
+        	        		SetCba(R_EVTMGMTUI_STARTUP_CBA_EMBEDDED);    	        	    
+        	        	else
+        	        	    SetCba(R_EVTMGMTUI_STARTUP_CBA_OPEN_EMBEDDED);
+        		        }
+        		    }
+        		else
+        		    {
+        		    if(iContainer->NumberOfMarkedItems())
+        		        {        		       
+        		        MenuBar()->SetContextMenuTitleResourceId( R_EVTMGMTUI_STARTUP_CONTEXTMENUBAR );        		                 
+                        SetCba(R_EVTMGMTUI_STARTUP_CBA_OPTIONS);
+        		        }
+                    else
+                        {
+            		    if( 0 == iContainer->CurrentItemIndex() )                     
+                            SetCba(R_EVTMGMTUI_STARTUP_CBA);                        
+                        else
+                            SetCba(R_EVTMGMTUI_STARTUP_CBA_OPEN);
+                        }
+        		    }
+	        	break;
+	        	}
+        case EScreenSizeChanged:
+            {
+            if( iContainer )
+                {
+                iContainer->SetRect( ClientRect());     
+                }
+            break;
+            }
+        case EListBoxItemDeleted:
+            {
+            HandleCommandL( EEvtEditorCmdDelete );
+            break;
+            }
+        case EListBoxFilterCountChanged:
+            {
+            if( iContainer->FilteredCount() > 1 )
+               MenuBar()->SetMenuTitleResourceId ( R_EVTMGMTUI_STARTUP_MENUBAR_MARK );
+            else
+               MenuBar()->SetMenuTitleResourceId ( R_EVTMGMTUI_STARTUP_MENUBAR );
+            break;
+            }
+        default:
+            {
+            break;  
+            }
+        }
+	}
+
+// -----------------------------------------------------------------------------
+// CEvtMgmtUiStartupView::SetCba
+// -----------------------------------------------------------------------------
+//
+void CEvtMgmtUiStartupView::SetCba( TInt aResourceId ) 
+	{
+	if( Cba() )
+	    {
+	   	TRAP_IGNORE(Cba()->SetCommandSetL(aResourceId));
+	    }
+	Cba()->DrawDeferred(); 
+	}
+		
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiStartupView::EventIdOfCurrentItem()
+// It will return the event-id of the selected item 
+// ---------------------------------------------------------------------------
+//
+TEvtEventId CEvtMgmtUiStartupView::EventIdOfCurrentItem()
+    {
+    TInt index = iContainer->CurrentItemIndex();
+    return iModel->EventId( index );
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiStartupView::EventId()
+// It will return the event id of event
+// ---------------------------------------------------------------------------
+//
+TEvtEventId CEvtMgmtUiStartupView::EventId( TInt aIndex )
+    {     
+    return iModel->EventId( aIndex );
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiStartupView::MarkedEventsStatus()
+// It will return type of marked events
+// ---------------------------------------------------------------------------
+//
+TInt CEvtMgmtUiStartupView::MarkedEventsStatus()
+    {
+    TInt index=0;
+    TInt cnt = iContainer->NumberOfMarkedItems();
+    const CArrayFix<TInt>* evtarray = iContainer->MarkItems();  
+    
+    TInt orginalIndex = iContainer->FilteredIndex((*evtarray)[index]);
+    TMarkedEventsStatus status = static_cast<TMarkedEventsStatus>(iModel->EventStatus(orginalIndex));
+    for( index = 1; index<cnt; index++ )
+        {
+        orginalIndex = iContainer->FilteredIndex((*evtarray)[index]);
+        if( status != iModel->EventStatus( orginalIndex ) )
+            { 
+            return EMarkedEventsStatusMix;            
+            }
+        }
+    return status;    
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiStartupView::NotifyEventChangeL()
+// Derived from MEvtMgmtUiEngineObserver
+// ---------------------------------------------------------------------------
+//
+void CEvtMgmtUiStartupView::NotifyEventChangeL(TInt aErrorCode, TInt aState )
+    {
+    if( aErrorCode == KErrServerTerminated || 
+        aErrorCode == KErrServerBusy ||
+        aErrorCode == KErrNotReady ||
+        aErrorCode == KErrNoMemory || aErrorCode == KErrDiskFull )
+        {
+	    TPtrC buf;
+    	CTextResolver* textResolver = CTextResolver::NewLC(*iCoeEnv);
+    	buf.Set(textResolver->ResolveErrorString(aErrorCode));
+    	
+	    CAknErrorNote* dialog = 
+	        new(ELeave)CAknErrorNote(ETrue);    
+	    dialog->SetTone(CAknNoteDialog::EErrorTone);
+	    dialog->ExecuteLD( buf ); 
+    	
+    	CleanupStack::PopAndDestroy( textResolver );
+    	
+        EVTUIDEBUG("Exiting application as server is not ready." );
+        // The User has exited the application using the Exit option from
+        //.Options menu.  But, thats possible only if we exit the application
+        // with EAknCmdExit.
+        // A bit of convoluted logic but needed because we are using the
+        // same components for the Settings UI Server as well as LC.
+        
+        CEikonEnv* env = CEikonEnv::Static();
+       	CEikAppServer* server = env->AppServer();
+		if ( server )
+			{
+			server->NotifyServerExit( EAknCmdExit );
+			}
+	    CAknAppUi* appUi = static_cast< CAknAppUi* >( env->AppUi());
+	    appUi->RunAppShutter();  
+        return;
+        }
+
+    if( aState == CEvtMgmtUiLbtAdapter::ELbtAdapterDelete || 
+		aState == CEvtMgmtUiLbtAdapter::ELbtAdapterDeleteTriggers || 
+		aState == CEvtMgmtUiLbtAdapter::ELbtAdapterSetTriggersState  || 
+		aState == CEvtMgmtUiLbtAdapter::ELbtAdapterSetTriggerState )
+        {
+        EVTUIDEBUG1("+ CEvtMgmtUiStartupView::NotifyEventChangeL error =%d", aErrorCode ); 
+           
+        iWaitState = EWaitDlgDestroy;
+        if(aErrorCode != KErrNone && aErrorCode != KErrCancel)
+            {
+            TBuf<32> err;
+            err.Copy(_L("Error ="));
+            err.AppendNum( aErrorCode );
+            CEikonEnv::Static()->AlertWin(err);
+            }      
+            
+        EVTUIDEBUG("- CEvtMgmtUiStartupView::NotifyEventChangeL");
+        }
+	
+
+    if( aState == CEvtMgmtUiLbtAdapter::ELbtAdapterSetTriggersState  || 
+		aState == CEvtMgmtUiLbtAdapter::ELbtAdapterSetTriggerState ||
+    	aState == CEvtMgmtUiLbtAdapter::ELbtAdapterCreate  || 
+		aState == CEvtMgmtUiLbtAdapter::ELbtAdapterUpdate ||
+    	aState == CEvtMgmtUiLbtAdapter::ELbtAdapterDelete  || 
+		aState == CEvtMgmtUiLbtAdapter::ELbtAdapterDeleteTriggers )
+		{
+        if( iModel && iContainer )
+        	{
+    		iModel->SetCurrentItemId( iContainer->CurrentItemIndex() );
+    		if( !( aState == CEvtMgmtUiLbtAdapter::ELbtAdapterDelete  || 
+					aState == CEvtMgmtUiLbtAdapter::ELbtAdapterDeleteTriggers ) )
+				{
+    			iModel->SetStatusFilter( CEvtMgmtUiEngine::EEvtFilterAll ); 
+				}
+        	}
+		}
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtMgmtUiStartupView::NotifyModelChangeL()
+// Derived from MEvtMgmtUiEngineObserver
+// ---------------------------------------------------------------------------
+//
+void CEvtMgmtUiStartupView::NotifyModelChangeL()
+    {
+	iEngine->UpdateModelL(iModel->EventsArray(), CEvtMgmtUiEngine::EEvtFilterAll );
+	iModel->UpdateEventsStatus( );
+    UpdateViewL( ); 
+    }    
+
+// ---------------------------------------------------------------------------
+// void CEvtMgmtUiStartupView::StartWaitDialogL
+// ---------------------------------------------------------------------------
+//  
+void CEvtMgmtUiStartupView::StartWaitDialogL()
+    {    
+    HBufC* waitText = NULL;
+    TInt cnt = iContainer->NumberOfMarkedItems();
+    if(cnt>1)
+        {
+        if( iWaitState == EWaitDlgLaunchToDelete )
+            waitText = StringLoader::LoadLC(R_LOCEV_NOTE_MULTIPLEEVT_DELETE, CEikonEnv::Static() );
+        if(  iWaitState == EWaitDlgLaunchToChangeStatus && iEvtStatus == EActive )
+            waitText = StringLoader::LoadLC(R_LOCEV_NOTE_MULTIPLEEVT_ACTIVATE, CEikonEnv::Static() );
+        if(  iWaitState == EWaitDlgLaunchToChangeStatus && iEvtStatus == EDraft )
+            waitText = StringLoader::LoadLC(R_LOCEV_NOTE_MULTIPLEEVT_DRAFT, CEikonEnv::Static() );
+        }
+    else
+        {
+        if( iWaitState == EWaitDlgLaunchToDelete )
+            waitText = StringLoader::LoadLC(R_LOCEV_NOTE_SINGLEEVT_DELETE, CEikonEnv::Static() );
+        if(  iWaitState == EWaitDlgLaunchToChangeStatus && iEvtStatus == EActive )
+            waitText = StringLoader::LoadLC(R_LOCEV_NOTE_SINGLEEVT_ACTIVATE, CEikonEnv::Static() );
+        if(  iWaitState == EWaitDlgLaunchToChangeStatus && iEvtStatus == EDraft )
+            waitText = StringLoader::LoadLC(R_LOCEV_NOTE_SINGLEEVT_DRAFT, CEikonEnv::Static() );
+        }
+    
+    CAknWaitNoteWrapper* waitNoteWrapper = CAknWaitNoteWrapper::NewL();
+	// Required reinterpret_cast as CAknWaitNoteWrapper inherits privately from CActive
+    CleanupStack::PushL(reinterpret_cast<CBase*>(waitNoteWrapper)); 
+	
+	// This is a blocking call, remember the wrapper isn't a dialog, so it doesn't need the 
+	// EEikDialogFlagWait flag to make it blocking 
+    waitNoteWrapper->ExecuteL(R_EVTMGMTUI_WAITDLG_CANCEL, *this, *waitText, ETrue); // this is a blocking call, remember the wrapper isn't a dialog, so it doesn't need the EEikDialogFlagWait flag to make it blocking 
+       
+    CleanupStack::PopAndDestroy(2); //waitText, waitNoteWrapper
+    	
+  	if(iDisplayNote )
+      {
+      iDisplayNote = EFalse;
+      HBufC* warningMsg = StringLoader::LoadLC( R_EVTUI_MANDATORYFIELDS_WARNING, iCoeEnv );
+      CAknMessageQueryDialog* dlg = CAknMessageQueryDialog::NewL( *warningMsg );
+      dlg->PrepareLC(R_EVTUI_MESSAGE_QUERY);
+      dlg->RunLD();
+      CleanupStack::PopAndDestroy(warningMsg); 
+      }
+    }
+
+// ---------------------------------------------------------------------------
+// void CEvtMgmtUiStartupView::DialogDismissedL
+// ---------------------------------------------------------------------------
+//  
+void CEvtMgmtUiStartupView::DialogDismissedL(TInt aButtonId)
+    {   
+    if(aButtonId == EEikBidCancel)
+        iEngine->CancelRequest();// Cancel
+    }
+
+// ---------------------------------------------------------------------------
+// void CEvtMgmtUiStartupView::IsProcessDone
+// ---------------------------------------------------------------------------
+//  
+TBool CEvtMgmtUiStartupView::IsProcessDone() const
+    {
+    if(iWaitState == EWaitDlgDestroy)
+        return ETrue;
+    else
+        return EFalse;
+    }
+
+// ---------------------------------------------------------------------------
+// void CEvtMgmtUiStartupView::ProcessFinished
+// ---------------------------------------------------------------------------
+//  
+void CEvtMgmtUiStartupView::ProcessFinished()
+    {      
+    }
+
+// ---------------------------------------------------------------------------
+// void CEvtMgmtUiStartupView::StepL
+// ---------------------------------------------------------------------------
+//  
+void CEvtMgmtUiStartupView::StepL()
+    {
+    if(iWaitState == EWaitDlgLaunchToDelete)
+        {
+        iWaitState = EWaitDlgInitiateProcess;
+        DeleteEventL();        
+        }
+    if(iWaitState == EWaitDlgLaunchToChangeStatus)
+        {
+        iWaitState = EWaitDlgInitiateProcess;
+        ChangeEventStatusL(iEvtStatus);        
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// void CEvtMgmtUiStartupView::StepL
+// ---------------------------------------------------------------------------
+// 
+TInt CEvtMgmtUiStartupView::CycleError(TInt aError)
+	{ 
+	if(aError != KErrNone)
+		{
+		CEikonEnv::Static()->AlertWin(KWaitCycleError());
+		iWaitState = EWaitDlgDestroy;
+		}
+	return KErrNone; 
+	}
+	
+// End of File
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventsutils/bwins/evtutilsu.def	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,33 @@
+EXPORTS
+	?SetShowSnooze@CEvtInfoNoteInputParam@@QAEXH@Z @ 1 NONAME ; void CEvtInfoNoteInputParam::SetShowSnooze(int)
+	?SetToneEnabled@CEvtInfoNoteInputParam@@QAEXH@Z @ 2 NONAME ; void CEvtInfoNoteInputParam::SetToneEnabled(int)
+	?Subject@CEvtInfoNoteInputParam@@QBE?AVTPtrC16@@XZ @ 3 NONAME ; class TPtrC16 CEvtInfoNoteInputParam::Subject(void) const
+	?MaintainState@CEvtKeyLockHandler@@QAEXXZ @ 4 NONAME ; void CEvtKeyLockHandler::MaintainState(void)
+	?ToneEnabled@CEvtInfoNoteInputParam@@QBEHXZ @ 5 NONAME ; int CEvtInfoNoteInputParam::ToneEnabled(void) const
+	?SetDescriptionL@CEvtInfoNoteInputParam@@QAEXABVTDesC16@@@Z @ 6 NONAME ; void CEvtInfoNoteInputParam::SetDescriptionL(class TDesC16 const &)
+	?TrigerringAccuracy@CEvtInfoNoteInputParam@@QBE?AW4TEvtTriggerAccuracy@1@XZ @ 7 NONAME ; enum CEvtInfoNoteInputParam::TEvtTriggerAccuracy CEvtInfoNoteInputParam::TrigerringAccuracy(void) const
+	?NewL@CEvtKeyLockHandler@@SAPAV1@XZ @ 8 NONAME ; class CEvtKeyLockHandler * CEvtKeyLockHandler::NewL(void)
+	?UpdateStateWithoutNote@CEvtKeyLockHandler@@QAEXXZ @ 9 NONAME ; void CEvtKeyLockHandler::UpdateStateWithoutNote(void)
+	?ToneRepeat@CEvtInfoNoteInputParam@@QBEHXZ @ 10 NONAME ; int CEvtInfoNoteInputParam::ToneRepeat(void) const
+	?PlayFileL@CEvtTonePlayer@@QAEXABV?$TBuf@$0BAA@@@HH@Z @ 11 NONAME ; void CEvtTonePlayer::PlayFileL(class TBuf<256> const &, int, int)
+	??1CEvtKeyLockHandler@@UAE@XZ @ 12 NONAME ; CEvtKeyLockHandler::~CEvtKeyLockHandler(void)
+	?CreateDir@@YAXXZ @ 13 NONAME ; void CreateDir(void)
+	?UpdateStateWithNote@CEvtKeyLockHandler@@QAEXXZ @ 14 NONAME ; void CEvtKeyLockHandler::UpdateStateWithNote(void)
+	?SetToneRepeat@CEvtInfoNoteInputParam@@QAEXH@Z @ 15 NONAME ; void CEvtInfoNoteInputParam::SetToneRepeat(int)
+	?NewLC@CEvtTonePlayer@@SAPAV1@AAVMEvtTonePlayObserver@@@Z @ 16 NONAME ; class CEvtTonePlayer * CEvtTonePlayer::NewLC(class MEvtTonePlayObserver &)
+	?ShowSnooze@CEvtInfoNoteInputParam@@QBEHXZ @ 17 NONAME ; int CEvtInfoNoteInputParam::ShowSnooze(void) const
+	?EnableKeyLock@CEvtKeyLockHandler@@QAEXH@Z @ 18 NONAME ; void CEvtKeyLockHandler::EnableKeyLock(int)
+	?Debug@@YAXV?$TRefByValue@$$CBVTDesC16@@@@ZZ @ 19 NONAME ; void Debug(class TRefByValue<class TDesC16 const >, ...)
+	?Description@CEvtInfoNoteInputParam@@QBE?AVTPtrC16@@XZ @ 20 NONAME ; class TPtrC16 CEvtInfoNoteInputParam::Description(void) const
+	?StopPlayingL@CEvtTonePlayer@@QAEXH@Z @ 21 NONAME ; void CEvtTonePlayer::StopPlayingL(int)
+	?SetTrigerringAccuracy@CEvtInfoNoteInputParam@@QAEXW4TEvtTriggerAccuracy@1@@Z @ 22 NONAME ; void CEvtInfoNoteInputParam::SetTrigerringAccuracy(enum CEvtInfoNoteInputParam::TEvtTriggerAccuracy)
+	?ExternalizeL@CEvtInfoNoteInputParam@@QAEXAAVRWriteStream@@@Z @ 23 NONAME ; void CEvtInfoNoteInputParam::ExternalizeL(class RWriteStream &)
+	?NewL@CEvtInfoNoteInputParam@@SAPAV1@XZ @ 24 NONAME ; class CEvtInfoNoteInputParam * CEvtInfoNoteInputParam::NewL(void)
+	??1CEvtTonePlayer@@UAE@XZ @ 25 NONAME ; CEvtTonePlayer::~CEvtTonePlayer(void)
+	?Tone@CEvtInfoNoteInputParam@@QBE?AVTPtrC16@@XZ @ 26 NONAME ; class TPtrC16 CEvtInfoNoteInputParam::Tone(void) const
+	?SetToneL@CEvtInfoNoteInputParam@@QAEXABVTDesC16@@@Z @ 27 NONAME ; void CEvtInfoNoteInputParam::SetToneL(class TDesC16 const &)
+	?InternalizeL@CEvtInfoNoteInputParam@@QAEXAAVRReadStream@@@Z @ 28 NONAME ; void CEvtInfoNoteInputParam::InternalizeL(class RReadStream &)
+	?SetSubjectL@CEvtInfoNoteInputParam@@QAEXABVTDesC16@@@Z @ 29 NONAME ; void CEvtInfoNoteInputParam::SetSubjectL(class TDesC16 const &)
+	?NewL@CEvtTonePlayer@@SAPAV1@AAVMEvtTonePlayObserver@@@Z @ 30 NONAME ; class CEvtTonePlayer * CEvtTonePlayer::NewL(class MEvtTonePlayObserver &)
+	?NewLC@CEvtKeyLockHandler@@SAPAV1@XZ @ 31 NONAME ; class CEvtKeyLockHandler * CEvtKeyLockHandler::NewLC(void)
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventsutils/eabi/evtutilsu.def	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,33 @@
+EXPORTS
+	_Z5Debug11TRefByValueIK7TDesC16Ez @ 1 NONAME
+	_Z9CreateDirv @ 2 NONAME
+	_ZN14CEvtTonePlayer12StopPlayingLEi @ 3 NONAME
+	_ZN14CEvtTonePlayer4NewLER20MEvtTonePlayObserver @ 4 NONAME
+	_ZN14CEvtTonePlayer5NewLCER20MEvtTonePlayObserver @ 5 NONAME
+	_ZN14CEvtTonePlayer9PlayFileLERK4TBufILi256EEii @ 6 NONAME
+	_ZN18CEvtKeyLockHandler13EnableKeyLockEi @ 7 NONAME
+	_ZN18CEvtKeyLockHandler13MaintainStateEv @ 8 NONAME
+	_ZN18CEvtKeyLockHandler19UpdateStateWithNoteEv @ 9 NONAME
+	_ZN18CEvtKeyLockHandler22UpdateStateWithoutNoteEv @ 10 NONAME
+	_ZN18CEvtKeyLockHandler4NewLEv @ 11 NONAME
+	_ZN18CEvtKeyLockHandler5NewLCEv @ 12 NONAME
+	_ZN22CEvtInfoNoteInputParam11SetSubjectLERK7TDesC16 @ 13 NONAME
+	_ZN22CEvtInfoNoteInputParam12ExternalizeLER12RWriteStream @ 14 NONAME
+	_ZN22CEvtInfoNoteInputParam12InternalizeLER11RReadStream @ 15 NONAME
+	_ZN22CEvtInfoNoteInputParam13SetShowSnoozeEi @ 16 NONAME
+	_ZN22CEvtInfoNoteInputParam13SetToneRepeatEi @ 17 NONAME
+	_ZN22CEvtInfoNoteInputParam14SetToneEnabledEi @ 18 NONAME
+	_ZN22CEvtInfoNoteInputParam15SetDescriptionLERK7TDesC16 @ 19 NONAME
+	_ZN22CEvtInfoNoteInputParam21SetTrigerringAccuracyENS_19TEvtTriggerAccuracyE @ 20 NONAME
+	_ZN22CEvtInfoNoteInputParam4NewLEv @ 21 NONAME
+	_ZN22CEvtInfoNoteInputParam8SetToneLERK7TDesC16 @ 22 NONAME
+	_ZNK22CEvtInfoNoteInputParam10ShowSnoozeEv @ 23 NONAME
+	_ZNK22CEvtInfoNoteInputParam10ToneRepeatEv @ 24 NONAME
+	_ZNK22CEvtInfoNoteInputParam11DescriptionEv @ 25 NONAME
+	_ZNK22CEvtInfoNoteInputParam11ToneEnabledEv @ 26 NONAME
+	_ZNK22CEvtInfoNoteInputParam18TrigerringAccuracyEv @ 27 NONAME
+	_ZNK22CEvtInfoNoteInputParam4ToneEv @ 28 NONAME
+	_ZNK22CEvtInfoNoteInputParam7SubjectEv @ 29 NONAME
+	_ZTI22CEvtInfoNoteInputParam @ 30 NONAME
+	_ZTV22CEvtInfoNoteInputParam @ 31 NONAME
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventsutils/group/bld.inf	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,40 @@
+/*
+* 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:  Utility functions for Events UI
+*
+*/
+
+#include <platform_paths.hrh> // For the APP_LAYER_LOC_EXPORT_PATH
+
+// Projects platforms
+PRJ_PLATFORMS
+DEFAULT
+
+// Project exports
+PRJ_EXPORTS
+../inc/evtinfonoteparams.h   		 |../../inc/evtinfonoteparams.h
+../inc/evtdebug.h	                 |../../inc/evtdebug.h 
+../inc/evtdebugconfig.hrh	         |../../inc/evtdebugconfig.hrh 
+../inc/evttoneplayer.h	             |../../inc/evttoneplayer.h 
+../inc/evtutilsconsts.h	             |../../inc/evtutilsconsts.h
+../inc/evtkeylockhandler.h	         |../../inc/evtkeylockhandler.h
+../inc/evtprofilehandler.h	         |../../inc/evtprofilehandler.h
+../inc/evtcallhandler.h	             |../../inc/evtcallhandler.h
+
+// Project MMP files
+PRJ_MMPFILES
+evtutils.mmp
+
+// Project test exports
+PRJ_TESTEXPORTS
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventsutils/group/evtutils.mmp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,64 @@
+/*
+* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Project definition file for project Events UI Utils
+*
+*/
+
+
+// System Includes
+#include <data_caging_paths.hrh>
+#include <platform_paths.hrh> // For the APP_LAYER_SYSTEMINCLUDE
+
+// User Includes
+#include "../inc/evtutilsuid.hrh"
+
+TARGET                  evtutils.dll
+TARGETTYPE              DLL
+UID                     0x101FDFAE KEvtUtilsUid
+
+CAPABILITY              ALL -TCB
+VENDORID                VID_DEFAULT
+
+USERINCLUDE		        . 
+USERINCLUDE		        ../inc
+
+// System Include
+APP_LAYER_SYSTEMINCLUDE
+
+SOURCEPATH              ../src         
+SOURCE                  evtinfonoteparams.cpp
+SOURCE 			        evtenginedebug.cpp
+SOURCE                  evttoneplayer.cpp
+SOURCE                  evtprofilehandler.cpp
+SOURCE                  evttoneutils.cpp
+SOURCE                  evtcallhandler.cpp
+SOURCE                  evtkeylockhandler.cpp
+
+LIBRARY 		        euser.lib
+LIBRARY                 estor.lib bafl.lib efsrv.lib
+LIBRARY                 flogger.lib
+LIBRARY                 apgrfx.lib apmime.lib CAF.lib
+LIBRARY                 avkon.lib               // Key lock
+LIBRARY         		centralrepository.lib   // CRepository
+LIBRARY 				CenRepNotifHandler.lib	// CRepository Handler
+LIBRARY                 DrmAudioPlayUtility.lib	// DRM Player
+LIBRARY                 HWRMVibraClient.lib		// Vibra Settings
+LIBRARY                 mediaclientaudio.lib	// Audio Player
+LIBRARY                 etel3rdparty.lib		// Telephony
+
+#if defined(WINS)
+ deffile   ../bwins/evtutils.def
+#elif defined(EABI)
+ deffile   ../eabi/evtutils.def
+#endif 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventsutils/inc/evtcallhandler.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,148 @@
+/*
+* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Incoming Call Handler.
+*
+*/
+
+
+#ifndef C_EVTCALLHANDLER_H
+#define C_EVTCALLHANDLER_H
+
+// System Includes
+#include <e32base.h>
+#include <etel3rdparty.h>
+
+//Forward Declaration
+
+// Class Definition
+/**
+ *  Interface class to observe for an incoming call.
+ *
+ *  @lib 
+ *  @since S60 v9.1
+ */
+class MEvtCallObserver
+    {
+public:	    
+    /**
+     * This will notify when there is an incoming call.            
+     */
+    virtual void HandleIncomingCallL( )=0;
+
+    };
+    
+/**
+ *  Adapter class to observe for an incoming Call.
+ *  This class listens for an incoming call and notifies
+ *  the observer(MEvtCallObserver).
+ *
+ *  @lib 
+ *  @since S60 v9.1
+ */
+NONSHARABLE_CLASS( CEvtCallHandler ): public CActive
+{
+public:
+    /**
+     * Constructs a new instance of Call Handler.
+     *
+     * @return The new instance of Call Handler object.
+     * @leave System wide error code if the object creation fails.         
+     */
+    static CEvtCallHandler* NewL( MEvtCallObserver& aObserver );
+    
+    /**
+     * Constructs a new instance of Call Handler.
+     * Leaves the created instance on the cleanup stack.
+     *
+     * @return The new instance of Call Handler object.
+     * @leave System wide error code if the object creation fails.         
+     */
+    static CEvtCallHandler* NewLC( MEvtCallObserver& aObserver );  
+
+    /**
+    * Destructor.
+    */
+    virtual ~CEvtCallHandler();
+
+public:  // Public Functions	
+
+	    /**
+	     * Starts listening for the incoming calls.
+	     */
+	    void StartListening();
+
+        /**
+        * Check if there is any outstanding call.
+        * @param TBool Returns ETrue if a call is active.
+        */
+        TBool IsCallActive( );
+
+        /**
+        * Check if there is any incoming call.
+        * @param TBool Returns ETrue if there is an incoming call.
+        */
+        TBool IsCallIncoming( );
+        
+private: 
+    /**
+     * From CActive
+     */
+    void RunL();
+ 
+    /**
+     * From CActive
+     */
+    TInt RunError(TInt anError);
+ 
+    /**
+     * From CActive
+     */
+    void DoCancel();
+    
+    /**
+     * Default C++ Constructor.
+     */
+	CEvtCallHandler( MEvtCallObserver& aObserver );
+
+    /**
+     * Second phase of the two phase constructor.
+     */
+    void ConstructL();
+
+private: // data
+
+	/**
+	 * Incoming Call Observer.
+	 */
+	 MEvtCallObserver& iObserver;
+
+	/**
+	 * CTelephony handle.
+	 * Own
+	 */
+     CTelephony* iTelephony;
+
+	/**
+	 * Call status
+	 */
+     CTelephony::TCallStatusV1 iCallStatus;
+
+	/**
+	 * Package for Call status
+	 */
+     CTelephony::TCallStatusV1Pckg iCallStatusPkg;
+	 
+};
+
+#endif C_EVTCALLHANDLER_H
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventsutils/inc/evtdebug.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,76 @@
+/*
+* 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:  Debug File.
+*
+*/
+
+
+#ifndef _EVTDEBUG_H_
+#define _EVTDEBUG_H_
+
+// INCLUDES
+#include <e32std.h>
+#include "evtdebugconfig.hrh"
+
+// MACROS
+#define DEBUG(TEXT) 				 { \
+									  _LIT( KText, #TEXT ); \
+									   Debug(KText); \
+									 }
+									 
+#define EVTUI(TEXT, ARG1) 			 { \
+									   _LIT( KText, #TEXT ); \
+									   Debug( KText, (ARG1) ); \
+									 }
+									 
+#define EVTUI2(TEXT, ARG1, ARG2) 		 { \
+									   _LIT( KText, #TEXT ); \
+									   Debug( KText,(ARG1), (ARG2) ); \
+									 }
+									 
+#define EVTUI3(TEXT, ARG1, ARG2, ARG3) { \
+									   _LIT( KText, #TEXT ); \
+									   Debug( KText, (ARG1), (ARG2), (ARG3) ); \
+									 }
+
+IMPORT_C void CreateDir();
+
+IMPORT_C void Debug( TRefByValue<const TDesC> aText, ...);
+
+/**
+* By using component specific debug macros unnecessary 
+* debug prints can be avoided. 
+* Also component specific debugging is possible by compiling 
+* only certain components when EVTUI_ENABLE_DEBUG_PRINT is defined.
+*/
+
+#ifdef EVTUI_ENABLE_DEBUG_PRINT
+
+#define CREATELOGDIR()						 { CreateDir();};									 
+#define EVTUIDEBUG(TEXT)                     DEBUG(TEXT);
+#define EVTUIDEBUG1(TEXT, ARG1)              EVTUI(TEXT, ARG1);
+#define EVTUIDEBUG2(TEXT, ARG1, ARG2)        EVTUI2(TEXT, ARG1, ARG2);
+#define EVTUIDEBUG3(TEXT, ARG1, ARG2, ARG3)  EVTUI3(TEXT, ARG1, ARG2, ARG3);
+
+#else
+
+#define CREATELOGDIR()						 ;
+#define EVTUIDEBUG(TEXT)                     ;
+#define EVTUIDEBUG1(TEXT, ARG1)              ;
+#define EVTUIDEBUG2(TEXT, ARG1, ARG2)        ;
+#define EVTUIDEBUG3(TEXT, ARG1, ARG2, ARG3)  ;
+
+#endif
+
+#endif // _EVTDEBUG_H_
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventsutils/inc/evtdebugconfig.hrh	Wed Sep 01 12:31:27 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:  This is the main build-time configuration file of Events Ui
+*
+*/
+
+
+#ifndef EVTUICONFIG_HRH_
+#define EVTUICONFIG_HRH_
+
+//  INCLUDES
+
+// Flags for development:
+
+
+// Defined EVTUI_ENABLE_DEBUG_PRINT flag enables debug prints to a file.
+
+#define EVTUI_ENABLE_DEBUG_PRINT
+
+#endif // EVTUICONFIG_HRH_
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventsutils/inc/evtinfonoteparams.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,266 @@
+/*
+* 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:  Exchange parameters for exchange between the Events UI server
+*                Event Info Note pop-up
+*
+*/
+
+
+#ifndef C_EVTINFONOTEPARAMS_H
+#define C_EVTINFONOTEPARAMS_H
+
+// System Includes
+#include <e32base.h>
+#include <s32strm.h>
+
+// User Includes
+
+// Forward Declarations
+
+/**
+ * Input paramters for Events UI info note display
+ *
+ * This class provides the Internalize and Externalize functionalities
+ * for the input parameters in Events UI info display. The parameters
+ * currently contain
+ * 1. The Name of the trigger
+ * 2. Detailed description of the trigger
+ * 3. Trigerring accuracy
+ * 4. Tone String
+ * 5. Tone Repeat Flag
+ * 6. Tone Enable Flag
+ * 7. Snooze Flag
+ *
+ * @since S60 v9.1
+ */
+class CEvtInfoNoteInputParam : public CBase
+    {
+public:
+    /**
+     * Enumeration to define the accuracy of the fired triggers
+     * @since S60 v9.1      
+     */
+    enum TEvtTriggerAccuracy
+        {
+        /**
+         * Enum value for an accurate trigger
+         */
+        EEvtAccurateTrigger = 0,
+         
+        /**
+         * Enum value for an inaccurate trigger
+         */
+        EEvtInaccurateTrigger, 
+        /**
+         * Enum value for a heavily inaccurate trigger
+         */
+        EEvtHighlyInaccurateTrigger
+        };
+        	
+public:
+    /**
+     * Static two phase constructor
+     * @since S60 v9.1      
+     */
+    IMPORT_C static CEvtInfoNoteInputParam* NewL();
+    
+    /**
+     * Destructor.
+     * @since S60 v9.1     
+     */
+    virtual ~CEvtInfoNoteInputParam();
+    
+    /**
+     * Retrieves the subject/name field for the trigger.
+     *
+     * @since S60 v9.1     
+     * @return, The subject/name of the trigger
+     */      
+    IMPORT_C TPtrC Subject() const;
+    
+    /**
+     * Sets the subject/name field for the trigger.
+     *
+     * @since S60 v5.0     
+     * @param aSubject The subject/name of the trigger.
+     */     
+    IMPORT_C void SetSubjectL( const TDesC&  aSubject );    
+
+    /**
+     * Retrieves the Description field for the trigger.
+     *
+     * @since S60 v9.1     
+     * @return, The Description of the trigger
+     */      
+    IMPORT_C TPtrC Description() const;
+    
+    /**
+     * Sets the Description field for the trigger.
+     *
+     * @since S60 v9.1    
+     * @param aDescripion The Description of the trigger.
+     */     
+    IMPORT_C void SetDescriptionL( const TDesC&  aDescription );
+    
+     /**
+     * The accuracy with which the trigger has been fired.
+     *
+     * @since S60 v9.1     
+     * @return Triggering Accuracy      
+     */
+    IMPORT_C TEvtTriggerAccuracy TrigerringAccuracy() const;
+
+    /** 
+     * Sets the Mode in which the Location Application would be launched.
+     *
+     * @since S60 v9.1    
+     * @param[in] aAccuracy Triggering Accuracy
+     */
+    IMPORT_C void SetTrigerringAccuracy( TEvtTriggerAccuracy  aAccuracy );
+        
+    /**
+     * Externalizes the contents of this Array into a buffer.
+     *
+     * @since S60 v5.0
+     * @param aWriteStream  Buffer onto which the contents of this structure
+     *                      would be externalized.
+     */
+    IMPORT_C void ExternalizeL( RWriteStream&   aWriteStream );
+   
+    /**
+     * Internalized the contents of the buffer into this array.
+     * 
+     * @since S60 v5.0
+     * @param aReadStream   Buffer from which the contents of this
+     *                      structures would be populated.
+     */
+    IMPORT_C void InternalizeL( RReadStream&    aReadStream );
+    
+    /**
+     * Retrieves the Tone field for the trigger.
+     *
+     * @since S60 v9.1     
+     * @return, The Tone of the trigger
+     */      
+    IMPORT_C TPtrC Tone() const;
+    
+    /**
+     * Sets the Tone field for the trigger.
+     *
+     * @since S60 v9.1    
+     * @param aDescripion The Tone of the trigger.
+     */     
+    IMPORT_C void SetToneL( const TDesC&  aDescription );
+    
+    /**
+     * Tone Repeatition 
+     *
+     * @since S60 v9.1     
+     * @return Boolean value to indicate whether tone is to be repeated
+     */
+    IMPORT_C TBool  ToneRepeat() const;
+
+    /** 
+     * Tone Repeatition 
+     *
+     * @since S60 v9.1    
+     * @param[in] aRepeat Boolean value to indicate whether tone is to be repeated
+     */
+    IMPORT_C void SetToneRepeat( TBool  aRepeat );      
+    
+    /**
+     * Tone Enabled 
+     *
+     * @since S60 v9.1     
+     * @return Boolean value to indicate whether tone is enabled
+     */
+    IMPORT_C TBool  ToneEnabled() const;
+
+    /** 
+     * Tone Enabled 
+     *
+     * @since S60 v9.1    
+     * @param[in] aRepeat Boolean value to indicate whether tone is enabled
+     */
+    IMPORT_C void SetToneEnabled( TBool  aRepeat );   
+    
+    /**
+     * Show Snooze 
+     *
+     * @since S60 v9.1     
+     * @return Boolean value to indicate whether snooze is shown
+     */
+    IMPORT_C TBool  ShowSnooze() const;
+
+    /** 
+     * Show Snooze 
+     *
+     * @since S60 v9.1    
+     * @param[in] aSnooze Boolean value to indicate whether snooze is shown
+     */
+    IMPORT_C void SetShowSnooze( TBool  aSnooze );   
+    	                
+protected:
+    /**
+     * C++ constructor made protected for this class must not be instantiated
+     * directly
+     */
+    CEvtInfoNoteInputParam();
+    
+    /**
+     * Second phase of the two phase constructor
+     */
+    void ConstructL();
+            
+private:  // Data members
+    /**
+     * Buffer which holds the Subject/Name field of the trigger
+     * Owns
+     */
+    HBufC*                      iSubject;
+    
+    /**
+     * Buffer which holds the Description field of the trigger
+     * Owns
+     */
+    HBufC*                      iDescription;
+    
+    /**
+     * Tone field for the trigger. If there is expectation that no tone
+     * must be played, then this can be left empty
+     */
+    HBufC*                      iTone;
+    
+    /**
+     * Boolean value to denote whether the tone is to be repeated.
+     */
+    TBool                       iToneRepeat;
+    
+    /**
+     * Boolean value to denote whether the tone is enabled.
+     */
+    TBool                       iToneEnabled;
+    
+    /**
+     * Enum value for the Trigger accuracy
+     */
+    TEvtTriggerAccuracy         iAccuracy;
+    
+    /**
+     * Boolean value to show Snooze.
+     */
+    TBool                       iShowSnooze;
+    };
+
+#endif // C_EVTINFONOTEPARAMS_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventsutils/inc/evtkeylockhandler.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,105 @@
+/*
+* 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:  Key Lock Settings Handler.
+*
+*/
+
+
+#ifndef C_EVTKEYLOCKHANDLER_H
+#define C_EVTKEYLOCKHANDLER_H
+
+// System Includes
+#include <e32base.h>
+#include <aknkeylock.h> 
+    
+/**
+ *  Interface class to maintain Key Lock Settings.
+ *
+ *  @lib 
+ *  @since S60 v9.1
+ */
+NONSHARABLE_CLASS( CEvtKeyLockHandler ): public CBase
+{
+public:
+    /**
+     * Constructs a new instance of Key Lock Handler.
+     *
+     * @return The new instance of Key Lock Handler object.
+     * @leave System wide error code if the object creation fails.         
+     */
+    IMPORT_C static CEvtKeyLockHandler* NewL( );
+    
+    /**
+     * Constructs a new instance of Key Lock Handler.
+     * Leaves the created instance on the cleanup stack.
+     *
+     * @return The new instance of Key Lock Handler object.
+     * @leave System wide error code if the object creation fails.         
+     */
+    IMPORT_C static CEvtKeyLockHandler* NewLC( );  
+
+    /**
+    * Destructor.
+    */
+    IMPORT_C virtual ~CEvtKeyLockHandler();
+
+public:  // Public Functions	
+
+        /**
+        * Maintains the Current State of Key Lock - Lock or Unlock.
+        */
+        IMPORT_C void MaintainState( );
+
+        /**
+        * Set the Flag to Enable or Diable the Key Lock.
+        * @param TBool Flag to Enable/Diable the Key Lock.
+        */
+        IMPORT_C void EnableKeyLock( TBool aFlag );
+
+        /**
+        * Update the updated state of Key Lock With Note - Lock or Unlock.
+        */
+        IMPORT_C void UpdateStateWithNote( );
+
+        /**
+        * Update the updated state of Key Lock Without Note - Lock or Unlock.
+        */
+        IMPORT_C void UpdateStateWithoutNote( );
+
+private: 
+
+    /**
+     * Default C++ Constructor.
+     */
+	CEvtKeyLockHandler( );
+
+    /**
+     * Second phase of the two phase constructor.
+     */
+    void ConstructL();
+
+private: // data
+
+	/**
+	 * Handle to Key Lock Settings.
+	 */
+	 RAknKeylock2 iKeyLock;
+
+	/**
+	 * Key Lock Settings.
+	 */
+     TBool iKeyLocked;
+};
+
+#endif C_EVTKEYLOCKHANDLER_H
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventsutils/inc/evtprofilehandler.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,167 @@
+/*
+* 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:  Profile Settings Handler.
+*
+*/
+
+
+#ifndef C_EVTPROFILEHANDLER_H
+#define C_EVTPROFILEHANDLER_H
+
+// System Includes
+#include <e32base.h>
+#include <cenrepnotifyhandler.h>
+
+//Forward Declaration
+
+// Class Definition
+/**
+ *  Interface class to observe for profile settings change.
+ *
+ *  @lib 
+ *  @since S60 v9.1
+ */
+class MEvtProfileObserver
+    {
+public:	    
+    /**
+     * This will notify when there is a change in profile settings            
+     */
+    virtual void HandleProfileSettingsChange( )=0;
+
+    };
+    
+/**
+ *  Adapter class to get Profile Settings.
+ *  This class notifies any changes to Profile Settings if 
+ *  observer(MEvtProfileObserver) is set.
+ *
+ *  @lib 
+ *  @since S60 v9.1
+ */
+NONSHARABLE_CLASS( CEvtProfileHandler ): public CBase,
+										 public MCenRepNotifyHandlerCallback
+{
+public:
+    /**
+     * Constructs a new instance of Profile Handler.
+     *
+     * @return The new instance of Profile Handler object.
+     * @leave System wide error code if the object creation fails.         
+     */
+    static CEvtProfileHandler* NewL( MEvtProfileObserver& aObserver );
+    
+    /**
+     * Constructs a new instance of Profile Handler.
+     * Leaves the created instance on the cleanup stack.
+     *
+     * @return The new instance of Profile Handler object.
+     * @leave System wide error code if the object creation fails.         
+     */
+    static CEvtProfileHandler* NewLC( MEvtProfileObserver& aObserver );  
+
+    /**
+    * Destructor.
+    */
+    virtual ~CEvtProfileHandler();
+
+public:  // Public Functions	
+
+        /**
+        * Volume settings in the currently active profile.
+        * @return Volume value of the active profile.
+        */
+        TInt Volume( );
+
+        /**
+        * Check if the Ringtype is silent.
+        * @return ETrue if the ringing type is silent.
+        */
+        TBool IsSilentRingingType( );
+
+        /**
+        * Check if the Vibra settings is On/ff.
+        * @return ETrue if the Vibra is On in Active Profile.
+        */
+        TBool IsVibra( );
+
+private: 	// Methods derived from MCenRepNotifyHandlerCallback
+        void HandleNotifyInt(TUint32 aId, TInt aNewValue);
+
+private: 
+
+    /**
+     * Default C++ Constructor.
+     */
+	CEvtProfileHandler( MEvtProfileObserver& aObserver );
+
+    /**
+     * Second phase of the two phase constructor.
+     */
+    void ConstructL();
+
+private: // data
+
+	/**
+	 * Profile Settings change Observer.
+	 */
+	 MEvtProfileObserver& iObserver;
+
+	/**
+	 * Cenrep Session to Profile Settings.
+	 * Own
+	 */
+     CRepository* iProfileSession;
+
+	/**
+	 * Cenrep Session to Vibra Settings.
+	 * Own
+	 */
+     CRepository* iVibraSession;
+	 
+	/**
+	 * Handler to Cenrep Notifier
+	 * Own
+	 */
+	CCenRepNotifyHandler* iVolumeNotifyHandler;
+	 
+	/**
+	 * Handler to Cenrep Notifier
+	 * Own
+	 */
+	CCenRepNotifyHandler* iTypeNotifyHandler;
+	 
+	/**
+	 * Handler to Cenrep Notifier
+	 * Own
+	 */
+	CCenRepNotifyHandler* iVibraNotifyHandler;
+	
+	/**
+	 * Profile Volume Settings.
+	 */
+	TInt iRingingVolume;
+	
+	/**
+	 * Profile Ringing Type Settings.
+	 */
+	TInt iRingingType;
+	
+	/**
+	 * Profile Vibra Settings.
+	 */
+	TInt iVibra;
+};
+
+#endif C_EVTPROFILEHANDLER_H
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventsutils/inc/evttoneplayer.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,250 @@
+/*
+* 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:  File Player Utility.
+*
+*/
+
+
+#ifndef C_EVTTONEPLAYER_H
+#define C_EVTTONEPLAYER_H
+
+// System Includes
+#include <e32base.h>
+#include <DrmAudioSamplePlayer.h>
+#include <mdaaudiotoneplayer.h>
+#include <mda/common/controller.h>
+
+// User Includes
+#include "evtprofilehandler.h"
+#include "evtcallhandler.h"
+
+//Forward Declaration
+class CEvtProfileHandler;
+
+// Class Definition
+/**
+ *  Interface class to observe for completion of tone playing.
+ *
+ *  @lib 
+ *  @since S60 v9.1
+ */
+class MEvtTonePlayObserver
+    {
+public:
+    /**
+     * This will notify the tone Player observer on the completion
+     * of tone play.
+     * @param aTimeout Boolean value to indicate if the tone play 
+	 * was complete due to timeout.             
+     */
+    virtual void TonePlayCompleteL( TBool aTimeout )=0;
+
+    };
+    
+/**
+ *  Interface class to play an Audio File.
+ *  This class allows for an audio file to be played. 
+ *  This class also allows for monitoring any incoming calls and
+ *  give the priority for the incoming call tone.
+ *
+ *  @lib 
+ *  @since S60 v9.1
+ */
+NONSHARABLE_CLASS( CEvtTonePlayer ): public CBase, public MDrmAudioPlayerCallback,
+													 public MMdaAudioToneObserver,
+													 public MEvtProfileObserver,
+													 public MEvtCallObserver
+{
+public:
+    /**
+     * Constructs a new instance of Tone Player.
+     *
+     * @return The new instance of Tone Player object.
+     * @leave System wide error code if the object creation fails.         
+     */
+    IMPORT_C static CEvtTonePlayer* NewL( MEvtTonePlayObserver& aObserver );
+    
+    /**
+     * Constructs a new instance of Tone Player.
+     * Leaves the created instance on the cleanup stack.
+     *
+     * @return The new instance of Tone Player object.
+     * @leave System wide error code if the object creation fails.         
+     */
+    IMPORT_C static CEvtTonePlayer* NewLC( MEvtTonePlayObserver& aObserver );  
+
+    /**
+    * Destructor.
+    */
+    IMPORT_C virtual ~CEvtTonePlayer();
+
+public:  // Public Functions	
+    /**
+     * Initializes the player to play an audio file.
+     *
+     * @since S60 v9.1  
+     * @param[in] aAudioFileName Audio file name
+     * @param[in] aLoop Audio Loop for playing
+     * @param[in] aTimeInterval Time Interval for playing in Seconds
+     * @leave KErrNotFound If the file does not exist.
+     */
+	IMPORT_C void PlayFileL( const TFileName& aAudioFileName, 
+				TBool aLoop, TInt aTimeInterval );
+	
+    /**
+     * Stops the currently playing audio file.
+     *
+     * @since S60 v9.1  
+     * @param[in] aAudioFileName Audio file name
+     */
+	IMPORT_C void StopPlayingL( TBool aTimeout );
+
+private: // From MDrmAudioPlayerCallback
+    /**
+     * Framework will notify you the end of the playback by a call to
+     * MapcPlayComplete().
+     */
+	void MdapcPlayComplete( TInt aError );
+	
+    /**
+     * Framework will notify you the end of the initalizing of a player
+     * file by a call to MdapcInitComplete().
+     */
+	void MdapcInitComplete( TInt aError, 
+							const TTimeIntervalMicroSeconds& aDuration );
+							
+private: // from MMdaAudioToneObserver
+    /**
+     * Framework will notify you at the end of prepare is completed
+     */
+    void MatoPrepareComplete(TInt aError);
+    
+    /**
+     * Framework will notify you the end of the playback.
+     */
+    void MatoPlayComplete(TInt aError);
+							
+private: // from MEvtProfileObserver
+    void HandleProfileSettingsChange( );
+    
+    // from MEvtCallObserver
+    void HandleIncomingCallL( );
+
+private: 
+    
+    /**
+     * Start the Timer.
+     */
+	void StartTimerL( TInt aTimeInterval );
+    
+    /**
+     * Stop the Timer.
+     */
+	void StopTimer();
+    
+    /**
+     * Stop the playing file.
+     */
+	void Stop();
+	
+    /**
+     * Called when timer is expired
+     */
+    static TInt TickL( TAny* aObject );
+
+    /**
+     * Set volume between zero and player's maximum volume
+     */    
+    TInt PlayerVolume(TInt aPlayerMaxVol, TInt aVol);
+    
+    /**
+     * Default C++ Constructor.
+     */
+	CEvtTonePlayer( MEvtTonePlayObserver& aObserver );
+
+    /**
+     * Second phase of the two phase constructor.
+     */
+    void ConstructL();
+
+private: // Enums
+	/**
+	 * @enum TState
+	 * Player State.
+	 *
+	 */
+	enum TState
+	    {
+	    /**
+	     * Player State for Not Ready.
+	     */
+	    ENotReady                            = 1,
+	    /**
+	     * Player State for Ready.
+	     */
+	    EReady                               = 2,
+	    /**
+	     * Player State for Playing.
+	     */
+	    EPlaying                             = 3,
+	    /**
+	     * Player State for Stop.
+	     */
+	    EStop                                = 4
+	    };
+
+private: // data
+
+	/**
+	 * Tone Player Observer.
+	 */
+	 MEvtTonePlayObserver& iObserver;
+	 
+	/**
+	 * DRM Player instance.
+	 * Own:
+	 */
+	CMdaAudioToneUtility* iTonePlayer;
+	 
+	/**
+	 * DRM Player instance.
+	 * Own:
+	 */
+	CDrmPlayerUtility* iAudioPlayer;
+	 
+	/**
+	 * Profile Handler instance.
+	 * Own:
+	 */
+	CEvtProfileHandler* iProfileHandler;
+	 
+	/**
+	 * Call Handler instance.
+	 * Own:
+	 */
+	CEvtCallHandler* iCallHandler;
+	
+	/**
+	 * Periodic Timer active object.
+	 * Own:
+	 */
+	CPeriodic* iTimer; 
+	
+	/**
+	 * Audio Player State.
+	 */
+	TState iPlayerState;
+};
+
+#endif C_EVTTONEPLAYER_H
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventsutils/inc/evttoneutils.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,63 @@
+/*
+* 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:  Tone/File Utility.
+*
+*/
+
+
+#ifndef EVTTONEUTILS_H
+#define EVTTONEUTILS_H
+
+// System Includes
+#include <e32base.h>
+// Class Definition
+    
+/**
+ *  Static Utility class for Tone/File.
+ *
+ *  @lib 
+ *  @since S60 v9.1
+ */
+class EvtToneUtils
+    {
+
+    public: // new functions
+        
+        /**
+         * Check if File Exist
+         * return ETrue if the file exist
+         */
+		static TBool IsExistL( const TDesC& aFileName );
+		
+        /**
+         * Check for Tone Type
+         * return ETrue if the file is RNG Type
+         */
+        static TBool IsRNGTypeL( const TDesC& aFileName );
+        
+        /**
+         * Check if File is Playable(Non DRM protected)
+         * return ETrue if the file is playable
+         */
+		static TBool IsFilePlayableL( const TDesC& aFileName );
+        
+        /**
+         * Get the Data Type
+         * return the Data Type
+         */
+		static TDataType DataTypeL( const TDesC& aFileName );
+
+    };
+
+#endif EVTTONEUTILS_H
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventsutils/inc/evtutilsconsts.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,33 @@
+/*
+* 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:  Constants for Utils
+*
+*/
+
+
+#ifndef EVTUTILSCONSTS_H
+#define EVTUTILSCONSTS_H
+
+// Sound files
+    // Sequence for silent call ringing tone. Don't touch these sequence.
+    _LIT8( KPhoneNoSoundSequence, "\x00\x11\x0A\x05\xFC\x0A\x08\x40\x32\x0A\
+\xF7\x40\x64\x06\x0B" );
+
+    // Sequence for beep call ringing tone. Don't touch these sequence.
+    _LIT8( KPhoneBeepSequence, "\x00\x11\x0A\x0A\x08\x73\x0A\x40\x28\x0A\xF7\
+\x05\xFC\x40\x64\x0A\x08\x40\x32\x0A\xF7\x06\x0B" );
+
+#endif      // EVTUTILSCONSTS_H
+
+// End of File
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventsutils/inc/evtutilsuid.hrh	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,26 @@
+/*
+* 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:  Events UI Utils UID definition
+*
+*/
+
+#ifndef EVTUTILSUID_HRH
+#define EVTUTILSUID_HRH
+
+/**
+ * UID Defintion for Events UI Utility library
+ */
+#define KEvtUtilsUid 0x2001E666
+
+#endif // EVTUTILSUID_HRH
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventsutils/src/evtcallhandler.cpp	Wed Sep 01 12:31:27 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:  Incoming Call Handler.
+*
+*/
+
+
+// System Includes
+#include <ctsydomainpskeys.h>
+#include <e32property.h>
+
+// User Includes
+#include "evtcallhandler.h"
+#include "evtdebug.h"
+
+// ================ Member funtions for CEvtCallHandler class ===============
+
+// ---------------------------------------------------------------------------
+// CEvtCallHandler::CEvtCallHandler
+// ---------------------------------------------------------------------------
+//
+CEvtCallHandler::CEvtCallHandler( MEvtCallObserver& aObserver ): 
+									CActive(EPriorityStandard),
+									iObserver(aObserver),
+    								iCallStatusPkg(iCallStatus)
+    {
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtCallHandler::~CEvtCallHandler
+// ---------------------------------------------------------------------------
+//
+CEvtCallHandler::~CEvtCallHandler()
+	{
+    Cancel();
+ 
+    if (iTelephony)
+        delete iTelephony;
+	}
+	
+// ---------------------------------------------------------------------------
+// CEvtCallHandler::NewL
+// ---------------------------------------------------------------------------
+//
+CEvtCallHandler* CEvtCallHandler::NewL( MEvtCallObserver& aObserver )
+    {
+	CEvtCallHandler* self = NewLC( aObserver );
+	CleanupStack::Pop( self );
+	return self;
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtCallHandler::NewLC
+// ---------------------------------------------------------------------------
+//
+CEvtCallHandler* CEvtCallHandler::NewLC( MEvtCallObserver& aObserver )
+    {
+	CEvtCallHandler* self = new ( ELeave )CEvtCallHandler( aObserver );
+	CleanupStack::PushL( self );
+	self->ConstructL( );
+	return self;
+    } 
+
+// ---------------------------------------------------------------------------
+// CEvtCallHandler::ConstructL
+// ---------------------------------------------------------------------------
+//
+void CEvtCallHandler::ConstructL()
+    {
+    EVTUIDEBUG( "+ CEvtCallHandler::ConstructL()" );
+    
+    iTelephony = CTelephony::NewL();
+ 
+    CActiveScheduler::Add(this);
+	
+	StartListening();
+	
+    EVTUIDEBUG( "- CEvtCallHandler::ConstructL()" );
+    }
+    
+// ---------------------------------------------------------------------------
+// CEvtCallHandler::RunL
+// ---------------------------------------------------------------------------
+//
+void CEvtCallHandler::RunL()
+    {
+    if (iStatus == KErrNone)
+        {
+        CTelephony::TCallStatus status = iCallStatus.iStatus;
+ 
+        switch (status)
+            {
+            case CTelephony::EStatusRinging:
+                {
+                // The phone is ringing.
+                iObserver.HandleIncomingCallL();
+                break;
+                }
+            default:
+                {
+                // Not interested in other events.
+                break;
+                }
+            }
+        // Start listening for the next call
+        StartListening();
+        }
+    }
+    
+// ---------------------------------------------------------------------------
+// CEvtCallHandler::RunError
+// ---------------------------------------------------------------------------
+//
+TInt CEvtCallHandler::RunError(TInt anError)
+    {
+    return anError;
+    }
+    
+// ---------------------------------------------------------------------------
+// CEvtCallHandler::DoCancel
+// ---------------------------------------------------------------------------
+//
+void CEvtCallHandler::DoCancel()
+    {
+    iTelephony->CancelAsync(CTelephony::EVoiceLineStatusChangeCancel);
+    }
+    
+// ---------------------------------------------------------------------------
+// CEvtCallHandler::StartListening
+// ---------------------------------------------------------------------------
+//
+void CEvtCallHandler::StartListening()
+    {
+    iTelephony->NotifyChange(iStatus, CTelephony::EVoiceLineStatusChange,
+            iCallStatusPkg);
+    SetActive();
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtCallHandler::IsCallActive
+// ---------------------------------------------------------------------------
+//
+TBool CEvtCallHandler::IsCallActive( )
+	{
+    TInt callActiveState = EPSCTsyCallTypeNone;
+
+    // Get current call status from P&S
+    const TInt errCode( RProperty::Get(
+        KPSUidCtsyCallInformation,
+        KCTsyCallType,
+        callActiveState ) );
+
+    // Check current call type
+    TBool result(
+        ( EPSCTsyCallTypeCSVoice == callActiveState ) &&
+        ( KErrNone == errCode ) );
+        
+    EVTUIDEBUG1( "= CEvtCallHandler::IsCallActive() - %d", result );
+
+    return result;
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtCallHandler::IsCallIncoming
+// ---------------------------------------------------------------------------
+//
+TBool CEvtCallHandler::IsCallIncoming( )
+	{
+    TInt callActiveState = EPSCTsyCallStateNone;
+
+    // Get current call status from P&S
+    const TInt errCode( RProperty::Get(
+        KPSUidCtsyCallInformation,
+        KCTsyCallState,
+        callActiveState ) );
+
+    const TBool callIncoming(
+        ( EPSCTsyCallStateAlerting == callActiveState ) ||
+        ( EPSCTsyCallStateRinging == callActiveState ) );
+
+    // Check current call status
+    TBool result( callIncoming && ( KErrNone == errCode ) );
+        
+    EVTUIDEBUG1( "= CEvtCallHandler::IsCallIncoming() - %d", result );
+    
+    return result;
+    }
+    
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventsutils/src/evtenginedebug.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,127 @@
+/*
+* 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:  Debug File.
+*
+*/
+
+
+
+// INCLUDE FILES
+#include "evtdebug.h"
+#include <flogger.h>
+#include <e32svr.h>
+#include <f32file.h>
+#include <bautils.h>
+// CONSTANTS
+
+/// Folder where the log resides
+_LIT( KEvtLogFolder, "epos" );
+
+/// The name of the log file
+_LIT( KEvtLogFileName, "eventsui[%S].txt" );
+
+/// Events App Name
+_LIT( KEvtLogAppFileName, "evtmgmtui" );
+
+/// Handler App Name
+_LIT( KEvtLogHanlderFileName, "evthandler" );
+
+/// The format in which the time is formatted in log
+_LIT( KEvtLogTimeFormat, "%02d.%02d:%02d:%06d ");
+
+/// The length of the string produced by KLocLogTimeFormat
+const TInt KEvtLogTimeFormatLength = 16;
+
+/// How many characters a log line can contain
+const TInt KEvtLogLineLength = 256;
+
+/// Length of the Log file name.
+const TInt KEvtLogFileLength = 32;
+
+// ========================== OTHER EXPORTED FUNCTIONS =========================
+
+
+
+// -----------------------------------------------------------------------------
+// Debug
+// Generates a log file if c:\logs\epos\ folder exists
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void Debug( TRefByValue<const TDesC> aText, ... )
+    {    
+    VA_LIST args;
+    VA_START( args, aText );
+    
+    TBuf<KEvtLogLineLength> buf;
+    buf.FormatList( aText, args );
+
+    #ifdef _DEBUG
+    RDebug::Print(buf);
+    #endif
+
+	RProcess currentProcess;
+	TParse parser;
+	TBuf<KEvtLogFileLength> name;
+	
+	parser.Set( currentProcess.FileName(), NULL, NULL );
+	TPtrC filename( parser.Name() );
+	
+	if( !filename.Compare( KEvtLogAppFileName() ) )
+		name.Format(KEvtLogFileName(), &filename);
+	else
+		name.Format(KEvtLogFileName(), &KEvtLogHanlderFileName() );
+	
+    RFileLogger logger;
+    
+    TInt ret=logger.Connect();
+    if (ret==KErrNone)
+        {
+        logger.SetDateAndTime( EFalse,EFalse );
+        logger.CreateLog( KEvtLogFolder, name, EFileLoggingModeAppend );       
+        TBuf<KEvtLogTimeFormatLength> timeStamp;
+        TTime now;
+        now.HomeTime();
+        TDateTime dateTime;
+        dateTime = now.DateTime();
+        timeStamp.Format( KEvtLogTimeFormat, 
+            dateTime.Hour(), dateTime.Minute(),
+            dateTime.Second(), dateTime.MicroSecond() );
+        buf.Insert( 0, timeStamp );
+
+        logger.Write(buf);
+        }
+
+    logger.Close();
+
+    VA_END( args );
+    }
+    
+// -----------------------------------------------------------------------------
+// CreateDir
+// Create a log Directory
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CreateDir()
+	{
+	_LIT( KEvtLogFolderPath, "C:\\logs\\epos\\" );
+    RFs fsSession;
+	TRAP_IGNORE(fsSession.Connect());
+	if(!BaflUtils::FolderExists(fsSession, KEvtLogFolderPath()))
+		{
+		fsSession.MkDir( KEvtLogFolderPath() );
+		}
+    fsSession.Close();
+	}
+	
+//  End of File  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventsutils/src/evtinfonoteparams.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,394 @@
+/*
+* 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:  Exchange parameters for exchange between the Events UI server
+*                Event Info Note pop-up
+*
+*/
+
+
+// System Includes
+
+// User Includes
+#include "evtinfonoteparams.h"
+
+// Constant function defintions
+
+//
+// ------------------------- Member Function definition ----------------------
+
+// ----------------------------------------------------------
+// CEvtInfoNoteInputParam::CEvtInfoNoteInputParam()
+// ----------------------------------------------------------
+//
+CEvtInfoNoteInputParam::CEvtInfoNoteInputParam()
+    {
+    }
+
+// ----------------------------------------------------------
+// CEvtInfoNoteInputParam::~CEvtInfoNoteInputParam()
+// ----------------------------------------------------------
+//
+CEvtInfoNoteInputParam::~CEvtInfoNoteInputParam()
+    {
+    // Delete the Subject field
+    delete iSubject;
+    
+    // Delete the Description field
+    delete iDescription;
+    
+    // Delete the Tone field
+    delete iTone;  
+    }
+
+// ----------------------------------------------------------
+// void CEvtInfoNoteInputParam::ConstructL()
+// ----------------------------------------------------------
+//    
+void CEvtInfoNoteInputParam::ConstructL()
+    {
+    }
+
+// ----------------------------------------------------------
+// CEvtInfoNoteInputParam* CEvtInfoNoteInputParam::NewL()
+// ----------------------------------------------------------
+//
+EXPORT_C CEvtInfoNoteInputParam* CEvtInfoNoteInputParam::NewL()
+    {
+    CEvtInfoNoteInputParam* self = new ( ELeave ) CEvtInfoNoteInputParam;
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+// ---------------------------------------------------------------------------
+// TPtrC CEvtInfoNoteInputParam::Subject
+// ---------------------------------------------------------------------------
+//
+EXPORT_C TPtrC CEvtInfoNoteInputParam::Subject() const
+    {
+    // Check whether the subject exists, incase it doesnt exist then
+    // return a NULL string else return Subject.
+    if ( iSubject )
+        {
+        return *iSubject;
+        }
+    else
+        {
+        return TPtrC();
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// void CEvtInfoNoteInputParam::SetSubjectL
+// ---------------------------------------------------------------------------
+//
+EXPORT_C void CEvtInfoNoteInputParam::SetSubjectL( const TDesC&   aSubject )
+    {   
+    delete iSubject;
+    iSubject = NULL;
+    
+    // Copy the subject data from the allocated string
+    iSubject = aSubject.AllocL();
+    }
+    
+// ---------------------------------------------------------------------------
+// TPtrC CEvtInfoNoteInputParam::Description
+// ---------------------------------------------------------------------------
+//
+EXPORT_C TPtrC CEvtInfoNoteInputParam::Description() const
+    {
+    // Check whether the description exists, incase it doesnt exist then
+    // return a NULL string else return description.
+    if ( iDescription )
+        {
+        return *iDescription;
+        }
+    else
+        {
+        return TPtrC();
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// void CEvtInfoNoteInputParam::SetDescriptionL
+// ---------------------------------------------------------------------------
+//
+EXPORT_C void CEvtInfoNoteInputParam::SetDescriptionL( const TDesC&   aDescription )
+    {   
+    TInt KMaxDescriptionLength      = 256;
+    TInt length = ( aDescription.Length()) > KMaxDescriptionLength ? KMaxDescriptionLength : aDescription.Length();
+
+    delete iDescription;
+    iDescription = NULL;
+    iDescription = HBufC::NewL( length );
+
+    iDescription->Des().Copy( aDescription.Ptr(), length );
+    }    
+
+// ---------------------------------------------------------------------------
+// TUint32 CEvtInfoNoteInputParam::TrigerringAccuracy
+// ---------------------------------------------------------------------------
+//
+EXPORT_C CEvtInfoNoteInputParam::TEvtTriggerAccuracy 
+                    CEvtInfoNoteInputParam::TrigerringAccuracy() const
+    {
+    return iAccuracy;
+    }
+
+// ---------------------------------------------------------------------------
+// void CEvtInfoNoteInputParam::SetTrigerringAccuracy
+// ---------------------------------------------------------------------------
+//
+EXPORT_C void CEvtInfoNoteInputParam::SetTrigerringAccuracy( 
+                    CEvtInfoNoteInputParam::TEvtTriggerAccuracy  aAccuracy )
+    {
+    iAccuracy = aAccuracy;
+    }
+    
+// ---------------------------------------------------------------------------
+// void CEvtInfoNoteInputParam::ExternalizeL
+// ---------------------------------------------------------------------------
+//
+EXPORT_C void CEvtInfoNoteInputParam::ExternalizeL( RWriteStream&   aWriteStream )
+    {
+    // The format for packing the buffer would be as follows
+    // Trigger Accuracy | SubjectLength | Subject | DescriptionLength | Description
+    //
+    // where
+    // Trigger Accuracy     - The accuracy of the trigger which is fired
+    // SubjectLength        - The Length of the subject field
+    // Subject              - Subject
+    // DescriptionLength    - The Length of the description field
+    // Description          - Description field
+    // Snooze Shown        	- Snnoze field
+    // Tone Enabled        	- Tone Enabled field
+    // ToneLength    		- The Length of the Tone field
+    // Tone         		- Tone field
+    // Tone Repeat        	- Tone Repeat field
+    
+    // First pack the Trigger accuracy
+        
+    aWriteStream.WriteUint32L( iAccuracy );
+        
+    // Pack the length of the subject data. If there is no subject
+    // data then pack zero.
+    TUint length = 0;
+    if ( iSubject )
+        {
+        length = iSubject->Length();
+        }
+    aWriteStream.WriteUint32L( length );
+    
+    // If there is a valid subject field pack it onto the buffer.
+    if ( length )
+        {
+        aWriteStream.WriteL( iSubject->Des(), length );
+        }
+    
+    // Pack the length of the description data. If there is no description
+    // data then pack zero.
+    length = 0;
+    if ( iDescription )
+        {
+        length = iDescription->Length();
+        }
+    aWriteStream.WriteUint32L( length );
+    
+    // If there is a valid description field pack it onto the buffer.
+    if ( length )
+        {
+        aWriteStream.WriteL( iDescription->Des(), length );
+        }
+    
+    // Write the show snooze field
+    aWriteStream.WriteUint32L( iShowSnooze );
+    
+    // Write the tone enabled field
+    aWriteStream.WriteUint32L( iToneEnabled );
+    
+    // Pack the length of the tone data. If there is no tone
+    // data then pack zero.
+    length = 0;
+    if ( iTone )
+        {
+        length = iTone->Length();
+        }
+    aWriteStream.WriteUint32L( length );
+    
+    // If there is a valid tone field pack it onto the buffer.
+    if ( length )
+        {
+        aWriteStream.WriteL( iTone->Des(), length );
+        }
+    
+    // Write the tone repeat field
+    aWriteStream.WriteUint32L( iToneRepeat );
+                       
+    aWriteStream.CommitL();
+    }
+
+// ---------------------------------------------------------------------------
+// void CEvtInfoNoteInputParam::InternalizeL
+// ---------------------------------------------------------------------------
+//    
+EXPORT_C void CEvtInfoNoteInputParam::InternalizeL( RReadStream&    aReadStream )
+    {
+    // Clear the Subject field
+    delete iSubject;
+    iSubject = NULL;
+    
+    // Clear the Description field
+    delete iDescription;
+    iDescription = NULL;
+    
+    // The first element in the array if the Trigger accuracy variable
+    iAccuracy = static_cast< TEvtTriggerAccuracy >( aReadStream.ReadUint32L());
+        
+    // Now get the length of the subject field.
+    TUint32 length = aReadStream.ReadUint32L();
+    if ( length >= KMaxTInt/2 )
+        {
+        User::Leave( KErrArgument );
+        }        
+    // Set the subject only if the length is a +ve value.
+    if ( length )
+        {
+        iSubject = HBufC::NewL( length );
+        TPtr subject( iSubject->Des());
+        aReadStream.ReadL( subject, length );
+        }
+        
+    // Now get the length of the description field.
+    length = aReadStream.ReadUint32L();
+    if ( length >= KMaxTInt/2 )
+        {
+        User::Leave( KErrArgument );
+        }        
+    // Set the description only if the length is a +ve value.
+    if ( length )
+        {
+        iDescription = HBufC::NewL( length );
+        TPtr description( iDescription->Des());
+        aReadStream.ReadL( description, length );
+        }
+        
+    // Set the snooze show
+    iShowSnooze = aReadStream.ReadUint32L(); 
+        
+    // Set the tone enabled
+    iToneEnabled = aReadStream.ReadUint32L(); 
+        
+    // Set the tone field
+    // Now get the length of the tone field.
+    length = aReadStream.ReadUint32L();
+    if ( length >= KMaxTInt/2 )
+        {
+        User::Leave( KErrArgument );
+        } 
+    // Set the tone only if the length is a +ve value.
+    if ( length )
+        {
+        iTone = HBufC::NewL( length );
+        TPtr tone( iTone->Des());
+        aReadStream.ReadL( tone, length );
+        }                  
+    // Set the tone repeat
+    iToneRepeat = aReadStream.ReadUint32L();          
+    }
+
+// ---------------------------------------------------------------------------
+// TPtrC CEvtInfoNoteInputParam::Tone
+// ---------------------------------------------------------------------------
+//      
+EXPORT_C TPtrC CEvtInfoNoteInputParam::Tone() const
+    {
+    // Check whether the tone exists, incase it doesnt exist then
+    // return a NULL string else return Tone.
+    if ( iTone )
+        {
+        return *iTone;
+        }
+    else
+        {
+        return TPtrC();
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// void CEvtInfoNoteInputParam::SetToneL
+// ---------------------------------------------------------------------------
+//
+EXPORT_C void CEvtInfoNoteInputParam::SetToneL( const TDesC&  aTone )
+    {
+    delete iTone;
+    iTone = NULL;
+    
+    // Copy the tone data from the allocated string
+    iTone = aTone.AllocL();        
+    }
+
+// ---------------------------------------------------------------------------
+// TBool  CEvtInfoNoteInputParam::ToneRepeat
+// ---------------------------------------------------------------------------
+//
+EXPORT_C TBool  CEvtInfoNoteInputParam::ToneRepeat() const
+    {
+    return iToneRepeat;
+    }
+
+// ---------------------------------------------------------------------------
+// void CEvtInfoNoteInputParam::SetToneRepeat
+// ---------------------------------------------------------------------------
+//
+EXPORT_C void CEvtInfoNoteInputParam::SetToneRepeat( TBool  aRepeat )
+    {
+    iToneRepeat = aRepeat;
+    }
+
+// ---------------------------------------------------------------------------
+// TBool  CEvtInfoNoteInputParam::ToneEnabled
+// ---------------------------------------------------------------------------
+//
+EXPORT_C TBool  CEvtInfoNoteInputParam::ToneEnabled() const
+    {
+    return iToneEnabled;
+    }
+
+// ---------------------------------------------------------------------------
+// void CEvtInfoNoteInputParam::SetToneEnabled
+// ---------------------------------------------------------------------------
+//
+EXPORT_C void CEvtInfoNoteInputParam::SetToneEnabled( TBool  aEnabled )
+    {
+    iToneEnabled = aEnabled;
+    }
+
+// ---------------------------------------------------------------------------
+// TBool  CEvtInfoNoteInputParam::ShowSnooze
+// ---------------------------------------------------------------------------
+//
+EXPORT_C TBool  CEvtInfoNoteInputParam::ShowSnooze() const
+    {
+    return iShowSnooze;
+    }
+
+// ---------------------------------------------------------------------------
+// void CEvtInfoNoteInputParam::SetShowSnooze
+// ---------------------------------------------------------------------------
+//
+EXPORT_C void CEvtInfoNoteInputParam::SetShowSnooze( TBool  aSnooze )
+    {
+    iShowSnooze = aSnooze;
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventsutils/src/evtkeylockhandler.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,148 @@
+/*
+* 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:  Key Lock Settings Handler.
+*
+*/
+
+
+// System Includes
+
+// User Includes
+#include "evtkeylockhandler.h"
+#include "evtdebug.h"
+
+// ================ Member funtions for CEvtKeyLockHandler class ===============
+
+// ---------------------------------------------------------------------------
+// CEvtKeyLockHandler::CEvtKeyLockHandler
+// ---------------------------------------------------------------------------
+//
+CEvtKeyLockHandler::CEvtKeyLockHandler( ) : iKeyLocked(EFalse)
+	{
+	}
+
+// ---------------------------------------------------------------------------
+// CEvtKeyLockHandler::~CEvtKeyLockHandler
+// ---------------------------------------------------------------------------
+//
+CEvtKeyLockHandler::~CEvtKeyLockHandler()
+	{
+	iKeyLock.Close();
+	}
+	
+// ---------------------------------------------------------------------------
+// CEvtKeyLockHandler::NewL
+// ---------------------------------------------------------------------------
+//
+EXPORT_C CEvtKeyLockHandler* CEvtKeyLockHandler::NewL( )
+    {
+	CEvtKeyLockHandler* self = NewLC( );
+	CleanupStack::Pop( self );
+	return self;
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtKeyLockHandler::NewLC
+// ---------------------------------------------------------------------------
+//
+EXPORT_C CEvtKeyLockHandler* CEvtKeyLockHandler::NewLC( )
+    {
+	CEvtKeyLockHandler* self = new ( ELeave )CEvtKeyLockHandler( );
+	CleanupStack::PushL( self );
+	self->ConstructL( );
+	return self;
+    } 
+
+// ---------------------------------------------------------------------------
+// CEvtKeyLockHandler::ConstructL
+// ---------------------------------------------------------------------------
+//
+void CEvtKeyLockHandler::ConstructL()
+    {
+    EVTUIDEBUG( "+ CEvtKeyLockHandler::ConstructL()" );
+    
+	User::LeaveIfError( iKeyLock.Connect() );
+	
+    EVTUIDEBUG( "- CEvtKeyLockHandler::ConstructL()" );
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtKeyLockHandler::MaintainState
+// ---------------------------------------------------------------------------
+//
+EXPORT_C void CEvtKeyLockHandler::MaintainState( )
+	{
+	iKeyLocked = iKeyLock.IsKeyLockEnabled();
+	
+	// Disable the Key Lock without showing the Note.
+    if( iKeyLocked )
+		{
+    	iKeyLock.DisableWithoutNote();
+		}
+    EVTUIDEBUG1( "= CEvtKeyLockHandler::MaintainState() - %d", iKeyLocked );
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtKeyLockHandler::UpdateStateWithNote
+// ---------------------------------------------------------------------------
+//
+EXPORT_C void CEvtKeyLockHandler::UpdateStateWithNote( )
+	{
+    EVTUIDEBUG1( "= CEvtKeyLockHandler::UpdateStateWithNote() - %d", iKeyLocked );
+	
+	// Check the previously Maintained key lock state and the current key lock state.
+	// This avoids updation if both the states are same.
+    if( iKeyLocked && !iKeyLock.IsKeyLockEnabled() )
+		{
+		iKeyLock.EnableKeyLock();
+		}
+    else if( !iKeyLocked && iKeyLock.IsKeyLockEnabled() )
+    	{
+		iKeyLock.DisableKeyLock();
+		}
+	iKeyLocked = EFalse;
+    EVTUIDEBUG( "- CEvtKeyLockHandler::UpdateStateWithNote() - Key Lock Updated" );
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtKeyLockHandler::UpdateStateWithoutNote
+// ---------------------------------------------------------------------------
+//
+EXPORT_C void CEvtKeyLockHandler::UpdateStateWithoutNote( )
+	{
+    EVTUIDEBUG1( "= CEvtKeyLockHandler::UpdateStateWithoutNote() - %d", iKeyLocked );
+	
+	// Check the previously Maintained key lock state and the current key lock state.
+	// This avoids updation if both the states are same.
+    if( iKeyLocked && !iKeyLock.IsKeyLockEnabled() )
+		{
+		iKeyLock.EnableWithoutNote();
+		}
+    else if( !iKeyLocked && iKeyLock.IsKeyLockEnabled() )
+    	{
+		iKeyLock.DisableWithoutNote();
+		}
+	iKeyLocked = EFalse;
+    EVTUIDEBUG( "- CEvtKeyLockHandler::UpdateStateWithoutNote() - Key Lock Updated" );
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtKeyLockHandler::EnableKeyLock
+// ---------------------------------------------------------------------------
+//
+EXPORT_C void CEvtKeyLockHandler::EnableKeyLock( TBool aFlag )
+	{
+    iKeyLocked = aFlag;
+    EVTUIDEBUG1( "= CEvtKeyLockHandler::EnableKeyLock() - %d", iKeyLocked );
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventsutils/src/evtprofilehandler.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,193 @@
+/*
+* 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:  Profile Settings Handler.
+*
+*/
+
+
+// System Includes
+#include <e32base.h>
+#include <centralrepository.h>
+#include <ProfileEngineSDKCRKeys.h>
+#include <hwrmvibrasdkcrkeys.h>
+
+// User Includes
+#include "evtutilsconsts.h"
+#include "evtprofilehandler.h"
+#include "evtdebug.h"
+
+// Constants
+static const TInt KSilentRing = 4;
+
+// ================ Member funtions for CEvtProfileHandler class ===============
+
+// ---------------------------------------------------------------------------
+// CEvtProfileHandler::CEvtProfileHandler
+// ---------------------------------------------------------------------------
+//
+CEvtProfileHandler::CEvtProfileHandler( MEvtProfileObserver& aObserver ):
+									iObserver(aObserver)
+	{
+	}
+
+// ---------------------------------------------------------------------------
+// CEvtProfileHandler::~CEvtProfileHandler
+// ---------------------------------------------------------------------------
+//
+CEvtProfileHandler::~CEvtProfileHandler()
+	{
+
+	if( iVibraNotifyHandler )
+		{
+		iVibraNotifyHandler->StopListening();
+		}
+
+	if( iTypeNotifyHandler )
+		{
+		iTypeNotifyHandler->StopListening();
+		}
+
+	if( iVolumeNotifyHandler )
+		{
+		iVolumeNotifyHandler->StopListening();
+		}
+
+    delete iVibraNotifyHandler;
+	delete iTypeNotifyHandler;
+    delete iVolumeNotifyHandler;
+
+    delete iProfileSession;
+    delete iVibraSession;
+	}
+	
+// ---------------------------------------------------------------------------
+// CEvtProfileHandler::NewL
+// ---------------------------------------------------------------------------
+//
+CEvtProfileHandler* CEvtProfileHandler::NewL( MEvtProfileObserver& aObserver )
+    {
+	CEvtProfileHandler* self = NewLC( aObserver );
+	CleanupStack::Pop( self );
+	return self;
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtProfileHandler::NewLC
+// ---------------------------------------------------------------------------
+//
+CEvtProfileHandler* CEvtProfileHandler::NewLC( MEvtProfileObserver& aObserver )
+    {
+	CEvtProfileHandler* self = new ( ELeave )CEvtProfileHandler( aObserver );
+	CleanupStack::PushL( self );
+	self->ConstructL( );
+	return self;
+    } 
+
+// ---------------------------------------------------------------------------
+// CEvtProfileHandler::ConstructL
+// ---------------------------------------------------------------------------
+//
+void CEvtProfileHandler::ConstructL()
+    {
+    EVTUIDEBUG( "+ CEvtProfileHandler::ConstructL()" );
+    
+	// Create a cenrep session each for Profile and Vibra Cenrep Settings.
+	iProfileSession = CRepository::NewL( KCRUidProfileEngine );
+	iVibraSession = CRepository::NewL( KCRUidVibraCtrl );
+
+	// Create the cenrep notification handlers to listen to the settings 
+	// value changes.
+    iVolumeNotifyHandler = CCenRepNotifyHandler::NewL(*this,
+                                                     *iProfileSession,
+                                                     CCenRepNotifyHandler::EIntKey,
+                                                     KProEngActiveRingingVolume);
+
+	iTypeNotifyHandler = CCenRepNotifyHandler::NewL(*this,
+                                                     *iProfileSession,
+                                                     CCenRepNotifyHandler::EIntKey,
+                                                     KProEngActiveRingingType);
+
+	iVibraNotifyHandler = CCenRepNotifyHandler::NewL(*this,
+                                                     *iVibraSession,
+                                                     CCenRepNotifyHandler::EIntKey,
+                                                     KVibraCtrlProfileVibraEnabled);
+
+	// Get the initial value of the Settings.
+	User::LeaveIfError( iProfileSession->Get( KProEngActiveRingingVolume, iRingingVolume ) );
+    User::LeaveIfError( iProfileSession->Get( KProEngActiveRingingType, iRingingType ) );
+    User::LeaveIfError( iVibraSession->Get( KVibraCtrlProfileVibraEnabled, iVibra ) );
+
+	// Start listening to settings change.
+    iVolumeNotifyHandler->StartListeningL();
+    iTypeNotifyHandler->StartListeningL();
+    iVibraNotifyHandler->StartListeningL();
+	
+    EVTUIDEBUG( "- CEvtProfileHandler::ConstructL()" );
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtProfileHandler::Volume
+// ---------------------------------------------------------------------------
+//
+TInt CEvtProfileHandler::Volume( )
+	{
+    EVTUIDEBUG1( "= CEvtProfileHandler::Volume() - %d", iRingingVolume );
+	return iRingingVolume;
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtProfileHandler::IsSilentRingingType
+// ---------------------------------------------------------------------------
+//
+TBool CEvtProfileHandler::IsSilentRingingType( )
+	{
+    EVTUIDEBUG1( "= CEvtProfileHandler::IsSilentRingingType() - %d", iRingingType );
+    if( iRingingType == KSilentRing )
+		return ETrue;
+    else
+    	return EFalse;
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtProfileHandler::IsVibra
+// ---------------------------------------------------------------------------
+//
+TBool CEvtProfileHandler::IsVibra( )
+	{
+    EVTUIDEBUG1( "= CEvtProfileHandler::IsVibra() - %d", iVibra );
+    return iVibra;
+    }
+
+// -----------------------------------------------------------------------------
+// CEvtProfileHandler::HandleNotifyInt()
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+void CEvtProfileHandler::HandleNotifyInt(TUint32 aId, TInt aNewValue)
+    {
+
+   	if ( aId == KProEngActiveRingingVolume )
+   		{
+   		iRingingVolume = aNewValue;
+   		}
+   	else if ( aId == KProEngActiveRingingType )
+		{
+   		iRingingType = aNewValue;
+   		}
+   	else if ( aId == KVibraCtrlProfileVibraEnabled )
+   		{
+   		iVibra = aNewValue;
+   		}
+	iObserver.HandleProfileSettingsChange();
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventsutils/src/evttoneplayer.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,432 @@
+/*
+* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  File Player Events Info Note
+*
+*/
+
+
+// System Includes
+#include <e32base.h>
+#include <mdaaudiotoneplayer.h>
+#include <AudioPreference.h>
+#include <e32property.h>
+#include <coreapplicationuisdomainpskeys.h>
+
+// User Includes
+#include "evttoneplayer.h"
+#include "evtutilsconsts.h"
+#include "evttoneutils.h"
+#include "evtdebug.h"
+
+// Constants
+const TInt KMicroSeconds = 1000000;
+
+// ================ Member funtions for CEvtTonePlayer class ===============
+
+// ---------------------------------------------------------------------------
+// CEvtTonePlayer::CEvtTonePlayer
+// ---------------------------------------------------------------------------
+//
+CEvtTonePlayer::CEvtTonePlayer( MEvtTonePlayObserver& aObserver ):
+									iObserver(aObserver)
+	{
+	}
+
+// ---------------------------------------------------------------------------
+// CEvtTonePlayer::~CEvtTonePlayer
+// ---------------------------------------------------------------------------
+//
+CEvtTonePlayer::~CEvtTonePlayer()
+	{ 
+	Stop();
+	delete iProfileHandler;
+	delete iCallHandler;
+
+    // Delete the timer
+    if( iTimer )
+        {
+    	StopTimer();
+        delete iTimer;
+        }
+	}
+	
+// ---------------------------------------------------------------------------
+// CEvtTonePlayer::NewL
+// ---------------------------------------------------------------------------
+//
+EXPORT_C CEvtTonePlayer* CEvtTonePlayer::NewL( MEvtTonePlayObserver& aObserver )
+    {
+	CEvtTonePlayer* self = NewLC( aObserver );
+	CleanupStack::Pop( self );
+	return self;
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtTonePlayer::NewLC
+// ---------------------------------------------------------------------------
+//
+EXPORT_C CEvtTonePlayer* CEvtTonePlayer::NewLC( MEvtTonePlayObserver& aObserver )
+    {
+	CEvtTonePlayer* self = new ( ELeave )CEvtTonePlayer( aObserver );
+	CleanupStack::PushL( self );
+	self->ConstructL( );
+	return self;
+    } 
+
+// ---------------------------------------------------------------------------
+// CEvtTonePlayer::ConstructL
+// ---------------------------------------------------------------------------
+//
+void CEvtTonePlayer::ConstructL()
+    {
+    EVTUIDEBUG( "+ CEvtTonePlayer::ConstructL()" );
+    iProfileHandler = CEvtProfileHandler::NewL( *this );
+    iCallHandler = CEvtCallHandler::NewL( *this );
+    EVTUIDEBUG( "- CEvtTonePlayer::ConstructL()" );
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtTonePlayer::PlayFileL
+// ---------------------------------------------------------------------------
+//
+EXPORT_C void CEvtTonePlayer::PlayFileL( const TFileName& aAudioFileName, 
+						TBool aLoop, TInt aTimeInterval )
+	{
+    EVTUIDEBUG( "+ CEvtTonePlayer::PlayFileL()" );
+    
+	// Stop if some tone is already playing.
+	Stop();
+
+	// Stop the Timer, if it is On
+    	StopTimer();
+	
+	// Play a beep sound if there is an active/incoming call.
+	if( iCallHandler->IsCallActive() || iCallHandler->IsCallIncoming() )
+		{
+		iPlayerState = ENotReady;
+		iTonePlayer = CMdaAudioToneUtility::NewL( *this );
+		
+		iTonePlayer->PrepareToPlayDesSequence( KPhoneBeepSequence() ); 
+		return;
+		}
+	
+	TBool exist(ETrue);
+	TBool playable(ETrue);
+	
+	// Check if Tone exists and is playable. 
+	TRAPD(existErr, exist = EvtToneUtils::IsExistL( aAudioFileName ) );
+	TRAPD(playableErr, playable = EvtToneUtils::IsExistL( aAudioFileName ) );
+	
+	// Play tone if,
+	// 1. File exists and is playable
+	// 2. profile is NOT "Silent"
+	if( !(iProfileHandler->IsSilentRingingType() || aAudioFileName.Length() == 0 || 
+		existErr || playableErr || !exist || !playable ) )
+		{
+		// If the Mime type of ring tone is "KRngMimeType", then we need to play that file using
+		// CMdaAudioToneUtility else we need to use CDrmPlayerUtility
+		if ( EvtToneUtils::IsRNGTypeL( aAudioFileName ) )
+			{
+			// Mime type of tone is "KRngMimeType"
+			iPlayerState = ENotReady;
+			iTonePlayer = CMdaAudioToneUtility::NewL( *this );
+			
+			// Set the repeat flag based on Audio loop argument.
+			if( aLoop )
+				iAudioPlayer->SetRepeats( KMdaAudioToneRepeatForever, TTimeIntervalMicroSeconds(KMicroSeconds) );
+			else
+				iAudioPlayer->SetRepeats( 0 ,TTimeIntervalMicroSeconds(KMicroSeconds) );
+				
+			iTonePlayer->PrepareToPlayFileSequence( aAudioFileName );
+			
+			// Start the Timer if we have a Time Interval argument set.
+			if( aTimeInterval )
+			    {
+			    StartTimerL( aTimeInterval );
+			    }
+			}
+		else
+			{
+			// Mime type of tone is NOT "KRngMimeType"
+			iPlayerState = ENotReady;
+	        iAudioPlayer = CDrmPlayerUtility::NewFilePlayerL(
+	            aAudioFileName,
+	            *this, 
+	            KAudioPriorityAlarm, 
+	            static_cast<TMdaPriorityPreference>( KAudioPrefCalendarAlarm ) );
+
+			// Set the repeat flag based on Audio loop argument.
+			if( aLoop )
+				iAudioPlayer->SetRepeats( KMdaAudioToneRepeatForever, TTimeIntervalMicroSeconds(KMicroSeconds) );
+			else
+				iAudioPlayer->SetRepeats( 0 ,TTimeIntervalMicroSeconds(KMicroSeconds) );
+
+			// Start the Timer if we have a Time Interval argument set.
+            if( aTimeInterval )
+                {
+			    StartTimerL( aTimeInterval );
+                }
+			}
+		}
+	else 
+		{
+		// Since we cannot play the Tone file, Play the Vibra tone if the Vibration settings is ON.
+		if( iProfileHandler->IsVibra() )
+			{
+			iPlayerState = ENotReady;
+			iTonePlayer = CMdaAudioToneUtility::NewL( *this );
+			
+			// Set to repeat forever.
+			iTonePlayer->SetRepeats( KMdaAudioToneRepeatForever, TTimeIntervalMicroSeconds(KMicroSeconds) );
+			
+			// No Sound sequence which is the file to play Vibration ONLY.
+			iTonePlayer->PrepareToPlayDesSequence( KPhoneNoSoundSequence() ); 
+
+			// Start the Timer if we have a Time Interval argument set.
+            if( aTimeInterval )
+                {
+			    StartTimerL( aTimeInterval );
+                }
+			}
+		// Notify the Tone Player Observer
+		iObserver.TonePlayCompleteL( EFalse );
+		}
+	
+    EVTUIDEBUG( "- CEvtTonePlayer::PlayFileL()" );
+	}
+
+// ---------------------------------------------------------------------------
+// CEvtTonePlayer::StopPlayingL
+// ---------------------------------------------------------------------------
+//
+EXPORT_C void CEvtTonePlayer::StopPlayingL( TBool aTimeout )
+	{
+    EVTUIDEBUG( "+ CEvtTonePlayer::StopPlayingL()" );
+	// Stop the currently playing tone file.
+	Stop();
+
+	// If the tone is stopped NOT because of the time out, then we continue to
+	// play vibration tone till the time out.
+	if( !aTimeout && iProfileHandler->IsVibra() )
+		{
+		iPlayerState = ENotReady;
+		iTonePlayer = CMdaAudioToneUtility::NewL( *this );
+		
+		iTonePlayer->SetRepeats( KMdaAudioToneRepeatForever, TTimeIntervalMicroSeconds(KMicroSeconds) );
+		
+		iTonePlayer->PrepareToPlayDesSequence( KPhoneNoSoundSequence() );
+		}
+	else
+		{
+    		StopTimer();
+		}
+		
+	// Notify the Tone Player Observer
+	iObserver.TonePlayCompleteL( aTimeout );
+    EVTUIDEBUG( "- CEvtTonePlayer::StopPlayingL()" );
+	}
+
+// ---------------------------------------------------------------------------
+// CEvtTonePlayer::MdapcInitComplete
+// ---------------------------------------------------------------------------
+//
+void CEvtTonePlayer::MdapcInitComplete(TInt aError, const TTimeIntervalMicroSeconds& /*aDuration*/)
+	{
+    EVTUIDEBUG( "+ CEvtTonePlayer::MdapcInitComplete()" );
+	if( KErrNone == aError )
+		{
+		iPlayerState = EReady;
+		if( iAudioPlayer )
+			{
+			iPlayerState = EPlaying;
+			iAudioPlayer->SetVolume( PlayerVolume(iAudioPlayer->MaxVolume(), iProfileHandler->Volume()) );
+			iAudioPlayer->SetPriority( KAudioPriorityAlarm, static_cast<TMdaPriorityPreference>( KAudioPrefCalendarAlarm ) );
+			iAudioPlayer->Play();
+			}
+		}
+	else
+		{
+		iPlayerState = ENotReady;
+		}
+    EVTUIDEBUG( "- CEvtTonePlayer::MdapcInitComplete()" );
+	}
+
+// ---------------------------------------------------------------------------
+// CEvtTonePlayer::MdapcPlayComplete
+// ---------------------------------------------------------------------------
+//
+void CEvtTonePlayer::MdapcPlayComplete(TInt /*aError*/)
+	{
+    EVTUIDEBUG( "+ CEvtTonePlayer::MdapcPlayComplete()" );
+	// Notify the Tone Player Observer
+	TRAPD( err, iObserver.TonePlayCompleteL( EFalse ) );
+	if(!err)
+		EVTUIDEBUG1( "TonePlayCompleteL Error - %d", err );
+    EVTUIDEBUG( "- CEvtTonePlayer::MdapcPlayComplete()" );
+	}
+
+// ---------------------------------------------------------------------------
+// CEvtTonePlayer::MatoPrepareComplete
+// ---------------------------------------------------------------------------
+//
+void CEvtTonePlayer::MatoPrepareComplete(TInt aError)
+	{
+    EVTUIDEBUG( "+ CEvtTonePlayer::MatoPrepareComplete()" );
+	if( KErrNone == aError )
+		{
+		iPlayerState = EReady;
+		if( iTonePlayer )
+			{
+			iPlayerState = EPlaying;
+			iTonePlayer->SetVolume( PlayerVolume(iTonePlayer->MaxVolume(), iProfileHandler->Volume()) );
+	    	iTonePlayer->SetPriority( KAudioPriorityAlarm, static_cast<TMdaPriorityPreference>( KAudioPrefCalendarAlarm ) );
+			iTonePlayer->Play();
+			}
+		}
+	else
+		{
+		iPlayerState = ENotReady;
+		}
+    EVTUIDEBUG( "- CEvtTonePlayer::MatoPrepareComplete()" );
+	}
+
+// ---------------------------------------------------------------------------
+// CEvtTonePlayer::MatoPlayComplete
+// ---------------------------------------------------------------------------
+//
+void CEvtTonePlayer::MatoPlayComplete(TInt /*aError*/)
+	{
+    EVTUIDEBUG( "+ CEvtTonePlayer::MdapcPlayComplete()" );
+	// Notify the Tone Player Observer
+	TRAPD( err, iObserver.TonePlayCompleteL( EFalse ) );
+	if(!err)
+		EVTUIDEBUG1( "TonePlayCompleteL Error - %d", err );
+    EVTUIDEBUG( "- CEvtTonePlayer::MdapcPlayComplete()" );
+	}
+
+// ---------------------------------------------------------------------------
+// CEvtTonePlayer::Stop
+// ---------------------------------------------------------------------------
+//
+void CEvtTonePlayer::Stop()
+	{
+    EVTUIDEBUG( "+ CEvtTonePlayer::Stop()" );
+	if( iTonePlayer )
+    	{
+        if( iTonePlayer->State() == EMdaAudioToneUtilityPlaying )
+	        {
+	            iTonePlayer->CancelPlay();
+	        }
+        else
+	        {
+	            iTonePlayer->CancelPrepare();
+	        }
+    	}
+
+    if( iAudioPlayer )
+    	{
+        iAudioPlayer->Stop();
+        iAudioPlayer->Close();
+    	}
+
+    if( iTonePlayer )
+    	{
+		delete iTonePlayer;
+		iTonePlayer = NULL;
+    	}
+
+    if( iAudioPlayer )
+    	{
+		delete iAudioPlayer;
+		iAudioPlayer = NULL;
+    	}
+	
+	iPlayerState = EStop;
+    EVTUIDEBUG( "- CEvtTonePlayer::Stop()" );
+	}
+	
+// ---------------------------------------------------------------------------
+// CEvtTonePlayer::HandleIncomingCallL()
+// ---------------------------------------------------------------------------
+//
+void CEvtTonePlayer::HandleIncomingCallL()
+    {
+    EVTUIDEBUG( "= CEvtTonePlayer::HandleIncomingCallL()" );
+    StopTimer();
+	Stop();
+		
+	// Notify the Tone Player Observer
+	iObserver.TonePlayCompleteL( EFalse );
+    }
+	
+// ---------------------------------------------------------------------------
+// CEvtTonePlayer::HandleProfileSettingsChange()
+// ---------------------------------------------------------------------------
+//
+void CEvtTonePlayer::HandleProfileSettingsChange()
+    {
+    // Nothing to do now.
+    }
+
+// ---------------------------------------------------------------------------
+// CEvtTonePlayer::StartTimerL
+// ---------------------------------------------------------------------------
+//
+void CEvtTonePlayer::StartTimerL( TInt aTimeInterval )
+	{
+        if( !iTimer )
+             {
+             iTimer = CPeriodic::NewL( 0 ); // neutral priority
+             }
+        iTimer->Start( TTimeIntervalMicroSeconds32( aTimeInterval * KMicroSeconds ),
+                       TTimeIntervalMicroSeconds32( aTimeInterval * KMicroSeconds ),
+                       TCallBack(TickL, this));
+	}
+
+// ---------------------------------------------------------------------------
+// CEvtTonePlayer::StopTimer
+// ---------------------------------------------------------------------------
+//
+void CEvtTonePlayer::StopTimer( )
+	{
+    	if( iTimer )
+        	{
+        	iTimer->Cancel();
+        	}
+	}
+
+// ---------------------------------------------------------------------------
+// CEvtTonePlayer::TickL()
+// ---------------------------------------------------------------------------
+//
+TInt CEvtTonePlayer::TickL(TAny* aObject)
+    {
+		((CEvtTonePlayer*)aObject)->StopPlayingL( ETrue );
+		
+    return KErrNone;
+    }
+
+// -----------------------------------------------------------------------------
+// Set volume between zero and player's maximum volume
+// -----------------------------------------------------------------------------
+//
+TInt CEvtTonePlayer::PlayerVolume(TInt aPlayerMaxVol, TInt aVol)
+{    
+    const TInt KMaxProfileVolume( 10 );
+    TInt vol( 0 ); // leave as 0 if using off tone
+    // calculate value between 0 and aPlayerMaxVolume
+    vol = Max( 0, Min( aPlayerMaxVol / KMaxProfileVolume * aVol, aPlayerMaxVol ) ); 
+ 
+    return vol;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/eventsutils/src/evttoneutils.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,125 @@
+/*
+* 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:  Tone/File Utility.
+*
+*/
+
+
+// System Includes
+#include <apgcli.h>
+#include <DRMHelper.h>
+#include <f32file.h>
+#include <bautils.h>
+
+// User Includes
+#include "evttoneutils.h"
+#include "evtdebug.h"
+
+// Constants
+// Rich audio file MIME types
+_LIT(KAac, "audio/aac");
+_LIT(KMp3, "audio/mp3");
+_LIT(KMpeg, "audio/mpeg");
+_LIT(K3gpp, "audio/3gpp");
+_LIT(KMp4, "audio/mp4");
+_LIT(KAmrWb, "audio/amr-wb");
+_LIT(KWavX, "audio/x-wav");
+_LIT(KWav, "audio/wav");
+_LIT( KRngMimeType, "application/vnd.nokia.ringing-tone" );
+
+// ================ Member funtions for CEvtVibraHandler class ===============
+
+// -----------------------------------------------------------------------------
+// EvtToneUtils::DataType()
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+TBool EvtToneUtils::IsRNGTypeL( const TDesC& aFileName )
+    {
+    TPtrC type(EvtToneUtils::DataTypeL( aFileName ).Des());
+    
+    if( type.CompareF( KRngMimeType ) == 0 )
+        return ETrue;
+    else
+    	return EFalse;
+    }
+
+// -----------------------------------------------------------------------------
+// EvtToneUtils::IsFilePlayableL
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//    
+TBool EvtToneUtils::IsFilePlayableL( const TDesC& aFileName )
+    {
+    TPtrC type(EvtToneUtils::DataTypeL( aFileName ).Des());
+        
+    if ( type == KAac  || type == KMp3 || type == KMpeg ||
+         type == K3gpp || type == KMp4 || type == KAmrWb ||
+         type == KWavX || type == KWav )
+        {
+        ContentAccess::CContent* content = NULL;
+        TRAPD( err, content = ContentAccess::CContent::NewL( aFileName ) );
+        if ( err == KErrNone && content )
+            {
+            // ECanPlay checks rights as well as EIsProtected
+            TInt canPlay( 0 );
+            content->GetAttribute( ContentAccess::ECanPlay, canPlay );
+            delete content;
+            return canPlay;        
+            }
+        return EFalse;
+        }
+    
+    return ETrue; // Other MIMEs can be played without DRM check.    
+    }
+    
+// -----------------------------------------------------------------------------
+// EvtToneUtils::DataTypeL()
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+TDataType EvtToneUtils::DataTypeL( const TDesC& aFileName )
+    {
+    RApaLsSession apaLsSession;
+    User::LeaveIfError( apaLsSession.Connect() );
+    CleanupClosePushL( apaLsSession );
+    
+	TDataType dataType;
+   	TUid dummyUid( KNullUid );
+   	
+	User::LeaveIfError( apaLsSession.AppForDocument( aFileName, dummyUid, dataType ) );
+	
+    CleanupStack::PopAndDestroy(); // apaLsSession
+    
+    return dataType;
+    }
+// -----------------------------------------------------------------------------
+// EvtToneUtils::IsExistL()
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//    
+TBool EvtToneUtils::IsExistL( const TDesC& aFileName )
+    {
+	TBool isPresent = EFalse;
+	
+    RFs fsSession;
+	User::LeaveIfError(fsSession.Connect());
+	if( BaflUtils::FileExists(fsSession, aFileName) )
+    	{
+    	isPresent = ETrue;
+    	}
+    fsSession.Close();
+    
+    return isPresent;
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/group/bld.inf	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,63 @@
+/*
+* 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:  Build information file for project Events UI
+*
+*/
+
+
+// To get the APP_LAYER_LOC_EXPORT_PATH macro definitions
+#include <platform_paths.hrh>
+
+
+PRJ_PLATFORMS
+DEFAULT
+
+//  Help exports
+#include "../help/group/bld.inf"
+
+PRJ_EXPORTS
+
+// Export Localization Files
+../loc/evtui.loc               		APP_LAYER_LOC_EXPORT_PATH(evtui.loc)
+
+// Export the IBY file
+../rom/eventsui.iby             	CORE_APP_LAYER_IBY_EXPORT_PATH(eventsui.iby)
+../rom/eventsui_resources.iby   	LANGUAGE_APP_LAYER_IBY_EXPORT_PATH(eventsui_resources.iby)
+../rom/eventsuistub.iby            	CORE_APP_LAYER_IBY_EXPORT_PATH(eventsuistub.iby)
+
+// Export Configuration Markup language and Central Repository Mark up language files
+../conf/evtstorage.confml               APP_LAYER_CONFML(evtstorage.confml) 
+../conf/evtstorage_2001E66D.crml        APP_LAYER_CRML(evtstorage_2001E66D.crml)
+
+
+// Backup Db files
+../data/backup_registration.xml     z:/private/2001E663/backup_registration.xml
+
+PRJ_MMPFILES
+
+// Events UI Utility functions
+#include "../eventsutils/group/bld.inf"
+
+// Events UI Engine
+#include "../eventsengine/group/bld.inf"
+
+// Events Handler
+#include "../eventshandlerui/group/bld.inf"
+
+// Events Editor
+#include "../eventseditor/group/bld.inf"
+
+// Events Management UI
+#include "../eventsmgmtui/group/bld.inf"
+
Binary file eventsui/help/data/xhtml.zip has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/help/group/bld.inf	Wed Sep 01 12:31:27 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/loc.hlp.hrh	MW_LAYER_PLATFORM_EXPORT_PATH(csxhelp/loc.hlp.hrh)
+../rom/eventsuihelps_variant.iby		CUSTOMER_APP_LAYER_IBY_EXPORT_PATH(eventsuihelps_variant.iby)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/help/inc/loc.hlp.hrh	Wed Sep 01 12:31:27 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:
+*
+*/
+	
+//
+// loc.hlp.hrh generated by CSXHelp Utilities.
+//           
+
+#ifndef __LOC_HLP_HRH__
+#define __LOC_HLP_HRH__
+
+_LIT(KHLP_LOC_EVENTS_VIEW, "HLP_LOC_EVENTS_VIEW"); // 
+_LIT(KHLP_LOC_EVENTS_EDITOR, "HLP_LOC_EVENTS_EDITOR"); // 
+
+#endif 
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/help/rom/eventsuihelps_variant.iby	Wed Sep 01 12:31:27 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: 
+*
+*/
+
+#ifndef __EVENTSUIHELPS_VARIANT_IBY__
+#define __EVENTSUIHELPS_VARIANT_IBY__
+
+#if defined(FF_S60_HELPS_IN_USE) && defined(FF_LBT_EVENTSUI) && defined(FF_LBT_ENGINE)
+    data=LOCALISE(DATAZ_\resource\xhtml\%02d\0x2001E663\contents.zip, RESOURCE_FILES_DIR\xhtml\%02d\0x2001E663\contents.zip)
+    data=LOCALISE(DATAZ_\resource\xhtml\%02d\0x2001E663\index.xml, RESOURCE_FILES_DIR\xhtml\%02d\0x2001E663\index.xml)
+    data=LOCALISE(DATAZ_\resource\xhtml\%02d\0x2001E663\keywords.xml, RESOURCE_FILES_DIR\xhtml\%02d\0x2001E663\keywords.xml)
+    data=LOCALISE(DATAZ_\resource\xhtml\%02d\0x2001E663\meta.xml, RESOURCE_FILES_DIR\xhtml\%02d\0x2001E663\meta.xml)
+#endif
+
+#endif // __EVENTSUIHELPS_VARIANT_IBY__
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/loc/evtui.loc	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,647 @@
+/*
+* 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:  Localization file for Events UIs
+*
+*/
+
+
+// d: Title text for Location Events application
+// l: title_pane_t2/opt9
+// r: 9.1tb 
+//
+#define qtn_locev_title_location_events "Location events"
+
+// d: List box entry for creating a new event.
+// l: list_double_large_graphic_pane_t1
+// r: 9.1tb 
+//
+#define qtn_locev_list_create_new_event "Create new event"
+
+// d: Item in the options menu for creating event
+// l: list_single_pane_t1_cp2
+// r: 9.1tb 
+//
+#define qtn_locev_options_create_new_event "Create new event"
+
+// d: Item in the options menu
+// l: list_single_pane_t1_cp2/opt3
+// r: 9.1tb 
+//
+#define qtn_locev_options_show "Show"
+
+// d: Item in the options sub menu for showing all events
+// l: list_single_popup_submenu_pane_t1/opt1
+// r: 9.1tb 
+//
+#define qtn_locev_options_show_all "All"
+
+// d: Item in the options sub menu for showing active events
+// l: list_single_popup_submenu_pane_t1/opt1
+// r: 9.1tb 
+//
+#define qtn_locev_options_active "Active"
+
+// d: Item in the options sub menu for showing draft events
+// l: list_single_popup_submenu_pane_t1/opt1
+// r: 9.1tb 
+//
+#define qtn_locev_options_draft "Draft"
+
+// d: Item in the options sub menu for showing completed events
+// l: list_single_popup_submenu_pane_t1/opt1
+// r: 9.1tb 
+//
+#define qtn_locev_options_completed "Completed"
+
+// d: Item in the options menu to go to positioning methods
+// l: list_single_pane_t1_cp2
+// r: 9.1tb 
+//
+#define qtn_locev_options_posi_settings "Positioning settings"
+
+// d: Item in the options menu to open the event listed in the main view
+// l: list_single_pane_t1_cp2
+// r: 9.1tb 
+//
+#define qtn_locev_options_open "Open"
+
+// d: Item in the options menu to activate the event listed in the main view
+// l: list_single_pane_t1_cp2
+// r: 9.1tb 
+//
+#define qtn_locev_options_activate "Activate"
+
+// d: Item in the options menu to set an event as draft
+// l: list_single_pane_t1_cp2
+// r: 9.1tb 
+//
+#define qtn_locev_options_setdraft "Set as draft "
+
+// d: Item in the options menu to delete an event in the listed menu
+// l: list_single_pane_t1_cp2
+// r: 9.1tb 
+//
+#define qtn_locev_options_delete "Delete"
+/*
+// d: Item in the options menu
+// l: list_single_pane_t1_cp2/opt3
+// r: 9.1tb 
+//
+#define qtn_options_list "Mark/UnMark"
+
+// d: Item in the options sub menu to mark a list event
+// l: list_single_popup_submenu_pane_t1/opt1
+// r: 9.1tb 
+//
+#define qtn_options_list_mark_one "Mark"
+
+// d: Item in the options sub menu to mark all event
+// l: list_single_popup_submenu_pane_t1/opt1
+// r: 9.1tb 
+//
+#define qtn_options_list_mark_all "Mark all"
+
+// d: Item in the options sub menu to unmark a list event
+// l: list_single_popup_submenu_pane_t1/opt1
+// r: 9.1tb 
+//
+#define qtn_options_list_unmark_one "Unmark"
+
+// d: Item in the options sub menu to unmark all
+// l: list_single_popup_submenu_pane_t1/opt1
+// r: 9.1tb 
+//
+#define qtn_options_list_unmark_all "Unmark all"
+*/
+// d: Information note shown when user tries to set an incomplete draft event into an active event
+// l: popup_note_window/opt1
+// r: 9.1tb 
+//
+#define qtn_locev_note_activatingdraft "All events could not be activated. Please check Subject and Place are defined for each event and try again"
+
+// d: Title text for Event Editor When the Subject field has no value
+// l: title_pane_t2/opt9
+// r: 9.1tb 
+//
+#define qtn_locev_title_new_event "New event"
+
+// d: Label name for Subject in the event editor
+// l: list_double_pane_t1
+// r: 9.1tb 
+//
+#define qtn_locev_list_lbl_subject "Subject*"
+
+// d: Label name for Place in the event editor
+// l: list_double_pane_t1
+// r: 9.1tb 
+//
+#define qtn_locev_list_lbl_place "Place*"
+
+// d: ‘Define’  is written in value field to hint user that the MSK Define has to be pressed to define the place
+// l: list_double_pane_t2
+// r: 9.1tb 
+//
+#define qtn_locev_list_value_define "Define"
+
+// d: Label name for Repaat in the event editor
+// l: list_double_pane_t1
+// r: 9.1tb 
+//
+#define qtn_locev_list_lbl_repeat "Repeat"
+
+// d: Label name for Alert tone in the event editor
+// l: list_double_pane_t1
+// r: 9.1tb 
+//
+#define qtn_locev_list_lbl_alert_tone "Alert tone"
+
+// d: Label name for Audio loop in the event editor
+// l: list_double_pane_t1
+// r: 9.1tb 
+//
+#define qtn_locev_list_lbl_audio_loop "Audio loop"
+
+// d: Item in the options menu to define a place
+// l: list_single_pane_t1_cp2
+// r: 9.1tb 
+//
+#define qtn_locev_options_setplace "Set place"
+
+// d: Item in the options menu to change a value in the focussed field
+// l: list_single_pane_t1_cp2
+// r: 9.1tb 
+//
+#define qtn_locev_options_change "Change"
+
+// d: Item in the options menu
+// l: list_single_pane_t1_cp2/opt3
+// r: 9.1tb 
+//
+#define qtn_locev_options_add_desc "Add Description"
+
+// d: Item in the options menu to add new description 
+// l: list_single_popup_submenu_pane_t1/opt1
+// r: 9.1tb 
+//
+#define qtn_locev_options_new_desc "New"
+
+// d: Item in the options menu to use the existing notes from the notes application
+// l: list_single_popup_submenu_pane_t1/opt1
+// r: 9.1tb 
+//
+#define qtn_locev_options_from_notes "Use existing"
+
+// d: List query header for setting place
+// l: heading_pane_t1
+// r: 9.1tb 
+//
+#define qtn_locev_heading_set_place "Set place"
+
+// d: Current Place -Choice item in the "Set place" list selection query 
+// l: list_single_graphic_pane_t1_cp2
+// r: 9.1tb 
+//
+#define qtn_locev_list_current_place "Current place"
+
+// d: Landmarks -Choice item in the "Set place" list selection query
+// l: list_single_graphic_pane_t1_cp2
+// r: 9.1tb 
+//
+#define qtn_locev_list_landmarks "Landmarks"
+
+// d: From map -Choice item in the "Set place" list selection query
+// l: list_single_graphic_pane_t1_cp2
+// r: 9.1tb 
+//
+#define qtn_locev_list_from_map "From map"
+
+// d: Confirmation query to ask the user whether toi replace the old details
+// l: popup_note_window/opt1
+// r: 9.1tb 
+//
+#define qtn_locev_note_replace_details "Replace old place details with new details?"
+
+// d: Wait note when requesting current location details
+// l: popup_note_wait_window
+// r: 9.1tb 
+//
+#define qtn_locev_note_request_loc "Requesting current location"
+
+// d: If the created trigger is between 500m-1500m, an information note is displayed to the user with title text: "Medium Accuracy"
+// l: heading_sub_pane_t1
+// r: 9.1tb 
+//
+#define qtn_locev_note_heading_medium_acc "Medium Accuracy"
+
+// d: If the created trigger is more than 1500m, an information note is displayed to the user with title text: "Low Accuracy"
+// l: heading_sub_pane_t1
+// r: 9.1tb 
+//
+#define qtn_locev_note_heading_low_acc "Low Accuracy"
+
+// d: If the created trigger is less than 500m, an information note is displayed to the user with title text: "High Accuracy"
+// l: heading_sub_pane_t1
+// r: 9.1tb 
+//
+#define qtn_locev_note_heading_high_acc "High Accuracy"
+
+// d: If due to some (network) error, network location cannot be retrieved and saved, an error note is displayed
+// l: popup_note_window/opt1
+// r: 9.1tb 
+//
+#define qtn_locev_note_saving_failed "Saving current place failed. Please try again"
+
+// d: If user presses Cancel while the GPS coordinate or cell ID retrieval is in progress, an error note
+// l: popup_note_window/opt1
+// r: 9.1tb 
+//
+#define qtn_locev_note_not_saved "Current place not saved"
+
+// d: If no suitable positioning method is enabled in positioning settings, a message query is displayed with header ”Positioning unavailable” 
+// l: heading_pane_t1
+// r: 9.1tb 
+//
+#define qtn_locev_note_heading_positioning "Positioning unavailable"
+
+// d: If no suitable positioning method is enabled in positioning settings, a message query is displayed with this text 
+// l: popup_info_list_pane_t1
+// r: 9.1tb 
+//
+#define qtn_locev_note_positioning "To save the current location at least one positioning method must be enabled. Check "
+
+// d: If no suitable positioning method is enabled in positioning settings, a message query is displayed with a link to open the positioning methods for enabling  a method
+// l: popup_info_list_pane_t1
+// r: 9.1tb 
+//
+#define qtn_locev_note_positioning_link "Positioning settings"
+
+// d: Label name for Radius field in the events editor
+// l: list_double_pane_t1
+// r: 9.1tb 
+//
+#define qtn_locev_list_lbl_radius "Radius"
+
+// d: Item in the options menu to remove the existing description in the events editor
+// l: list_single_pane_t1_cp2
+// r: 9.1tb 
+//
+#define qtn_locev_options_remove_desc "Remove description"
+
+// d: Label name for Description in the events editor
+// l: list_double_pane_t1
+// r: 9.1tb 
+//
+#define qtn_locev_list_lbl_description "Description"
+
+// d: Item in the options menu for editing the existing description
+// l: list_single_pane_t1_cp2
+// r: 9.1tb 
+//
+#define qtn_locev_options_edit_desc "Edit description"
+
+// d: List query header for Add description
+// l: heading_pane_t1
+// r: 9.1tb 
+//
+#define qtn_locev_list_heading_add_desc "Add description"
+
+// d: Item in the options menu for "Set alert tone"
+// l: list_single_pane_t1_cp2
+// r: 9.1tb 
+//
+#define qtn_locev_options_set_tone "Set Alert tone"
+
+// d: List query header for Set Alert tone
+// l: heading_pane_t1
+// r: 9.1tb 
+//
+#define qtn_locev_list_heading_alert_tone "Set Alert tone"
+
+// d: Tone -Choice item in the "Set alert tone" list selection query
+// l: list_single_graphic_pane_t1_cp2
+// r: 9.1tb 
+//
+#define qtn_locev_list_alert_tone "Tone"
+
+// d: Record new clip -Choice item in the "Set alert tone" list selection query
+// l: list_single_graphic_pane_t1_cp2
+// r: 9.1tb 
+//
+#define qtn_locev_list_record_clip "Record New Clip"
+
+// d: "Off" Value for the Alert tone field in the editor
+// l: list_set_graphic_pane_t1
+// r: 9.1tb 
+//
+#define qtn_locev_list_value_alert_off "Off"
+
+// d: Item in the options menu to navigate to the place
+// l: list_single_pane_t1_cp2
+// r: 9.1tb 
+//
+#define qtn_locev_options_navigate "Navigate to place"
+
+// d: Item in the options menu to show the event location on the map
+// l: list_single_pane_t1_cp2
+// r: 9.1tb 
+//
+#define qtn_locev_options_show_map "Show place on map"
+
+// d: Item in the options menu to edit the items in the event viewer
+// l: list_single_pane_t1_cp2
+// r: 9.1tb 
+//
+#define qtn_locev_options_edit "Edit"
+/*
+// d: Press MSK to open "Active"/"Draft"/"Completed"/"Invalid" Events
+// l: control_pane_t3/opt7
+// r: 9.1tb 
+//
+#define qtn_msk_open "Open"
+*/
+// d: A maximum number of location events is reached and user tries to create a new event, a message is displayed
+// l: popup_note_window/opt1
+// r: 9.1tb 
+//
+#define qtn_locev_note_many_events "Too many location events. Please delete few events to enable creating new ones"
+
+// d: When selecting a landmark for the trigger and the landmark does not have valid coordinates,an error note is displayed 
+// l: popup_note_window/opt1
+// r: 9.1tb 
+//
+#define qtn_locev_note_invalid_lm "Coordinates missing from selected landmark. Please select another one"
+
+// d; Unit is Miles -Value for radius field
+// l: list_double_graphic_pane_t2/opt2
+// r: 9.1tb 
+//
+#define qtn_locev_list_lbl_radius_miles "mi"
+
+// d: Unit is Kilometer - Value for radius field
+// l: list_double_graphic_pane_t2/opt2
+// r: 9.1tb 
+//
+#define qtn_locev_list_lbl_radius_km "km"
+
+// d: If no Place or Subject is defined for the event, Unnamed is displayed in place of Subject
+// l: list_double_large_graphic_pane_t1
+// r: 9.1tb 
+//
+#define qtn_locev_list_unnamed "Unnamed"
+
+// d: Press MSK to create new event
+// l: control_pane_t3/opt7
+// r: 9.1tb 
+//
+#define qtn_msk_create "Create"
+
+// d: Press MSK to define the place. Opens a list selection query
+// l: control_pane_t3/opt7
+// r: 9.1tb 
+//
+#define qtn_msk_define "Define"
+
+// d: On - Value for Audio loop 
+// l: list_double_pane_t2
+// r: 9.1tb 
+//
+#define qtn_locev_list_value_loop_on "On"
+
+// d: Off- Value for Audio loop 
+// l: list_double_pane_t2
+// r: 9.1tb 
+//
+#define qtn_locev_list_value_loop_off "Off"
+
+// d: On - Value for Repeat 
+// l: list_double_pane_t2
+// r: 9.1tb 
+//
+#define qtn_locev_list_value_repeat_on "On"
+
+// d: Off - Value for Repeat 
+// l: list_double_pane_t2
+// r: 9.1tb 
+//
+#define qtn_locev_list_value_repeat_off "Off"
+
+// d: Item in the context sensitive menu to open the event from the query 
+// l: list_single_pane_t1_cp2
+// r: 9.1tb 
+//
+#define qtn_locev_options_open_event "Open event"
+
+// d: Item in the context sensitive menu to view the description of the event
+// l: list_single_pane_t1_cp2
+// r: 9.1tb 
+//
+#define qtn_locev_options_view_description "View description"
+
+// d: Item in the context sensitive menu to view the description of the event
+// l: list_single_large_graphic_pane_t1
+// r: 9.1tb 
+//
+#define qtn_apps_locev_list "Location events"
+
+// d: Title text for Location Events in Location Centre in Grid View
+// l: cell_app_pane_t1
+// r: 9.1tb 
+//
+#define qtn_apps_locev_grid  "Location events"
+
+// d: If saving the event takes time, wait note with a text “ Saving event. Please wait...”  is displayed
+// l: popup_note_wait_window
+// r: 9.1tb 
+//
+#define qtn_locev_note_saving_event "Saving event. Please wait..."
+
+// d: Confirmation query text while delete an event
+// l: popup_note_window/opt1
+// r: 9.1tb
+//
+#define qtn_locev_confirm_delete_event "Delete event"
+
+// d: Heading of the Pane
+// l: heading_pane_t1
+// r: 9.1tb
+//
+#define qtn_locev_note_disclaimer_heading "NOTICE AND DISCLAIMER"
+
+// d: Notice and Disclaimer body text
+// l: popup_info_list_pane_t1
+// r: 9.1tb
+//
+#define qtn_locev_note_disclaimer_text "The availability and accuracy of this service is dependent, among other things, on wireless networks and satellite systems. They may not function in all areas or at all times. Nokia does not guarantee and shall in no way be held responsible for the reliability and accuracy of the service. Therefore never rely solely on the service e.g. for essential communications, like emergencies. This service is made for non-commercial private use only. Using the service may involve transmission of large amounts of data through your service provider’s network. Contact your network service provider for information about data transmission charges"
+
+// d: SK1 for the disclaimer Pop-up note
+// l: control_pane_t1
+// r: 9.1tb
+//
+#define qtn_locev_softkey_accept "Accept"
+
+// d: SK2 for the disclaimer Pop-up note
+// l: control_pane_t1
+// r: 9.1tb
+//
+#define qtn_locev_softkey_reject "Reject"
+
+// d: Confirmation query text 
+// l: popup_note_window/opt1
+// r: 9.1tb
+//
+#define qtn_locev_confirmation_note_text "Hide notice and disclaimer in the future"
+
+// d: Item in the options sub menu for showing invalid events
+// l: list_single_popup_submenu_pane_t1/opt2
+// r: 9.1tb
+//
+#define qtn_locev_options_invalid "Invalid"
+
+// d: Confirmation query text while deleting multiple events
+// l: popup_note_window/opt1
+// r: 9.1tb
+//
+#define qtn_locev_confirm_multidelete_event "Delete %N events"
+
+// d: Wait note when deleting an event
+// l: popup_note_wait_window
+// r: 9.1tb
+//
+#define qtn_locev_note_singleevt_delete "Deleting event..."
+
+// d: Wait note when deleting multiple events
+// l: popup_note_wait_window
+// r: 9.1tb
+//
+#define qtn_locev_note_multipleevt_delete "Deleting events..."
+
+// d: Wait note shown while activating an event
+// l: popup_note_wait_window
+// r: 9.1tb
+//
+#define qtn_locev_note_singleevt_activate "Activating event..."
+
+// d: Wait note shown while activating multiple events
+// l: popup_note_wait_window
+// r: 9.1tb
+//
+#define qtn_locev_note_multipleevt_activate "Activating events..."
+
+// d: Wait note shown while saving an event as draft
+// l: popup_note_wait_window
+// r: 9.1tb
+//
+#define qtn_locev_note_singleevt_draft "Saving event as draft..."
+
+// d: Wait note shown while saving multiple events as draft
+// l: popup_note_wait_window
+// r: 9.1tb
+//
+#define qtn_locev_note_multipleevt_draft "Saving events as draft..."
+
+// d: Label name for Status in the event editor to set the event status
+// l: list_double_pane_t1
+// r: 9.1tb
+//
+#define qtn_locev_list_lbl_status "Status"
+
+// d: Value name for the "Status" field in the editor
+// l: list_double_pane_t1
+// r: 9.1tb
+//
+#define qtn_locev_list_value_active "Active"
+
+// d: Value name for the "Status" field in the editor
+// l: list_double_pane_t1
+// r: 9.1tb
+//
+#define qtn_locev_list_value_draft "Draft"
+
+// d: Prompt text in the data query to enter location details
+// l: popup_query_data_window/opt1
+// r: 9.1tb
+//
+#define qtn_locev_note_prompt_text "Fetched location details. Save location as:"
+
+// d: Text in the information note mentioning the accuracy level of the trigger in metres
+// l: popup_note_window/opt1
+// r: 9.1tb 
+//
+#define qtn_locev_note_txt_acc_metres "Place saved with %U m accuracy level"
+
+// d: Text in the information note mentioning the accuracy level of the trigger in kilometres
+// l: popup_note_window/opt1
+// r: 9.1tb 
+//
+#define qtn_locev_note_txt_acc_km "Place saved with %U km accuracy level"
+
+// d: Text in the information note mentioning the accuracy level of the trigger in miles
+// l: popup_note_window/opt1
+// r: 9.1tb 
+//
+#define qtn_locev_note_txt_acc_miles "Place saved with %U mi accuracy level"
+
+// d: Text in the information note mentioning the accuracy level of the trigger in foot/feet
+// l: popup_note_window/opt1
+// r: 9.1tb 
+//
+#define qtn_locev_note_txt_acc_ft "Place saved with %U ft accuracy level"
+
+// d: Text in the information note mentioning that the accuracy level is unknown
+// l: popup_note_window/opt1
+// r: 9.1tb
+//
+#define qtn_locev_note_txt_acc_unknown "The accuracy level of the saved location is unavailable"
+
+// d: Confirmation query is displayed when user uses the "Discard changes" command from the options menu
+// l: popup_note_window/opt1
+// r: 9.1tb
+//
+#define qtn_locev_query_discard_changes "Discard all changes made to event entry"
+
+// d: Information note shown when user tries to save the event without filling the mandatory fields
+// l: popup_note_window/opt1
+// r: 9.1tb
+//
+#define qtn_locev_note_missed_info "Please fill all the mandatory fields to save event"
+
+// d: Item in the options menu to discard changes
+// l: list_single_pane_t1_cp2
+// r: 9.1tb
+//
+#define qtn_locev_options_discard "Discard changes"
+
+// d: Event "Status" text in the event viewer
+// l: list_double_pane_t2
+// r: 9.1tb
+//
+#define qtn_locev_list_value_completed "Completed"
+
+// d: Event "Status" text in the event viewer
+// l: list_double_pane_t2
+// r: 9.1tb
+//
+#define qtn_locev_list_value_invalid "Invalid"
+
+// d: Name of the recorded sound clip
+// l: list_double_pane_t2
+// r: 9.1tb
+//
+#define qtn_locev_list_vorec_clip_name "Sound clip"
+
+// d: Snooze text as LSK
+// l: control_pane_t1/opt7
+// r: 9.2tb
+//
+#define qtn_locev_softkey_snooze "Snooze"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/rom/eventsui.iby	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,77 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: IBY file for EventsUi
+*
+*/
+
+#ifndef __EVENTSUI_IBY__
+#define __EVENTSUI_IBY__
+
+#ifdef FF_LBT_EVENTSUI
+#ifdef FF_LBT_ENGINE
+
+// Events Management UI
+// Events Utils dll
+file=ABI_DIR\BUILD_DIR\evtutils.dll		        SHARED_LIB_DIR\evtutils.dll
+
+// Events Engine dll
+file=ABI_DIR\BUILD_DIR\evtengine.dll		    SHARED_LIB_DIR\evtengine.dll
+
+// Events Engine dll
+file=ABI_DIR\BUILD_DIR\evteditor.dll		    SHARED_LIB_DIR\evteditor.dll
+
+// Events Handler Server EXE
+file=ABI_DIR\BUILD_DIR\evthandlerserver.exe     PROGRAMS_DIR\evthandlerserver.exe
+
+// Events Handler UI exe
+file=ABI_DIR\BUILD_DIR\evthandler.exe     	    PROGRAMS_DIR\evthandler.exe
+
+// Application exe
+file=ABI_DIR\BUILD_DIR\evthandlerapp.exe        PROGRAMS_DIR\evthandlerapp.exe
+
+// Application exe
+file=ABI_DIR\BUILD_DIR\evtmgmtui.exe        	PROGRAMS_DIR\evtmgmtui.exe
+
+// Application Icon
+S60_APP_AIF_ICONS( evtmgmtui )
+
+// Application Registration Info
+S60_UPGRADABLE_APP_REG_RSC( evtmgmtui )
+
+// Other Icons
+SCALABLE_IMAGE( APP_BITMAP_DIR, APP_BITMAP_DIR, evtmgmtui )
+SCALABLE_IMAGE( APP_BITMAP_DIR, APP_BITMAP_DIR, evteditor )
+SCALABLE_IMAGE( APP_BITMAP_DIR, APP_BITMAP_DIR, evthandlerserver )
+SCALABLE_IMAGE( APP_BITMAP_DIR, APP_BITMAP_DIR, evtinfonote )
+
+// Handler Application Icon
+S60_APP_AIF_ICONS( evthandlerapp )
+
+// Handler Application Registration Info
+S60_UPGRADABLE_APP_REG_RSC( evthandlerapp )
+
+// Other Icons
+SCALABLE_IMAGE( APP_BITMAP_DIR, APP_BITMAP_DIR, evthandlerapp )
+
+// Notifier
+ECOM_PLUGIN(evtnotifierplugin.dll,evtnotifierplugin.rsc)
+file=ABI_DIR\BUILD_DIR\evtinfonote.dll   SHARED_LIB_DIR\evtinfonote.dll
+
+// Storage Db Backup Registration File
+data=DATAZ_\private\2001E663\backup_registration.xml    \private\2001E663\backup_registration.xml
+
+#endif // FF_LBT_ENGINE
+#endif // FF_LBT_EVENTSUI
+
+#endif // __EVENTSUI_IBY__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/rom/eventsui_resources.iby	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,39 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies 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 EventsUi resource
+*
+*/
+
+#ifndef __EVENTSUI_RESOURCES_IBY__
+#define __EVENTSUI_RESOURCES_IBY__
+
+#ifdef FF_LBT_EVENTSUI
+#ifdef FF_LBT_ENGINE
+
+// Events UI Application Resource
+data=ZRESOURCE\apps\evtmgmtui.rsc		    APP_RESOURCE_DIR\evtmgmtui.rsc
+
+// Events Handler App Application Resource
+data=ZRESOURCE\apps\evthandlerapp.rsc		    APP_RESOURCE_DIR\evthandlerapp.rsc
+
+// Events Engine Resource
+data=ZRESOURCE\evtmgmteditorui.rsc		    RESOURCE_FILES_DIR\evtmgmteditorui.rsc
+
+//Resource file for notifier
+data=DATAZ_\resource\evtinfonote.rsc      	resource\evtinfonote.rsc
+
+#endif // FF_LBT_ENGINE
+#endif // FF_LBT_EVENTSUI
+
+#endif // __EVENTSUI_RESOURCES_IBY__
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eventsui/rom/eventsuistub.iby	Wed Sep 01 12:31:27 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: Stub IBY file for EventsUi
+*
+*/
+
+#ifndef __EVENTSUISTUB_iby__
+#define __EVENTSUISTUB_iby__
+
+#ifdef FF_LBT_EVENTSUI
+#ifdef FF_LBT_ENGINE
+
+// eventsui stub sis file
+data=ZSYSTEM\install\eventsuistub.sis    			system\install\eventsuistub.sis
+
+#endif // FF_LBT_ENGINE
+#endif // FF_LBT_EVENTSUI
+
+#endif // __EVENTSUISTUB_iby__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/group/bld.inf	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,33 @@
+/*
+* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  The common build file.
+*
+*/
+
+PRJ_PLATFORMS
+WINSCW ARMV5
+
+#include "../basiclocationinfodisplay/group/bld.inf"
+#include "../landmarksui/group/bld.inf"
+#include "../eventsui/group/bld.inf"
+#include "../locationlandmarksrefappfors60/group/bld.inf"
+#include "../locationlandmarksuirefapp/group/bld.inf"
+#include "../locationsatviewrefapp/group/bld.inf"
+#include "../simpsyconfigurator/group/bld.inf"
+#include "../mapnavproviderrefapp/group/bld.inf"
+
+#include "../loc_pub/group/bld.inf"
+#include "../loc_plat/group/bld.inf"
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/app/data/Landmarks.rss	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,812 @@
+/*
+ * Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:    LandmarksUi Content File -    Contains all the resources for the LM UI.
+ *
+ */
+
+//  RESOURCE IDENTIFIER
+NAME LMAP
+// 4 letter ID
+
+//  INCLUDES
+
+#include "landmarks.hrh"
+#include <landmarks.loc>
+#include <lmkmsgviewer.loc>
+#include <eikon.rh>
+#include <avkon.rh>
+#include <appinfo.rh>
+#include <avkon.rsg>
+#include <avkon.hrh>
+#include <avkon.loc>
+#include <data_caging_paths_strings.hrh>
+// Added for s60 rel3.1
+#include <AiwCommon.hrh>
+#include <AiwCommon.rh>
+
+//  CONSTANTS  
+
+#define KIconFileMif APP_BITMAP_DIR"\\Landmarks_aif.mif"	
+#define KIconFileMbm APP_BITMAP_DIR"\\Landmarks_aif.mbm"
+
+//  RESOURCE DEFINITIONS 
+
+RESOURCE RSS_SIGNATURE
+    {}
+
+RESOURCE TBUF
+    {buf="";}
+
+RESOURCE EIK_APP_INFO
+    {
+    }
+
+RESOURCE LOCALISABLE_APP_INFO r_landmarks_localisable_app_info
+    {
+    //short_caption = "Landmarks";
+    short_caption = qtn_apps_lm_grid;
+    caption_and_icon = CAPTION_AND_ICON_INFO
+        {
+        //caption = "Landmarks";
+        caption = qtn_apps_lm_list;
+#ifdef __SCALABLE_ICONS
+        number_of_icons = 1;
+        icon_file = KIconFileMif;
+#else
+        number_of_icons = 2;
+        icon_file = KIconFileMbm;
+#endif
+        };
+
+    }
+
+//----------------------------------------------------
+//   
+//    r_lmk_bylm_view
+//    By landmark view with options/exit softkeys
+//
+//----------------------------------------------------
+//
+RESOURCE AVKON_VIEW r_lmk_bylm_view
+    {
+    menubar = r_lmk_bylm_menubar;
+    cba = r_lmk_softkeys_options_exit_contextoptions;
+    }
+
+//----------------------------------------------------
+//   
+//    r_lmk_bylm_view
+//    By landmark view with options/back softkeys, when
+//    launched in embedded mode from Location Centre
+//
+//----------------------------------------------------
+//
+RESOURCE AVKON_VIEW r_lmk_bylm_embedded_view
+    {
+    menubar = r_lmk_bylm_menubar;
+    cba = r_lmk_softkeys_options_back_contextoptions;
+    }
+
+//----------------------------------------------------
+//   
+//    r_lmk_bylm_menubar
+//
+//----------------------------------------------------
+//
+RESOURCE MENU_BAR r_lmk_bylm_menubar
+    {
+    titles=
+        {
+        MENU_TITLE
+            {menu_pane = r_lmk_main_menu; txt="";},
+        MENU_TITLE
+            {menu_pane = r_lmk_bylm_menu2; txt = "";},
+        MENU_TITLE
+            {menu_pane = R_AVKON_MENUPANE_MARKABLE_LIST;},
+        MENU_TITLE
+            {menu_pane = r_lmk_bylm_menu1; txt = "";}
+        };
+    }
+
+//----------------------------------------------------
+//   
+//    r_lmk_bylm_menu1
+//
+//----------------------------------------------------
+//
+RESOURCE MENU_PANE r_lmk_bylm_menu1
+    {
+    items=
+        {
+        MENU_ITEM
+            {
+            command = ELmkCmdOpenLm;
+            txt = qtn_options_open;
+            flags = EEikMenuItemAction;
+            },
+        MENU_ITEM
+            {
+            command = ELmkCmdNewLm;
+            txt = qtn_lm_opt_new_landmark;
+            cascade = r_lmk_new_landmark_submenu;
+            },
+        MENU_ITEM
+            {
+            command = ELmkShowOnMapPlaceHolder;
+            txt = qtn_mnn_option_show_on_map;
+            flags = EEikMenuItemSpecific;
+            },
+        MENU_ITEM
+            {
+            command = ELmkNavigateToPlaceHolder;
+            txt = qtn_mnn_option_navigate_to;
+            flags = EEikMenuItemSpecific;
+            },
+        MENU_ITEM
+            {
+            command = ELmkCmdAddToCat;
+            txt = qtn_lm_opt_add_to_category;
+            flags = EEikMenuItemSpecific;
+            },
+        MENU_ITEM
+            {
+            command = ERemoveFromCat;
+            txt = qtn_lm_opt_remove_from_category;
+            flags = EEikMenuItemSpecific;
+            },
+        MENU_ITEM
+            {
+            command = ELmkCmdSendDummy;
+            txt = qtn_options_send_via;
+            },
+        MENU_ITEM
+            {
+            command = ELmkCmdDeleteLm;
+            txt = qtn_lm_opt_delete_landmark;
+            flags = EEikMenuItemSpecific;
+            }
+        };
+    }
+
+//----------------------------------------------------
+//   
+//    r_lmk_bylm_menu2
+//
+//----------------------------------------------------
+//
+RESOURCE MENU_PANE r_lmk_bylm_menu2
+    {
+    items=
+        {
+        MENU_ITEM
+            {
+            command = ELmkCmdEditCats;
+            txt = qtn_lm_opt_edit_categories;
+            },
+        MENU_ITEM
+            {
+            command=ELmkCmdLaunchPositionSettings;
+            txt=qtn_lm_options_pos_settings;
+            }
+        };
+    }
+
+//----------------------------------------------------
+//   
+//    r_lmk_new_landmark_submenu
+//
+//----------------------------------------------------
+//
+RESOURCE MENU_PANE r_lmk_new_landmark_submenu
+    {
+    items=
+        {
+        MENU_ITEM
+            {
+            command = ELmkCmdNewLmCurrentLocation;
+            txt = qtn_lm_opt_new_landmark_current_location;
+            },
+        MENU_ITEM
+            {
+            command = ELmkFromMapPlaceholder;
+            txt = qtn_lm_opt_new_lm_from_map;
+            },
+        MENU_ITEM
+            {
+            command = ELmkCmdNewLmEmpty;
+            txt = qtn_lm_opt_new_landmark_empty;
+            }
+        };
+    }
+
+//----------------------------------------------------
+//   
+//    r_lmk_ok_menubar
+//
+//----------------------------------------------------
+//
+RESOURCE MENU_BAR r_lmk_ok_menubar
+    {
+    titles=
+        {
+        MENU_TITLE
+            {menu_pane=R_AVKON_MENUPANE_MARKABLE_LIST; txt="";},
+        MENU_TITLE
+            {menu_pane = r_lmk_ok_menu; txt = "";}
+        };
+    }
+
+//----------------------------------------------------
+//   
+//    r_lmk_ok_menu
+//
+//----------------------------------------------------
+//
+RESOURCE MENU_PANE r_lmk_ok_menu
+    {
+    items=
+        {
+        MENU_ITEM
+            {
+            command = ELmkCmdNewLm;
+            txt = qtn_lm_opt_new_landmark;
+            cascade = r_lmk_new_landmark_submenu;
+            flags = EEikMenuItemDimmed;
+            },
+        MENU_ITEM
+            {
+            command = ELmkCmdAddToCat;
+            txt = qtn_lm_opt_add_to_category;
+            },
+        MENU_ITEM
+            {
+            command = ELmkCmdSendDummy;
+            txt = qtn_options_send_via;
+            },
+        MENU_ITEM
+            {
+            command = ELmkCmdDeleteLm;
+            txt = qtn_lm_opt_delete_landmark;
+            }
+        };
+    }
+
+//----------------------------------------------------
+//   
+//    r_lmk_bycategory_view
+//    By category view with options/exit softkeys
+//
+//----------------------------------------------------
+//
+RESOURCE AVKON_VIEW r_lmk_bycategory_view
+    {
+    menubar = r_lmk_bycategory_menubar;
+    cba = r_lmk_softkeys_options_exit_contextoptions;
+    }
+
+//----------------------------------------------------
+//   
+//    r_lmk_bycategory_view
+//    By category view with options/back softkeys, when
+//    launched in embedded mode from Location Centre
+//
+//----------------------------------------------------
+//
+RESOURCE AVKON_VIEW r_lmk_bycategory_embedded_view
+    {
+    menubar = r_lmk_bycategory_menubar;
+    cba = r_lmk_softkeys_options_back_contextoptions;
+    }
+
+//----------------------------------------------------
+//   
+//    r_lmk_bycategory_menubar
+//
+//----------------------------------------------------
+//
+RESOURCE MENU_BAR r_lmk_bycategory_menubar
+    {
+    titles=
+        {
+        MENU_TITLE
+            {menu_pane = r_lmk_main_menu; txt="";},
+        MENU_TITLE
+            {menu_pane = r_lmk_bycategory_menu; txt = "";}
+        };
+    }
+
+//----------------------------------------------------
+//   
+//    r_lmk_bycategory_menu
+//
+//----------------------------------------------------
+//
+RESOURCE MENU_PANE r_lmk_bycategory_menu
+    {
+    items=
+        {
+        MENU_ITEM
+            {
+            command = ELmkCmdOpenCat;
+            txt = qtn_lm_opt_open_category;
+            flags = EEikMenuItemAction;
+            },
+        MENU_ITEM
+            {
+            command = ELmkCmdNewLm;
+            txt = qtn_lm_opt_new_landmark;
+            cascade = r_lmk_new_landmark_submenu;
+            },
+        MENU_ITEM
+            {
+            command = ELmkCmdEditCats;
+            txt = qtn_lm_opt_edit_categories;
+            },
+        MENU_ITEM
+            {
+            command = ELmkShowOnMapPlaceHolder;
+            txt = qtn_mnn_option_show_on_map;
+            flags = EEikMenuItemSpecific;
+            },
+        MENU_ITEM
+            {
+            command=ELmkCmdLaunchPositionSettings;
+            txt=qtn_lm_options_pos_settings;
+            }
+        };
+    }
+
+//----------------------------------------------------
+//   
+//    r_lmk_main_menu
+//    
+//
+//----------------------------------------------------
+//
+RESOURCE MENU_PANE r_lmk_main_menu
+    {
+    items=
+        {
+        MENU_ITEM
+            {command=EAknCmdHelp; txt=qtn_options_help;},
+        MENU_ITEM
+            {command=EAknCmdExit; txt=qtn_options_exit;}
+        };
+    }
+
+//----------------------------------------------------
+//   
+//    r_lmk_category_settings_view
+//    Category settings view
+//
+//----------------------------------------------------
+//
+RESOURCE AVKON_VIEW r_lmk_category_settings_view
+    {
+    menubar=r_lmk_category_settings_menubar;
+    cba=R_AVKON_SOFTKEYS_OPTIONS_BACK;
+    }
+
+//----------------------------------------------------
+//   
+//    r_lmk_category_settings_menubar
+//
+//----------------------------------------------------
+//
+RESOURCE MENU_BAR r_lmk_category_settings_menubar
+    {
+    titles=
+        {
+        MENU_TITLE
+            {menu_pane=r_lmk_main_menu; txt="";},
+        MENU_TITLE
+            {menu_pane = R_AVKON_MENUPANE_MARKABLE_LIST;},
+        MENU_TITLE
+            {menu_pane=r_lmk_category_settings_menu2; txt="";},
+        MENU_TITLE
+            {menu_pane=r_lmk_category_settings_menu1; txt="";}
+        };
+    }
+
+//----------------------------------------------------
+//   
+//    r_lmk_category_settings_menu1
+//    
+//
+//----------------------------------------------------
+//
+RESOURCE MENU_PANE r_lmk_category_settings_menu1
+    {
+    items=
+        {
+        MENU_ITEM
+            {
+            command=ELmkCmdNewCategory;
+            txt=qtn_lm_opt_new_category;
+            },
+        MENU_ITEM
+            {
+            command=ELmkCmdRenameCat;
+            txt=qtn_lm_opt_rename_category;
+            flags = EEikMenuItemSpecific;
+            },
+        MENU_ITEM
+            {
+            command=ELmkCmdDeleteCat;
+            txt=qtn_lm_opt_delete_category;
+            flags = EEikMenuItemSpecific;
+            }
+        };
+    }
+
+//----------------------------------------------------
+//   
+//    r_lmk_category_settings_menu2
+//    
+//
+//----------------------------------------------------
+//
+RESOURCE MENU_PANE r_lmk_category_settings_menu2
+    {
+    items=
+        {
+        MENU_ITEM
+            {
+            command=ELmkCmdChangeIcon;
+            txt=qtn_lm_opt_change_category_icon;
+            flags = EEikMenuItemSpecific;
+            }
+        };
+    }
+
+//----------------------------------------------------
+//   
+//    r_lmk_category_settings_ok_menubar
+//
+//----------------------------------------------------
+//
+RESOURCE MENU_BAR r_lmk_category_settings_ok_menubar
+    {
+    titles=
+        {
+        MENU_TITLE
+            {menu_pane = R_AVKON_MENUPANE_MARKABLE_LIST;},
+        MENU_TITLE
+            {menu_pane=r_lmk_category_settings_ok_menu; txt="";}
+        };
+    }
+
+//----------------------------------------------------
+//   
+//    r_lmk_category_settings_ok_menu
+//    
+//
+//----------------------------------------------------
+//
+RESOURCE MENU_PANE r_lmk_category_settings_ok_menu
+    {
+    items=
+        {
+        MENU_ITEM
+            {
+            command=ELmkCmdNewCategory;
+            txt=qtn_lm_opt_new_category;
+            },
+        MENU_ITEM
+            {
+            command=ELmkCmdRenameCat;
+            txt=qtn_lm_opt_rename_category;
+            },
+        MENU_ITEM
+            {
+            command=ELmkCmdDeleteCat;
+            txt=qtn_lm_opt_delete_category;
+            },
+        MENU_ITEM
+            {
+            command=ELmkCmdChangeIcon;
+            txt=qtn_lm_opt_change_category_icon;
+            }
+        };
+    }
+
+//----------------------------------------------------
+//   
+//    r_lmk_category_contents_view
+//    Category settings view
+//
+//----------------------------------------------------
+//
+RESOURCE AVKON_VIEW r_lmk_category_contents_view
+    {
+    menubar=r_lmk_bylm_menubar;
+    cba=R_AVKON_SOFTKEYS_OPTIONS_BACK;
+    }
+
+//----------------------------------------------------
+//   
+//    r_lmk_tab_group
+//    Application tab group
+//
+//----------------------------------------------------
+//
+RESOURCE TAB_GROUP r_lmk_tab_group
+    {
+    tab_width = EAknTabWidthWithTwoTabs;
+    active = 0;
+    tabs =
+        {
+        TAB
+            {
+            id = ELmkByLmView; // from application hrh
+            txt = "By Lm";
+            },
+        TAB
+            {
+            id = ELmkByCategoryView;
+            txt = "By Cat";
+            }
+        };
+    }
+
+//----------------------------------------------------
+//   
+//    r_lmk_list_empty_no_landmarks
+//    
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_lmk_list_empty_no_landmarks
+    {
+    buf = qtn_lm_empty_create_landmark;
+    }
+
+//----------------------------------------------------
+//   
+//    r_lmk_category_settings_title
+//    Title for application's edit categories view
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_lmk_category_settings_title
+    {
+    buf = qtn_lm_title_edit_categories;
+    }
+
+//----------------------------------------------------
+//   
+//    r_lmk_bycategory_view_title
+//    Title for application's lm by category view
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_lmk_bycategory_view_title
+    {
+    buf = qtn_lm_title_categories;
+    }
+
+//----------------------------------------------------
+//   
+//    r_lmk_bylm_view_title
+//    Title for application's lm by category view
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_lmk_bylm_view_title
+    {
+    buf = qtn_lm_title_landmarks;
+    }
+
+//----------------------------------------------------
+//   
+//    r_lmk_aiw_interest_showonmap
+//    AIW interest for option show on map
+//
+//----------------------------------------------------
+//
+RESOURCE AIW_INTEREST r_lmk_aiw_interest_showonmap
+    {
+    items =
+        {
+        AIW_CRITERIA_ITEM
+            {
+            id = ELmkShowOnMapPlaceHolder;
+            serviceCmd = KAiwCmdMnShowMap;
+            contentType = "application/x-landmark";
+            serviceClass = KAiwClassMenu;
+            }
+        };
+    }
+
+//----------------------------------------------------
+//   
+//    r_lmk_aiw_interest_navigateto
+//    AIW interest for option navigate to
+//
+//----------------------------------------------------
+//
+RESOURCE AIW_INTEREST r_lmk_aiw_interest_navigateto
+    {
+    items =
+        {
+        AIW_CRITERIA_ITEM
+            {
+            id = ELmkNavigateToPlaceHolder;
+            serviceCmd = KAiwCmdMnNavigateTo;
+            contentType = "application/x-landmark";
+            serviceClass = KAiwClassMenu;
+            }
+        };
+    }
+
+//----------------------------------------------------
+//   
+//    r_lmk_aiw_interest_selectfrommap
+//    AIW interest for option landmark from map
+//
+//----------------------------------------------------
+//
+RESOURCE AIW_INTEREST r_lmk_aiw_interest_selectfrommap
+    {
+    items =
+        {
+        AIW_CRITERIA_ITEM
+            {
+            id = ELmkFromMapPlaceholder;
+            serviceCmd = KAiwCmdMnSelectFromMap;
+            contentType = "application/x-landmark";
+            serviceClass = KAiwClassMenu;
+            }
+        };
+    }
+
+//----------------------------------------------------
+//   
+//    r_lmk_mn_wait_note
+//    General wait note
+//
+//----------------------------------------------------
+//
+RESOURCE DIALOG r_lmk_mn_wait_note
+    {
+    flags = EAknWaitNoteFlags | EEikDialogFlagWait;
+    buttons = R_AVKON_SOFTKEYS_EMPTY;
+    items =
+        {
+        DLG_LINE
+            {
+            type = EAknCtNote;
+            id = EGeneralNote;
+            control= AVKON_NOTE
+                {
+                layout = EWaitLayout;
+                singular_label = qtn_gen_note_processing;
+                animation = R_QGN_GRAF_WAIT_BAR_ANIM;
+                };
+            }
+        };
+    }
+
+//----------------------------------------------------
+//   
+//    r_lmk_softkeys_options_exit_contextoptions
+//
+//----------------------------------------------------
+//
+RESOURCE CBA r_lmk_softkeys_options_exit_contextoptions
+    {
+    buttons =
+        {
+        CBA_BUTTON
+            {id=EAknSoftkeyOptions; txt = text_softkey_option;},
+        CBA_BUTTON
+            {id=EAknSoftkeyExit; txt = text_softkey_exit;},
+        CBA_BUTTON
+            {id=EAknSoftkeyContextOptions; txt = text_softkey_option;}
+        };
+    }
+
+//----------------------------------------------------
+//   
+//    r_avkon_softkeys_options_back
+//
+//----------------------------------------------------
+//
+RESOURCE CBA r_lmk_softkeys_options_back_contextoptions
+    {
+    buttons =
+        {
+        CBA_BUTTON
+            {id=EAknSoftkeyOptions; txt = text_softkey_option;},
+        CBA_BUTTON
+            {id=EAknSoftkeyBack; txt = text_softkey_back;},
+        CBA_BUTTON
+            {id=EAknSoftkeyContextOptions; txt = text_softkey_option;}
+        };
+    }
+
+//----------------------------------------------------
+//   
+//    r_lmk_category_settings_context_menubar
+//
+//----------------------------------------------------
+//
+RESOURCE MENU_BAR r_lmk_category_settings_context_menubar
+    {
+    titles=
+        {
+        MENU_TITLE
+            {menu_pane=r_lmk_category_settings_menu2; txt="";},
+        MENU_TITLE
+            {menu_pane=r_lmk_category_settings_menu1; txt="";}
+        };
+    }
+//----------------------------------------------------
+//   
+//    r_lmk_msk_open
+//    MSK label for Lmk by name view & Lmk contents view
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_lmk_msk_open
+    {
+    buf = qtn_msk_open;
+    }
+
+//----------------------------------------------------
+//   
+//    r_lm_lmsel_no_categorised_landmarks
+//    Empty listbox text for category settings
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_lm_lmsel_no_categorised_landmarks
+    {
+    buf = qtn_lm_lmsel_no_categorised_landmarks;
+    }
+
+//----------------------------------------------------
+//   
+//    r_lmk_guide_new_landmark
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_lmk_guide_new_landmark
+    {
+    buf = qtn_lm_guide_new_landmark;
+    }
+
+//----------------------------------------------------
+//   
+//    r_lmk_guide_categorize_landmarks
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_lmk_guide_categorize_landmarks
+    {
+    buf = qtn_lm_guide_categorize_landmarks;
+    }
+
+//----------------------------------------------------
+//   
+//    r_lmk_err_eikon_general
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_lmk_err_eikon_general
+    {
+    buf = qtn_err_eikon_general;
+    }
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/app/data/LandmarksAif.rss	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,36 @@
+/*
+* 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:    LandmarksUi Content File -     
+*
+*/
+
+
+
+
+
+
+
+
+#include <aiftool.rh>
+#include "LmkUID.h"
+
+RESOURCE AIF_DATA
+    {
+    app_uid=KLmkAppUID3;
+    num_icons=2;
+    embeddability=KAppNotEmbeddable;
+    newfile=KAppDoesNotSupportNewFile;
+    }
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/app/data/Landmarks_caption.rss	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,32 @@
+/*
+* 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:    LandmarksUi Content File -    Caption file for Landmarks
+*
+*/
+
+
+
+
+
+
+
+
+#include <landmarks.loc>
+#include <apcaptionfile.rh>
+
+RESOURCE CAPTION_DATA
+	{
+    caption="Landmarks";
+    shortcaption="Landmarks";
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/app/data/Landmarks_reg.rss	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,41 @@
+/*
+* 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:    LandmarksUi Content File -     
+*
+*/
+
+
+
+
+
+
+
+
+#include <appinfo.rh>
+#include <landmarks.rsg>
+#include "LmkUID.h"
+#include <data_caging_paths_strings.hrh>
+
+UID2 KUidAppRegistrationResourceFile
+UID3 KLmkAppUID3
+
+RESOURCE APP_REGISTRATION_INFO
+    {    
+    app_file = "Landmarks";
+    embeddability = KAppEmbeddable;
+	localisable_resource_file = APP_RESOURCE_DIR"\\landmarks";
+    localisable_resource_id = R_LANDMARKS_LOCALISABLE_APP_INFO;
+    }
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/app/data/eposlmintservices.rss	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,42 @@
+/*
+* 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:    LandmarksUi Content File -    
+*     This file contains all the resources for the module.
+*
+*/
+
+
+
+
+
+
+
+
+//  INCLUDES
+#include <uikon.rh>
+
+//  RESOURCE SIGNATURE
+RESOURCE RSS_SIGNATURE { }
+
+// ---------------------------------------------------------
+//
+//    r_pos_landmark_internal_critical_disk_level
+//    Amount of disk that should be left after making an operation
+//    (in amount kilobytes) Set value is multiplied with 1024 in code.
+//
+// ---------------------------------------------------------
+//
+RESOURCE NUMBER_INT16 r_pos_landmark_internal_critical_disk_level { value="120"; }
+
+// End of File
Binary file landmarksui/app/data/landmarksstub.sis has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/app/group/bld.inf	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,53 @@
+/*
+* 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:    LandmarksUi Content File -    
+*	 This file provides the information required for building the
+*    	 whole of a Landmarks application.
+*
+*/
+
+
+
+
+
+
+
+  
+ // APP_LAYER_PLATFORM_EXPORT_PATH macro definitions
+#include <platform_paths.hrh>
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_EXPORTS
+
+// Export landmarksstub.sis file
+../data/landmarksstub.sis  /epoc32/data/z/system/install/landmarksstub.sis
+
+PRJ_MMPFILES
+landmarks.mmp
+
+PRJ_EXTENSIONS
+START EXTENSION s60/mifconv
+OPTION TARGETFILE landmarks.mif
+OPTION HEADERFILE landmarks.mbg
+OPTION SOURCES -c8,8 qgn_prop_lm_names_tab2.svg -c8,8 qgn_prop_lm_categories_tab2.svg
+END
+
+
+START EXTENSION s60/mifconv
+OPTION TARGETFILE landmarks_aif.mif
+OPTION SOURCES -c8 qgn_menu_lm.svg
+END
+
+//  End of File  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/app/group/landmarks.mmp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,103 @@
+/*
+* 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:    LandmarksUi Content File -    Project file for locaiton application.
+*
+*/
+
+
+
+
+
+
+
+// INCLUDES
+// To get the APP_LAYER_SYSTEMINCLUDE-definition
+#include <platform_paths.hrh>
+#include "../../inc/LmkUID.h"         // Common Location UID definitions
+#include "../../inc/LmkDebugConfig.h" // Debug configuration
+#include <data_caging_paths.hrh>
+
+TARGET  Landmarks.exe
+TARGETTYPE  exe
+UID  KAppUID2 KLmkAppUID3 
+// Needed in exe-apps
+epocstacksize 0x5000
+EPOCHEAPSIZE    0x20000 0x1000000 // Min 128kb, max 16Mb
+
+VENDORID    VID_DEFAULT
+CAPABILITY CAP_APPLICATION NetworkControl
+
+// Project source directory
+SOURCEPATH ../src
+
+SOURCE CLmkApp.cpp
+SOURCE CLmkAppUi.cpp
+SOURCE CLmkDocument.cpp
+SOURCE CLmkBaseContainer.cpp
+SOURCE CLmkBaseView.cpp
+SOURCE CLmkByLmView.cpp
+SOURCE CLmkByCategoryView.cpp
+SOURCE CLmkByLmContainer.cpp
+SOURCE CLmkByCategoryContainer.cpp
+SOURCE CLmkCategorySettingsView.cpp
+SOURCE CLmkCategorySettingsContainer.cpp
+SOURCE CLmkCategoryContentsView.cpp
+SOURCE CLmkCategoryContentsContainer.cpp
+SOURCE CLmkLbWithFilterContainer.cpp
+SOURCE Debug.cpp
+
+// Resources
+START RESOURCE ../data/Landmarks.rss
+HEADER
+TARGETPATH APP_RESOURCE_DIR
+LANGUAGE_IDS
+END
+
+// Include paths
+USERINCLUDE . ../src ../data ../inc ../../engine/inc ../../uicontrols/inc ../../inc
+
+// Default system include paths for application layer modules.
+APP_LAYER_SYSTEMINCLUDE
+
+LIBRARY LmkUi.lib
+LIBRARY eposlandmarks.lib
+LIBRARY hlplch.lib 
+LIBRARY euser.lib apparc.lib cone.lib eikcore.lib 
+LIBRARY FeatMgr.lib // Feature manager API
+LIBRARY AknSkins.lib //For skins
+LIBRARY efsrv.lib //file access
+LIBRARY CommonEngine.lib//StringLoader
+LIBRARY CentralRepository.lib
+
+
+// Dependencies to AVKON
+LIBRARY avkon.lib aknlayout.lib eikctl.lib eikcoctl.lib eikdlg.lib aknicon.lib
+LIBRARY CdlEngine.lib
+LIBRARY AknLayout2Scalable.lib
+#ifdef __LMK_DEBUG_FLAG
+LIBRARY flogger.lib
+#endif
+
+// ----------- Touch feedback additions start
+#ifdef RD_TACTILE_FEEDBACK
+LIBRARY         touchfeedback.lib
+#endif //RD_TACTILE_FEEDBACK
+// ----------- Touch feedback additions end
+
+
+START RESOURCE ../data/Landmarks_reg.rss
+DEPENDS landmarks.rsg
+TARGETPATH /private/10003a3f/apps
+END
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/app/inc/CLmkApp.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,56 @@
+/*
+* 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:   	LandmarksUi Content File
+*				LMK application class definition.
+*
+*/
+
+
+
+
+
+
+
+#ifndef LMAPP_H
+#define LMAPP_H
+
+// INCLUDES
+#include <aknapp.h>
+
+// CLASS DECLARATION
+
+/**
+* CLmkApp application class.
+* Provides factory to create concrete document object.
+*
+*/
+class CLmkApp : public CAknApplication
+    {
+    private:
+        /**
+        * From CApaApplication, creates CLmkDocument document object.
+        * @return A pointer to the created document object.
+        */
+        CApaDocument* CreateDocumentL();
+
+        /**
+        * From CApaApplication, returns application's UID (KLMUID3).
+        * @return The value of KLMUID3.
+        */
+        TUid AppDllUid() const;
+    };
+
+#endif // LMAPP_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/app/inc/CLmkAppUi.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,91 @@
+/*
+* 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:    LandmarksUi Content File -    LMK application UI class definition.
+*
+*/
+
+
+
+
+
+
+
+
+#ifndef CLMKAPPUI_H
+#define CLMKAPPUI_H
+
+// INCLUDES
+#include "MLmkKeyProcessor.h"
+#include <aknViewAppUi.h>
+#include <akntabgrp.h>
+#include <aknnavide.h>
+#include <AknTabObserver.h>
+
+// FORWARD DECLARATIONS
+class CLmkDocument;
+class CLmkSender;
+
+// CLASS DECLARATION
+
+/**
+* Application UI class.
+*/
+class CLmkAppUi
+: public CAknViewAppUi,
+  public MAknTabObserver,
+  public MLmkKeyProcessor
+    {
+    public: // Constructors and destructor
+        /**
+        * C++ default constructor.
+        */
+        void ConstructL();
+
+        /**
+        * Destructor.
+        */
+        ~CLmkAppUi();
+
+    public: // New functions
+        /**
+        * Return reference to document
+        * @return reference to CLmkDocument
+        */
+        CLmkDocument& Document() const;
+
+        /**
+        * Return reference to landmark sender
+        * @return reference to CLmkSender
+        */
+        CLmkSender& LmkSender() const;
+
+    protected: // From MAknTabObserver
+        void TabChangedL(TInt aIndex);
+
+    public: // From  MLmkKeyProcessor
+        TBool ProcessKeyEventL( const TKeyEvent& aKeyEvent,TEventCode aType );
+        MAknTabObserver* TabObserver();
+
+    public: // From CEikAppUi
+        void HandleCommandL(TInt aCommand);
+        void HandleViewDeactivation(const TVwsViewId &aViewIdToBeDeactivated,const TVwsViewId &aNewlyActivatedViewId);
+
+    private: // Data
+        /// Own: sender
+        CLmkSender* iLmkSender;
+    };
+
+#endif // CLMKAPPUI_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/app/inc/CLmkBaseContainer.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,200 @@
+/*
+* 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:    LandmarksUi Content File -    LMK application base container
+*                class definition.
+*
+*/
+
+
+
+
+
+
+#ifndef CLMKBASECONTAINER_H
+#define CLMKBASECONTAINER_H
+
+// INCLUDES
+#include <coecntrl.h>
+#include <akntabgrp.h>
+
+
+#include "MLmkMskObserver.h"
+#include "CLmkBaseView.h"
+
+
+// FORWARD DECLARATIONS
+class MLmkKeyProcessor;
+class CAknNavigationDecorator;
+class CEikStatusPane;
+class CEikListBox;
+class CEikMenuBar;
+class CAknNavigationControlContainer;
+class CAknViewAppUi;
+class CLmkAppSelectorImplBase;
+
+
+
+// CLASS DECLARATION
+/**
+*  CLmkBaseContainer  container control class.
+* Inheriting from MLmkMSKObserver to get events from selectors, for changing
+* middle softkeys.
+*/
+class CLmkBaseContainer : public CCoeControl, public MLmkMskObserver
+    {
+    public: // Constructors and destructor
+        /**
+         * Destructor.
+         */
+        ~CLmkBaseContainer();
+
+    protected: // Constructors and destructor
+        /**
+         * Constructor
+         * @param aKeyProcessor forward key events
+         * @param aHelpContext reference to help context
+         * @return newly instantiated object
+         */
+        CLmkBaseContainer( MLmkKeyProcessor& aKeyProcessor,
+                           const TDesC& aHelpContext );
+
+        /**
+         * Destructor
+         */
+        void BaseConstructL();
+
+    public: // new functions
+        /**
+         * Activate navigation decorator.
+         * Method can called if tab needs to be refreshed.
+         * @param aNaviDecorator    navigation decorator
+         * @param aTabId            activated tabulator id
+         */
+        void ActivateTabL( CAknNavigationDecorator& aNaviDecorator,
+                            TInt aTabId );
+
+    public: // from CCoeControl
+        void GetHelpContext( TCoeHelpContext& aContext ) const;
+        TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent,
+                                    TEventCode aType);
+    public:
+
+    	/**
+        * Return reference to SelectorImpl
+        * @return CLmkAppSelectorImplBase reference
+        */
+        CLmkAppSelectorImplBase& SelectorImpl();
+
+    protected: // new functions
+        /**
+         * Get application UI. Ownership is not transferred.
+         * @return pointer to CAknViewAppUi
+         */
+        CAknViewAppUi* ViewAppUi();
+
+        /**
+         * Get navi pane reference.
+         * @return navi pane reference
+         */
+        CAknNavigationControlContainer& NaviPane();
+
+         //Code added by gaurav for Tab Icons -start-
+        /**
+         * Add new tabs to tabgroup
+         * @param aTabGroup
+         */
+        void AddTabsL(CAknTabGroup& aTabGroup);
+
+        HBufC* GetBitmapFilenameLC();
+
+        //-end-
+
+        /**
+         * Create CAknNavigationDecorator, ownership passed to caller.
+         * This method creates a tab group or empty navi pane if
+         * KZeroResourceId given.
+         * @param aResource resource id
+         * @return new instance of object. NULL, if something fails
+         */
+        CAknNavigationDecorator* CreateNaviPaneL( TInt aResource );
+
+        /**
+         * Appui's status pane getter
+         * @return Statuspane pointer
+         */
+        CEikStatusPane* StatusPane();
+
+        /**
+         * Return view's menubar
+         * @return CEikMenuBar
+         */
+        virtual CEikMenuBar* MenuBar();
+
+        /**
+         * Return container's context specific menubar resource id
+         * @return resource id
+         */
+        virtual TInt ContextSpecificMenuBar();
+
+        /**
+         * Return container's options menubar resource id
+         * @return resource id
+         */
+        virtual TInt OptionsMenuBar();
+
+	public:
+
+        /**
+        * This functions finds, what MSK item to display.
+        * It is purely based on whether the item is marked or
+        * there are no items in the list.
+        * @return TLmkMskDispItem
+        */
+        virtual TLmkMskDispItem ResolveMskDisplayItem();
+
+	protected:
+
+        /**
+        * This function sets the list box observer to CEikListBox class
+        * @param aObserver MEikListBoxObserver derived class
+        */
+        #ifdef RD_SCALABLE_UI_V2
+        virtual void SetListBoxObserver(MEikListBoxObserver* aObserver);
+        #endif//RD_SCALABLE_UI_V2
+
+    protected: //data
+
+        ///Ref:
+        CAknNavigationControlContainer* iNaviPane;
+
+        // Ref:
+        MLmkKeyProcessor& iKeyProcessor;
+
+        // Own:
+        TCoeContextName iContextName;
+
+		/*
+		* This member is moved from CLmkLbWithFilterContainer class to this
+		* class.
+		*/
+         /// Own.
+        CLmkAppSelectorImplBase* iSelector;
+
+        TBool iSearchInitiated;
+    };
+#endif // CLMKBASECONTAINER_H
+
+
+// End of File
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/app/inc/CLmkBaseView.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,160 @@
+/*
+* 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:    LandmarksUi Content File -    Declares base view for Landmarks application.
+*
+*/
+
+
+
+
+
+
+
+#ifndef CLMKBASEVIEW_H
+#define CLMKBASEVIEW_H
+
+// INCLUDES
+#include "MLmkKeyProcessor.h"
+#include <aknview.h>
+#ifdef RD_SCALABLE_UI_V2
+#include <eiklbo.h>
+#endif//RD_SCALABLE_UI_V2
+
+// FORWARD DECLARATIONS
+class CLmkBaseContainer;
+class CEikMenuPane;
+class CLmkAppUi;
+class CLmkMapNavigationInterface;
+
+/*
+* This enum specifies, what item to display in the current view.
+* The information is used by containers and corresponding views.
+*/
+enum TLmkMskDispItem
+	{
+	EContextMenu,//display context menu
+	ELabel,      //display label
+	ENoMsk,	     // no MSK
+	EListEmpty
+	};
+
+// CLASS DECLARATION
+/**
+*  Base view class.
+*/
+#ifdef RD_SCALABLE_UI_V2
+class CLmkBaseView :
+public CAknView,
+public MLmkKeyProcessor,
+public MEikListBoxObserver
+#else
+class CLmkBaseView : public CAknView, public MLmkKeyProcessor
+#endif//RD_SCALABLE_UI_V2
+    {
+    public: // Constructors and destructor
+        /**
+        * C++ constructor
+        * @param aKeyProcessor A pointer to MLmkKeyProcessor
+        * @return newly instantiated object
+        */
+        CLmkBaseView( MLmkKeyProcessor& aKeyProcessor );
+
+        /**
+        * By default Symbian 2nd phase constructor is private.
+        * @param aResId Resource id
+        */
+        void BaseConstructL( TInt aResId );
+
+        /**
+        * Destructor.
+        */
+        ~CLmkBaseView();
+
+    protected: // From MLmkKeyProcessor
+        TBool ProcessKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType );
+        MAknTabObserver* TabObserver();
+
+    protected: // New methods
+
+        CLmkAppUi& LmkAppUi() const;
+
+        /**
+        * Handle help requests.
+        * @param aMenuPane A pointer to CEikMenuPane
+        */
+        void HandleHelpFeature( CEikMenuPane* aMenuPane ) const;
+
+        /**
+        * Check whether Coordinates has to be hidden.
+        */
+        void CheckHideCoordinateL( );
+
+  protected://New methods for MSK
+
+  		/**
+        * Enables the MSK context menu, when some items are marked.
+        * overriden by respective view classes to support the
+        * view based enabling of the MSK menu.
+        * @param aEnable Etrue to enable context menu
+        *                EFalse to disable context menu
+        */
+        virtual void EnableMskMenuL(TBool aEnable);
+
+        /**
+        * Enables the MSK lable.
+        * overriden by respective view classes to support the
+        * view based enabling of the MSK label.
+        * @param aEnable Etrue to enable label
+        *                EFalse to disable label
+        */
+        virtual void EnableMskLabelL(TBool aEnable);
+	public:
+		/**
+        * Decides what to be displayed for MSK.
+        * It can be context menu or label or nothing.
+        * @param aMskDispItem
+        */
+		virtual void UpdateMskViewL(TLmkMskDispItem aMskDispItem);
+
+
+	public : // for landscape support
+		void Update();
+    #ifdef RD_SCALABLE_UI_V2
+    protected://for touch support
+
+    	//from MEikListBoxObserver
+    	void HandlePointerEventL( const TPointerEvent& aPointerEvent );
+    	void HandleListBoxEventL( CEikListBox* aListBox, TListBoxEvent aEventType );
+    #endif//RD_SCALABLE_UI_V2
+    protected: // Data
+        /// Own: container
+        CLmkBaseContainer* iBaseContainer;
+        /// Ref: reference to key processor
+        MLmkKeyProcessor& iKeyProcessor;
+        //Own: Pointer to map and navigation interface
+        CLmkMapNavigationInterface* iMapNavInterface;
+
+        //It will be ETrue, when launched from location centre.
+        TBool isEmbeddedLaunch;
+
+        //It will be ETrue when coordinates has to be hidden.
+        TBool iIsHideCoordinate;
+
+        //It will be ETrue when help has to be hidden.
+        TBool iIsHideHelp;
+    };
+
+#endif // CLMKBASEVIEW_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/app/inc/CLmkByCategoryContainer.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,103 @@
+/*
+* 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:    LandmarksUi Content File -    LMK application ByCategory view's container
+*
+*/
+
+
+
+
+
+
+
+
+#ifndef CLMKBYCATEGORYCONTAINER_H
+#define CLMKBYCATEGORYCONTAINER_H
+
+// INCLUDES
+#include "CLmkLbWithFilterContainer.h"
+
+
+
+// FORWARD DECLARATIONS
+// For landscape Support
+
+class CAknView;
+
+class CEikTextListBox;
+class CLmkAppCategorySelectorImpl;
+class CAknFilteredTextListBoxModel;
+
+// CLASS DECLARATION
+/**
+*  CLmkByCategoryContainer  container control class.
+*
+*/
+class CLmkByCategoryContainer : public CLmkLbWithFilterContainer
+    {
+    public: // Constructors and destructor
+        /**
+        * Two-phased constructor
+		* @param aKeyProcessor
+		* @param aParent
+		* @param aRect A rectangle for drawing.
+		* @return The newly created object.
+		*/
+
+        // For landscape Support
+
+		static CLmkByCategoryContainer* NewL( MLmkKeyProcessor& aKeyProcessor,
+                                              MObjectProvider* aParent,
+		                                      const TRect& aRect,
+		                                      CAknView &aView);
+
+        /**
+        * Destructor.
+        */
+        ~CLmkByCategoryContainer();
+
+		// From CoeControl and for landscape support
+
+		void HandleResourceChange( TInt aType );
+
+    protected: // From CLmkLbWithFilterContainer
+        void SetupTitlePaneL();
+        void SetupSelectorAndListL( CPosLandmarkDatabase& aDb,
+                                    CLmkSender& aSender );
+        void SetupNaviPaneL();
+
+    public: // New function
+    	TInt GetCurrentCategoryId();
+
+    private:
+        /**
+        * C++ default constructor.
+        * @param aKeyProcessor
+        * @return newly instantiated object
+        */
+		CLmkByCategoryContainer( MLmkKeyProcessor& aKeyProcessor, CAknView& aView );
+
+		void FocusChanged(TDrawNow aDrawNow);
+
+	private://from MLmkMskObserver
+
+    	void UpdateMskContainerL();
+
+   	private:// Data
+		CAknView &iView;
+    };
+
+#endif // CLMKBYCATEGORYCONTAINER_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/app/inc/CLmkByCategoryView.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,117 @@
+/*
+* 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:    LandmarksUi Content File -    LMK application ByCategory view class definition.
+*
+*/
+
+
+
+
+
+
+#ifndef CLMKBYCATEGORYVIEW_H
+#define CLMKBYCATEGORYVIEW_H
+
+// INCLUDES
+#include "CLmkBaseView.h"
+
+// FORWARD DECLARATIONS
+class CLmkByCategoryContainer;
+class CLmkAppCategorySelectorImpl;
+class MLmkListMemento;
+class CLmkAppUi;
+// CLASS DECLARATION
+
+/**
+*  CLmkByCategoryView view class.
+*
+*/
+class CLmkByCategoryView : public CLmkBaseView
+    {
+    public: // Constructors and destructor
+        /**
+        * C++ default constructor.
+        * @param aKeyProcessor
+        * @return Created CLmkByCategoryView object
+        */
+        static CLmkByCategoryView* NewLC( MLmkKeyProcessor& aKeyProcessor );
+
+        /**
+        * Destructor.
+        */
+        ~CLmkByCategoryView();
+
+    public: // New functions
+        /**
+        * Category contents view needs information about category
+        * selector's last status.
+        * @return memento reference for reading memorized status
+        */
+        const MLmkListMemento& BorrowMemento();
+
+    protected: // From MLmkKeyProcessor
+		TBool ProcessKeyEventL( const TKeyEvent& aKeyEvent,
+                                TEventCode aType );
+
+    public: // CAknView
+        TUid Id() const;
+        void HandleCommandL( TInt aCommand );
+
+    protected:  // From MEikMenuObserver
+        void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane );
+
+    private: // constructor
+        /**
+        * C++ constructor
+        * @param aKeyProcessor
+        * @return newly instantiated object
+        */
+        CLmkByCategoryView( MLmkKeyProcessor& aKeyProcessor );
+
+        /**
+        * By default Symbian 2nd phase constructor is private.
+        */
+        void ConstructL();
+
+    private: //From CAknView
+        void DoActivateL( const TVwsViewId& aPrevViewId,
+                          TUid aCustomMessageId,
+                          const TDesC8& aCustomMessage );
+        void DoDeactivate();
+
+	public: // New functions
+		void Update(); //Added for landscape support
+		void AttachAIWMenuInterestL();
+
+	private://From CLmkBaseView
+ 		void EnableMskMenuL(TBool aEnable);
+    	void EnableMskLabelL(TBool aEnable);
+
+    #ifdef RD_SCALABLE_UI_V2
+	protected://for touch support
+
+		//from MEikListBoxObserver
+    	void HandleListBoxEventL( CEikListBox* aListBox, TListBoxEvent aEventType );
+    #endif//RD_SCALABLE_UI_V2
+    private: // Data
+        /// Own: A pointer to container
+        CLmkByCategoryContainer* iContainer;
+
+        // Own: list status information
+        MLmkListMemento* iListMemento;
+    };
+
+#endif // CLMKBYCATEGORYVIEW_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/app/inc/CLmkByLmContainer.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,144 @@
+/*
+* 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:    LandmarksUi Content File -    LM application ByLm view's container.
+*
+*/
+
+
+
+
+
+
+
+
+#ifndef CLMKBYLMCONTAINER_H
+#define CLMKBYLMCONTAINER_H
+
+// INCLUDES
+#include <EPos_CPosLandmark.h>
+#include <coecobs.h>
+#include "CLmkLbWithFilterContainer.h"
+
+
+
+// FORWARD DECLARATIONS
+class CAknView;
+
+// FORWARD DECLARATIONS
+class CEikTextListBox;
+class CLmkAppLmSelectorImpl;
+
+// CLASS DECLARATION
+/**
+*  CLmkByLmContainer  container control class.
+*
+*/
+class CLmkByLmContainer : public CLmkLbWithFilterContainer, public MCoeControlObserver
+    {
+    public: // Constructors and destructor
+        /**
+        * Two-phased constructor
+		* @param aKeyProcessor
+		* @param aParent
+		* @param aRect A rectangle for drawing.
+		* @return The newly created object.
+		*/
+
+              // For Landscape Support
+
+		static CLmkByLmContainer* NewL(MLmkKeyProcessor& aKeyProcessor,
+												MObjectProvider* aParent,
+												const TRect& aRect ,
+												CAknView& aView);
+
+        /**
+        * Destructor.
+        */
+        ~CLmkByLmContainer();
+
+    public: // from CCoeControl
+        TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent,
+                                     TEventCode aType );
+
+      // For Landscape Support
+
+      void HandleResourceChange(TInt aType);
+
+    public: // New functions
+      TInt GetSelectedLandmarksL(RPointerArray<CPosLandmark> &aArray);
+
+      TBool IsLandmarkDataEmptyL(CPosLandmark* aLandmark);
+      
+      TBool IsEditorOpened();
+      
+      void SetEditorOpenedBool(TBool aBoolvalue);
+
+      void SetHandlePointerEventBool( TBool aBoolValue);
+
+    protected: // From CLmkLbWithFilterContainer
+        void SetupTitlePaneL();
+        void SetupSelectorAndListL( CPosLandmarkDatabase& aDb,
+                                    CLmkSender& aSender );
+        void SetupNaviPaneL();
+
+    public: // From MCoeControlObserver
+
+        /**
+        * HandleControlEventL handles an event from an observed control.
+        *
+        * @param aControl the control that reported the event
+        * @param aEventType contains info about the event
+        */
+       void HandleControlEventL(CCoeControl* aControl, TCoeEvent aEventType);
+
+    private:
+        /**
+        * C++ default constructor.
+        * @param aKeyProcessor
+        * @return newly instantiated object
+        */
+		// Changed for Landscape support
+		CLmkByLmContainer( MLmkKeyProcessor& aKeyProcessor, CAknView& aView );
+
+    	// from CCoeControl
+    	void FocusChanged(TDrawNow aDrawNow);
+
+        /**
+        * Symbian 2nd phase constructor
+        * @param aRect
+        */
+        void ConstructL( const TRect& aRect );
+
+    private://from MLmkMskObserver
+    	void UpdateMskContainerL();
+
+	private: //from CLmkBaseContainer
+        CEikMenuBar* MenuBar();
+        TInt ContextSpecificMenuBar();
+
+	#ifdef RD_SCALABLE_UI_V2
+    public://for touch support
+    	void HandlePointerEventL( const TPointerEvent& aPointerEvent );
+    #endif//RD_SCALABLE_UI_V2
+
+	private:	// Data
+		CAknView &iView;
+		TBool iIsEditorOpened;
+		TBool iHandlePointerEvent;
+
+    };
+
+#endif // CLMKBYLMCONTAINER_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/app/inc/CLmkByLmView.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,118 @@
+/*
+* Copyright (c) 2002-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:    LandmarksUi Content File -    This class has implementation for 'By Landmarks name' view
+*
+*/
+
+
+
+
+
+
+#ifndef CLMKBYLMVIEW_H
+#define CLMKBYLMVIEW_H
+
+// INCLUDES
+#include "CLmkBaseView.h"
+
+// FORWARD DECLARATIONS
+class CLmkByLmContainer;
+class MLmkListMemento;
+class CLmkSender;
+
+// CLASS DECLARATION
+
+/**
+*  CLmkByLmView view class.
+*
+*/
+class CLmkByLmView : public CLmkBaseView
+    {
+    public: // Constructors and destructor
+        /**
+        * C++ default constructor.
+        * @param aKeyProcessor
+        * @param aLmkSender
+        * @return created CLmkByLmView object
+        */
+        static CLmkByLmView* NewLC( MLmkKeyProcessor& aKeyProcessor,
+                                    CLmkSender& aLmkSender );
+
+        /**
+        * Destructor.
+        */
+        ~CLmkByLmView();
+
+    private: // constructor
+        /**
+        * C++ constructor
+        * @param aKeyProcessor
+        * @param aLmkSender
+        * @return newly instantiated object
+        */
+        CLmkByLmView( MLmkKeyProcessor& aKeyProcessor,
+                      CLmkSender& aLmkSender );
+
+        /**
+        * By default Symbian 2nd phase constructor is private.
+        */
+        void ConstructL();
+
+    public: // From MLmkKeyProcessor
+		TBool ProcessKeyEventL( const TKeyEvent& aKeyEvent,
+                                TEventCode aType );
+
+    public: // From CAknView
+        TUid Id() const;
+        void HandleCommandL( TInt aCommand );
+
+    protected:  // From MEikMenuObserver
+        void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane );
+
+    private: //From CAknView
+        void DoActivateL( const TVwsViewId& aPrevViewId, TUid aCustomMessageId,
+                          const TDesC8& aCustomMessage );
+        void DoDeactivate();
+    private://From CLmkBaseView
+
+    	void EnableMskMenuL(TBool  aEnable);
+    	void EnableMskLabelL(TBool aEnable);
+
+    private: // New functions
+    	void AttachAIWMenuInterestL();
+    	TBool HandleAIWserviceCommandsL( TInt aServiceCommand ,
+														  TInt aMenuCommand);
+
+    public : // Added for Landscape
+
+		void Update();
+
+	#ifdef RD_SCALABLE_UI_V2
+	protected://for touch support
+
+		//from MEikListBoxObserver
+    	void HandleListBoxEventL( CEikListBox* aListBox, TListBoxEvent aEventType );
+    #endif//RD_SCALABLE_UI_V2
+    private: // Data
+        /// Own: A pointer to container
+        CLmkByLmContainer* iContainer;
+        // Own: list status information
+        MLmkListMemento* iListMemento;
+        /// Ref: landmark sender
+        CLmkSender& iLmkSender;
+    };
+
+#endif // CLMKBYLMVIEW_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/app/inc/CLmkCategoryContentsContainer.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,132 @@
+/*
+* 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:    LandmarksUi Content File -    LM application category content view's container class.
+*
+*/
+
+
+#ifndef CLMKCATEGORYCONTENTSCONTAINER_H
+#define CLMKCATEGORYCONTENTSCONTAINER_H
+
+// INCLUDES
+#include <coecobs.h>
+#include "CLmkLbWithFilterContainer.h"
+
+// FORWARD DECLARATIONS
+
+class CAknView; // For landscape support
+
+class CEikTextListBox;
+class CLmkAppLmSelectorImpl;
+class CAknNavigationDecorator;
+class CPosLandmark;
+
+// CLASS DECLARATION
+/**
+*  CLmkCategoryContentsContainer  container control class.
+*
+*/
+class CLmkCategoryContentsContainer : public CLmkLbWithFilterContainer, public MCoeControlObserver
+    {
+    public: // Constructors and destructor
+        /**
+        * Two-phased constructor
+		* @param aKeyProcessor
+		* @param aParent
+		* @param aRect A rectangle for drawing.
+		* @return The newly created object.
+		*/
+
+		// For landscape Support
+
+		static CLmkCategoryContentsContainer* NewL(
+                                        MLmkKeyProcessor& aKeyProcessor,
+                                        MObjectProvider* aParent,
+		                                const TRect& aRect, CAknView& aView);
+        /**
+        * Destructor.
+        */
+        ~CLmkCategoryContentsContainer();
+
+    public: // from CCoeControl
+        TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent,
+                                     TEventCode aType );
+        // For Landscape Support
+		void  HandleResourceChange( TInt aType );
+		
+	public: // New functions
+		TInt GetSelectedLandmarksL(RPointerArray<CPosLandmark> &aArray);
+		TBool IsLandmarkDataEmptyL(CPosLandmark* aLandmark);
+	    TBool IsEditorOpened();	      
+		void SetEditorOpenedBool(TBool aBoolvalue);
+
+    public: // From MCoeControlObserver
+
+        /**
+        * HandleControlEventL handles an event from an observed control.
+        *
+        * @param aControl the control that reported the event
+        * @param aEventType contains info about the event
+        */
+       void HandleControlEventL(CCoeControl* aControl, TCoeEvent aEventType);
+
+   public://for MSK
+   		/**
+        * This function, removes opened category from selected landmarks.
+        */
+		void RemoveFromThisCategoryL();
+		/**
+        * This function checks, if the category opened is 'Uncategorized' .
+        * @return ETrue if opened category is 'Uncategorized' else Efalse.
+        */
+		TBool IsUncategorizedCategory();
+
+    protected: // From CLmkLbWithFilterContainer
+        void SetupTitlePaneL();
+        void SetupSelectorAndListL( CPosLandmarkDatabase& aDb,
+                                    CLmkSender& aSender );
+        void SetupNaviPaneL();
+        
+    public ://from CLmkBaseContainer
+    	TLmkMskDispItem ResolveMskDisplayItem();
+    	void UpdateMskContainerForFilterL();
+    	
+    private:
+        /**
+        * C++ default constructor.
+        * @param aKeyProcessor
+        * @return newly instantiated object
+        */
+		CLmkCategoryContentsContainer( MLmkKeyProcessor& aKeyProcessor , CAknView& aView);
+		void FocusChanged(TDrawNow aDrawNow);
+
+        /**
+        * Symbian 2nd phase constructor
+        * @param aRect
+        */
+        void ConstructL( const TRect& aRect );
+
+	private://from MLmkMskObserver
+
+    	void UpdateMskContainerL();
+
+	private:	// Data
+		CAknView& iView;
+		TBool iIsEditorOpened;
+		TBool iIsRemoveOperation;
+    };
+
+#endif // CLMKCATEGORYCONTENTSCONTAINER_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/app/inc/CLmkCategoryContentsView.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,120 @@
+/*
+* 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:    LandmarksUi Content File -    Declares category contents view for LMK application.
+*
+*/
+
+
+
+
+
+
+#ifndef CLMKCATEGORYCONTENTSVIEW_H
+#define CLMKCATEGORYCONTENTSVIEW_H
+
+// INCLUDES
+#include "CLmkBaseView.h"
+
+// FORWARD DECLARATIONS
+class CLmkCategoryContentsContainer;
+class MLmkListMemento;
+class CLmkSender;
+
+// CLASS DECLARATION
+
+/**
+*  CLmkCategoryContentsView view class.
+*
+*/
+class CLmkCategoryContentsView : public CLmkBaseView
+    {
+    public: // Constructors and destructor
+        /**
+        * C++ default constructor.
+        * @param aKeyProcessor
+        * @param aLmkSender
+        * @return created CLmkCategoryContentsView object
+        */
+        static CLmkCategoryContentsView* NewLC( MLmkKeyProcessor& aKeyProcessor,
+                                                CLmkSender& aLmkSender );
+
+        /**
+        * Destructor.
+        */
+        ~CLmkCategoryContentsView();
+
+    private: // constructor
+
+        /**
+        * C++ constructor
+        * @param aKeyProcessor forward key events
+        * @param aLmkSender used to send landmarks
+        * @return newly instantiated object
+        */
+        CLmkCategoryContentsView( MLmkKeyProcessor& aKeyProcessor,
+                                  CLmkSender& aLmkSender );
+
+        /**
+        * By default Symbian 2nd phase constructor is private.
+        */
+        void ConstructL();
+
+    public: // From MLmkKeyProcessor
+		TBool ProcessKeyEventL( const TKeyEvent& aKeyEvent,
+                                TEventCode aType );
+
+    public: // CAknView
+        TUid Id() const;
+        void HandleCommandL( TInt aCommand );
+    private: // New functions
+    	void AttachAIWMenuInterestL();
+    	TBool HandleAIWserviceCommandsL( TInt aServiceCommand ,TInt aMenuCommand);
+
+    protected:  // From MEikMenuObserver
+        void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane );
+
+    private: //From CAknView
+        void DoActivateL( const TVwsViewId& aPrevViewId,
+                          TUid aCustomMessageId,
+                          const TDesC8& aCustomMessage );
+        void DoDeactivate();
+
+	public: // For Landscape Support
+		void Update ();
+		TBool IsContainerPtrValid();
+
+	 private://From CLmkBaseView
+
+    	void EnableMskMenuL(TBool  aEnable);
+    	void EnableMskLabelL(TBool aEnable);
+
+    #ifdef RD_SCALABLE_UI_V2
+    protected://For touch support
+
+    	//from MEikListBoxObserver
+    	void HandleListBoxEventL( CEikListBox* aListBox, TListBoxEvent aEventType );
+    #endif//RD_SCALABLE_UI_V2
+
+    private: // Data
+        /// Own: A pointer to container
+        CLmkCategoryContentsContainer* iContainer;
+        /// Own: list status information
+        MLmkListMemento* iListMemento;
+        /// Ref: landmark sender
+        CLmkSender& iLmkSender;
+    };
+
+#endif // CLMKCATEGORYCONTENTSVIEW_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/app/inc/CLmkCategorySettingsContainer.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,155 @@
+/*
+* 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:    LandmarksUi Content File -    LMK application category settings view's container.
+*
+*/
+
+
+
+
+
+
+
+
+#ifndef __CLMKCATEGORYSETTINGSCONTAINER_H__
+#define __CLMKCATEGORYSETTINGSCONTAINER_H__
+
+// INCLUDES
+#include "CLmkBaseContainer.h"
+
+// FORWARD DECLARATIONS
+
+
+class CAknView; // For landscape support
+
+class CLmkAppSelectorImplBase;
+class CEikMenuBar;
+class CLmkAppCategorySettingsImpl;
+class CEikTextListBox;
+
+// CLASS DECLARATION
+/**
+*  CLmkCategorySettingsContainer  container control class.
+*
+*/
+class CLmkCategorySettingsContainer : public CLmkBaseContainer
+    {
+    public: // Constructors and destructor
+        /**
+        * Two-phased constructor
+		* @param aKeyProcessor forward key events
+		* @param aParent parent pointer
+		* @param aRect A rectangle for drawing.
+		* @return The newly created object.
+		*/
+
+		// For landscape support
+
+		static CLmkCategorySettingsContainer* NewL(
+                                        MLmkKeyProcessor& aKeyProcessor,
+                                        MObjectProvider* aParent,
+		                                const TRect& aRect, CAknView& aView );
+
+
+        /**
+        * Destructor.
+        */
+        ~CLmkCategorySettingsContainer();
+
+    private:
+        /**
+        * By default Symbian 2nd phase constructor is private.
+        * @param aRect Frame rectangle for container.
+        */
+        void ConstructL( const TRect& aRect );
+
+        /**
+        * C++ default constructor.
+        * @param aKeyProcessor forward key events
+        * @return newly instantiated object
+        */
+        //CLmkCategorySettingsContainer( MLmkKeyProcessor& aKeyProcessor );
+
+	// For landscape SUpport
+
+	 CLmkCategorySettingsContainer( MLmkKeyProcessor& aKeyProcessor , CAknView& aView);
+
+
+    public: // new functions
+        /**
+        * Return reference
+        * @return CLmkAppCategorySettingsImpl reference
+        */
+        CLmkAppCategorySettingsImpl& SelectorImpl();
+
+        /**
+        * Return listbox reference
+        * @return CEikTextListBox reference
+        */
+        CEikTextListBox& ListBox();
+
+    public: // From CCoeControl
+        TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent,
+                                     TEventCode aType );
+
+    #ifdef RD_SCALABLE_UI_V2
+    	void HandlePointerEventL( const TPointerEvent& aPointerEvent );
+    #endif // RD_SCALABLE_UI_V2
+
+    private: // From CCoeControl
+        void SizeChanged();
+        TInt CountComponentControls() const;
+        CCoeControl* ComponentControl( TInt aIndex ) const;
+        void FocusChanged(TDrawNow aDrawNow);
+
+    private:
+
+    	//from MLmkMskObserver
+    	void UpdateMskContainerL();
+
+        //from CLmkBaseContainer
+        TLmkMskDispItem ResolveMskDisplayItem();
+
+	private:
+	//For Landscape support
+
+	void HandleResourceChange( TInt aType );
+
+
+
+    private: //from CLmkBaseContainer
+        CEikMenuBar* MenuBar();
+        TInt ContextSpecificMenuBar();
+        TInt OptionsMenuBar();
+
+    #ifdef RD_SCALABLE_UI_V2
+	protected://for touch support
+
+    	void SetListBoxObserver( MEikListBoxObserver* aObserver );
+    #endif//#ifdef RD_SCALABLE_UI_V2
+
+    private: //data
+        /// Ref.
+        CEikTextListBox* iListBox;
+        // For landscape support
+        CAknView &iView;
+        
+        // To Store current Index
+        TInt iCurrentIndex;
+        
+    };
+
+#endif // __CLMKCATEGORYSETTINGSCONTAINER_H__
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/app/inc/CLmkCategorySettingsView.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,107 @@
+/*
+* 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:    LandmarksUi Content File -    LMK application category view's definition.
+*
+*/
+
+
+
+
+
+
+#ifndef __CLMKCATEGORYSETTINGSVIEW_H__
+#define __CLMKCATEGORYSETTINGSVIEW_H__
+
+// INCLUDES
+#include "CLmkBaseView.h"
+
+// FORWARD DECLARATIONS
+class CLmkCategorySettingsContainer;
+
+// CLASS DECLARATION
+
+/**
+*  CLmkCategorySettingsView view class.
+*
+*/
+class CLmkCategorySettingsView : public CLmkBaseView
+    {
+    public: // Constructors and destructor
+        /**
+        * C++ default constructor.
+        * @param aKeyProcessor
+        * @return Created CLmkCategorySettingsView object
+        */
+        static CLmkCategorySettingsView* NewLC( MLmkKeyProcessor& aKeyProcessor );
+
+        /**
+        * Destructor
+        */
+        ~CLmkCategorySettingsView();
+
+    private: // constructor
+        /**
+        * C++ constructor
+        * @param aKeyProcessor
+        * @return newly instantiated object
+        */
+        CLmkCategorySettingsView( MLmkKeyProcessor& aKeyProcessor );
+
+        /**
+        * By default Symbian 2nd phase constructor is private.
+        */
+        void ConstructL();
+
+    public: // From MLmkKeyProcessor
+		TBool ProcessKeyEventL( const TKeyEvent& aKeyEvent,
+                                TEventCode aType );
+
+    public: // From CAknView
+        TUid Id() const;
+        void HandleCommandL(TInt aCommand);
+
+    protected:  // From MEikMenuObserver
+        void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane );
+
+    private: //From CAknView
+        void DoActivateL(const TVwsViewId& aPrevViewId,TUid aCustomMessageId,
+            const TDesC8& aCustomMessage);
+        void DoDeactivate();
+
+	public: // for landscape support
+		void Update();
+
+	private://From CLmkBaseView
+
+    	void EnableMskMenuL(TBool aEnable);
+
+    #ifdef RD_SCALABLE_UI_V2
+	protected://for touch support
+
+		//from MEikListBoxObserver
+    	void HandleListBoxEventL( CEikListBox* aListBox, TListBoxEvent aEventType );
+    #endif//RD_SCALABLE_UI_V2
+
+    private: // Data
+        /// Own: A pointer to container
+        CLmkCategorySettingsContainer* iContainer;
+
+        /// Own: previous view's id
+        TInt iPrevViewId;
+
+    };
+
+#endif // __CLMKCATEGORYSETTINGSVIEW_H__
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/app/inc/CLmkDocument.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,90 @@
+/*
+* 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:    LandmarksUi Content File -    Landmarks application document class definition.
+*
+*/
+
+
+
+
+
+
+
+#ifndef CLMKDOCUMENT_H
+#define CLMKDOCUMENT_H
+
+// INCLUDES
+#include <eikdoc.h>
+
+
+// FORWARD DECLARATIONS
+class CEikAppUi;
+class CPosLandmarkDatabase;
+
+// CLASS DECLARATION
+
+/**
+*  CLmkDocument application class.
+*/
+class CLmkDocument : public CEikDocument
+    {
+    public: // Constructors and destructor
+        /**
+        * Two-phased constructor.
+        * @param aApp
+        * @return newly instantiated object
+        */
+        static CLmkDocument* NewL( CEikApplication& aApp );
+
+        /**
+        * Destructor.
+        */
+        virtual ~CLmkDocument();
+
+    public: // New functions
+        /**
+        * Returns a reference to landmarks database.
+        * @return database reference, not initialized necessarily
+        */
+        CPosLandmarkDatabase& LmDbL() const;
+
+    private:
+        /**
+        * C++ default constructor.
+        * @param aApp
+        * @return newly instantiated object
+        */
+        CLmkDocument( CEikApplication& aApp );
+
+        /**
+        * By default Symbian 2nd phase constructor is private.
+        */
+        void ConstructL();
+
+    private: // From CEikDocument
+        /**
+        * From CEikDocument, create CLocAppUi "App UI" object.
+        * @return pointer to CEikAppUi object
+        */
+        CEikAppUi* CreateAppUiL();
+
+    private: // Data
+        ///Own:
+        CPosLandmarkDatabase* iDb;
+        TInt iError;
+    };
+
+#endif // CLMKDOCUMENT_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/app/inc/CLmkLbWithFilterContainer.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,144 @@
+/*
+* 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:    LandmarksUi Content File -    LMK application's filter container class.
+*
+*/
+
+
+
+
+
+
+
+
+#ifndef CLMKLBWITHFILTERCONTAINER_H
+#define CLMKLBWITHFILTERCONTAINER_H
+
+// INCLUDES
+#include "CLmkBaseContainer.h"
+
+// FORWARD DECLARATIONS
+class MAknsSkinInstance;
+class CAknsBasicBackgroundControlContext;
+
+class CEikTextListBox;
+class CAknSearchField;
+class CLmkAppSelectorImplBase;
+class CAknFilteredTextListBoxModel;
+class CPosLandmarkDatabase;
+class CAknNavigationDecorator;
+class CLmkSender;
+
+// CLASS DECLARATION
+/**
+*  CLmkLbWithFilterContainer  container control class.
+*
+*/
+class CLmkLbWithFilterContainer : public CLmkBaseContainer
+    {
+    public: // Constructors and destructor
+        ~CLmkLbWithFilterContainer();
+
+    public: // New functions
+        /**
+        * Return reference to listbox
+        * @return CEikTextListBox reference
+        */
+        CEikTextListBox& ListBox();
+
+    public: // From CCoeControl
+        TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent,
+                                     TEventCode aType );
+
+    protected: // New functions
+        /**
+        * Setup title pane
+        * Template method.
+        */
+        virtual void SetupTitlePaneL() = 0;
+
+        /**
+        * Setup selector and list
+        * Template method.
+        * @param aDb database reference
+        * @param aSender used to send landmarks
+        */
+        virtual void SetupSelectorAndListL( CPosLandmarkDatabase& aDb,
+                                            CLmkSender& aSender ) = 0;
+
+        /**
+        * Setup navi panel
+        * Template method.
+        */
+        virtual void SetupNaviPaneL() = 0;
+
+    protected: // Constructors and destructor
+        /**
+        * C++ default constructor.
+        * @param aKeyProcessor
+        * @param aHelpContext
+        * @return newly instantiated object
+        */
+        CLmkLbWithFilterContainer( MLmkKeyProcessor& aKeyProcessor,
+                                   const TDesC& aHelpContext );
+
+        /**
+        * Symbian 2nd phase constructor
+        * @param aRect
+        */
+        void ConstructL( const TRect& aRect );
+
+    private: // New functions
+        /**
+        * Internal helper method for setting up find box.
+        */
+        void SetupFindBoxL();
+	private://from MLmkMskObserver
+        void UpdateMskContainerForFilterL();
+
+    private: // From CCoeControl
+        void SizeChanged();
+        TInt CountComponentControls() const;
+        CCoeControl* ComponentControl(TInt aIndex) const;
+        void Draw(const TRect& aRect) const;
+
+    #ifdef RD_SCALABLE_UI_V2
+    public://for touch support
+
+    	void SetListBoxObserver( MEikListBoxObserver* aObserver );
+    #endif//RD_SCALABLE_UI_V2
+
+    protected: //data
+        /// Ref.
+        CEikTextListBox* iListBox;
+
+        /// Own
+        CAknSearchField* iFindBox;
+
+        /// Own: Decorator class for navigation pane controls.
+        CAknNavigationDecorator* iNaviDeco;
+        
+    private:
+       /// Ref: A pointer MAknsSkinInstance
+        MAknsSkinInstance* iSkinInstance;
+
+        /// Own: A pointer CAknBasicBackgroundControlContext
+		CAknsBasicBackgroundControlContext* iBackgroundSkinContext;
+
+		mutable TBool iIsNeedToReDraw;
+    };
+
+#endif // CLMKLBWITHFILTERCONTAINER_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/app/inc/Debug.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,48 @@
+/*
+* 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:    LandmarksUi Content File -    Debug contains debug macros.
+*
+*/
+
+
+
+
+
+
+
+#ifndef DEBUG_H
+#define DEBUG_H
+// INCLUDES
+#include <e32std.h>
+#include "LmkDebugConfig.h"
+
+#ifdef __LMK_DEBUG_FLAG
+
+#define DEBUG(TEXT) Debug( _L(#TEXT) );
+#define DEBUG1(TEXT, ARG1) Debug( _L(#TEXT), (ARG1) );
+#define DEBUG2(TEXT, ARG1, ARG2) Debug( _L(#TEXT), (ARG1), (ARG2) );
+#define DEBUG3(TEXT, ARG1, ARG2, ARG3) Debug( _L(#TEXT), (ARG1), (ARG2), (ARG3) );
+
+void Debug( TRefByValue<const TDesC> aText, ...);
+
+#else
+
+#define DEBUG(TEXT);
+#define DEBUG1(TEXT, ARG1);
+#define DEBUG2(TEXT, ARG1, ARG2);
+#define DEBUG3(TEXT, ARG1, ARG2, ARG3);
+
+#endif // __LMK_DEBUG_FLAG
+
+#endif /* DEBUG_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/app/inc/MLmkKeyProcessor.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,66 @@
+/*
+* 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:    LandmarksUi Content File -
+*     Interface which allows subscribers to consume key event or pass the event
+*     to other view class.
+*
+*/
+
+
+
+
+
+
+
+#ifndef MLmkKeyProcessor_H
+#define MLmkKeyProcessor_H
+
+// INCLUDES
+#include <w32std.h>
+
+// FORWARD DECLARATIONS
+class MAknTabObserver;
+
+// ===========================================================================
+// MLmkKeyProcessor
+// ===========================================================================
+
+/**
+*	An interface a CCoeControl class can implement to forward the keyevents
+*   before the actual control gets the key events. This is useful in
+*   situations where the control consumes keys which you need.
+*/
+class MLmkKeyProcessor
+    {
+    public:
+    /**
+    * process the keyevent befor it reaches the control
+    * @param aKeyEvent the event fired
+    * @param aType the type of event
+    * @return ETrue if key event was consumed, otherwise EFalse
+    */
+    virtual TBool ProcessKeyEventL( const TKeyEvent& aKeyEvent,
+                                    TEventCode aType ) = 0;
+
+	/**
+    * returns the pointer to MAknTabObserver interface
+    * @return pointer to the MAknTabObserver interface
+    */
+    virtual MAknTabObserver* TabObserver() = 0;
+    };
+
+
+#endif
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/app/src/CLmkApp.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,72 @@
+/*
+* 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:   	LandmarksUi Content File
+*				Provides LM Application class methods.
+*
+*/
+
+
+
+
+
+
+
+// INCLUDE FILES
+#include "CLmkApp.h"
+#include "CLmkDocument.h"
+#include "LmkUID.h"
+#include <eikstart.h>
+// ================= MEMBER FUNCTIONS =======================
+
+// ---------------------------------------------------------
+// CLmkApp::AppDllUid()
+// Returns application UID
+// ---------------------------------------------------------
+//
+TUid CLmkApp::AppDllUid() const
+    {
+    return TUid::Uid( KLmkAppUID3 );
+    }
+
+// ---------------------------------------------------------
+// CLocApp::CreateDocumentL()
+// Creates CLmkDocument object
+// ---------------------------------------------------------
+//
+CApaDocument* CLmkApp::CreateDocumentL()
+    {
+    return CLmkDocument::NewL( *this );
+    }
+
+// ================= OTHER EXPORTED FUNCTIONS ==============
+
+LOCAL_C CApaApplication* NewApplication()
+    {
+    return new CLmkApp;
+    }
+
+GLDEF_C TInt E32Main()
+    {
+    return EikStart::RunApplication( NewApplication );
+    }
+
+#if defined (__WINS__)
+EXPORT_C TInt WinsMain( TDesC* /*aCmdLine*/ )
+    {
+    //return EikStart::RunApplication( NewApplication, aCmdLine );
+    return EikStart::RunApplication( NewApplication);
+    }
+#endif // defined (__WINS__)
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/app/src/CLmkAppUi.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,281 @@
+/*
+* 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:    LandmarksUi Content File -    Provides LM UI class methods.
+*
+*/
+
+
+
+
+
+
+
+// INCLUDE FILES
+#include "LmkUID.h"
+#include "CLmkAppUi.h"
+#include "landmarks.hrh"
+#include "CLmkDocument.h"
+#include "CLmkByLmView.h"
+#include "CLmkByCategoryView.h"
+#include "CLmkCategorySettingsView.h"
+#include "CLmkCategoryContentsView.h"
+#include "CLmkSender.h"
+#include "Debug.h"
+#include <AknsUtils.h>
+#include <hlplch.h>
+#include <StringLoader.h>
+#include <aknnotewrappers.h>
+#include <AknQueryDialog.h>
+#include <landmarks.rsg>
+#include <lmkerrors.h>
+
+#if defined(_DEBUG)
+// CONSTANTS
+/// Unnamed namespace for local definitions
+namespace {
+
+_LIT( KPanicMsg, "CLmkAppUi");
+
+void Panic( TPanicCode aReason )
+    {
+    User::Panic( KPanicMsg, aReason );
+    }
+}  // namespace
+#endif
+// ================= MEMBER FUNCTIONS =======================
+
+// ----------------------------------------------------------
+// CLmkAppUi::ConstructL
+// ----------------------------------------------------------
+//
+void CLmkAppUi::ConstructL()
+    {
+    DEBUG( CLmkAppUi::ConstructL entered );
+
+    BaseConstructL( EAknEnableSkin | EAknEnableMSK | EAknSingleClickCompatible);
+
+    TRAPD( err, iLmkSender = CLmkSender::NewL( Document().LmDbL() ));
+    DEBUG1( CLmkAppUi::ConstructL err=%d,err );
+    if(err == KErrLocked)
+    	{
+	    HBufC* noteText = StringLoader::LoadL( R_LMK_ERR_EIKON_GENERAL, iEikonEnv );
+	    CleanupStack::PushL( noteText );
+	    CAknErrorNote* dialog = new(ELeave)CAknErrorNote( ETrue );
+	    dialog->SetTone( CAknNoteDialog::EErrorTone );
+	    dialog->ExecuteLD( *noteText );
+	    CleanupStack::PopAndDestroy( noteText ); //noteText
+	    User::Exit(0);
+    	}
+
+    DEBUG( CLmkAppUi::ConstructL: creating views );
+
+    CLmkBaseView* byLmView = CLmkByLmView::NewLC( *this, *iLmkSender );
+
+    AddViewL( byLmView ); // transfer ownership to CAknViewAppUi
+    CleanupStack::Pop(); // byLmView
+
+    CLmkBaseView* byCategoryView = CLmkByCategoryView::NewLC( *this );
+
+    AddViewL( byCategoryView ); // transfer ownership to CAknViewAppUi
+    CleanupStack::Pop();    // byCategoryView
+
+    CLmkBaseView* categorySettingsView =
+        CLmkCategorySettingsView::NewLC( *this );
+
+
+    AddViewL( categorySettingsView );
+    CleanupStack::Pop();
+
+    CLmkBaseView* categoryContentsView =
+        CLmkCategoryContentsView::NewLC( *this, *iLmkSender );
+
+    AddViewL( categoryContentsView );
+    CleanupStack::Pop();
+
+    SetDefaultViewL( *byLmView );
+
+    DEBUG( CLmkAppUi::ConstructL finished );
+    }
+
+// ----------------------------------------------------
+// CLmkAppUi::~CLmkAppUi
+// Destructor
+// Frees reserved resources
+// ----------------------------------------------------
+//
+CLmkAppUi::~CLmkAppUi()
+    {
+    delete iLmkSender;
+    }
+
+// ----------------------------------------------------
+// CLmkAppUi::HandleCommandL
+// ----------------------------------------------------
+//
+void CLmkAppUi::HandleCommandL( TInt aCommand )
+    {
+    DEBUG1( CLmkAppUi::HandleCommandL entered aCommand=%d, aCommand);
+    switch ( aCommand )
+        {
+        case EAknCmdHelp:
+            {
+            HlpLauncher::LaunchHelpApplicationL( iEikonEnv->WsSession(),
+                                                 AppHelpContextL() );
+            break;
+            }
+        // these all are same: exit
+        case EAknSoftkeyBack:
+        case EAknSoftkeyExit:
+        case EEikCmdExit:
+            {
+            Exit();
+            break;
+            }
+        case ELmkCmdEditCats:
+            {
+            ActivateLocalViewL( TUid::Uid( ELmkCategorySettingsView ) );
+            break;
+            }
+
+        default:
+            break;
+        }
+    DEBUG( CLmkAppUi::HandleCommandL end );
+    }
+
+// ----------------------------------------------------
+// CLmkAppUi::Document
+// ----------------------------------------------------
+//
+CLmkDocument& CLmkAppUi::Document() const
+    {
+    CLmkDocument* document =
+        static_cast<CLmkDocument*>( CEikAppUi::Document() );
+    __ASSERT_DEBUG( document, Panic( KLmkPanicNullMember ) );
+    // Explicit cast: the document must always be of type CLmkDocument
+    return *document;
+    }
+
+// ----------------------------------------------------
+// CLmkAppUi::LmkSender
+// ----------------------------------------------------
+//
+CLmkSender& CLmkAppUi::LmkSender() const
+    {
+    __ASSERT_DEBUG( iLmkSender, Panic( KLmkPanicNullMember ) );
+    return *iLmkSender;
+    }
+
+// ----------------------------------------------------
+// CLmkAppUi::TabChangedL
+// ----------------------------------------------------
+//
+void CLmkAppUi::TabChangedL(TInt aIndex)
+    {
+
+    // Gets a subpane control by ID
+    CAknNavigationControlContainer* naviCtrlContainer =
+        static_cast<CAknNavigationControlContainer*>
+        ( StatusPane()->ControlL( TUid::Uid( EEikStatusPaneUidNavi ) ) );
+    __ASSERT_DEBUG( naviCtrlContainer, Panic( KLmkPanicNullMember ) );
+
+    // Return topmost object from navigation pane's object stack.
+    CAknNavigationDecorator* decorator = naviCtrlContainer->Top();
+    __ASSERT_DEBUG( decorator && decorator->ControlType() ==
+                    CAknNavigationDecorator::ETabGroup,
+                    Panic( KLmkPanicNullMember ) );
+
+    CAknTabGroup* tabGroup =
+        static_cast< CAknTabGroup* > ( decorator->DecoratedControl() );
+    __ASSERT_DEBUG( tabGroup && aIndex >= 0 && aIndex < tabGroup->TabCount(),
+                    Panic( KLmkPanicNullMember ) );
+    ActivateLocalViewL( TUid::Uid( tabGroup->TabIdFromIndex( aIndex ) ) );
+    }
+
+// ----------------------------------------------------
+// CLmkAppUi::ProcessKeyEventL
+// ----------------------------------------------------
+//
+TBool CLmkAppUi::ProcessKeyEventL(
+    const TKeyEvent& /*aKeyEvent*/,
+    TEventCode /*aType*/ )
+    {
+    return EKeyWasNotConsumed;
+    }
+
+// ----------------------------------------------------
+// CLmkAppUi::TabObserver
+// ----------------------------------------------------
+//
+MAknTabObserver* CLmkAppUi::TabObserver()
+    {
+    return this;
+    }
+
+// ----------------------------------------------------
+// CLmkAppUi::HandleViewDeactivation
+// ----------------------------------------------------
+//
+void CLmkAppUi::HandleViewDeactivation(const TVwsViewId &aViewIdToBeDeactivated,
+                                            const TVwsViewId &    aNewlyActivatedViewId  )
+    {
+    // closing all intermediate state events
+	iAvkonEnv->CloseAllIntermediateStates();
+
+    if( aNewlyActivatedViewId.iAppUid ==  TUid::Uid( KLmkAppUID3 ) )
+        {
+        	if ( aNewlyActivatedViewId.iViewUid  == TUid::Uid( ELmkByCategoryView )  && aViewIdToBeDeactivated.iViewUid  == TUid::Uid( ELmkByLmView))
+        	{
+        	    // Gets a subpane control by ID
+        	    CAknNavigationControlContainer* naviCtrlContainer = NULL;
+            TRAP_IGNORE(naviCtrlContainer =
+                static_cast<CAknNavigationControlContainer*>
+                ( StatusPane()->ControlL( TUid::Uid( EEikStatusPaneUidNavi ) ) ));
+
+            // Return topmost object from navigation pane's object stack.
+            CAknNavigationDecorator* decorator = naviCtrlContainer->Top();
+            CAknTabGroup* tabGroup =
+                static_cast< CAknTabGroup* > ( decorator->DecoratedControl() );
+
+        		if(tabGroup)
+        		{
+        			tabGroup->SetActiveTabById(ELmkByCategoryView);
+        			tabGroup->DrawDeferred();
+        			decorator->DrawDeferred();
+        		}
+        	}
+
+        	if( aNewlyActivatedViewId.iViewUid  == TUid::Uid( ELmkByLmView) && aViewIdToBeDeactivated.iViewUid  == TUid::Uid( ELmkByCategoryView) )
+        	{
+        	    // Gets a subpane control by ID
+        		CAknNavigationControlContainer* naviCtrlContainer = NULL;
+            TRAP_IGNORE(naviCtrlContainer =
+                static_cast<CAknNavigationControlContainer*>
+                ( StatusPane()->ControlL( TUid::Uid( EEikStatusPaneUidNavi ) ) ) );
+
+            // Return topmost object from navigation pane's object stack.
+            CAknNavigationDecorator* decorator = naviCtrlContainer->Top();
+            CAknTabGroup* tabGroup =
+                static_cast< CAknTabGroup* > ( decorator->DecoratedControl() );
+        		if(tabGroup)
+        		{
+        			tabGroup->SetActiveTabById(ELmkByLmView);
+        			tabGroup->DrawDeferred();
+        			decorator->DrawDeferred();
+        		}
+        	}
+        }
+    }
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/app/src/CLmkBaseContainer.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,406 @@
+/*
+* 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:    LandmarksUi Content File -    Provides LM request container class methods.
+*
+*/
+
+
+
+
+
+
+
+// INCLUDE FILES
+#include "CLmkBaseContainer.h"
+#include "MLmkKeyProcessor.h"
+#include "LmkUID.h"
+#include "LmkConsts.h"
+#include <aknViewAppUi.h>
+#include <aknnavide.h>
+#include <barsread.h>
+#include <akntabgrp.h>
+#include <eikmenub.h>
+#include "landmarks.hrh"
+#include <AknsUtils.h>
+#include <akntabgrp.h>
+#include <eikapp.h>
+#include <AknsSkinInstance.h>
+#include <f32file.h>
+#include <eikenv.h>
+#include <StringLoader.h>
+#include <eikenv.h>
+#include <aknViewAppUi.h>
+#include <apparc.h>
+#include "CLmkAppSelectorImplBase.h"
+#include <lmkerrors.h>
+#include "Debug.h"
+
+#if defined(_DEBUG)
+// CONSTANTS
+namespace {
+_LIT( KPanicText, "CLmkBaseContainer" );
+
+void Panic( TPanicCode aReason )
+    {
+    User::Panic( KPanicText, aReason );
+    }
+}  // namespace
+#endif
+
+// ================= MEMBER FUNCTIONS =======================
+// ----------------------------------------------------
+// CLmkBaseContainer::CLmkBaseContainer
+// ----------------------------------------------------
+//
+CLmkBaseContainer::CLmkBaseContainer(
+    MLmkKeyProcessor& aKeyProcessor,
+    const TDesC& aHelpContext )
+    :iKeyProcessor( aKeyProcessor ),
+     iContextName( aHelpContext )
+    {
+    }
+
+// ----------------------------------------------------
+// CLmkBaseContainer::BaseConstructL
+// ----------------------------------------------------
+//
+void CLmkBaseContainer::BaseConstructL()
+    {
+    CEikStatusPane* sp = StatusPane();
+    // Fetch pointer to the default navi pane control
+    iNaviPane = static_cast<CAknNavigationControlContainer*>
+        ( sp->ControlL( TUid::Uid( EEikStatusPaneUidNavi ) ) );
+    }
+// ----------------------------------------------------
+// CLmkBaseContainer::~CLmkBaseContainer
+// ----------------------------------------------------
+//
+CLmkBaseContainer::~CLmkBaseContainer()
+    {
+    delete iSelector;
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkBaseContainer::SelectorImpl()
+// ----------------------------------------------------------------------------
+//
+CLmkAppSelectorImplBase& CLmkBaseContainer::SelectorImpl()
+    {
+    __ASSERT_DEBUG( iSelector, Panic( KLmkPanicNullMember ) );
+    return *iSelector;
+    }
+// ----------------------------------------------------
+// CLmkBaseContainer::ActivateTabL
+// ----------------------------------------------------
+//
+void CLmkBaseContainer::ActivateTabL(
+    CAknNavigationDecorator& aNaviDecorator,
+    TInt aTabId )
+    {
+    CEikStatusPane* sp = iEikonEnv->AppUiFactory()->StatusPane();
+    CAknNavigationControlContainer* naviPane =
+        static_cast<CAknNavigationControlContainer*>(
+        sp->ControlL(TUid::Uid(EEikStatusPaneUidNavi)));
+    CAknTabGroup* tabGroup = static_cast<CAknTabGroup*>(
+        aNaviDecorator.DecoratedControl() );
+    tabGroup->SetActiveTabById( aTabId );
+    naviPane->PushL( aNaviDecorator );
+    }
+
+// ----------------------------------------------------
+// CLmkBaseContainer::GetHelpContext
+// ----------------------------------------------------
+//
+void CLmkBaseContainer::GetHelpContext( TCoeHelpContext& aContext ) const
+    {
+    aContext.iContext = iContextName;
+    aContext.iMajor = TUid::Uid( KLmkAppUID3 );
+    }
+
+// ----------------------------------------------------
+// CLmkBaseContainer::OfferKeyEventL
+// ----------------------------------------------------
+//
+TKeyResponse CLmkBaseContainer::OfferKeyEventL(
+    const TKeyEvent& aKeyEvent,
+    TEventCode aType )
+    {
+	DEBUG( CLmkBaseContainer::OfferKeyEventL entered );    	
+    	
+    CAknNavigationDecorator* naviDecorator = NaviPane().Top();
+
+    // Check if navigation pane controls exists, because decorator does
+    // not exist in every cases.
+    if ( naviDecorator && naviDecorator->ControlType() ==
+         CAknNavigationDecorator::ETabGroup )
+        {
+        if(aKeyEvent.iRepeats == 0)
+			{
+			if ( naviDecorator->DecoratedControl()->OfferKeyEventL(
+			 aKeyEvent, aType ) == EKeyWasConsumed )
+				{
+				return EKeyWasConsumed;
+				}
+			}
+        }
+
+    if ( iKeyProcessor.ProcessKeyEventL( aKeyEvent, aType ) ==
+         EKeyWasConsumed )
+        {
+        return EKeyWasConsumed;
+        }
+
+    if ( aType == EEventKey )
+        {
+	    TBool shiftKeyPressed = (aKeyEvent.iModifiers & EModifierShift) ||
+    	                        (aKeyEvent.iModifiers & EModifierLeftShift) ||
+        	                    (aKeyEvent.iModifiers & EModifierRightShift);
+        
+        if ( aKeyEvent.iCode == EKeyOK && !shiftKeyPressed && ContextSpecificMenuBar() )	        
+            {
+	        DEBUG( CLmkBaseContainer::OfferKeyEventL aKeyEvent.iCode == EKeyOK entered ); 	
+            CEikMenuBar* menubar = MenuBar();
+            if ( menubar )
+                {
+                menubar->SetMenuTitleResourceId( ContextSpecificMenuBar() );
+                menubar->StopDisplayingMenuBar();
+                TRAPD( err, menubar->TryDisplayMenuBarL() );
+                // set ordinary menubar back even in case of error
+                menubar->SetMenuTitleResourceId( OptionsMenuBar() );
+                User::LeaveIfError( err );
+                }
+            return EKeyWasConsumed;
+            }
+		if ( aKeyEvent.iCode == EKeyEnter || aKeyEvent.iScanCode == EStdKeyEnter )
+			{
+			TKeyEvent enterKeyEvent( aKeyEvent );
+			enterKeyEvent.iCode = EKeyOK;
+			CEikButtonGroupContainer* cba = CEikButtonGroupContainer::Current();
+			return cba->OfferKeyEventL( enterKeyEvent, aType );
+			}
+        }
+
+    for ( TInt i( 0 ); i < CountComponentControls(); ++i )
+        {
+        if ( ComponentControl(i)->OfferKeyEventL( aKeyEvent, aType ) ==
+             EKeyWasConsumed )
+            {
+            return EKeyWasConsumed;
+            }
+        }
+	DEBUG( CLmkBaseContainer::OfferKeyEventL end );    	    
+    return EKeyWasNotConsumed;    
+    }
+
+// ----------------------------------------------------
+// CLmkBaseContainer::LmkAppUi
+// ----------------------------------------------------
+//
+CAknViewAppUi* CLmkBaseContainer::ViewAppUi()
+    {
+    return static_cast<CAknViewAppUi*>( iAvkonAppUi );
+    }
+
+// ----------------------------------------------------
+// CLmkBaseContainer::NaviPane
+// ----------------------------------------------------
+//
+CAknNavigationControlContainer& CLmkBaseContainer::NaviPane()
+    {
+    // default navi pane should always exist:
+    __ASSERT_DEBUG( iNaviPane, Panic( KLmkPanicNullNaviPane ) );
+    return *iNaviPane;
+    }
+
+// ----------------------------------------------------
+// CLmkBaseContainer::CreateNaviPaneL
+// ----------------------------------------------------
+//
+CAknNavigationDecorator* CLmkBaseContainer::CreateNaviPaneL(
+    TInt aResource )
+    {
+    CEikStatusPane* sp = iEikonEnv->AppUiFactory()->StatusPane();
+    // Fetch pointer to the default navi pane control
+    CAknNavigationControlContainer* naviPane =
+        static_cast<CAknNavigationControlContainer*>(sp->ControlL(
+        TUid::Uid(EEikStatusPaneUidNavi)));
+
+    CAknNavigationDecorator* decorator = NULL;
+    if ( aResource == KZeroResourceId ) // dummy tab
+        {
+        naviPane->PushDefaultL( EFalse );
+        }
+    else
+        {
+        decorator = naviPane->CreateTabGroupL(iKeyProcessor.TabObserver());
+        decorator->SetControlType( CAknNavigationDecorator::ETabGroup );
+        CAknTabGroup* tabGroup =
+        static_cast< CAknTabGroup* > ( decorator->DecoratedControl() );
+        AddTabsL( *tabGroup );
+        }
+    return decorator;
+    }
+
+// ----------------------------------------------------
+// CLmkBaseContainer::StatusPane
+// ----------------------------------------------------
+//
+CEikStatusPane* CLmkBaseContainer::StatusPane()
+    {
+    return iEikonEnv->AppUiFactory()->StatusPane();
+    }
+
+// ---------------------------------------------------------
+// CLmkBaseContainer::MenuBar
+// ---------------------------------------------------------
+//
+CEikMenuBar* CLmkBaseContainer::MenuBar()
+    {
+    return NULL;
+    }
+
+// ---------------------------------------------------------
+// CLmkBaseContainer::ContextSpecificMenuBar
+// ---------------------------------------------------------
+//
+TInt CLmkBaseContainer::ContextSpecificMenuBar()
+    {
+    return 0;
+    }
+
+// ---------------------------------------------------------
+// CLmkBaseContainer::OptionsMenuBar
+// ---------------------------------------------------------
+//
+TInt CLmkBaseContainer::OptionsMenuBar()
+    {
+    return 0;
+    }
+
+// Code added by gaurav fro Tab Icons -start-
+// ----------------------------------------------------
+// CLmkBaseContainer::AddTabsL
+// ----------------------------------------------------
+//
+void CLmkBaseContainer::AddTabsL(CAknTabGroup& aTabGroup)
+    {
+    aTabGroup.SetTabFixedWidthL(EAknTabWidthWithTwoTabs);
+
+    MAknsSkinInstance* skin = AknsUtils::SkinInstance();
+    HBufC* filename = GetBitmapFilenameLC();
+    CFbsBitmap* bitmap = NULL;
+    CFbsBitmap* bitmapMask = NULL;
+
+    //Add tab icon 1
+    AknsUtils::CreateIconLC( skin,
+                            KAknsIIDQgnPropLmNamesTab2,
+                            bitmap,
+                            bitmapMask,
+                            *filename,
+                            EMbmLandmarksQgn_prop_lm_names_tab2,
+                            EMbmLandmarksQgn_prop_lm_names_tab2_mask );
+    aTabGroup.AddTabL( ELmkByLmView, bitmap, bitmapMask ); //ELmkByLmView
+    CleanupStack::Pop(2); //bitmap, bitmapmask
+
+
+    //Add tab icon 2
+    AknsUtils::CreateIconLC( skin,
+                            KAknsIIDQgnPropLmCategoriesTab2,
+                            bitmap,
+                            bitmapMask,
+                            *filename,
+                            EMbmLandmarksQgn_prop_lm_categories_tab2,
+                            EMbmLandmarksQgn_prop_lm_categories_tab2_mask );
+    aTabGroup.AddTabL(ELmkByCategoryView, bitmap, bitmapMask ); // ELmkByCategoryView
+    CleanupStack::Pop(2); //bitmap, bitmapmask
+
+    CleanupStack::PopAndDestroy(); //filename
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkBaseContainer::GetBitmapFilenameL
+// ----------------------------------------------------------------------------
+//
+HBufC* CLmkBaseContainer::GetBitmapFilenameLC()
+    {
+
+    TBuf<2> aApp;
+    CEikAppUi *appUi = (CEikAppUi *)(iCoeEnv->AppUi());
+    TFileName* full = new( ELeave ) TFileName;
+    CleanupStack::PushL( full );
+    *full = appUi->Application()->AppFullName();
+    TParsePtr ptr(*full);
+    aApp.Copy(ptr.Drive());
+
+	// Path and file name:
+    TFileName* file = new( ELeave ) TFileName;
+    CleanupStack::PushL( file );
+    file->Append( KLmkSystemMbmPath ); // always safe
+    file->Append( KLandmarksIconFileName ); // always safe
+
+    // Add drive to path & file name:
+    TParse* parse = new(ELeave) TParse;
+    CleanupStack::PushL( parse );
+    User::LeaveIfError( parse->Set( *file, &aApp, NULL ) );
+	HBufC* retFileName = parse->FullName().AllocLC();
+	CleanupStack::Pop();//retFileName
+	CleanupStack::PopAndDestroy(3);
+	CleanupStack::PushL( retFileName );
+    return retFileName;
+    }
+
+// ---------------------------------------------------------
+// CLmkBaseContainer::ResolveMskDisplayItem()
+// ---------------------------------------------------------
+//
+TLmkMskDispItem CLmkBaseContainer::ResolveMskDisplayItem()
+	{
+	TLmkMskDispItem dispItem  = ELabel;
+	if (iSearchInitiated && (!SelectorImpl().ListVisibleItemCount()))
+		{
+		dispItem = ENoMsk;
+		}
+	else
+		{
+		const CArrayFix<TInt>* markedIndexes = NULL;
+		markedIndexes = SelectorImpl().MarkedIndexes();
+        if(markedIndexes->Count() > 0 ||
+        !SelectorImpl().ListVisibleItemCount())
+            {
+            dispItem = EContextMenu;
+            }
+		}
+
+	return dispItem;
+	}
+
+#ifdef RD_SCALABLE_UI_V2
+// ---------------------------------------------------------
+// CLmkBaseContainer::SetListBoxObserver()
+// ---------------------------------------------------------
+//
+void CLmkBaseContainer::SetListBoxObserver(MEikListBoxObserver* /*aObserver*/)
+	{
+	//Since CLmkCategorySettingsContainer is directly derived from
+	// CLmkBaseContainer, is the reason this function is made virtual
+	//in this class. Most of the other container classes are derived
+	//from CLmkLbWithFilterContainer, which is derived from CLmkBaseContainer,
+	//hence there will be two overriding of this function,
+	//1. In 	CLmkCategorySettingsContainer
+	//2. In     CLmkLbWithFilterContainer
+	//since both the above classes holds the CEikListBox member, where the
+	//observer needs to be set.
+	}
+#endif//RD_SCALABLE_UI_V2
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/app/src/CLmkBaseView.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,213 @@
+/*
+* 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:    LandmarksUi Content File -    Provides LM main view class methods.
+*
+*/
+
+
+
+
+
+
+
+// INCLUDE FILES
+#include "CLmkBaseView.h"
+#include "CLmkBaseContainer.h"
+#include "landmarks.hrh"
+#include <aknlists.h>
+#include <aknViewAppUi.h>
+#include <AknQueryDialog.h>
+#include <featmgr.h>
+#include <StringLoader.h>
+#include <eikmenub.h> // CEikMenuBar
+#include <landmarks.rsg>
+#include "clmkmapnavigationinterface.h"
+#include <locationvariationdomaincrkeys.h>
+#include <centralrepository.h>
+
+// ================= MEMBER FUNCTIONS =======================
+
+// ---------------------------------------------------------
+// CLmkBaseView::ConstructL
+// ---------------------------------------------------------
+//
+CLmkBaseView::CLmkBaseView( MLmkKeyProcessor& aKeyProcessor )
+        : iKeyProcessor( aKeyProcessor )
+    {
+    }
+
+// ---------------------------------------------------------
+// CLmkBaseView::BaseConstructL
+// Symbian 2nd phase constructor can leave.
+// ---------------------------------------------------------
+//
+void CLmkBaseView::BaseConstructL( TInt aResId )
+    {
+    FeatureManager::InitializeLibL();
+    CAknView::BaseConstructL( aResId );
+	
+    // Check if the Coordinates has to be hidden
+	CheckHideCoordinateL();
+    }
+
+// ---------------------------------------------------------
+// CLmkBaseView::~CLocBaseView()
+// ---------------------------------------------------------
+//
+CLmkBaseView::~CLmkBaseView()
+    {
+    if ( iBaseContainer )
+        {
+        AppUi()->RemoveFromViewStack( *this, iBaseContainer );
+        }
+    delete iBaseContainer;
+    FeatureManager::UnInitializeLib();
+    if(iMapNavInterface)
+    	{
+    	iMapNavInterface->Release();
+    	}
+    }
+
+// ---------------------------------------------------------
+// CLmkBaseView::ProcessKeyEventL
+// ---------------------------------------------------------
+//
+TBool CLmkBaseView::ProcessKeyEventL( const TKeyEvent& aKeyEvent,
+                                      TEventCode aType )
+    {
+    return iKeyProcessor.ProcessKeyEventL( aKeyEvent, aType );
+    }
+
+// ---------------------------------------------------------
+// CLmkBaseView::TabObserver()
+// ---------------------------------------------------------
+//
+MAknTabObserver* CLmkBaseView::TabObserver()
+    {
+    return iKeyProcessor.TabObserver();
+    }
+
+// ---------------------------------------------------------
+// CLmkBaseView::HandleHelpFeature
+// ---------------------------------------------------------
+//
+void CLmkBaseView::HandleHelpFeature( CEikMenuPane* aMenuPane ) const
+    {
+    if ( FeatureManager::FeatureSupported( KFeatureIdHelp ) &&
+            !iIsHideHelp )
+        {
+        aMenuPane->SetItemDimmed( EAknCmdHelp, EFalse );
+        }
+    else
+        {
+        aMenuPane->SetItemDimmed( EAknCmdHelp, ETrue );
+        }
+    }
+
+// ---------------------------------------------------------
+// CLmkBaseView::CheckHideCoordinateL()
+// ---------------------------------------------------------
+//
+void CLmkBaseView::CheckHideCoordinateL()
+	{
+    TInt coordinateSettingValue = ELocCoordinatesNotHidden;
+    TInt helpSettingValue = ELocHelpNotHidden;
+    CRepository* repository = CRepository::NewL( TUid::Uid( KCRUidLocLocalVariation) );
+    CleanupStack::PushL( repository );
+    User::LeaveIfError( repository->Get( KLocHideCoordinates,
+                                              coordinateSettingValue ));  
+    User::LeaveIfError( repository->Get( KLocHideHelp,
+                                              helpSettingValue ));  
+    CleanupStack::PopAndDestroy( repository );
+	
+	if( ELocCoordinatesHidden == coordinateSettingValue )
+		iIsHideCoordinate = ETrue;
+	else
+		iIsHideCoordinate = EFalse;
+	
+	if( ELocHelpHidden == helpSettingValue )
+		iIsHideHelp = ETrue;
+	else
+		iIsHideHelp = EFalse;
+	
+	}
+
+// ---------------------------------------------------------
+// CLmkBaseView::Update()
+// ---------------------------------------------------------
+//
+void CLmkBaseView::Update()
+	{
+	//base class do not have any implementation logic
+	}
+
+// ---------------------------------------------------------
+// CLmkBaseView::EnableMskMenuL()
+// ---------------------------------------------------------
+//
+void CLmkBaseView::EnableMskMenuL(TBool /*aEnable*/)
+	{
+	//base class do not have any implementation logic
+	}
+
+// ---------------------------------------------------------
+// CLmkBaseView::EnableMskLabelL()
+// ---------------------------------------------------------
+//
+void CLmkBaseView::EnableMskLabelL(TBool /*aEnable*/)
+	{
+	//base class do not have any implementation logic
+	}
+
+// ---------------------------------------------------------
+// CLmkBaseView::UpdateMskViewL()
+// ---------------------------------------------------------
+//
+void CLmkBaseView::UpdateMskViewL(TLmkMskDispItem aMskDispItem)
+	{
+	switch(aMskDispItem)
+		{
+		case EContextMenu:
+			{
+			EnableMskMenuL(ETrue);
+			break;
+			}
+		case ELabel:
+			{
+			EnableMskLabelL(ETrue);
+			break;
+			}
+		case ENoMsk:
+			{
+			EnableMskMenuL(EFalse);
+			EnableMskLabelL(EFalse);
+			break;
+			}
+		default:
+		    User::Leave(KErrGeneral);
+			break;
+		}
+	}
+
+#ifdef RD_SCALABLE_UI_V2
+// ---------------------------------------------------------
+// CLmkBaseView::HandleListBoxEventL()
+// ---------------------------------------------------------
+//
+void CLmkBaseView::HandleListBoxEventL( CEikListBox* /*aListBox*/, TListBoxEvent /*aEventType*/ )
+	{
+	//does nothing
+	}
+#endif//RD_SCALABLE_UI_V2
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/app/src/CLmkByCategoryContainer.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,163 @@
+/*
+* 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:    Provides LM compass view's container class methods.
+*
+*/
+
+
+// INCLUDE FILES
+#include <aknlists.h>
+#include <aknsfld.h>
+#include <landmarks.rsg>
+// For RD_AVKON_UNBRANCH
+#include <bldvariant.hrh>
+#include <AknDef.h>
+#include "CLmkUiUtils.h"
+#include "landmarks.hrh"
+#include <csxhelp/lm.hlp.hrh>
+#include "CLmkByCategoryView.h"
+#include "CLmkByCategoryContainer.h"
+#include "CLmkAppCategorySelectorImpl.h"
+
+#include <lmkui.rsg>
+
+// ================= MEMBER FUNCTIONS =======================
+// ----------------------------------------------------------------------------
+// CLmkByCategoryContainer::NewL
+// ----------------------------------------------------------------------------
+//
+CLmkByCategoryContainer* CLmkByCategoryContainer::NewL(
+    MLmkKeyProcessor& aKeyProcessor,
+    MObjectProvider* aParent,
+	const TRect& aRect, CAknView& aView )
+	{
+	CLmkByCategoryContainer* self =
+		new( ELeave ) CLmkByCategoryContainer( aKeyProcessor, aView );
+	CleanupStack::PushL( self );
+	self->SetMopParent( aParent );
+	self->ConstructL( aRect );
+        CleanupStack::Pop(); // self
+	return self;
+	}
+
+// ----------------------------------------------------------------------------
+// CLmkByCategoryContainer::CLmkByCategoryContainer
+// ----------------------------------------------------------------------------
+//
+CLmkByCategoryContainer::CLmkByCategoryContainer(
+                          MLmkKeyProcessor& aKeyProcessor, CAknView& aView ) :
+    CLmkLbWithFilterContainer( aKeyProcessor, KLM_HLP_LM_BY_CATEGORY ),
+    iView(aView)
+    {
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkByCategoryContainer::~CLmkByCategoryContainer
+// ----------------------------------------------------------------------------
+//
+CLmkByCategoryContainer::~CLmkByCategoryContainer()
+    {
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkByCategoryContainer::SetupTitlePaneL
+// ----------------------------------------------------------------------------
+//
+void CLmkByCategoryContainer::SetupTitlePaneL()
+    {
+    CLmkUiUtils::ChangeTitlePaneL( R_LMK_BYCATEGORY_VIEW_TITLE );
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkByCategoryContainer::SetupSelectorAndListL
+// ----------------------------------------------------------------------------
+//
+void CLmkByCategoryContainer::SetupSelectorAndListL(
+    CPosLandmarkDatabase& aDb,
+    CLmkSender& aSender )
+    {
+    iSelector = CLmkAppCategorySelectorImpl::NewL( aDb, aSender, ETrue );
+    iSelector->SetMskObserver(this);
+    iListBox = &( iSelector->CreateListBoxL( this,
+                                             EAknCtSingleGraphicListBox,
+                                             EAknListBoxSelectionList,
+                                             R_LMK_EMPTY_NO_LANDMARKS ,R_LMK_GUIDE_NEW_LANDMARK ) );
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkByCategoryContainer::GetCurrentCategoryId
+// ----------------------------------------------------------------------------
+//
+TInt CLmkByCategoryContainer::GetCurrentCategoryId()
+	{
+	return (static_cast<CLmkAppCategorySelectorImpl*>(iSelector))->CurrentCategoryId();
+	}
+
+// ----------------------------------------------------------------------------
+// CLmkByCategoryContainer::SetupNaviPaneL
+// ----------------------------------------------------------------------------
+//
+void CLmkByCategoryContainer::SetupNaviPaneL()
+    {
+    iNaviDeco = CreateNaviPaneL( R_LMK_TAB_GROUP );
+    ActivateTabL( *iNaviDeco, ELmkByCategoryView );
+    }
+
+// -----------------------------------------------------------------------------
+//CLmkByCategoryContainer::HandleResourceChange
+// -----------------------------------------------------------------------------
+//
+void CLmkByCategoryContainer::HandleResourceChange( TInt aType )
+    {
+    CCoeControl::HandleResourceChange( aType );
+    if ( aType == KEikDynamicLayoutVariantSwitch )
+        {
+        (static_cast <CLmkByCategoryView *> (&iView))->Update();
+        }
+	if (iListBox)
+		{
+		iListBox->DrawNow();
+		}
+	if( iFindBox && iFindBox->IsVisible() )
+		{
+		iFindBox->DrawNow();
+		}
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkByCategoryContainer::FocusChanged()
+// ----------------------------------------------------------------------------
+//
+void CLmkByCategoryContainer::FocusChanged(TDrawNow aDrawNow)
+	{
+	if (iListBox)
+		{
+		iListBox->SetFocus(IsFocused(), aDrawNow);
+		}
+	if( iFindBox && iFindBox->IsVisible() )
+		{
+		iFindBox->SetFocus( IsFocused(), aDrawNow );
+		}
+	}
+
+// ----------------------------------------------------------------------------
+// CLmkByCategoryContainer::UpdateMskContainer()
+// ----------------------------------------------------------------------------
+//
+void CLmkByCategoryContainer::UpdateMskContainerL()
+	{
+	CLmkBaseView* view = reinterpret_cast<CLmkBaseView*>(&iView);
+	 view->UpdateMskViewL(ResolveMskDisplayItem());
+	}
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/app/src/CLmkByCategoryView.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,431 @@
+/*
+ * Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies 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 LM main view class methods.
+ *
+ */
+
+// INCLUDE FILES
+
+#include <EPos_CPosLandmarkDatabase.h>
+#include <aknViewAppUi.h>
+#include <landmarks.rsg>
+#include <eikmenup.h>
+#include <featmgr.h>
+#include <StringLoader.h>
+#include <lmkerrors.h>  // for landmarksui panic codes
+#include "CLmkDocument.h"
+#include "CLmkAppUi.h"
+#include "CLmkByCategoryView.h"
+#include "CLmkByCategoryContainer.h"
+#include "CLmkAppSelectorImplBase.h"
+#include "landmarks.hrh"
+#include "MLmkListMemento.h"
+#include "Debug.h"
+#include "LmkConsts.h"
+#include "clmkmapnavigationinterface.h"
+
+#if defined(_DEBUG)
+// CONSTANTS
+/// Unnamed namespace for local definitions
+namespace
+    {
+    _LIT( KPanicMsg, "CLmkByCategoryView" );
+
+    void Panic(TPanicCode aReason)
+        {
+        User::Panic(KPanicMsg, aReason);
+        }
+    } // namespace
+#endif
+
+// ================= MEMBER FUNCTIONS =======================
+// ----------------------------------------------------------------------------
+// CLmkByCategoryView::NewLC( MLmkKeyProcessor& aKeyProcessor )
+// Two-phased constructor.
+// ----------------------------------------------------------------------------
+//
+CLmkByCategoryView* CLmkByCategoryView::NewLC(MLmkKeyProcessor& aKeyProcessor)
+    {
+    CLmkByCategoryView* self = new (ELeave) CLmkByCategoryView(aKeyProcessor);
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    return self;
+    }
+// ----------------------------------------------------------------------------
+// CLmkByCategoryView::CLmkByCategoryView
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// ----------------------------------------------------------------------------
+//
+CLmkByCategoryView::CLmkByCategoryView(MLmkKeyProcessor& aKeyProcessor) :
+    CLmkBaseView(aKeyProcessor)
+    {
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkByCategoryView::ConstructL
+// Symbian 2nd phase constructor can leave.
+// ----------------------------------------------------------------------------
+//
+void CLmkByCategoryView::ConstructL()
+    {
+    if (iEikonEnv->StartedAsServerApp())
+        {
+        BaseConstructL(R_LMK_BYCATEGORY_EMBEDDED_VIEW);
+        isEmbeddedLaunch = ETrue;
+        }
+    else
+        {
+        BaseConstructL(R_LMK_BYCATEGORY_VIEW);
+        }
+
+    CLmkAppUi* lmkAppUi = static_cast<CLmkAppUi*> (AppUi());
+    CPosLandmarkDatabase& db = lmkAppUi->Document().LmDbL();
+    iMapNavInterface = CLmkMapNavigationInterface::NewL(db);
+    AttachAIWMenuInterestL();
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkByCategoryView::~CLmkByCategoryView
+// ----------------------------------------------------------------------------
+//
+CLmkByCategoryView::~CLmkByCategoryView()
+    {
+    if (iContainer)
+        {
+        AppUi()->RemoveFromViewStack(*this, iContainer);
+        }
+    delete iContainer;
+    delete iListMemento;
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkByCategoryView::AttachAIWMenuInterestL
+// ----------------------------------------------------------------------------
+//
+void CLmkByCategoryView::AttachAIWMenuInterestL()
+    {
+    iMapNavInterface->AttachAIWInterestL(R_LMK_NEW_LANDMARK_SUBMENU,
+            R_LMK_AIW_INTEREST_SELECTFROMMAP);
+    iMapNavInterface->AttachAIWInterestL(R_LMK_BYCATEGORY_MENU,
+            R_LMK_AIW_INTEREST_SHOWONMAP);
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkByCategoryView::BorrowMemento
+// ----------------------------------------------------------------------------
+//
+const MLmkListMemento& CLmkByCategoryView::BorrowMemento()
+    {
+    // This method gets never called before memento is created:
+    __ASSERT_DEBUG( iListMemento, Panic( KLmkPanicIllegalMementoAccess ) );
+    return *iListMemento;
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkByCategoryView::ProcessKeyEventL
+// ----------------------------------------------------------------------------
+//
+TBool CLmkByCategoryView::ProcessKeyEventL(const TKeyEvent& aKeyEvent,
+        TEventCode aType)
+    {
+    return CLmkBaseView::ProcessKeyEventL(aKeyEvent, aType);
+    }
+
+// ----------------------------------------------------------------------------
+// TUid CLmkByCategoryView::Id
+// ----------------------------------------------------------------------------
+//
+TUid CLmkByCategoryView::Id() const
+    {
+    return TUid::Uid(ELmkByCategoryView);
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkByCategoryView::HandleCommandL
+// ----------------------------------------------------------------------------
+//
+void CLmkByCategoryView::HandleCommandL(TInt aCommand)
+    {
+    TInt aiwCmd = iMapNavInterface->GetServiceCmdByMenuCmd(aCommand);
+
+    // Handles Map and Navigation commands
+    if (KAiwCmdNone != aiwCmd)
+        {
+        switch (aiwCmd)
+            {
+            case KAiwCmdMnShowMap:
+                {
+                TInt catId = iContainer->GetCurrentCategoryId();
+                iMapNavInterface->ShowCategoryOnMapL(catId, aCommand,
+                        CLmkMapNavigationInterface::EByCategoryView);
+                break;
+                }
+            case KAiwCmdMnSelectFromMap:
+                {
+                iMapNavInterface->SetObserver(&iContainer->SelectorImpl());
+                iMapNavInterface->GetLandmarkFromMapL(aCommand);
+                break;
+                }
+            }
+        return;
+        }
+    switch (aCommand)
+        {
+        case ELmkCmdNewLmCurrentLocation:
+        case ELmkCmdNewLmEmpty:
+        case ELmkCmdLaunchPositionSettings:
+            {
+            iContainer->SelectorImpl().ProcessCommandL(aCommand);
+            break;
+            }
+        case ELmkCmdOpenCat:
+            {
+            // Store current status before activating category contents view:
+            iContainer->SelectorImpl().StoreMemento();
+            AppUi()->ActivateLocalViewL(TUid::Uid(ELmkCategoryContentsView));
+            break;
+            }
+        default:
+            {
+            AppUi()->HandleCommandL(aCommand);
+            break;
+            }
+        }
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkByCategoryView::DynInitMenuPaneL
+// ----------------------------------------------------------------------------
+//
+void CLmkByCategoryView::DynInitMenuPaneL(TInt aResourceId,
+        CEikMenuPane* aMenuPane)
+    {
+    TInt count(iContainer->SelectorImpl().ListVisibleItemCount());
+    iMapNavInterface->HandleMenuOperationL(aResourceId, aMenuPane,
+            ELmkCmdMnNav);
+    switch (aResourceId)
+        {
+        case R_LMK_BYCATEGORY_MENU:
+            {
+            if (count == 0)
+                {
+                aMenuPane->SetItemDimmed(ELmkCmdOpenCat, ETrue);
+                TInt count = aMenuPane->NumberOfItemsInPane();
+                // Dim show on map when no categories
+                for (TInt i = 0; i < count; ++i)
+                    {
+                    CEikMenuPaneItem::SData& itemData =
+                            aMenuPane->ItemDataByIndexL(i);
+                    if (iMapNavInterface->GetServiceCmdByMenuCmd(
+                            itemData.iCommandId) == KAiwCmdMnShowMap)
+                        {
+                        aMenuPane->SetItemDimmed(itemData.iCommandId, ETrue);
+                        }
+                    }
+                }
+            else
+                {
+                TInt cnt = aMenuPane->NumberOfItemsInPane();
+                for (TInt i = 0; i < cnt; ++i)
+                    {
+                    CEikMenuPaneItem::SData& itemData =
+                            aMenuPane->ItemDataByIndexL(i);
+                    if (iMapNavInterface->GetServiceCmdByMenuCmd(
+                            itemData.iCommandId) == KAiwCmdMnShowMap)
+                        {
+                        aMenuPane->SetItemDimmed(itemData.iCommandId, EFalse);
+                        aMenuPane->SetItemSpecific(itemData.iCommandId, ETrue);
+                        }
+                    }
+                }
+            break;
+            }
+        case R_LMK_MAIN_MENU:
+            {
+            CLmkBaseView::HandleHelpFeature(aMenuPane);
+            break;
+            }
+        case R_LMK_NEW_LANDMARK_SUBMENU:
+            {
+            if (FeatureManager::FeatureSupported(
+                    KFeatureIdLocationFrameworkCore))
+                {
+                aMenuPane->SetItemDimmed(ELmkCmdNewLmCurrentLocation, EFalse);
+                }
+            else
+                {
+                aMenuPane->SetItemDimmed(ELmkCmdNewLmCurrentLocation, ETrue);
+                }
+
+            if (iIsHideCoordinate)
+                {
+                aMenuPane->SetItemDimmed(ELmkCmdNewLmEmpty, ETrue);
+                }
+            else
+                {
+                aMenuPane->SetItemDimmed(ELmkCmdNewLmEmpty, EFalse);
+                }
+            break;
+            }
+        default:
+            {
+            break;
+            }
+        }
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkByCategoryView::DoActivateL
+// ----------------------------------------------------------------------------
+//
+void CLmkByCategoryView::DoActivateL(const TVwsViewId& /*aPrevViewId*/,
+        TUid /*aCustomMessageId*/, const TDesC8& /*aCustomMessage*/)
+    {
+    DEBUG( CLmkByCategoryView::DoActivateL entered );
+    TRAP_IGNORE(EnableMskMenuL(EFalse));
+    TRAP_IGNORE(EnableMskLabelL(EFalse));
+    if (!iContainer)
+        {
+        iContainer = CLmkByCategoryContainer::NewL(*this, this, ClientRect(),
+                *this);
+
+        CLmkAppSelectorImplBase& selector = iContainer->SelectorImpl();
+        AppUi()->AddToStackL(*this, iContainer);
+#ifdef RD_SCALABLE_UI_V2
+        //for touch event
+        iContainer->SetListBoxObserver(this);
+#endif//RD_SCALABLE_UI_V2
+        if (!iListMemento)
+            { // Memento not created yet, create it now:
+            iListMemento = selector.MementoL();
+            }
+        selector.SetMemento(*iListMemento);
+        selector.RestoreMemento();
+        EnableMskLabelL(EFalse);
+        }
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkByCategoryView::DoDeactivate
+// ----------------------------------------------------------------------------
+//
+void CLmkByCategoryView::DoDeactivate()
+    {
+    if (iContainer)
+        {
+        iContainer->SelectorImpl().StoreMemento();
+        AppUi()->RemoveFromViewStack(*this, iContainer);
+        }
+    TRAP_IGNORE( EnableMskMenuL( EFalse ) );
+    TRAP_IGNORE( EnableMskLabelL( EFalse ) );
+    delete iContainer;
+    iContainer = NULL;
+    }
+
+// ---------------------------------------------------------
+// CLmkByCategoryView::Update()
+// ---------------------------------------------------------
+//
+void CLmkByCategoryView::Update()
+    {
+    iContainer->SetRect(ClientRect());
+    }
+
+// ---------------------------------------------------------
+// CLmkByCategoryView::EnableMskMenuL()
+// ---------------------------------------------------------
+//
+void CLmkByCategoryView::EnableMskMenuL(TBool aEnable)
+    {
+    CEikButtonGroupContainer* cbaGrp = Cba();
+    if (cbaGrp)
+        {
+        if (aEnable)
+            {
+            cbaGrp->RemoveCommandFromStack(KMskCommandPos, ELmkCmdOpenLm);
+            TInt
+                    cbaRes =
+                            isEmbeddedLaunch
+                                             ? R_LMK_SOFTKEYS_OPTIONS_BACK_CONTEXTOPTIONS
+                                                : R_LMK_SOFTKEYS_OPTIONS_EXIT_CONTEXTOPTIONS;
+            cbaGrp->SetCommandSetL(cbaRes);
+            }
+        //This context menu will always be dimmed.
+        cbaGrp->MakeCommandVisible(EAknSoftkeyContextOptions, EFalse);
+        }
+    }
+
+// ---------------------------------------------------------
+// CLmkByCategoryView::EnableMskLabelL()
+// ---------------------------------------------------------
+//
+void CLmkByCategoryView::EnableMskLabelL(TBool aEnable)
+    {
+    CEikButtonGroupContainer* cbaGrp = Cba();
+    if (cbaGrp)
+        {
+        if (aEnable)
+            {
+            HBufC* mskOpenTxt = NULL;
+            mskOpenTxt = StringLoader::LoadLC(R_LMK_MSK_OPEN, iEikonEnv);
+            cbaGrp->RemoveCommandFromStack(KMskCommandPos,
+                    EAknSoftkeyContextOptions);
+            cbaGrp->AddCommandToStackL(KMskCommandPos, ELmkCmdOpenCat,
+                    mskOpenTxt->Des());
+            cbaGrp->MakeCommandVisible(ELmkCmdOpenCat, ETrue);
+            CleanupStack::PopAndDestroy(mskOpenTxt);
+            }
+        else
+            {
+            cbaGrp->MakeCommandVisible(ELmkCmdOpenCat, EFalse);
+            }
+        }
+    }
+
+#ifdef RD_SCALABLE_UI_V2
+// ---------------------------------------------------------
+// CLmkByCategoryView::HandleListBoxEventL()
+// ---------------------------------------------------------
+//
+void CLmkByCategoryView::HandleListBoxEventL(CEikListBox* /*aListBox*/,
+        TListBoxEvent aEventType)
+    {
+    switch (aEventType)
+        {
+        // Add enter key handling
+        case EEventEnterKeyPressed:
+            {
+            // Store current status before activating category contents view:
+            if (iContainer->SelectorImpl().ListVisibleItemCount() > 0)
+                {
+                iContainer->SelectorImpl().StoreMemento();
+                static_cast<CAknViewAppUi*> (iAvkonAppUi)-> ActivateLocalViewL(
+                        TUid::Uid(ELmkCategoryContentsView));
+                }
+            break;
+            }
+        //case EEventItemDoubleClicked:
+        case EEventItemSingleClicked:
+            {
+            HandleCommandL(ELmkCmdOpenCat);
+            break;
+            }
+        default:
+            break;
+        }
+    }
+#endif//RD_SCALABLE_UI_V2
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/app/src/CLmkByLmContainer.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,372 @@
+/*
+ * Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies 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 LM compass view's container class methods.
+ *
+ */
+
+// INCLUDE FILES
+#include <aknlists.h>
+#include <aknview.h>
+#include <eikmenub.h>
+#include <aknsfld.h>
+#include <layoutmetadata.cdl.h> // To Check TOUCH Support
+// For RD_AVKON_UNBRANCH
+#include <bldvariant.hrh>
+#include <AknDef.h>
+#include <landmarks.rsg>
+#include "CLmkAppUi.h"
+#include "CLmkUiUtils.h"
+#include "CLmkSender.h"
+#include <csxhelp/lm.hlp.hrh>
+#include "CLmkByLmView.h"
+#include "CLmkByLmContainer.h"
+#include "CLmkAppLmSelectorImpl.h"
+#include "landmarks.hrh"
+#include <lmkui.rsg>
+#include "Debug.h"
+
+// ----------- Touch feedback additions start
+#ifdef RD_TACTILE_FEEDBACK
+#include <touchfeedback.h>
+#endif //RD_TACTILE_FEEDBACK
+// ----------- Touch feedback additions end
+
+// ================= MEMBER FUNCTIONS =======================
+// ----------------------------------------------------------------------------
+// CLmkByLmContainer::NewL
+// ----------------------------------------------------------------------------
+//
+CLmkByLmContainer* CLmkByLmContainer::NewL(MLmkKeyProcessor& aKeyProcessor,
+        MObjectProvider* aParent, const TRect& aRect, CAknView& aView)
+    {
+    CLmkByLmContainer* self = new (ELeave) CLmkByLmContainer(aKeyProcessor,
+            aView);
+    CleanupStack::PushL(self);
+    self->SetMopParent(aParent);
+    self->ConstructL(aRect);
+    CleanupStack::Pop(); // self
+    return self;
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkByLmContainer::ConstructL
+// ----------------------------------------------------------------------------
+//
+void CLmkByLmContainer::ConstructL(const TRect& aRect)
+    {
+    CLmkLbWithFilterContainer::ConstructL(aRect);
+    iFindBox->SetObserver(this);
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkByLmContainer::CLmkByLmContainer
+// ----------------------------------------------------------------------------
+//
+CLmkByLmContainer::CLmkByLmContainer(MLmkKeyProcessor& aKeyProcessor,
+        CAknView& aView) :
+    CLmkLbWithFilterContainer(aKeyProcessor, KLM_HLP_LM_BY_NAME),
+            iView(aView)
+    {
+    iIsEditorOpened = EFalse;
+    iHandlePointerEvent = ETrue;
+    }
+// ----------------------------------------------------------------------------
+// CLmkByLmContainer::~CLmkByLmContainer
+// ----------------------------------------------------------------------------
+//
+CLmkByLmContainer::~CLmkByLmContainer()
+    {
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkByLmContainer::SetupTitlePaneL
+// ----------------------------------------------------------------------------
+//
+void CLmkByLmContainer::SetupTitlePaneL()
+    {
+    CLmkUiUtils::ChangeTitlePaneL( R_LMK_BYLM_VIEW_TITLE);
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkByLmContainer::SetupSelectorAndListL
+// ----------------------------------------------------------------------------
+//
+void CLmkByLmContainer::SetupSelectorAndListL(CPosLandmarkDatabase& aDb,
+        CLmkSender& aSender)
+    {
+    iSelector = CLmkAppLmSelectorImpl::NewL(aDb, aSender, ETrue);
+    iSelector->SetMskObserver(this);
+    iListBox = &(iSelector->CreateListBoxL(this, EAknCtSingleGraphicListBox,
+#ifdef RD_SCALABLE_UI_V2
+            EAknListBoxStylusMarkableList,
+#else
+            EAknListBoxMarkableList,
+#endif //RD_SCALABLE_UI_V2
+            R_LMK_EMPTY_NO_LANDMARKS, R_LMK_GUIDE_NEW_LANDMARK));
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkByLmContainer::SetupNaviPaneL
+// ----------------------------------------------------------------------------
+//
+void CLmkByLmContainer::SetupNaviPaneL()
+    {
+    iNaviDeco = CreateNaviPaneL(R_LMK_TAB_GROUP);
+    ActivateTabL(*iNaviDeco, ELmkByLmView);
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkByLmContainer::OfferKeyEventL
+// ----------------------------------------------------------------------------
+//
+TKeyResponse CLmkByLmContainer::OfferKeyEventL(const TKeyEvent& aKeyEvent,
+        TEventCode aType)
+    {
+    DEBUG( CLmkByLmContainer::OfferKeyEventL entered );
+    DEBUG2( aKeyEvent.iCode=%d aKeyEvent.iScanCode=%d,
+            aKeyEvent.iCode,
+            aKeyEvent.iScanCode
+    );
+    DEBUG3( aKeyEvent.iModifiers=%d aKeyEvent.iRepeats=%d aType=%d,
+            aKeyEvent.iModifiers,
+            aKeyEvent.iRepeats,
+            aType
+    );
+
+    TBool shiftKeyPressed = (aKeyEvent.iModifiers & EModifierShift)
+            || (aKeyEvent.iModifiers & EModifierLeftShift)
+            || (aKeyEvent.iModifiers & EModifierRightShift);
+
+    if (aKeyEvent.iScanCode == EStdKeyUpArrow || aKeyEvent.iScanCode
+            == EStdKeyDownArrow)
+        {
+        if (aType == EEventKey)
+            {
+            if (iListBox->OfferKeyEventL(aKeyEvent, aType) == EKeyWasConsumed)
+                {
+                if (shiftKeyPressed)
+                    UpdateMskContainerL();
+                return EKeyWasConsumed;
+                }
+            }
+        return EKeyWasNotConsumed;
+        }
+
+    CLmkAppSelectorImplBase& selector = SelectorImpl();
+    TInt markedCount(selector.ListMarkedItemCountL());
+    TInt visibleCount(selector.ListVisibleItemCount());
+    DEBUG1( CLmkByLmContainer::OfferKeyEventL markedCount=%d,markedCount );
+    DEBUG1( CLmkByLmContainer::OfferKeyEventL visibleCount=%d,visibleCount );
+
+    if (aKeyEvent.iCode == EKeyOK && !shiftKeyPressed && aType == EEventKey)
+        {
+        DEBUG( CLmkByLmContainer::OfferKeyEventL EKeyOK );
+        if (visibleCount > 0 && markedCount < 1)
+            {
+            DEBUG( CLmkByLmContainer::OfferKeyEventL EKeyOK ELmkCmdOpenLm );
+            // Launch landmark viewer here
+            selector.ProcessCommandL(ELmkCmdOpenLm);
+            iIsEditorOpened = ETrue;
+            return EKeyWasConsumed;
+            }
+        else
+            {
+            DEBUG( CLmkByLmContainer::OfferKeyEventL EKeyOK show menubar );
+            CEikMenuBar* menubar =
+                    static_cast<CAknViewAppUi*> (iAvkonAppUi)->View(
+                            TUid::Uid(ELmkByLmView))->MenuBar();
+            if (menubar)
+                {
+                menubar->SetMenuTitleResourceId(R_LMK_OK_MENUBAR);
+
+                menubar->StopDisplayingMenuBar();
+                TRAPD(err, menubar->TryDisplayMenuBarL());
+                DEBUG1( CLmkByLmContainer::OfferKeyEventL menubar->TryDisplayMenuBarL() = %d,err );
+                // set ordinary menubar back even in case of error
+                menubar->SetMenuTitleResourceId(R_LMK_BYLM_MENUBAR);
+                User::LeaveIfError( err);
+                }
+
+            return EKeyWasConsumed;
+            }
+        }
+    else if (shiftKeyPressed && aType == EEventKeyUp)
+        {
+        UpdateMskContainerL();
+        }
+    else
+        {
+        DEBUG( CLmkByLmContainer::OfferKeyEventL send event key & other keys handling );
+        // 'send' eveny key processing        
+        if (visibleCount > 0 && markedCount < 1)
+            {
+            // Check TOUCH Support
+            if (aKeyEvent.iCode == EKeyPhoneSend
+                    && (!Layout_Meta_Data::IsPenEnabled()))
+                {
+                selector.ProcessCommandL(ELmkCmdCall);
+                }
+            }
+        if (iIsEditorOpened)
+            {
+            DEBUG( CLmkByLmContainer::OfferKeyEventL iIsEditorOpened entered );
+            SelectorImpl().HandleListProviderEvent(ELmkEventListReady);
+            }
+        }
+    iIsEditorOpened = EFalse;
+    DEBUG( CLmkByLmContainer::OfferKeyEventL end );
+    return CLmkLbWithFilterContainer::OfferKeyEventL(aKeyEvent, aType);
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkByLmContainer::HandleControlEventL()
+// Called by framework when the view size is changed
+// ----------------------------------------------------------------------------
+//
+
+void CLmkByLmContainer::HandleControlEventL(CCoeControl* aControl,
+        TCoeEvent aEventType)
+    {
+    if (aEventType == EEventStateChanged && aControl == iFindBox)
+        {
+        SelectorImpl().ProcessCommandL(ELmkCmdFindBoxSearchAfresh);
+        }
+    }
+
+// -----------------------------------------------------------------------------
+//CLmkByLmContainer::HandleResourceChange
+// -----------------------------------------------------------------------------
+//
+void CLmkByLmContainer::HandleResourceChange(TInt aType)
+    {
+    CCoeControl::HandleResourceChange(aType);
+    if (aType == KEikDynamicLayoutVariantSwitch)
+        {
+        (static_cast<CLmkByLmView *> (&iView))->Update();
+        }
+
+    if (iListBox)
+        {
+        iListBox->DrawNow();
+        }
+    if (iFindBox && iFindBox->IsVisible())
+        {
+        iFindBox->DrawNow();
+        }
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkByLmContainer::GetSelectedLandmarksL
+// ----------------------------------------------------------------------------
+//
+TInt CLmkByLmContainer::GetSelectedLandmarksL(
+        RPointerArray<CPosLandmark> &aArray)
+    {
+    return (static_cast<CLmkAppLmSelectorImpl*> (iSelector))->GetSelectedLandmarksL(
+            aArray);
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkByLmContainer::IsLandmarkEmptyL
+// ----------------------------------------------------------------------------
+//
+TBool CLmkByLmContainer::IsLandmarkDataEmptyL(CPosLandmark* aLandmark)
+    {
+    return (static_cast<CLmkAppLmSelectorImpl*> (iSelector))->IsLandmarkDataEmptyL(
+            aLandmark);
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkByLmContainer::FocusChanged()
+// ----------------------------------------------------------------------------
+//
+void CLmkByLmContainer::FocusChanged(TDrawNow aDrawNow)
+    {
+    if (iListBox)
+        {
+        iListBox->SetFocus(IsFocused(), aDrawNow);
+        }
+    if (iFindBox && iFindBox->IsVisible())
+        {
+        iFindBox->SetFocus(IsFocused(), aDrawNow);
+        }
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkByLmContainer::IsEditorOpened()
+// ----------------------------------------------------------------------------
+//
+TBool CLmkByLmContainer::IsEditorOpened()
+    {
+    return iIsEditorOpened;
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkByLmContainer::SetEditorOpenedBool()
+// ----------------------------------------------------------------------------
+//
+void CLmkByLmContainer::SetEditorOpenedBool(TBool aBoolvalue)
+    {
+    iIsEditorOpened = aBoolvalue;
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkByLmContainer::UpdateMskContainerL()
+// ----------------------------------------------------------------------------
+//
+void CLmkByLmContainer::UpdateMskContainerL()
+    {
+    CLmkBaseView* view = reinterpret_cast<CLmkBaseView*> (&iView);
+    view->UpdateMskViewL(ResolveMskDisplayItem());
+    }
+
+// ---------------------------------------------------------
+// CLmkByLmContainer::MenuBar
+// ---------------------------------------------------------
+//
+CEikMenuBar* CLmkByLmContainer::MenuBar()
+    {
+    return ViewAppUi()->View(TUid::Uid(ELmkByLmView))->MenuBar();
+    }
+
+// ---------------------------------------------------------
+// CLmkByLmContainer::ContextSpecificMenuBar
+// ---------------------------------------------------------
+//
+TInt CLmkByLmContainer::ContextSpecificMenuBar()
+    {
+    return R_LMK_OK_MENUBAR;
+    }
+
+// ---------------------------------------------------------
+// CLmkByLmContainer::SetHandlePointerEventBool
+// ---------------------------------------------------------
+//
+void CLmkByLmContainer::SetHandlePointerEventBool(TBool aBoolValue)
+    {
+    iHandlePointerEvent = aBoolValue;
+    }
+
+#ifdef RD_SCALABLE_UI_V2
+// ---------------------------------------------------------
+// CLmkByLmContainer::HandlePoineteventL
+// ---------------------------------------------------------
+//
+void CLmkByLmContainer::HandlePointerEventL( const TPointerEvent& aPointerEvent )
+    {
+    CCoeControl::HandlePointerEventL(aPointerEvent);
+    }
+
+#endif//RD_SCALABLE_UI_V2
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/app/src/CLmkByLmView.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,633 @@
+/*
+ * Copyright (c) 2005-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:    Provides Landmarksui main view class methods.
+ *
+ */
+
+// INCLUDE FILES
+#include <EPos_CPosLandmarkDatabase.h>
+#include <aknViewAppUi.h>
+#include <landmarks.rsg>
+#include <sendnorm.rsg> // R_SENDUI_MENU
+#include <eiktxlbx.h>
+#include <eikmenup.h>
+#include <featmgr.h>
+#include "landmarks.hrh"
+#include "CLmkByLmContainer.h"
+#include "CLmkAppSelectorImplBase.h"
+#include "MLmkListMemento.h"
+#include "CLmkAppUi.h"
+#include "CLmkByLmView.h"
+#include "CLmkSender.h"
+#include "Debug.h"
+#include "landmarks.hrh"
+#include "clmkmapnavigationinterface.h"
+#include "CLmkDocument.h"
+#include <StringLoader.h>
+
+// ================= LOCAL FUNCTIONS =======================
+static void CleanupArray(TAny* aArray)
+    {
+    (static_cast<RPointerArray<CPosLandmark>*> (aArray))->ResetAndDestroy();
+    }
+
+// ================= MEMBER FUNCTIONS =======================
+// ----------------------------------------------------------------------------
+// CLmkByLmView::NewLC
+// Two-phased constructor.
+// ----------------------------------------------------------------------------
+//
+CLmkByLmView* CLmkByLmView::NewLC(MLmkKeyProcessor& aKeyProcessor,
+        CLmkSender& aLmkSender)
+    {
+    CLmkByLmView* self = new (ELeave) CLmkByLmView(aKeyProcessor, aLmkSender);
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    return self;
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkByLmView::CLmkByLmView
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// ----------------------------------------------------------------------------
+//
+CLmkByLmView::CLmkByLmView(MLmkKeyProcessor& aKeyProcessor,
+        CLmkSender& aLmkSender) :
+    CLmkBaseView(aKeyProcessor), iLmkSender(aLmkSender)
+    {
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkByLmView::ConstructL
+// Symbian 2nd phase constructor can leave.
+// ----------------------------------------------------------------------------
+//
+void CLmkByLmView::ConstructL()
+    {
+    CLmkAppUi* lmkAppUi = static_cast<CLmkAppUi*> (AppUi());
+    if (iEikonEnv->StartedAsServerApp())
+        {
+        BaseConstructL( R_LMK_BYLM_EMBEDDED_VIEW);
+        isEmbeddedLaunch = ETrue;
+        }
+    else
+        {
+        BaseConstructL( R_LMK_BYLM_VIEW);
+        }
+    CPosLandmarkDatabase& db = lmkAppUi->Document().LmDbL();
+    iMapNavInterface = CLmkMapNavigationInterface::NewL(db);
+    AttachAIWMenuInterestL();
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkByLmView::~CLmkByLmView
+// ----------------------------------------------------------------------------
+//
+CLmkByLmView::~CLmkByLmView()
+    {
+    if (iContainer)
+        {
+        AppUi()->RemoveFromViewStack(*this, iContainer);
+        }
+    delete iContainer;
+    delete iListMemento;
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkByLmView::ProcessKeyEventL
+// ----------------------------------------------------------------------------
+//
+TBool CLmkByLmView::ProcessKeyEventL(const TKeyEvent& aKeyEvent,
+        TEventCode aType)
+    {
+    return CLmkBaseView::ProcessKeyEventL(aKeyEvent, aType);
+    }
+
+// ----------------------------------------------------------------------------
+// TUid CLmkByLmView::Id
+// ----------------------------------------------------------------------------
+//
+TUid CLmkByLmView::Id() const
+    {
+    return TUid::Uid(ELmkByLmView);
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkByLmView::AttachAIWMenuInterestL
+// ----------------------------------------------------------------------------
+//
+void CLmkByLmView::AttachAIWMenuInterestL()
+    {
+    iMapNavInterface->AttachAIWInterestL(R_LMK_NEW_LANDMARK_SUBMENU,
+            R_LMK_AIW_INTEREST_SELECTFROMMAP);
+    iMapNavInterface->AttachAIWInterestL(R_LMK_BYLM_MENU1,
+            R_LMK_AIW_INTEREST_SHOWONMAP);
+    iMapNavInterface->AttachAIWInterestL(R_LMK_BYLM_MENU1,
+            R_LMK_AIW_INTEREST_NAVIGATETO);
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkByLmView::HandleCommandL
+// ----------------------------------------------------------------------------
+//
+void CLmkByLmView::HandleCommandL(TInt aCommand)
+    {
+    DEBUG1( CLmkByLmView::HandleCommandL entered with aCommand=%d, aCommand);
+
+    AknSelectionService::HandleMarkableListProcessCommandL(aCommand,
+            &(iContainer->ListBox()));
+    CLmkAppSelectorImplBase& selector = iContainer->SelectorImpl();
+    //first give a chance to M&N framework.
+    TInt aiwCmd = iMapNavInterface->GetServiceCmdByMenuCmd(aCommand);
+    if (KAiwCmdNone == aiwCmd)
+        {
+        aiwCmd = selector.ServiceCmdByMenuCmd(aCommand);
+        }
+    //Handle AIW command
+    if (HandleAIWserviceCommandsL(aiwCmd, aCommand))
+        {
+        iContainer->ListBox().ClearSelection();
+        EnableMskLabelL( ETrue);
+        return;
+        }
+    switch (aCommand)
+        {
+        case ELmkCmdNewLmCurrentLocation:
+        case ELmkCmdNewLmEmpty:
+        case ELmkCmdEditLm:
+        case ELmkCmdDeleteLm:
+        case ELmkCmdChangeIcon:
+        case ELmkCmdAddToCat:
+        case ELmkCmdSendVia1: // These commands are used by SendUi
+        case ELmkCmdSendVia2:
+        case ELmkCmdSendVia3:
+        case ELmkCmdSendVia4:
+        case ELmkCmdSendVia5:
+        case ELmkCmdSendVia6:
+        case ELmkCmdSendVia7:
+        case ELmkCmdSendVia8:
+        case ELmkCmdSendVia9:
+        case ELmkCmdSendVia10:
+        case ELmkCmdSend:
+        case ELmkCmdOpenLm:
+        case EAknCmdMark:
+        case EAknCmdUnmark:
+        case EAknMarkAll:
+        case EAknUnmarkAll:
+        case ELmkCmdLaunchPositionSettings:
+            {
+            // Set pointer event handling EFalse, to handle the multiplt tap ,
+            // Second tap becomes a pointer event for container, which has to be ignored
+            // fix for bug ECYU-7C24HQ
+            iContainer->SetHandlePointerEventBool(EFalse);
+
+            TInt markedCount(
+                    iContainer->SelectorImpl().ListMarkedItemCountL());
+            DEBUG1( CLmkByLmView::HandleCommandL markedcount=%d,markedCount );
+
+            if (markedCount > 0 && aCommand == ELmkCmdOpenLm
+                    && !iContainer->IsEditorOpened())
+                {
+                if (MenuBar())
+                    {
+                    MenuBar()->SetContextMenuTitleResourceId(R_LMK_OK_MENUBAR);
+                    MenuBar()->TryDisplayContextMenuBarL();
+                    }
+                }
+            else if (aCommand == ELmkCmdOpenLm
+                    && !iContainer->IsEditorOpened())
+                {
+                iContainer->SelectorImpl().ProcessCommandL(aCommand);
+                iContainer->SetEditorOpenedBool(ETrue);
+                }
+            else
+                {
+                iContainer->SelectorImpl().ProcessCommandL(aCommand);
+                }
+            // Set pointer event handling ETrue	
+            iContainer->SetHandlePointerEventBool(ETrue);
+            break;
+            }
+        default:
+            {
+            (static_cast<CLmkAppUi*> (AppUi()))->HandleCommandL(aCommand);
+            break;
+            }
+        }
+    DEBUG ( CLmkByLmView::HandleCommandL End );
+    }
+
+// ---------------------------------------------------------
+// CLmkByLmView::DynInitMenuPaneL
+// ---------------------------------------------------------
+//
+void CLmkByLmView::DynInitMenuPaneL(TInt aResourceId, CEikMenuPane* aMenuPane)
+    {
+    DEBUG( CLmkByLmView::DynInitMenuPaneL entered );
+    iMapNavInterface->HandleMenuOperationL(aResourceId, aMenuPane,
+            ELmkCmdMnNav);
+
+    AknSelectionService::HandleMarkableListDynInitMenuPane(aResourceId,
+            aMenuPane, &(iContainer->ListBox()));
+
+    CLmkAppSelectorImplBase& selector = iContainer->SelectorImpl();
+    TInt markedCount(selector.ListMarkedItemCountL());
+    TInt visibleCount(selector.ListVisibleItemCount());
+    DEBUG1( CLmkByLmView::DynInitMenuPaneL markedCount=%d,markedCount );
+    DEBUG1( CLmkByLmView::DynInitMenuPaneL visibleCount=%d,visibleCount );
+
+    switch (aResourceId)
+        {
+        case R_LMK_BYLM_MENU1:
+            {
+            //always dimmed
+            aMenuPane->SetItemDimmed(ERemoveFromCat, ETrue);
+            aMenuPane->SetItemDimmed(ELmkCmdSendDummy, ETrue);
+
+            // Send menu is handled by the sender:
+            if ( FeatureManager::FeatureSupported( KFeatureIdLandmarksConverter ) )
+                {
+                iLmkSender.DisplaySendMenuL( *aMenuPane, visibleCount );
+                if( visibleCount > 0 )
+                    {
+                    TInt pos( 0 );
+                    aMenuPane->ItemAndPos( ELmkCmdSend, pos );    
+                    if( pos > 0 )
+                        {            
+                        aMenuPane->SetItemDimmed(ELmkCmdSend,EFalse );
+                        aMenuPane->SetItemSpecific(ELmkCmdSend,ETrue);
+                        }                       
+                    }   
+                }
+
+            /*
+             If multiple landmarks are selected then we have to dim
+             Navigate To option.
+             if only one landmark is in focus then we have to dim
+             Navigate To & Show On Map options if the particular landmark
+             does not either have address or coordinates.
+             */
+
+            TBool isLandmarkDataEmpty = EFalse;
+            if (visibleCount == 0)
+                {
+                isLandmarkDataEmpty = ETrue;
+                }
+            else
+                {
+                if (markedCount == 1 || markedCount == 0)
+                    {
+                    // Get the selected landmark and check if it is empty
+                    RPointerArray<CPosLandmark> lmkArray;
+                    TInt retVal = iContainer->GetSelectedLandmarksL(lmkArray);
+                    if (retVal != KErrNotFound)
+                        {
+                        CleanupStack::PushL(TCleanupItem(CleanupArray,
+                                &lmkArray));
+                        isLandmarkDataEmpty
+                                = iContainer->IsLandmarkDataEmptyL(
+                                        lmkArray[0]);
+                        CleanupStack::PopAndDestroy();// lmkArray
+                        }
+                    }
+                }
+
+            TInt showOnMapCmd = -1;
+            TInt navigateToCmd = -1;
+
+            TInt cnt = aMenuPane->NumberOfItemsInPane();
+
+            for (TInt i = 0; i < cnt; ++i)
+                {
+                CEikMenuPaneItem::SData& itemData =
+                        aMenuPane->ItemDataByIndexL(i);
+
+                if (iMapNavInterface->GetServiceCmdByMenuCmd(
+                        itemData.iCommandId) == KAiwCmdMnShowMap)
+                    {
+                    showOnMapCmd = itemData.iCommandId;
+                    }
+                if (iMapNavInterface->GetServiceCmdByMenuCmd(
+                        itemData.iCommandId) == KAiwCmdMnNavigateTo)
+                    {
+                    navigateToCmd = itemData.iCommandId;
+                    }
+                }
+            if (showOnMapCmd < 0 && navigateToCmd < 0)
+                {
+                break;
+                }
+
+            if (isLandmarkDataEmpty || markedCount > 1)
+                {
+                aMenuPane->SetItemDimmed(showOnMapCmd, ETrue);
+                aMenuPane->SetItemDimmed(navigateToCmd, ETrue);
+                }
+            else
+                {
+                aMenuPane->SetItemDimmed(showOnMapCmd, EFalse);
+                aMenuPane->SetItemSpecific(showOnMapCmd, ETrue);
+
+                aMenuPane->SetItemDimmed(navigateToCmd, EFalse);
+                aMenuPane->SetItemSpecific(navigateToCmd, ETrue);
+                }
+            break;
+            }
+        case R_LMK_OK_MENU:
+            {
+            DEBUG( CLmkByLmView::DynInitMenuPaneL R_LMK_OK_MENU );
+            // Let send ui add the send menu if MTMs are available:                             
+            if (FeatureManager::FeatureSupported(KFeatureIdLandmarksConverter))
+                {
+                iLmkSender.DisplaySendMenuL(*aMenuPane, visibleCount);
+                }
+            else
+                {
+                aMenuPane->SetItemDimmed(ELmkCmdSendDummy, ETrue);
+                }
+            if (visibleCount == 0)
+                {
+                aMenuPane->SetItemDimmed(ELmkCmdAddToCat, ETrue);
+                aMenuPane->SetItemDimmed(ELmkCmdDeleteLm, ETrue);
+                aMenuPane->SetItemDimmed(ELmkCmdNewLm, EFalse);
+                }
+            break;
+            }
+        case R_LMK_MAIN_MENU:
+            {
+            CLmkBaseView::HandleHelpFeature(aMenuPane);
+            break;
+            }
+        case R_SENDUI_MENU: // Dynamically created send ui menu
+            {
+            if (FeatureManager::FeatureSupported(KFeatureIdLandmarksConverter))
+                {
+                iLmkSender.DisplaySendCascadeMenuL(*aMenuPane);
+                }
+            break;
+            }
+        case R_LMK_NEW_LANDMARK_SUBMENU:
+            {
+            if (FeatureManager::FeatureSupported(
+                    KFeatureIdLocationFrameworkCore))
+                {
+                aMenuPane->SetItemDimmed(ELmkCmdNewLmCurrentLocation, EFalse);
+                }
+            else
+                {
+                aMenuPane->SetItemDimmed(ELmkCmdNewLmCurrentLocation, ETrue);
+                }
+
+            if (iIsHideCoordinate)
+                {
+                aMenuPane->SetItemDimmed(ELmkCmdNewLmEmpty, ETrue);
+                }
+            else
+                {
+                aMenuPane->SetItemDimmed(ELmkCmdNewLmEmpty, EFalse);
+                }
+            break;
+            }
+        default:
+            {
+            break;
+            }
+        }
+DEBUG    ( CLmkByLmView::DynInitMenuPaneL end );
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkByLmView::DoActivateL
+// ----------------------------------------------------------------------------
+//
+void CLmkByLmView::DoActivateL(const TVwsViewId& /*aPrevViewId*/,
+        TUid /*aCustomMessageId*/, const TDesC8& /*aCustomMessage*/)
+    {
+    DEBUG( CLmkByLmView::DoActivateL entered );
+    if (!iContainer)
+        {
+        iContainer
+                = CLmkByLmContainer::NewL(*this, this, ClientRect(), *this);
+        CLmkAppSelectorImplBase& selector = iContainer->SelectorImpl();
+        AppUi()->AddToStackL(*this, iContainer);
+
+#ifdef RD_SCALABLE_UI_V2
+        //for touch event
+        iContainer->SetListBoxObserver(this);
+#endif//RD_SCALABLE_UI_V2
+        if (!iListMemento)
+            { // Memento not created yet, create it now:
+            iListMemento = selector.MementoL();
+            }
+        selector.SetMemento(*iListMemento);
+        selector.RestoreMemento();
+        EnableMskMenuL( EFalse);
+        EnableMskLabelL(EFalse);
+        }
+DEBUG    ( CLmkByLmView::DoActivateL End );
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkByLmView::DoDeactivate
+// ----------------------------------------------------------------------------
+//
+void CLmkByLmView::DoDeactivate()
+    {
+    if (iContainer)
+        {
+        iContainer->SelectorImpl().StoreMemento();
+        AppUi()->RemoveFromViewStack(*this, iContainer);
+        }
+    TRAP_IGNORE( EnableMskMenuL(EFalse));
+    TRAP_IGNORE( EnableMskLabelL(EFalse));
+    delete iContainer;
+    iContainer = NULL;
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkByLmView::Update()
+// ----------------------------------------------------------------------------
+//
+void CLmkByLmView::Update()
+    {
+    iContainer->SetRect(ClientRect());
+    }
+
+// ---------------------------------------------------------
+// CLmkBaseView::EnableMskMenuL()
+// ---------------------------------------------------------
+//
+void CLmkByLmView::EnableMskMenuL(TBool aEnable)
+    {
+    CEikButtonGroupContainer* cbaGrp = Cba();
+    if (cbaGrp)
+        {
+        if (aEnable)
+            {
+            cbaGrp->RemoveCommandFromStack(KMskCommandPos, ELmkCmdOpenLm);
+            TInt
+                    cbaRes =
+                            isEmbeddedLaunch
+                                             ? R_LMK_SOFTKEYS_OPTIONS_BACK_CONTEXTOPTIONS
+                                                : R_LMK_SOFTKEYS_OPTIONS_EXIT_CONTEXTOPTIONS;
+            cbaGrp->SetCommandSetL(cbaRes);
+            cbaGrp->MakeCommandVisible(EAknSoftkeyContextOptions, ETrue);
+            if (MenuBar())
+                MenuBar()->SetContextMenuTitleResourceId(R_LMK_OK_MENUBAR);
+            }
+        else
+            {
+            cbaGrp->MakeCommandVisible(EAknSoftkeyContextOptions, EFalse);
+            }
+        }
+    }
+
+// ---------------------------------------------------------
+// CLmkBaseView::EnableMskLabelL()
+// ---------------------------------------------------------
+//
+void CLmkByLmView::EnableMskLabelL(TBool aEnable)
+    {
+
+    CEikButtonGroupContainer* cbaGrp = Cba();
+    if (cbaGrp)
+        {
+        if (aEnable)
+            {
+
+            HBufC* mskOpenTxt = NULL;
+            mskOpenTxt = StringLoader::LoadLC(R_LMK_MSK_OPEN, iEikonEnv);
+            cbaGrp->RemoveCommandFromStack(KMskCommandPos,
+                    EAknSoftkeyContextOptions);
+            cbaGrp->AddCommandToStackL(KMskCommandPos, ELmkCmdOpenLm,
+                    mskOpenTxt->Des());
+            cbaGrp->MakeCommandVisible(ELmkCmdOpenLm, ETrue);
+            CleanupStack::PopAndDestroy(mskOpenTxt);
+            }
+        else
+            {
+            cbaGrp->MakeCommandVisible(ELmkCmdOpenLm, EFalse);
+            }
+        }
+    }
+
+#ifdef RD_SCALABLE_UI_V2
+// ---------------------------------------------------------
+// CLmkByLmView::HandleListBoxEventL()
+// ---------------------------------------------------------
+//
+void CLmkByLmView::HandleListBoxEventL(CEikListBox* /*aListBox*/,
+        TListBoxEvent aEventType)
+    {
+    TLmkMskDispItem dispItem = iContainer->ResolveMskDisplayItem();
+
+    switch (aEventType)
+        {
+        //case EEventItemDoubleClicked:
+        case EEventEmptyListClicked:
+        case EEventItemSingleClicked:
+            {
+            if (dispItem == EContextMenu)
+                {
+                UpdateMskViewL(dispItem);
+                CEikMenuBar* menubar =
+                static_cast<CAknViewAppUi*> (iAvkonAppUi)->View(
+                        TUid::Uid(ELmkByLmView))->MenuBar();
+                if (menubar)
+                    {
+                    TRAPD( err, menubar->TryDisplayContextMenuBarL() );
+                    User::LeaveIfError(err);
+                    }
+                }
+            else if (dispItem == ELabel)
+                {
+                UpdateMskViewL(dispItem);
+                HandleCommandL(ELmkCmdOpenLm);
+                }
+            break;
+            }
+
+        //case EEventItemClicked:
+        case EEventPanningStarted:
+        case EEventPanningStopped:
+        case EEventFlickStarted:
+        case EEventFlickStopped:
+        case EEventPenDownOnItem:
+        case EEventItemDraggingActioned:
+            {
+            if (dispItem == EContextMenu)
+                {
+                UpdateMskViewL(dispItem);
+                }
+            else if (dispItem == ELabel)
+                {
+                UpdateMskViewL(dispItem);
+                }
+            break;
+            }
+        default:
+        break;
+        }
+    }
+#endif//RD_SCALABLE_UI_V2
+// ---------------------------------------------------------
+// CLmkByLmView::HandleAIWserviceCommandsL()
+// ---------------------------------------------------------
+//
+TBool CLmkByLmView::HandleAIWserviceCommandsL(TInt aServiceCommand,
+        TInt aMenuCommand)
+    {
+    TBool result = ETrue;
+    RPointerArray<CPosLandmark> lmkArray;
+    switch (aServiceCommand)
+        {
+        case KAiwCmdMnNavigateTo:
+            {
+            if (iContainer->GetSelectedLandmarksL(lmkArray) == KErrNone)
+                {
+                CleanupStack::PushL(TCleanupItem(CleanupArray, &lmkArray));
+                iMapNavInterface->NavigateToLandmarkL(lmkArray[0],
+                        aMenuCommand);
+                CleanupStack::PopAndDestroy(); // lmkArray
+                }
+            break;
+            }
+        case KAiwCmdMnShowMap:
+            {
+            if (iContainer->GetSelectedLandmarksL(lmkArray) == KErrNone)
+                {
+                CleanupStack::PushL(TCleanupItem(CleanupArray, &lmkArray));
+                iMapNavInterface->ShowLandmarksOnMapL(lmkArray, aMenuCommand,
+                        CLmkMapNavigationInterface::EByLmkView);
+                CleanupStack::PopAndDestroy(); // lmkArray
+                }
+            break;
+            }
+        case KAiwCmdMnSelectFromMap:
+            {
+            iMapNavInterface->SetObserver(&iContainer->SelectorImpl());
+            iMapNavInterface->GetLandmarkFromMapL(aMenuCommand);
+            break;
+            }
+        default:
+            {
+            result = EFalse;
+            break;
+            }
+        }
+    return result;
+    }
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/app/src/CLmkCategoryContentsContainer.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,406 @@
+/*
+ * Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies 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 LM category contents view's container class methods.
+ *
+ */
+
+// INCLUDE FILES
+#include <aknsfld.h>
+#include <aknlists.h>
+#include <landmarks.rsg>
+#include <eikmenub.h>
+#include <layoutmetadata.cdl.h> // To Check TOUCH Support
+#include <bldvariant.hrh>
+#include <AknDef.h>
+#include <EPos_CPosLandmark.h>
+#include "CLmkUiUtils.h"
+#include "CLmkAppUi.h"
+#include "CLmkSender.h"
+#include "landmarks.hrh"
+#include <csxhelp/lm.hlp.hrh>
+#include "CLmkCategoryContentsView.h"
+#include "CLmkCategoryContentsContainer.h"
+#include "CLmkAppLmSelectorImpl.h"
+#include "CLmkByCategoryView.h"
+#include <lmkui.rsg>
+#include "Debug.h"
+
+// ================= MEMBER FUNCTIONS =======================
+// ----------------------------------------------------------------------------
+// CLmkCategoryContentsContainer::NewL
+// ----------------------------------------------------------------------------
+//
+CLmkCategoryContentsContainer* CLmkCategoryContentsContainer::NewL(
+        MLmkKeyProcessor& aKeyProcessor, MObjectProvider* aParent,
+        const TRect& aRect, CAknView& aView)
+    {
+    CLmkCategoryContentsContainer* self =
+            new (ELeave) CLmkCategoryContentsContainer(aKeyProcessor, aView);
+    CleanupStack::PushL(self);
+    self->SetMopParent(aParent);
+    self->ConstructL(aRect);
+    CleanupStack::Pop(); // self
+    return self;
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkCategoryContentsContainer::ConstructL
+// ----------------------------------------------------------------------------
+//
+void CLmkCategoryContentsContainer::ConstructL(const TRect& aRect)
+    {
+    CLmkLbWithFilterContainer::ConstructL(aRect);
+    iFindBox->SetObserver(this);
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkCategoryContentsContainer::CLmkCategoryContentsContainer
+// ----------------------------------------------------------------------------
+//
+
+CLmkCategoryContentsContainer::CLmkCategoryContentsContainer(
+        MLmkKeyProcessor& aKeyProcessor, CAknView& aView) :
+    CLmkLbWithFilterContainer(aKeyProcessor, KLM_HLP_CATEGORY_CONTENTS),
+            iView(aView)
+    {
+    iIsEditorOpened = EFalse;
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkCategoryContentsContainer::~CLmkCategoryContentsContainer
+// ----------------------------------------------------------------------------
+//
+CLmkCategoryContentsContainer::~CLmkCategoryContentsContainer()
+    {
+    NaviPane().Pop(iNaviDeco); // Pop category name from navi pane
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkCategoryContentsContainer::SetupTitlePaneL
+// ----------------------------------------------------------------------------
+//
+void CLmkCategoryContentsContainer::SetupTitlePaneL()
+    {
+    CLmkUiUtils::ChangeTitlePaneL(R_LMK_BYLM_VIEW_TITLE);
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkCategoryContentsContainer::SetupSelectorAndListL
+// ----------------------------------------------------------------------------
+//
+void CLmkCategoryContentsContainer::SetupSelectorAndListL(
+        CPosLandmarkDatabase& aDb, CLmkSender& aSender)
+    {
+    CLmkByCategoryView* categoryView =
+            static_cast<CLmkByCategoryView*> (ViewAppUi()->View(TUid::Uid(
+                    ELmkByCategoryView)));
+
+    // Create this classes selector based on category selector:
+    iSelector = CLmkAppLmSelectorImpl::NewL(aDb,
+            categoryView->BorrowMemento(), aSender, ETrue);
+    iSelector->SetMskObserver(this);
+    iListBox = &(iSelector->CreateListBoxL(this, EAknCtSingleGraphicListBox,
+#ifdef RD_SCALABLE_UI_V2
+            EAknListBoxStylusMarkableList,
+#else
+            EAknListBoxMarkableList,
+#endif //RD_SCALABLE_UI_V2
+            R_LMK_EMPTY_NO_LANDMARKS, R_LMK_GUIDE_NEW_LANDMARK));
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkCategoryContentsContainer::SetupNaviPaneL
+// ----------------------------------------------------------------------------
+//
+void CLmkCategoryContentsContainer::SetupNaviPaneL()
+    {
+    // Show category name in navi pane:
+    CAknNavigationControlContainer& naviPane = NaviPane();
+    CLmkAppLmSelectorImpl* selector =
+            static_cast<CLmkAppLmSelectorImpl*> (iSelector);
+    iNaviDeco = naviPane.CreateNavigationLabelL(selector->CategoryNameL());
+    naviPane.PushL(*iNaviDeco); // activate navi label in navi pane
+    }
+
+// ---------------------------------------------------------
+// CLmkCategoryContentsContainer::OfferKeyEventL()
+// ---------------------------------------------------------
+//
+TKeyResponse CLmkCategoryContentsContainer::OfferKeyEventL(
+        const TKeyEvent& aKeyEvent, TEventCode aType)
+    {
+    DEBUG( CLmkCategoryContentsContainer::OfferKeyEventL entered );
+    DEBUG2( aKeyEvent.iCode=%d aKeyEvent.iScanCode=%d,
+            aKeyEvent.iCode,
+            aKeyEvent.iScanCode
+    );
+    DEBUG3( aKeyEvent.iModifiers=%d aKeyEvent.iRepeats=%d aType=%d,
+            aKeyEvent.iModifiers,
+            aKeyEvent.iRepeats,
+            aType
+    );
+
+    TBool shiftKeyPressed = (aKeyEvent.iModifiers & EModifierShift)
+            || (aKeyEvent.iModifiers & EModifierLeftShift)
+            || (aKeyEvent.iModifiers & EModifierRightShift);
+
+    if (aKeyEvent.iScanCode == EStdKeyUpArrow || aKeyEvent.iScanCode
+            == EStdKeyDownArrow)
+        {
+        if (aType == EEventKey)
+            {
+            if (iListBox->OfferKeyEventL(aKeyEvent, aType) == EKeyWasConsumed)
+                {
+                if (shiftKeyPressed)
+                    UpdateMskContainerL();
+                return EKeyWasConsumed;
+                }
+            }
+        return EKeyWasNotConsumed;
+        }
+
+    CLmkAppSelectorImplBase& selector = SelectorImpl();
+    TInt markedCount(selector.ListMarkedItemCountL());
+    TInt visibleCount(selector.ListVisibleItemCount());
+    DEBUG1( CLmkCategoryContentsContainer::OfferKeyEventL markedCount=%d,markedCount );
+    DEBUG1( CLmkCategoryContentsContainer::OfferKeyEventL visibleCount=%d,visibleCount );
+
+    if (aKeyEvent.iCode == EKeyOK && !shiftKeyPressed && aType == EEventKey)
+        {
+        if (visibleCount > 0 && markedCount < 1)
+            {
+            // Launch landmark viewer here
+            selector.ProcessCommandL(ELmkCmdOpenLm);
+            iIsEditorOpened = ETrue;
+            return EKeyWasConsumed;
+            }
+        else
+            {
+            DEBUG( CLmkCategoryContentsContainer::OfferKeyEventL EKeyOK show menubar );
+            CEikMenuBar* menubar =
+                    static_cast<CAknViewAppUi*> (iAvkonAppUi)->View(
+                            TUid::Uid(ELmkCategoryContentsView))->MenuBar();
+            if (menubar)
+                {
+                menubar->SetMenuTitleResourceId(R_LMK_OK_MENUBAR);
+
+                menubar->StopDisplayingMenuBar();
+                TRAPD(err,menubar->TryDisplayMenuBarL());
+                DEBUG1( CLmkCategoryContentsContainer::OfferKeyEventL menubar->TryDisplayMenuBarL() = %d,err );
+                // set ordinary menubar back even in case of error:                                         
+                menubar->SetMenuTitleResourceId(R_LMK_BYLM_MENUBAR);
+                User::LeaveIfError(err);
+                }
+
+            return EKeyWasConsumed;
+            }
+        }
+    else if (shiftKeyPressed && aType == EEventKeyUp)
+        {
+        UpdateMskContainerL();
+        }
+    else
+        {
+        DEBUG( CLmkCategoryContentsContainer::OfferKeyEventL send event key & other keys handling );
+        // 'send' eveny key processing        
+        if (visibleCount > 0 && markedCount < 1)
+            {
+            // Check TOUCH Support
+            if (aKeyEvent.iCode == EKeyPhoneSend
+                    && (!Layout_Meta_Data::IsPenEnabled()))
+                {
+                selector.ProcessCommandL(ELmkCmdCall);
+                }
+            }
+        if (iIsEditorOpened)
+            {
+            DEBUG( CLmkCategoryContentsContainer::OfferKeyEventL iIsEditorOpened entered );
+            SelectorImpl().HandleListProviderEvent(ELmkEventListReady);
+            }
+        }
+    iIsEditorOpened = EFalse;
+    TKeyResponse response = CLmkLbWithFilterContainer::OfferKeyEventL(
+            aKeyEvent, aType);
+    
+    DEBUG( CLmkCategoryContentsContainer::OfferKeyEventL End );
+    return response;
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkCategoryContentsContainer::HandleControlEventL()
+// Called by framework when the view size is changed
+// ----------------------------------------------------------------------------
+//
+void CLmkCategoryContentsContainer::HandleControlEventL(
+        CCoeControl* aControl, TCoeEvent aEventType)
+    {
+    if (aEventType == EEventStateChanged && aControl == iFindBox)
+        {
+        SelectorImpl().ProcessCommandL(ELmkCmdFindBoxSearchAfresh);
+        }
+    if (aEventType == EEventStateChanged && aControl == iListBox )
+        {
+        if (static_cast<CTextListBoxModel*> (ListBox().Model())->ItemTextArray()->MdcaCount()
+                == 0)
+            {
+            (static_cast<CLmkCategoryContentsView *> (&iView))->HandleCommandL(
+                    EAknSoftkeyBack);
+            }
+        }
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkCategoryContentsContainer::GetSelectedLandmarksL
+// ----------------------------------------------------------------------------
+//
+TInt CLmkCategoryContentsContainer::GetSelectedLandmarksL(RPointerArray<
+        CPosLandmark> &aArray)
+    {
+    return (static_cast<CLmkAppLmSelectorImpl*> (iSelector))->GetSelectedLandmarksL(
+            aArray);
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkCategoryContentsContainer::IsLandmarkDataEmptyL
+// ----------------------------------------------------------------------------
+//
+TBool CLmkCategoryContentsContainer::IsLandmarkDataEmptyL(
+        CPosLandmark* aLandmark)
+    {
+    return (static_cast<CLmkAppLmSelectorImpl*> (iSelector))->IsLandmarkDataEmptyL(
+            aLandmark);
+    }
+
+// -----------------------------------------------------------------------------
+//CLmkCategorySettingsContainer::HandleResourceChange
+// -----------------------------------------------------------------------------
+//
+void CLmkCategoryContentsContainer::HandleResourceChange(TInt aType)
+    {
+    CCoeControl::HandleResourceChange(aType);
+    if (aType == KEikDynamicLayoutVariantSwitch)
+        {
+        (static_cast<CLmkCategoryContentsView *> (&iView))->Update();
+        }
+    if (iListBox)
+        {
+        iListBox->DrawNow();
+        }
+    if (iFindBox && iFindBox->IsVisible())
+        {
+        iFindBox->DrawNow();
+        }
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkByLmContainer::FocusChanged()
+// ----------------------------------------------------------------------------
+//
+void CLmkCategoryContentsContainer::FocusChanged(TDrawNow aDrawNow)
+    {
+    if (iListBox)
+        {
+        iListBox->SetFocus(IsFocused(), aDrawNow);
+        }
+    if (iFindBox && iFindBox->IsVisible())
+        {
+        iFindBox->SetFocus(IsFocused(), aDrawNow);
+        }
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkCategoryContentsContainer::IsEditorOpened()
+// ----------------------------------------------------------------------------
+//
+TBool CLmkCategoryContentsContainer::IsEditorOpened()
+    {
+    return iIsEditorOpened;
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkByLmContainer::SetEditorOpenedBool()
+// ----------------------------------------------------------------------------
+//
+void CLmkCategoryContentsContainer::SetEditorOpenedBool(TBool aBoolvalue)
+    {
+    iIsEditorOpened = aBoolvalue;
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkCategoryContentsContainer::UpdateMskContainerL()
+// ----------------------------------------------------------------------------
+//
+void CLmkCategoryContentsContainer::UpdateMskContainerL()
+    {
+    CLmkBaseView* view = reinterpret_cast<CLmkBaseView*> (&iView);
+    view->UpdateMskViewL(ResolveMskDisplayItem());
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkCategoryContentsContainer::RemoveFromThisCategory()
+// ----------------------------------------------------------------------------
+//
+void CLmkCategoryContentsContainer::RemoveFromThisCategoryL()
+    {
+    iIsRemoveOperation = ETrue;
+    CLmkBaseView* view = reinterpret_cast<CLmkBaseView*> (&iView);
+    view->UpdateMskViewL(ENoMsk);
+    (static_cast<CLmkAppLmSelectorImpl*> (iSelector))->RemoveLandmarksFromCategoryL();
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkCategoryContentsContainer::IsUncategorizedCategory()
+// ----------------------------------------------------------------------------
+//
+TBool CLmkCategoryContentsContainer::IsUncategorizedCategory()
+    {
+    CLmkAppLmSelectorImpl* selector =
+            static_cast<CLmkAppLmSelectorImpl*> (iSelector);
+    return selector->IsCriteriaUnCategorizedCat();
+    }
+
+// ---------------------------------------------------------
+// CLmkCategoryContentsContainer::ResolveMskDisplayItem()
+// ---------------------------------------------------------
+//
+TLmkMskDispItem CLmkCategoryContentsContainer::ResolveMskDisplayItem()
+    {
+    TLmkMskDispItem dispItem = ELabel;
+    if ((!SelectorImpl().ListVisibleItemCount()))
+        {
+        dispItem = ENoMsk;
+        }
+    else
+        {
+        const CArrayFix<TInt>* markedIndexes = NULL;
+        markedIndexes = SelectorImpl().MarkedIndexes();
+        if (markedIndexes->Count() > 0)
+            {
+            dispItem = EContextMenu;
+            }
+        }
+    return dispItem;
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkByLmContainer::UpdateMskContainerForFilterL()
+// ----------------------------------------------------------------------------
+//
+void CLmkCategoryContentsContainer::UpdateMskContainerForFilterL()
+    {
+    iSearchInitiated = ETrue;
+    UpdateMskContainerL();
+    iSearchInitiated = EFalse;
+    }
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/app/src/CLmkCategoryContentsView.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,691 @@
+/*
+ * Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies 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 Categorized Landmarks view class methods.
+ *
+ */
+
+// INCLUDE FILES
+#include <EPos_CPosLandmarkDatabase.h>
+#include "CLmkDocument.h"
+#include <eiktxlbx.h>
+#include <eikmenup.h>
+#include <aknViewAppUi.h>
+#include <featmgr.h>
+#include <sendnorm.rsg> // R_SENDUI_MENU
+#include <landmarks.rsg>
+#include <EPos_CPosLandmark.h>
+#include <lbsposition.h>
+#include "CLmkCategoryContentsView.h"
+#include "landmarks.hrh"
+#include "CLmkCategoryContentsContainer.h"
+#include "CLmkAppSelectorImplBase.h"
+#include "MLmkListMemento.h"
+#include "CLmkAppUi.h"
+#include "CLmkSender.h"
+#include "CLmkLmItemListMemento.h"
+#include "CLmkByCategoryView.h"
+#include "clmkmapnavigationinterface.h"
+#include <StringLoader.h>
+#include "Debug.h"
+
+// ================= LOCAL FUNCTIONS =======================
+static void CleanupArray(TAny* aArray)
+    {
+    (static_cast<RPointerArray<CPosLandmark>*> (aArray))->ResetAndDestroy();
+    }
+
+// ================= MEMBER FUNCTIONS =======================
+// ----------------------------------------------------------------------------
+// CLmkCategoryContentsView::NewLC
+// Two-phased constructor.
+// ----------------------------------------------------------------------------
+//
+CLmkCategoryContentsView* CLmkCategoryContentsView::NewLC(
+        MLmkKeyProcessor& aKeyProcessor, CLmkSender& aLmkSender)
+    {
+    CLmkCategoryContentsView* self = new (ELeave) CLmkCategoryContentsView(
+            aKeyProcessor, aLmkSender);
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    return self;
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkCategoryContentsView::CLmkCategoryContentsView
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// ----------------------------------------------------------------------------
+//
+CLmkCategoryContentsView::CLmkCategoryContentsView(
+        MLmkKeyProcessor& aKeyProcessor, CLmkSender& aLmkSender) :
+    CLmkBaseView(aKeyProcessor), iLmkSender(aLmkSender)
+    {
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkCategoryContentsView::ConstructL
+// Symbian 2nd phase constructor can leave.
+// ----------------------------------------------------------------------------
+//
+void CLmkCategoryContentsView::ConstructL()
+    {
+    BaseConstructL(R_LMK_CATEGORY_CONTENTS_VIEW);
+    CLmkAppUi* lmkAppUi = static_cast<CLmkAppUi*> (AppUi());
+    CPosLandmarkDatabase& db = lmkAppUi->Document().LmDbL();
+    iMapNavInterface = CLmkMapNavigationInterface::NewL(db);
+    AttachAIWMenuInterestL();
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkCategoryContentsView::~CLmkCategoryContentsView
+// ----------------------------------------------------------------------------
+//
+CLmkCategoryContentsView::~CLmkCategoryContentsView()
+    {
+    if (iContainer)
+        {
+        AppUi()->RemoveFromViewStack(*this, iContainer);
+        }
+
+    delete iContainer;
+    delete iListMemento;
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkCategoryContentsView::AttachAIWMenuInterestL
+// ----------------------------------------------------------------------------
+//
+void CLmkCategoryContentsView::AttachAIWMenuInterestL()
+    {
+    iMapNavInterface->AttachAIWInterestL(R_LMK_NEW_LANDMARK_SUBMENU,
+            R_LMK_AIW_INTEREST_SELECTFROMMAP);
+    iMapNavInterface->AttachAIWInterestL(R_LMK_BYLM_MENU1,
+            R_LMK_AIW_INTEREST_SHOWONMAP);
+    iMapNavInterface->AttachAIWInterestL(R_LMK_BYLM_MENU1,
+            R_LMK_AIW_INTEREST_NAVIGATETO);
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkCategoryContentsView::ProcessKeyEventL
+// ----------------------------------------------------------------------------
+//
+TBool CLmkCategoryContentsView::ProcessKeyEventL(const TKeyEvent& aKeyEvent,
+        TEventCode aType)
+    {
+    return CLmkBaseView::ProcessKeyEventL(aKeyEvent, aType);
+    }
+
+// ----------------------------------------------------------------------------
+// TUid CLmkCategoryContentsView::Id
+// ----------------------------------------------------------------------------
+//
+TUid CLmkCategoryContentsView::Id() const
+    {
+    return TUid::Uid(ELmkCategoryContentsView);
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkCategoryContentsView::HandleCommandL
+// ----------------------------------------------------------------------------
+//
+void CLmkCategoryContentsView::HandleCommandL(TInt aCommand)
+    {
+    DEBUG1( CLmkCategoryContentsView::HandleCommandL entered with aCommand=%d, aCommand);
+
+    AknSelectionService::HandleMarkableListProcessCommandL(aCommand,
+            &(iContainer->ListBox()));
+    CLmkAppSelectorImplBase& selector = iContainer->SelectorImpl();
+    //first give a chance to M&N framework.
+    TInt aiwCmd = iMapNavInterface->GetServiceCmdByMenuCmd(aCommand);
+    if (KAiwCmdNone == aiwCmd)
+        {
+        aiwCmd = selector.ServiceCmdByMenuCmd(aCommand);
+        }
+    //Handle AIW command
+    if (HandleAIWserviceCommandsL(aiwCmd, aCommand))
+        {
+        iContainer->ListBox().ClearSelection();
+        EnableMskLabelL(ETrue);
+        return;
+        }
+
+    switch (aCommand)
+        {
+        case ELmkCmdNewLmCurrentLocation:
+        case ELmkCmdNewLmEmpty:
+        case ELmkCmdEditLm:
+        case ELmkCmdDeleteLm:
+        case ELmkCmdAddToCat:
+        case ELmkCmdChangeIcon:
+        case ELmkCmdSendVia1: // These commands are used by SendUi
+        case ELmkCmdSendVia2:
+        case ELmkCmdSendVia3:
+        case ELmkCmdSendVia4:
+        case ELmkCmdSendVia5:
+        case ELmkCmdSendVia6:
+        case ELmkCmdSendVia7:
+        case ELmkCmdSendVia8:
+        case ELmkCmdSendVia9:
+        case ELmkCmdSendVia10:
+        case ELmkCmdSend:
+        case ELmkCmdOpenLm:
+        case EAknCmdMark:
+        case EAknCmdUnmark:
+        case EAknMarkAll:
+        case EAknUnmarkAll:
+        case ELmkCmdLaunchPositionSettings:
+            {
+            TInt markedCount(
+                    iContainer->SelectorImpl().ListMarkedItemCountL());
+            DEBUG1( CLmkCategoryContentsView::HandleCommandL markedcount=%d,markedCount );
+
+            if (markedCount > 0 && aCommand == ELmkCmdOpenLm
+                    && !iContainer->IsEditorOpened())
+                {
+                DEBUG( CLmkCategoryContentsView::HandleCommandL ELmkCmdOpenLm showing c menu);
+                if (MenuBar())
+                    {
+                    MenuBar()->SetContextMenuTitleResourceId(R_LMK_OK_MENUBAR);
+                    MenuBar()->TryDisplayContextMenuBarL();
+                    }
+                }
+            else if (aCommand == ELmkCmdOpenLm
+                    && !iContainer->IsEditorOpened())
+                {
+                DEBUG( CLmkCategoryContentsView::HandleCommandL ELmkCmdOpenLm );
+                iContainer->SelectorImpl().ProcessCommandL(aCommand);
+                iContainer->SetEditorOpenedBool(ETrue);
+                }
+            else
+                {
+                DEBUG( CLmkCategoryContentsView::HandleCommandL ProcessCommandL aCommand );
+                iContainer->SelectorImpl().ProcessCommandL(aCommand);
+                }
+
+            if (static_cast<CTextListBoxModel*> (iContainer->ListBox().Model())->ItemTextArray()->MdcaCount()
+                    == 0)
+                {
+                DEBUG( CLmkCategoryContentsView::HandleCommandL listbx count = 0 );
+                AppUi()->ActivateLocalViewL(TUid::Uid(ELmkByCategoryView));
+                }
+            break;
+            }
+        case EAknSoftkeyBack:
+            {
+            DEBUG( CLmkCategoryContentsView::HandleCommandL Back Button );
+            AppUi()->ActivateLocalViewL(TUid::Uid(ELmkByCategoryView));
+            break;
+            }
+
+        case ERemoveFromCat:
+            {
+            DEBUG( CLmkCategoryContentsView::HandleCommandL ERemoveFromCat );
+            iContainer->RemoveFromThisCategoryL();
+            if (static_cast<CTextListBoxModel*> (iContainer->ListBox().Model())->ItemTextArray()->MdcaCount()
+                    == 0)
+                {
+                AppUi()->ActivateLocalViewL(TUid::Uid(ELmkByCategoryView));
+                }
+            break;
+            }
+        default:
+            {
+            DEBUG( CLmkCategoryContentsView::HandleCommandL default );
+            (static_cast<CLmkAppUi*> (AppUi()))->HandleCommandL(aCommand);
+            break;
+            }
+        }
+    DEBUG( CLmkCategoryContentsView::HandleCommandL End );
+    }
+
+// ---------------------------------------------------------
+// CLmkCategoryContentsView::DynInitMenuPaneL
+// ---------------------------------------------------------
+//
+void CLmkCategoryContentsView::DynInitMenuPaneL(TInt aResourceId,
+        CEikMenuPane* aMenuPane)
+    {
+    DEBUG( CLmkCategoryContentsView::DynInitMenuPaneL entered );
+    iMapNavInterface->HandleMenuOperationL(aResourceId, aMenuPane,
+            ELmkCmdMnNav);
+    AknSelectionService::HandleMarkableListDynInitMenuPane(aResourceId,
+            aMenuPane, &(iContainer->ListBox()));
+
+    CLmkAppSelectorImplBase& selector = iContainer->SelectorImpl();
+    TInt markedCount(selector.ListMarkedItemCountL());
+    TInt visibleCount(selector.ListVisibleItemCount());
+    DEBUG1( CLmkCategoryContentsView::DynInitMenuPaneL markedCount=%d,markedCount );
+    DEBUG1( CLmkCategoryContentsView::DynInitMenuPaneL visibleCount=%d,visibleCount );
+
+    switch (aResourceId)
+        {
+        case R_LMK_BYLM_MENU1:
+            {
+            if (iContainer->IsUncategorizedCategory() || visibleCount == 0)
+                {
+                aMenuPane->SetItemDimmed(ERemoveFromCat, ETrue);
+                }            
+            aMenuPane->SetItemDimmed(ELmkCmdSendDummy, ETrue);
+
+            // Send menu is handled by the sender:
+            if ( FeatureManager::FeatureSupported( KFeatureIdLandmarksConverter ) )
+                {
+                iLmkSender.DisplaySendMenuL( *aMenuPane, visibleCount );
+                if( visibleCount > 0 )
+                    {
+                    TInt pos( 0 );
+                    aMenuPane->ItemAndPos( ELmkCmdSend, pos );    
+                    if( pos > 0 )
+                        {            
+                        aMenuPane->SetItemDimmed(ELmkCmdSend,EFalse );
+                        aMenuPane->SetItemSpecific(ELmkCmdSend,ETrue);
+                        }                       
+                    }   
+                }
+
+            /*
+             If multiple landmarks are selected then we have to dim
+             Navigate To option.
+             if only one landmark is in focus then we have to dim
+             Navigate To & Show On Map options if the particular landmark
+             does not either have address or coordinates.
+             */
+
+            TBool isLandmarkDataEmpty = EFalse;
+            if (visibleCount == 0)
+                {
+                isLandmarkDataEmpty = ETrue;
+                }
+            else
+                {
+                if (markedCount == 1 || markedCount == 0)
+                    {
+                    // Get the selected landmark and check if it is empty
+                    RPointerArray<CPosLandmark> lmkArray;
+                    TInt retVal = iContainer->GetSelectedLandmarksL(lmkArray);
+                    if (retVal != KErrNotFound)
+                        {
+                        CleanupStack::PushL(TCleanupItem(CleanupArray,
+                                &lmkArray));
+                        isLandmarkDataEmpty
+                                = iContainer->IsLandmarkDataEmptyL(
+                                        lmkArray[0]);
+                        CleanupStack::PopAndDestroy();// lmkArray
+                        }
+                    }
+                }
+
+            TInt showOnMapCmd = -1;
+            TInt navigateToCmd = -1;
+
+            TInt cnt = aMenuPane->NumberOfItemsInPane();
+
+            for (TInt i = 0; i < cnt; ++i)
+                {
+                CEikMenuPaneItem::SData& itemData =
+                        aMenuPane->ItemDataByIndexL(i);
+
+                if (iMapNavInterface->GetServiceCmdByMenuCmd(
+                        itemData.iCommandId) == KAiwCmdMnShowMap)
+                    {
+                    showOnMapCmd = itemData.iCommandId;
+                    }
+                if (iMapNavInterface->GetServiceCmdByMenuCmd(
+                        itemData.iCommandId) == KAiwCmdMnNavigateTo)
+                    {
+                    navigateToCmd = itemData.iCommandId;
+                    }
+                }
+            if (showOnMapCmd < 0 && navigateToCmd < 0)
+                {
+                break;
+                }
+            // dimming navigate to item
+            aMenuPane->SetItemDimmed(navigateToCmd, ETrue);
+            
+            // handling of showonmap item
+            if (isLandmarkDataEmpty || markedCount > 1)
+                {
+                aMenuPane->SetItemDimmed(showOnMapCmd, ETrue);
+                }
+            else
+                {
+                aMenuPane->SetItemDimmed(showOnMapCmd, EFalse);
+                aMenuPane->SetItemSpecific(showOnMapCmd, ETrue);
+                }
+            break;
+            }
+        case R_LMK_OK_MENU:
+            {
+            DEBUG( CLmkCategoryContentsView::DynInitMenuPaneL R_LMK_OK_MENU );
+            // Let send ui add the send menu if MTMs are available:            
+            if (FeatureManager::FeatureSupported(KFeatureIdLandmarksConverter))
+                {
+                aMenuPane->SetItemDimmed(ELmkCmdSendDummy, EFalse);
+                iLmkSender.DisplaySendMenuL(*aMenuPane, visibleCount);
+                }
+            else
+                {
+                aMenuPane->SetItemDimmed(ELmkCmdSendDummy, ETrue);
+                }
+
+            if (visibleCount == 0)
+                {
+                aMenuPane->SetItemDimmed(ELmkCmdAddToCat, ETrue);
+                aMenuPane->SetItemDimmed(ELmkCmdDeleteLm, ETrue);
+                aMenuPane->SetItemDimmed(ELmkCmdNewLm, EFalse);
+                }
+            break;
+            }
+        case R_LMK_MAIN_MENU:
+            {
+            CLmkBaseView::HandleHelpFeature(aMenuPane);
+            break;
+            }
+        case R_SENDUI_MENU: // Dynamically created send ui menu
+            {
+            // Send menu is handled by the sender:
+            if (FeatureManager::FeatureSupported(KFeatureIdLandmarksConverter))
+                {
+                iLmkSender.DisplaySendCascadeMenuL(*aMenuPane);
+                }
+            break;
+            }
+        case R_LMK_NEW_LANDMARK_SUBMENU:
+            {
+            if (FeatureManager::FeatureSupported(
+                    KFeatureIdLocationFrameworkCore))
+                {
+                aMenuPane->SetItemDimmed(ELmkCmdNewLmCurrentLocation, EFalse);
+                }
+            else
+                {
+                aMenuPane->SetItemDimmed(ELmkCmdNewLmCurrentLocation, ETrue);
+                }
+
+            if (iIsHideCoordinate)
+                {
+                aMenuPane->SetItemDimmed(ELmkCmdNewLmEmpty, ETrue);
+                }
+            else
+                {
+                aMenuPane->SetItemDimmed(ELmkCmdNewLmEmpty, EFalse);
+                }
+            break;
+            }
+        default:
+            {
+            break;
+            }
+        }
+    DEBUG( CLmkCategoryContentsView::DynInitMenuPaneL end );
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkCategoryContentsView::DoActivateL
+// ----------------------------------------------------------------------------
+//
+void CLmkCategoryContentsView::DoActivateL(const TVwsViewId& /*aPrevViewId*/,
+        TUid /*aCustomMessageId*/, const TDesC8& /*aCustomMessage*/)
+    {
+    DEBUG( CLmkCategoryContentsView::DoActivateL entered );
+    if (!iContainer)
+        {
+        // FOr Full landscape support
+        TRAPD( err, iContainer = CLmkCategoryContentsContainer::NewL(
+                        *this, this, ClientRect(), *this ) );
+        if (err != KErrNone)
+            { // Cagegory deleted, go back to "by category" view
+            AppUi()->ActivateLocalViewL(TUid::Uid(ELmkByCategoryView));
+            return;
+            }
+
+        CLmkAppSelectorImplBase& selector = iContainer->SelectorImpl();
+        AppUi()->AddToStackL(*this, iContainer);
+
+#ifdef RD_SCALABLE_UI_V2
+        //for touch event
+        iContainer->SetListBoxObserver(this);
+#endif//RD_SCALABLE_UI_V2
+        if (!iListMemento)
+            { // Memento not created yet, create it now:
+            iListMemento = selector.MementoL();
+            }
+        selector.SetMemento(*iListMemento);
+        selector.RestoreMemento();
+        EnableMskMenuL(EFalse);
+        EnableMskLabelL(EFalse);
+        }
+    DEBUG( CLmkCategoryContentsView::DoActivateL End );
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkCategoryContentsView::DoDeactivate
+// ----------------------------------------------------------------------------
+//
+void CLmkCategoryContentsView::DoDeactivate()
+    {
+    if (iContainer)
+        {
+        iContainer->SelectorImpl().StoreMemento();
+        AppUi()->RemoveFromViewStack(*this, iContainer);
+        }
+    TRAP_IGNORE(EnableMskMenuL(EFalse));
+    TRAP_IGNORE(EnableMskLabelL(EFalse));
+    delete iContainer;
+    iContainer = NULL;
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkCategoryContentsView::Update()
+// ----------------------------------------------------------------------------
+//
+void CLmkCategoryContentsView::Update()
+    {
+    iContainer->SetRect(ClientRect());
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkCategoryContentsView::IsContainerPtrValid()
+// ----------------------------------------------------------------------------
+//
+TBool CLmkCategoryContentsView::IsContainerPtrValid()
+    {
+    TBool lResult = ETrue;
+    if (!iContainer)
+        {
+        // FOr Full landscape support
+        TRAPD( err, iContainer = CLmkCategoryContentsContainer::NewL(
+                        *this, this, ClientRect(), *this ) );
+        if (err != KErrNone)
+            { // Cagegory deleted, go back to "by category" view
+            lResult = EFalse;
+            }
+        else
+            {
+            lResult = ETrue;
+            delete iContainer;
+            iContainer = NULL;
+            }
+        }
+    return lResult;
+    }
+
+// ---------------------------------------------------------
+// CLmkCategoryContentsView::EnableMskMenuL()
+// ---------------------------------------------------------
+//
+void CLmkCategoryContentsView::EnableMskMenuL(TBool aEnable)
+    {
+    CEikButtonGroupContainer* cbaGrp = Cba();
+    if (cbaGrp)
+        {
+        if (aEnable)
+            {
+            cbaGrp->RemoveCommandFromStack(KMskCommandPos, ELmkCmdOpenLm);
+            cbaGrp->SetCommandSetL(R_LMK_SOFTKEYS_OPTIONS_BACK_CONTEXTOPTIONS);
+            cbaGrp->MakeCommandVisible(EAknSoftkeyContextOptions, ETrue);
+            if (MenuBar())
+                MenuBar()->SetContextMenuTitleResourceId(R_LMK_OK_MENUBAR);
+            }
+        else
+            {
+            cbaGrp->MakeCommandVisible(EAknSoftkeyContextOptions, EFalse);
+            }
+        }
+    }
+
+// ---------------------------------------------------------
+// CLmkCategoryContentsView::EnableMskLabelL()
+// ---------------------------------------------------------
+//
+void CLmkCategoryContentsView::EnableMskLabelL(TBool aEnable)
+    {
+    CEikButtonGroupContainer* cbaGrp = Cba();
+    if (cbaGrp)
+        {
+        if (aEnable)
+            {
+            HBufC* mskOpenTxt = NULL;
+            mskOpenTxt = StringLoader::LoadLC(R_LMK_MSK_OPEN, iEikonEnv);
+            cbaGrp->RemoveCommandFromStack(KMskCommandPos,
+                    EAknSoftkeyContextOptions);
+            cbaGrp->AddCommandToStackL(KMskCommandPos, ELmkCmdOpenLm,
+                    mskOpenTxt->Des());
+            cbaGrp->MakeCommandVisible(ELmkCmdOpenLm, ETrue);
+            CleanupStack::PopAndDestroy(mskOpenTxt);
+            }
+        else
+            {
+            cbaGrp->MakeCommandVisible(ELmkCmdOpenLm, EFalse);
+            }
+        }
+    }
+
+#ifdef RD_SCALABLE_UI_V2
+// ---------------------------------------------------------
+// CLmkCategoryContentsView::HandleListBoxEventL()
+// ---------------------------------------------------------
+//
+void CLmkCategoryContentsView::HandleListBoxEventL(CEikListBox* /*aListBox*/,
+        TListBoxEvent aEventType)
+    {
+    TLmkMskDispItem dispItem = iContainer->ResolveMskDisplayItem();
+
+    switch (aEventType)
+        {
+        //case EEventItemDoubleClicked:
+        case EEventItemSingleClicked:
+            {
+            if (dispItem == EContextMenu)
+                {
+                UpdateMskViewL(dispItem);
+                CEikMenuBar
+                        * menubar =
+                                static_cast<CAknViewAppUi*> (iAvkonAppUi)->View(
+                                        TUid::Uid(ELmkCategoryContentsView))->MenuBar();
+                if (menubar)
+                    {
+                    TRAPD( err, menubar->TryDisplayContextMenuBarL() );
+                    User::LeaveIfError(err);
+                    }
+                }
+            else if (dispItem == ELabel)
+                {
+                UpdateMskViewL(dispItem);
+                HandleCommandL(ELmkCmdOpenLm);
+                }
+            break;
+            }
+
+            //case EEventItemClicked:
+        case EEventPanningStarted:
+        case EEventPanningStopped:
+        case EEventFlickStarted:
+        case EEventFlickStopped:
+        case EEventPenDownOnItem:
+        case EEventItemDraggingActioned:
+            {
+            if (dispItem == EContextMenu)
+                {
+                UpdateMskViewL(dispItem);
+                }
+            else if (dispItem == ELabel)
+                {
+                UpdateMskViewL(dispItem);
+                }
+            break;
+            }
+        }
+    }
+#endif//RD_SCALABLE_UI_V2
+
+// ---------------------------------------------------------
+// CLmkCategoryContentsView::HandleAIWserviceCommandsL()
+// ---------------------------------------------------------
+//
+TBool CLmkCategoryContentsView::HandleAIWserviceCommandsL(
+        TInt aServiceCommand, TInt aMenuCommand)
+    {
+    TBool result = ETrue;
+    RPointerArray<CPosLandmark> lmkArray;
+    switch (aServiceCommand)
+        {
+        case KAiwCmdMnNavigateTo:
+            {
+            if (iContainer->GetSelectedLandmarksL(lmkArray) == KErrNone)
+                {
+                CleanupStack::PushL(TCleanupItem(CleanupArray, &lmkArray));
+                iMapNavInterface->NavigateToLandmarkL(lmkArray[0],
+                        aMenuCommand);
+                CleanupStack::PopAndDestroy(); // lmkArray
+                }
+            break;
+            }
+        case KAiwCmdMnShowMap:
+            {
+            if (iContainer->GetSelectedLandmarksL(lmkArray) == KErrNone)
+                {
+                CleanupStack::PushL(TCleanupItem(CleanupArray, &lmkArray));
+                iMapNavInterface->ShowLandmarksOnMapL(lmkArray, aMenuCommand,
+                        CLmkMapNavigationInterface::EByLmkView);
+                CleanupStack::PopAndDestroy(); // lmkArray
+                }
+            break;
+            }
+        case KAiwCmdMnSelectFromMap:
+            {
+            // category view
+            CLmkByCategoryView* categoryView =
+                    static_cast<CLmkByCategoryView*> (AppUi()->View(
+                            TUid::Uid(ELmkByCategoryView)));
+            const CLmkLmItemListMemento
+                    & categoryMemento =
+                            static_cast<const CLmkLmItemListMemento&> (categoryView->BorrowMemento());
+            iMapNavInterface->SetObserver(&iContainer->SelectorImpl());
+            TPosLmItemId categoryId = categoryMemento.MemorizedItemId();
+            iMapNavInterface->GetLandmarkFromMapForCategoryL(aMenuCommand,
+                    categoryId);
+            break;
+            }
+        default:
+            {
+            result = EFalse;
+            break;
+            }
+        }
+    return result;
+    }
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/app/src/CLmkCategorySettingsContainer.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,311 @@
+/*
+ * Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:    Category Settings View (Edit Categories View) Class Implementation
+ *
+ */
+
+// INCLUDE FILES
+
+#include <aknlists.h>
+#include <aknview.h>
+// For RD_AVKON_UNBRANCH
+#include <bldvariant.hrh>
+#include <AknDef.h>
+#include <landmarks.rsg>
+#include <lmkui.rsg>
+#include "landmarks.hrh"
+//#include "Landmarks.hlp.hrh"
+#include <csxhelp/lm.hlp.hrh>
+#include "CLmkAppUi.h"
+#include "CLmkDocument.h"
+#include "CLmkUiUtils.h"
+#include "CLmkAppCategorySettingsImpl.h"
+#include "CLmkCategorySettingsView.h"
+#include "CLmkCategorySettingsContainer.h"
+#include <lmkerrors.h>
+
+#if defined(_DEBUG)
+// CONSTANTS
+namespace
+    {
+    _LIT( KPanicText, "CLmkCategorySettingsContainer" );
+
+    void Panic( TPanicCode aReason )
+        {
+        User::Panic( KPanicText, aReason );
+        }
+    } // namespace
+#endif
+// ================= MEMBER FUNCTIONS =======================
+// ----------------------------------------------------------------------------
+// CLmkCategorySettingsContainer::NewL
+// ----------------------------------------------------------------------------
+//
+
+// FOr landscape support
+CLmkCategorySettingsContainer* CLmkCategorySettingsContainer::NewL(
+        MLmkKeyProcessor& aKeyProcessor, MObjectProvider* aParent,
+        const TRect& aRect, CAknView& aView)
+    {
+    CLmkCategorySettingsContainer* self =
+            new (ELeave) CLmkCategorySettingsContainer(aKeyProcessor, aView);
+    CleanupStack::PushL(self);
+    self->SetMopParent(aParent);
+    self->ConstructL(aRect);
+    CleanupStack::Pop(); // self
+    return self;
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkCategorySettingsContainer::CLmkCategorySettingsContainer
+// ----------------------------------------------------------------------------
+//
+CLmkCategorySettingsContainer::CLmkCategorySettingsContainer(
+        MLmkKeyProcessor& aKeyProcessor, CAknView& aView) :
+    CLmkBaseContainer(aKeyProcessor, KLM_HLP_EDIT_CATEGORIES), iView(aView),
+            iCurrentIndex(0)
+    {
+    }
+
+// ---------------------------------------------------------
+// CLmkCategorySettingsContainer::ConstructL
+// Symbian 2nd phase constructor can leave.
+// ---------------------------------------------------------
+//
+void CLmkCategorySettingsContainer::ConstructL(const TRect& aRect)
+    {
+    CLmkBaseContainer::BaseConstructL();
+    CreateWindowL();
+
+    CreateNaviPaneL(0);
+    CLmkUiUtils::ChangeTitlePaneL( R_LMK_CATEGORY_SETTINGS_TITLE);
+
+    CLmkAppUi* lmkAppUi = static_cast<CLmkAppUi*> (ViewAppUi());
+    CPosLandmarkDatabase& db = lmkAppUi->Document().LmDbL();
+    CLmkSender& sender = lmkAppUi->LmkSender();
+
+    iSelector = CLmkAppCategorySettingsImpl::NewL(db, sender, EFalse);
+    iSelector->SetMskObserver(this);
+    iListBox = &(iSelector->CreateListBoxL(this, EAknCtDoubleGraphicListBox,
+#ifdef RD_SCALABLE_UI_V2
+            EAknListBoxStylusMarkableList,
+#else
+            EAknListBoxMarkableList,
+#endif //RD_SCALABLE_UI_V2
+            R_LMK_EMPTY_NO_CATEGORIES, R_LMK_GUIDE_NEW_CATEGORY));
+
+    // enable scroll arrows
+    CEikScrollBarFrame* sBFrame = iListBox->CreateScrollBarFrameL(ETrue);
+    sBFrame->SetScrollBarVisibilityL(CEikScrollBarFrame::EOn,
+            CEikScrollBarFrame::EAuto);
+
+    SetRect(aRect);
+    ActivateL();
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkCategorySettingsContainer::~CLmkCategorySettingsContainer
+// ----------------------------------------------------------------------------
+//
+CLmkCategorySettingsContainer::~CLmkCategorySettingsContainer()
+    {
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkCategorySettingsContainer::SelectorImpl
+// ----------------------------------------------------------------------------
+//
+CLmkAppCategorySettingsImpl& CLmkCategorySettingsContainer::SelectorImpl()
+    {
+    return *static_cast<CLmkAppCategorySettingsImpl*> (iSelector);
+    }
+
+// ---------------------------------------------------------
+// CLmkCategorySettingsContainer::ListBox()
+// ---------------------------------------------------------
+//
+CEikTextListBox& CLmkCategorySettingsContainer::ListBox()
+    {
+    __ASSERT_DEBUG(iListBox, Panic(KLmkPanicNullMember));
+    return *iListBox;
+    }
+
+// ---------------------------------------------------------
+// CLmkCategorySettingsContainer::OfferKeyEventL()
+// ---------------------------------------------------------
+//
+TKeyResponse CLmkCategorySettingsContainer::OfferKeyEventL(
+        const TKeyEvent& aKeyEvent, TEventCode aType)
+    {
+    if (aType == EEventKey && aKeyEvent.iCode == EKeyBackspace
+            && MenuBar()->ItemSpecificCommandsEnabled())
+        {
+        CLmkAppSelectorImplBase& selector = SelectorImpl();
+        TInt markedCount(selector.ListMarkedItemCountL());
+        //TInt visibleCount( selector.ListVisibleItemCount() );
+        // if there is atleast one landmark and only one or less
+        // is market then EKeyOK means edit command
+        if (markedCount > 0)
+            {
+            selector.ProcessCommandL(ELmkCmdDeleteCat);
+            return EKeyWasConsumed;
+            }
+        }
+    return CLmkBaseContainer::OfferKeyEventL(aKeyEvent, aType);
+    }
+
+// ---------------------------------------------------------
+// CLmkCategorySettingsContainer::SizeChanged()
+// Called by framework when the view size is changed
+// ---------------------------------------------------------
+//
+void CLmkCategorySettingsContainer::SizeChanged()
+    {
+    __ASSERT_DEBUG(iListBox, Panic(KLmkPanicNullMember));
+    iListBox->SetRect(Rect());
+    }
+
+// ---------------------------------------------------------
+// CLmkCategorySettingsContainer::CountComponentControls() const
+// ---------------------------------------------------------
+//
+TInt CLmkCategorySettingsContainer::CountComponentControls() const
+    {
+    //only one control allways
+    return 1; // return nbr of controls inside this container
+    }
+
+// ---------------------------------------------------------
+// CLmkCategorySettingsContainer::ComponentControl(TInt aIndex) const
+// ---------------------------------------------------------
+//
+CCoeControl* CLmkCategorySettingsContainer::ComponentControl(TInt /*aIndex*/) const
+    {
+    return iListBox;
+    }
+
+// ---------------------------------------------------------
+// CLmkCategorySettingsContainer::MenuBar
+// ---------------------------------------------------------
+//
+CEikMenuBar* CLmkCategorySettingsContainer::MenuBar()
+    {
+    return ViewAppUi()->View(TUid::Uid(ELmkCategorySettingsView))->MenuBar();
+    }
+
+// ---------------------------------------------------------
+// CLmkCategorySettingsContainer::ContextSpecificMenuBar
+// ---------------------------------------------------------
+//
+TInt CLmkCategorySettingsContainer::ContextSpecificMenuBar()
+    {
+    return R_LMK_CATEGORY_SETTINGS_OK_MENUBAR;
+    }
+
+// ---------------------------------------------------------
+// CLmkCategorySettingsContainer::OptionsMenuBar
+// ---------------------------------------------------------
+//
+TInt CLmkCategorySettingsContainer::OptionsMenuBar()
+    {
+    return R_LMK_CATEGORY_SETTINGS_MENUBAR;
+    }
+
+// -----------------------------------------------------------------------------
+//CLmkCategorySettingsContainer::HandleResourceChange
+// -----------------------------------------------------------------------------
+//
+void CLmkCategorySettingsContainer::HandleResourceChange(TInt aType)
+    {
+    CCoeControl::HandleResourceChange(aType);
+    if (aType == KEikDynamicLayoutVariantSwitch || (aType
+            == KAknsMessageSkinChange))
+        {
+        (static_cast<CLmkCategorySettingsView *> (&iView))->Update();
+        }
+    if (iListBox)
+        {
+        iListBox->DrawNow();
+        }
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkCategorySettingsContainer::FocusChanged()
+// ----------------------------------------------------------------------------
+//
+void CLmkCategorySettingsContainer::FocusChanged(TDrawNow aDrawNow)
+    {
+    if (iListBox)
+        {
+        iListBox->SetFocus(IsFocused(), aDrawNow);
+        }
+    }
+// ----------------------------------------------------------------------------
+// CLmkCategorySettingsContainer::UpdateMskContainer()
+// ----------------------------------------------------------------------------
+//
+void CLmkCategorySettingsContainer::UpdateMskContainerL()
+    {
+    CLmkBaseView* view = reinterpret_cast<CLmkBaseView*> (&iView);
+    view->UpdateMskViewL(EContextMenu);
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkCategorySettingsContainer::ResolveMskDisplayItem()
+// ----------------------------------------------------------------------------
+//
+TLmkMskDispItem CLmkCategorySettingsContainer::ResolveMskDisplayItem()
+    {
+    TLmkMskDispItem dispItem = EContextMenu;
+    if (SelectorImpl().ListVisibleItemCount() == 0)
+        {
+        dispItem = ENoMsk;
+        }
+    return dispItem;
+    }
+
+#ifdef RD_SCALABLE_UI_V2
+// ---------------------------------------------------------
+// CLmkCategorySettingsContainer::SetListBoxObserver
+// ---------------------------------------------------------
+//
+void CLmkCategorySettingsContainer::SetListBoxObserver(MEikListBoxObserver* aObserver)
+    {
+    __ASSERT_DEBUG( aObserver, Panic( KLmkPanicNullMember ) );
+    iListBox->SetListBoxObserver(aObserver);
+    }
+
+// ---------------------------------------------------------
+// CLmkCategorySettingsContainer::HandlePoineteventL
+// ---------------------------------------------------------
+//
+void CLmkCategorySettingsContainer::HandlePointerEventL( const TPointerEvent& aPointerEvent )
+    {
+    CCoeControl::HandlePointerEventL(aPointerEvent);
+    //    if(aPointerEvent.iType == TPointerEvent::EButton1Up)
+    //        {        
+    //        TInt currIndex1 = iListBox->CurrentItemIndex();
+    //        if( currIndex1 >=0 )
+    //            {
+    //            CEikMenuBar* menubar = MenuBar();
+    //            if ( menubar )
+    //                {
+    //                menubar->SetContextMenuTitleResourceId(R_LMK_CATEGORY_SETTINGS_OK_MENUBAR);
+    //                TRAP_IGNORE( menubar->TryDisplayContextMenuBarL() );
+    //                }   
+    //            }
+    //        }
+    }
+#endif//RD_SCALABLE_UI_V2 	
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/app/src/CLmkCategorySettingsView.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,346 @@
+/*
+ * 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:    LandmarksUi Content File -
+ *
+ */
+
+// INCLUDE FILES
+#include <eikmenup.h>
+#include <eiktxlbx.h>
+#include <landmarks.rsg>
+#include "landmarks.hrh"
+#include "CLmkAppUi.h"
+#include "CLmkAppCategorySettingsImpl.h"
+#include "CLmkCategorySettingsContainer.h"
+#include "CLmkCategorySettingsView.h"
+#include "CLmkCategoryContentsView.h"
+
+// ================= MEMBER FUNCTIONS =======================
+// ----------------------------------------------------------------------------
+// CLmkCategorySettingsView::NewLC( MLmkKeyProcessor& aKeyProcessor )
+// Two-phased constructor.
+// ----------------------------------------------------------------------------
+//
+CLmkCategorySettingsView* CLmkCategorySettingsView::NewLC(
+        MLmkKeyProcessor& aKeyProcessor)
+    {
+    CLmkCategorySettingsView* self = new (ELeave) CLmkCategorySettingsView(
+            aKeyProcessor);
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    return self;
+    }
+// ----------------------------------------------------------------------------
+// CLmkCategorySettingsView::CLmkCategorySettingsView
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// ----------------------------------------------------------------------------
+//
+CLmkCategorySettingsView::CLmkCategorySettingsView(
+        MLmkKeyProcessor& aKeyProcessor) :
+    CLmkBaseView(aKeyProcessor)
+    {
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkCategorySettingsView::ConstructL
+// Symbian 2nd phase constructor can leave.
+// ----------------------------------------------------------------------------
+//
+void CLmkCategorySettingsView::ConstructL()
+    {
+    BaseConstructL(R_LMK_CATEGORY_SETTINGS_VIEW);
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkCategorySettingsView::~CLmkCategorySettingsView
+// ----------------------------------------------------------------------------
+//
+CLmkCategorySettingsView::~CLmkCategorySettingsView()
+    {
+    if (iContainer)
+        {
+        AppUi()->RemoveFromViewStack(*this, iContainer);
+        }
+    delete iContainer;
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkCategorySettingsView::ProcessKeyEventL
+// ----------------------------------------------------------------------------
+//
+TBool CLmkCategorySettingsView::ProcessKeyEventL(const TKeyEvent& aKeyEvent,
+        TEventCode aType)
+    {
+    return CLmkBaseView::ProcessKeyEventL(aKeyEvent, aType);
+    }
+
+// ----------------------------------------------------------------------------
+// TUid CLmkCategorySettingsView::Id
+// ----------------------------------------------------------------------------
+//
+TUid CLmkCategorySettingsView::Id() const
+    {
+    return TUid::Uid(ELmkCategorySettingsView);
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkCategorySettingsView::HandleCommandL
+// ----------------------------------------------------------------------------
+//
+void CLmkCategorySettingsView::HandleCommandL(TInt aCommand)
+    {
+    AknSelectionService::HandleMarkableListProcessCommandL(aCommand,
+            &(iContainer->ListBox()));
+
+    switch (aCommand)
+        {
+        case EAknSoftkeyBack:
+            {
+            if (iPrevViewId == ELmkCategoryContentsView)
+                {
+                CLmkCategoryContentsView
+                        * view =
+                                static_cast<CLmkCategoryContentsView*> (AppUi()->View(
+                                        TUid::Uid(iPrevViewId)));
+                if (view->IsContainerPtrValid())
+                    {
+                    AppUi()->ActivateLocalViewL(TUid::Uid(iPrevViewId));
+                    }
+                else
+                    {
+                    AppUi()->ActivateLocalViewL(TUid::Uid(ELmkByCategoryView));
+                    }
+                }
+            else
+                {
+                AppUi()->ActivateLocalViewL(TUid::Uid(iPrevViewId));
+                }
+            break;
+            }
+        case ELmkCmdNewCategory:
+        case ELmkCmdChangeIcon:
+        case ELmkCmdRenameCat:
+        case ELmkCmdDeleteCat:
+            {
+            iContainer->SelectorImpl().ProcessCommandL(aCommand);
+            break;
+            }
+        default:
+            {
+            (static_cast<CLmkAppUi*> (AppUi()))->HandleCommandL(aCommand);
+            break;
+            }
+        }
+    }
+
+// ---------------------------------------------------------
+// CLmkCategorySettingsView::DynInitMenuPaneL
+// ---------------------------------------------------------
+//
+void CLmkCategorySettingsView::DynInitMenuPaneL(TInt aResourceId,
+        CEikMenuPane* aMenuPane)
+    {
+    CEikTextListBox& listbox = iContainer->ListBox();
+    AknSelectionService::HandleMarkableListDynInitMenuPane(aResourceId,
+            aMenuPane, &listbox);
+
+    TInt count(listbox.Model()->NumberOfItems());
+    TInt markedCount = listbox.SelectionIndexes()->Count();
+    CLmkAppCategorySettingsImpl& LCategorySettingsImpl =
+            iContainer->SelectorImpl();
+    // Checkif the category is a global category only when some items present
+    TBool retVal = EFalse;
+
+    if (count > 0)
+        {
+        retVal = LCategorySettingsImpl.IsPredefinedCategoryL();
+        }
+
+    switch (aResourceId)
+        {
+        case R_LMK_CATEGORY_SETTINGS_MENU1:
+            {
+            if (retVal || count == 0)
+                {
+                aMenuPane->SetItemDimmed(ELmkCmdRenameCat, ETrue);
+                aMenuPane->SetItemDimmed(ELmkCmdDeleteCat, ETrue);
+                }
+            else
+                {
+                if (markedCount > 0)
+                    {
+                    aMenuPane->SetItemDimmed(ELmkCmdRenameCat, ETrue);
+                    }
+                }
+            break;
+            }
+        case R_LMK_CATEGORY_SETTINGS_MENU2:
+            {
+            if (count == 0)
+                {
+                aMenuPane->SetItemDimmed(ELmkCmdChangeIcon, ETrue);
+                }
+            break;
+            }
+        case R_LMK_CATEGORY_SETTINGS_OK_MENU:
+            {
+            aMenuPane->SetItemDimmed(ELmkCmdNewCategory, ETrue);
+            if (retVal)
+                {
+                aMenuPane->SetItemDimmed(ELmkCmdRenameCat, ETrue);
+                aMenuPane->SetItemDimmed(ELmkCmdDeleteCat, ETrue);
+                }
+            if (count == 0)
+                {
+                aMenuPane->SetItemDimmed(ELmkCmdRenameCat, ETrue);
+                aMenuPane->SetItemDimmed(ELmkCmdDeleteCat, ETrue);
+                aMenuPane->SetItemDimmed(ELmkCmdChangeIcon, ETrue);
+                }
+            else
+                {
+                if (markedCount > 1)
+                    {
+                    aMenuPane->SetItemDimmed(ELmkCmdRenameCat, ETrue);
+                    }
+                }
+            break;
+            }
+        case R_LMK_MAIN_MENU:
+            {
+            CLmkBaseView::HandleHelpFeature(aMenuPane);
+            break;
+            }
+        default:
+            {
+            break;
+            }
+        }
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkCategorySettingsView::DoActivateL
+// ----------------------------------------------------------------------------
+//
+void CLmkCategorySettingsView::DoActivateL(const TVwsViewId& aPrevViewId,
+        TUid /*aCustomMessageId*/, const TDesC8& /*aCustomMessage*/)
+    {
+    iPrevViewId = aPrevViewId.iViewUid.iUid;
+
+#ifdef _DEBUG
+    RDebug::Print(_L( "CLmkCategorySettingsView::DoActivateL() called" ));
+#endif
+
+    if (!iContainer)
+        {
+        iContainer = CLmkCategorySettingsContainer::NewL(*this, this,
+                ClientRect(), *this);
+
+        AppUi()->AddToStackL(*this, iContainer);
+#ifdef RD_SCALABLE_UI_V2
+        //for touch event
+        iContainer->ListBox().SetListBoxObserver(this);
+#endif//RD_SCALABLE_UI_V2
+        }
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkCategorySettingsView::DoDeactivate
+// ----------------------------------------------------------------------------
+//
+void CLmkCategorySettingsView::DoDeactivate()
+    {
+    if (iContainer)
+        {
+        AppUi()->RemoveFromViewStack(*this, iContainer);
+        }
+    delete iContainer;
+    iContainer = NULL;
+    }
+// ----------------------------------------------------------------------------
+// CLmkCategorySettingsView::Update()
+// ----------------------------------------------------------------------------
+//
+void CLmkCategorySettingsView::Update()
+    {
+    iContainer->SetRect(ClientRect());
+    }
+
+// ---------------------------------------------------------
+// CLmkBaseView::EnableMskMenuL()
+// ---------------------------------------------------------
+//
+void CLmkCategorySettingsView::EnableMskMenuL(TBool aEnable)
+    {
+    CEikButtonGroupContainer* cbaGrp = Cba();
+    if (aEnable)
+        {
+        cbaGrp->SetCommandSetL(R_LMK_SOFTKEYS_OPTIONS_BACK_CONTEXTOPTIONS);
+        //cbaGrp->MakeCommandVisible(EAknSoftkeyContextOptions,ETrue);
+        cbaGrp->DrawDeferred();
+        MenuBar()->SetContextMenuTitleResourceId(
+                R_LMK_CATEGORY_SETTINGS_CONTEXT_MENUBAR);
+        }
+    else
+        {
+        cbaGrp->MakeCommandVisible(EAknSoftkeyContextOptions, EFalse);
+        }
+    }
+
+#ifdef RD_SCALABLE_UI_V2
+// ---------------------------------------------------------
+// CLmkCategorySettingsView::HandleListBoxEventL()
+// ---------------------------------------------------------
+//
+void CLmkCategorySettingsView::HandleListBoxEventL(CEikListBox* aListBox,
+        TListBoxEvent aEventType)
+    {    
+    TInt count(aListBox->Model()->NumberOfItems());
+    if( count == 0 )    
+        return;
+    
+    TInt markedCount = aListBox->SelectionIndexes()->Count();
+    
+    switch (aEventType)
+        {
+        case EEventItemSingleClicked:
+            {
+            if( markedCount > 0 )
+                {
+                CEikMenuBar* menubar = MenuBar();
+                if (menubar)
+                    {
+                    menubar->SetContextMenuTitleResourceId(R_LMK_CATEGORY_SETTINGS_OK_MENUBAR);
+                    TRAP_IGNORE( menubar->TryDisplayContextMenuBarL() );
+                    }            
+                }
+            else
+                {
+                CLmkAppCategorySettingsImpl& LCategorySettingsImpl =
+                        iContainer->SelectorImpl();
+                // Checkif the category is a global category only when some items present
+                TBool retVal = LCategorySettingsImpl.IsPredefinedCategoryL();
+                if( retVal  )
+                    HandleCommandL( ELmkCmdChangeIcon );                
+                else
+                    HandleCommandL( ELmkCmdRenameCat );                
+                }            
+            break;
+            }
+        default:
+            break;
+        }
+    }
+#endif//RD_SCALABLE_UI_V2
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/app/src/CLmkDocument.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,101 @@
+/*
+* 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:    LandmarksUi Content File -    Provides LM document class methods.
+*
+*/
+
+
+
+
+
+
+
+// INCLUDE FILES
+#include "CLmkDocument.h"
+#include "CLmkAppUi.h"
+#include "landmarks.hrh"
+#include "Debug.h"
+#include <EPos_CPosLandmarkDatabase.h>
+
+
+// ================= MEMBER FUNCTIONS =======================
+// ----------------------------------------------------------------------------
+// CLmkDocument::CLmkDocument
+// ----------------------------------------------------------------------------
+//
+CLmkDocument::CLmkDocument( CEikApplication& aApp )
+    : CEikDocument( aApp )
+    {
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkDocument::~CLmkDocument
+// ----------------------------------------------------------------------------
+//
+CLmkDocument::~CLmkDocument()
+    {
+    delete iDb;
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkDocument::ConstructL
+// Symbian 2nd phase constructor can leave.
+// ----------------------------------------------------------------------------
+//
+void CLmkDocument::ConstructL()
+    {
+    DEBUG( CLmkDocument::ConstructL entered );
+    TRAP(iError,iDb = CPosLandmarkDatabase::OpenL());
+    DEBUG1( CLmkDocument::ConstructL iError=%d,iError );
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkDocument::NewL
+// Two-phased constructor.
+// ----------------------------------------------------------------------------
+//
+CLmkDocument* CLmkDocument::NewL(
+    CEikApplication& aApp )     // CLocApp reference
+    {
+    CLmkDocument* self = new ( ELeave ) CLmkDocument( aApp );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop();
+    return self;
+    }
+
+// ----------------------------------------------------
+// CLmkDocument::CreateAppUiL
+// constructs CLmkAppUi
+// ----------------------------------------------------
+//
+CEikAppUi* CLmkDocument::CreateAppUiL()
+    {
+    return new ( ELeave ) CLmkAppUi;
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkDocument::LmDb
+// ----------------------------------------------------------------------------
+//
+CPosLandmarkDatabase& CLmkDocument::LmDbL() const
+    {
+    if ( iError != KErrNone)
+    	{
+    	User::Leave(iError);
+    	}
+    return *iDb;
+    }
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/app/src/CLmkLbWithFilterContainer.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,287 @@
+/*
+* Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies 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 methods for implementing container with
+*				 find/searchbox
+*
+*/
+
+// INCLUDE FILES
+
+#include <aknlists.h>
+#include <aknsfld.h>
+#include <AknsBasicBackgroundControlContext.h>
+#include "CLmkDocument.h"
+#include "landmarks.hrh"
+#include "CLmkAppUi.h"
+#include "CLmkAppSelectorImplBase.h"
+#include "CLmkLbWithFilterContainer.h"
+#include <lmkerrors.h>
+#include "Debug.h"
+
+// CONSTANTS
+namespace {
+#if defined(_DEBUG)
+_LIT( KPanicText, "CLmkLbWithFilterContainer" );
+
+void Panic( TPanicCode aReason )
+    {
+    User::Panic( KPanicText, aReason );
+    }
+#endif
+}  // namespace
+// ================= MEMBER FUNCTIONS =======================
+
+// ----------------------------------------------------------------------------
+// CLmkLbWithFilterContainer::CLmkBaseContainer
+// ----------------------------------------------------------------------------
+//
+CLmkLbWithFilterContainer::CLmkLbWithFilterContainer(
+    MLmkKeyProcessor& aKeyProcessor,
+    const TDesC& aHelpContext )
+    :CLmkBaseContainer( aKeyProcessor, aHelpContext )
+    {
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkLbWithFilterContainer::ConstructL
+// Symbian 2nd phase constructor can leave.
+// ----------------------------------------------------------------------------
+//
+void CLmkLbWithFilterContainer::ConstructL( const TRect& aRect )
+    {
+    CLmkBaseContainer::BaseConstructL();
+    CreateWindowL();
+
+    // Get the skin instance
+	iSkinInstance = AknsUtils::SkinInstance();
+
+	// Create background control context for skinning the background
+	iBackgroundSkinContext = CAknsBasicBackgroundControlContext::NewL(
+			KAknsIIDQsnBgAreaMain, aRect, ETrue );
+
+    iIsNeedToReDraw = ETrue;
+
+    CLmkAppUi* lmkAppUi = static_cast<CLmkAppUi*>( ViewAppUi() );
+    CPosLandmarkDatabase& db = lmkAppUi->Document().LmDbL();
+    CLmkSender& sender = lmkAppUi->LmkSender();
+    SetupSelectorAndListL( db, sender );
+
+    SetupTitlePaneL();
+    SetupNaviPaneL();
+    SetupFindBoxL();
+
+    // enable scroll arrows
+    CEikScrollBarFrame* sBFrame = iListBox->CreateScrollBarFrameL( ETrue );
+    sBFrame->SetScrollBarVisibilityL( CEikScrollBarFrame::EOn,
+                                      CEikScrollBarFrame::EAuto );
+
+    SetRect( aRect );
+    ActivateL();
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkLbWithFilterContainer::~CLmkLbWithFilterContainer
+// ----------------------------------------------------------------------------
+//
+CLmkLbWithFilterContainer::~CLmkLbWithFilterContainer()
+    {
+    delete iNaviDeco;
+    delete iFindBox;
+    delete iBackgroundSkinContext;
+    }
+// ----------------------------------------------------------------------------
+// CLmkLbWithFilterContainer::ListBox()
+// ----------------------------------------------------------------------------
+//
+CEikTextListBox& CLmkLbWithFilterContainer::ListBox()
+    {
+    __ASSERT_DEBUG( iListBox, Panic( KLmkPanicNullMember ) );
+    return *iListBox;
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkLbWithFilterContainer::OfferKeyEventL
+// ----------------------------------------------------------------------------
+//
+TKeyResponse CLmkLbWithFilterContainer::OfferKeyEventL(
+                                     const TKeyEvent& aKeyEvent,
+                                     TEventCode aType )
+    {
+    DEBUG( CLmkLbWithFilterContainer::OfferKeyEventL start );
+    TKeyResponse result( EKeyWasNotConsumed );
+    if ( ( aType == EEventKey || aType == EEventKeyUp) )
+        {
+        if(( iFindBox->TextLength() > 0 ||
+             aKeyEvent.iCode != EKeyBackspace ) && iFindBox->IsVisible())
+            {
+			result = iFindBox->OfferKeyEventL(aKeyEvent, aType);
+            }
+        else if( aKeyEvent.iCode == EKeyBackspace )
+            {
+			CLmkAppSelectorImplBase& selector = SelectorImpl();
+			TInt markedCount( selector.ListMarkedItemCountL() );
+			
+			DEBUG1( CLmkLbWithFilterContainer::OfferKeyEventL markedCount = %d,markedCount);
+			CEikMenuBar* menuBar = MenuBar();
+			if( menuBar )
+			    {
+                if( MenuBar()->ItemSpecificCommandsEnabled())
+                    {
+                    return EKeyWasConsumed;
+                    }			
+			    }
+			if(  markedCount <= 0)
+			    {
+                return EKeyWasConsumed;
+			    }
+			selector.ProcessCommandL( ELmkCmdDeleteLm );
+            return EKeyWasConsumed;
+            }
+        }
+    if ( result == EKeyWasNotConsumed )
+        {
+	    result = CLmkBaseContainer::OfferKeyEventL( aKeyEvent, aType );
+	    if(  aKeyEvent.iScanCode == EStdKeyHash )
+	        {
+	        UpdateMskContainerL();
+	        }
+        }
+    DEBUG1( CLmkLbWithFilterContainer::OfferKeyEventL End result=%d,result );
+    return result;
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkLbWithFilterContainer::SizeChanged()
+// Called by framework when the view size is changed
+// ----------------------------------------------------------------------------
+//
+void CLmkLbWithFilterContainer::SizeChanged()
+    {
+    __ASSERT_DEBUG( iListBox, Panic( KLmkPanicNullMember ) );
+	const TRect rect(Rect());
+
+    AknFind::HandleFixedFindSizeChanged(
+        this,
+        static_cast<CAknColumnListBox*>( iListBox ),
+        iFindBox );
+
+	if (iListBox && iFindBox && iFindBox->IsVisible())
+		{
+		AknLayoutUtils::LayoutControl(iListBox, rect,
+		AKN_LAYOUT_WINDOW_list_gen_pane(1));
+		AknLayoutUtils::LayoutControl(iFindBox, rect,
+		AKN_LAYOUT_WINDOW_find_pane);
+		if (iFindBox->IsVisible() && iListBox->IsVisible())
+			{
+			// The correct line position to use is 2, which corresponds
+			// EABColumn in Avkon (not a public enumeration,
+			// hence hard-coding used here)
+			const TInt KSeparatorLinePos = 2;
+			iFindBox->SetLinePos(KSeparatorLinePos);
+			}
+		}
+	else if (iListBox)
+		{
+		AknLayoutUtils::LayoutControl(iListBox, rect,
+		AKN_LAYOUT_WINDOW_list_gen_pane(0));
+		}
+	if (iListBox)
+		{
+		STATIC_CAST(CAknFilteredTextListBoxModel*,iListBox->Model())->Filter()->SetParentControl(this);
+		}
+	SelectorImpl().HandleScreenSizeChange();
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkLbWithFilterContainer::CountComponentControls
+// ----------------------------------------------------------------------------
+//
+TInt CLmkLbWithFilterContainer::CountComponentControls() const
+    {
+    return 2; // return nbr of controls inside this container
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkLbWithFilterContainer::ComponentControl
+// ----------------------------------------------------------------------------
+//
+CCoeControl* CLmkLbWithFilterContainer::ComponentControl( TInt aIndex ) const
+    {
+    switch ( aIndex )
+        {
+        case 0:
+            {
+            return iListBox;
+            }
+        case 1:
+            {
+            return iFindBox;
+            }
+        default:
+            {
+            return NULL;
+            }
+        }
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkLbWithFilterContainer::SetupFindBoxL
+// ----------------------------------------------------------------------------
+//
+void CLmkLbWithFilterContainer::SetupFindBoxL()
+	{
+	iFindBox = SelectorImpl().CreateFindBoxL(*this);
+	}
+
+
+// ---------------------------------------------------------
+// CLmkLbWithFilterContainer::Draw(const TRect& aRect) const
+// ---------------------------------------------------------
+//
+void CLmkLbWithFilterContainer::Draw(const TRect& /*aRect*/) const
+    {
+    if(iIsNeedToReDraw)
+        {
+        CWindowGc& gc = SystemGc();
+
+        AknsDrawUtils::Background( iSkinInstance,
+            iBackgroundSkinContext, this, gc, Rect() );
+
+        iIsNeedToReDraw = EFalse;
+        }
+    }
+
+#ifdef RD_SCALABLE_UI_V2
+// ---------------------------------------------------------
+// CLmkLbWithFilterContainer::SetListBoxObserver
+// ---------------------------------------------------------
+//
+void CLmkLbWithFilterContainer::SetListBoxObserver(MEikListBoxObserver* aObserver)
+	{
+	__ASSERT_DEBUG( aObserver, Panic( KLmkPanicNullMember ) );
+	iListBox->SetListBoxObserver(aObserver);
+	}
+#endif//RD_SCALABLE_UI_V2
+
+// ----------------------------------------------------------------------------
+// CLmkLbWithFilterContainer::UpdateMskContainerForFilterL()
+// ----------------------------------------------------------------------------
+//
+void CLmkLbWithFilterContainer::UpdateMskContainerForFilterL()
+	{
+	iSearchInitiated = ETrue;
+	UpdateMskContainerL();
+	iSearchInitiated = EFalse;
+	}
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/app/src/Debug.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,87 @@
+/*
+* 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:    LandmarksUi Content File -    Contains debugging functions
+*
+*/
+
+
+// INCLUDE FILES
+#include "Debug.h"
+#include <flogger.h>
+#include <e32svr.h>
+
+#ifdef __LMK_DEBUG_FLAG
+
+// CONSTANTS
+/// Folder where the log resides
+_LIT( KLogFolder, "Lmk" );
+
+/// The name of the log file
+_LIT( KLogFileName, "Lmk" );
+
+/// The format in which the time is formatted in log
+_LIT( KLogTimeFormat, "%02d.%02d:%02d:%06d ");
+
+/// The length of the string produced by KLocLogTimeFormat
+const TInt KLogTimeFormatLength = 16;
+
+/// How many characters a log line can contain
+const TInt KLogLineLength = 256;
+// ========================== OTHER EXPORTED FUNCTIONS =========================
+
+
+// -----------------------------------------------------------------------------
+// Debug
+// Generates a log file if c:\logs\LMK\ folder exists
+// -----------------------------------------------------------------------------
+//
+void Debug( TRefByValue<const TDesC> aText, ... )
+    {
+    #ifdef _DEBUG
+    RDebug::Print(aText);
+    #endif
+
+    VA_LIST args;
+    VA_START( args, aText );
+
+    TBuf<KLogLineLength> buf;
+    buf.FormatList( aText, args );
+
+    RFileLogger logger;
+    TInt ret=logger.Connect();
+    if (ret==KErrNone)
+        {
+        logger.SetDateAndTime( EFalse,EFalse );
+        logger.CreateLog( KLogFolder, KLogFileName, EFileLoggingModeAppend );
+        TBuf<KLogTimeFormatLength> timeStamp;
+        TTime now;
+        now.HomeTime();
+        TDateTime dateTime;
+        dateTime = now.DateTime();
+        timeStamp.Format( KLogTimeFormat,
+            dateTime.Hour(), dateTime.Minute(),
+            dateTime.Second(), dateTime.MicroSecond() );
+        buf.Insert( 0, timeStamp );
+
+        logger.Write(buf);
+        }
+
+    logger.Close();
+
+    VA_END( args );
+    }
+
+#endif // __LMK_DEBUG_FLAG
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/commonui/bwins/LMKCOMMONUIu.def	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,40 @@
+EXPORTS
+	??0TLmkEditorParams@CLmkEditorDlg@@QAE@XZ @ 1 NONAME ; CLmkEditorDlg::TLmkEditorParams::TLmkEditorParams(void)
+	??1CLmkCategorySelectorDlg@@UAE@XZ @ 2 NONAME ; CLmkCategorySelectorDlg::~CLmkCategorySelectorDlg(void)
+	??1CLmkEditorDlg@@UAE@XZ @ 3 NONAME ; CLmkEditorDlg::~CLmkEditorDlg(void)
+	??1CLmkItemIdDbCombiInfo@@QAE@XZ @ 4 NONAME ABSENT ; CLmkItemIdDbCombiInfo::~CLmkItemIdDbCombiInfo(void)
+	??1CLmkLandmarkSelectorDlg@@UAE@XZ @ 5 NONAME ; CLmkLandmarkSelectorDlg::~CLmkLandmarkSelectorDlg(void)
+	?ExecuteLD@CLmkCategorySelectorDlg@@QAEHAAV?$RArray@VCLmkItemIdDbCombiInfo@@@@@Z @ 6 NONAME ABSENT ; int CLmkCategorySelectorDlg::ExecuteLD(class RArray<class CLmkItemIdDbCombiInfo> &)
+	?ExecuteLD@CLmkCategorySelectorDlg@@QAEHAAVCLmkItemIdDbCombiInfo@@@Z @ 7 NONAME ABSENT ; int CLmkCategorySelectorDlg::ExecuteLD(class CLmkItemIdDbCombiInfo &)
+	?ExecuteLD@CLmkEditorDlg@@QAEHXZ @ 8 NONAME ; int CLmkEditorDlg::ExecuteLD(void)
+	?ExecuteLD@CLmkLandmarkSelectorDlg@@QAEHAAV?$RArray@VCLmkItemIdDbCombiInfo@@@@@Z @ 9 NONAME ABSENT ; int CLmkLandmarkSelectorDlg::ExecuteLD(class RArray<class CLmkItemIdDbCombiInfo> &)
+	?ExecuteLD@CLmkLandmarkSelectorDlg@@QAEHAAVCLmkItemIdDbCombiInfo@@@Z @ 10 NONAME ABSENT ; int CLmkLandmarkSelectorDlg::ExecuteLD(class CLmkItemIdDbCombiInfo &)
+	?NewL@CLmkCategorySelectorDlg@@SAPAV1@AAV?$RPointerArray@VCPosLandmarkDatabase@@@@H@Z @ 11 NONAME ABSENT ; class CLmkCategorySelectorDlg * CLmkCategorySelectorDlg::NewL(class RPointerArray<class CPosLandmarkDatabase> &, int)
+	?NewL@CLmkEditorDlg@@SAPAV1@AAVCPosLandmarkDatabase@@AAVCPosLandmark@@AAVTLmkEditorParams@1@@Z @ 12 NONAME ; class CLmkEditorDlg * CLmkEditorDlg::NewL(class CPosLandmarkDatabase &, class CPosLandmark &, class CLmkEditorDlg::TLmkEditorParams &)
+	?NewL@CLmkEditorDlg@@SAPAV1@AAVCPosLandmarkDatabase@@KAAVTLmkEditorParams@1@@Z @ 13 NONAME ; class CLmkEditorDlg * CLmkEditorDlg::NewL(class CPosLandmarkDatabase &, unsigned long, class CLmkEditorDlg::TLmkEditorParams &)
+	?NewL@CLmkLandmarkSelectorDlg@@SAPAV1@AAV?$RPointerArray@VCPosLandmarkDatabase@@@@@Z @ 14 NONAME ABSENT ; class CLmkLandmarkSelectorDlg * CLmkLandmarkSelectorDlg::NewL(class RPointerArray<class CPosLandmarkDatabase> &)
+	?SetHelpContext@CLmkEditorDlg@@QAEXVTCoeHelpContext@@@Z @ 15 NONAME ; void CLmkEditorDlg::SetHelpContext(class TCoeHelpContext)
+	?SetMopParent@CLmkCategorySelectorDlg@@QAEXPAVMObjectProvider@@@Z @ 16 NONAME ; void CLmkCategorySelectorDlg::SetMopParent(class MObjectProvider *)
+	?SetMopParent@CLmkEditorDlg@@QAEXPAVMObjectProvider@@@Z @ 17 NONAME ; void CLmkEditorDlg::SetMopParent(class MObjectProvider *)
+	?SetMopParent@CLmkLandmarkSelectorDlg@@QAEXPAVMObjectProvider@@@Z @ 18 NONAME ; void CLmkLandmarkSelectorDlg::SetMopParent(class MObjectProvider *)
+	??0CLmkItemIdDbCombiInfo@@QAE@XZ @ 19 NONAME ABSENT ; CLmkItemIdDbCombiInfo::CLmkItemIdDbCombiInfo(void)
+	?GetItemId@CLmkItemIdDbCombiInfo@@QBEKXZ @ 20 NONAME ABSENT ; unsigned long CLmkItemIdDbCombiInfo::GetItemId(void) const
+	?GetLmDb@CLmkItemIdDbCombiInfo@@QBEPAVCPosLandmarkDatabase@@XZ @ 21 NONAME ABSENT ; class CPosLandmarkDatabase * CLmkItemIdDbCombiInfo::GetLmDb(void) const
+	?SetItemId@CLmkItemIdDbCombiInfo@@QAEXAAK@Z @ 22 NONAME ABSENT ; void CLmkItemIdDbCombiInfo::SetItemId(unsigned long &)
+	?SetLmDb@CLmkItemIdDbCombiInfo@@QAEXPAVCPosLandmarkDatabase@@@Z @ 23 NONAME ABSENT ; void CLmkItemIdDbCombiInfo::SetLmDb(class CPosLandmarkDatabase *)
+	??0TLmkItemIdDbCombiInfo@@QAE@XZ @ 24 NONAME ; TLmkItemIdDbCombiInfo::TLmkItemIdDbCombiInfo(void)
+	??1TLmkItemIdDbCombiInfo@@QAE@XZ @ 25 NONAME ; TLmkItemIdDbCombiInfo::~TLmkItemIdDbCombiInfo(void)
+	?ExecuteLD@CLmkCategorySelectorDlg@@QAEHAAV?$RArray@VTLmkItemIdDbCombiInfo@@@@@Z @ 26 NONAME ; int CLmkCategorySelectorDlg::ExecuteLD(class RArray<class TLmkItemIdDbCombiInfo> &)
+	?ExecuteLD@CLmkCategorySelectorDlg@@QAEHAAVTLmkItemIdDbCombiInfo@@@Z @ 27 NONAME ; int CLmkCategorySelectorDlg::ExecuteLD(class TLmkItemIdDbCombiInfo &)
+	?ExecuteLD@CLmkLandmarkSelectorDlg@@QAEHAAV?$RArray@VTLmkItemIdDbCombiInfo@@@@@Z @ 28 NONAME ; int CLmkLandmarkSelectorDlg::ExecuteLD(class RArray<class TLmkItemIdDbCombiInfo> &)
+	?ExecuteLD@CLmkLandmarkSelectorDlg@@QAEHAAVTLmkItemIdDbCombiInfo@@@Z @ 29 NONAME ; int CLmkLandmarkSelectorDlg::ExecuteLD(class TLmkItemIdDbCombiInfo &)
+	?GetItemId@TLmkItemIdDbCombiInfo@@QBEKXZ @ 30 NONAME ; unsigned long TLmkItemIdDbCombiInfo::GetItemId(void) const
+	?GetLmDb@TLmkItemIdDbCombiInfo@@QBEPAVCPosLandmarkDatabase@@XZ @ 31 NONAME ; class CPosLandmarkDatabase * TLmkItemIdDbCombiInfo::GetLmDb(void) const
+	?NewL@CLmkCategorySelectorDlg@@SAPAV1@H@Z @ 32 NONAME ; class CLmkCategorySelectorDlg * CLmkCategorySelectorDlg::NewL(int)
+	?NewL@CLmkLandmarkSelectorDlg@@SAPAV1@XZ @ 33 NONAME ; class CLmkLandmarkSelectorDlg * CLmkLandmarkSelectorDlg::NewL(void)
+	?SetItemId@TLmkItemIdDbCombiInfo@@QAEXAAK@Z @ 34 NONAME ; void TLmkItemIdDbCombiInfo::SetItemId(unsigned long &)
+	?SetLmDb@TLmkItemIdDbCombiInfo@@QAEXPAVCPosLandmarkDatabase@@@Z @ 35 NONAME ; void TLmkItemIdDbCombiInfo::SetLmDb(class CPosLandmarkDatabase *)
+	?DisableMapAndNavigationMenuOptions@CLmkEditorDlg@@QAEXXZ @ 36 NONAME ; void CLmkEditorDlg::DisableMapAndNavigationMenuOptions(void)
+	?SetDialogTitleL@CLmkLandmarkSelectorDlg@@QAEXABVTDesC16@@@Z @ 37 NONAME ; void CLmkLandmarkSelectorDlg::SetDialogTitleL(class TDesC16 const &)
+	?NewL@CLmkLandmarkSelectorDlg@@SAPAV1@ABVTDesC16@@@Z @ 38 NONAME ; class CLmkLandmarkSelectorDlg * CLmkLandmarkSelectorDlg::NewL(class TDesC16 const &)
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/commonui/bwins/LmkCommonUiStubu.def	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,26 @@
+EXPORTS
+	??0TLmkEditorParams@CLmkEditorDlg@@QAE@XZ @ 1 NONAME ; CLmkEditorDlg::TLmkEditorParams::TLmkEditorParams(void)
+	??0TLmkItemIdDbCombiInfo@@QAE@XZ @ 2 NONAME ; TLmkItemIdDbCombiInfo::TLmkItemIdDbCombiInfo(void)
+	??1CLmkCategorySelectorDlg@@UAE@XZ @ 3 NONAME ; CLmkCategorySelectorDlg::~CLmkCategorySelectorDlg(void)
+	??1CLmkEditorDlg@@UAE@XZ @ 4 NONAME ; CLmkEditorDlg::~CLmkEditorDlg(void)
+	??1CLmkLandmarkSelectorDlg@@UAE@XZ @ 5 NONAME ; CLmkLandmarkSelectorDlg::~CLmkLandmarkSelectorDlg(void)
+	??1TLmkItemIdDbCombiInfo@@QAE@XZ @ 6 NONAME ; TLmkItemIdDbCombiInfo::~TLmkItemIdDbCombiInfo(void)
+	?ExecuteLD@CLmkCategorySelectorDlg@@QAEHAAV?$RArray@VTLmkItemIdDbCombiInfo@@@@@Z @ 7 NONAME ; int CLmkCategorySelectorDlg::ExecuteLD(class RArray<class TLmkItemIdDbCombiInfo> &)
+	?ExecuteLD@CLmkCategorySelectorDlg@@QAEHAAVTLmkItemIdDbCombiInfo@@@Z @ 8 NONAME ; int CLmkCategorySelectorDlg::ExecuteLD(class TLmkItemIdDbCombiInfo &)
+	?ExecuteLD@CLmkEditorDlg@@QAEHXZ @ 9 NONAME ; int CLmkEditorDlg::ExecuteLD(void)
+	?ExecuteLD@CLmkLandmarkSelectorDlg@@QAEHAAV?$RArray@VTLmkItemIdDbCombiInfo@@@@@Z @ 10 NONAME ; int CLmkLandmarkSelectorDlg::ExecuteLD(class RArray<class TLmkItemIdDbCombiInfo> &)
+	?ExecuteLD@CLmkLandmarkSelectorDlg@@QAEHAAVTLmkItemIdDbCombiInfo@@@Z @ 11 NONAME ; int CLmkLandmarkSelectorDlg::ExecuteLD(class TLmkItemIdDbCombiInfo &)
+	?GetItemId@TLmkItemIdDbCombiInfo@@QBEKXZ @ 12 NONAME ; unsigned long TLmkItemIdDbCombiInfo::GetItemId(void) const
+	?GetLmDb@TLmkItemIdDbCombiInfo@@QBEPAVCPosLandmarkDatabase@@XZ @ 13 NONAME ; class CPosLandmarkDatabase * TLmkItemIdDbCombiInfo::GetLmDb(void) const
+	?NewL@CLmkCategorySelectorDlg@@SAPAV1@H@Z @ 14 NONAME ; class CLmkCategorySelectorDlg * CLmkCategorySelectorDlg::NewL(int)
+	?NewL@CLmkEditorDlg@@SAPAV1@AAVCPosLandmarkDatabase@@AAVCPosLandmark@@AAVTLmkEditorParams@1@@Z @ 15 NONAME ; class CLmkEditorDlg * CLmkEditorDlg::NewL(class CPosLandmarkDatabase &, class CPosLandmark &, class CLmkEditorDlg::TLmkEditorParams &)
+	?NewL@CLmkEditorDlg@@SAPAV1@AAVCPosLandmarkDatabase@@KAAVTLmkEditorParams@1@@Z @ 16 NONAME ; class CLmkEditorDlg * CLmkEditorDlg::NewL(class CPosLandmarkDatabase &, unsigned long, class CLmkEditorDlg::TLmkEditorParams &)
+	?NewL@CLmkLandmarkSelectorDlg@@SAPAV1@XZ @ 17 NONAME ; class CLmkLandmarkSelectorDlg * CLmkLandmarkSelectorDlg::NewL(void)
+	?SetHelpContext@CLmkEditorDlg@@QAEXVTCoeHelpContext@@@Z @ 18 NONAME ; void CLmkEditorDlg::SetHelpContext(class TCoeHelpContext)
+	?SetItemId@TLmkItemIdDbCombiInfo@@QAEXAAK@Z @ 19 NONAME ; void TLmkItemIdDbCombiInfo::SetItemId(unsigned long &)
+	?SetLmDb@TLmkItemIdDbCombiInfo@@QAEXPAVCPosLandmarkDatabase@@@Z @ 20 NONAME ; void TLmkItemIdDbCombiInfo::SetLmDb(class CPosLandmarkDatabase *)
+	?SetMopParent@CLmkCategorySelectorDlg@@QAEXPAVMObjectProvider@@@Z @ 21 NONAME ; void CLmkCategorySelectorDlg::SetMopParent(class MObjectProvider *)
+	?SetMopParent@CLmkEditorDlg@@QAEXPAVMObjectProvider@@@Z @ 22 NONAME ; void CLmkEditorDlg::SetMopParent(class MObjectProvider *)
+	?SetMopParent@CLmkLandmarkSelectorDlg@@QAEXPAVMObjectProvider@@@Z @ 23 NONAME ; void CLmkLandmarkSelectorDlg::SetMopParent(class MObjectProvider *)
+	?DisableMapAndNavigationMenuOptions@CLmkEditorDlg@@QAEXXZ @ 24 NONAME ; void CLmkEditorDlg::DisableMapAndNavigationMenuOptions(void)
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/commonui/eabi/LMKCOMMONUIu.def	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,49 @@
+EXPORTS
+	_ZN13CLmkEditorDlg12SetMopParentEP15MObjectProvider @ 1 NONAME
+	_ZN13CLmkEditorDlg14SetHelpContextE15TCoeHelpContext @ 2 NONAME
+	_ZN13CLmkEditorDlg16TLmkEditorParamsC1Ev @ 3 NONAME
+	_ZN13CLmkEditorDlg16TLmkEditorParamsC2Ev @ 4 NONAME
+	_ZN13CLmkEditorDlg4NewLER20CPosLandmarkDatabaseR12CPosLandmarkRNS_16TLmkEditorParamsE @ 5 NONAME
+	_ZN13CLmkEditorDlg4NewLER20CPosLandmarkDatabasemRNS_16TLmkEditorParamsE @ 6 NONAME
+	_ZN13CLmkEditorDlg9ExecuteLDEv @ 7 NONAME
+	_ZN13CLmkEditorDlgD0Ev @ 8 NONAME
+	_ZN13CLmkEditorDlgD1Ev @ 9 NONAME
+	_ZN13CLmkEditorDlgD2Ev @ 10 NONAME
+	_ZN23CLmkCategorySelectorDlg12SetMopParentEP15MObjectProvider @ 11 NONAME
+	_ZN23CLmkCategorySelectorDlg4NewLER20CPosLandmarkDatabasei @ 12 NONAME ABSENT
+	_ZN23CLmkCategorySelectorDlg9ExecuteLDER6RArrayImE @ 13 NONAME ABSENT
+	_ZN23CLmkCategorySelectorDlg9ExecuteLDERm @ 14 NONAME ABSENT
+	_ZN23CLmkCategorySelectorDlgD0Ev @ 15 NONAME
+	_ZN23CLmkCategorySelectorDlgD1Ev @ 16 NONAME
+	_ZN23CLmkCategorySelectorDlgD2Ev @ 17 NONAME
+	_ZN23CLmkLandmarkSelectorDlg12SetMopParentEP15MObjectProvider @ 18 NONAME
+	_ZN23CLmkLandmarkSelectorDlg4NewLER20CPosLandmarkDatabase @ 19 NONAME ABSENT
+	_ZN23CLmkLandmarkSelectorDlg9ExecuteLDER6RArrayImE @ 20 NONAME ABSENT
+	_ZN23CLmkLandmarkSelectorDlg9ExecuteLDERm @ 21 NONAME ABSENT
+	_ZN23CLmkLandmarkSelectorDlgD0Ev @ 22 NONAME
+	_ZN23CLmkLandmarkSelectorDlgD1Ev @ 23 NONAME
+	_ZN23CLmkLandmarkSelectorDlgD2Ev @ 24 NONAME
+	_ZTI13CLmkEditorDlg @ 25 NONAME ; #<TI>#
+	_ZTI23CLmkCategorySelectorDlg @ 26 NONAME ; #<TI>#
+	_ZTI23CLmkLandmarkSelectorDlg @ 27 NONAME ; #<TI>#
+	_ZTV13CLmkEditorDlg @ 28 NONAME ; #<VT>#
+	_ZTV23CLmkCategorySelectorDlg @ 29 NONAME ; #<VT>#
+	_ZTV23CLmkLandmarkSelectorDlg @ 30 NONAME ; #<VT>#
+	_ZN21TLmkItemIdDbCombiInfo7SetLmDbEP20CPosLandmarkDatabase @ 31 NONAME
+	_ZN21TLmkItemIdDbCombiInfo9SetItemIdERm @ 32 NONAME
+	_ZN21TLmkItemIdDbCombiInfoC1Ev @ 33 NONAME
+	_ZN21TLmkItemIdDbCombiInfoC2Ev @ 34 NONAME
+	_ZN21TLmkItemIdDbCombiInfoD1Ev @ 35 NONAME
+	_ZN21TLmkItemIdDbCombiInfoD2Ev @ 36 NONAME
+	_ZN23CLmkCategorySelectorDlg4NewLEi @ 37 NONAME
+	_ZN23CLmkCategorySelectorDlg9ExecuteLDER21TLmkItemIdDbCombiInfo @ 38 NONAME
+	_ZN23CLmkCategorySelectorDlg9ExecuteLDER6RArrayI21TLmkItemIdDbCombiInfoE @ 39 NONAME
+	_ZN23CLmkLandmarkSelectorDlg4NewLEv @ 40 NONAME
+	_ZN23CLmkLandmarkSelectorDlg9ExecuteLDER21TLmkItemIdDbCombiInfo @ 41 NONAME
+	_ZN23CLmkLandmarkSelectorDlg9ExecuteLDER6RArrayI21TLmkItemIdDbCombiInfoE @ 42 NONAME
+	_ZNK21TLmkItemIdDbCombiInfo7GetLmDbEv @ 43 NONAME
+	_ZNK21TLmkItemIdDbCombiInfo9GetItemIdEv @ 44 NONAME
+	_ZN13CLmkEditorDlg34DisableMapAndNavigationMenuOptionsEv @ 45 NONAME
+	_ZN23CLmkLandmarkSelectorDlg15SetDialogTitleLERK7TDesC16 @ 46 NONAME
+	_ZN23CLmkLandmarkSelectorDlg4NewLERK7TDesC16 @ 47 NONAME
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/commonui/eabi/LmkCommonUiStubu.def	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,41 @@
+EXPORTS
+	_ZN13CLmkEditorDlg12SetMopParentEP15MObjectProvider @ 1 NONAME
+	_ZN13CLmkEditorDlg14SetHelpContextE15TCoeHelpContext @ 2 NONAME
+	_ZN13CLmkEditorDlg16TLmkEditorParamsC1Ev @ 3 NONAME
+	_ZN13CLmkEditorDlg16TLmkEditorParamsC2Ev @ 4 NONAME
+	_ZN13CLmkEditorDlg4NewLER20CPosLandmarkDatabaseR12CPosLandmarkRNS_16TLmkEditorParamsE @ 5 NONAME
+	_ZN13CLmkEditorDlg4NewLER20CPosLandmarkDatabasemRNS_16TLmkEditorParamsE @ 6 NONAME
+	_ZN13CLmkEditorDlg9ExecuteLDEv @ 7 NONAME
+	_ZN13CLmkEditorDlgD0Ev @ 8 NONAME
+	_ZN13CLmkEditorDlgD1Ev @ 9 NONAME
+	_ZN13CLmkEditorDlgD2Ev @ 10 NONAME
+	_ZN21TLmkItemIdDbCombiInfo7SetLmDbEP20CPosLandmarkDatabase @ 11 NONAME
+	_ZN21TLmkItemIdDbCombiInfo9SetItemIdERm @ 12 NONAME
+	_ZN21TLmkItemIdDbCombiInfoC1Ev @ 13 NONAME
+	_ZN21TLmkItemIdDbCombiInfoC2Ev @ 14 NONAME
+	_ZN21TLmkItemIdDbCombiInfoD1Ev @ 15 NONAME
+	_ZN21TLmkItemIdDbCombiInfoD2Ev @ 16 NONAME
+	_ZN23CLmkCategorySelectorDlg12SetMopParentEP15MObjectProvider @ 17 NONAME
+	_ZN23CLmkCategorySelectorDlg4NewLEi @ 18 NONAME
+	_ZN23CLmkCategorySelectorDlg9ExecuteLDER21TLmkItemIdDbCombiInfo @ 19 NONAME
+	_ZN23CLmkCategorySelectorDlg9ExecuteLDER6RArrayI21TLmkItemIdDbCombiInfoE @ 20 NONAME
+	_ZN23CLmkCategorySelectorDlgD0Ev @ 21 NONAME
+	_ZN23CLmkCategorySelectorDlgD1Ev @ 22 NONAME
+	_ZN23CLmkCategorySelectorDlgD2Ev @ 23 NONAME
+	_ZN23CLmkLandmarkSelectorDlg12SetMopParentEP15MObjectProvider @ 24 NONAME
+	_ZN23CLmkLandmarkSelectorDlg4NewLEv @ 25 NONAME
+	_ZN23CLmkLandmarkSelectorDlg9ExecuteLDER21TLmkItemIdDbCombiInfo @ 26 NONAME
+	_ZN23CLmkLandmarkSelectorDlg9ExecuteLDER6RArrayI21TLmkItemIdDbCombiInfoE @ 27 NONAME
+	_ZN23CLmkLandmarkSelectorDlgD0Ev @ 28 NONAME
+	_ZN23CLmkLandmarkSelectorDlgD1Ev @ 29 NONAME
+	_ZN23CLmkLandmarkSelectorDlgD2Ev @ 30 NONAME
+	_ZNK21TLmkItemIdDbCombiInfo7GetLmDbEv @ 31 NONAME
+	_ZNK21TLmkItemIdDbCombiInfo9GetItemIdEv @ 32 NONAME
+	_ZTI13CLmkEditorDlg @ 33 NONAME ; #<TI>#
+	_ZTI23CLmkCategorySelectorDlg @ 34 NONAME ; #<TI>#
+	_ZTI23CLmkLandmarkSelectorDlg @ 35 NONAME ; #<TI>#
+	_ZTV13CLmkEditorDlg @ 36 NONAME ; #<VT>#
+	_ZTV23CLmkCategorySelectorDlg @ 37 NONAME ; #<VT>#
+	_ZTV23CLmkLandmarkSelectorDlg @ 38 NONAME ; #<VT>#
+	_ZN13CLmkEditorDlg34DisableMapAndNavigationMenuOptionsEv @ 39 NONAME
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/commonui/group/LmkCommonUi.mmp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,63 @@
+/*
+* 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:    LandmarksUi Content File -    
+*
+*/
+
+
+
+
+
+
+
+
+
+// INCLUDES
+// To get the APP_LAYER_SYSTEMINCLUDE-definition
+#include <platform_paths.hrh>
+#include "../../inc/LmkUID.h"         // Common Landmarks UID definitions
+
+// Target information
+TARGET  LmkCommonUi.dll
+TARGETTYPE  dll
+UID  0x0 KLmkCommonUiUID3
+
+CAPABILITY CAP_GENERAL_DLL
+
+VENDORID    VID_DEFAULT
+//exportunfrozen
+
+// Project source directory
+SOURCEPATH ../src
+
+// Source files
+SOURCE CLmkEditorDlg.cpp
+SOURCE CLmkLandmarkSelectorDlg.cpp
+SOURCE CLmkCategorySelectorDlg.cpp
+SOURCE TLmkItemIdDbCombiInfo.cpp
+
+// Language
+LANGUAGE_IDS
+
+// Userincludes
+USERINCLUDE . ../inc ../src ../../uicontrols/inc ../../engine/inc ../../inc
+USERINCLUDE ../../uicontrols/src
+
+// Default system include paths for application layer modules.
+APP_LAYER_SYSTEMINCLUDE
+//SYSTEMINCLUDE  ../../CommonUi/inc 
+
+LIBRARY euser.lib
+LIBRARY LmkUi.lib
+LIBRARY eposlandmarks.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/commonui/group/LmkCommonUiStub.mmp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,63 @@
+/*
+* 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:    LandmarksUi Content File -    
+*
+*/
+
+
+
+
+
+
+
+
+
+// INCLUDES
+// To get the APP_LAYER_SYSTEMINCLUDE-definition
+#include <platform_paths.hrh>
+#include "../../inc/LmkUID.h"         // Common Landmarks UID definitions
+
+// Target information
+TARGET  LmkCommonUiStub.dll
+TARGETTYPE  dll
+UID  0x0 KLmkCommonUiUID3
+
+CAPABILITY CAP_GENERAL_DLL
+
+VENDORID    VID_DEFAULT
+//exportunfrozen
+
+// Project source directory
+SOURCEPATH ../srcstub
+
+// Source files
+SOURCE CLmkEditorDlg.cpp
+SOURCE CLmkLandmarkSelectorDlg.cpp
+SOURCE CLmkCategorySelectorDlg.cpp
+SOURCE TLmkItemIdDbCombiInfo.cpp
+
+// Language
+LANGUAGE_IDS
+
+// Userincludes
+//USERINCLUDE . ../CommonUiInc ../CommonUiSrc ../UiControlsInc ../EngineInc
+//USERINCLUDE ../UiControlsSrc
+
+// Default system include paths for application layer modules.
+APP_LAYER_SYSTEMINCLUDE
+//SYSTEMINCLUDE  ../CommonUiInc 
+
+LIBRARY euser.lib
+//LIBRARY LmkUi.lib
+//LIBRARY eposlandmarks.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/commonui/group/bld.inf	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,37 @@
+/*
+* 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:    LandmarksUi Content File -    
+*	 This file provides the information required for building the
+*    	 whole of a Landmarks application.
+*
+*/
+
+
+
+
+
+
+ // To get the APP_LAYER_PLATFORM_EXPORT_PATH and 
+ // APP_LAYER_PLATFORM_EXPORT_PATH macro definitions
+#include <platform_paths.hrh>
+
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_EXPORTS
+
+PRJ_MMPFILES
+LmkCommonUi.mmp
+LmkCommonUiStub.mmp
+//  End of File  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/commonui/src/CLmkCategorySelectorDlg.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,208 @@
+/*
+* 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:    Landmarks category selector dialog
+*
+*/
+
+
+
+
+
+
+
+
+
+// INCLUDE FILES
+#include "TLmkItemIdDbCombiInfo.h"
+#include "CLmkCategorySelectorDlg.h"
+#include "CLmkDlgCategorySelectorImpl.h"
+#include <lmkui.rsg>
+#include <landmarks.rsg>
+#include <lmkerrors.h>
+
+
+// CONSTANTS
+/// Unnamed namespace for local definitions
+namespace {
+
+//const TInt KSingleSelectedGranularity = 1;
+_LIT( KPanicMsg, "CLmkCategorySelectorDlg" );
+
+void Panic( TPanicCode aReason )
+    {
+    User::Panic( KPanicMsg, aReason );
+    }
+}  // namespace
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CLmkCategorySelectorDlg::CLmkCategorySelectorDlg
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+CLmkCategorySelectorDlg::CLmkCategorySelectorDlg()
+    : iIsMultiSelector( ETrue )
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkCategorySelectorDlg::ConstructL
+// Symbian 2nd phase constructor can leave.
+// -----------------------------------------------------------------------------
+//
+void CLmkCategorySelectorDlg::ConstructL(
+    TBool aShowEmptyCategories )
+    {
+    iDbs.Append( CPosLandmarkDatabase::OpenL());
+    iSelector = CLmkDlgCategorySelectorImpl::NewL( *(iDbs[0]), aShowEmptyCategories );
+    iSelector->SetEmptyDlgLabel(R_LMK_EMPTY_NO_CATEGORIES ,R_LMK_GUIDE_CREATE_LANDMARK);
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkCategorySelectorDlg::NewL
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+ EXPORT_C CLmkCategorySelectorDlg* CLmkCategorySelectorDlg::NewL(
+ 								 TBool aShowEmptyCategories )
+    {
+    CLmkCategorySelectorDlg* self = new ( ELeave ) CLmkCategorySelectorDlg();
+    CleanupStack::PushL( self );
+    self->ConstructL(aShowEmptyCategories );
+    CleanupStack::Pop();
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkCategorySelectorDlg::~CLmkCategorySelectorDlg
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CLmkCategorySelectorDlg::~CLmkCategorySelectorDlg()
+    {
+    if ( iDestroyedPtr )
+        {
+        *iDestroyedPtr = ETrue;
+        }
+        delete iSelector;
+    if (iDbs.Count() > 0 )
+        {
+        delete iDbs[0];
+        iDbs.Close();
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkCategorySelectorDlg::SetMopParent
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CLmkCategorySelectorDlg::SetMopParent( MObjectProvider* aParent )
+    {
+    __ASSERT_DEBUG( iSelector, Panic( KLmkPanicNullMember ) );
+    iSelector->SetMopParent( aParent );
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkCategorySelectorDlg::ExecuteLD
+// -----------------------------------------------------------------------------
+//
+// For multiple database support
+EXPORT_C TInt CLmkCategorySelectorDlg::ExecuteLD( TLmkItemIdDbCombiInfo& aSelected )
+    {
+    __ASSERT_ALWAYS( iSelector, Panic( KLmkPanicNullMember ) );
+
+    // "D" function semantics
+    CleanupStack::PushL( this );
+    TBool thisDestroyed( EFalse );
+    iDestroyedPtr = &thisDestroyed;
+
+    TPosLmItemId selectedId;
+
+    TInt result = iSelector->ExecuteL( selectedId );
+
+   	//If user has selected Ok then only return the selected items
+    if(result)
+		{
+		aSelected.SetItemId(selectedId);
+		aSelected.SetLmDb(CPosLandmarkDatabase::OpenL());
+		}	//end if(result)
+
+    if ( thisDestroyed )
+        {
+        // this object has been deleted already
+        CleanupStack::Pop( this );
+        }
+    else
+        {
+        CleanupStack::PopAndDestroy( this );
+        }
+
+    return result;
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkCategorySelectorDlg::ExecuteLD
+// -----------------------------------------------------------------------------
+//
+// For multiple database support
+  EXPORT_C TInt CLmkCategorySelectorDlg::ExecuteLD(
+    RArray<TLmkItemIdDbCombiInfo>& aSelectedItems )
+    {
+	__ASSERT_ALWAYS( iSelector, Panic( KLmkPanicNullMember ) );
+
+	// "D" function semantics
+	CleanupStack::PushL( this );
+	TBool thisDestroyed( EFalse );
+	iDestroyedPtr = &thisDestroyed;
+	RArray<TPosLmItemId> selectedItems;
+	selectedItems.Reset();
+	for(TInt i = 0; i < aSelectedItems.Count(); i++)
+        {
+        TLmkItemIdDbCombiInfo getItem = aSelectedItems[i];
+        selectedItems.Append(getItem.GetItemId());
+        }
+	TInt result = iSelector->ExecuteL( selectedItems );
+    aSelectedItems.Reset();
+	//If user has clicked on Ok then only return the selection
+	TInt itemCount = selectedItems.Count();
+	if(itemCount > 0)
+		{
+
+		CPosLandmarkDatabase* pDb = CPosLandmarkDatabase::OpenL();
+
+		for (TInt i = 0; i < itemCount; i++)
+			{
+			TLmkItemIdDbCombiInfo selItem;
+			selItem.SetItemId(selectedItems[i]);
+			selItem.SetLmDb(pDb);
+			aSelectedItems.Append(selItem);
+			}
+
+	}	//end if(result)
+
+	selectedItems.Close();
+	if ( thisDestroyed )
+		{
+		// this object has been deleted already
+		CleanupStack::Pop( this );
+		}
+	else
+		{
+		CleanupStack::PopAndDestroy( this );
+		}
+
+	return result;
+ }
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/commonui/src/CLmkEditorDlg.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,189 @@
+/*
+* 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:    Landmark editor dialog.
+*
+*/
+
+
+
+
+// INCLUDE FILES
+#include "CLmkEditorDlg.h"
+#include "CLmkEditorImpl.h"
+#include "CLmkSender.h"
+#include <lmkerrors.h>
+
+// CONSTANTS
+/// Unnamed namespace for local definitions
+namespace {
+#if defined(_DEBUG)
+
+_LIT( KPanicMsg, "CLmkEditorDlg" );
+
+void Panic( TPanicCode aReason )
+    {
+    User::Panic( KPanicMsg, aReason );
+    }
+#endif
+}  // namespace
+
+// ============================= LOCAL FUNCTIONS ===============================
+// -----------------------------------------------------------------------------
+// TLmkEditorParams::TLmkEditorParams
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CLmkEditorDlg::TLmkEditorParams::TLmkEditorParams()
+    : iAttributes( ELmkAll ),
+      iEditorMode( ELmkEditor )
+	{
+	}
+
+// -----------------------------------------------------------------------------
+// CLmkEditorDlg::NewL
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CLmkEditorDlg* CLmkEditorDlg::NewL( CPosLandmarkDatabase& aDb,
+                                    TPosLmItemId aLandmarkId,
+                                    TLmkEditorParams& aParams )
+	{
+    CLmkEditorDlg* self = new( ELeave ) CLmkEditorDlg();
+    CleanupStack::PushL( self );
+    self->ConstructL( aDb, aParams, aLandmarkId, NULL );
+    CleanupStack::Pop(); //self
+    return self;
+	}
+
+// -----------------------------------------------------------------------------
+// CLmkEditorDlg::NewL
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CLmkEditorDlg* CLmkEditorDlg::NewL( CPosLandmarkDatabase& aDb,
+                                    CPosLandmark& aLandmark,
+                                    TLmkEditorParams& aParams )
+	{
+    CLmkEditorDlg* self = new( ELeave ) CLmkEditorDlg();
+    CleanupStack::PushL( self );
+    self->ConstructL( aDb, aParams, aLandmark.LandmarkId(), &aLandmark );
+    CleanupStack::Pop(); //self
+    return self;
+	}
+
+// -----------------------------------------------------------------------------
+// CLmkEditorDlg::~CLmkEditorDlg
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CLmkEditorDlg::~CLmkEditorDlg()
+	{
+    if ( iDestroyedPtr )
+        {
+        *iDestroyedPtr = ETrue;
+        }
+    delete iEditorImpl;
+    delete iSender;
+	}
+
+// -----------------------------------------------------------------------------
+// CLmkEditorDlg::CLmkEditorDlg
+// -----------------------------------------------------------------------------
+//
+CLmkEditorDlg::CLmkEditorDlg()
+	{
+	}
+
+// -----------------------------------------------------------------------------
+// CLmkEditorDlg::ConstructL
+// -----------------------------------------------------------------------------
+//
+void CLmkEditorDlg::ConstructL(
+    CPosLandmarkDatabase& aDb,
+    TLmkEditorParams& aParams,
+    TPosLmItemId aLandmarkId,
+    CPosLandmark* aLandmark )
+	{
+    iSender = CLmkSender::NewL( aDb );
+
+    if ( aLandmark )
+        {
+        iEditorImpl = CLmkEditorImpl::NewL( aDb,
+                                            *iSender,
+                                            aParams.iAttributes,
+                                            aParams.iEditorMode,
+                                            aLandmark );
+        }
+    else
+        {
+        iEditorImpl = CLmkEditorImpl::NewL( aDb,
+                                            *iSender,
+                                            aParams.iAttributes,
+                                            aParams.iEditorMode,
+                                            aLandmarkId );
+        }
+	}
+
+// -----------------------------------------------------------------------------
+// CLmkEditorDlg::SetMopParent
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CLmkEditorDlg::SetMopParent( MObjectProvider* aParent )
+	{
+    __ASSERT_DEBUG( iEditorImpl, Panic( KLmkPanicNullMember ) );
+    iEditorImpl->SetMopParent( aParent );
+	}
+
+// -----------------------------------------------------------------------------
+// CLmkEditorDlg::SetHelpContext
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CLmkEditorDlg::SetHelpContext( TCoeHelpContext aContext )
+    {
+    __ASSERT_DEBUG( iEditorImpl, Panic( KLmkPanicNullMember ) );
+    iEditorImpl->SetHelpContext( aContext );
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkEditorDlg::ExecuteLD
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TInt CLmkEditorDlg::ExecuteLD()
+	{
+	CleanupStack::PushL( this );
+
+    TBool thisDestroyed( EFalse );
+    iDestroyedPtr = &thisDestroyed;
+
+	TInt ret( iEditorImpl->ExecuteLD() );
+    iEditorImpl = NULL;
+
+    if ( thisDestroyed )
+        {
+        // this object has been deleted already
+        CleanupStack::Pop( this );
+        }
+    else
+        {
+        CleanupStack::PopAndDestroy(this); //this
+        }
+    return ret;
+	}
+
+// -----------------------------------------------------------------------------
+// CLmkEditorDlg::DisableMapAndNavigationMenuOptions
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CLmkEditorDlg::DisableMapAndNavigationMenuOptions()
+	{
+	iEditorImpl->DisableMapAndNavigationMenuOptions();
+	}
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/commonui/src/CLmkLandmarkSelectorDlg.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,272 @@
+/*
+* 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:    Landmarks Selector dialog
+*
+*/
+
+
+
+// INCLUDE FILES
+#include "TLmkItemIdDbCombiInfo.h"
+#include "CLmkLandmarkSelectorDlg.h"
+#include "CLmkDlgCombiSelectorImpl.h"
+#include <lmkui.rsg>
+#include <landmarks.rsg>
+#include <lmkerrors.h>
+
+
+// CONSTANTS
+/// Unnamed namespace for local definitions
+namespace {
+
+_LIT( KPanicMsg, "CLmkLandmarkSelectorDlg" );
+
+void Panic( TPanicCode aReason )
+    {
+    User::Panic( KPanicMsg, aReason );
+    }
+}  // namespace
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CLmkLandmarkSelectorDlg::CLmkLandmarkSelectorDlg
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+CLmkLandmarkSelectorDlg::CLmkLandmarkSelectorDlg()
+    : iIsMultiSelector( ETrue ),
+    iDatabaseUri( NULL )
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkLandmarkSelectorDlg::ConstructL
+// Symbian 2nd phase constructor can leave.
+// -----------------------------------------------------------------------------
+//
+void CLmkLandmarkSelectorDlg::ConstructL()
+    {
+    // Open user specified db if it was set, else open the default landmarks db.
+    if( iDatabaseUri )
+        {
+        iDbs.Append( CPosLandmarkDatabase::OpenL( iDatabaseUri->Des() ) );
+        }
+    else
+        {
+        iDbs.Append( CPosLandmarkDatabase::OpenL() );
+        }
+	
+	iSelector = CLmkDlgCombiSelectorImpl::NewL( *(iDbs[0]) );
+	iSelector->SetEmptyDlgLabel(R_LMK_EMPTY_NO_LANDMARKS,R_LMK_GUIDE_CREATE_LANDMARK);
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkLandmarkSelectorDlg::NewL
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CLmkLandmarkSelectorDlg* CLmkLandmarkSelectorDlg::NewL( )
+    {
+    CLmkLandmarkSelectorDlg* self = new( ELeave ) CLmkLandmarkSelectorDlg();
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop();
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkLandmarkSelectorDlg::NewL
+// Two-phased constructor. Also sets the user specified landmark database whose
+// entries are to be shown in the selector ui.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CLmkLandmarkSelectorDlg* CLmkLandmarkSelectorDlg::NewL( const TDesC&  aDatabaseUri )
+    {
+    if( aDatabaseUri.Length() == 0 )
+		    {
+		    User::Leave( KErrArgument );
+		  	}
+    CLmkLandmarkSelectorDlg* self = new( ELeave ) CLmkLandmarkSelectorDlg();
+    CleanupStack::PushL( self );
+    self->iDatabaseUri = HBufC::NewLC( aDatabaseUri.Length() + 1 );
+    CleanupStack::Pop( self->iDatabaseUri );
+    self->iDatabaseUri->Des().FillZ();
+    self->iDatabaseUri->Des().Copy( aDatabaseUri.Ptr() );
+    self->ConstructL();
+    CleanupStack::Pop();
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkLandmarkSelectorDlg::~CLmkLandmarkSelectorDlg
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CLmkLandmarkSelectorDlg::~CLmkLandmarkSelectorDlg()
+    {
+    if ( iDestroyedPtr )
+        {
+        *iDestroyedPtr = ETrue;
+        }
+
+    if ( iDatabaseUri )
+        {
+        delete iDatabaseUri;
+        }
+    delete iSelector;
+    if (iDbs.Count() > 0 )
+        {
+        delete iDbs[0];
+        iDbs.Close();
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkLandmarkSelectorDlg::SetMopParent
+// ?implementation_description
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CLmkLandmarkSelectorDlg::SetMopParent( MObjectProvider* aParent )
+    {
+    __ASSERT_ALWAYS( iSelector, Panic( KLmkPanicNullMember ) );
+    iSelector->SetMopParent( aParent );
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkLandmarkSelectorDlg::ExecuteLD
+// ?implementation_description
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+// For multiple database support
+
+EXPORT_C TInt CLmkLandmarkSelectorDlg::ExecuteLD( TLmkItemIdDbCombiInfo& aSelected )
+    {
+    __ASSERT_ALWAYS( iSelector, Panic( KLmkPanicNullMember ) );
+
+    // "D" function semantics
+    CleanupStack::PushL( this );
+    TBool thisDestroyed( EFalse );
+    iDestroyedPtr = &thisDestroyed;
+
+    TPosLmItemId selectedId;
+    TInt result = iSelector->ExecuteL( selectedId );
+
+	//Fill selected items only if user has clicked Ok
+    if( result )
+		{
+		aSelected.SetItemId( selectedId );
+		
+		// if user specified db present, set this as the selected item's db,
+		// else set default landmarks db.
+		if( iDatabaseUri )
+		    {
+		    aSelected.SetLmDb( CPosLandmarkDatabase::OpenL( iDatabaseUri->Des() ) );
+		    }
+		else
+		    {
+		    aSelected.SetLmDb( CPosLandmarkDatabase::OpenL() );
+		    }
+		
+		}	//end if(result)
+
+    if ( thisDestroyed )
+        {
+        // this object has been deleted already
+        CleanupStack::Pop( this );
+        }
+    else
+        {
+        CleanupStack::PopAndDestroy( this );
+        }
+
+    return result;
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkLandmarkSelectorDlg::ExecuteLD
+// ?implementation_description
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+ // For multiple database support
+EXPORT_C TInt CLmkLandmarkSelectorDlg::ExecuteLD(
+    RArray<TLmkItemIdDbCombiInfo>& aSelectedItems )
+    {
+    __ASSERT_ALWAYS( iSelector, Panic( KLmkPanicNullMember ) );
+
+    // "D" function semantics
+    CleanupStack::PushL( this );
+    TBool thisDestroyed( EFalse );
+    iDestroyedPtr = &thisDestroyed;
+    RArray<TPosLmItemId> selectedItems;
+    selectedItems.Reset();
+    for(TInt i = 0; i < aSelectedItems.Count(); i++)
+        {
+        TLmkItemIdDbCombiInfo getItem = aSelectedItems[i];
+        selectedItems.Append(getItem.GetItemId());
+        }
+    TInt result = iSelector->ExecuteL( selectedItems );
+    aSelectedItems.Reset();
+   	//Fill items only if user has clicked Ok
+   	TInt itemCount = selectedItems.Count();
+    if(itemCount > 0)
+		{
+		CPosLandmarkDatabase* pDb;
+		if( iDatabaseUri )
+		    {
+		    pDb = CPosLandmarkDatabase::OpenL( iDatabaseUri->Des() );
+		    }
+		else
+		    {
+		    pDb = CPosLandmarkDatabase::OpenL();
+		    }
+		
+
+		for (TInt i = 0; i < itemCount; i++)
+			{
+			TLmkItemIdDbCombiInfo selItem;
+			selItem.SetItemId(selectedItems[i]);
+			selItem.SetLmDb(pDb);
+			aSelectedItems.Append(selItem);
+			}
+		}	//end if(result)
+
+	selectedItems.Close();
+    if ( thisDestroyed )
+        {
+        // this object has been deleted already
+        CleanupStack::Pop( this );
+        }
+    else
+        {
+        CleanupStack::PopAndDestroy( this );
+        }
+
+    return result;
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkLandmarkSelectorDlg::SetDialogTitleL
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CLmkLandmarkSelectorDlg::SetDialogTitleL(const TDesC& aTitle)
+    {
+    __ASSERT_ALWAYS( iSelector, Panic( KLmkPanicNullMember ) );
+    iSelector->SetDialogTitleL(aTitle);
+    }
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/commonui/src/TLmkItemIdDbCombiInfo.cpp	Wed Sep 01 12:31:27 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:    This class provides methods for fetching the ID of selected
+*			   	  landmark or category and the handle to database to which either
+*			   	  landmark or category belongs.
+*
+*/
+
+
+
+
+
+
+
+
+// INCLUDE FILES
+#include "TLmkItemIdDbCombiInfo.h"
+
+// ============================ MEMBER FUNCTIONS ===============================
+// -----------------------------------------------------------------------------
+// TLmkItemIdDbCombiInfo::TLmkItemIdDbCombiInfo
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+EXPORT_C TLmkItemIdDbCombiInfo::TLmkItemIdDbCombiInfo() : iLmDb(NULL), iLmItemId(0)
+	{
+	}
+
+// -----------------------------------------------------------------------------
+// TLmkItemIdDbCombiInfo::~TLmkItemIdDbCombiInfo
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TLmkItemIdDbCombiInfo::~TLmkItemIdDbCombiInfo()
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// TLmkItemIdDbCombiInfo::SetItemId
+//
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void TLmkItemIdDbCombiInfo::SetItemId( TPosLmItemId & aLmItemId)
+	 {
+	 iLmItemId =  aLmItemId;
+	 }
+
+// -----------------------------------------------------------------------------
+// TLmkItemIdDbCombiInfo::SetLmDb
+//
+// -----------------------------------------------------------------------------
+//
+ EXPORT_C void TLmkItemIdDbCombiInfo::SetLmDb( CPosLandmarkDatabase* aDb)
+	{
+	iLmDb = aDb;
+	}
+
+// -----------------------------------------------------------------------------
+// TLmkItemIdDbCombiInfo::GetItemId
+//
+// -----------------------------------------------------------------------------
+//
+ EXPORT_C TPosLmItemId TLmkItemIdDbCombiInfo::GetItemId() const
+	 {
+	 return iLmItemId;
+	 }
+
+// -----------------------------------------------------------------------------
+// TLmkItemIdDbCombiInfo::GetLmDb
+//
+// -----------------------------------------------------------------------------
+//
+ EXPORT_C CPosLandmarkDatabase* TLmkItemIdDbCombiInfo::GetLmDb() const
+	 {
+	 return iLmDb;
+	 }
+
+ // End of file
+
+
+
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/commonui/srcstub/CLmkCategorySelectorDlg.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,115 @@
+/*
+* 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:    LandmarksUi Content File -
+*
+*/
+
+
+
+
+
+
+
+
+
+// INCLUDE FILES
+#include "CLmkCategorySelectorDlg.h"
+
+
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CLmkCategorySelectorDlg::CLmkCategorySelectorDlg
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+CLmkCategorySelectorDlg::CLmkCategorySelectorDlg()
+    : iIsMultiSelector( ETrue )
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkCategorySelectorDlg::ConstructL
+// Symbian 2nd phase constructor can leave.
+// -----------------------------------------------------------------------------
+//
+void CLmkCategorySelectorDlg::ConstructL(
+    TBool /*aShowEmptyCategories*/ )
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkCategorySelectorDlg::NewL
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CLmkCategorySelectorDlg* CLmkCategorySelectorDlg::NewL(
+ 								 TBool aShowEmptyCategories )
+    {
+
+    CLmkCategorySelectorDlg* self = new ( ELeave ) CLmkCategorySelectorDlg();
+
+    CleanupStack::PushL( self );
+    self->ConstructL(aShowEmptyCategories );
+    CleanupStack::Pop();
+
+    return self;
+    }
+
+
+// -----------------------------------------------------------------------------
+// CLmkCategorySelectorDlg::~CLmkCategorySelectorDlg
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CLmkCategorySelectorDlg::~CLmkCategorySelectorDlg()
+    {
+
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkCategorySelectorDlg::SetMopParent
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CLmkCategorySelectorDlg::SetMopParent( MObjectProvider* /*aParent*/)
+    {
+
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkCategorySelectorDlg::ExecuteLD
+// -----------------------------------------------------------------------------
+//
+// For multiple database support
+EXPORT_C TInt CLmkCategorySelectorDlg::ExecuteLD( TLmkItemIdDbCombiInfo& /*aSelected*/ )
+    {
+    User::Leave(KErrNotSupported);
+    return 0;
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkCategorySelectorDlg::ExecuteLD
+// -----------------------------------------------------------------------------
+//
+// For multiple database support
+  EXPORT_C TInt CLmkCategorySelectorDlg::ExecuteLD(
+    RArray<TLmkItemIdDbCombiInfo>& /*aSelectedItems*/ )
+    {
+    User::Leave(KErrNotSupported);
+    return 0;
+ 		}
+
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/commonui/srcstub/CLmkEditorDlg.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,134 @@
+/*
+* 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:    LandmarksUi Content File -    Landmark editor dialog.
+*
+*/
+
+
+
+
+
+
+
+// INCLUDE FILES
+#include "CLmkEditorDlg.h"
+#include <coehelp.h>
+
+
+// ============================= LOCAL FUNCTIONS ===============================
+// -----------------------------------------------------------------------------
+// TLmkEditorParams::TLmkEditorParams
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CLmkEditorDlg::TLmkEditorParams::TLmkEditorParams()
+    : iAttributes( ELmkAll ),
+      iEditorMode( ELmkEditor )
+	{
+	}
+
+// -----------------------------------------------------------------------------
+// CLmkEditorDlg::NewL
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CLmkEditorDlg* CLmkEditorDlg::NewL( CPosLandmarkDatabase& aDb,
+                                    TPosLmItemId aLandmarkId,
+                                    TLmkEditorParams& aParams )
+	{
+    CLmkEditorDlg* self = new( ELeave ) CLmkEditorDlg();
+    CleanupStack::PushL( self );
+    self->ConstructL( aDb, aParams, aLandmarkId, NULL );
+    CleanupStack::Pop(); //self
+    return self;
+	}
+
+// -----------------------------------------------------------------------------
+// CLmkEditorDlg::NewL
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CLmkEditorDlg* CLmkEditorDlg::NewL( CPosLandmarkDatabase& /*aDb*/,
+                                    CPosLandmark& /*aLandmark*/,
+                                    TLmkEditorParams& /*aParams*/)
+	{
+    CLmkEditorDlg* self = new( ELeave ) CLmkEditorDlg();
+    CleanupStack::PushL( self );
+    User::Leave(KErrNotSupported);
+    //self->ConstructL( aDb, aParams, aLandmark.LandmarkId(), &aLandmark );
+    CleanupStack::Pop(); //self
+    return self;
+	}
+
+// -----------------------------------------------------------------------------
+// CLmkEditorDlg::~CLmkEditorDlg
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CLmkEditorDlg::~CLmkEditorDlg()
+	{
+	}
+
+// -----------------------------------------------------------------------------
+// CLmkEditorDlg::CLmkEditorDlg
+// -----------------------------------------------------------------------------
+//
+CLmkEditorDlg::CLmkEditorDlg()
+	{
+	}
+
+// -----------------------------------------------------------------------------
+// CLmkEditorDlg::ConstructL
+// -----------------------------------------------------------------------------
+//
+void CLmkEditorDlg::ConstructL(
+    CPosLandmarkDatabase& /*aDb*/,
+    TLmkEditorParams& /*aParams*/,
+    TPosLmItemId /*aLandmarkId*/,
+    CPosLandmark* /*aLandmark*/ )
+	{
+	User::Leave(KErrNotSupported);
+	}
+
+// -----------------------------------------------------------------------------
+// CLmkEditorDlg::SetMopParent
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CLmkEditorDlg::SetMopParent( MObjectProvider* /*aParent*/)
+	{
+  	}
+
+// -----------------------------------------------------------------------------
+// CLmkEditorDlg::SetHelpContext
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CLmkEditorDlg::SetHelpContext( TCoeHelpContext /*aContext*/)
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkEditorDlg::ExecuteLD
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TInt CLmkEditorDlg::ExecuteLD()
+	{
+	User::Leave(KErrNotSupported);
+	return 0;
+	}
+
+// -----------------------------------------------------------------------------
+// CLmkEditorDlg::DisableMapAndNavigationMenuOptions
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CLmkEditorDlg::DisableMapAndNavigationMenuOptions()
+	{
+	TRAP_IGNORE (User::Leave(KErrNotSupported));
+	}
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/commonui/srcstub/CLmkLandmarkSelectorDlg.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,120 @@
+/*
+* 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:    LandmarksUi Content File -
+*
+*/
+
+
+
+
+
+
+
+
+
+// INCLUDE FILES
+#include "CLmkLandmarkSelectorDlg.h"
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CLmkLandmarkSelectorDlg::CLmkLandmarkSelectorDlg
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+CLmkLandmarkSelectorDlg::CLmkLandmarkSelectorDlg()
+    : iIsMultiSelector( ETrue )
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkLandmarkSelectorDlg::ConstructL
+// Symbian 2nd phase constructor can leave.
+// -----------------------------------------------------------------------------
+//
+
+void CLmkLandmarkSelectorDlg::ConstructL()
+    {
+    }
+
+
+// -----------------------------------------------------------------------------
+// CLmkLandmarkSelectorDlg::NewL
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+
+// Changed for supporting multiple databases
+EXPORT_C CLmkLandmarkSelectorDlg* CLmkLandmarkSelectorDlg::NewL( )
+
+    {
+
+    CLmkLandmarkSelectorDlg* self = new( ELeave ) CLmkLandmarkSelectorDlg();
+
+    CleanupStack::PushL( self );
+
+    self->ConstructL();
+    CleanupStack::Pop();
+
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkLandmarkSelectorDlg::~CLmkLandmarkSelectorDlg
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CLmkLandmarkSelectorDlg::~CLmkLandmarkSelectorDlg()
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkLandmarkSelectorDlg::SetMopParent
+// ?implementation_description
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CLmkLandmarkSelectorDlg::SetMopParent( MObjectProvider* /*aParent*/)
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkLandmarkSelectorDlg::ExecuteLD
+// ?implementation_description
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+// For multiple database support
+
+EXPORT_C TInt CLmkLandmarkSelectorDlg::ExecuteLD( TLmkItemIdDbCombiInfo& /*aSelected*/)
+    {
+    User::Leave(KErrNotSupported);
+    return 0;
+    }
+
+
+// -----------------------------------------------------------------------------
+// CLmkLandmarkSelectorDlg::ExecuteLD
+// ?implementation_description
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+ // For multiple database support
+EXPORT_C TInt CLmkLandmarkSelectorDlg::ExecuteLD(
+    RArray<TLmkItemIdDbCombiInfo>& /*aSelectedItems*/ )
+    {
+    User::Leave(KErrNotSupported);
+    return 0;
+    }
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/commonui/srcstub/TLmkItemIdDbCombiInfo.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,98 @@
+/*
+* 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:    LandmarksUi Content File -
+*
+*/
+
+
+
+
+
+
+
+
+
+// INCLUDE FILES
+
+#include "TLmkItemIdDbCombiInfo.h"
+
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+
+// -----------------------------------------------------------------------------
+// TLmkItemIdDbCombiInfo::TLmkItemIdDbCombiInfo
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+// Check if '0' is a valid value for iLmItemId
+EXPORT_C TLmkItemIdDbCombiInfo::TLmkItemIdDbCombiInfo() : iLmDb(NULL), iLmItemId(0)
+{
+}
+
+// -----------------------------------------------------------------------------
+// TLmkItemIdDbCombiInfo::~TLmkItemIdDbCombiInfo
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TLmkItemIdDbCombiInfo::~TLmkItemIdDbCombiInfo()
+    {
+    }
+
+
+// -----------------------------------------------------------------------------
+// TLmkItemIdDbCombiInfo::SetItemId
+//
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void TLmkItemIdDbCombiInfo::SetItemId( TPosLmItemId & /*aLmItemId*/)
+ {
+ }
+
+// -----------------------------------------------------------------------------
+// TLmkItemIdDbCombiInfo::SetLmDb
+//
+// -----------------------------------------------------------------------------
+//
+ EXPORT_C void TLmkItemIdDbCombiInfo::SetLmDb( CPosLandmarkDatabase* /*aDb*/)
+ {
+ }
+
+
+// -----------------------------------------------------------------------------
+// TLmkItemIdDbCombiInfo::GetItemId
+//
+// -----------------------------------------------------------------------------
+//
+ EXPORT_C TPosLmItemId TLmkItemIdDbCombiInfo::GetItemId() const
+ {
+ return 0;
+ }
+
+// -----------------------------------------------------------------------------
+// TLmkItemIdDbCombiInfo::GetLmDb
+//
+// -----------------------------------------------------------------------------
+//
+ EXPORT_C CPosLandmarkDatabase* TLmkItemIdDbCombiInfo::GetLmDb() const
+ {
+ return 0;
+ }
+
+ // End of file
+
+
+
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/engine/bwins/LMKENGU_32u.def	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,97 @@
+EXPORTS
+	??0CLmkAOOperation@@IAE@PAVCPosLmOperation@@AAVMLmkAOOperationObserver@@W4TOperationTypes@2@H@Z @ 1 NONAME ; CLmkAOOperation::CLmkAOOperation(class CPosLmOperation *, class MLmkAOOperationObserver &, enum MLmkAOOperationObserver::TOperationTypes, int)
+	??1CLmkAOOperation@@UAE@XZ @ 2 NONAME ; CLmkAOOperation::~CLmkAOOperation(void)
+	??1CLmkDbSearchUtils@@UAE@XZ @ 3 NONAME ; CLmkDbSearchUtils::~CLmkDbSearchUtils(void)
+	??1CLmkFields@@UAE@XZ @ 4 NONAME ; CLmkFields::~CLmkFields(void)
+	?AddCategoryL@CLmkDbUtils@@SAXAAVCPosLandmarkCategory@@AAVCPosLandmarkDatabase@@@Z @ 5 NONAME ; void CLmkDbUtils::AddCategoryL(class CPosLandmarkCategory &, class CPosLandmarkDatabase &)
+	?AddCategoryName@CLmkLandMarkCategoriesName@@QAEXABVTDesC16@@@Z @ 6 NONAME ; void CLmkLandMarkCategoriesName::AddCategoryName(class TDesC16 const &)
+	?AddDefaultProtocolL@CLmkDbUtils@@SAXPAVCPosLandmark@@@Z @ 7 NONAME ; void CLmkDbUtils::AddDefaultProtocolL(class CPosLandmark *)
+	?AddLmToCategoriesL@CLmkDbUtils@@QAEXKABV?$RArray@K@@@Z @ 8 NONAME ; void CLmkDbUtils::AddLmToCategoriesL(unsigned long, class RArray<unsigned long> const &)
+	?AddLmToCategoryL@CLmkDbUtils@@SAXKKAAVCPosLandmarkDatabase@@@Z @ 9 NONAME ; void CLmkDbUtils::AddLmToCategoryL(unsigned long, unsigned long, class CPosLandmarkDatabase &)
+	?AddLmsToCategoriesL@CLmkDbUtils@@QAEXABV?$RArray@K@@0@Z @ 10 NONAME ; void CLmkDbUtils::AddLmsToCategoriesL(class RArray<unsigned long> const &, class RArray<unsigned long> const &)
+	?AddObserverL@CLmkListProviderBase@@QAEXAAVMLmkListProviderObserver@@@Z @ 11 NONAME ; void CLmkListProviderBase::AddObserverL(class MLmkListProviderObserver &)
+	?CancelEncodeOperationL@CLmkEncoder@@QAEXXZ @ 12 NONAME ; void CLmkEncoder::CancelEncodeOperationL(void)
+	?CancelImporting@CLmkParser@@QAEXXZ @ 13 NONAME ; void CLmkParser::CancelImporting(void)
+	?CancelLmOperation@CLmkDbUtils@@QAEXXZ @ 14 NONAME ; void CLmkDbUtils::CancelLmOperation(void)
+	?CancelRequest@CLmkLocationService@@QAEXXZ @ 15 NONAME ; void CLmkLocationService::CancelRequest(void)
+	?Categories@CLmkLandmark@@QAEAAV?$RPointerArray@VCPosLandmarkCategory@@@@XZ @ 16 NONAME ; class RPointerArray<class CPosLandmarkCategory> & CLmkLandmark::Categories(void)
+	?CategoryIdL@CLmkDbUtils@@QAEKAAVCPosLandmarkDatabase@@ABVTDesC16@@@Z @ 17 NONAME ; unsigned long CLmkDbUtils::CategoryIdL(class CPosLandmarkDatabase &, class TDesC16 const &)
+	?CategoryNameL@CLmkDbUtils@@SAPAVHBufC16@@AAVCPosLandmarkDatabase@@K@Z @ 18 NONAME ; class HBufC16 * CLmkDbUtils::CategoryNameL(class CPosLandmarkDatabase &, unsigned long)
+	?CategoryNameLC@CLmkParser@@QAEPAVCLmkLandMarkCategoriesName@@H@Z @ 19 NONAME ; class CLmkLandMarkCategoriesName * CLmkParser::CategoryNameLC(int)
+	?ChangeIconL@CLmkDbUtils@@SAXAAVCPosLandmarkDatabase@@KW4TLmkItemType@@ABVTDesC16@@HH@Z @ 20 NONAME ; void CLmkDbUtils::ChangeIconL(class CPosLandmarkDatabase &, unsigned long, enum TLmkItemType, class TDesC16 const &, int, int)
+	?ChangeIconsL@CLmkDbUtils@@QAEXABV?$RArray@K@@W4TLmkItemType@@ABVTDesC16@@HH@Z @ 21 NONAME ; void CLmkDbUtils::ChangeIconsL(class RArray<unsigned long> const &, enum TLmkItemType, class TDesC16 const &, int, int)
+	?ChangeObserver@CLmkParser@@QAEXAAVMLmkAOOperationObserver@@@Z @ 22 NONAME ; void CLmkParser::ChangeObserver(class MLmkAOOperationObserver &)
+	?CheckDiscSpaceL@CLmkFields@@QAEHXZ @ 23 NONAME ; int CLmkFields::CheckDiscSpaceL(void)
+	?CompactDbL@CLmkDbUtils@@QAEXXZ @ 24 NONAME ; void CLmkDbUtils::CompactDbL(void)
+	?CreateProviderL@LmkListProviderFactory@@SAPAVCLmkListProviderBase@@AAVCLmkParser@@@Z @ 25 NONAME ; class CLmkListProviderBase * LmkListProviderFactory::CreateProviderL(class CLmkParser &)
+	?CreateProviderL@LmkListProviderFactory@@SAPAVCLmkListProviderBase@@AAVCPosLandmarkDatabase@@AAVCPosLmSearchCriteria@@@Z @ 26 NONAME ; class CLmkListProviderBase * LmkListProviderFactory::CreateProviderL(class CPosLandmarkDatabase &, class CPosLmSearchCriteria &)
+	?CreateProviderL@LmkListProviderFactory@@SAPAVCLmkListProviderBase@@AAVCPosLandmarkDatabase@@W4TLmkSelectorType@@W4TLmkProviderType@@@Z @ 27 NONAME ; class CLmkListProviderBase * LmkListProviderFactory::CreateProviderL(class CPosLandmarkDatabase &, enum TLmkSelectorType, enum TLmkProviderType)
+	?CurrentPosition@CLmkLocationService@@QAEAAVTPosition@@XZ @ 28 NONAME ; class TPosition & CLmkLocationService::CurrentPosition(void)
+	?DeleteCategoriesL@CLmkDbUtils@@QAEXABV?$RArray@K@@@Z @ 29 NONAME ; void CLmkDbUtils::DeleteCategoriesL(class RArray<unsigned long> const &)
+	?DeleteFileL@LmkFileUtils@@SAXABVTDesC16@@@Z @ 30 NONAME ; void LmkFileUtils::DeleteFileL(class TDesC16 const &)
+	?DeleteLandmarkL@CLmkDbUtils@@SAXKAAVCPosLandmarkDatabase@@@Z @ 31 NONAME ; void CLmkDbUtils::DeleteLandmarkL(unsigned long, class CPosLandmarkDatabase &)
+	?DeleteLandmarkL@CLmkFields@@QAEXXZ @ 32 NONAME ; void CLmkFields::DeleteLandmarkL(void)
+	?DeleteLandmarksL@CLmkDbUtils@@QAEXABV?$RArray@K@@@Z @ 33 NONAME ; void CLmkDbUtils::DeleteLandmarksL(class RArray<unsigned long> const &)
+	?ExtensionInt@CLmkUiItemBase@@QAEHXZ @ 34 NONAME ; int CLmkUiItemBase::ExtensionInt(void)
+	?ExtensionIntExists@CLmkUiItemBase@@QAEHXZ @ 35 NONAME ; int CLmkUiItemBase::ExtensionIntExists(void)
+	?Fields@CLmkFields@@QAEAAV?$CArrayPtrFlat@VMLmkFieldData@@@@XZ @ 36 NONAME ; class CArrayPtrFlat<class MLmkFieldData> & CLmkFields::Fields(void)
+	?FileHandle@CLmkParser@@QAEAAVRFile@@XZ @ 37 NONAME ; class RFile & CLmkParser::FileHandle(void)
+	?FileName@CLmkParser@@QAE?AVTPtrC16@@XZ @ 38 NONAME ; class TPtrC16 CLmkParser::FileName(void)
+	?GetCategoryNameL@CLmkDbSearchUtils@@QAEPAVHBufC16@@K@Z @ 39 NONAME ; class HBufC16 * CLmkDbSearchUtils::GetCategoryNameL(unsigned long)
+	?GetCategoryNames@CLmkLandMarkCategoriesName@@QBEXAAV?$RArray@V?$TBuf@$0HM@@@@@@Z @ 40 NONAME ; void CLmkLandMarkCategoriesName::GetCategoryNames(class RArray<class TBuf<124> > &) const
+	?GetField@CLmkFields@@QAEPAVMLmkFieldData@@G@Z @ 41 NONAME ; class MLmkFieldData * CLmkFields::GetField(unsigned short)
+	?GetLandmarkForIdL@CLmkDbSearchUtils@@QAEPAVCPosLandmark@@K@Z @ 42 NONAME ; class CPosLandmark * CLmkDbSearchUtils::GetLandmarkForIdL(unsigned long)
+	?GetLandmarksL@CLmkDbSearchUtils@@QAEXPAVMLmkDbSearchUtilsObserver@@V?$RArray@K@@PAV?$RPointerArray@VCPosLandmark@@@@@Z @ 43 NONAME ; void CLmkDbSearchUtils::GetLandmarksL(class MLmkDbSearchUtilsObserver *, class RArray<unsigned long>, class RPointerArray<class CPosLandmark> *)
+	?GetLandmarksUnderCategoryL@CLmkDbSearchUtils@@QAEXPAVMLmkDbSearchUtilsObserver@@K@Z @ 44 NONAME ; void CLmkDbSearchUtils::GetLandmarksUnderCategoryL(class MLmkDbSearchUtilsObserver *, unsigned long)
+	?GetSelectedIndexesL@CLmkLmItemListProvider@@QBEXAAV?$CArrayFix@H@@ABV?$RArray@K@@@Z @ 45 NONAME ; void CLmkLmItemListProvider::GetSelectedIndexesL(class CArrayFix<int> &, class RArray<unsigned long> const &) const
+	?GetSelectedItemId@CLmkLmItemListProvider@@QBEXAAKH@Z @ 46 NONAME ; void CLmkLmItemListProvider::GetSelectedItemId(unsigned long &, int) const
+	?GetSelectedItemIdsL@CLmkLmItemListProvider@@QBEXAAV?$RArray@K@@ABV?$CArrayFix@H@@@Z @ 47 NONAME ; void CLmkLmItemListProvider::GetSelectedItemIdsL(class RArray<unsigned long> &, class CArrayFix<int> const &) const
+	?InitializeDbL@CLmkDbUtils@@QAEXXZ @ 48 NONAME ; void CLmkDbUtils::InitializeDbL(void)
+	?InitializeDbL@CLmkParser@@QAEXXZ @ 49 NONAME ; void CLmkParser::InitializeDbL(void)
+	?IsFileHandle@CLmkParser@@QAEHXZ @ 50 NONAME ; int CLmkParser::IsFileHandle(void)
+	?IsLmWithThisFieldExistL@CLmkDbUtils@@QAEHG@Z @ 51 NONAME ; int CLmkDbUtils::IsLmWithThisFieldExistL(unsigned short)
+	?IsValidPathL@LmkFileUtils@@SAHVTPtrC16@@@Z @ 52 NONAME ; int LmkFileUtils::IsValidPathL(class TPtrC16)
+	?LandmarkId@CLmkFields@@QBEKXZ @ 53 NONAME ; unsigned long CLmkFields::LandmarkId(void) const
+	?LandmarkLC@CLmkParser@@QAEPAVCPosLandmark@@H@Z @ 54 NONAME ; class CPosLandmark * CLmkParser::LandmarkLC(int)
+	?LmkLandmarkLC@CLmkParser@@QAEPAVCLmkLandmark@@H@Z @ 55 NONAME ; class CLmkLandmark * CLmkParser::LmkLandmarkLC(int)
+	?LocationRequestL@CLmkLocationService@@QAEXXZ @ 56 NONAME ; void CLmkLocationService::LocationRequestL(void)
+	?NewL@CLmkAOOperation@@SAPAV1@PAVCPosLmOperation@@AAVMLmkAOOperationObserver@@W4TOperationTypes@3@H@Z @ 57 NONAME ; class CLmkAOOperation * CLmkAOOperation::NewL(class CPosLmOperation *, class MLmkAOOperationObserver &, enum MLmkAOOperationObserver::TOperationTypes, int)
+	?NewL@CLmkDbSearchUtils@@SAPAV1@XZ @ 58 NONAME ; class CLmkDbSearchUtils * CLmkDbSearchUtils::NewL(void)
+	?NewL@CLmkDbUtils@@SAPAV1@AAVCPosLandmarkDatabase@@AAVMLmkAOOperationObserver@@H@Z @ 59 NONAME ; class CLmkDbUtils * CLmkDbUtils::NewL(class CPosLandmarkDatabase &, class MLmkAOOperationObserver &, int)
+	?NewL@CLmkEncoder@@SAPAV1@AAVCPosLandmarkDatabase@@AAVMLmkAOOperationObserver@@H@Z @ 60 NONAME ; class CLmkEncoder * CLmkEncoder::NewL(class CPosLandmarkDatabase &, class MLmkAOOperationObserver &, int)
+	?NewL@CLmkFields@@SAPAV1@AAV?$RPointerArray@VHBufC16@@@@AAVCPosLandmarkDatabase@@KKPAVCPosLandmark@@H@Z @ 61 NONAME ; class CLmkFields * CLmkFields::NewL(class RPointerArray<class HBufC16> &, class CPosLandmarkDatabase &, unsigned long, unsigned long, class CPosLandmark *, int)
+	?NewL@CLmkLandMarkCategoriesName@@SAPAV1@AAV1@@Z @ 62 NONAME ; class CLmkLandMarkCategoriesName * CLmkLandMarkCategoriesName::NewL(class CLmkLandMarkCategoriesName &)
+	?NewL@CLmkLandMarkCategoriesName@@SAPAV1@XZ @ 63 NONAME ; class CLmkLandMarkCategoriesName * CLmkLandMarkCategoriesName::NewL(void)
+	?NewL@CLmkLandmark@@SAPAV1@ABV1@@Z @ 64 NONAME ; class CLmkLandmark * CLmkLandmark::NewL(class CLmkLandmark const &)
+	?NewL@CLmkLandmark@@SAPAV1@PBVCPosLandmark@@ABV?$RPointerArray@VCPosLandmarkCategory@@@@@Z @ 65 NONAME ; class CLmkLandmark * CLmkLandmark::NewL(class CPosLandmark const *, class RPointerArray<class CPosLandmarkCategory> const &)
+	?NewL@CLmkLocationService@@SAPAV1@ABVTDesC16@@@Z @ 66 NONAME ; class CLmkLocationService * CLmkLocationService::NewL(class TDesC16 const &)
+	?NewL@CLmkParser@@SAPAV1@AAVRFile@@AAVCPosLandmarkDatabase@@AAVMLmkAOOperationObserver@@H@Z @ 67 NONAME ; class CLmkParser * CLmkParser::NewL(class RFile &, class CPosLandmarkDatabase &, class MLmkAOOperationObserver &, int)
+	?NewL@CLmkParser@@SAPAV1@ABVTDesC16@@AAVCPosLandmarkDatabase@@AAVMLmkAOOperationObserver@@H@Z @ 68 NONAME ; class CLmkParser * CLmkParser::NewL(class TDesC16 const &, class CPosLandmarkDatabase &, class MLmkAOOperationObserver &, int)
+	?NumOfParsedLandmarks@CLmkParser@@QAEHXZ @ 69 NONAME ; int CLmkParser::NumOfParsedLandmarks(void)
+	?PackageName@CLmkParser@@QAE?AVTPtrC16@@XZ @ 70 NONAME ; class TPtrC16 CLmkParser::PackageName(void)
+	?PosLandmark@CLmkLandmark@@QAEPAVCPosLandmark@@XZ @ 71 NONAME ; class CPosLandmark * CLmkLandmark::PosLandmark(void)
+	?RemoveDefaultProtocolL@CLmkDbUtils@@SAXAAVTPtr16@@@Z @ 72 NONAME ; void CLmkDbUtils::RemoveDefaultProtocolL(class TPtr16 &)
+	?RemoveEnterCharacter@CLmkFields@@SA?AVTPtr16@@VTPtrC16@@@Z @ 73 NONAME ; class TPtr16 CLmkFields::RemoveEnterCharacter(class TPtrC16)
+	?RemoveModelObserver@CLmkLocationService@@QAEXXZ @ 74 NONAME ; void CLmkLocationService::RemoveModelObserver(void)
+	?RemoveObserver@CLmkListProviderBase@@QAEHAAVMLmkListProviderObserver@@@Z @ 75 NONAME ; int CLmkListProviderBase::RemoveObserver(class MLmkListProviderObserver &)
+	?RenameCategoryL@CLmkDbUtils@@SAXAAVTDesC16@@KAAVCPosLandmarkDatabase@@@Z @ 76 NONAME ; void CLmkDbUtils::RenameCategoryL(class TDesC16 &, unsigned long, class CPosLandmarkDatabase &)
+	?SaveFieldsL@CLmkFields@@QAEXXZ @ 77 NONAME ; void CLmkFields::SaveFieldsL(void)
+	?SelectedIndex@CLmkLmItemListProvider@@QBEHK@Z @ 78 NONAME ; int CLmkLmItemListProvider::SelectedIndex(unsigned long) const
+	?SelectedIndexesL@CLmkLmItemListProvider@@QBEPAV?$CArrayFix@H@@ABV?$RArray@K@@@Z @ 79 NONAME ; class CArrayFix<int> * CLmkLmItemListProvider::SelectedIndexesL(class RArray<unsigned long> const &) const
+	?SetCategoryNames@CLmkLandMarkCategoriesName@@QAEXAAV?$RArray@V?$TBuf@$0HM@@@@@@Z @ 80 NONAME ; void CLmkLandMarkCategoriesName::SetCategoryNames(class RArray<class TBuf<124> > &)
+	?SetExtensionInt@CLmkUiItemBase@@QAEXH@Z @ 81 NONAME ; void CLmkUiItemBase::SetExtensionInt(int)
+	?SetIconMgrL@CLmkListProviderBase@@QAEXAAVMLmkSelectorIconMgr@@@Z @ 82 NONAME ; void CLmkListProviderBase::SetIconMgrL(class MLmkSelectorIconMgr &)
+	?SetObserver@CLmkLocationService@@QAEXAAVMLmkLocationObserver@@@Z @ 83 NONAME ; void CLmkLocationService::SetObserver(class MLmkLocationObserver &)
+	?StartEncodingL@CLmkEncoder@@QAEXABVTDesC16@@ABV?$RArray@K@@@Z @ 84 NONAME ; void CLmkEncoder::StartEncodingL(class TDesC16 const &, class RArray<unsigned long> const &)
+	?StartEncodingL@CLmkEncoder@@QAEXABVTDesC16@@ABV?$RPointerArray@VCLmkLandmark@@@@@Z @ 85 NONAME ; void CLmkEncoder::StartEncodingL(class TDesC16 const &, class RPointerArray<class CLmkLandmark> const &)
+	?StartImportingL@CLmkParser@@QAEXABV?$RArray@I@@H@Z @ 86 NONAME ; void CLmkParser::StartImportingL(class RArray<unsigned int> const &, int)
+	?StartImportingL@CLmkParser@@QAEXH@Z @ 87 NONAME ; void CLmkParser::StartImportingL(int)
+	?StartOperation@CLmkAOOperation@@QAEXXZ @ 88 NONAME ; void CLmkAOOperation::StartOperation(void)
+	?StartParsingL@CLmkParser@@QAEXXZ @ 89 NONAME ; void CLmkParser::StartParsingL(void)
+	?GetAllItemIdsL@CLmkLmItemListProvider@@QBEXAAV?$RArray@K@@@Z @ 90 NONAME ; void CLmkLmItemListProvider::GetAllItemIdsL(class RArray<unsigned long> &) const
+	?RemoveItem@CLmkLmItemListProvider@@QAEXK@Z @ 91 NONAME ; void CLmkLmItemListProvider::RemoveItem(unsigned long)
+	?SetSelectedItemsCount@CLmkLmItemListProvider@@QAEXH@Z @ 92 NONAME ; void CLmkLmItemListProvider::SetSelectedItemsCount(int)
+	?StopOperation@CLmkAOOperation@@QAEXXZ @ 93 NONAME ; void CLmkAOOperation::StopOperation(void)
+	?SetOperationCmd@CLmkLmItemListProvider@@QAEXW4TLmkAppCmdId@@@Z @ 94 NONAME ; void CLmkLmItemListProvider::SetOperationCmd(enum TLmkAppCmdId)
+	?RemoveItemsL@CLmkLmItemListProvider@@QAEXABV?$RArray@K@@W4TOperationTypes@MLmkAOOperationObserver@@K@Z @ 95 NONAME ; void CLmkLmItemListProvider::RemoveItemsL(class RArray<unsigned long> const &, enum MLmkAOOperationObserver::TOperationTypes, unsigned long)
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/engine/bwins/LMKENGUu.def	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,89 @@
+EXPORTS
+	??0CLmkAOOperation@@IAE@PAVCPosLmOperation@@AAVMLmkAOOperationObserver@@W4TOperationTypes@2@H@Z @ 1 NONAME ; CLmkAOOperation::CLmkAOOperation(class CPosLmOperation *, class MLmkAOOperationObserver &, enum MLmkAOOperationObserver::TOperationTypes, int)
+	??1CLmkAOOperation@@UAE@XZ @ 2 NONAME ; CLmkAOOperation::~CLmkAOOperation(void)
+	??1CLmkDbSearchUtils@@UAE@XZ @ 3 NONAME ; CLmkDbSearchUtils::~CLmkDbSearchUtils(void)
+	??1CLmkFields@@UAE@XZ @ 4 NONAME ; CLmkFields::~CLmkFields(void)
+	?AddCategoryL@CLmkDbUtils@@SAXAAVCPosLandmarkCategory@@AAVCPosLandmarkDatabase@@@Z @ 5 NONAME ; void CLmkDbUtils::AddCategoryL(class CPosLandmarkCategory &, class CPosLandmarkDatabase &)
+	?AddCategoryName@CLmkLandMarkCategoriesName@@QAEXABVTDesC16@@@Z @ 6 NONAME ; void CLmkLandMarkCategoriesName::AddCategoryName(class TDesC16 const &)
+	?AddDefaultProtocolL@CLmkDbUtils@@SAXPAVCPosLandmark@@@Z @ 7 NONAME ; void CLmkDbUtils::AddDefaultProtocolL(class CPosLandmark *)
+	?AddLmToCategoriesL@CLmkDbUtils@@QAEXKABV?$RArray@K@@@Z @ 8 NONAME ; void CLmkDbUtils::AddLmToCategoriesL(unsigned long, class RArray<unsigned long> const &)
+	?AddLmToCategoryL@CLmkDbUtils@@SAXKKAAVCPosLandmarkDatabase@@@Z @ 9 NONAME ; void CLmkDbUtils::AddLmToCategoryL(unsigned long, unsigned long, class CPosLandmarkDatabase &)
+	?AddLmsToCategoriesL@CLmkDbUtils@@QAEXABV?$RArray@K@@0@Z @ 10 NONAME ; void CLmkDbUtils::AddLmsToCategoriesL(class RArray<unsigned long> const &, class RArray<unsigned long> const &)
+	?AddObserverL@CLmkListProviderBase@@QAEXAAVMLmkListProviderObserver@@@Z @ 11 NONAME ; void CLmkListProviderBase::AddObserverL(class MLmkListProviderObserver &)
+	?CancelEncodeOperationL@CLmkEncoder@@QAEXXZ @ 12 NONAME ; void CLmkEncoder::CancelEncodeOperationL(void)
+	?CancelImporting@CLmkParser@@QAEXXZ @ 13 NONAME ; void CLmkParser::CancelImporting(void)
+	?CancelLmOperation@CLmkDbUtils@@QAEXXZ @ 14 NONAME ; void CLmkDbUtils::CancelLmOperation(void)
+	?CancelRequest@CLmkLocationService@@QAEXXZ @ 15 NONAME ; void CLmkLocationService::CancelRequest(void)
+	?Categories@CLmkLandmark@@QAEAAV?$RPointerArray@VCPosLandmarkCategory@@@@XZ @ 16 NONAME ; class RPointerArray<class CPosLandmarkCategory> & CLmkLandmark::Categories(void)
+	?CategoryIdL@CLmkDbUtils@@QAEKAAVCPosLandmarkDatabase@@ABVTDesC16@@@Z @ 17 NONAME ; unsigned long CLmkDbUtils::CategoryIdL(class CPosLandmarkDatabase &, class TDesC16 const &)
+	?CategoryNameL@CLmkDbUtils@@SAPAVHBufC16@@AAVCPosLandmarkDatabase@@K@Z @ 18 NONAME ; class HBufC16 * CLmkDbUtils::CategoryNameL(class CPosLandmarkDatabase &, unsigned long)
+	?CategoryNameLC@CLmkParser@@QAEPAVCLmkLandMarkCategoriesName@@H@Z @ 19 NONAME ; class CLmkLandMarkCategoriesName * CLmkParser::CategoryNameLC(int)
+	?ChangeIconL@CLmkDbUtils@@SAXAAVCPosLandmarkDatabase@@KW4TLmkItemType@@ABVTDesC16@@HH@Z @ 20 NONAME ; void CLmkDbUtils::ChangeIconL(class CPosLandmarkDatabase &, unsigned long, enum TLmkItemType, class TDesC16 const &, int, int)
+	?ChangeIconsL@CLmkDbUtils@@QAEXABV?$RArray@K@@W4TLmkItemType@@ABVTDesC16@@HH@Z @ 21 NONAME ; void CLmkDbUtils::ChangeIconsL(class RArray<unsigned long> const &, enum TLmkItemType, class TDesC16 const &, int, int)
+	?ChangeObserver@CLmkParser@@QAEXAAVMLmkAOOperationObserver@@@Z @ 22 NONAME ; void CLmkParser::ChangeObserver(class MLmkAOOperationObserver &)
+	?CheckDiscSpaceL@CLmkFields@@QAEHXZ @ 23 NONAME ; int CLmkFields::CheckDiscSpaceL(void)
+	?CompactDbL@CLmkDbUtils@@QAEXXZ @ 24 NONAME ; void CLmkDbUtils::CompactDbL(void)
+	?CreateProviderL@LmkListProviderFactory@@SAPAVCLmkListProviderBase@@AAVCLmkParser@@@Z @ 25 NONAME ; class CLmkListProviderBase * LmkListProviderFactory::CreateProviderL(class CLmkParser &)
+	?CreateProviderL@LmkListProviderFactory@@SAPAVCLmkListProviderBase@@AAVCPosLandmarkDatabase@@AAVCPosLmSearchCriteria@@@Z @ 26 NONAME ; class CLmkListProviderBase * LmkListProviderFactory::CreateProviderL(class CPosLandmarkDatabase &, class CPosLmSearchCriteria &)
+	?CreateProviderL@LmkListProviderFactory@@SAPAVCLmkListProviderBase@@AAVCPosLandmarkDatabase@@W4TLmkSelectorType@@W4TLmkProviderType@@@Z @ 27 NONAME ; class CLmkListProviderBase * LmkListProviderFactory::CreateProviderL(class CPosLandmarkDatabase &, enum TLmkSelectorType, enum TLmkProviderType)
+	?CurrentPosition@CLmkLocationService@@QAEAAVTPosition@@XZ @ 28 NONAME ; class TPosition & CLmkLocationService::CurrentPosition(void)
+	?DeleteCategoriesL@CLmkDbUtils@@QAEXABV?$RArray@K@@@Z @ 29 NONAME ; void CLmkDbUtils::DeleteCategoriesL(class RArray<unsigned long> const &)
+	?DeleteFileL@LmkFileUtils@@SAXABVTDesC16@@@Z @ 30 NONAME ; void LmkFileUtils::DeleteFileL(class TDesC16 const &)
+	?DeleteLandmarkL@CLmkDbUtils@@SAXKAAVCPosLandmarkDatabase@@@Z @ 31 NONAME ; void CLmkDbUtils::DeleteLandmarkL(unsigned long, class CPosLandmarkDatabase &)
+	?DeleteLandmarkL@CLmkFields@@QAEXXZ @ 32 NONAME ; void CLmkFields::DeleteLandmarkL(void)
+	?DeleteLandmarksL@CLmkDbUtils@@QAEXABV?$RArray@K@@@Z @ 33 NONAME ; void CLmkDbUtils::DeleteLandmarksL(class RArray<unsigned long> const &)
+	?ExtensionInt@CLmkUiItemBase@@QAEHXZ @ 34 NONAME ; int CLmkUiItemBase::ExtensionInt(void)
+	?ExtensionIntExists@CLmkUiItemBase@@QAEHXZ @ 35 NONAME ; int CLmkUiItemBase::ExtensionIntExists(void)
+	?Fields@CLmkFields@@QAEAAV?$CArrayPtrFlat@VMLmkFieldData@@@@XZ @ 36 NONAME ; class CArrayPtrFlat<class MLmkFieldData> & CLmkFields::Fields(void)
+	?FileHandle@CLmkParser@@QAEAAVRFile@@XZ @ 37 NONAME ; class RFile & CLmkParser::FileHandle(void)
+	?FileName@CLmkParser@@QAE?AVTPtrC16@@XZ @ 38 NONAME ; class TPtrC16 CLmkParser::FileName(void)
+	?GetCategoryNameL@CLmkDbSearchUtils@@QAEPAVHBufC16@@K@Z @ 39 NONAME ; class HBufC16 * CLmkDbSearchUtils::GetCategoryNameL(unsigned long)
+	?GetCategoryNames@CLmkLandMarkCategoriesName@@QBEXAAV?$RArray@V?$TBuf@$0HM@@@@@@Z @ 40 NONAME ; void CLmkLandMarkCategoriesName::GetCategoryNames(class RArray<class TBuf<124> > &) const
+	?GetField@CLmkFields@@QAEPAVMLmkFieldData@@G@Z @ 41 NONAME ; class MLmkFieldData * CLmkFields::GetField(unsigned short)
+	?GetLandmarkForIdL@CLmkDbSearchUtils@@QAEPAVCPosLandmark@@K@Z @ 42 NONAME ; class CPosLandmark * CLmkDbSearchUtils::GetLandmarkForIdL(unsigned long)
+	?GetLandmarksL@CLmkDbSearchUtils@@QAEXPAVMLmkDbSearchUtilsObserver@@V?$RArray@K@@PAV?$RPointerArray@VCPosLandmark@@@@@Z @ 43 NONAME ; void CLmkDbSearchUtils::GetLandmarksL(class MLmkDbSearchUtilsObserver *, class RArray<unsigned long>, class RPointerArray<class CPosLandmark> *)
+	?GetLandmarksUnderCategoryL@CLmkDbSearchUtils@@QAEXPAVMLmkDbSearchUtilsObserver@@K@Z @ 44 NONAME ; void CLmkDbSearchUtils::GetLandmarksUnderCategoryL(class MLmkDbSearchUtilsObserver *, unsigned long)
+	?GetSelectedIndexesL@CLmkLmItemListProvider@@QBEXAAV?$CArrayFix@H@@ABV?$RArray@K@@@Z @ 45 NONAME ; void CLmkLmItemListProvider::GetSelectedIndexesL(class CArrayFix<int> &, class RArray<unsigned long> const &) const
+	?GetSelectedItemId@CLmkLmItemListProvider@@QBEXAAKH@Z @ 46 NONAME ; void CLmkLmItemListProvider::GetSelectedItemId(unsigned long &, int) const
+	?GetSelectedItemIdsL@CLmkLmItemListProvider@@QBEXAAV?$RArray@K@@ABV?$CArrayFix@H@@@Z @ 47 NONAME ; void CLmkLmItemListProvider::GetSelectedItemIdsL(class RArray<unsigned long> &, class CArrayFix<int> const &) const
+	?InitializeDbL@CLmkDbUtils@@QAEXXZ @ 48 NONAME ; void CLmkDbUtils::InitializeDbL(void)
+	?InitializeDbL@CLmkParser@@QAEXXZ @ 49 NONAME ; void CLmkParser::InitializeDbL(void)
+	?IsFileHandle@CLmkParser@@QAEHXZ @ 50 NONAME ; int CLmkParser::IsFileHandle(void)
+	?IsLmWithThisFieldExistL@CLmkDbUtils@@QAEHG@Z @ 51 NONAME ; int CLmkDbUtils::IsLmWithThisFieldExistL(unsigned short)
+	?LandmarkId@CLmkFields@@QBEKXZ @ 52 NONAME ; unsigned long CLmkFields::LandmarkId(void) const
+	?LandmarkLC@CLmkParser@@QAEPAVCPosLandmark@@H@Z @ 53 NONAME ; class CPosLandmark * CLmkParser::LandmarkLC(int)
+	?LmkLandmarkLC@CLmkParser@@QAEPAVCLmkLandmark@@H@Z @ 54 NONAME ; class CLmkLandmark * CLmkParser::LmkLandmarkLC(int)
+	?LocationRequestL@CLmkLocationService@@QAEXXZ @ 55 NONAME ; void CLmkLocationService::LocationRequestL(void)
+	?NewL@CLmkAOOperation@@SAPAV1@PAVCPosLmOperation@@AAVMLmkAOOperationObserver@@W4TOperationTypes@3@H@Z @ 56 NONAME ; class CLmkAOOperation * CLmkAOOperation::NewL(class CPosLmOperation *, class MLmkAOOperationObserver &, enum MLmkAOOperationObserver::TOperationTypes, int)
+	?NewL@CLmkDbSearchUtils@@SAPAV1@XZ @ 57 NONAME ; class CLmkDbSearchUtils * CLmkDbSearchUtils::NewL(void)
+	?NewL@CLmkDbUtils@@SAPAV1@AAVCPosLandmarkDatabase@@AAVMLmkAOOperationObserver@@H@Z @ 58 NONAME ; class CLmkDbUtils * CLmkDbUtils::NewL(class CPosLandmarkDatabase &, class MLmkAOOperationObserver &, int)
+	?NewL@CLmkEncoder@@SAPAV1@AAVCPosLandmarkDatabase@@AAVMLmkAOOperationObserver@@H@Z @ 59 NONAME ; class CLmkEncoder * CLmkEncoder::NewL(class CPosLandmarkDatabase &, class MLmkAOOperationObserver &, int)
+	?NewL@CLmkFields@@SAPAV1@AAV?$RPointerArray@VHBufC16@@@@AAVCPosLandmarkDatabase@@KKPAVCPosLandmark@@H@Z @ 60 NONAME ; class CLmkFields * CLmkFields::NewL(class RPointerArray<class HBufC16> &, class CPosLandmarkDatabase &, unsigned long, unsigned long, class CPosLandmark *, int)
+	?NewL@CLmkLandMarkCategoriesName@@SAPAV1@AAV1@@Z @ 61 NONAME ; class CLmkLandMarkCategoriesName * CLmkLandMarkCategoriesName::NewL(class CLmkLandMarkCategoriesName &)
+	?NewL@CLmkLandMarkCategoriesName@@SAPAV1@XZ @ 62 NONAME ; class CLmkLandMarkCategoriesName * CLmkLandMarkCategoriesName::NewL(void)
+	?NewL@CLmkLandmark@@SAPAV1@ABV1@@Z @ 63 NONAME ; class CLmkLandmark * CLmkLandmark::NewL(class CLmkLandmark const &)
+	?NewL@CLmkLandmark@@SAPAV1@PBVCPosLandmark@@ABV?$RPointerArray@VCPosLandmarkCategory@@@@@Z @ 64 NONAME ; class CLmkLandmark * CLmkLandmark::NewL(class CPosLandmark const *, class RPointerArray<class CPosLandmarkCategory> const &)
+	?NewL@CLmkLocationService@@SAPAV1@ABVTDesC16@@@Z @ 65 NONAME ; class CLmkLocationService * CLmkLocationService::NewL(class TDesC16 const &)
+	?NewL@CLmkParser@@SAPAV1@AAVRFile@@AAVCPosLandmarkDatabase@@AAVMLmkAOOperationObserver@@H@Z @ 66 NONAME ; class CLmkParser * CLmkParser::NewL(class RFile &, class CPosLandmarkDatabase &, class MLmkAOOperationObserver &, int)
+	?NewL@CLmkParser@@SAPAV1@ABVTDesC16@@AAVCPosLandmarkDatabase@@AAVMLmkAOOperationObserver@@H@Z @ 67 NONAME ; class CLmkParser * CLmkParser::NewL(class TDesC16 const &, class CPosLandmarkDatabase &, class MLmkAOOperationObserver &, int)
+	?NumOfParsedLandmarks@CLmkParser@@QAEHXZ @ 68 NONAME ; int CLmkParser::NumOfParsedLandmarks(void)
+	?PackageName@CLmkParser@@QAE?AVTPtrC16@@XZ @ 69 NONAME ; class TPtrC16 CLmkParser::PackageName(void)
+	?PosLandmark@CLmkLandmark@@QAEPAVCPosLandmark@@XZ @ 70 NONAME ; class CPosLandmark * CLmkLandmark::PosLandmark(void)
+	?RemoveDefaultProtocolL@CLmkDbUtils@@SAXAAVTPtr16@@@Z @ 71 NONAME ; void CLmkDbUtils::RemoveDefaultProtocolL(class TPtr16 &)
+	?RemoveModelObserver@CLmkLocationService@@QAEXXZ @ 72 NONAME ; void CLmkLocationService::RemoveModelObserver(void)
+	?RemoveObserver@CLmkListProviderBase@@QAEHAAVMLmkListProviderObserver@@@Z @ 73 NONAME ; int CLmkListProviderBase::RemoveObserver(class MLmkListProviderObserver &)
+	?RenameCategoryL@CLmkDbUtils@@SAXAAVTDesC16@@KAAVCPosLandmarkDatabase@@@Z @ 74 NONAME ; void CLmkDbUtils::RenameCategoryL(class TDesC16 &, unsigned long, class CPosLandmarkDatabase &)
+	?SaveFieldsL@CLmkFields@@QAEXXZ @ 75 NONAME ; void CLmkFields::SaveFieldsL(void)
+	?SelectedIndex@CLmkLmItemListProvider@@QBEHK@Z @ 76 NONAME ; int CLmkLmItemListProvider::SelectedIndex(unsigned long) const
+	?SelectedIndexesL@CLmkLmItemListProvider@@QBEPAV?$CArrayFix@H@@ABV?$RArray@K@@@Z @ 77 NONAME ; class CArrayFix<int> * CLmkLmItemListProvider::SelectedIndexesL(class RArray<unsigned long> const &) const
+	?SetCategoryNames@CLmkLandMarkCategoriesName@@QAEXAAV?$RArray@V?$TBuf@$0HM@@@@@@Z @ 78 NONAME ; void CLmkLandMarkCategoriesName::SetCategoryNames(class RArray<class TBuf<124> > &)
+	?SetExtensionInt@CLmkUiItemBase@@QAEXH@Z @ 79 NONAME ; void CLmkUiItemBase::SetExtensionInt(int)
+	?SetIconMgrL@CLmkListProviderBase@@QAEXAAVMLmkSelectorIconMgr@@@Z @ 80 NONAME ; void CLmkListProviderBase::SetIconMgrL(class MLmkSelectorIconMgr &)
+	?SetObserver@CLmkLocationService@@QAEXAAVMLmkLocationObserver@@@Z @ 81 NONAME ; void CLmkLocationService::SetObserver(class MLmkLocationObserver &)
+	?StartEncodingL@CLmkEncoder@@QAEXABVTDesC16@@ABV?$RArray@K@@@Z @ 82 NONAME ; void CLmkEncoder::StartEncodingL(class TDesC16 const &, class RArray<unsigned long> const &)
+	?StartEncodingL@CLmkEncoder@@QAEXABVTDesC16@@ABV?$RPointerArray@VCLmkLandmark@@@@@Z @ 83 NONAME ; void CLmkEncoder::StartEncodingL(class TDesC16 const &, class RPointerArray<class CLmkLandmark> const &)
+	?StartImportingL@CLmkParser@@QAEXABV?$RArray@I@@H@Z @ 84 NONAME ; void CLmkParser::StartImportingL(class RArray<unsigned int> const &, int)
+	?StartImportingL@CLmkParser@@QAEXH@Z @ 85 NONAME ; void CLmkParser::StartImportingL(int)
+	?StartOperation@CLmkAOOperation@@QAEXXZ @ 86 NONAME ; void CLmkAOOperation::StartOperation(void)
+	?StartParsingL@CLmkParser@@QAEXXZ @ 87 NONAME ; void CLmkParser::StartParsingL(void)
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/engine/eabi/LMKENGU_32u.def	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,156 @@
+EXPORTS
+	_ZN10CLmkFields11SaveFieldsLEv @ 1 NONAME
+	_ZN10CLmkFields15CheckDiscSpaceLEv @ 2 NONAME
+	_ZN10CLmkFields15DeleteLandmarkLEv @ 3 NONAME
+	_ZN10CLmkFields20RemoveEnterCharacterE7TPtrC16 @ 4 NONAME
+	_ZN10CLmkFields4NewLER13RPointerArrayI7HBufC16ER20CPosLandmarkDatabasemmP12CPosLandmarki @ 5 NONAME
+	_ZN10CLmkFields6FieldsEv @ 6 NONAME
+	_ZN10CLmkFields8GetFieldEt @ 7 NONAME
+	_ZN10CLmkFieldsD0Ev @ 8 NONAME
+	_ZN10CLmkFieldsD1Ev @ 9 NONAME
+	_ZN10CLmkFieldsD2Ev @ 10 NONAME
+	_ZN10CLmkParser10FileHandleEv @ 11 NONAME
+	_ZN10CLmkParser10LandmarkLCEi @ 12 NONAME
+	_ZN10CLmkParser11PackageNameEv @ 13 NONAME
+	_ZN10CLmkParser12IsFileHandleEv @ 14 NONAME
+	_ZN10CLmkParser13InitializeDbLEv @ 15 NONAME
+	_ZN10CLmkParser13LmkLandmarkLCEi @ 16 NONAME
+	_ZN10CLmkParser13StartParsingLEv @ 17 NONAME
+	_ZN10CLmkParser14CategoryNameLCEi @ 18 NONAME
+	_ZN10CLmkParser14ChangeObserverER23MLmkAOOperationObserver @ 19 NONAME
+	_ZN10CLmkParser15CancelImportingEv @ 20 NONAME
+	_ZN10CLmkParser15StartImportingLERK6RArrayIjEi @ 21 NONAME
+	_ZN10CLmkParser15StartImportingLEi @ 22 NONAME
+	_ZN10CLmkParser20NumOfParsedLandmarksEv @ 23 NONAME
+	_ZN10CLmkParser4NewLER5RFileR20CPosLandmarkDatabaseR23MLmkAOOperationObserveri @ 24 NONAME
+	_ZN10CLmkParser4NewLERK7TDesC16R20CPosLandmarkDatabaseR23MLmkAOOperationObserveri @ 25 NONAME
+	_ZN10CLmkParser8FileNameEv @ 26 NONAME
+	_ZN11CLmkDbUtils10CompactDbLEv @ 27 NONAME
+	_ZN11CLmkDbUtils11CategoryIdLER20CPosLandmarkDatabaseRK7TDesC16 @ 28 NONAME
+	_ZN11CLmkDbUtils11ChangeIconLER20CPosLandmarkDatabasem12TLmkItemTypeRK7TDesC16ii @ 29 NONAME
+	_ZN11CLmkDbUtils12AddCategoryLER20CPosLandmarkCategoryR20CPosLandmarkDatabase @ 30 NONAME
+	_ZN11CLmkDbUtils12ChangeIconsLERK6RArrayImE12TLmkItemTypeRK7TDesC16ii @ 31 NONAME
+	_ZN11CLmkDbUtils13CategoryNameLER20CPosLandmarkDatabasem @ 32 NONAME
+	_ZN11CLmkDbUtils13InitializeDbLEv @ 33 NONAME
+	_ZN11CLmkDbUtils15DeleteLandmarkLEmR20CPosLandmarkDatabase @ 34 NONAME
+	_ZN11CLmkDbUtils15RenameCategoryLER7TDesC16mR20CPosLandmarkDatabase @ 35 NONAME
+	_ZN11CLmkDbUtils16AddLmToCategoryLEmmR20CPosLandmarkDatabase @ 36 NONAME
+	_ZN11CLmkDbUtils16DeleteLandmarksLERK6RArrayImE @ 37 NONAME
+	_ZN11CLmkDbUtils17CancelLmOperationEv @ 38 NONAME
+	_ZN11CLmkDbUtils17DeleteCategoriesLERK6RArrayImE @ 39 NONAME
+	_ZN11CLmkDbUtils18AddLmToCategoriesLEmRK6RArrayImE @ 40 NONAME
+	_ZN11CLmkDbUtils19AddDefaultProtocolLEP12CPosLandmark @ 41 NONAME
+	_ZN11CLmkDbUtils19AddLmsToCategoriesLERK6RArrayImES3_ @ 42 NONAME
+	_ZN11CLmkDbUtils22RemoveDefaultProtocolLER6TPtr16 @ 43 NONAME
+	_ZN11CLmkDbUtils23IsLmWithThisFieldExistLEt @ 44 NONAME
+	_ZN11CLmkDbUtils4NewLER20CPosLandmarkDatabaseR23MLmkAOOperationObserveri @ 45 NONAME
+	_ZN11CLmkEncoder14StartEncodingLERK7TDesC16RK13RPointerArrayI12CLmkLandmarkE @ 46 NONAME
+	_ZN11CLmkEncoder14StartEncodingLERK7TDesC16RK6RArrayImE @ 47 NONAME
+	_ZN11CLmkEncoder22CancelEncodeOperationLEv @ 48 NONAME
+	_ZN11CLmkEncoder4NewLER20CPosLandmarkDatabaseR23MLmkAOOperationObserveri @ 49 NONAME
+	_ZN12CLmkLandmark10CategoriesEv @ 50 NONAME
+	_ZN12CLmkLandmark11PosLandmarkEv @ 51 NONAME
+	_ZN12CLmkLandmark4NewLEPK12CPosLandmarkRK13RPointerArrayI20CPosLandmarkCategoryE @ 52 NONAME
+	_ZN12CLmkLandmark4NewLERKS_ @ 53 NONAME
+	_ZN12LmkFileUtils11DeleteFileLERK7TDesC16 @ 54 NONAME
+	_ZN12LmkFileUtils12IsValidPathLE7TPtrC16 @ 55 NONAME
+	_ZN14CLmkUiItemBase12ExtensionIntEv @ 56 NONAME
+	_ZN14CLmkUiItemBase15SetExtensionIntEi @ 57 NONAME
+	_ZN14CLmkUiItemBase18ExtensionIntExistsEv @ 58 NONAME
+	_ZN15CLmkAOOperation14StartOperationEv @ 59 NONAME
+	_ZN15CLmkAOOperation4NewLEP15CPosLmOperationR23MLmkAOOperationObserverNS2_15TOperationTypesEi @ 60 NONAME
+	_ZN15CLmkAOOperationC1EP15CPosLmOperationR23MLmkAOOperationObserverNS2_15TOperationTypesEi @ 61 NONAME
+	_ZN15CLmkAOOperationC2EP15CPosLmOperationR23MLmkAOOperationObserverNS2_15TOperationTypesEi @ 62 NONAME
+	_ZN15CLmkAOOperationD0Ev @ 63 NONAME
+	_ZN15CLmkAOOperationD1Ev @ 64 NONAME
+	_ZN15CLmkAOOperationD2Ev @ 65 NONAME
+	_ZN17CLmkDbSearchUtils13GetLandmarksLEP25MLmkDbSearchUtilsObserver6RArrayImEP13RPointerArrayI12CPosLandmarkE @ 66 NONAME
+	_ZN17CLmkDbSearchUtils16GetCategoryNameLEm @ 67 NONAME
+	_ZN17CLmkDbSearchUtils17GetLandmarkForIdLEm @ 68 NONAME
+	_ZN17CLmkDbSearchUtils26GetLandmarksUnderCategoryLEP25MLmkDbSearchUtilsObserverm @ 69 NONAME
+	_ZN17CLmkDbSearchUtils4NewLEv @ 70 NONAME
+	_ZN17CLmkDbSearchUtilsD0Ev @ 71 NONAME
+	_ZN17CLmkDbSearchUtilsD1Ev @ 72 NONAME
+	_ZN17CLmkDbSearchUtilsD2Ev @ 73 NONAME
+	_ZN19CLmkLocationService11SetObserverER20MLmkLocationObserver @ 74 NONAME
+	_ZN19CLmkLocationService13CancelRequestEv @ 75 NONAME
+	_ZN19CLmkLocationService15CurrentPositionEv @ 76 NONAME
+	_ZN19CLmkLocationService16LocationRequestLEv @ 77 NONAME
+	_ZN19CLmkLocationService19RemoveModelObserverEv @ 78 NONAME
+	_ZN19CLmkLocationService4NewLERK7TDesC16 @ 79 NONAME
+	_ZN20CLmkListProviderBase11SetIconMgrLER19MLmkSelectorIconMgr @ 80 NONAME
+	_ZN20CLmkListProviderBase12AddObserverLER24MLmkListProviderObserver @ 81 NONAME
+	_ZN20CLmkListProviderBase14RemoveObserverER24MLmkListProviderObserver @ 82 NONAME
+	_ZN22LmkListProviderFactory15CreateProviderLER10CLmkParser @ 83 NONAME
+	_ZN22LmkListProviderFactory15CreateProviderLER20CPosLandmarkDatabase16TLmkSelectorType16TLmkProviderType @ 84 NONAME
+	_ZN22LmkListProviderFactory15CreateProviderLER20CPosLandmarkDatabaseR20CPosLmSearchCriteria @ 85 NONAME
+	_ZN26CLmkLandMarkCategoriesName15AddCategoryNameERK7TDesC16 @ 86 NONAME
+	_ZN26CLmkLandMarkCategoriesName16SetCategoryNamesER6RArrayI4TBufILi124EEE @ 87 NONAME
+	_ZN26CLmkLandMarkCategoriesName4NewLERS_ @ 88 NONAME
+	_ZN26CLmkLandMarkCategoriesName4NewLEv @ 89 NONAME
+	_ZNK10CLmkFields10LandmarkIdEv @ 90 NONAME
+	_ZNK22CLmkLmItemListProvider13SelectedIndexEm @ 91 NONAME
+	_ZNK22CLmkLmItemListProvider16SelectedIndexesLERK6RArrayImE @ 92 NONAME
+	_ZNK22CLmkLmItemListProvider17GetSelectedItemIdERmi @ 93 NONAME
+	_ZNK22CLmkLmItemListProvider19GetSelectedIndexesLER9CArrayFixIiERK6RArrayImE @ 94 NONAME
+	_ZNK22CLmkLmItemListProvider19GetSelectedItemIdsLER6RArrayImERK9CArrayFixIiE @ 95 NONAME
+	_ZNK26CLmkLandMarkCategoriesName16GetCategoryNamesER6RArrayI4TBufILi124EEE @ 96 NONAME
+	_ZTI10CLmkFields @ 97 NONAME ; #<TI>#
+	_ZTI10CLmkParser @ 98 NONAME ; #<TI>#
+	_ZTI11CLmkDbUtils @ 99 NONAME ; #<TI>#
+	_ZTI11CLmkEncoder @ 100 NONAME ; #<TI>#
+	_ZTI12CLmkLandmark @ 101 NONAME ; #<TI>#
+	_ZTI13CLmkFieldData @ 102 NONAME ; #<TI>#
+	_ZTI14CLmkUiItemBase @ 103 NONAME ; #<TI>#
+	_ZTI15CLmkAOOperation @ 104 NONAME ; #<TI>#
+	_ZTI17CLmkDbInitializer @ 105 NONAME ; #<TI>#
+	_ZTI17CLmkDbSearchUtils @ 106 NONAME ; #<TI>#
+	_ZTI17CLmkIconOperation @ 107 NONAME ; #<TI>#
+	_ZTI18CLmkCategoryUiItem @ 108 NONAME ; #<TI>#
+	_ZTI18CLmkLandmarkUiItem @ 109 NONAME ; #<TI>#
+	_ZTI19CLmkDbEventListener @ 110 NONAME ; #<TI>#
+	_ZTI19CLmkLocationService @ 111 NONAME ; #<TI>#
+	_ZTI19CLmkParseAllWrapper @ 112 NONAME ; #<TI>#
+	_ZTI20CLmkListProviderBase @ 113 NONAME ; #<TI>#
+	_ZTI21CLmkAddToCatOperation @ 114 NONAME ; #<TI>#
+	_ZTI22CLmkLmItemListProvider @ 115 NONAME ; #<TI>#
+	_ZTI24CLmkCategoryListProvider @ 116 NONAME ; #<TI>#
+	_ZTI24CLmkLandmarkListProvider @ 117 NONAME ; #<TI>#
+	_ZTI24CLmkParsedLmListProvider @ 118 NONAME ; #<TI>#
+	_ZTI26CLmkEventListenerSingleton @ 119 NONAME ; #<TI>#
+	_ZTI26CLmkLandMarkCategoriesName @ 120 NONAME ; #<TI>#
+	_ZTI26CLmkSearchedLmListProvider @ 121 NONAME ; #<TI>#
+	_ZTI28CLmkEncodeUnsavedLandmarksOp @ 122 NONAME ; #<TI>#
+	_ZTV10CLmkFields @ 123 NONAME ; #<VT>#
+	_ZTV10CLmkParser @ 124 NONAME ; #<VT>#
+	_ZTV11CLmkDbUtils @ 125 NONAME ; #<VT>#
+	_ZTV11CLmkEncoder @ 126 NONAME ; #<VT>#
+	_ZTV12CLmkLandmark @ 127 NONAME ; #<VT>#
+	_ZTV13CLmkFieldData @ 128 NONAME ; #<VT>#
+	_ZTV14CLmkUiItemBase @ 129 NONAME ; #<VT>#
+	_ZTV15CLmkAOOperation @ 130 NONAME ; #<VT>#
+	_ZTV17CLmkDbInitializer @ 131 NONAME ; #<VT>#
+	_ZTV17CLmkDbSearchUtils @ 132 NONAME ; #<VT>#
+	_ZTV17CLmkIconOperation @ 133 NONAME ; #<VT>#
+	_ZTV18CLmkCategoryUiItem @ 134 NONAME ; #<VT>#
+	_ZTV18CLmkLandmarkUiItem @ 135 NONAME ; #<VT>#
+	_ZTV19CLmkDbEventListener @ 136 NONAME ; #<VT>#
+	_ZTV19CLmkLocationService @ 137 NONAME ; #<VT>#
+	_ZTV19CLmkParseAllWrapper @ 138 NONAME ; #<VT>#
+	_ZTV20CLmkListProviderBase @ 139 NONAME ; #<VT>#
+	_ZTV21CLmkAddToCatOperation @ 140 NONAME ; #<VT>#
+	_ZTV22CLmkLmItemListProvider @ 141 NONAME ; #<VT>#
+	_ZTV24CLmkCategoryListProvider @ 142 NONAME ; #<VT>#
+	_ZTV24CLmkLandmarkListProvider @ 143 NONAME ; #<VT>#
+	_ZTV24CLmkParsedLmListProvider @ 144 NONAME ; #<VT>#
+	_ZTV26CLmkEventListenerSingleton @ 145 NONAME ; #<VT>#
+	_ZTV26CLmkLandMarkCategoriesName @ 146 NONAME ; #<VT>#
+	_ZTV26CLmkSearchedLmListProvider @ 147 NONAME ; #<VT>#
+	_ZTV28CLmkEncodeUnsavedLandmarksOp @ 148 NONAME ; #<VT>#
+	_ZN15CLmkAOOperation13StopOperationEv @ 149 NONAME
+	_ZN22CLmkLmItemListProvider10RemoveItemEm @ 150 NONAME
+	_ZN22CLmkLmItemListProvider21SetSelectedItemsCountEi @ 151 NONAME
+	_ZNK22CLmkLmItemListProvider14GetAllItemIdsLER6RArrayImE @ 152 NONAME
+	_ZN22CLmkLmItemListProvider15SetOperationCmdE12TLmkAppCmdId @ 153 NONAME
+	_ZN22CLmkLmItemListProvider12RemoveItemsLERK6RArrayImEN23MLmkAOOperationObserver15TOperationTypesEm @ 154 NONAME
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/engine/eabi/LMKENGUu.def	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,148 @@
+EXPORTS
+	_ZN10CLmkFields11SaveFieldsLEv @ 1 NONAME
+	_ZN10CLmkFields15CheckDiscSpaceLEv @ 2 NONAME
+	_ZN10CLmkFields15DeleteLandmarkLEv @ 3 NONAME
+	_ZN10CLmkFields4NewLER13RPointerArrayI7HBufC16ER20CPosLandmarkDatabasemmP12CPosLandmarki @ 4 NONAME
+	_ZN10CLmkFields6FieldsEv @ 5 NONAME
+	_ZN10CLmkFields8GetFieldEt @ 6 NONAME
+	_ZN10CLmkFieldsD0Ev @ 7 NONAME
+	_ZN10CLmkFieldsD1Ev @ 8 NONAME
+	_ZN10CLmkFieldsD2Ev @ 9 NONAME
+	_ZN10CLmkParser10FileHandleEv @ 10 NONAME
+	_ZN10CLmkParser10LandmarkLCEi @ 11 NONAME
+	_ZN10CLmkParser11PackageNameEv @ 12 NONAME
+	_ZN10CLmkParser12IsFileHandleEv @ 13 NONAME
+	_ZN10CLmkParser13InitializeDbLEv @ 14 NONAME
+	_ZN10CLmkParser13LmkLandmarkLCEi @ 15 NONAME
+	_ZN10CLmkParser13StartParsingLEv @ 16 NONAME
+	_ZN10CLmkParser14CategoryNameLCEi @ 17 NONAME
+	_ZN10CLmkParser14ChangeObserverER23MLmkAOOperationObserver @ 18 NONAME
+	_ZN10CLmkParser15CancelImportingEv @ 19 NONAME
+	_ZN10CLmkParser15StartImportingLERK6RArrayIjEi @ 20 NONAME
+	_ZN10CLmkParser15StartImportingLEi @ 21 NONAME
+	_ZN10CLmkParser20NumOfParsedLandmarksEv @ 22 NONAME
+	_ZN10CLmkParser4NewLER5RFileR20CPosLandmarkDatabaseR23MLmkAOOperationObserveri @ 23 NONAME
+	_ZN10CLmkParser4NewLERK7TDesC16R20CPosLandmarkDatabaseR23MLmkAOOperationObserveri @ 24 NONAME
+	_ZN10CLmkParser8FileNameEv @ 25 NONAME
+	_ZN11CLmkDbUtils10CompactDbLEv @ 26 NONAME
+	_ZN11CLmkDbUtils11CategoryIdLER20CPosLandmarkDatabaseRK7TDesC16 @ 27 NONAME
+	_ZN11CLmkDbUtils11ChangeIconLER20CPosLandmarkDatabasem12TLmkItemTypeRK7TDesC16ii @ 28 NONAME
+	_ZN11CLmkDbUtils12AddCategoryLER20CPosLandmarkCategoryR20CPosLandmarkDatabase @ 29 NONAME
+	_ZN11CLmkDbUtils12ChangeIconsLERK6RArrayImE12TLmkItemTypeRK7TDesC16ii @ 30 NONAME
+	_ZN11CLmkDbUtils13CategoryNameLER20CPosLandmarkDatabasem @ 31 NONAME
+	_ZN11CLmkDbUtils13InitializeDbLEv @ 32 NONAME
+	_ZN11CLmkDbUtils15DeleteLandmarkLEmR20CPosLandmarkDatabase @ 33 NONAME
+	_ZN11CLmkDbUtils15RenameCategoryLER7TDesC16mR20CPosLandmarkDatabase @ 34 NONAME
+	_ZN11CLmkDbUtils16AddLmToCategoryLEmmR20CPosLandmarkDatabase @ 35 NONAME
+	_ZN11CLmkDbUtils16DeleteLandmarksLERK6RArrayImE @ 36 NONAME
+	_ZN11CLmkDbUtils17CancelLmOperationEv @ 37 NONAME
+	_ZN11CLmkDbUtils17DeleteCategoriesLERK6RArrayImE @ 38 NONAME
+	_ZN11CLmkDbUtils18AddLmToCategoriesLEmRK6RArrayImE @ 39 NONAME
+	_ZN11CLmkDbUtils19AddDefaultProtocolLEP12CPosLandmark @ 40 NONAME
+	_ZN11CLmkDbUtils19AddLmsToCategoriesLERK6RArrayImES3_ @ 41 NONAME
+	_ZN11CLmkDbUtils22RemoveDefaultProtocolLER6TPtr16 @ 42 NONAME
+	_ZN11CLmkDbUtils23IsLmWithThisFieldExistLEt @ 43 NONAME
+	_ZN11CLmkDbUtils4NewLER20CPosLandmarkDatabaseR23MLmkAOOperationObserveri @ 44 NONAME
+	_ZN11CLmkEncoder14StartEncodingLERK7TDesC16RK13RPointerArrayI12CLmkLandmarkE @ 45 NONAME
+	_ZN11CLmkEncoder14StartEncodingLERK7TDesC16RK6RArrayImE @ 46 NONAME
+	_ZN11CLmkEncoder22CancelEncodeOperationLEv @ 47 NONAME
+	_ZN11CLmkEncoder4NewLER20CPosLandmarkDatabaseR23MLmkAOOperationObserveri @ 48 NONAME
+	_ZN12CLmkLandmark10CategoriesEv @ 49 NONAME
+	_ZN12CLmkLandmark11PosLandmarkEv @ 50 NONAME
+	_ZN12CLmkLandmark4NewLEPK12CPosLandmarkRK13RPointerArrayI20CPosLandmarkCategoryE @ 51 NONAME
+	_ZN12CLmkLandmark4NewLERKS_ @ 52 NONAME
+	_ZN12LmkFileUtils11DeleteFileLERK7TDesC16 @ 53 NONAME
+	_ZN14CLmkUiItemBase12ExtensionIntEv @ 54 NONAME
+	_ZN14CLmkUiItemBase15SetExtensionIntEi @ 55 NONAME
+	_ZN14CLmkUiItemBase18ExtensionIntExistsEv @ 56 NONAME
+	_ZN15CLmkAOOperation14StartOperationEv @ 57 NONAME
+	_ZN15CLmkAOOperation4NewLEP15CPosLmOperationR23MLmkAOOperationObserverNS2_15TOperationTypesEi @ 58 NONAME
+	_ZN15CLmkAOOperationC1EP15CPosLmOperationR23MLmkAOOperationObserverNS2_15TOperationTypesEi @ 59 NONAME
+	_ZN15CLmkAOOperationC2EP15CPosLmOperationR23MLmkAOOperationObserverNS2_15TOperationTypesEi @ 60 NONAME
+	_ZN15CLmkAOOperationD0Ev @ 61 NONAME
+	_ZN15CLmkAOOperationD1Ev @ 62 NONAME
+	_ZN15CLmkAOOperationD2Ev @ 63 NONAME
+	_ZN17CLmkDbSearchUtils13GetLandmarksLEP25MLmkDbSearchUtilsObserver6RArrayImEP13RPointerArrayI12CPosLandmarkE @ 64 NONAME
+	_ZN17CLmkDbSearchUtils16GetCategoryNameLEm @ 65 NONAME
+	_ZN17CLmkDbSearchUtils17GetLandmarkForIdLEm @ 66 NONAME
+	_ZN17CLmkDbSearchUtils26GetLandmarksUnderCategoryLEP25MLmkDbSearchUtilsObserverm @ 67 NONAME
+	_ZN17CLmkDbSearchUtils4NewLEv @ 68 NONAME
+	_ZN17CLmkDbSearchUtilsD0Ev @ 69 NONAME
+	_ZN17CLmkDbSearchUtilsD1Ev @ 70 NONAME
+	_ZN17CLmkDbSearchUtilsD2Ev @ 71 NONAME
+	_ZN19CLmkLocationService11SetObserverER20MLmkLocationObserver @ 72 NONAME
+	_ZN19CLmkLocationService13CancelRequestEv @ 73 NONAME
+	_ZN19CLmkLocationService15CurrentPositionEv @ 74 NONAME
+	_ZN19CLmkLocationService16LocationRequestLEv @ 75 NONAME
+	_ZN19CLmkLocationService19RemoveModelObserverEv @ 76 NONAME
+	_ZN19CLmkLocationService4NewLERK7TDesC16 @ 77 NONAME
+	_ZN20CLmkListProviderBase11SetIconMgrLER19MLmkSelectorIconMgr @ 78 NONAME
+	_ZN20CLmkListProviderBase12AddObserverLER24MLmkListProviderObserver @ 79 NONAME
+	_ZN20CLmkListProviderBase14RemoveObserverER24MLmkListProviderObserver @ 80 NONAME
+	_ZN22LmkListProviderFactory15CreateProviderLER10CLmkParser @ 81 NONAME
+	_ZN22LmkListProviderFactory15CreateProviderLER20CPosLandmarkDatabase16TLmkSelectorType16TLmkProviderType @ 82 NONAME
+	_ZN22LmkListProviderFactory15CreateProviderLER20CPosLandmarkDatabaseR20CPosLmSearchCriteria @ 83 NONAME
+	_ZN26CLmkLandMarkCategoriesName15AddCategoryNameERK7TDesC16 @ 84 NONAME
+	_ZN26CLmkLandMarkCategoriesName16SetCategoryNamesER6RArrayI4TBufILi124EEE @ 85 NONAME
+	_ZN26CLmkLandMarkCategoriesName4NewLERS_ @ 86 NONAME
+	_ZN26CLmkLandMarkCategoriesName4NewLEv @ 87 NONAME
+	_ZNK10CLmkFields10LandmarkIdEv @ 88 NONAME
+	_ZNK22CLmkLmItemListProvider13SelectedIndexEm @ 89 NONAME
+	_ZNK22CLmkLmItemListProvider16SelectedIndexesLERK6RArrayImE @ 90 NONAME
+	_ZNK22CLmkLmItemListProvider17GetSelectedItemIdERmi @ 91 NONAME
+	_ZNK22CLmkLmItemListProvider19GetSelectedIndexesLER9CArrayFixIiERK6RArrayImE @ 92 NONAME
+	_ZNK22CLmkLmItemListProvider19GetSelectedItemIdsLER6RArrayImERK9CArrayFixIiE @ 93 NONAME
+	_ZNK26CLmkLandMarkCategoriesName16GetCategoryNamesER6RArrayI4TBufILi124EEE @ 94 NONAME
+	_ZTI10CLmkFields @ 95 NONAME ; #<TI>#
+	_ZTI10CLmkParser @ 96 NONAME ; #<TI>#
+	_ZTI11CLmkDbUtils @ 97 NONAME ; #<TI>#
+	_ZTI11CLmkEncoder @ 98 NONAME ; #<TI>#
+	_ZTI12CLmkLandmark @ 99 NONAME ; #<TI>#
+	_ZTI13CLmkFieldData @ 100 NONAME ; #<TI>#
+	_ZTI14CLmkUiItemBase @ 101 NONAME ; #<TI>#
+	_ZTI15CLmkAOOperation @ 102 NONAME ; #<TI>#
+	_ZTI17CLmkDbInitializer @ 103 NONAME ; #<TI>#
+	_ZTI17CLmkDbSearchUtils @ 104 NONAME ; #<TI>#
+	_ZTI17CLmkIconOperation @ 105 NONAME ; #<TI>#
+	_ZTI18CLmkCategoryUiItem @ 106 NONAME ; #<TI>#
+	_ZTI18CLmkLandmarkUiItem @ 107 NONAME ; #<TI>#
+	_ZTI19CLmkDbEventListener @ 108 NONAME ; #<TI>#
+	_ZTI19CLmkLocationService @ 109 NONAME ; #<TI>#
+	_ZTI19CLmkParseAllWrapper @ 110 NONAME ; #<TI>#
+	_ZTI20CLmkListProviderBase @ 111 NONAME ; #<TI>#
+	_ZTI21CLmkAddToCatOperation @ 112 NONAME ; #<TI>#
+	_ZTI22CLmkLmItemListProvider @ 113 NONAME ; #<TI>#
+	_ZTI24CLmkCategoryListProvider @ 114 NONAME ; #<TI>#
+	_ZTI24CLmkLandmarkListProvider @ 115 NONAME ; #<TI>#
+	_ZTI24CLmkParsedLmListProvider @ 116 NONAME ; #<TI>#
+	_ZTI26CLmkEventListenerSingleton @ 117 NONAME ; #<TI>#
+	_ZTI26CLmkLandMarkCategoriesName @ 118 NONAME ; #<TI>#
+	_ZTI26CLmkSearchedLmListProvider @ 119 NONAME ; #<TI>#
+	_ZTI28CLmkEncodeUnsavedLandmarksOp @ 120 NONAME ; #<TI>#
+	_ZTV10CLmkFields @ 121 NONAME ; #<VT>#
+	_ZTV10CLmkParser @ 122 NONAME ; #<VT>#
+	_ZTV11CLmkDbUtils @ 123 NONAME ; #<VT>#
+	_ZTV11CLmkEncoder @ 124 NONAME ; #<VT>#
+	_ZTV12CLmkLandmark @ 125 NONAME ; #<VT>#
+	_ZTV13CLmkFieldData @ 126 NONAME ; #<VT>#
+	_ZTV14CLmkUiItemBase @ 127 NONAME ; #<VT>#
+	_ZTV15CLmkAOOperation @ 128 NONAME ; #<VT>#
+	_ZTV17CLmkDbInitializer @ 129 NONAME ; #<VT>#
+	_ZTV17CLmkDbSearchUtils @ 130 NONAME ; #<VT>#
+	_ZTV17CLmkIconOperation @ 131 NONAME ; #<VT>#
+	_ZTV18CLmkCategoryUiItem @ 132 NONAME ; #<VT>#
+	_ZTV18CLmkLandmarkUiItem @ 133 NONAME ; #<VT>#
+	_ZTV19CLmkDbEventListener @ 134 NONAME ; #<VT>#
+	_ZTV19CLmkLocationService @ 135 NONAME ; #<VT>#
+	_ZTV19CLmkParseAllWrapper @ 136 NONAME ; #<VT>#
+	_ZTV20CLmkListProviderBase @ 137 NONAME ; #<VT>#
+	_ZTV21CLmkAddToCatOperation @ 138 NONAME ; #<VT>#
+	_ZTV22CLmkLmItemListProvider @ 139 NONAME ; #<VT>#
+	_ZTV24CLmkCategoryListProvider @ 140 NONAME ; #<VT>#
+	_ZTV24CLmkLandmarkListProvider @ 141 NONAME ; #<VT>#
+	_ZTV24CLmkParsedLmListProvider @ 142 NONAME ; #<VT>#
+	_ZTV26CLmkEventListenerSingleton @ 143 NONAME ; #<VT>#
+	_ZTV26CLmkLandMarkCategoriesName @ 144 NONAME ; #<VT>#
+	_ZTV26CLmkSearchedLmListProvider @ 145 NONAME ; #<VT>#
+	_ZTV28CLmkEncodeUnsavedLandmarksOp @ 146 NONAME ; #<VT>#
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/engine/group/LmkEng.mmp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,111 @@
+/*
+* 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:    LandmarksUi Content File -    
+*
+*/
+
+
+
+
+
+
+
+
+
+// INCLUDES
+// To get the APP_LAYER_SYSTEMINCLUDE-definition
+#include <platform_paths.hrh>
+#include "../../inc/LmkUID.h"         // Common Landmarks UID definitions
+#include "../../inc/LmkDebugConfig.h" // Debug configuration
+
+// Target information
+TARGET  LmkEng.dll
+TARGETTYPE  dll
+UID  0x0 KLmkEngUID3
+
+VENDORID    VID_DEFAULT
+
+CAPABILITY CAP_GENERAL_DLL
+
+//exportunfrozen 
+
+// Project source directory
+SOURCEPATH ../src
+
+// Source files
+SOURCE DllMain.cpp
+SOURCE CLmkListProviderBase.cpp
+SOURCE CLmkLmItemListProvider.cpp
+SOURCE CLmkCategoryListProvider.cpp
+SOURCE CLmkLandmarkListProvider.cpp
+SOURCE CLmkSearchedLmListProvider.cpp
+SOURCE CLmkCategoryUiItem.cpp
+SOURCE CLmkLandmarkUiItem.cpp
+SOURCE CLmkAOOperation.cpp
+SOURCE CLmkIconOperation.cpp
+SOURCE CLmkAddToCatOperation.cpp
+SOURCE CLmkEventListenerSingleton.cpp
+SOURCE CLmkDbEventListener.cpp
+SOURCE LmkListProviderFactory.cpp
+SOURCE CLmkUiItemBase.cpp
+SOURCE CLmkFields.cpp
+SOURCE CLmkFieldData.cpp
+SOURCE CLmkDbUtils.cpp
+SOURCE CLmkLocationService.cpp
+SOURCE CLmkEncoder.cpp
+SOURCE CLmkParser.cpp
+SOURCE CLmkParsedLmListProvider.cpp
+SOURCE CLmkParseAllWrapper.cpp
+SOURCE CLmkDbInitializer.cpp
+SOURCE LmkFileUtils.cpp
+SOURCE CLmkLandMarkCategoriesName.cpp
+SOURCE clmkdbsearchutils.cpp
+SOURCE CLmkEncodeUnsavedLandmarksOp.cpp
+SOURCE CLmkLandmark.cpp
+SOURCE Debug.cpp
+
+// Language
+LANGUAGE_IDS
+
+// Userincludes
+USERINCLUDE . ../inc ../src ../../inc
+
+// Default system include paths for application layer modules.
+APP_LAYER_SYSTEMINCLUDE
+
+LIBRARY euser.lib efsrv.lib cone.lib
+LIBRARY bafl.lib 
+
+//Added for package name support 
+LIBRARY eikcoctl.lib avkon.lib eikdlg.lib eikctl.lib
+LIBRARY commonengine.lib egul.lib fbscli.lib 
+
+// For Sysutils
+LIBRARY SYSUTIL.LIB
+
+LIBRARY eposlandmarks.lib eposlmsearchlib.lib
+LIBRARY Lbs.lib
+
+//For different MIME Type support
+LIBRARY apgrfx.lib apmime.lib
+#ifdef __LMK_DEBUG_FLAG
+LIBRARY flogger.lib
+#endif
+
+
+#if defined(WINS)
+ deffile   ../bwins/LMKENGU_32.def
+#elif defined(EABI)
+ deffile   ../eabi/LMKENGU_32.def
+#endif 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/engine/group/bld.inf	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,32 @@
+/*
+* 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:    LandmarksUi Content File -    
+*	 This file provides the information required for building the
+*    	 whole of a Landmarks application.
+*
+*/
+
+
+
+
+
+
+
+
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_MMPFILES
+LmkEng.mmp
+//  End of File  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/engine/inc/CLmkAOOperation.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,119 @@
+/*
+* 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:   	LandmarksUi Content File
+*				Handle active object operations
+*
+*/
+
+
+
+
+
+
+
+
+#ifndef CLMKAOOPERATION_H
+#define CLMKAOOPERATION_H
+
+//  INCLUDES
+#include "MLmkAOOperationObserver.h"
+#include <e32base.h>        // CBase
+
+
+// FORWARD DECLARATIONS
+class CPosLmOperation;
+class MLmkAOOperationObserver;
+class TOperationTypes;
+
+// CLASS DECLARATION
+
+/**
+* CLmkAOOperation class
+*/
+class CLmkAOOperation : public CActive
+    {
+    public:  // Constructors and destructor
+        /**
+        * Constructor
+        * @param aLmOperation
+        * @param aObserver
+        * @param aType
+        * @param aProgressNote
+        * @return newly instantiated object
+        */
+        IMPORT_C static CLmkAOOperation* NewL(
+                            CPosLmOperation* aLmOperation,
+                            MLmkAOOperationObserver& aObserver,
+                            MLmkAOOperationObserver::TOperationTypes aType,
+                            TBool aProgressNote );
+
+        /**
+        * Destructor.
+        */
+        IMPORT_C ~CLmkAOOperation();
+
+    public: // New methods
+        /**
+        * Start AO operation
+        *
+        */
+        IMPORT_C void StartOperation();
+
+        /**
+        * Stop AO operation
+        *
+        */
+		IMPORT_C void StopOperation();
+
+    private: // From CActive
+        void RunL();
+        void DoCancel();
+
+    protected:  // Constructors and destructor
+        /**
+        * C++ constructor.
+        * @param aLmOperation
+        * @param aObserver
+        * @param aType
+        * @param aProgressNote
+        * @return newly instantiated object
+        */
+        IMPORT_C CLmkAOOperation( CPosLmOperation* aLmOperation,
+                         MLmkAOOperationObserver& aObserver,
+                         MLmkAOOperationObserver::TOperationTypes aType,
+                         TBool aProgressNote );
+
+        /**
+        * By default Symbian 2nd phase constructor is private.
+        */
+        void ConstructL();
+
+    protected:    // Data
+        TReal32 iProgress;
+
+        ///Own:
+        CPosLmOperation* iLmOperation;
+
+        MLmkAOOperationObserver& iObserver;
+
+        MLmkAOOperationObserver::TOperationTypes iType;
+
+        TBool iProgressNote;
+        RTimer iTimer;
+        TBool  iIsTimerSet;
+    };
+
+#endif      // CLMKAOOPERATION_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/engine/inc/CLmkAddToCatOperation.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,135 @@
+/*
+* 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:   	LandmarksUi Content File
+*				This class provides functionality for adding multiple
+*               landmarks to multiple categories in one asynchronous
+*               operation.
+*
+*/
+
+
+
+
+
+
+
+
+#ifndef CLMKADDTOCATOPERATION_H
+#define CLMKADDTOCATOPERATION_H
+
+//  INCLUDES
+#include "MLmkAOOperationObserver.h"
+#include <EPos_CPosLmOperation.h>
+#include <EPos_Landmarks.h>
+
+// FORWARD DECLARATIONS
+class CPosLmCategoryManager;
+
+// CLASS DECLARATION
+
+/**
+* CLmkAddToCatOperation class.
+* This class provides functionality for adding multiple landmarks to
+* multiple categories in one asynchronous operation. It is done by chaining
+* multiple CPosLmCategoryManager::AddCategoryToLandmarksL() operations.
+*/
+class CLmkAddToCatOperation
+: public CPosLmOperation,
+  public MLmkAOOperationObserver
+    {
+    public:  // Constructors and destructor
+        /**
+        * Creates CLmkAddToCatOperation
+        * @param aCategoryMgr
+        * @param aLandmarkIdArray
+        * @param aCategoryIdArray
+        * @return newly instantiated object
+        */
+        static CLmkAddToCatOperation* NewL(
+                            CPosLmCategoryManager& aCategoryMgr,
+                            const RArray<TPosLmItemId>& aLandmarkIdArray,
+                            const RArray<TPosLmItemId>& aCategoryIdArray );
+
+        /**
+        * Creates CLmkAddToCatOperation
+        * @param aCategoryMgr
+        * @param aLandmarkId
+        * @param aCategoryIdArray
+        * @return newly instantiated object
+        */
+        static CLmkAddToCatOperation* NewL(
+                            CPosLmCategoryManager& aCategoryMgr,
+                            TPosLmItemId aLandmarkId,
+                            const RArray<TPosLmItemId>& aCategoryIdArray );
+
+        /**
+        * Destructor.
+        */
+        ~CLmkAddToCatOperation();
+
+    public: // From CPosLmOperation
+        void NextStep( TRequestStatus& aStatus, TReal32& aProgress );
+        void ExecuteL();
+
+    protected: // From MLmkAOOperationObserver
+        void HandleOperationL( TOperationTypes aType,
+                              TReal32 aProgress,
+                              TInt aStatus );
+
+    protected:  // Constructors and destructor
+        /**
+        * C++ constructor.
+        * @param aCategoryMgr
+        * @return newly instantiated object
+        */
+        CLmkAddToCatOperation( CPosLmCategoryManager& aCategoryMgr );
+
+        /**
+        * By default Symbian 2nd phase constructor is private.
+        * @param aLandmarkIdArray
+        * @param aCategoryIdArray
+        */
+        void ConstructL( const RArray<TPosLmItemId>& aLandmarkIdArray,
+                         const RArray<TPosLmItemId>& aCategoryIdArray );
+
+    private: //new functions
+        /**
+        * Internal helper method which performs one
+        * CPosLmCategoryManager::AddCategoryToLandmarksL() operation.
+        * @param aCategoryId
+        */
+        void DoAddToCatStepL( TPosLmItemId aCategoryId );
+
+    private:    // Data
+        RArray<TPosLmItemId> iLmIdArray;
+
+        RArray<TPosLmItemId> iCatIdArray;
+
+        CPosLmCategoryManager& iCategoryMgr;
+
+        TInt iCurrentIndex;
+
+        ///Ref:
+        TRequestStatus* iStatus;
+
+        ///Ref:
+        TReal32* iProgress;
+
+        ///Own:
+        CLmkAOOperation* iAddOperation;
+    };
+
+#endif      // CLMKADDTOCATOPERATION_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/engine/inc/CLmkCategoryListProvider.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,154 @@
+/*
+* 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:    LandmarksUi Content File -    Category list provider
+*
+*/
+
+
+
+
+
+
+
+
+#ifndef CLMKCATEGORYLISTPROVIDER_H
+#define CLMKCATEGORYLISTPROVIDER_H
+
+//  INCLUDES
+#include "CLmkLmItemListProvider.h"
+#include "LmkListProviderFactory.h"
+
+// FORWARD DECLARATIONS
+class CPosLmCategoryManager;
+class CPosLandmarkCategory;
+
+/********************************/
+class CPosLandmarkSearch;
+class CPosLmOperation;
+class CPosLmCategoryCriteria;
+/********************************/
+
+// CLASS DECLARATION
+
+
+
+/**
+* CLmkCategoryListProvider class
+*/
+class CLmkCategoryListProvider : public CLmkLmItemListProvider
+    {
+    public:  // Constructors and destructor
+        /**
+        * Creates a provider for all items in the database.
+        * @param aDb landmark database reference
+        * @param aShowType determines whether non-referenced
+        *        categories are considered or not
+        * @return newly instantiated object
+        */
+        static CLmkCategoryListProvider* NewL( CPosLandmarkDatabase& aDb,
+                                               TLmkProviderType aShowType );
+
+        /**
+        * Destructor.
+        */
+        ~CLmkCategoryListProvider();
+
+    public: // From CLmkListProviderBase
+        CLmkUiItemBase* ItemAtL( TInt aIndex );
+
+    public: // From MLmkDbObserver
+        void HandleDatabaseEvent( TPosLmEvent& aEvent );
+
+    protected: // From CLmkLmItemListProvider
+        void PrepareListL();
+        TBool PrepareListL(const TDesC& aSearchPattern,
+    							TBool aSearchOnlyInPreviousMatches);
+        void RemoveLandmarksL(const RArray<TPosLmItemId>& aSelectedItems ) ;
+
+    private:  // Constructors and destructor
+        /**
+        * C++ constructor.
+        * @param aDb
+        * @param aShowType
+        * @return newly instantiated object
+        */
+        CLmkCategoryListProvider( CPosLandmarkDatabase& aDb,
+                                  TLmkProviderType aShowType );
+
+        /**
+        * By default Symbian 2nd phase constructor is private.
+        */
+        void ConstructL();
+
+    private: //new functions
+        /**
+        * Make category usage list
+        */
+        void PrepareCategoryUsageListL();
+
+        /**
+         * Check is category used or not
+         * @param aCategory, list item category
+         * @return TBool
+         */
+        TBool IsUsedL( CPosLandmarkCategory& aCategory );
+
+
+/******************************************************/
+     protected: // From MLmkAOOperationObserver
+        void HandleOperationL( TOperationTypes aType,
+                              TReal32 aProgress,
+                              TInt aStatus );
+
+
+	/**
+        * Read items to array
+        */
+        void ReadItemsToArrayL();
+/******************************************************/
+
+
+
+    private:    // Data
+        ///Own:
+        CPosLmCategoryManager* iCategoryMgr;
+
+        TLmkProviderType iShowType;
+
+        // category usage id list
+        RArray<TPosLmItemId> iUsageArray;
+
+        // index
+        TInt iUsageIndex;
+
+		// are any uncategorised items in database
+		TBool iAreUncategorisedItems;
+
+/************************************************/
+  ///Own:
+        CPosLandmarkSearch* iSearch;
+
+        ///Own:
+        CLmkAOOperation* iSearchAO;
+
+        CPosLmCategoryCriteria* iCriteria;
+
+/************************************************/
+
+
+    };
+
+#endif      // CLMKCATEGORYLISTPROVIDER_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/engine/inc/CLmkCategoryUiItem.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,88 @@
+/*
+* 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:    LandmarksUi Content File -    Category ui item
+*
+*/
+
+
+
+
+
+
+
+
+#ifndef CLMKCATEGORYUIITEM_H
+#define CLMKCATEGORYUIITEM_H
+
+//  INCLUDES
+#include "CLmkUiItemBase.h"
+
+// FORWARD DECLARATIONS
+class CPosLandmarkCategory;
+
+// CLASS DECLARATION
+
+/**
+* CLmkCategoryUiItem class
+*/
+class CLmkCategoryUiItem : public CLmkUiItemBase
+    {
+    public:  // Constructors and destructor
+
+        /**
+        * Create CLmkCategoryUiItem object
+        * @param aCategory
+        * @param aIconListIndex
+        * @return newly instantiated object
+        */
+        static CLmkCategoryUiItem* NewL( CPosLandmarkCategory* aCategory,
+                                         TInt aIconListIndex );
+
+        /**
+        * Destructor.
+        */
+        ~CLmkCategoryUiItem();
+
+    public: // From CLmkUiItemBase
+        TLmkItemType Type();
+        TPtrC Text();
+        TInt GetIconId();
+
+    private:  // Constructors and destructor
+        /**
+        * C++ default constructor.
+        * @param aCategory
+        * @param aIconListIndex
+        * @return newly instantiated object
+        */
+        CLmkCategoryUiItem( CPosLandmarkCategory* aCategory,
+                            TInt aIconListIndex );
+
+        /**
+        * By default Symbian 2nd phase constructor is private.
+        */
+        void ConstructL();
+
+    private:    // Data
+        ///Own:
+        CPosLandmarkCategory* iCategory;
+
+        TInt iIconListIndex;
+
+        TPtrC iText;
+    };
+
+#endif      // CLMKCATEGORYUIITEM_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/engine/inc/CLmkDbEventListener.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,114 @@
+/*
+* 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:    LandmarksUi Content File -    Database event listener.
+*
+*/
+
+
+
+
+
+
+
+
+#ifndef CLMKDBEVENTLISTENER_H
+#define CLMKDBEVENTLISTENER_H
+
+//  INCLUDES
+#include "EPos_Landmarks.h"
+#include <e32base.h>
+
+// FORWARD DECLARATIONS
+class CPosLandmarkDatabase;
+class MLmkDbObserver;
+
+// CLASS DECLARATION
+
+/**
+*  This class is not meant for direct usage, use CLmkEventListenerSingleton
+*  instead.
+*  This class is associated to a database since adding the first observer,
+*  until removing last observer. It is user's responsibility to remove all
+*  added observers.
+*/
+class CLmkDbEventListener : public CActive
+    {
+    public:  // Constructors and destructor
+        /**
+        * Create CLmkDbEventListener object
+        * @return newly instantiated object
+        */
+        static CLmkDbEventListener* NewL();
+
+        /**
+        * Destructor.
+        */
+        ~CLmkDbEventListener();
+
+    public: // New methods
+
+        /**
+        * Only one database currently supported, leaves with
+        * KErrNotSupported if aDb differs from already used db.
+        * @param aObserver
+        * @param aDb
+        */
+        void AddObserverL( MLmkDbObserver& aObserver,
+                           CPosLandmarkDatabase& aDb );
+
+        /**
+        * Remove observer
+        * @param aObserver
+        */
+        void RemoveObserver( MLmkDbObserver& aObserver );
+
+    protected: // New methods
+        /**
+        * Start listening
+        */
+        void StartListening();
+
+    protected: // From CActive
+        void RunL();
+        void DoCancel();
+
+    protected:  // Constructors and destructor
+        /**
+        * C++ default constructor.
+        * @return newly instantiated object
+        */
+        CLmkDbEventListener();
+
+        /**
+        * Symbian 2nd phase constructor
+        */
+        void ConstructL();
+
+    private:    // Data
+
+        TPosLmEvent iEvent;
+
+        ///Ref:
+        CPosLandmarkDatabase* iDb;
+
+        ///Own:
+        HBufC* iDbURI;
+
+        ///Ref:
+        RPointerArray<MLmkDbObserver> iObservers;
+    };
+
+#endif      // CLMKDBEVENTLISTENER_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/engine/inc/CLmkDbInitializer.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,108 @@
+/*
+* Copyright (c) 2004-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:    LandmarksUi Content File -    This class wraps functionality related to landmark database
+*                initialization into a simpler interface.
+*
+*/
+
+
+
+
+
+
+
+#ifndef CLMKDBINITIALIZER_H
+#define CLMKDBINITIALIZER_H
+
+//  INCLUDES
+#include "MLmkAOOperationObserver.h"
+
+// FORWARD DECLARATIONS
+class CLmkDbUtils;
+class CPosLandmarkDatabase;
+
+// CLASS DECLARATION
+/**
+ * This class wraps landmark database initialization and compacting
+ * into a simple helper class.
+ * The database initialization and the database compaction operations
+ * are performed in executing two methods of CPosLandmarkDatabase class
+ * asynchronously
+ */
+class CLmkDbInitializer : public CBase, public MLmkAOOperationObserver
+    {
+	public:  // Constructors and destructor
+
+		/**
+		* Create CLmkDbInitializer object
+        * @param aDb - landmark database which needs to be initialized
+        * @param aObserver - caller class/object which sets itself as observer to
+        *                  the CLmkDbInitializer class
+        * @param aProgressNote - Note showing the progress of database initialise
+        *					   operation
+		* @return newly instantiated object
+		*/
+		static CLmkDbInitializer* NewL( CPosLandmarkDatabase& aDb,
+                                        MLmkAOOperationObserver& aObserver,
+                                        TBool aProgressNote );
+
+		/**
+		* Destructor. Cancels possibly ongoing operation.
+		*/
+		~CLmkDbInitializer();
+
+    public: // New functions
+        /**
+        * Start the database initialize followed by the compact operation
+        * This is done in two asynchronous calls, one for initialize and the other
+        * for compacting
+        */
+        void StartInitAndCompactL();
+
+    protected: //from MLmkAOOperationObserver
+        void HandleOperationL( TOperationTypes aType,
+                               TReal32 aProgress,
+                               TInt aStatus );
+
+    private:  // Constructors and destructor
+        /**
+        * C++ default constructor.
+        * @param aObserver - caller class or object setting itself as observer
+        *                    for this class
+        * @param aProgressNote -- Note showing the progress of the database
+        *                         initialize operation
+        * @return newly instantiated object
+        */
+        CLmkDbInitializer( MLmkAOOperationObserver& aObserver,
+                           TBool aProgressNote );
+
+        /**
+		* By default Symbian 2nd phase constructor is private.
+        * @param aDb
+		*/
+        void ConstructL( CPosLandmarkDatabase& aDb );
+
+    private:    // Data
+        ///Ref:
+        MLmkAOOperationObserver& iObserver;
+
+        ///Own:
+        CLmkDbUtils* iDbUtils;
+
+        TBool iProgressNote;
+    };
+
+#endif      // CLMKDBINITIALIZER_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/engine/inc/CLmkDbUtils.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,293 @@
+/*
+* Copyright (c) 2002-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:    LandmarksUi Content File -    This class provides utility methods for performing
+*                landmark database related operations like adding, deleting
+*                or updating a landmark and category etc.
+*
+*/
+
+
+
+
+
+
+
+#ifndef CLMKDBUTILS_H
+#define CLMKDBUTILS_H
+
+//  INCLUDES
+#include <lbsfields.h>
+#include <EPos_Landmarks.h>
+#include "landmarks.hrh"
+#include "MLmkAOOperationObserver.h"
+
+// FORWARD DECLARATIONS
+class CPosLandmarkCategory;
+class CPosLandmarkDatabase;
+class CPosLmCategoryManager;
+class CPosLmOperation;
+class CPosLandmark;
+
+// CLASS DECLARATION
+/**
+* This class provides utility methods for performing operations related to
+* landmark database.
+*
+* Typical operations can be adding, deleting or updating landmark
+* and creating a new category or renaming a category etc.
+*
+* All the methods of this class except InitializeDbL() assume that the database
+* is opened and initialized.
+*/
+
+class CLmkDbUtils : public CBase, public MLmkAOOperationObserver
+    {
+	public:  // Constructors and destructor
+		/**
+		* Create CLmkDbUtils object
+        * @param aDb -- landmark database which needs to be accessed via this class
+        * @param aObserver -- calling class or object as observer for this class
+        * @aProgressNote - Note showing the progress of landmark database related
+        *                  operations
+		* @return newly instantiated object
+		*/
+		IMPORT_C static CLmkDbUtils* NewL( CPosLandmarkDatabase& aDb,
+                                           MLmkAOOperationObserver& aObserver,
+                                           TBool aProgressNote );
+
+		/**
+		* Destructor.
+		*/
+		~CLmkDbUtils();
+
+    private:  // Constructors and destructor
+        /**
+        * C++ default constructor.
+        * @param aDb -- landmark database
+        * @param aObserver -- calling class passing itself as observer of this class
+        * @param aProgressNote -- Note showing the progress of landmark database operations
+        * @return newly instantiated object
+        */
+        CLmkDbUtils( CPosLandmarkDatabase& aDb,
+                     MLmkAOOperationObserver& aObserver,
+                     TBool aProgressNote );
+
+        /**
+		* By default Symbian 2nd phase constructor is private.
+		*/
+        void ConstructL();
+
+    protected: //from MLmkAOOperationObserver
+        void HandleOperationL( TOperationTypes aType,
+                               TReal32 aProgress,
+                               TInt aStatus );
+
+    public: // New functions
+
+        /**
+        * Initializes landmark database.
+        * This operation is asynchronous
+        */
+        IMPORT_C void InitializeDbL();
+
+        /**
+        * Compacts landmark database
+        * This operation is asynchronous
+        */
+        IMPORT_C void CompactDbL();
+
+        /**
+        * Adds a new category to landmark database
+        * This call is a synchronous one
+        *
+        * @param aCategory -- category which needs to be added to database
+        * @param aDb       -- landmark database to which category needs to be added
+        */
+        IMPORT_C static void AddCategoryL( CPosLandmarkCategory& aCategory,
+                                           CPosLandmarkDatabase& aDb );
+
+        /**
+        * Rename category
+        * This call is synchronous
+        * @param aCategoryName -- name of the category which needs to be renamed
+        * @param aId           -- Unique identfier of the category in the database
+        * @param aDb           -- handle to landmark database
+        */
+        IMPORT_C static void RenameCategoryL( TDesC& aCategoryName,
+                                              TPosLmItemId aId,
+                                              CPosLandmarkDatabase& aDb );
+
+        /**
+        * Get category name given category and this call is synchronous
+        * @param aDb Handle to landmark database
+        * @param aCategoryId Identifier of the category in database whose
+        * @return aCategoryName
+        */
+        IMPORT_C static HBufC* CategoryNameL(
+                                    CPosLandmarkDatabase& aDb,
+                                    TPosLmItemId  aCategoryId );
+
+        /**
+        * Change the icon of category or landmark
+        * This call is synchronous
+        * @param aDb handle to landmark database
+        * @param aId Identifier of the landmark or category whose icon needs to be changed
+        * @param aItemType type of database item (landmark or category)
+        * @param aMbmFileName Icon file name
+        * @param aIconIndex Index of the icon in the icon file
+        * @param aMaskIndex Index of icon mask in the icon file
+        */
+        IMPORT_C static void ChangeIconL( CPosLandmarkDatabase& aDb,
+                                          const TPosLmItemId aId,
+                                          TLmkItemType aItemType,
+                                          const TDesC& aMbmFileName,
+                                          TInt aIconIndex, TInt aMaskIndex);
+
+        /**
+        * Change multiple item's icon
+        * This is a asynchronous call
+        * @param aIdArray Array of landmark database items whose icon needs to be changed
+        * @param aItemsType Landmark or category
+        * @param aMbmFileName name of icon file
+        * @param aIconIndex Index of the icon inside the icon file
+        * @param aMaskIndex Index of icon mask inside the icon file
+        */
+        IMPORT_C void ChangeIconsL(
+                                const RArray<TPosLmItemId>& aIdArray,
+                                TLmkItemType aItemsType,
+                                const TDesC& aMbmFileName,
+                                TInt aIconIndex, TInt aMaskIndex);
+
+        /**
+        * Delete categories from landmark database
+        * This is asynchronous method
+        * @param aCategoryIdArray Array containing categories to be deleted
+        */
+        IMPORT_C void DeleteCategoriesL(
+                                const RArray<TPosLmItemId>& aCategoryIdArray );
+
+        /**
+        * Delete a single landmark from database
+        * This is a synchronous method
+        * @param aId Identifier of landmark to be deleted
+        * @param aDb Handle to landmark database
+        */
+        IMPORT_C static void DeleteLandmarkL( TPosLmItemId aId,
+                                              CPosLandmarkDatabase& aDb );
+
+        /**
+        * Delete a set of selected landmarks from landmark database
+        * This is an Asynchronous method
+        * @param aLandmarkIdArray Array containing the landmarks to be deleted
+        */
+        IMPORT_C void DeleteLandmarksL(
+                                const RArray<TPosLmItemId>& aLandmarkIdArray );
+
+        /**
+        * Adds a landmark to a category
+        * This is  synchronous
+        * @param aLandmarkId Identifier of landmark
+        * @param aCategoryId Identifier of category
+        * @param aDb
+        */
+        IMPORT_C static void AddLmToCategoryL( TPosLmItemId aLandmarkId,
+                                               TPosLmItemId aCategoryId,
+                                               CPosLandmarkDatabase& aDb );
+
+        /**
+        * Adds a single landmark to a set of selected categories
+        * This is asynchronous call
+        * @param aLandmarkId Unique identifier of landmark which need to be added to set of categories
+        * @param aCategoryIdArray Array containing categories
+        */
+        IMPORT_C void AddLmToCategoriesL(
+                                TPosLmItemId aLandmarkId,
+                                const RArray<TPosLmItemId>& aCategoryIdArray );
+
+        /**
+        * Adds  multiple landmarks to one or more categories
+        * This is an asynchronous call
+        * @param aLandmarkIdArray Array of landmarks which need to be added to given categries
+        * @param aCategoryIdArray Array of categories
+        */
+        IMPORT_C void AddLmsToCategoriesL(
+                                const RArray<TPosLmItemId>& aLandmarkIdArray,
+                                const RArray<TPosLmItemId>& aCategoryIdArray );
+
+        /**
+        * Cancel landmark database related operation
+        * This cancels the Active Object created for landmark database related operation
+        */
+        IMPORT_C void CancelLmOperation();
+
+        /**
+        * It returns the category id,if given name
+        */
+    	IMPORT_C  TPosLmItemId CategoryIdL(CPosLandmarkDatabase& aDb, const TDesC&  aCategoryName );
+
+		/**
+        * Checks if this field exists in the landmark.
+        */
+		IMPORT_C TBool IsLmWithThisFieldExistL( TPositionFieldId  aFieldId);
+
+		/**
+        * Checks, if the url value is >150 , it trims the protocol
+        * since it assumes,that the protocol is appended by the sender
+        * @param landmark The landmark, from which the url field value
+        *                 to be trimmed.
+        */
+		IMPORT_C static void RemoveDefaultProtocolL(TPtr& aWebUrl);
+		/*
+		* This function, appends the default protocol, if it is missing
+		* from the url.
+		*/
+		IMPORT_C static void AddDefaultProtocolL(CPosLandmark* landmark);
+
+    private:  // New functions
+        /**
+        * This call checks if an Active Object is already running or not
+        * Leaves if an Active Object is already running
+        */
+        void LeaveIfInUseL();
+
+        /**
+        * Helper method. It pushes the aOperation to the cleanup
+        * stack as the first step, so caller does not have to do it.
+        * @param aOperation, ownership is transferred
+        * @param aOpType
+        */
+        void SetupAndStartOperationL(
+                            CPosLmOperation* aOperation,
+                            MLmkAOOperationObserver::TOperationTypes aOpType );
+
+
+    private:    // Data
+        ///Ref:
+        CPosLandmarkDatabase& iDb;
+
+        ///Ref:
+        MLmkAOOperationObserver* iObserver;
+
+        TBool iProgressNote;
+
+        ///Own:
+        CLmkAOOperation* iAOOperation;
+
+        ///Own:
+        CPosLmCategoryManager* iCategoryMgr;
+    };
+
+#endif      // CLMKDBUTILS_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/engine/inc/CLmkEncodeUnsavedLandmarksOp.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,122 @@
+/*
+* 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:    LandmarksUi Content File -    This class provides functionality of encoding landmarks
+*                both saved and unsaved landmarks (In Landmarks DB).
+*
+*/
+
+
+
+
+
+
+
+
+#ifndef CLMKENCODEUNSAVEDLANDMARKSOP_H
+#define CLMKENCODEUNSAVEDLANDMARKSOP_H
+
+//  INCLUDES
+#include "MLmkAOOperationObserver.h"
+#include <EPos_CPosLmOperation.h>
+#include <EPos_Landmarks.h>
+#include "CLmkParser.h"
+#include <EPos_CPosLandmarkEncoder.h>
+#include <EPos_CPosLandmarkDatabase.h>
+#include "CLmkLandmark.h"
+
+
+// CLASS DECLARATION
+
+/**
+* CLmkEncodeUnsavedLandmarksOp class.
+* This class does landmarks encoding operations.
+* Though there is already one operation's class which does this in the
+* landmarks engine framework, but that class does the encoding for only those
+* landmarks which existis in landmarks database, but this class is does not
+* requires any landmarks database assistance, it independently encodes the
+* landmarks to xml format.
+*/
+class CLmkEncodeUnsavedLandmarksOp
+: public CPosLmOperation
+    {
+    public:  // Constructors and destructor
+        /**
+        * Creates CLmkEncodeUnsavedLandmarksOp
+        * @param aLandmarkEncoder
+        * @param aLandmarks
+        * @param aTransferOptions
+        * @return newly instantiated object
+        */
+        static CLmkEncodeUnsavedLandmarksOp* NewL(
+                     CPosLandmarkEncoder&  aLandmarkEncoder,
+                     const RPointerArray<CLmkLandmark>&  aLandmarks,
+                     CPosLandmarkDatabase::TTransferOptions  aTransferOptions);
+        /**
+        * Destructor.
+        */
+        ~CLmkEncodeUnsavedLandmarksOp();
+
+    public: // From CPosLmOperation
+        void NextStep( TRequestStatus& aStatus, TReal32& aProgress );
+        void ExecuteL();
+
+    protected:  // Constructors and destructor
+        /**
+        * C++ constructor.
+        */
+        CLmkEncodeUnsavedLandmarksOp(
+                      CPosLandmarkEncoder&  aLandmarkEncoder,
+                      CPosLandmarkDatabase::TTransferOptions  aTransferOptions);
+
+        /**
+        * By default Symbian 2nd phase constructor is private.
+        * @param aLandmarks
+        */
+        void ConstructL( const RPointerArray<CLmkLandmark>&  aLandmarks );
+
+    private:    // Data
+
+        ///Ref:
+        TRequestStatus* iStatus;
+
+        ///Ref:
+        TReal32* iProgress;
+
+        CPosLandmarkEncoder&  iEncoder;
+
+        RPointerArray<CLmkLandmark> iLandmarks;
+
+        CPosLandmarkDatabase::TTransferOptions iTransferOptions;
+
+        TBool iCurrentIsLm;
+
+        // Item list with categories to export.
+        RArray<TPosLmItemId> iCategoryIdArray;
+
+        // Item list with categories to export.
+        RPointerArray<CPosLandmarkCategory> iCategories;
+
+        // The current category handled in the id array.
+        TInt iCurrentCategory;
+
+        TInt iNrOfSubOperations;
+
+        TInt iStatusFlag;
+
+        TInt iCurrentLm;
+    };
+
+#endif      // CLMKENCODEUNSAVEDLANDMARKSOP_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/engine/inc/CLmkEncoder.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,161 @@
+/*
+* 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:    LandmarksUi Content File -    This class wraps functionality related to landmark encoding into
+*                a simpler interface.
+*
+*/
+
+
+
+
+
+
+
+#ifndef CLMKENCODER_H
+#define CLMKENCODER_H
+
+//  INCLUDES
+#include <EPos_Landmarks.h>
+#include "MLmkAOOperationObserver.h"
+#include "CLmkLandmark.h"
+
+
+// FORWARD DECLARATIONS
+class CPosLandmarkEncoder;
+class CPosLandmarkDatabase;
+class CLmkAOOperation;
+class CPosLandmark;
+
+// CLASS DECLARATION
+/**
+ * This class wraps functionality related to landmark encoding into
+ * a simpler interface.
+ */
+class CLmkEncoder : public CBase, public MLmkAOOperationObserver
+    {
+	public:  // Constructors and destructor
+
+		/**
+		* Create CLmkEncoder object
+        * @param aDb landmark database
+        * @param aObserver calling class setting itself as observer to this class
+        * @param aProgressNote Note to show the progress of encoding operation
+		* @return newly instantiated object
+		*/
+		IMPORT_C static CLmkEncoder* NewL( CPosLandmarkDatabase& aDb,
+                                           MLmkAOOperationObserver& aObserver,
+                                           TBool aProgressNote );
+
+		/**
+		* Destructor.
+		*/
+		~CLmkEncoder();
+
+    protected: //from MLmkAOOperationObserver
+        void HandleOperationL( TOperationTypes aType,
+                               TReal32 aProgress,
+                               TInt aStatus );
+
+    public: // New functions
+        /**
+        * Set package name
+        * @param aName
+        */
+        //IMPORT_C void SetPackageNameL( const TDesC& aName );
+
+        /**
+        * Start encoding package. Possibly existing file is deleted first.
+        * @param aFile where parsed data is stored
+        * @param aLandmarkIdArray
+        */
+        IMPORT_C void StartEncodingL( const TDesC& aFile,
+                        const RArray<TPosLmItemId>& aLandmarkIdArray );
+
+        /**
+        * Start encoding package. Possibly existing file is deleted first.
+        * This API can also be used for encoding unsaved landmarks
+        * @param aFile where parsed data is stored
+        * @param aLandmarks
+        */
+        IMPORT_C void StartEncodingL(const TDesC& aFileName,
+                    	const RPointerArray<CLmkLandmark>& aLandmarks );
+
+        /**
+        * Cancel encode operation
+        */
+        IMPORT_C void CancelEncodeOperationL();
+
+    private:  // New functions
+    	/**
+        * This function is used for setting the name for landmarks package
+        * @param aName Name to be set for landmarks package
+        */
+    	void SetPackageNameL( const TDesC& aName );
+
+        /**
+        * Finalize the encode process. It uses the Landmarks Framework method
+        * to signal the finalizing the encode process.
+        */
+        void FinalizeEncodingL();
+
+        /**
+        * Checks if any Active Object is already running. This is used whenever
+        * a new Active Object operation is started.
+        */
+        void LeaveIfInUseL();
+
+        /**
+        * Instantiates iEncoder & prepares file to which encoded data is written.
+        */
+        void PrepareEncoderL(const TDesC& aFileName);
+
+    private:  // Constructors and destructor
+        /**
+        * C++ default constructor.
+        * @param aDb landmark database
+        * @param aObserver calling class sets itself as the observer to this class
+        * @param aProgressNote Note to show the progress of landmark encoding process
+        * @return newly instantiated object
+        */
+        CLmkEncoder( CPosLandmarkDatabase& aDb,
+                    MLmkAOOperationObserver& aObserver,
+                    TBool aProgressNote );
+
+        /**
+		* By default Symbian 2nd phase constructor is private.
+        * @param aFile
+		*/
+        void ConstructL();
+
+    private:    // Data
+        ///Ref:
+        CPosLandmarkDatabase& iDb;
+
+        ///Ref:
+        MLmkAOOperationObserver& iObserver;
+
+        TBool iProgressNote;
+
+        TBool iExporting; // detailed encoder status
+
+        ///Own: EPos encoder
+        CPosLandmarkEncoder* iEncoder;
+
+        ///Own:
+        CLmkAOOperation* iAOOperation;
+    };
+
+#endif      // CLMKENCODER_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/engine/inc/CLmkEventListenerSingleton.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,85 @@
+/*
+* 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:    LandmarksUi Content File -    Singleton class for listening events
+*
+*/
+
+
+
+
+
+
+
+
+#ifndef CLMKEVENTLISTENERSINGLETON_H
+#define CLMKEVENTLISTENERSINGLETON_H
+
+//  INCLUDES
+#include <coemain.h>        // CCoeStatic
+
+// FORWARD DECLARATIONS
+class CLmkDbEventListener;
+class CPosLandmarkDatabase;
+class MLmkDbObserver;
+
+// CLASS DECLARATION
+
+/**
+* CLmkEventListenerSingleton class.
+* It is mandatory that the user takes care of removing added observers
+* before they or the database becomes invalid, since this is a singleton
+* class and used with static methods.
+*/
+class CLmkEventListenerSingleton : public CCoeStatic
+    {
+    public: // New methods
+        /**
+        * Add observer
+        * @param aObserver
+        * @param aDb
+        */
+        static void AddObserverL( MLmkDbObserver& aObserver,
+                                  CPosLandmarkDatabase& aDb );
+
+        /**
+         * Remove observer
+         * @param aObserver
+         */
+        static void RemoveObserver( MLmkDbObserver& aObserver );
+
+    protected:  // Constructors and destructor
+        /**
+        * C++ constructor.
+        * @return newly instantiated object
+        */
+        CLmkEventListenerSingleton();
+
+        /**
+        * By default Symbian 2nd phase constructor is private.
+        */
+        void ConstructL();
+
+        /**
+        * Destructor.
+        */
+        ~CLmkEventListenerSingleton();
+
+    protected:    // Data
+        ///Own:
+        CLmkDbEventListener* iEventListener;
+    };
+
+#endif      // CLMKEVENTLISTENERSINGLETON_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/engine/inc/CLmkFieldData.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,144 @@
+/*
+* 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:    LandmarksUi Content File -    Include data for form items
+*
+*/
+
+
+
+
+
+
+
+
+#ifndef CLMKFIELDDATA_H
+#define CLMKFIELDDATA_H
+
+//  INCLUDES
+#include "MLmkFieldData.h"
+#include <e32base.h>
+#include <EPos_Landmarks.h>
+
+// CLASS DECLARATION
+
+/**
+*  Landmarks field's data
+*/
+class CLmkFieldData : public CBase, public MLmkFieldData
+    {
+    public:  // Constructors and destructor
+        /**
+        * Two-phased constructor.
+        * @param aLabel
+        * @return newly instantiated object
+        */
+        static CLmkFieldData* NewL( HBufC* aLabel );
+
+        /**
+        * Destructor.
+        */
+        ~CLmkFieldData();
+
+    private:
+        /**
+        * C++ default constructor.
+        * @return newly instantiated object
+        */
+        CLmkFieldData();
+
+        /**
+        * By default Symbian 2nd phase constructor is private.
+        * @param aLabel
+        */
+        void ConstructL( HBufC* aLabel );
+
+    private: //From MLmkFieldData
+        void SetLabel( HBufC* aLabel );
+        const HBufC& Label() const;
+
+        void SetEditorType( const TUint16 aType );
+        TUint16 EditorType() const;
+
+        void SetTextL( const TPtrC aText );
+        void SetText( HBufC* aText ); //take ownership
+        const HBufC& TextData() const;
+
+        void SetInt( const TInt aTInt );
+        TInt IntegerData() const;
+
+        void SetTReal( const TReal32 aTReal );
+        TReal32 FloatData() const;
+
+        void SetTReal( const TReal64 aTReal );
+        TReal64 DoubleData() const;
+
+        RArray<TPosLmItemId>& Categories() ;
+        TInt UniqueFieldIdentity() const;
+
+        void SetFieldType( const TUint16 aFieldType );
+        TUint16 FieldType() const;
+
+        void SetPositionFieldId( const TUint16 aPositionFieldId );
+        TUint16 PositionFieldId() const;
+
+        void SetFieldLength( const TInt aLength );
+        TInt FieldLength() const;
+
+        void SetTitleField( const TBool aTitleField );
+        TBool IsTitleField() const;
+
+        void SetIconId( const TInt aIconId );
+        TInt IconId() const;
+
+        void SetIconPathL( const TDesC& aIconPath );
+        HBufC* IconPath();
+
+    private: //data
+
+        TUint16 iFieldType;
+
+        TUint16 iEditorType;
+
+        TUint16 iPositionFieldId;
+
+        TInt iUniqueFieldIdentity;
+
+        TInt iFieldLength;
+
+        ///Ref:
+    	HBufC* iLabel;
+
+        ///Own:
+    	HBufC* iTextData;
+
+    	RArray<TPosLmItemId> iCategories;
+
+    	TInt iIntData;
+
+    	TReal32 iTRealData32;
+
+        TReal64 iTRealData64;
+
+        TBool iTitleField;
+
+        TInt iIconId;
+
+        ///Own:
+        HBufC* iIconPath;
+
+    };
+
+#endif      // CLMKFIELDDATA_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/engine/inc/CLmkFields.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,216 @@
+/*
+* Copyright (c) 2002-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:    LandmarksUi Content File -    This has the class which implements all the
+*                landmarks editor/viewer fields
+*
+*/
+
+
+
+
+
+
+
+#ifndef CLMKFIELDS_H
+#define CLMKFIELDS_H
+
+//  INCLUDES
+#include "MLmkFieldData.h"
+#include <eikenv.h>
+#include <EPos_Landmarks.h>
+#include <lbsposition.h>
+#include <CLmkEditorDlg.h> // TLmkEditorAttributes
+
+/// FORWARD DECLARATION
+class CPosLandmarkDatabase;
+class CPosLandmark;
+class TLocality;
+
+// Define Generic Landmark fields
+enum TLmkGenericPoistionId
+	{
+	ELmkPositionFieldPhoneNumber = 	EPositionFieldBuildingTelephone,
+	ELmkPositionFieldWebAddress	 =  EPositionFieldMediaLinksStart
+	};
+
+struct TLocationData
+    {
+    TReal64 iLatitude;
+    TReal64 iLongitude;
+    TReal32 iAltitude;
+    TReal32 iHorizontalAccuracy;
+    TReal32 iVerticalAccuracy;
+    };
+
+// CLASS DECLARATION
+
+/**
+*  Landmarks fields class, include all form's fields
+*/
+class CLmkFields : public CBase
+    {
+    public:  // Constructors and destructor
+        /**
+        * Two-phased constructor.
+        * @param aLabelArray
+        * @param aDb
+        * @param aAttributes
+        * @param aLandmarkId
+        * @param aLandmark
+        * @return newly instantiated object
+        */
+
+        IMPORT_C static CLmkFields* NewL( RPointerArray<HBufC>& aLabelArray,
+                                          CPosLandmarkDatabase& aDb,
+                                          TLmkEditorAttributes aAttributes,
+                                          TPosLmItemId aLandmarkId,
+                                          CPosLandmark* aLandmark,
+                                          TBool aJapaneseInputMode );
+
+        /**
+        * Destructor.
+        */
+        IMPORT_C virtual ~CLmkFields();
+
+    private:
+        /**
+        * C++ default constructor.
+        * @param aLabelArray
+        * @param aDb
+        * @param aAttributes
+        * @param aLandmarkId
+        * @param aLandmark
+        * @return newly instantiated object
+        */
+        CLmkFields( RPointerArray<HBufC>& aLabelArray,
+                             CPosLandmarkDatabase& aDb,
+                             TLmkEditorAttributes aAttributes,
+                             TPosLmItemId aLandmarkId,
+                             CPosLandmark* aLandmark,
+                             TBool aJapaneseInputMode );
+
+        /**
+        * By default Symbian 2nd phase constructor is private.
+        */
+        void ConstructL();
+
+    public: //new functions
+        /**
+        * Return reference to fieldData array
+        * @return MLmkFieldData array
+        */
+        IMPORT_C CArrayPtrFlat<MLmkFieldData>& Fields();
+
+        /**
+        * Save fields
+        */
+        IMPORT_C void SaveFieldsL();
+
+        /**
+        * Delete landmark
+        */
+        IMPORT_C void DeleteLandmarkL();
+
+        /**
+        * Get one specific field from array
+        * Not give Ownership
+        * @param aFieldType
+        * @return Pointer to MLmkFieldData
+        */
+        IMPORT_C MLmkFieldData* GetField( TUint16 aFieldType );
+
+        /**
+        * Get landmark id. If called before landmark is stored
+        * into database it will be KPosLmNullItemId.
+        * @return landmark id
+        */
+        IMPORT_C TPosLmItemId LandmarkId() const;
+        /**
+        * Checks the disc space level whether is is enough to store a landmark or not
+        * @return KErrDiscFull if disc is full or KErrNone otherwise
+        */
+        IMPORT_C TInt CheckDiscSpaceL();
+
+        /**
+        * Replace character 0x2029(suppose to be enter char) with space char
+        * @param aText source string
+        * @return modified string
+        */
+        IMPORT_C static TPtr  RemoveEnterCharacter( TPtrC aText );
+
+    private: //new functions
+        /**
+        * Create all fields
+        */
+        void CreateLmkFieldsL();
+        // Create fields for Japanese style
+        void CreateLmkFieldsInJapaneseModeL();
+
+        // Create fields for normal mode
+        void CreateLmkFieldsInNormalModeL();
+
+        /**
+        * Create specific fields
+        */
+
+
+        void CreateNameFieldL( TInt aPos );
+        void CreateCategoryFieldL();
+        void CreateStreetFieldL( TInt aPos );
+        void CreateCityFieldL( TInt aPos );
+        void CreateStateProvinceFieldL( TInt aPos );
+        void CreateCountryFieldL( TInt aPos );
+        void CreatePostCodeFieldL( TInt aPos );
+        void CreateLatitudeFieldsL( TInt aPos );
+        void CreateLongitudeFieldsL( TInt aPos );
+        void CreatePositionAccuracyFieldL( TInt aPos );
+        void CreateAltitudeFieldL( TInt aPos );
+        void CreateAltitudeAccuracyFieldL( TInt aPos );
+        void CreateDescriptionFieldL( TInt aPos );
+        void CreatePhoneNumberFieldL( TInt aPos );
+        void CreateWebAddressFieldL( TInt aPos );
+    private: //data
+        ///
+        TLocationData iLocationData;
+
+    	/// Reference to database
+        CPosLandmarkDatabase& iDb;
+
+        // editors attributes
+        TLmkEditorAttributes iAttributes;
+
+        /// TPosLmItemId
+		TPosLmItemId iLandmarkId;
+
+		///Ref: Landmark
+        CPosLandmark* iLandmark;
+
+        /// TLocality variable
+        TLocality iLocality;
+
+    	/// Own: fields array
+		CArrayPtrFlat<MLmkFieldData> iFieldsArray;
+
+        ///Ref:
+        RPointerArray<HBufC>* iLabelArray;
+
+        /// Is new landmark created
+        TBool iNewLandmark;
+        // Japanese Input Mode
+        TBool iJapaneseMode;
+    };
+
+#endif      // CLMKFIELDS_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/engine/inc/CLmkIconOperation.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,126 @@
+/*
+* 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:    LandmarksUi Content File -    Handle icon operations
+*
+*/
+
+
+
+
+
+
+
+
+#ifndef CLMKICONOPERATION_H
+#define CLMKICONOPERATION_H
+
+//  INCLUDES
+#include "landmarks.hrh"
+#include <EPos_CPosLmOperation.h>
+#include <EPos_Landmarks.h>
+
+// FORWARD DECLARATIONS
+class CPosLandmarkDatabase;
+class CPosLmCategoryManager;
+
+// CLASS DECLARATION
+
+/**
+* CLmkIconOperation class
+*/
+class CLmkIconOperation : public CPosLmOperation
+    {
+    public:  // Constructors and destructor
+        /**
+        * Create CLmkIconOpereation object
+        * @param aDb
+        * @param aIdArray
+        * @param aItemsType
+        * @param aMbmFileName
+        * @param aIconIndex
+        * @return newly instantiated object
+        */
+        static CLmkIconOperation* NewL( CPosLandmarkDatabase& aDb,
+                            const RArray<TPosLmItemId>& aIdArray,
+                            TLmkItemType aItemsType,
+                            const TDesC& aMbmFileName,
+                            TInt aIconIndex );
+
+        /**
+        * Destructor.
+        */
+        ~CLmkIconOperation();
+
+    public: // New methods
+        /**
+        * Next step in AO operation
+        * @param aStatus
+        * @param aProgress
+        */
+        void NextStep( TRequestStatus& aStatus, TReal32& aProgress );
+
+        /**
+        * Execute AO operation
+        */
+        void ExecuteL();
+
+    protected:  // Constructors and destructor
+        /**
+        * C++ constructor.
+        * @param aDb
+        * @param aItemsType
+        * @param aIconIndex
+        * @return newly instantiated object
+        */
+        CLmkIconOperation( CPosLandmarkDatabase& aDb,
+                           TLmkItemType aItemsType,
+                           TInt aIconIndex );
+
+        /**
+        * By default Symbian 2nd phase constructor is private.
+        * @param aIdArray
+        * @param aItemsType
+        * @param aMbmFileName
+        */
+        void ConstructL( const RArray<TPosLmItemId>& aIdArray,
+                         TLmkItemType aItemsType,
+                         const TDesC& aMbmFileName );
+
+    private: // From CPosLmOperation
+        void DoLandmarkStepL( TPosLmItemId aId );
+        void DoCategoryStepL( TPosLmItemId aId );
+
+    private:    // Data
+        ///Ref:
+        CPosLandmarkDatabase& iDb;
+
+        RArray<TPosLmItemId> iIdArray;
+
+        TInt iCurrentIndex;
+
+        // method pointer to DoLandmarkStepL or DoCategoryStepL
+        void (CLmkIconOperation::*iStepMethodL)( TPosLmItemId aId );
+
+        ///Own: icon file name
+        HBufC* iMbmFileName;
+
+        TInt iIconIndex ;
+
+        ///Own:
+        CPosLmCategoryManager* iCategoryMgr;
+    };
+
+#endif      // CLMKICONOPERATION_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/engine/inc/CLmkLandMarkCategoriesName.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,101 @@
+/*
+* 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:    LandmarksUi Content File -    CLmkLandmarkCategoriesName holds category names for perticuler Landmark
+*
+*/
+
+
+
+
+
+
+
+
+#ifndef CLMKLANDMARKCATNAMES_H
+#define CLMKLANDMARKCATNAMES_H
+
+//  INCLUDES
+#include <e32std.h>
+#include <e32base.h>
+#include <EPos_Landmarks.h>
+
+typedef TBuf<KPosLmMaxCategoryNameLength> TCategoryName;
+
+/**
+* CLmkLandMarkCategoriesName class.
+* This holds category name of perticuler landmark.
+*/
+class CLmkLandMarkCategoriesName : public CBase
+    {
+    public:  // Constructors and destructor
+
+        /**
+        * Creates CLmkLandMarkCategoriesName
+        * @return newly instantiated object
+        */
+        IMPORT_C static CLmkLandMarkCategoriesName* NewL();
+        /**
+        * Creates CLmkLandMarkCategoriesName fromn Existing one...
+        * @return newly instantiated object
+        */
+		IMPORT_C static CLmkLandMarkCategoriesName* NewL(CLmkLandMarkCategoriesName& aLmkLandMarkCategoriesName);
+        /**
+        * Destructor.
+        */
+        virtual ~CLmkLandMarkCategoriesName();
+
+    protected:  // Constructors and destructor
+        /**
+        * C++ constructor.
+        * @return newly instantiated object
+        */
+        CLmkLandMarkCategoriesName();
+
+        /**
+        * By default Symbian 2nd phase constructor is private.
+        */
+        void ConstructL();
+
+    public :
+        /**
+        * Gets All Category Names.
+        * @param aCategoryNameArray
+        */
+         IMPORT_C void GetCategoryNames(
+        /* OUT */       RArray<TCategoryName>&  aCategoryNameArray
+        ) const;
+
+        /**
+        * Sets Category Names.
+        * @param aCategoryNameArray
+        */
+		IMPORT_C  void SetCategoryNames(
+		/* IN */ 		RArray<TCategoryName> &  aCategoryNameArray
+		);
+
+        /**
+        * Add Category name to array.
+        * @param aCategoryNameArray
+        */
+         IMPORT_C void AddCategoryName(const TDesC &aCategoryName) ;
+
+    private:    // Data
+
+        // Holds Category names
+        RArray< TCategoryName >  iCategoriesName;
+    };
+
+#endif      // CLMKLANDMARKCATNAMES_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/engine/inc/CLmkLandmark.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,118 @@
+/*
+* 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:    LandmarksUi Content File -
+*     See class description below
+*
+*/
+
+
+
+
+
+
+
+#ifndef CLMKLANDMARK_H
+#define CLMKLANDMARK_H
+
+//  INCLUDES
+#include <e32base.h>
+#include <badesca.h>
+#include <EPos_CPosLandmark.h>
+#include <EPos_CPosLandmarkCategory.h>
+
+// CLASS DECLARATION
+
+/**
+*  This is a container class for a landmark.
+*
+*  A landmark is principally a location with a name.
+*
+*  The landmark object can either be created by a client or retrieved from
+*  @ref CPosLandmarkDatabase.
+*
+*  A landmark consists of a number of landmark attributes, e.g. landmark name,
+*  landmark position, coverage area, etc.
+*
+*  A landmark may also contain generic position fields. These position fields
+*  are defined in LbsFields.h. Only text fields are supported.
+*
+*  CLmkLandmark contains functions for setting and getting landmark attributes
+*  and position fields.
+*
+*  Note that CLmkLandmark is only a local representation of the landmark. To
+*  update the database, call @ref CPosLandmarkDatabase::UpdateLandmarkL (or
+*  @ref CPosLandmarkDatabase::AddLandmarkL for a new landmark).
+*
+*  @lib eposlandmarks.lib
+*  @since S60 3.0
+*  @version $Revision: 1.15 $, $Date: 2005/07/07 13:40:48 $
+*/
+class CLmkLandmark : public CBase
+    {
+
+    public:  // Constructors and destructor
+
+        /**
+        * Two-phased copy constructor.
+        *
+        * @param aLandmark The landmark to copy.
+        * @returns A copy of the specified landmark object.
+        */
+        IMPORT_C static CLmkLandmark* NewL(
+        const CPosLandmark*  aLandmark,
+        const RPointerArray<CPosLandmarkCategory>& aCategories
+       );
+
+       IMPORT_C static CLmkLandmark* NewL(
+       const CLmkLandmark&  aLandmark);
+
+
+        /**
+        * Destructor.
+        */
+        virtual ~CLmkLandmark();
+
+    public://New Functions
+
+        IMPORT_C CPosLandmark* PosLandmark();
+        IMPORT_C RPointerArray<CPosLandmarkCategory>& Categories();
+
+    private:
+
+        /**
+        * C++ default constructor.
+        */
+        CLmkLandmark();
+
+        CLmkLandmark(const CPosLandmark* aLandmark,
+                     const RPointerArray<CPosLandmarkCategory>& aCategories);
+
+        // Prohibit copy constructor
+        CLmkLandmark(const CLmkLandmark&);
+
+        // Prohibit assigment operator
+        CLmkLandmark& operator= (const CLmkLandmark&);
+
+        void ConstructL(const CPosLandmark* aLandmark,
+                     const RPointerArray<CPosLandmarkCategory>& aCategories);
+
+    private:    // Data
+
+    CPosLandmark*  iLandmark;
+    RPointerArray<CPosLandmarkCategory> iCategories;
+    };
+
+#endif      // CLMKLANDMARK_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/engine/inc/CLmkLandmarkListProvider.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,110 @@
+/*
+* 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:    LandmarksUi Content File -    Landmark list provider.
+*
+*/
+
+
+
+
+
+
+
+
+#ifndef CLMKLANDMARKLISTPROVIDER_H
+#define CLMKLANDMARKLISTPROVIDER_H
+
+//  INCLUDES
+#include "CLmkLmItemListProvider.h"
+
+// FORWARD DECLARATIONS
+class CPosLmPartialReadParameters;
+class CPosLandmarkSearch;
+class CPosLmOperation;
+
+// CLASS DECLARATION
+
+/**
+* CLmkLandmarkListProvider class
+*/
+class CLmkLandmarkListProvider : public CLmkLmItemListProvider
+    {
+    public:  // Constructors and destructor
+        /**
+        * Creates a provider for all items in the database.
+        * @param aDb landmark database reference
+        * @return newly instantiated object
+        */
+        static CLmkLandmarkListProvider* NewL( CPosLandmarkDatabase& aDb );
+
+        /**
+        * Destructor.
+        */
+        ~CLmkLandmarkListProvider();
+
+    public: // From CLmkListProviderBase
+        CLmkUiItemBase* ItemAtL( TInt aIndex );
+
+    public: // From MLmkDbObserver
+        void HandleDatabaseEvent( TPosLmEvent& aEvent );
+
+    protected: // From CLmkLmItemListProvider
+        void PrepareListL();
+        TBool PrepareListL(const TDesC& aSearchPattern,
+    							TBool aSearchOnlyInPreviousMatches);
+        void RemoveLandmarksL(const RArray<TPosLmItemId>& aSelectedItems ) ;
+
+    protected: // From MLmkAOOperationObserver
+        void HandleOperationL( TOperationTypes aType,
+                              TReal32 aProgress,
+                              TInt aStatus );
+
+    protected: // New methods
+        /**
+        * Read items to array
+        */
+        void ReadItemsToArrayL();
+
+        /**
+        * Prepare items for deletion
+        */
+		void PrepareForDeleteL() ;
+
+    private:  // Constructors and destructor
+        /**
+        * C++ constructor.
+        * @param aDb
+        * @return newly instantiated object
+        */
+        CLmkLandmarkListProvider( CPosLandmarkDatabase& aDb );
+
+        /**
+        * By default Symbian 2nd phase constructor is private.
+        */
+        void ConstructL();
+
+    private:    // Data
+        ///Own:
+        CPosLmPartialReadParameters* iReadParams;
+
+        ///Own:
+        CPosLandmarkSearch* iSearch;
+
+        ///Own:
+        CLmkAOOperation* iSearchAO;
+    };
+
+#endif      // CLMKLANDMARKLISTPROVIDER_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/engine/inc/CLmkLandmarkUiItem.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,85 @@
+/*
+* 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:    LandmarksUi Content File -    Landmarks ui item.
+*
+*/
+
+
+
+
+
+
+
+
+#ifndef CLMKLANDMARKUIITEM_H
+#define CLMKLANDMARKUIITEM_H
+
+//  INCLUDES
+#include "CLmkUiItemBase.h"
+
+// FORWARD DECLARATIONS
+class CPosLandmark;
+
+// CLASS DECLARATION
+
+/**
+* CLmkLandmarkUiItem class
+*/
+class CLmkLandmarkUiItem : public CLmkUiItemBase
+    {
+    public:  // Constructors and destructor
+        /**
+        * Create CLmkLandmarkUiItem object
+        * @param aLandmark
+        * @param aIconListIndex
+        * @return newly instantiated object
+        */
+        static CLmkLandmarkUiItem* NewL( CPosLandmark* aLandmark,
+                                         TInt aIconListIndex );
+
+        /**
+        * Destructor.
+        */
+        ~CLmkLandmarkUiItem();
+
+    public: // From CLmkUiItemBase
+        TLmkItemType Type();
+        TPtrC Text();
+        TInt GetIconId();
+
+    private:  // Constructors and destructor
+        /**
+        * C++ default constructor.
+        * @param aLandmark
+        * @param aIconListIndex
+        */
+        CLmkLandmarkUiItem( CPosLandmark* aLandmark, TInt aIconListIndex );
+
+        /**
+        * By default Symbian 2nd phase constructor is private.
+        */
+        void ConstructL();
+
+    private:    // Data
+        ///Own:
+        CPosLandmark* iLandmark;
+
+        TInt iIconListIndex;
+
+        TPtrC iText;
+    };
+
+#endif      // CLMKLANDMARKUIITEM_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/engine/inc/CLmkListProviderBase.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,127 @@
+/*
+* 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:    LandmarksUi Content File -    Base class for landmark list provider
+*
+*/
+
+
+
+
+
+
+
+
+#ifndef CLMKLISTPROVIDERBASE_H
+#define CLMKLISTPROVIDERBASE_H
+
+//  INCLUDES
+#include "MLmkListProviderObserver.h"
+#include <e32base.h>        // CBase
+
+// FORWARD DECLARATIONS
+class CLmkUiItemBase;
+class MLmkSelectorIconMgr;
+
+// CLASS DECLARATION
+
+/**
+* CLmkListProviderBase class
+*/
+class CLmkListProviderBase : public CBase
+    {
+    public:  // Constructors and destructor
+        /**
+        * Don't delete during asynchronous operation, otherwise
+        * observer(s) won't be notified!
+        */
+        ~CLmkListProviderBase();
+
+    public: // New functions
+        /**
+        * Asynchronous initialization.
+        */
+        virtual void InitializeL() = 0;
+
+        /**
+        * Return item at the specified position within the array.
+        * @param aIndex
+        * @return CLmkUiItemBase pointer
+        */
+        virtual CLmkUiItemBase* ItemAtL( TInt aIndex ) = 0;
+
+        /**
+        * Returns the number of elements held in the array.
+        * @return TInt
+        */
+        virtual TInt ItemCount() const = 0;
+
+        virtual TBool StartSearchingLandmarksL(const TDesC& aSearchPattern,
+    								  TBool aSearchOnlyInPreviousMatches) = 0;
+
+        /**
+        * Add observer
+        * @param aObserver
+        */
+        IMPORT_C void AddObserverL( MLmkListProviderObserver& aObserver );
+
+        /**
+        * Remove observer
+        * @return KErrNotFound if observer wasn't found, KErrNone otherwise
+        */
+        IMPORT_C TInt RemoveObserver( MLmkListProviderObserver& aObserver );
+
+        /**
+        * Must be called in order to have icons available. Can be called
+        * repeatedly to take new icon mgr into use.
+        * @param aIconMgr
+        */
+        IMPORT_C void SetIconMgrL( MLmkSelectorIconMgr& aIconMgr );
+
+    protected:  // New functions
+        /**
+        * Notify observer
+        * @param aEvent
+        */
+        void NotifyObservers( TLmkListProviderEventType aEvent );
+
+        /**
+        * Notify errors to observer
+        * @param aError
+        */
+        void NotifyError( TInt aError );
+
+    protected:  // Constructors and destructor
+        /**
+        * C++ default constructor.
+        * @return newly instantiated object
+        */
+        CLmkListProviderBase();
+
+        /**
+        * Symbian 2nd phase constructor
+        */
+        void BaseConstructL();
+
+    protected:  // Data
+        ///Ref:
+        MLmkSelectorIconMgr* iIconMgr;
+
+    private:    // Data
+        // observers not own
+        RPointerArray<MLmkListProviderObserver> iObservers;
+    };
+
+#endif      // CLMKLISTPROVIDERBASE_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/engine/inc/CLmkLmItemListProvider.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,259 @@
+/*
+* 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:    LandmarksUi Content File -    Abstract base class for landmark and category providers.
+*
+*/
+
+
+
+
+
+
+
+
+#ifndef CLMKLMITEMLISTPROVIDER_H
+#define CLMKLMITEMLISTPROVIDER_H
+
+//  INCLUDES
+#include "CLmkListProviderBase.h"
+#include "MLmkAOOperationObserver.h"
+#include "MLmkDbObserver.h"
+#include "landmarks.hrh"
+#include <EPos_Landmarks.h> // Lm typedefs, constants etc.
+#include <EPos_CPosLandmark.h>
+
+// FORWARD DECLARATIONS
+class CPosLandmarkDatabase;
+class CLmkDbUtils;
+class CLmkDbInitializer;
+class CLmkAOOperation;
+class CAknWaitDialog;
+
+// CLASS DECLARATION
+
+/**
+*  Abstract base class for landmark and category providers.
+*  Each concrete provider is responsible of notifying observer about all
+*  provider events.
+*/
+class CLmkLmItemListProvider
+: public CLmkListProviderBase,
+  public MLmkAOOperationObserver,
+  public MLmkDbObserver
+    {
+    public:  // Constructors and destructor
+        /**
+        * Destructor.
+        */
+        ~CLmkLmItemListProvider();
+
+    public: // New methods
+        /**
+        * Any item which is not found is ignored.
+        * @param aSelectedItems database ids for selected items
+        * @return array containing selected items, ownership is transferred
+        */
+        IMPORT_C CArrayFix<TInt>* SelectedIndexesL(
+                        const RArray<TPosLmItemId>& aSelectedItems ) const;
+
+        /**
+        * Any item which is not found is ignored.
+        * @param aSelectedIndexes will be set by this method
+        * @param aSelectedItems database ids for selected items
+        */
+        IMPORT_C void GetSelectedIndexesL( CArrayFix<TInt>& aSelectedIndexes,
+                        const RArray<TPosLmItemId>& aSelectedItems ) const;
+
+        /**
+        * Leaves if appending an item to aSelectedItems fails.
+		* Panics if any index is out of bounds.
+        * @param aSelectedItems
+        * @param aSelectedIndexes
+        */
+        IMPORT_C void GetSelectedItemIdsL(
+                        RArray<TPosLmItemId>& aSelectedItems,
+                        const CArrayFix<TInt>& aSelectedIndexes ) const;
+
+		IMPORT_C void GetAllItemIdsL(
+		    RArray<TPosLmItemId>& aSelectedItems ) const;
+
+        /**
+        * Returns KErrNotFound if item is not found.
+        * @param aSelectedItem
+        * @return error code
+        */
+        IMPORT_C TInt SelectedIndex( TPosLmItemId aSelectedItem ) const;
+
+        /**
+        * Panics if index is out of bounds.
+        * @param aSelected
+        * @param aIndex
+        */
+        IMPORT_C void GetSelectedItemId( TPosLmItemId& aSelected,
+                                         TInt aIndex ) const;
+
+        /**
+        * Any item which is not found is ignored.
+        * @param aSelectedItemsCount will set iSelectedItemsCount class variable by this method
+        */
+        IMPORT_C void SetSelectedItemsCount( TInt aSelectedItemsCount );
+
+        /**
+        * Any item which is not found is ignored.
+        * @param aItemId will be removed from the iIdArray
+        */
+        IMPORT_C void RemoveItem( TPosLmItemId aItemId );
+
+        /**
+        * Any item which is not found is ignored.
+        * @param aOperationCmd will set the Database Operation Command
+        */
+        IMPORT_C void SetOperationCmd( TLmkAppCmdId aOperationCmd );
+
+        /**
+        * Any item which is not found is ignored.
+        * The Function must be used if no of selected items is greater than 10
+        * @param aSelectedItems, the item count should be greater than 10
+        * @param aType is a operation type
+        * @param aCategoryId will set the category id to filter for deletion
+        */
+		IMPORT_C void RemoveItemsL( const RArray<TPosLmItemId>& aSelectedItems,
+								MLmkAOOperationObserver::TOperationTypes aType,
+								TPosLmItemId aCategoryId );
+
+    public: // From CLmkListProviderBase
+        void InitializeL();
+        TInt ItemCount() const;
+        TBool StartSearchingLandmarksL(
+								const TDesC& aSearchPattern,
+    							TBool aSearchOnlyInPreviousMatches);
+
+    protected: // From MLmkAOOperationObserver
+        void HandleOperationL( TOperationTypes aType,
+                               TReal32 aProgress,
+                               TInt aStatus );
+
+    protected: // From MLmkDbObserver
+        void HandleDatabaseEvent( TPosLmEvent& aEvent );
+
+    protected:  // New functions
+        /**
+        * "Template method" implemented by subclasses.
+        * List preparation cannot be done in construction phase, but
+        * only after database initialization is complete.
+        */
+        virtual void PrepareListL() = 0;
+        virtual TBool PrepareListL(const TDesC& aSearchPattern,
+    							TBool aSearchOnlyInPreviousMatches) = 0;
+
+        virtual void RemoveLandmarksL(const RArray<TPosLmItemId>& aSelectedItems ) = 0;
+
+        /**
+        * Internal helper method for performing steps after
+        * database initialization.
+        */
+        void HandleDatabaseInitializedL();
+
+        /**
+        * Internal helper method which handles provider errors. It
+        * resets iIdArray and notifies observers.
+        * @param aError error code
+        */
+        void HandleError( TInt aError );
+
+    protected:  // Constructors and destructor
+        /**
+        * C++ constructor.
+        * @param aDb
+        * @return newly instantiated object
+        */
+        CLmkLmItemListProvider( CPosLandmarkDatabase& aDb );
+
+        /**
+        * By default Symbian 2nd phase constructor is private.
+        */
+        void BaseConstructL();
+
+	    /**
+	    * This function gets the landmark from the database &
+	    * update its icon with the category icon, if it is associated
+	    * with one category.
+	    */
+	    CPosLandmark* GetLandmarkLC(TInt aIndex);
+
+    protected: // Data
+
+        ///Ref: landmark database
+        CPosLandmarkDatabase& iDb;
+
+        /// Provide all db items or only the ones in the array?
+        TBool iListAllItemsInDb;
+
+        /// TPosLmItemId list
+        RArray<TPosLmItemId> iIdArray;
+
+        ///Own:
+        CLmkDbUtils* iDbUtils;
+
+        ///Own: helper for initialization
+        CLmkDbInitializer* iInitializer;
+
+		//own:  stores only those CPosLandmark objects, for which user has not set the icons
+		//      explicitly
+        RPointerArray<CPosLandmark>* iIconChangeLmkArray;
+
+        ///Own:
+        //CLmkAOOperation* iSearchAO;
+
+        ///Own
+        TInt iSelectedItemsCount;
+
+        ///Own : stores the search result count
+        TInt iCount;
+
+        //Own
+        TBool iRequestFromFindBox;
+
+		//Own : set the progress note flag to start CAOOperation
+		//		to get asynchronous search result
+        TBool iOperationNotInUse;
+
+        //Own : sets the operation given from the ui
+        TLmkAppCmdId iOperationCmd;
+
+        //Own : Operation type assign for operation
+        MLmkAOOperationObserver::TOperationTypes iType;
+
+        //Own : to store the
+        RArray<TPosLmItemId> iSelectedForDelete;
+
+ 		//Own : no of landmarks to be deleted
+        TInt iItemsToDelete;
+
+       //Own : no of landmarks deleted while in the operation
+        TInt iItemsDeleted;
+
+        //Own is removelandmars operation going on.
+        TBool iIsRemoveLandmarks;
+
+        //Own : Waitnot for operations
+        CAknWaitDialog* iWaitNote;
+
+		//Own : CategoryId to remove landmarks from category operation
+		TPosLmItemId iCategoryId;
+    };
+
+#endif      // CLMKLMITEMLISTPROVIDER_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/engine/inc/CLmkLocationService.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,129 @@
+/*
+* Copyright (c) 2002-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:    LandmarksUi Content File -    Implements methods for interfacing with Location Acquisition API.
+*
+*/
+
+
+
+
+
+
+
+#ifndef __CLMKLOCATIONSERVICE_H__
+#define __CLMKLOCATIONSERVICE_H__
+
+//  INCLUDES
+#include <lbs.h>
+
+// FORWARD DECLARATION
+class MLmkLocationObserver;
+class TPosition;
+class RPositionServer;
+class RPositioner;
+class TPositionInfo;
+
+
+// CLASS DECLARATION
+/**
+*  Implements entry point class to LmkEng.dll
+*/
+class CLmkLocationService : public CActive
+    {
+    public:
+        /**
+        * Two-phased constructor.
+        * @param location service requester name
+        *        (Landmarks Application's name)
+        *        which is passed to Location framework as a parameter to Location Acquisition API
+        *        It is maintained by Location Framework for privacy rules and logging purposes
+        * @return CLmkLocationService object.
+        */
+        IMPORT_C static CLmkLocationService* NewL(const TDesC& aSrvName);
+
+        /**
+        * Destructor.
+        */
+        virtual ~CLmkLocationService();
+
+    private:
+        /**
+        * By default Symbian 2nd phase constructor is private.
+        * @param location service requester name
+        *        (Landmarks Application's name)
+        *        which is passed to Location framework as a parameter to Location Acquisition API
+        *        It is maintained by Location Framework for privacy rules and logging purposes
+        */
+        void ConstructL(const TDesC& aSrvName);
+
+        /**
+        * C++ default constructor.
+        * @param newly instantiated object
+        */
+        CLmkLocationService();
+
+    public: //new functions
+        /**
+        * Set observer
+        * The calling class sets itself as observer to CLmkLocationService class
+        * @param the calling class which sets itself as observer to this class
+        */
+        IMPORT_C void SetObserver(MLmkLocationObserver& aObserver);
+
+        /**
+        * Remove observer
+        */
+        IMPORT_C void RemoveModelObserver();
+
+        /**
+        * Request current location
+        */
+        IMPORT_C void LocationRequestL();
+
+        /**
+        * Get current location
+        * @return TPosition reference
+        */
+        IMPORT_C TPosition& CurrentPosition();
+
+        /**
+        * Cancel location request
+        */
+        IMPORT_C void CancelRequest();
+
+    private: // from CActive
+        void RunL();
+        void DoCancel();
+        TInt RunError(TInt aError);
+
+    private:    // data
+        /// Own: iServer
+        RPositionServer iServer;
+
+        ///Ref:
+        MLmkLocationObserver* iObserver;
+
+        ///  RPositioner
+        RPositioner iPositioner;
+
+        ///  TPosition
+        TPosition iPosition;
+
+        TPositionInfo iPositionInfo;
+
+    };
+
+#endif // __CLMKLOCATIONSERVICE_H__
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/engine/inc/CLmkParseAllWrapper.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,130 @@
+/*
+* 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:    LandmarksUi Content File -    CLmkParseAllWrapper class parses all landmarks and
+*                maintains an index.
+*
+*/
+
+
+
+
+
+
+
+
+#ifndef CLMKPARSEALLWRAPPER_H
+#define CLMKPARSEALLWRAPPER_H
+
+//  INCLUDES
+#include <e32std.h>
+#include "MLmkAOOperationObserver.h"
+#include "CLmkLandMarkCategoriesName.h"
+#include "CLmkLandmark.h"
+
+// FORWARD DECLARATIONS
+class CLmkAOOperation;
+class CPosLandmarkParser;
+class CPosLandmark;
+
+class CPosLandmarkDatabase;
+// CLASS DECLARATION
+
+/**
+* CLmkParseAllWrapper class.
+* This class parses all landmarks and maintains an index.
+* It becomes obsolete once CPosLandmarkParser supports indexed parsing.
+*/
+class CLmkParseAllWrapper
+: public CBase, public MLmkAOOperationObserver
+    {
+    public:  // Constructors and destructor
+        /**
+        * Creates CLmkParseAllWrapper
+        * @param aParser
+        * @param aObserver
+        * @return newly instantiated object
+        */
+
+        static CLmkParseAllWrapper* NewL( CPosLandmarkParser& aParser,
+                                          MLmkAOOperationObserver& aObserver,
+                                          CPosLandmarkDatabase& aDb );
+
+        /**
+        * Destructor.
+        */
+        ~CLmkParseAllWrapper();
+
+    public: // New functions
+
+        /**
+        * Asynchronous method for parsing all landmarks.
+        */
+        void ParseAllL();
+
+        /**
+        * Returns parsed landmark, ownership is transferred.
+        * @param aLandmarkIndex
+        * @return landmark
+        */
+        CPosLandmark* LandmarkLC( TUint aLandmarkIndex );
+
+		TInt NumOfLandmarks();
+        CPosLandmark* Landmark( TUint aLandmarkIndex );
+        CLmkLandMarkCategoriesName* CategoryNameLC( TUint aLandmarkIndex );
+
+        /**
+        * Gets the CLmkLandmark object
+        * @param aLandmarkIndex
+        */
+        CLmkLandmark* LmkLandmarkLC( TInt aLandmarkIndex );
+    protected: // From MLmkAOOperationObserver
+        void HandleOperationL( TOperationTypes aType,
+                              TReal32 aProgress,
+                              TInt aStatus );
+
+    protected:  // Constructors and destructor
+        /**
+        * C++ constructor.
+        * @param aParser
+        * @param aObserver
+        * @return newly instantiated object
+        */
+        CLmkParseAllWrapper( CPosLandmarkParser& aParser,
+                             MLmkAOOperationObserver& aObserver,
+                             CPosLandmarkDatabase& aDb);
+
+        /**
+        * By default Symbian 2nd phase constructor is private.
+        */
+        void ConstructL();
+    private:    // Data
+
+        // Parsed landmarks
+        RPointerArray<CLmkLandmark> iLmkLandmarks;
+        RPointerArray<CLmkLandMarkCategoriesName> iCategoriesNames;
+
+        ///Ref:
+        CPosLandmarkParser& iParser;
+
+        MLmkAOOperationObserver& iObserver;
+
+        ///Own:
+        CLmkAOOperation* iAOOperation;
+        //Ref
+         CPosLandmarkDatabase& iDb;
+    };
+
+#endif      // CLMKPARSEALLWRAPPER_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/engine/inc/CLmkParsedLmListProvider.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,91 @@
+/*
+* 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:    LandmarksUi Content File -    This class provides list items belonging to received
+*                landmark package.
+*
+*/
+
+
+
+
+
+
+
+
+#ifndef CLMKPARSEDLMLISTPROVIDER_H
+#define CLMKPARSEDLMLISTPROVIDER_H
+
+//  INCLUDES
+#include "CLmkListProviderBase.h"
+#include <EPos_Landmarks.h>
+
+// FORWARD DECLARATIONS
+class CLmkParser;
+
+// CLASS DECLARATION
+
+/**
+*  This class provides list items belonging to received landmark package.
+*  Landmark package parsing should be already completed when instantiating
+*  the list provider.
+*/
+
+class CLmkParsedLmListProvider : public CLmkListProviderBase
+    {
+    public:  // Constructors and destructor
+        /**
+        * Creates a provider for items
+        * @param aParser
+        * @return newly instantiated object
+        */
+        static CLmkParsedLmListProvider* NewL( CLmkParser& aParser );
+
+        /**
+        * Destructor.
+        */
+        ~CLmkParsedLmListProvider();
+
+    public: // From CLmkListProviderBase
+        /**
+        * In this class this method does nothing.
+        */
+        void InitializeL();
+        TInt ItemCount() const;
+        CLmkUiItemBase* ItemAtL( TInt aIndex );
+        TBool StartSearchingLandmarksL(
+								const TDesC& aSearchPattern,
+    							TBool aSearchOnlyInPreviousMatches);
+
+    private:  // Constructors and destructor
+        /**
+        * C++ constructor.
+        * @param aParser
+        * @return newly instantiated object
+        */
+        CLmkParsedLmListProvider( CLmkParser& aParser );
+
+        /**
+        * By default Symbian 2nd phase constructor is private.
+        */
+        void ConstructL();
+
+    private:    // Data
+        ///Ref:
+        CLmkParser& iParser;
+
+    };
+
+#endif      // CLMKPARSEDLMLISTPROVIDER_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/engine/inc/CLmkParser.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,264 @@
+/*
+* Copyright (c) 2004-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:    LandmarksUi Content File -    This class provides methods to interact with Landmark Framework parser
+*
+*/
+
+
+
+
+
+
+
+#ifndef CLMKPARSER_H
+#define CLMKPARSER_H
+
+//  INCLUDES
+
+#include <e32base.h>
+#include "MLmkAOOperationObserver.h"
+#include <EPos_CPosLandmarkCategory.h>
+#include "CLmkLandmark.h"
+
+// FORWARD DECLARATIONS
+class CPosLandmarkParser;
+class CPosLandmarkDatabase;
+class CLmkAOOperation;
+class CPosLandmark;
+class CLmkDbUtils;
+class CLmkParseAllWrapper;
+class RFile;
+class CLmkLandMarkCategoriesName;
+class TDataType;
+
+#if 0
+// FORWARD DECLARATIONS
+class RFile;
+class CLmkDbUtils;
+class CPosLandmarkParser;
+class CPosLandmarkDatabase;
+class CLmkAOOperation;
+class CPosLandmark;
+class CLmkParseAllWrapper;
+
+class CLmkLandMarkCategoriesName;
+#endif
+
+// CLASS DECLARATION
+/**
+* CLmkParser class
+* This class provides methods to interact with Landmarks Framework parser for parsing
+* the landmarks received in the landmarks package via messaging
+*
+* It returns the parsed landmark data (object) to the client of this class
+*
+* This class is mainly used by the Landmarks Message viewer application classes for
+* displaying landmarks received in landmarks package
+*/
+class CLmkParser : public CBase, public MLmkAOOperationObserver
+    {
+	public:  // Constructors and destructor
+
+		/**
+		* Create CLmkParser object
+        * @param aFile File to be parsed
+        * @param aDb handle to landmark database
+        * @param aObserver Caller can set itself as observer of parser class
+        * @param aProgressNote Note for showing the progress of the parsing operation
+		* @return newly instantiated object
+		*/
+		IMPORT_C static CLmkParser* NewL( const TDesC& aFile,
+                                          CPosLandmarkDatabase& aDb,
+                                          MLmkAOOperationObserver& aObserver,
+                                          TBool aProgressNote );
+
+		/**
+		* This method creates a new parser object
+		* @param aFile File to be parsed
+        * @param aDb handle to landmark database
+        * @param aObserver Caller can set itself as observer of parser class
+        * @param aProgressNote Note for showing the progress of the parsing operation
+		* @return newly instantiated object
+		*/
+
+		IMPORT_C static CLmkParser* NewL(RFile& aFile,
+                                          CPosLandmarkDatabase& aDb,
+                                          MLmkAOOperationObserver& aObserver,
+                                          TBool aProgressNote );
+
+		/**
+		* Destructor.
+		*/
+		~CLmkParser();
+
+    protected: //from MLmkAOOperationObserver
+        void HandleOperationL( TOperationTypes aType,
+                               TReal32 aProgress,
+                               TInt aStatus );
+
+    public: // New functions
+        /**
+        * Gets the name of the file to be parsed.
+        * @return descriptor containing filename
+        */
+        IMPORT_C TPtrC FileName();
+
+        /**
+        * Gets the handle to file which needs to be parsed.
+        * @return reference to file handle
+        */
+        IMPORT_C RFile& FileHandle();
+
+		/**
+        * Check if the handle to file which needs parsing exists or not
+        * @return reference to file handle
+        */
+        IMPORT_C TBool IsFileHandle();
+
+        /**
+        * Initializes the landmark database which is already open.
+        * This is an Asynchronous method
+        * The client of this class should call this method before calling other methods.
+        */
+        IMPORT_C void InitializeDbL();
+
+        /**
+        * This method initiates the landmark parsing operation
+        * This is an Asynchronous method.
+        */
+        IMPORT_C void StartParsingL();
+
+        /**
+        * This method provides the number of latest parsed landmarks from
+        * the landmark package.
+        * @return number of parsed landmarks
+        */
+        IMPORT_C TInt NumOfParsedLandmarks();
+
+        /**
+        * Returns the name of the package using collection data information.
+        * Contains empty descriptor if name does not exist.
+        * @return Package name
+        */
+        IMPORT_C TPtrC PackageName();
+
+        /**
+        * Get Landmark at the specified position
+        * @param aIndex Position of Landmark in the package
+        * @return CPosLandmark
+        */
+        IMPORT_C CPosLandmark* LandmarkLC( TInt aIndex );
+
+        /**
+        * Get Landmark packaged in CLmkLandmark at the specified position
+        * @param aIndex Position of Landmark in the package
+        * @return CLmkLandmark
+        */
+        IMPORT_C CLmkLandmark* LmkLandmarkLC( TInt aIndex );
+
+        /**
+        * Get CategoriesNames at the specified position
+        * @param aIndex
+        * @return CLmkLandMarkCategoriesName
+        */
+		IMPORT_C CLmkLandMarkCategoriesName* CategoryNameLC( TInt aIndex );
+        /* Change observer of asynchronous operations
+        * @param aNewObserver Observer which need to be changed
+        */
+        IMPORT_C void ChangeObserver( MLmkAOOperationObserver& aNewObserver );
+
+	/**
+        * Start importing all landmarks in the package to database
+        */
+        IMPORT_C void StartImportingL(TBool aIncludeNewCategories);
+
+        /**
+        * Start importing selected landmarks to database
+        * This is an asynchronous operation
+        * @param aSelected Array containing the landmarks in the landmarks package
+        */
+        IMPORT_C void StartImportingL( const RArray<TUint>& aSelected, TBool aIncludeNewCategories );
+
+        /**
+        * Cancel importing of landmarks to database
+        */
+        IMPORT_C void CancelImporting();
+
+    private:  // New functions
+        /**
+        * This method checks if Active Object operation is already ongoing or not
+        * This is useful when a new Active Object operation is started
+        */
+        void LeaveIfInUseL();
+
+        /*
+        * This function resolves the MIME Type from the list present in the
+        * resource file
+        */
+        TInt ResolveMimeTypeL( RFile& aFile, TDataType& aDataType ) const;
+
+    private:  // Constructors and destructor
+        /**
+        * C++ default constructor.
+        */
+        CLmkParser( CPosLandmarkDatabase& aDb,
+                    MLmkAOOperationObserver& aObserver,
+                    TBool aProgressNote );
+
+        /**
+		* By default Symbian 2nd phase constructor is private.
+		* @param aFile Full file path
+		*/
+        void ConstructL( const TDesC& aFile );
+
+        /**
+		* By default Symbian 2nd phase constructor is private.
+		* @param aFile File handle
+		*/
+        void ConstructL(RFile& aFile  );
+
+    private:    // Data
+        ///Ref:
+        CPosLandmarkDatabase& iDb;
+
+        ///Ref:
+        MLmkAOOperationObserver* iObserver;
+
+        TBool iProgressNote;
+
+        ///Own: EPos parser
+        CPosLandmarkParser* iParser;
+
+        // remove the wrapper when CPosLandmarkParser supports indexing:
+        CLmkParseAllWrapper* iParseWrapper;
+
+        ///Own:
+        CLmkAOOperation* iAOOperation;
+
+        ///Own:
+        CLmkDbUtils* iDbUtils;
+
+        /// Own: full name of the parsed file
+        HBufC* iFileName;
+
+        // Added for passing FileHandle
+
+        RFile* iFileHandle;
+
+        TBool iFileHandleFlag;
+    };
+
+#endif      // CLMKPARSER_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/engine/inc/CLmkSearchedLmListProvider.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,136 @@
+/*
+* 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:    LandmarksUi Content File -
+*
+*/
+
+
+
+
+
+
+
+
+
+#ifndef CLMKSEARCHEDLMLISTPROVIDER_H
+#define CLMKSEARCHEDLMLISTPROVIDER_H
+
+//  INCLUDES
+#include "CLmkLmItemListProvider.h"
+
+// FORWARD DECLARATIONS
+class CPosLmPartialReadParameters;
+class CPosLmSearchCriteria;
+class CPosLandmarkSearch;
+class CPosLmOperation;
+
+// CLASS DECLARATION
+
+/**
+* CLmkSearchedLmListProvider class
+*/
+class CLmkSearchedLmListProvider : public CLmkLmItemListProvider
+    {
+    public:  // Constructors and destructor
+
+        /**
+        * Creates a provider that considers all items in a database.
+        * @param aDb landmark database reference
+        * @param aCriteria reference to used search criteria
+        * @return newly instantiated object
+        */
+        static CLmkSearchedLmListProvider* NewL( CPosLandmarkDatabase& aDb,
+                                            CPosLmSearchCriteria& aCriteria );
+
+        /**
+        * Destructor.
+        */
+        ~CLmkSearchedLmListProvider();
+
+    public: // From CLmkListProviderBase
+        CLmkUiItemBase* ItemAtL( TInt aIndex );
+
+    protected: // From MLmkAOOperationObserver
+        void HandleOperationL( TOperationTypes aType,
+                              TReal32 aProgress,
+                              TInt aStatus );
+
+    protected: // From MLmkDbObserver
+        void HandleDatabaseEvent( TPosLmEvent& aEvent );
+
+    protected: // From CLmkLmItemListProvider
+        void PrepareListL();
+        TBool PrepareListL(const TDesC& aSearchPattern,
+    							TBool aSearchOnlyInPreviousMatches);
+        void RemoveLandmarksL(const RArray<TPosLmItemId>& aSelectedItems ) ;
+
+    protected: // New methods
+        /**
+        * Read items to array
+        */
+        void ReadItemsToArrayL();
+
+        /**
+        * * Prepare items for deletion
+        * iType must be set before using this method
+        */
+		void PrepareForDeleteL();
+
+        /**
+        * * Starts the second search to seach the data with owned category
+        */
+		void StartSecondSearchL();
+
+    private:  // Constructors and destructor
+        /**
+        * C++ default constructor.
+        * @return newly instantiated object
+        */
+        CLmkSearchedLmListProvider();
+
+        /**
+        * C++ constructor.
+        * @param aDb
+        * @param aCriteria
+        * @return newly instantiated object
+        */
+        CLmkSearchedLmListProvider( CPosLandmarkDatabase& aDb,
+                                    CPosLmSearchCriteria& aCriteria );
+
+        /**
+        * By default Symbian 2nd phase constructor is private.
+        */
+        void ConstructL();
+
+    private:    // Data
+        ///Ref:
+        CPosLmSearchCriteria& iCriteria;
+
+        ///Own:
+        CPosLmPartialReadParameters* iReadParams;
+
+        ///Own:
+        CPosLandmarkSearch* iSearch;
+
+        ///Own:
+        CLmkAOOperation* iSearchAO;
+        TBool iCatDelete;
+        TBool iCatUpdate;
+
+        TBool iIsSecondSearchStarted;
+    };
+
+#endif      // CLMKSEARCHEDLMLISTPROVIDER_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/engine/inc/CLmkUiItemBase.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,94 @@
+/*
+* 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:    LandmarksUi Content File -    Base class for landmark ui item
+*
+*/
+
+
+
+
+
+
+
+
+#ifndef CLMKUIITEMBASE_H
+#define CLMKUIITEMBASE_H
+
+//  INCLUDES
+#include "landmarks.hrh"    // TLmkItemType
+#include <e32base.h>        // CBase
+
+// CLASS DECLARATION
+
+/**
+* CLmkUiItemBase class
+*/
+class CLmkUiItemBase : public CBase
+    {
+    public:  // Constructors and destructor
+        virtual ~CLmkUiItemBase();
+
+    public: // New functions
+        /**
+        * Get Landmark's item type
+        * @return TLmkItemType
+        */
+        virtual TLmkItemType Type() = 0;
+
+        /**
+        * Get text
+        * @return TPtrC
+        */
+        virtual TPtrC Text() = 0;
+
+        /**
+        * Get icon id
+        * @return TInt
+        */
+        virtual TInt GetIconId() = 0;
+
+        /**
+        * Check if extension int exists
+        * @return TBool
+        */
+        IMPORT_C TBool ExtensionIntExists();
+
+        /**
+        * Set Extension index
+        * @param aInt
+        */
+        IMPORT_C void SetExtensionInt( TInt aInt );
+
+        /**
+        * Get extension int
+        * @return TInt
+        */
+        IMPORT_C TInt ExtensionInt();
+
+    protected:  // Constructors and destructor
+        /**
+        * Default constructor
+        * @return newly instantiated object
+        */
+        CLmkUiItemBase();
+
+    protected: // Data
+        TBool iExtExists;
+        TInt iExtInt;
+
+    };
+
+#endif      // CLMKUIITEMBASE_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/engine/inc/Debug.h	Wed Sep 01 12:31:27 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:    LandmarksUi Content File -    Debug contains debug macros.
+*
+*/
+
+
+
+
+
+#ifndef DEBUG_H
+#define DEBUG_H
+// INCLUDES
+#include <e32std.h>
+#include "LmkDebugConfig.h"
+
+#ifdef __LMK_DEBUG_FLAG
+
+#define DEBUG(TEXT) Debug( _L(#TEXT) );
+#define DEBUG1(TEXT, ARG1) Debug( _L(#TEXT), (ARG1) );
+#define DEBUG2(TEXT, ARG1, ARG2) Debug( _L(#TEXT), (ARG1), (ARG2) );
+#define DEBUG3(TEXT, ARG1, ARG2, ARG3) Debug( _L(#TEXT), (ARG1), (ARG2), (ARG3) );
+
+void Debug( TRefByValue<const TDesC> aText, ...);
+
+#else
+
+#define DEBUG(TEXT);
+#define DEBUG1(TEXT, ARG1);
+#define DEBUG2(TEXT, ARG1, ARG2);
+#define DEBUG3(TEXT, ARG1, ARG2, ARG3);
+
+#endif // __LMK_DEBUG_FLAG
+
+#endif /* DEBUG_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/engine/inc/DllMain.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,50 @@
+/*
+* 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:    LandmarksUi Content File -    Contains engine panic function and panic enum values.
+*
+*/
+
+
+
+
+
+
+
+#ifndef LMKENG_DLLMAIN_H
+#define LMKENG_DLLMAIN_H
+
+//  INCLUDES
+#include <e32std.h>
+
+// DATA TYPES
+/// Landmarks application's engine panic codes.
+enum TLmkEnginePanicCode
+    {
+    };
+
+
+// FUNCTION PROTOTYPES
+/**
+ * Stop the program execution with module specific text and error code.
+ * Call if an unrecoverable error occurs in this module's code.
+ *
+ * @param aCode     error code
+ *
+ * @see TLmkEngPanicCode
+ */
+void LmkEngPanic(TInt aCode);
+
+#endif // LMKENG_DLLMAIN_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/engine/inc/LmkFileUtils.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,57 @@
+/*
+* 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:    LandmarksUi Content File -    Static utility class for file operations.
+*
+*/
+
+
+
+
+
+
+
+#ifndef LMKFILEUTILS_H
+#define LMKFILEUTILS_H
+
+//  INCLUDES
+#include <e32base.h>
+
+// CLASS DECLARATION
+
+/**
+*  Static utility class for file operations.
+*/
+class LmkFileUtils
+    {
+    public: // New functions
+
+        /**
+        * Helper method for deleting a file.
+        * Error KErrNotFound is omitted but in case of other errors
+        * this method leaves.
+        * @param aFile full name of the file which is deleted
+        */
+        IMPORT_C static void DeleteFileL( const TDesC& aFile );
+        /**
+        * This function tests whether the file name or path is valid
+        * or not.
+        * @param aFile file name/path
+        * @return ETrue if the name/path is valid else EFalse
+        */
+        IMPORT_C static TBool IsValidPathL( TPtrC aFile );
+    };
+
+#endif // LMKFILEUTILS_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/engine/inc/LmkListProviderFactory.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,91 @@
+/*
+* 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:    LandmarksUi Content File -    List provider factory
+*
+*/
+
+
+
+
+
+
+
+
+#ifndef LMKLISTPROVIDERFACTORY_H
+#define LMKLISTPROVIDERFACTORY_H
+
+//  INCLUDES
+#include "landmarks.hrh"
+#include <e32base.h>
+
+// FORWARD DECLARATIONS
+//class CLmkLmItemListProvider;
+class CLmkListProviderBase;
+class CPosLandmarkDatabase;
+class CPosLmSearchCriteria;
+class CLmkParser;
+
+//ENUMERATION
+enum TLmkProviderType
+    {
+    ELmkNotShowEmptyCategories,
+    ELmkShowEmptyCategories,
+    ELmkShowExtendedCategories
+    };
+
+// CLASS DECLARATION
+
+/**
+* LmkListProviderFactory class
+*/
+
+class LmkListProviderFactory
+    {
+    public: // New functions
+        /**
+        * Create LmkListProviderFactory object
+        * @param aDb
+        * @param aType
+        * @param aShowType has meaning only if
+        *        aType == ECategorySelector
+        * @return newly instantiated object
+        */
+        IMPORT_C static CLmkListProviderBase* CreateProviderL(
+                                        CPosLandmarkDatabase& aDb,
+                                        TLmkSelectorType aType,
+                                        TLmkProviderType aShowType =
+                                        ELmkNotShowEmptyCategories );
+
+        /**
+        * Creates filtered lm provider.
+        * @param aDb
+        * @param aCriteria
+        * @return newly instantiated object
+        */
+        IMPORT_C static CLmkListProviderBase* CreateProviderL(
+                                        CPosLandmarkDatabase& aDb,
+                                        CPosLmSearchCriteria& aCriteria );
+
+        /**
+        * Creates parsered lm provider.
+        * @param aParser
+        * @return newly instantiated object
+        */
+        IMPORT_C static CLmkListProviderBase* CreateProviderL(
+                                        CLmkParser& aParser );
+    };
+
+#endif      // LMKLISTPROVIDERFACTORY_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/engine/inc/MLmkAOOperationObserver.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,73 @@
+/*
+* 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:    LandmarksUi Content File -    Interface for active object observers
+*
+*/
+
+
+
+
+
+
+
+#ifndef MLMKAOOPERATIONOBSERVER_H
+#define MLMKAOOPERATIONOBSERVER_H
+
+//  INCLUDES
+#include <e32base.h>
+
+// FORWARD DECLARATIONS
+class CLmkAOOperation;
+
+// CLASS DECLARATION
+
+/**
+* MLmkAOOperationObserver class
+*/
+class MLmkAOOperationObserver
+    {
+    public: //types
+        enum TOperationTypes
+            {
+            EDeleteCategories,
+            EDeleteLandmarks,
+            EAddToCategory,
+            EChangeIcons,
+            ESearch,
+            EParse,
+            EImport,
+            EEncode,
+            EInitialize,
+            ECompact,
+            EInitAndCompact, // combined init and compact operation
+            ENewPkgCategory,
+            ERemoveCategory
+            };
+
+
+    public: // New functions
+        /**
+        * Virtual method for handling operation.
+        * @param aType
+        * @param aProgress
+        * @param aStatus completion code
+        */
+        virtual void HandleOperationL( TOperationTypes aType,
+                                       TReal32 aProgress,
+                                       TInt aStatus ) = 0;
+    };
+
+#endif      // MLMKAOOPERATIONOBSERVER_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/engine/inc/MLmkDbObserver.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,47 @@
+/*
+* 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:    LandmarksUi Content File -    Interface for database observers
+*
+*/
+
+
+
+
+
+
+
+#ifndef MLMKDBOBSERVER_H
+#define MLMKDBOBSERVER_H
+
+//  INCLUDES
+#include "EPos_Landmarks.h"
+
+// CLASS DECLARATION
+
+/**
+* MLmkDbObserver class
+*/
+class MLmkDbObserver
+    {
+    public: // New functions
+        /**
+        * Virtual method for handling database event.
+        * @param aEvent
+        */
+        virtual void HandleDatabaseEvent( TPosLmEvent& aEvent ) = 0;
+    };
+
+#endif      // MLMKDBOBSERVER_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/engine/inc/MLmkFieldData.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,211 @@
+/*
+* 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:    LandmarksUi Content File -    Interface for landmark's editor items
+*
+*/
+
+
+
+
+
+
+
+#ifndef __MLMKFIELDDATA_H__
+#define __MLMKFIELDDATA_H__
+
+//  INCLUDES
+#include <e32base.h>
+#include <EPos_Landmarks.h>
+
+// CLASS DECLARATION
+
+/**
+* Landmark editor field data abstract class.
+*/
+class MLmkFieldData
+    {
+    public:  // destructor
+        /**
+        * Destructor.
+        */
+        virtual ~MLmkFieldData(){}
+
+    public:  // Interface
+        /**
+        * Set label
+        * Not take ownership
+        * @param aLabel
+        */
+        virtual void SetLabel( HBufC* aLabel ) = 0;
+
+        /**
+        * Return field's label
+        * @return HBufC
+        */
+        virtual const HBufC& Label() const = 0;
+
+        /**
+        * Set editor type
+        * @param aType
+        */
+        virtual void SetEditorType( const TUint16 aType ) = 0;
+
+        /**
+        * Return field's editor type
+        * @return TInt
+        */
+        virtual TUint16 EditorType() const = 0;
+
+        /**
+        * Set text data
+        * @param aText
+        */
+        virtual void SetTextL( const TPtrC aText ) = 0;
+
+        /**
+        * Set text data, take ownership
+        * @param aText
+        */
+        virtual void SetText( HBufC* aText ) = 0;
+
+        /**
+        * Return text data
+        * @return TBufC
+        */
+        virtual const HBufC& TextData() const = 0;
+
+        /**
+        * Set Integer value
+        * @param aTInt
+        */
+        virtual void SetInt( const TInt aTInt ) = 0;
+
+        /**
+        * Return field's integer value
+        * @return TInt
+        */
+        virtual TInt IntegerData() const = 0;
+
+        /**
+        * Set TReal32 value
+        * @param aTReal
+        */
+        virtual void SetTReal( const TReal32 aTReal ) = 0;
+
+        /**
+        * Return field's TReal32 value
+        * @return TReal
+        */
+        virtual TReal32 FloatData() const = 0;
+
+        /**
+        * Set TReal64 value
+        * @param aTReal64
+        */
+        virtual void SetTReal( const TReal64 aTReal ) = 0;
+
+        /**
+        * Return field's TReal64 value
+        * @return TReal64
+        */
+        virtual TReal64 DoubleData() const = 0;
+
+        /**
+        * Return field's categories
+        * @return TPosLmItemId
+        */
+        virtual RArray<TPosLmItemId>& Categories() = 0;
+
+        /**
+        * Return TInt
+        * @return TInt
+        */
+        virtual TInt UniqueFieldIdentity() const = 0;
+
+        /**
+        * Set Field type
+        * @param aFieldType
+        */
+        virtual void SetFieldType( const TUint16 aFieldType ) = 0;
+
+        /**
+        * Return field type
+        * @return TUint16
+        */
+        virtual TUint16 FieldType() const = 0;
+
+        /**
+        * Set PositionField id
+        * @param aPositionFieldId
+        */
+        virtual void SetPositionFieldId( const TUint16 aPositionFieldId ) = 0;
+
+        /**
+        * Return PositionField id
+        * @return TUint16
+        */
+        virtual TUint16 PositionFieldId() const = 0;
+
+        /**
+        * Set Field length
+        * @param aLength
+        */
+        virtual void SetFieldLength( const TInt aLength ) = 0;
+
+        /**
+        * Return field length
+        * @return TInt
+        */
+        virtual TInt FieldLength() const = 0;
+
+        /**
+        * Set fields title
+        * @param aTitleField
+        */
+        virtual void SetTitleField( const TBool aTitleField ) = 0;
+
+        /**
+        * Check if field is title field
+        * @return TBool
+        */
+        virtual TBool IsTitleField() const = 0;
+
+        /**
+        * Set icon id to landmark
+        * @param aIconId
+        */
+        virtual void SetIconId( const TInt aIconId ) = 0;
+
+        /**
+        * Get landmarks icon id
+        * @return TInt
+        */
+        virtual TInt IconId() const = 0;
+
+        /**
+        * Set landmark icon path
+        * @param aIconPath
+        */
+        virtual void SetIconPathL( const TDesC& aIconPath ) = 0;
+
+        /**
+        * Get landmarks icon path
+        * @return HBufC*
+        */
+        virtual HBufC* IconPath() = 0;
+    };
+
+#endif // __MLMKFIELDDATA_H__
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/engine/inc/MLmkListProviderObserver.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,70 @@
+/*
+* 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:    LandmarksUi Content File -    Interface for list provider observers.
+*
+*/
+
+
+
+
+
+
+
+#ifndef MLMKLISTPROVIDEROBSERVER_H
+#define MLMKLISTPROVIDEROBSERVER_H
+
+//  INCLUDES
+#include <e32base.h>
+
+// DATA TYPES
+
+enum TLmkListProviderEventType
+    {
+    ELmkEventNull,
+    ELmkEventNewDefaultDatabaseLocation,
+    ELmkEventMediaRemoved,
+    ELmkEventListReady,
+    ELmkEventCategoryDeleted,
+    ELmkEventCategoryUpdated,
+    ELmkEventItemAdditionComplete,
+    ELmkEventFindListReady
+    };
+
+// CLASS DECLARATION
+
+/**
+* MLmkListProviderObserver class
+*/
+class MLmkListProviderObserver
+    {
+    public: // New functions
+        /**
+        * It is essential that this method is non-leaving, so that
+        * all observers will be safely notified.
+        * @param aEvent
+        */
+        virtual void HandleListProviderEvent(
+                        TLmkListProviderEventType aEvent ) = 0;
+
+        /**
+        * It is essential that this method is non-leaving, so that
+        * all observers will be safely notified.
+        * @param aError
+        */
+        virtual void HandleListProviderError( TInt aError ) = 0;
+    };
+
+#endif      // MLMKLISTPROVIDEROBSERVER_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/engine/inc/MLmkLocationObserver.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,52 @@
+/*
+* 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:    LandmarksUi Content File -    Provides an observer interface to Landmark application engine.
+*
+*/
+
+
+
+
+
+
+
+
+#ifndef __MLMKLOCATIONOBSERVER_H__
+#define __MLMKLOCATIONOBSERVER_H__
+
+// CLASS DECLARATIONS
+/**
+*  Engine provides this API only for Lmk application.
+*
+*/
+class MLmkLocationObserver
+    {
+    public: // New functions
+        /**
+        * Notifies the engine observer about occured event.
+        * Engine observer has to update its data when this function is called.
+        * @param aStatus
+        */
+        virtual void NotifyL( const TInt aStatus ) = 0;
+
+        /**
+        * Called if occured event causes a leave in previous NotifyL method.
+        * @param aErrorCode Occured general errorcode.
+        */
+        virtual void NotifyErrorL( TInt aErrorCode ) = 0;
+    };
+
+#endif      // __MLMKLOCATIONOBSERVER_H__
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/engine/inc/MLmkSelectorIconMgr.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,97 @@
+/*
+* 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:    LandmarksUi Content File -    Interface for selector icon manager
+*
+*/
+
+
+
+
+
+
+
+
+#ifndef MLMKSELECTORICONMGR_H
+#define MLMKSELECTORICONMGR_H
+
+//  INCLUDES
+#include <badesca.h>
+
+// FORWARD DECLARATIONS
+class CAknIconArray;
+
+// CLASS DECLARATION
+
+/**
+* MLmkSelectorIconMgr class
+*/
+class MLmkSelectorIconMgr
+    {
+    public:
+
+        enum TIconType {
+            EDefinedIcon = 0, // any non-default icon
+            ELandmarkDefaultIcon,
+            ECategoryDefaultIcon,
+            ERestaurantDefaultIcon,
+            EBusStopDefaultIcon
+            };
+
+    public: // New functions
+        /**
+        * Loads icon from file to icon array from parameter file and file
+        * index. For subsequent calls icon identification data is cached
+        * so same index in array is returned without reloading data from file.
+        * NOTE: icon mask id must be next from icon id in icon mbg file.
+        * Leaves with Symbian error code if error.
+        * @param aMbmFileName icon file name
+        * @param aIconIdInFile id number of icon in file
+        * @return icon array index
+        */
+        virtual TInt GetIconL( const TDesC& aMbmFileName,
+                               TInt aIconIdInFile ) = 0;
+
+        /**
+        * Loads icon based on icon type. Returns KErrNotFound if not available.
+        * @param aIcon icon type.
+        * @return icon array index.
+        */
+        virtual TInt GetDefaultIconL( TIconType aIcon ) = 0;
+
+        /**
+        * Sets the default icon for a given type.
+        * If default icon has already been set this method
+        * leaves with KErrAlreadyExists.
+        * @param aIcon type of the icon
+        * @param aMbmFileName icon file name
+        * @param aIconIdInFile id number of icon in file
+        */
+        virtual void SetDefaultIconL( TIconType aIcon,
+                                      const TDesC& aMbmFileName,
+                                      TInt aIconIdInFile ) = 0;
+
+        /**
+        * Resets icon manager. Resets and destroyes icon array content and
+        * deletes all icon manager data, including default icons.
+        */
+        virtual void ResetMgrL() = 0;
+
+// TODO: some method like InvalidateLmItemIconsL should be added
+// which could be used when database is updated. Otherwise more icons
+// are just loaded to icon manager.
+    };
+
+#endif      // MLMKSELECTORICONMGR_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/engine/inc/MLmkUiItemProximityExt.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,65 @@
+/*
+* 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:    LandmarksUi Content File -
+*
+*/
+
+
+
+
+
+
+
+
+
+#ifndef MLMKUIITEMPROXIMITYEXT_H
+#define MLMKUIITEMPROXIMITYEXT_H
+
+//  INCLUDES
+
+// FORWARD DECLARATIONS
+class MLmkUiItemProximityExt;
+
+// DATA TYPES
+
+// CLASS DECLARATION
+
+/**
+*
+*
+*  @lib ?library
+*  @since 2.6
+*/
+class MLmkUiItemProximityExt
+    {
+    public:  // Constructors and destructor
+
+        virtual ~MLmkUiItemProximityExt() {};
+
+    public: // New functions
+
+    public: // Functions from base classes
+
+    protected:  // New functions
+
+    protected:  // Functions from base classes
+
+    private:  // Constructors and destructor
+
+    private:    // Data
+    };
+
+#endif      // MLMKUIITEMPROXIMITYEXT_H
+
+// End of File
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/engine/inc/clmkdbsearchutils.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,144 @@
+/*
+* 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:    LandmarksUi Content File -    This file contains search utilities to query the landmarks Db.
+*				 For example getting all landmarks under a category, Name of a
+*				 particular category etc.
+*
+*/
+
+
+
+
+
+
+
+#ifndef CLMKDBSEARCHUTILS_H
+#define CLMKDBSEARCHUTILS_H
+
+//Include files
+#include "MLmkAOOperationObserver.h"
+
+// Forward declaration
+class CPosLandmark;
+class CPosLandmarkDatabase;
+class CPosLandmarkSearch;
+class CPosLmCategoryCriteria;
+class MLmkDbSearchUtilsObserver;
+class CLmkAOOperation;
+
+class CLmkDbSearchUtils : public CActive, public MLmkAOOperationObserver
+	{
+	public: // Constructors and destructor
+		/**
+		* Create CLmkDbSearchUtils object
+		*
+		*/
+		IMPORT_C static CLmkDbSearchUtils* NewL();
+
+		/**
+		* Destructor.
+		*/
+		IMPORT_C ~CLmkDbSearchUtils();
+
+	private:
+	    /**
+		* Default C++ constructor
+		*/
+		CLmkDbSearchUtils();
+
+		/*
+		* Symbian two phase constructor
+		*/
+		void ConstructL();
+
+	public:
+		/**
+		* Searches the db and gets the landmark under a mentioned
+		* category Id. This is a asynchronous request. The observers
+		* HandleSearchNotifyL is called when the search is complete
+		*
+		* @param aObserver observer to get the asynchronous callabck
+		* @param aCategoryId required category id
+		*/
+		IMPORT_C void GetLandmarksUnderCategoryL(MLmkDbSearchUtilsObserver* aObserver,
+									   			 TPosLmItemId aCategoryId );
+        /**
+        * Get the name of the required category.
+        *
+        * @param aCategoryId the category id whose name is required
+        */
+	    IMPORT_C HBufC* GetCategoryNameL(TPosLmItemId aCategoryId);
+
+	    /**
+	    * Returns the CPosLandmark object for a particular landmark Id.
+	    *
+	    * @param aLandmarkId is the db id of the required landmark
+	    */
+	    IMPORT_C CPosLandmark* GetLandmarkForIdL(TPosLmItemId aLandmarkId);
+
+	    /**
+	    * Gets the landmarks whose item id's are specified in a asynchronus
+	    * way. The observer gets a callback once all the landmark objects
+	    * have been retreived.
+	    *
+	    * @param aObserver is the pointer to the observer which makes the request
+	    * @param aLmItemId is the Landmarks Item array which as the item id's
+	    * @param aArray is the out parameter which holds all the landmark objects
+	    */
+	    IMPORT_C void GetLandmarksL(MLmkDbSearchUtilsObserver* aObserver,
+	    							RArray<TPosLmItemId> aLmItemId,
+	    							RPointerArray<CPosLandmark>* aArray);
+
+	private: // From MLmkAOOperationObserver
+		/**
+		* Callback from
+		*/
+		void HandleOperationL(TOperationTypes aType,
+							  TReal32 aProgress,
+							  TInt aStatus );
+
+	private:// From CActive
+		void RunL();
+		void DoCancel();
+
+
+	private: // Data
+		/// Observer of the search
+		MLmkDbSearchUtilsObserver* iObserver;
+
+		//Owns:reference to the landmark database
+		CPosLandmarkDatabase* iDb;
+
+		//Owns:landmark search variable
+		CPosLandmarkSearch* iSearch;
+
+		// Owns:criteria for search
+		CPosLmCategoryCriteria* iCriteria;
+
+		// Owns:pointer to the search AO object
+		CLmkAOOperation* iSearchAO;
+
+		// Owns:Pointer to the array in which the landmark objects need to be pushed
+		RPointerArray<CPosLandmark>* iLmkArray;
+
+		// Array of landmark item id's which need to be obtained
+		RArray<TPosLmItemId> iLmItemId;
+
+		// Index to iLmItemId for the landmarks search
+		TInt iSearchIndex;
+	};
+
+#endif // CLMKDBSEARCHUTILS_H
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/engine/inc/mlmkdbsearchutilsobserver.h	Wed Sep 01 12:31:27 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:    LandmarksUi Content File -    The class declared in this file is the defination of the observer
+*				 for the CLmkDbSearchUtils.
+*
+*/
+
+
+
+
+
+
+
+#ifndef MLMKDBSEARCHUTILSOBSERVER_H
+#define MLMKDBSEARCHUTILSOBSERVER_H
+
+// INCLUDE FILES
+#include <EPos_Landmarks.h>
+
+class MLmkDbSearchUtilsObserver
+	{
+	public:
+		/**
+		* Callback function for db search. The callback function will get the
+		* set of Landmarks id as the output of the search.
+		*
+		* @param aArray array of TPosLmItemId's
+		*/
+		virtual void HandleCategorySearchNotifyL(RArray<TPosLmItemId> aArray) = 0;
+
+		virtual void HandleLmkSearchNotifyL() = 0;
+	};
+
+#endif //MLMKDBSEARCHUTILSOBSERVER_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/engine/src/CLmkAOOperation.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,175 @@
+/*
+* 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:    LandmarksUi Content File -
+*
+*/
+
+
+
+
+
+
+
+
+// INCLUDE FILES
+#include "CLmkAOOperation.h"
+#include "MLmkAOOperationObserver.h"
+#include <EPos_CPosLmOperation.h>
+#include <EPos_Landmarks.h>
+
+// CONSTANTS
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CLmkAOOperation::CLmkAOOperation
+// C++ constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CLmkAOOperation::CLmkAOOperation(
+    CPosLmOperation* aLmOperation,
+    MLmkAOOperationObserver& aObserver,
+    MLmkAOOperationObserver::TOperationTypes aType,
+    TBool aProgressNote )
+    : CActive( EPriorityStandard ),
+      iLmOperation( aLmOperation ),
+      iObserver( aObserver ),
+      iType( aType ),
+      iProgressNote( aProgressNote )
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkAOOperation::ConstructL
+// Symbian 2nd phase constructor can leave.
+// -----------------------------------------------------------------------------
+//
+void CLmkAOOperation::ConstructL()
+    {
+    CActiveScheduler::Add( this );
+    iTimer.CreateLocal();
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkAOOperation::NewL
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CLmkAOOperation* CLmkAOOperation::NewL(
+    CPosLmOperation* aLmOperation,
+    MLmkAOOperationObserver& aObserver,
+    MLmkAOOperationObserver::TOperationTypes aType,
+    TBool aProgressNote )
+    {
+    CLmkAOOperation* self =
+        new ( ELeave ) CLmkAOOperation( aLmOperation, aObserver,
+                                       aType, aProgressNote );
+
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop();
+
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkAOOperation::~CLmkAOOperation
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CLmkAOOperation::~CLmkAOOperation()
+    {
+    iTimer.Close();
+    Cancel();
+    delete iLmOperation;
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkAOOperation::StartOperation
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CLmkAOOperation::StartOperation()
+    {
+    iLmOperation->NextStep( iStatus, iProgress );
+    SetActive();
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkAOOperation::StopOperation
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CLmkAOOperation::StopOperation()
+    {
+    iTimer.Close();
+    if (iLmOperation)
+	    {
+	    delete iLmOperation;
+	    iLmOperation = NULL;
+	    }
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkAOOperation::RunL
+// -----------------------------------------------------------------------------
+//
+void CLmkAOOperation::RunL()
+    {
+    if ( iStatus == KPosLmOperationNotComplete || iIsTimerSet)
+        {
+        if ( iProgressNote && (!iIsTimerSet ))
+            {
+            iObserver.HandleOperationL( iType, iProgress, iStatus.Int() );
+            }
+        if(iLmOperation)
+        	{
+	        iLmOperation->NextStep( iStatus, iProgress );
+	        iIsTimerSet = EFalse;
+	        SetActive();
+        	}
+        }
+    else if (iStatus == KErrLocked)
+        {
+           iTimer.After(iStatus,1);
+           iIsTimerSet = ETrue;
+        SetActive();
+        }
+    else
+        {
+        /*
+        * The current way, in which the active object handled is, once the HandleOperationL
+        * is called, it destroys this active object inside the HandleOperationL, hence,
+        * if HandleOperationL leaves, AcvtiveScheduler will try to call RunError, in turn will crash,
+        * so implementer of HandleOperationL must delete the current active object after all the
+        * leavable codes, also if it is required, iStatus can be set as KErrLocked by the
+        * HandleOperationL code to re-issue the request in case of failures.
+        */
+        TRAP_IGNORE(iObserver.HandleOperationL( iType, iProgress, iStatus.Int() ));
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkAOOperation::DoCancel
+// -----------------------------------------------------------------------------
+//
+void CLmkAOOperation::DoCancel()
+    {
+    iTimer.Close();
+    if (iLmOperation)
+	    {
+	    delete iLmOperation;
+	    iLmOperation = NULL;
+	    }
+    }
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/engine/src/CLmkAddToCatOperation.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,239 @@
+/*
+* 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:    LandmarksUi Content File -
+*
+*/
+
+
+
+
+
+
+
+
+// INCLUDE FILES
+#include "CLmkAddToCatOperation.h"
+#include "CLmkAOOperation.h"
+#include <EPos_CPosLmCategoryManager.h>
+#include <EPos_CPosLmOperation.h>
+#include <lmkerrors.h>
+
+#if defined(_DEBUG)
+// CONSTANTS
+/// Unnamed namespace for local definitions
+namespace {
+
+_LIT( KPanicMsg, "CLmkAddToCatOperation" );
+
+void Panic( TPanicCode aReason )
+    {
+    User::Panic( KPanicMsg, aReason );
+    }
+}  // namespace
+#endif
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CLmkAddToCatOperation::CLmkAddToCatOperation
+// C++ constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+CLmkAddToCatOperation::CLmkAddToCatOperation(
+    CPosLmCategoryManager& aCategoryMgr )
+    : iCategoryMgr( aCategoryMgr )
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkAddToCatOperation::ConstructL
+// Symbian 2nd phase constructor can leave.
+// -----------------------------------------------------------------------------
+//
+void CLmkAddToCatOperation::ConstructL(
+    const RArray<TPosLmItemId>& aLandmarkIdArray,
+    const RArray<TPosLmItemId>& aCategoryIdArray )
+    {
+    TInt lmCount = aLandmarkIdArray.Count();
+    for ( TInt i( 0 ); i < lmCount; ++i )
+        {
+        User::LeaveIfError( iLmIdArray.Append( aLandmarkIdArray[i] ) );
+        }
+    TInt catCount = aCategoryIdArray.Count();
+    for ( TInt k( 0 ); k < catCount; ++k )
+        {
+        User::LeaveIfError( iCatIdArray.Append( aCategoryIdArray[k] ) );
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkAddToCatOperation::NewL
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+CLmkAddToCatOperation* CLmkAddToCatOperation::NewL(
+    CPosLmCategoryManager& aCategoryMgr,
+    const RArray<TPosLmItemId>& aLandmarkIdArray,
+    const RArray<TPosLmItemId>& aCategoryIdArray )
+    {
+    CLmkAddToCatOperation* self =
+        new ( ELeave ) CLmkAddToCatOperation( aCategoryMgr );
+
+    CleanupStack::PushL( self );
+    self->ConstructL( aLandmarkIdArray, aCategoryIdArray );
+    CleanupStack::Pop();
+
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkAddToCatOperation::NewL
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+CLmkAddToCatOperation* CLmkAddToCatOperation::NewL(
+    CPosLmCategoryManager& aCategoryMgr,
+    TPosLmItemId aLandmarkId,
+    const RArray<TPosLmItemId>& aCategoryIdArray )
+    {
+    CLmkAddToCatOperation* self =
+        new ( ELeave ) CLmkAddToCatOperation( aCategoryMgr );
+
+    CleanupStack::PushL( self );
+    // For users of this class we provide two NewL interfaces but internally
+    // we create an array also in case of just one landmark item.
+    RArray<TPosLmItemId> tmpArray = RArray<TPosLmItemId>( 1 );
+    CleanupClosePushL( tmpArray );
+    User::LeaveIfError( tmpArray.Append( aLandmarkId ) );
+    self->ConstructL( tmpArray, aCategoryIdArray );
+    CleanupStack::PopAndDestroy(); // tmpArray
+    CleanupStack::Pop();
+
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkAddToCatOperation::~CLmkAddToCatOperation
+// -----------------------------------------------------------------------------
+//
+CLmkAddToCatOperation::~CLmkAddToCatOperation()
+    {
+    if (iStatus)
+        {
+        if (*iStatus == KRequestPending )
+            {
+            User::RequestComplete( iStatus, KErrCancel );
+            }
+        }
+    iLmIdArray.Close();
+    iCatIdArray.Close();
+    delete iAddOperation;
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkAddToCatOperation::NextStep
+// -----------------------------------------------------------------------------
+//
+void CLmkAddToCatOperation::NextStep( TRequestStatus& aStatus,
+                                      TReal32& aProgress )
+    {
+    aStatus = KRequestPending;
+    iStatus = &aStatus;
+    iProgress = &aProgress;
+
+    TInt count = iCatIdArray.Count();
+    // Index should be smaller than count if NextStep called properly:
+    __ASSERT_DEBUG( iCurrentIndex < count, Panic( KLmkPanicIllegalMethodCall ) );
+
+    TInt err( KErrNone );
+
+    // Do one step:
+    if ( iCurrentIndex < count )
+        {
+        TRAP( err, DoAddToCatStepL( iCatIdArray[iCurrentIndex++] ) );
+        }
+
+    if ( err != KErrNone )
+        { // error occurred already when preparing for asynch. operation
+        --iCurrentIndex;
+        *iProgress = 1;
+        User::RequestComplete( iStatus, err );
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkAddToCatOperation::ExecuteL
+// -----------------------------------------------------------------------------
+//
+void CLmkAddToCatOperation::ExecuteL()
+    {
+    // We never use asynchronous methods in synchronous way and therefore
+    // don't need to support this method
+    User::Leave( KErrNotSupported );
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkAddToCatOperation::HandleOperationL
+// -----------------------------------------------------------------------------
+//
+void CLmkAddToCatOperation::HandleOperationL(
+    TOperationTypes /*aType*/,
+    TReal32 /*aProgress*/,
+    TInt aStatus )
+    {
+    // Operation (adding one category to landmarks) finished:
+    delete iAddOperation;
+    iAddOperation = NULL;
+
+    TInt result( KErrNone );
+    TInt count = iCatIdArray.Count();
+
+    // Check result:
+    if ( aStatus != KErrNone || iCurrentIndex == count )
+        {
+        *iProgress = 1;
+        result = aStatus;
+        }
+    else
+        {
+        result = KPosLmOperationNotComplete;
+        // Neither divider nor dividend can be zero in this if-branch:
+        __ASSERT_DEBUG( ( iCurrentIndex > 0 ) && ( count > 0 ),
+                        Panic( KLmkPanicMathError ) );
+        *iProgress = static_cast<TReal32>( iCurrentIndex ) / count;
+        }
+    User::RequestComplete( iStatus, result );
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkAddToCatOperation::DoAddToCatStepL
+// -----------------------------------------------------------------------------
+//
+void CLmkAddToCatOperation::DoAddToCatStepL( TPosLmItemId aCategoryId )
+    {
+    CPosLmOperation* operation =
+        iCategoryMgr.AddCategoryToLandmarksL( aCategoryId,
+                                              iLmIdArray );
+
+    __ASSERT_DEBUG( !iAddOperation, Panic( KLmkPanicAlreadyActive ) );
+
+    iAddOperation =
+        CLmkAOOperation::NewL( operation,
+                               *this,
+                               MLmkAOOperationObserver::EAddToCategory,
+                               EFalse );
+    iAddOperation->StartOperation();
+    }
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/engine/src/CLmkCategoryListProvider.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,490 @@
+/*
+* Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:    Category List info provider for listbox model
+*
+*/
+
+
+
+
+// INCLUDE FILES
+
+#include <eikenv.h>
+#include <StringLoader.h>
+#include <EPos_CPosLandmarkDatabase.h>
+#include <EPos_CPosLandmarkCategory.h>
+#include <EPos_CPosLmCategoryManager.h>
+#include <EPos_CPosLmItemIterator.h>
+#include <EPos_TPosLmSortPref.h>
+#include <EPos_CPosLmSearchCriteria.h>
+#include <EPos_CPosLandmarkSearch.h>
+#include <EPos_CPosLmCategoryCriteria.h>
+#include <lmkui.rsg>
+#include "LmkConsts.h"
+#include "CLmkAOOperation.h"
+#include "CLmkCategoryUiItem.h"
+#include "MLmkSelectorIconMgr.h"
+#include "CLmkCategoryListProvider.h"
+#include <lmkerrors.h>
+
+#if defined(_DEBUG)
+// CONSTANTS
+/// Unnamed namespace for local definitions
+namespace {
+
+_LIT( KPanicMsg, "CLmkCategoryListProvider" );
+
+void Panic( TPanicCode aReason )
+    {
+    User::Panic( KPanicMsg, aReason );
+    }
+}  // namespace
+#endif
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CLmkCategoryListProvider::CLmkCategoryListProvider
+// C++ constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+CLmkCategoryListProvider::CLmkCategoryListProvider(
+    CPosLandmarkDatabase& aDb,
+    TLmkProviderType aShowType )
+    : CLmkLmItemListProvider( aDb ),
+      iShowType( aShowType ),
+      iAreUncategorisedItems( EFalse )
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkCategoryListProvider::ConstructL
+// Symbian 2nd phase constructor can leave.
+// -----------------------------------------------------------------------------
+//
+void CLmkCategoryListProvider::ConstructL()
+	{
+	// base class 2nd phase constructor
+	CLmkLmItemListProvider::BaseConstructL();
+	iCategoryMgr = CPosLmCategoryManager::NewL( iDb );
+	iSearch = CPosLandmarkSearch::NewL( iDb );
+	}
+
+// -----------------------------------------------------------------------------
+// CLmkCategoryListProvider::NewL
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+CLmkCategoryListProvider* CLmkCategoryListProvider::NewL(
+    CPosLandmarkDatabase& aDb,
+    TLmkProviderType aShowType )
+    {
+    CLmkCategoryListProvider* self =
+        new ( ELeave ) CLmkCategoryListProvider( aDb, aShowType );
+
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop();
+
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkCategoryListProvider::~CLmkCategoryListProvider
+// -----------------------------------------------------------------------------
+//
+CLmkCategoryListProvider::~CLmkCategoryListProvider()
+    {
+    delete iCategoryMgr;
+    delete iSearch;
+    if( iSearchAO )
+    	{
+    	delete iSearchAO;
+    	}
+    delete iCriteria;
+    iUsageArray.Close();
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkCategoryListProvider::ItemAtL
+// -----------------------------------------------------------------------------
+//
+CLmkUiItemBase* CLmkCategoryListProvider::ItemAtL( TInt aIndex )
+    {
+    __ASSERT_DEBUG( iIconMgr, Panic( KLmkPanicNullMember ) );
+    CLmkCategoryUiItem* uiItem = NULL;
+
+	if (iIdArray[aIndex] != KPosLmNullItemId)
+		{
+		CPosLandmarkCategory* category =
+		iCategoryMgr->ReadCategoryLC( iIdArray[aIndex] );
+
+		TPtrC mbmFile;
+		TInt iconFileIndex = -1;
+		TInt iconListIndex = -1;
+
+		TInt iconMaskIndex = -1;
+		TInt result = category->GetIcon( mbmFile, iconFileIndex ,iconMaskIndex);
+		if ( result == KErrNone )
+			{
+			TRAPD(err, iconListIndex =
+			    iIconMgr->GetIconL( mbmFile, iconFileIndex ) );
+			if ( err == KErrNotFound ) // icon file not found -> fallback to default
+				{
+				iconListIndex = iIconMgr->GetDefaultIconL(
+				MLmkSelectorIconMgr::ECategoryDefaultIcon );
+				}
+			}
+		else
+			{
+			iconListIndex = iIconMgr->GetDefaultIconL(
+			MLmkSelectorIconMgr::ECategoryDefaultIcon );
+			}
+
+		switch( iShowType )
+			{
+			//these are same
+			case ELmkNotShowEmptyCategories:
+			case ELmkShowEmptyCategories:
+				{
+				uiItem =
+				CLmkCategoryUiItem::NewL( category, iconListIndex );
+				break;
+				}
+			case ELmkShowExtendedCategories:
+				{
+				uiItem =
+				CLmkCategoryUiItem::NewL( category, iconListIndex );
+				uiItem->SetExtensionInt( IsUsedL( *category) );
+				break;
+				}
+			default:
+				{
+				break;
+				}
+			}
+		}
+	else // if category id is 'uncategorised'
+		{
+		CPosLandmarkCategory* category = CPosLandmarkCategory::NewL();
+		CleanupStack::PushL( category);
+
+		// Set category name
+		CEikonEnv* env = CEikonEnv::Static();
+		HBufC* catNameText = NULL;
+		catNameText = StringLoader::LoadLC( R_LMK_LM_LIST_UNCATEGORISED, env );
+		TPtrC categoryName;
+		categoryName.Set(*catNameText);
+		category->SetCategoryNameL(categoryName);
+		CleanupStack::PopAndDestroy( catNameText );
+		TInt iconListIndex = -1;
+		iconListIndex
+		    = iIconMgr->GetDefaultIconL(
+			 			            MLmkSelectorIconMgr::ECategoryDefaultIcon );
+		uiItem = CLmkCategoryUiItem::NewL( category, iconListIndex );
+		}
+    CleanupStack::Pop(); // category, ownership transferred
+    return uiItem;
+    }
+
+// ---------------------------------------------------------
+// CLmkCategoryListProvider::ReadItemsToArrayL
+// ---------------------------------------------------------
+//
+void CLmkCategoryListProvider::ReadItemsToArrayL()
+	{
+	// Update the IdArray to have 'uncategorised' category Id
+	CPosLmItemIterator* lmIterator = iSearch->MatchIteratorL();
+	CleanupStack::PushL( lmIterator );
+	TInt lmCount = lmIterator->NumOfItemsL();
+	CleanupStack::PopAndDestroy( lmIterator );
+	if ( lmCount > 0 )
+		{
+		// There is atleast 'one' landmark which is 'uncategorised'
+		// can only be called if there are some items
+		// Append 'uncategorised' category ID to the idArray
+		iIdArray.Append(KPosLmNullItemId);
+		iAreUncategorisedItems = ETrue;
+		if(iCount == -1 )
+			{
+			NotifyObservers( ELmkEventItemAdditionComplete );
+			}
+		else
+       		{
+       		NotifyObservers( ELmkEventListReady );
+       		}
+	    iSearchAO->StopOperation();
+	    iCount = 1;
+		}
+	}
+
+// ---------------------------------------------------------
+//  CLmkCategoryListProvider::HandleOperationL
+// ---------------------------------------------------------
+//
+void CLmkCategoryListProvider::HandleOperationL(
+    TOperationTypes aType,
+    TReal32 aProgress,
+    TInt aStatus )
+    {
+    if ( aType == MLmkAOOperationObserver::ESearch )
+        {
+        if( iCount < 1 )
+        	{
+        	ReadItemsToArrayL();
+        	}
+       	if ( aStatus == KErrNone )
+            {
+            if(iCount == 0)
+            	{
+            	NotifyObservers( ELmkEventListReady );
+            	}
+	        delete iSearchAO;
+	        iSearchAO = NULL;
+	        iCount = 0;
+            }
+        }
+    else
+        { // This is not this classes' operation
+        CLmkLmItemListProvider::HandleOperationL( aType, aProgress, aStatus);
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkCategoryListProvider::PrepareListL
+// -----------------------------------------------------------------------------
+//
+void CLmkCategoryListProvider::PrepareListL()
+    {
+    if ( iListAllItemsInDb )
+        {
+        CPosLmItemIterator* iterator = NULL;
+
+        switch( iShowType )
+            {
+			case ELmkNotShowEmptyCategories:
+				{
+				iCount = 0;
+				iIdArray.Reset();
+
+				// Query for 'referenced categories' from Category manager here
+				CPosLmItemIterator* categoryIterator  = iCategoryMgr->ReferencedCategoryIteratorL(
+				    CPosLmCategoryManager::ECategorySortOrderNameAscending );
+				CleanupStack::PushL( categoryIterator );
+				TUint categoryCount = categoryIterator->NumOfItemsL();
+
+				if ( categoryCount > 0 )
+					{ // can only be called if there are some items
+					categoryIterator->GetItemIdsL( iIdArray, 0, categoryCount );
+					if( iAreUncategorisedItems )
+						{
+						iIdArray.Append(KPosLmNullItemId);
+						}
+					NotifyObservers( ELmkEventListReady );
+					iCount = -1;
+					}
+				CleanupStack::PopAndDestroy( categoryIterator );
+
+				if( iAreUncategorisedItems )
+					{
+					if( iIdArray.Count() == 0)
+						{
+						iIdArray.Append(KPosLmNullItemId);
+						}
+					NotifyObservers( ELmkEventListReady );
+					return;
+					}
+
+				// Set criteria parameters here -- for uncategorised landmarks
+				if (iCriteria)
+					{
+					delete   iCriteria;
+					iCriteria = NULL;
+					}
+				iCriteria = CPosLmCategoryCriteria::NewLC();
+				CleanupStack::Pop(  iCriteria );
+				iCriteria->SetCategoryItemId(KPosLmNullItemId);
+
+				TPosLmSortPref sortOrder( CPosLandmark::ELandmarkName,
+				          TPosLmSortPref::EAscending );
+
+
+				CPosLmOperation* operation =
+				iSearch->StartLandmarkSearchL( *iCriteria , sortOrder );
+				CleanupStack::PushL( operation );
+				delete iSearchAO; // cancel possibly pending operation
+				iSearchAO = NULL;
+				iSearchAO = CLmkAOOperation::NewL( operation,
+				                   				   *this,
+				                  				   MLmkAOOperationObserver::ESearch,
+				                   				   iOperationNotInUse );
+
+				CleanupStack::Pop( operation ); // ownership transferred
+				iSearchAO->StartOperation();
+				return;
+				}
+            case ELmkShowEmptyCategories:
+                {
+                iterator = iCategoryMgr->CategoryIteratorL(
+                    CPosLmCategoryManager::ECategorySortOrderNameAscending );
+                CleanupStack::PushL( iterator );
+                break;
+                }
+            case ELmkShowExtendedCategories:
+                {
+                iterator = iCategoryMgr->CategoryIteratorL(
+                    CPosLmCategoryManager::ECategorySortOrderNameAscending );
+                CleanupStack::PushL( iterator );
+                PrepareCategoryUsageListL();
+                break;
+                }
+            default:
+                {
+                break;
+                }
+            }
+        
+        if( iterator )
+            {
+            TUint count = iterator->NumOfItemsL();
+            iIdArray.Reset();
+            if ( count > 0 )
+                { // can only be called if there are some items
+                iterator->GetItemIdsL( iIdArray, 0, count );
+                }
+            CleanupStack::PopAndDestroy( iterator );
+            }
+        }
+
+    NotifyObservers( ELmkEventListReady );
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkCategoryListProvider::PrepareListL
+// -----------------------------------------------------------------------------
+//
+TBool CLmkCategoryListProvider::PrepareListL(const TDesC& /*aSearchPattern*/,
+    							TBool /*aSearchOnlyInPreviousMatches*/)
+	{
+	// not preparing the new list based on search criteria,
+	// as using the avkon's search api
+	return EFalse;
+	}
+
+// ---------------------------------------------------------
+// CLmkCategoryListProvider::RemoveLandmarksL
+// ---------------------------------------------------------
+//
+void CLmkCategoryListProvider::RemoveLandmarksL(const RArray<TPosLmItemId>& /*aSelectedItems*/ )
+	{
+	// no implementation required
+	}
+
+// -----------------------------------------------------------------------------
+// CLmkCategoryListProvider::HandleDatabaseEvent
+// -----------------------------------------------------------------------------
+//
+void CLmkCategoryListProvider::HandleDatabaseEvent( TPosLmEvent& aEvent )
+    {
+    TBool needRefresh = EFalse;
+    	
+    switch ( aEvent.iEventType )
+        {
+	 	case EPosLmEventLandmarkUnknownChanges:
+        case EPosLmEventLandmarkDeleted:
+        case EPosLmEventLandmarkUpdated:
+        case EPosLmEventUnknownChanges:
+			{
+			iAreUncategorisedItems = EFalse;
+			needRefresh = ETrue;
+			break;
+			}
+        case EPosLmEventLandmarkCreated:
+        case EPosLmEventCategoryUnknownChanges:
+        case EPosLmEventCategoryCreated:
+        case EPosLmEventCategoryDeleted:
+        case EPosLmEventCategoryUpdated:
+            {
+            needRefresh = ETrue;
+            break;
+            }
+        default:
+            {
+            // Not interesting event for this provider
+            break;
+            }
+        }
+        
+    if( needRefresh )    
+    	{
+		TRAPD( err, PrepareListL() );
+		if ( err )
+			{
+			HandleError( err );
+			}  				
+    	}
+    	
+    // Remember to call base class observer method too
+    CLmkLmItemListProvider::HandleDatabaseEvent( aEvent );
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkCategoryListProvider::PrepareCategoryUsageListL
+// -----------------------------------------------------------------------------
+//
+void CLmkCategoryListProvider::PrepareCategoryUsageListL()
+    {
+    iUsageArray.Reset();
+    iUsageIndex = 0;
+    CPosLmItemIterator* iterator = iCategoryMgr->ReferencedCategoryIteratorL(
+                      CPosLmCategoryManager::ECategorySortOrderNameAscending );
+
+    CleanupStack::PushL( iterator );
+    TUint count = iterator->NumOfItemsL();
+    if ( count > 0 )
+        { // can only be called if there are some items
+        iterator->GetItemIdsL( iUsageArray, 0, count );
+        }
+    CleanupStack::PopAndDestroy( iterator );
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkCategoryListProvider::IsUsedL
+// -----------------------------------------------------------------------------
+//
+TBool CLmkCategoryListProvider::IsUsedL( CPosLandmarkCategory& aCategory )
+    {
+    TBool result( EFalse );
+
+    TInt count( iUsageArray.Count() );
+    CPosLandmarkCategory* usageCat = NULL;
+
+    for ( TInt i=0; i<count; i++ )
+        {
+        usageCat = iCategoryMgr->ReadCategoryLC( iUsageArray[i] );
+
+        if ( aCategory.CategoryId() ==  usageCat->CategoryId() )
+            {
+            result = ETrue;
+            CleanupStack::PopAndDestroy();
+            break;
+            }
+        CleanupStack::PopAndDestroy();
+        }
+    return result;
+    }
+
+
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/engine/src/CLmkCategoryUiItem.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,127 @@
+/*
+* Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:    Category info item for landmarks list box model
+*
+*/
+
+
+
+
+// INCLUDE FILES
+#include "CLmkCategoryUiItem.h"
+#include <EPos_CPosLandmarkCategory.h>
+#include <lmkerrors.h>
+
+#if defined(_DEBUG)
+// CONSTANTS
+/// Unnamed namespace for local definitions
+namespace {
+
+_LIT( KPanicMsg, "CLmkCategoryUiItem" );
+
+void Panic( TPanicCode aReason )
+    {
+    User::Panic( KPanicMsg, aReason );
+    }
+}  // namespace
+#endif
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CLmkCategoryUiItem::CLmkCategoryUiItem
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+CLmkCategoryUiItem::CLmkCategoryUiItem(
+    CPosLandmarkCategory* aCategory,
+    TInt aIconListIndex )
+    : iCategory( aCategory ),
+      iIconListIndex( aIconListIndex )
+    {
+    iCategory->GetCategoryName( iText );
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkCategoryUiItem::ConstructL
+// Symbian 2nd phase constructor can leave.
+// -----------------------------------------------------------------------------
+//
+void CLmkCategoryUiItem::ConstructL()
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkCategoryUiItem::NewL
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+CLmkCategoryUiItem* CLmkCategoryUiItem::NewL(
+    CPosLandmarkCategory* aCategory,
+    TInt aIconListIndex )
+    {
+    __ASSERT_DEBUG( aCategory, Panic( KLmkPanicNullMember ) );
+    CLmkCategoryUiItem* self =
+        new ( ELeave ) CLmkCategoryUiItem( aCategory, aIconListIndex );
+
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop();
+
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkCategoryUiItem::~CLmkCategoryUiItem
+// -----------------------------------------------------------------------------
+//
+CLmkCategoryUiItem::~CLmkCategoryUiItem()
+    {
+    delete iCategory;
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkCategoryUiItem::Type
+// ?implementation_description
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+TLmkItemType CLmkCategoryUiItem::Type()
+    {
+    return ELmkItemTypeCategory;
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkCategoryUiItem::Text
+// ?implementation_description
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+TPtrC CLmkCategoryUiItem::Text()
+    {
+    return iText;
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkCategoryUiItem::GetIconId
+// ?implementation_description
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+TInt CLmkCategoryUiItem::GetIconId()
+    {
+    return iIconListIndex;
+    }
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/engine/src/CLmkDbEventListener.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,193 @@
+/*
+* 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:    LandmarksUi Content File -
+*
+*/
+
+
+
+
+// INCLUDE FILES
+#include "CLmkDbEventListener.h"
+#include "MLmkDbObserver.h"
+#include <EPos_CPosLandmarkDatabase.h>
+#include <lmkerrors.h>
+
+
+// CONSTANTS
+/// Unnamed namespace for local definitions
+namespace {
+
+const TInt KLmkEventObserversGranularity( 5 );
+
+#if defined(_DEBUG)
+_LIT( KPanicMsg, "CLmkDbEventListener" );
+void Panic( TPanicCode aReason )
+    {
+    User::Panic( KPanicMsg, aReason );
+    }
+#endif
+}  // namespace
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CLmkDbEventListener::CLmkDbEventListener
+// C++ constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+CLmkDbEventListener::CLmkDbEventListener()
+    : CActive( EPriorityStandard ),
+      iObservers( KLmkEventObserversGranularity )
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkDbEventListener::ConstructL
+// Symbian 2nd phase constructor can leave.
+// -----------------------------------------------------------------------------
+//
+void CLmkDbEventListener::ConstructL()
+    {
+    CActiveScheduler::Add( this );
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkDbEventListener::NewL
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+CLmkDbEventListener* CLmkDbEventListener::NewL()
+    {
+    CLmkDbEventListener* self =
+        new ( ELeave ) CLmkDbEventListener();
+
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop();
+
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkDbEventListener::~CLmkDbEventListener
+// -----------------------------------------------------------------------------
+//
+CLmkDbEventListener::~CLmkDbEventListener()
+    {
+    Cancel();
+    iObservers.Close();
+    delete iDbURI;
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkDbEventListener::AddObserverL
+// -----------------------------------------------------------------------------
+//
+void CLmkDbEventListener::AddObserverL(
+    MLmkDbObserver& aObserver,
+    CPosLandmarkDatabase& aDb )
+    {
+    HBufC* paramURI = aDb.DatabaseUriLC();
+    if ( iDb )
+        { // Only one database currently supported
+        if ( iDbURI->Compare( *paramURI ) != 0 )
+            {
+            User::Leave( KErrNotSupported );
+            }
+        }
+
+    TInt index = iObservers.Find( &aObserver );
+    if ( index >= 0 )
+        {
+        User::Leave( KErrAlreadyExists );
+        }
+
+    User::LeaveIfError( iObservers.Append( &aObserver ) );
+    if ( iObservers.Count() == 1 )
+        {
+        iDb = &aDb;
+        StartListening();
+        }
+
+    // For simplicity we always assign new value to iDbURI although often
+    // the content remains the same as it was.
+    delete iDbURI;
+    iDbURI = paramURI;
+    CleanupStack::Pop(); // paramURI, ownership was transferred
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkDbEventListener::RemoveObserver
+// -----------------------------------------------------------------------------
+//
+void CLmkDbEventListener::RemoveObserver( MLmkDbObserver& aObserver )
+    {
+    TInt index = iObservers.Find( &aObserver );
+    if ( index >= 0 )
+        {
+        iObservers.Remove( index );
+        }
+    if ( iObservers.Count() == 0 )
+        {
+        Cancel();
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkDbEventListener::StartListening
+// -----------------------------------------------------------------------------
+//
+void CLmkDbEventListener::StartListening()
+    {
+    iEvent.iEventType = EPosLmEventUnknownChanges;
+    iEvent.iLandmarkItemId = KPosLmNullItemId;
+    __ASSERT_DEBUG( !IsActive(), Panic( KLmkPanicAlreadyActive ) );
+    __ASSERT_DEBUG( iDb, Panic( KLmkPanicNullMember ) );
+    iDb->NotifyDatabaseEvent( iEvent, iStatus );
+    SetActive();
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkDbEventListener::RunL
+// -----------------------------------------------------------------------------
+//
+void CLmkDbEventListener::RunL()
+    {
+    // No need for implementing RunError() as long as RunL() is non-leaving.
+    for ( TInt i( 0 ); i < iObservers.Count(); ++i )
+        {
+        iObservers[i]->HandleDatabaseEvent( iEvent );
+        }
+    StartListening();
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkDbEventListener::DoCancel
+// -----------------------------------------------------------------------------
+//
+void CLmkDbEventListener::DoCancel()
+    {
+    if ( iDb )
+        {
+        iDb->CancelNotifyDatabaseEvent();
+        // The policy is that when database observation is stopped we
+        // release the database association. It may become invalid after that.
+        iDb = NULL;
+        delete iDbURI;
+        iDbURI = NULL;
+        }
+    }
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/engine/src/CLmkDbInitializer.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,147 @@
+/*
+* Copyright (c) 2002-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 contains methofs which wraps functionality related
+*                to landmark database initialization into a simpler interface.
+*
+*/
+
+
+
+
+
+
+
+// INCLUDE FILES
+#include "Debug.h"
+#include "CLmkDbUtils.h"
+#include "CLmkDbInitializer.h"
+#include <lmkerrors.h>
+
+
+// CONSTANTS
+/// Unnamed namespace for local definitions
+namespace {
+// We wrap two async. tasks (db initialize and compress) into one
+// using estimated 0.2/0.8 progress distribution:
+const TReal32 KLmkInitMaxProgress( TReal32( 0.2 ) );
+
+#if defined(_DEBUG)
+_LIT( KPanicMsg, "CLmkDbInitializer" );
+
+void Panic( TPanicCode aReason )
+    {
+    User::Panic( KPanicMsg, aReason );
+    }
+#endif
+}  // namespace
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CLmkDbInitializer::CLmkDbInitializer
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+CLmkDbInitializer::CLmkDbInitializer(
+    MLmkAOOperationObserver& aObserver,
+    TBool aProgressNote )
+    : iObserver( aObserver ),
+      iProgressNote( aProgressNote )
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkDbInitializer::NewL
+// -----------------------------------------------------------------------------
+//
+CLmkDbInitializer* CLmkDbInitializer::NewL(
+    CPosLandmarkDatabase& aDb,
+    MLmkAOOperationObserver& aObserver,
+    TBool aProgressNote )
+	{
+	CLmkDbInitializer* self =
+        new ( ELeave ) CLmkDbInitializer( aObserver, aProgressNote );
+	CleanupStack::PushL( self );
+	self->ConstructL( aDb );
+	CleanupStack::Pop(); //self
+    return self;
+	}
+
+// -----------------------------------------------------------------------------
+// CLmkDbInitializer::ConstructL
+// -----------------------------------------------------------------------------
+//
+void CLmkDbInitializer::ConstructL( CPosLandmarkDatabase& aDb )
+	{
+    iDbUtils = CLmkDbUtils::NewL( aDb, *this, iProgressNote );
+	}
+
+// -----------------------------------------------------------------------------
+// CLmkDbInitializer::~CLmkDbInitializer
+// -----------------------------------------------------------------------------
+//
+CLmkDbInitializer::~CLmkDbInitializer()
+	{
+	delete iDbUtils; // also cancels possibly ongoing operation
+	}
+
+// -----------------------------------------------------------------------------
+// CLmkDbInitializer::HandleOperationL
+// -----------------------------------------------------------------------------
+//
+void CLmkDbInitializer::HandleOperationL(
+TOperationTypes aType,
+TReal32 aProgress,
+TInt aStatus )
+	{
+	DEBUG2( CLmkDbInitializer::HandleOperationL entered: progress=%d status=%d,
+	    aProgress, aStatus );
+
+	__ASSERT_DEBUG( aType == EInitialize,
+	            Panic( KLmkPanicUnknownOperation ) );
+
+	// Modify progress information because we have wrapped two tasks into one:
+	if ( aType == EInitialize && aStatus == KPosLmOperationNotComplete )
+		{
+		aProgress = aProgress * KLmkInitMaxProgress;
+		}
+
+	if( iProgressNote || aStatus != KPosLmOperationNotComplete )
+		{
+		// Caller either requested to receive all events, or we
+		// have completed entirely and inform that to the caller.
+
+		/*
+		 *In the called method 'aProgress' is not used
+		 *This code change of passing '0' instead of aPrgress is
+		 *because of compiler error for winscw-urel target
+		 *and this is a temparary fix
+		 */
+		//iObserver.HandleOperationL( EInitAndCompact, aProgress, aStatus );
+		iObserver.HandleOperationL( EInitialize, 0, aStatus );
+		}
+	}
+
+// -----------------------------------------------------------------------------
+// CLmkDbInitializer::StartInitAndCompactL
+// -----------------------------------------------------------------------------
+//
+void CLmkDbInitializer::StartInitAndCompactL()
+	{
+	DEBUG( CLmkDbInitializer::StartInitAndCompactL entered );
+	iDbUtils->InitializeDbL();
+	}
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/engine/src/CLmkDbUtils.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,530 @@
+/*
+* Copyright (c) 2002-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:   This file contains utility methods for performing
+*                landmark database related operations like adding, deleting
+*                or updating a landmark and category etc.
+*
+*/
+
+
+
+// INCLUDE FILES
+
+#include <eikenv.h>
+#include <eikcapc.h>
+#include <EPos_CPosLmCategoryManager.h>
+#include "LmkConsts.h"
+#include "landmarks.hrh"
+#include "Debug.h"
+#include "CLmkAOOperation.h"
+#include "MLmkAOOperationObserver.h"
+#include "CLmkIconOperation.h"
+#include "CLmkAddToCatOperation.h"
+#include "CLmkDbUtils.h"
+#include "CLmkFields.h"
+#include <lmkerrors.h>
+
+
+// CONSTANTS
+/// Unnamed namespace for local definitions
+namespace {
+#if defined(_DEBUG)
+_LIT( KPanicMsg, "CLmkDbUtils" );
+
+void Panic( TPanicCode aReason )
+    {
+    User::Panic( KPanicMsg, aReason );
+    }
+#endif
+const TInt KUrlProtocolEnds (3);
+_LIT( KDoubleSlash, "//"); // Empty Mime Type indicator
+}  // namespace
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CLmkDbUtils::CLmkDbUtils
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+CLmkDbUtils::CLmkDbUtils(
+CPosLandmarkDatabase& aDb,
+MLmkAOOperationObserver& aObserver,
+TBool aProgressNote )
+: iDb( aDb ),
+  iObserver( &aObserver ),
+  iProgressNote( aProgressNote )
+	{
+	}
+
+// -----------------------------------------------------------------------------
+// CLmkDbUtils::NewL()
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CLmkDbUtils* CLmkDbUtils::NewL(
+CPosLandmarkDatabase& aDb,
+MLmkAOOperationObserver& aObserver,
+TBool aProgressNote )
+	{
+	CLmkDbUtils* self =
+	    new ( ELeave ) CLmkDbUtils( aDb, aObserver, aProgressNote );
+	CleanupStack::PushL( self );
+	self->ConstructL();
+	CleanupStack::Pop(); //self
+	return self;
+	}
+
+// -----------------------------------------------------------------------------
+// CLmkDbUtils::ConstructL()
+// -----------------------------------------------------------------------------
+//
+void CLmkDbUtils::ConstructL()
+	{
+	iCategoryMgr = CPosLmCategoryManager::NewL( iDb );
+	}
+
+// -----------------------------------------------------------------------------
+// CLmkDbUtils::~CLmkDbUtils()
+// -----------------------------------------------------------------------------
+//
+CLmkDbUtils::~CLmkDbUtils()
+	{
+	CancelLmOperation();
+	delete iCategoryMgr;
+	}
+
+// -----------------------------------------------------------------------------
+// CLmkDbUtils::HandleOperationL
+// -----------------------------------------------------------------------------
+//
+void CLmkDbUtils::HandleOperationL(
+TOperationTypes aType,
+TReal32 aProgress,
+TInt aStatus )
+	{
+	DEBUG2( CLmkDbUtils::HandleOperationL entered: progress=%d status=%d,
+	    aProgress, aStatus );
+	if ( aStatus != KPosLmOperationNotComplete )
+		{
+		// iAOOperation usually always exists when this method is called.
+		// Exception may be e.g. that a leave is trapped by CLmkDbUtils user.
+		delete iAOOperation;
+		iAOOperation = NULL;
+		}
+	//this handle operation performs db compact operation.
+	TRAPD(err,iObserver->HandleOperationL( aType, aProgress, aStatus ));
+	if (err == KErrLocked)
+		{
+		//since db compact operation failed, db has to be re-initialized.
+		InitializeDbL();
+		}
+	}
+
+// -----------------------------------------------------------------------------
+// CLmkDbUtils::InitializeDbL
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CLmkDbUtils::InitializeDbL()
+	{
+	DEBUG( CLmkDbUtils::InitializeDbL entered );
+	LeaveIfInUseL();
+
+	// We do not check IsInitializingNeeded() since it is better to do this
+	// always asynchronously to ensure consistent program flow.
+
+	CPosLmOperation* operation = NULL;
+	operation = iDb.InitializeL();
+
+	SetupAndStartOperationL( operation, EInitialize );
+	}
+
+// -----------------------------------------------------------------------------
+// CLmkDbUtils::CompactDbL
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CLmkDbUtils::CompactDbL()
+	{
+	DEBUG( CLmkDbUtils::CompactDbL entered );
+	LeaveIfInUseL();
+
+	CPosLmOperation* operation = iDb.CompactL();
+
+	SetupAndStartOperationL( operation, ECompact );
+	}
+
+// -----------------------------------------------------------------------------
+// CLmkDbUtils::AddCategoryL
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CLmkDbUtils::AddCategoryL(
+	CPosLandmarkCategory& aCategory,
+	CPosLandmarkDatabase& aDb )
+	{
+	CPosLmCategoryManager* categoryMgr = CPosLmCategoryManager::NewL( aDb );
+	CleanupStack::PushL( categoryMgr );
+
+	categoryMgr->AddCategoryL( aCategory );
+
+	CleanupStack::PopAndDestroy( categoryMgr );
+	}
+
+// -----------------------------------------------------------------------------
+// CLmkDbUtils::RenameCategoryL
+// -----------------------------------------------------------------------------
+//
+	EXPORT_C void CLmkDbUtils::RenameCategoryL(
+	TDesC& aCategoryName,
+	TPosLmItemId aId,
+	CPosLandmarkDatabase& aDb )
+	{
+	CPosLmCategoryManager* categoryMgr = CPosLmCategoryManager::NewL( aDb );
+	CleanupStack::PushL( categoryMgr );
+
+	CPosLandmarkCategory* category = categoryMgr->ReadCategoryLC( aId );
+	category->SetCategoryNameL( aCategoryName );
+	categoryMgr->UpdateCategoryL( *category );
+
+	CleanupStack::PopAndDestroy( 2 ); //category, categoryMgr
+	}
+
+// -----------------------------------------------------------------------------
+// CLmkDbUtils::CategoryNameL
+// -----------------------------------------------------------------------------
+//
+EXPORT_C HBufC* CLmkDbUtils::CategoryNameL(
+	CPosLandmarkDatabase& aDb,
+	TPosLmItemId  aCategoryId )
+	{
+	CPosLmCategoryManager* categoryMgr = CPosLmCategoryManager::NewL( aDb );
+	CleanupStack::PushL( categoryMgr );
+
+	CPosLandmarkCategory* category = categoryMgr->ReadCategoryLC(aCategoryId);
+	TPtrC catName;
+	User::LeaveIfError( category->GetCategoryName ( catName ) );
+	HBufC* result = catName.AllocL();
+	CleanupStack::PopAndDestroy( 2 ); //category, categoryMgr
+	return result;
+	}
+
+// -----------------------------------------------------------------------------
+// CLmkDbUtils::ChangeIconL
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CLmkDbUtils::ChangeIconL(
+	CPosLandmarkDatabase& aDb,
+	const TPosLmItemId aId,
+	TLmkItemType aItemType,
+	const TDesC& aMbmFileName,
+	TInt aIconIndex, TInt aMaskIndex)
+	{
+
+	if ( aItemType == ELmkItemTypeLandmark )
+		{
+		CPosLandmark* landmark = aDb.ReadLandmarkLC( aId );
+
+		landmark->SetIconL( aMbmFileName, aIconIndex, aMaskIndex); //KLmkDefaultId+1 );
+		aDb.UpdateLandmarkL( *landmark );
+		CleanupStack::PopAndDestroy(); // landmark
+		}
+	else
+		{
+		__ASSERT_DEBUG( aItemType == ELmkItemTypeCategory,
+		            Panic( KLmkPanicUnknownItemType ) );
+
+		CPosLmCategoryManager* categoryMgr = CPosLmCategoryManager::NewL(aDb);
+		CleanupStack::PushL( categoryMgr );
+		CPosLandmarkCategory* category = categoryMgr->ReadCategoryLC( aId );
+		category->SetIconL( aMbmFileName, aIconIndex, aMaskIndex);//KCategoryDefaultId+1);
+
+		categoryMgr->UpdateCategoryL( *category );
+		CleanupStack::PopAndDestroy( 2 ); //category, categoryMgr
+		}
+	}
+
+// -----------------------------------------------------------------------------
+// CLmkDbUtils::ChangeIconsL
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CLmkDbUtils::ChangeIconsL(
+	const RArray<TPosLmItemId>& aIdArray,
+	TLmkItemType aItemsType,
+	const TDesC& aMbmFileName,
+	TInt aIconIndex, TInt /*aMaskIndex*/)
+	{
+	LeaveIfInUseL();
+
+	CPosLmOperation* operation = CLmkIconOperation::NewL( iDb,
+	                                                      aIdArray,
+	                                                      aItemsType,
+	                                                      aMbmFileName,
+	                                                      aIconIndex );
+
+	SetupAndStartOperationL( operation, EChangeIcons );
+	}
+
+// -----------------------------------------------------------------------------
+// CLmkDbUtils::DeleteCategoriesL
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CLmkDbUtils::DeleteCategoriesL(
+	const RArray<TPosLmItemId>&  aCategoryIdArray )
+	{
+	LeaveIfInUseL();
+
+	CPosLmOperation* operation =
+	                iCategoryMgr->RemoveCategoriesL( aCategoryIdArray );
+
+	SetupAndStartOperationL( operation, EDeleteCategories );
+	}
+
+// -----------------------------------------------------------------------------
+// CLmkDbUtils::DeleteLandmarkL
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CLmkDbUtils::DeleteLandmarkL(
+	TPosLmItemId aId,
+	CPosLandmarkDatabase& aDb )
+	{
+	aDb.RemoveLandmarkL( aId );
+	}
+
+// -----------------------------------------------------------------------------
+// CLmkDbUtils::DeleteLandmarksL
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CLmkDbUtils::DeleteLandmarksL(
+	const RArray<TPosLmItemId>& aLandmarkIdArray )
+	{
+	LeaveIfInUseL();
+
+	CPosLmOperation* operation =
+	                    iDb.RemoveLandmarksL( aLandmarkIdArray );
+
+	SetupAndStartOperationL( operation, EDeleteLandmarks );
+	}
+
+// -----------------------------------------------------------------------------
+// CLmkDbUtils::AddLmToCategoryL
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CLmkDbUtils::AddLmToCategoryL(
+	TPosLmItemId aLandmarkId,
+	TPosLmItemId aCategoryId,
+	CPosLandmarkDatabase& aDb )
+	{
+	CPosLandmark* landmark = aDb.ReadLandmarkLC( aLandmarkId );
+	landmark->AddCategoryL( aCategoryId );
+	aDb.UpdateLandmarkL( *landmark );
+	CleanupStack::PopAndDestroy(); // landmark
+	}
+
+// -----------------------------------------------------------------------------
+// CLmkDbUtils::AddLmToCategoriesL
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CLmkDbUtils::AddLmToCategoriesL(
+	TPosLmItemId aLandmarkId,
+	const RArray<TPosLmItemId>& aCategoryIdArray )
+	{
+	LeaveIfInUseL();
+
+	CPosLmOperation* operation =
+	    CLmkAddToCatOperation::NewL( *iCategoryMgr,
+	                                 aLandmarkId,
+	                                 aCategoryIdArray );
+
+	SetupAndStartOperationL( operation, EAddToCategory );
+	}
+
+// -----------------------------------------------------------------------------
+// CLmkDbUtils::AddLmsToCategoriesL
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CLmkDbUtils::AddLmsToCategoriesL(
+	const RArray<TPosLmItemId>& aLandmarkIdArray,
+	const RArray<TPosLmItemId>& aCategoryIdArray )
+	{
+	LeaveIfInUseL();
+
+	CPosLmOperation* operation =
+	    CLmkAddToCatOperation::NewL( *iCategoryMgr,
+	                                 aLandmarkIdArray,
+	                                 aCategoryIdArray );
+
+	SetupAndStartOperationL( operation, EAddToCategory );
+	}
+
+// -----------------------------------------------------------------------------
+// CLmkDbUtils::CancelLmOperation
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CLmkDbUtils::CancelLmOperation()
+	{
+	if ( iAOOperation )
+	    {
+	    iAOOperation->Cancel();
+	    delete iAOOperation;
+	    iAOOperation = NULL;
+	    }
+	}
+
+// -----------------------------------------------------------------------------
+// CLmkDbUtils::LeaveIfInUseL
+// -----------------------------------------------------------------------------
+//
+void CLmkDbUtils::LeaveIfInUseL()
+	{
+	if ( iAOOperation )
+		{
+		User::Leave( KErrInUse );
+		}
+	}
+
+// -----------------------------------------------------------------------------
+// CLmkDbUtils::SetupAndStartOperationL
+// -----------------------------------------------------------------------------
+//
+void CLmkDbUtils::SetupAndStartOperationL(
+	CPosLmOperation* aOperation,
+	MLmkAOOperationObserver::TOperationTypes aOpType )
+	{
+	CleanupStack::PushL( aOperation );
+	iAOOperation =
+	CLmkAOOperation::NewL( aOperation,
+	               *this,
+	               aOpType,
+	               iProgressNote );
+	CleanupStack::Pop( aOperation ); // ownership transferred
+
+	iAOOperation->StartOperation();
+	}
+
+// -----------------------------------------------------------------------------
+// CLmkDbUtils::CategoryIdL()
+// -----------------------------------------------------------------------------
+//
+EXPORT_C  TPosLmItemId CLmkDbUtils::CategoryIdL(
+	CPosLandmarkDatabase& aDb,
+	const TDesC&  aCategoryName )
+	{
+
+	CPosLmCategoryManager* categoryMgr = CPosLmCategoryManager::NewL( aDb );
+	CleanupStack::PushL( categoryMgr );
+
+	TPosLmItemId  categoryId = categoryMgr->GetCategoryL(aCategoryName);
+	if (categoryId == KPosLmNullItemId)
+		{
+		    User::Leave(KErrArgument);
+		}
+
+	CleanupStack::PopAndDestroy(categoryMgr); //, categoryMgr
+	return categoryId;
+	}
+
+
+// -----------------------------------------------------------------------------
+// CLmkDbUtils::IsLmWithThisFieldExist
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TBool CLmkDbUtils::IsLmWithThisFieldExistL( TPositionFieldId  aFieldId )
+	{
+	RArray<TPosLmItemId> lmIdArray;
+	CleanupClosePushL( lmIdArray );
+	lmIdArray.Reset();
+
+	TPosLmSortPref sortOrder( CPosLandmark::ELandmarkName,
+	                          TPosLmSortPref::EAscending );
+	CPosLmItemIterator* iterator = iDb.LandmarkIteratorL( sortOrder );
+	CleanupStack::PushL( iterator );
+	TUint count = iterator->NumOfItemsL();
+	if ( count > 0 )
+		{ // can only be called if there are some items
+		iterator->GetItemIdsL( lmIdArray, 0, count );
+		}
+	CleanupStack::PopAndDestroy( iterator );
+
+	// search for lm with given position field
+	TBool  lmkFieldDefined = EFalse;
+	for (TInt i = 0; i< lmIdArray.Count(); i++)
+		{
+		CPosLandmark* landmark = iDb.ReadLandmarkLC(lmIdArray[i]);
+		if ( landmark->IsPositionFieldAvailable( aFieldId ) )
+			{
+			// Check if field info availabe or not
+			TPtrC  fieldValue;
+			if (landmark->GetPositionField( aFieldId, fieldValue ) == KErrNone )
+				{
+				if (fieldValue.Length() > 0 )
+					{
+					lmkFieldDefined = ETrue;
+					CleanupStack::PopAndDestroy ( landmark );
+					break;
+					}
+				}
+			}
+		CleanupStack::PopAndDestroy ( landmark );
+		}
+	CleanupStack::PopAndDestroy( ); // LmIdArray
+	return lmkFieldDefined;
+	}
+
+
+// -----------------------------------------------------------------------------
+// CLmkDbUtils::CheckToTrimUrlProtocol
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CLmkDbUtils::RemoveDefaultProtocolL(TPtr& aWebUrl)
+	{
+ 	TInt emptySlashPos(0);
+    if ( aWebUrl.Length() > 0 )
+        {
+        emptySlashPos = aWebUrl.Find( KDoubleSlash );
+        if ( emptySlashPos == 0 )
+            {
+            aWebUrl.Delete(emptySlashPos, 2);
+            }
+        if(aWebUrl.Length() > KMaxUrlFieldLen)
+	    	{
+	    	TInt pos = aWebUrl.Find(KProtocol);
+	    	aWebUrl.Delete(emptySlashPos, (pos + KUrlProtocolEnds));
+	    	}
+        }
+	}
+
+// -----------------------------------------------------------------------------
+// CLmkDbUtils::AddDefaultProtocolL
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CLmkDbUtils::AddDefaultProtocolL(CPosLandmark* landmark)
+	{
+ 	HBufC* webUrl = HBufC::NewL(KMaxBufferLen);
+    CleanupStack::PushL(webUrl);
+    TPtrC urlDes = webUrl->Des();
+    landmark->GetPositionField(ELmkPositionFieldWebAddress,urlDes);
+    if(urlDes.Length() > KMaxUrlFieldLenWithDefaultProtocol)
+    	{
+    	TInt pos = urlDes.Find(KProtocol);
+    	if (pos == KErrNotFound)
+    		{
+    		webUrl = webUrl->ReAllocL( KHttp().Length() +  urlDes.Length() );
+    		TPtr url = webUrl->Des();
+    		webUrl->Des().Copy(urlDes);
+    		webUrl->Des().Insert(0, KHttp);
+    		landmark->SetPositionFieldL(ELmkPositionFieldWebAddress,webUrl->Des());
+    		}
+    	}
+    CleanupStack::PopAndDestroy();//webUrl
+	}
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/engine/src/CLmkEncodeUnsavedLandmarksOp.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,183 @@
+/*
+* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:   This class provides functionality of encoding landmarks
+*                both saved and unsaved landmarks (In Landmarks DB).
+*
+*/
+
+
+
+
+
+
+
+// INCLUDE FILES
+#include "CLmkEncodeUnsavedLandmarksOp.h"
+#include "CLmkAOOperation.h"
+#include <EPos_CPosLmCategoryManager.h>
+#include <EPos_CPosLmOperation.h>
+#include "CLmkDbUtils.h"
+
+
+//CONSTANTS
+const TReal32 KOperationDone = 1;
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CLmkEncodeUnsavedLandmarksOp::CLmkEncodeUnsavedLandmarksOp
+// C++ constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+CLmkEncodeUnsavedLandmarksOp::CLmkEncodeUnsavedLandmarksOp(
+           CPosLandmarkEncoder&  aLandmarkEncoder,
+           CPosLandmarkDatabase::TTransferOptions  aTransferOptions)
+           :iEncoder(aLandmarkEncoder),
+            iTransferOptions(aTransferOptions),
+            iCurrentIsLm(ETrue),
+            iStatusFlag(KPosLmOperationNotComplete)
+
+    {
+    iNrOfSubOperations = 1;
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkEncodeUnsavedLandmarksOp::ConstructL
+// Symbian 2nd phase constructor can leave.
+// -----------------------------------------------------------------------------
+//
+void CLmkEncodeUnsavedLandmarksOp::ConstructL(const RPointerArray<CLmkLandmark>&  aLandmarks)
+    {
+    for (TInt i = 0; i < aLandmarks.Count(); i++)
+        {
+        CLmkLandmark* landmark = CLmkLandmark::NewL(*aLandmarks[i]);
+        CleanupStack::PushL(landmark);
+        User::LeaveIfError(iLandmarks.Append(landmark));
+        CleanupStack::Pop();//landmark
+        }
+    }
+
+
+// -----------------------------------------------------------------------------
+// CLmkEncodeUnsavedLandmarksOp::NewL
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+CLmkEncodeUnsavedLandmarksOp* CLmkEncodeUnsavedLandmarksOp::NewL(
+                              CPosLandmarkEncoder&  aLandmarkEncoder,
+                              const RPointerArray<CLmkLandmark>&  aLandmarks,
+                              CPosLandmarkDatabase::TTransferOptions  aTransferOptions )
+    {
+    CLmkEncodeUnsavedLandmarksOp* self =
+        new ( ELeave ) CLmkEncodeUnsavedLandmarksOp(aLandmarkEncoder,
+                                                    aTransferOptions);
+
+    CleanupStack::PushL( self );
+    self->ConstructL(aLandmarks );
+    CleanupStack::Pop();
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkEncodeUnsavedLandmarksOp::~CLmkEncodeUnsavedLandmarksOp
+// -----------------------------------------------------------------------------
+//
+CLmkEncodeUnsavedLandmarksOp::~CLmkEncodeUnsavedLandmarksOp()
+    {
+    iLandmarks.ResetAndDestroy();
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkEncodeUnsavedLandmarksOp::NextStep
+// -----------------------------------------------------------------------------
+//
+void CLmkEncodeUnsavedLandmarksOp::NextStep( TRequestStatus& aStatus,
+                                    TReal32& aProgress )
+    {
+    aStatus = KRequestPending;
+    iStatus = &aStatus;
+    iProgress = &aProgress;
+    TInt err(KErrNone);
+    if (iCurrentIsLm)
+        {
+        CLmkLandmark* lmkLm  = iLandmarks[iCurrentLm++];
+        CPosLandmark* lm = lmkLm->PosLandmark();
+        TRAP(err,CLmkDbUtils::AddDefaultProtocolL(lm));
+        if (iTransferOptions & CPosLandmarkDatabase::EIncludeCategories)
+            {
+            iCurrentCategory = 0;
+            iCategories = lmkLm->Categories();
+            if (iCategories.Count() != 0)
+                {
+                iCurrentIsLm = EFalse;
+                }
+            }
+
+        TRAP(err,iEncoder.AddLandmarkL(*lm));
+        }
+    else
+        {
+        for (TInt i = 0;
+            i < iNrOfSubOperations &&
+                iCurrentCategory < iCategories.Count(); i++)
+            {
+            CPosLandmarkCategory* category =iCategories[iCurrentCategory++];
+            if (iCurrentCategory == iCategories.Count())
+                {
+                iCurrentIsLm = ETrue;
+                }
+            TRAP(err,iEncoder.AddCategoryForLatestLandmarkL(*category));
+            }
+        }
+
+    if(!err)
+        {
+        if (iCurrentLm == iLandmarks.Count() &&
+            iCurrentCategory == iCategories.Count())
+            {
+            iStatusFlag = KErrNone;
+            aProgress = KOperationDone;
+            }
+        else if (iCurrentIsLm)
+            {
+            aProgress = TReal32(iCurrentLm) / iLandmarks.Count();
+            }
+        else
+            {
+            aProgress = TReal32(iCurrentLm - 1) / iLandmarks.Count() +
+                        TReal32(iCurrentCategory + 1) /
+                        (iCategories.Count() + 1) /
+                        iLandmarks.Count();
+            }
+        }
+    else
+        {
+        iStatusFlag = err;
+        aProgress = KOperationDone;
+        }
+
+    User::RequestComplete( iStatus,iStatusFlag);
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkEncodeUnsavedLandmarksOp::ExecuteL
+// -----------------------------------------------------------------------------
+//
+void CLmkEncodeUnsavedLandmarksOp::ExecuteL()
+    {
+    // We never use asynchronous methods in synchronous way and therefore
+    // don't need to support this method
+    User::Leave( KErrNotSupported );
+    }
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/engine/src/CLmkEncoder.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,326 @@
+/*
+* Copyright (c) 2002-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 implements the methods which wrap functionality related
+*                to landmark encoding into a simpler interface.
+*
+*/
+
+
+
+
+
+
+
+// INCLUDE FILES
+
+#include <e32base.h>
+#include <e32std.h>
+#include <AknQueryDialog.h>
+#include <StringLoader.h>
+#include <lmkui.rsg>
+#include <EPos_CPosLandmarkDatabase.h>
+#include <EPos_CPosLandmarkEncoder.h>
+#include "LmkConsts.h"
+#include "Debug.h"
+#include "LmkFileUtils.h"
+#include "CLmkAOOperation.h"
+#include "CLmkEncoder.h"
+#include "CLmkEncodeUnsavedLandmarksOp.h"
+#include <lmkerrors.h>
+
+// CONSTANTS
+/// Unnamed namespace for local definitions
+namespace {
+
+_LIT8( KLandmarkMimeType, "application/vnd.nokia.landmarkcollection+xml" );
+// We wrap two async. tasks (export and write to file) into one
+// using estimated 0.8/0.2 progress distribution:
+const TReal32 KLmkExportMaxProgress( TReal32( 0.8 ) );
+
+#if defined(_DEBUG)
+_LIT( KPanicMsg, "CLmkEncoder" );
+
+void Panic( TPanicCode aReason )
+    {
+    User::Panic( KPanicMsg, aReason );
+    }
+#endif
+}  // namespace
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CLmkEncoder::CLmkEncoder
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+CLmkEncoder::CLmkEncoder(
+	CPosLandmarkDatabase& aDb,
+	MLmkAOOperationObserver& aObserver,
+	TBool aProgressNote )
+	: iDb( aDb ),
+	iObserver( aObserver ),
+	iProgressNote( aProgressNote )
+	{
+	}
+
+// -----------------------------------------------------------------------------
+// CLmkEncoder::NewL()
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CLmkEncoder* CLmkEncoder::NewL(
+	CPosLandmarkDatabase& aDb,
+	MLmkAOOperationObserver& aObserver,
+	TBool aProgressNote )
+	{
+	CLmkEncoder* self =
+	new ( ELeave ) CLmkEncoder( aDb, aObserver, aProgressNote );
+	CleanupStack::PushL( self );
+	self->ConstructL();
+	CleanupStack::Pop(); //self
+	return self;
+	}
+
+// -----------------------------------------------------------------------------
+// CLmkEncoder::ConstructL()
+// -----------------------------------------------------------------------------
+//
+void CLmkEncoder::ConstructL()
+	{
+	}
+
+// -----------------------------------------------------------------------------
+// CLmkEncoder::~CLmkEncoder()
+// -----------------------------------------------------------------------------
+//
+CLmkEncoder::~CLmkEncoder()
+	{
+	delete iAOOperation;
+	delete iEncoder;
+	}
+
+// -----------------------------------------------------------------------------
+// CLmkEncoder::HandleOperationL
+// -----------------------------------------------------------------------------
+//
+void CLmkEncoder::HandleOperationL(
+	TOperationTypes aType,
+	TReal32 aProgress,
+	TInt aStatus )
+	{
+	DEBUG2( CLmkEncoder::HandleOperationL entered: progress=%d status=%d,
+	aProgress, aStatus );
+
+	__ASSERT_DEBUG( aType == EEncode, Panic( KLmkPanicUnknownOperation ) );
+
+	if ( aStatus != KPosLmOperationNotComplete )
+		{
+		__ASSERT_DEBUG( iAOOperation, Panic( KLmkPanicNullMember ) );
+
+		delete iAOOperation;
+		iAOOperation = NULL;
+
+		if ( iExporting && aStatus == KErrNone )
+			{ // start second part of asynchronous task
+			FinalizeEncodingL();
+			aStatus = KPosLmOperationNotComplete;
+			}
+		}
+
+	// Modify progress information because we have wrapped two tasks into one:
+	if ( iExporting && aStatus == KPosLmOperationNotComplete )
+		{
+		aProgress = aProgress * KLmkExportMaxProgress;
+		}
+	else if ( !iExporting && aStatus == KPosLmOperationNotComplete )
+		{ // Progress of writing to file is between KLmkExportMaxProgress...1
+		aProgress = KLmkExportMaxProgress +
+		aProgress * ( 1 - KLmkExportMaxProgress );
+		}
+
+	if( iProgressNote || aStatus != KPosLmOperationNotComplete )
+		{ // Caller either requested to receive all events, or we
+		// have completed entirely and inform that to the caller.
+		iObserver.HandleOperationL( aType, aProgress, aStatus );
+		}
+}
+
+// -----------------------------------------------------------------------------
+// CLmkEncoder::SetPackageNameL
+// -----------------------------------------------------------------------------
+//
+//EXPORT_C void CLmkEncoder::SetPackageNameL( const TDesC& aName )
+void CLmkEncoder::SetPackageNameL( const TDesC& aName )
+	{
+	iEncoder->AddCollectionDataL( EPosLmCollDataCollectionName, aName );
+	}
+
+// -----------------------------------------------------------------------------
+// CLmkEncoder::StartEncodingL
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CLmkEncoder::StartEncodingL(
+	const TDesC& aFileName,
+	const RArray<TPosLmItemId>& aLandmarkIdArray )
+	{
+	DEBUG( CLmkEncoder::StartEncodingL entered );
+	LeaveIfInUseL();
+    PrepareEncoderL(aFileName);
+	if (aLandmarkIdArray.Count() > 1) // Only if multiple Landmarks Are selected
+		{
+	    // Set the package name here
+		SetPackageNameL(aFileName);
+		}
+
+	CPosLmOperation* operation =
+	iDb.ExportLandmarksL( *iEncoder,
+	                      aLandmarkIdArray,
+	                      CPosLandmarkDatabase::EIncludeCategories );
+	CleanupStack::PushL( operation );
+	iAOOperation = CLmkAOOperation::NewL( operation,
+	                                  *this,
+	                                  EEncode,
+	                                  iProgressNote );
+	CleanupStack::Pop( operation ); // ownership transferred
+
+	iExporting = ETrue; // exporting part of encoding is being done
+
+	DEBUG( CLmkEncoder::StartEncodingL: starting operation );
+	iAOOperation->StartOperation();
+	}
+
+// -----------------------------------------------------------------------------
+// CLmkEncoder::CancelEncodeOperationL
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CLmkEncoder::CancelEncodeOperationL()
+	{
+	if ( iAOOperation )
+		{
+		iAOOperation->Cancel();
+		delete iAOOperation;
+		iAOOperation = NULL;
+		}
+	}
+
+// -----------------------------------------------------------------------------
+// CLmkEncoder::FinalizeEncodingL
+// -----------------------------------------------------------------------------
+//
+void CLmkEncoder::FinalizeEncodingL()
+    {
+    DEBUG( CLmkEncoder::FinalizeEncodingL entered );
+
+    LeaveIfInUseL();
+
+    CPosLmOperation* operation = iEncoder->FinalizeEncodingL();
+    CleanupStack::PushL( operation );
+    iAOOperation = CLmkAOOperation::NewL( operation,
+                                          *this,
+                                          EEncode,
+                                          iProgressNote );
+    CleanupStack::Pop( operation ); // ownership transferred
+
+    iExporting = EFalse; // write to file -part of encoding is being done
+
+    DEBUG( CLmkEncoder::FinalizeEncodingL: starting operation );
+    iAOOperation->StartOperation();
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkEncoder::LeaveIfInUseL
+// -----------------------------------------------------------------------------
+//
+void CLmkEncoder::LeaveIfInUseL()
+    {
+    if ( iAOOperation )
+        {
+        User::Leave( KErrInUse );
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkEncoder::PrepareEncoderL
+// -----------------------------------------------------------------------------
+//
+void CLmkEncoder::PrepareEncoderL(const TDesC& aFileName)
+    {
+    // Full path name (Private path c:\\Provate\\UID3 + pacakge File name)
+    HBufC* nameBuf = HBufC::NewLC( 2 * KLmkPackageNameMaxLen +  KLmkEncodedDataFileExtension().Length() );
+
+	// For getting private path
+	TPtr ptr = 	nameBuf->Des();
+	RFs fs;
+    User::LeaveIfError(fs.Connect());
+    CleanupClosePushL(fs);
+    fs.SessionPath(ptr);
+    fs.MkDirAll(ptr);
+    CleanupStack::PopAndDestroy(); // fs
+
+	ptr.Append(aFileName);
+	ptr.Append(KLmkEncodedDataFileExtension);
+	TInt err = KErrNone;
+
+	if ( !iEncoder )
+		{
+		DEBUG( CLmkEncoder::StartEncodingL: creating encoder );
+		TRAP(err, iEncoder = CPosLandmarkEncoder::NewL( KLandmarkMimeType ));
+		DEBUG( CLmkEncoder::StartEncodingL: encoder created);
+		}
+    if(err != KErrNone)
+		{
+		LmkFileUtils::DeleteFileL( ptr ); // Delete old file if it exists
+	    CleanupStack::PopAndDestroy(nameBuf); //nameBuf
+	    User::LeaveIfError( err );
+		}
+    LmkFileUtils::DeleteFileL( ptr ); // Delete old file if it exists
+	iEncoder->SetOutputFileL( ptr );
+    CleanupStack::PopAndDestroy(nameBuf); //nameBuf
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkEncoder::StartEncodingL
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CLmkEncoder::StartEncodingL(
+	const TDesC& aFileName,
+	const RPointerArray<CLmkLandmark>& aLandmarks )
+	{
+	DEBUG( CLmkEncoder::StartEncodingL entered );
+	LeaveIfInUseL();
+    PrepareEncoderL(aFileName);
+	if (aLandmarks.Count() > 1) // Only if multiple Landmarks Are selected
+		{
+	    // Set the package name here
+		SetPackageNameL(aFileName);
+		}
+
+    CPosLmOperation* operation =
+            CLmkEncodeUnsavedLandmarksOp::NewL( *iEncoder,
+                                                aLandmarks,
+                                                    CPosLandmarkDatabase::EIncludeCategories);
+	CleanupStack::PushL( operation );
+	iAOOperation = CLmkAOOperation::NewL( operation,
+	                                  *this,
+	                                  EEncode,
+	                                  iProgressNote );
+	CleanupStack::Pop( operation ); // ownership transferred
+
+	iExporting = ETrue; // exporting part of encoding is being done
+
+	DEBUG( CLmkEncoder::StartEncodingL: starting operation );
+	iAOOperation->StartOperation();
+	}
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/engine/src/CLmkEventListenerSingleton.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,117 @@
+/*
+* 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:    LandmarksUi Content File -
+*
+*/
+
+
+
+
+
+
+
+
+// INCLUDE FILES
+#include "CLmkEventListenerSingleton.h"
+#include "CLmkDbEventListener.h"
+#include "LmkConsts.h"
+#include <lmkerrors.h>
+
+#if defined(_DEBUG)
+// CONSTANTS
+/// Unnamed namespace for local definitions
+namespace {
+
+_LIT( KPanicMsg, "CLmkEventListenerSingleton" );
+
+void Panic( TPanicCode aReason )
+    {
+    User::Panic( KPanicMsg, aReason );
+    }
+}  // namespace
+#endif
+// -----------------------------------------------------------------------------
+// CLmkEventListenerSingleton::CLmkEventListenerSingleton
+// C++ constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+CLmkEventListenerSingleton::CLmkEventListenerSingleton()
+    : CCoeStatic( KLmkEventListenerSingletonUid )
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkEventListenerSingleton::ConstructL
+// Symbian 2nd phase constructor can leave.
+// -----------------------------------------------------------------------------
+//
+void CLmkEventListenerSingleton::ConstructL()
+    {
+    __ASSERT_DEBUG( !iEventListener, Panic( KLmkPanicIllegalConstruction ) );
+    iEventListener = CLmkDbEventListener::NewL();
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkEventListenerSingleton::~CLmkEventListenerSingleton
+// -----------------------------------------------------------------------------
+//
+CLmkEventListenerSingleton::~CLmkEventListenerSingleton()
+    {
+    delete iEventListener;
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkEventListenerSingleton::AddObserverL
+// -----------------------------------------------------------------------------
+//
+void CLmkEventListenerSingleton::AddObserverL(
+    MLmkDbObserver& aObserver,
+    CPosLandmarkDatabase& aDb )
+    {
+	CLmkEventListenerSingleton* singleton =
+        static_cast<CLmkEventListenerSingleton*>(
+            CCoeEnv::Static( KLmkEventListenerSingletonUid ) );
+
+	if ( !singleton )
+		{
+		singleton = new ( ELeave ) CLmkEventListenerSingleton();
+        // CCoeEnv takes the ownership, but we must ensure that
+        // construction is complete, otherwise singleton can't be used.
+        CleanupStack::PushL( singleton );
+        singleton->ConstructL();
+        CleanupStack::Pop( singleton );
+		}
+
+    singleton->iEventListener->AddObserverL( aObserver, aDb );
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkEventListenerSingleton::RemoveObserver
+// -----------------------------------------------------------------------------
+//
+void CLmkEventListenerSingleton::RemoveObserver(
+    MLmkDbObserver& aObserver )
+    {
+	CLmkEventListenerSingleton* singleton =
+        static_cast<CLmkEventListenerSingleton*>(
+            CCoeEnv::Static( KLmkEventListenerSingletonUid ) );
+	if ( singleton )
+        {
+        singleton->iEventListener->RemoveObserver( aObserver );
+        }
+    // If singleton does not exist observer removal is unnecessary
+    }
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/engine/src/CLmkFieldData.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,345 @@
+/*
+* 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:    LandmarksUi Content File -
+*
+*/
+
+
+
+
+
+
+
+
+// INCLUDE FILES
+#include "CLmkFieldData.h"
+#include <lmkerrors.h>
+
+
+#if defined(_DEBUG)
+// CONSTANTS
+/// Unnamed namespace for local definitions
+namespace {
+
+_LIT( KPanicMsg, "CLmkFieldData");
+
+void Panic( TPanicCode aReason )
+    {
+    User::Panic( KPanicMsg, aReason );
+    }
+}  // namespace
+#endif
+// ============================ MEMBER FUNCTIONS ==============================
+// ----------------------------------------------------------------------------
+// CLmkFieldData::CLmkFieldData
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// ----------------------------------------------------------------------------
+//
+CLmkFieldData::CLmkFieldData() : iTitleField( EFalse )
+    {
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkFieldData::ConstructL
+// Symbian 2nd phase constructor can leave.
+// ----------------------------------------------------------------------------
+//
+void CLmkFieldData::ConstructL( HBufC* aLabel )
+    {
+    SetLabel( aLabel );
+    iTextData = HBufC::NewL(0);
+    iUniqueFieldIdentity = reinterpret_cast<TInt>(this);
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkFieldData::NewL
+// Two-phased constructor.
+// ----------------------------------------------------------------------------
+//
+CLmkFieldData* CLmkFieldData::NewL( HBufC* aLabel )
+    {
+    CLmkFieldData* self = new ( ELeave ) CLmkFieldData;
+    CleanupStack::PushL( self );
+    self->ConstructL( aLabel );
+    CleanupStack::Pop();
+    return self;
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkFieldData::~CLmkFieldData
+// ----------------------------------------------------------------------------
+//
+CLmkFieldData::~CLmkFieldData()
+    {
+    delete iTextData;
+    delete iIconPath;
+    iCategories.Close();
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkFieldData::SetLabel
+// ----------------------------------------------------------------------------
+//
+void CLmkFieldData::SetLabel( HBufC* aLabel )
+    {
+    __ASSERT_DEBUG( aLabel, Panic( KLmkPanicNullMember ) );
+    iLabel = aLabel;
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkFieldData::Label
+// ----------------------------------------------------------------------------
+//
+const HBufC& CLmkFieldData::Label() const
+    {
+    return *iLabel;
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkFieldData::SetEditorType
+// ----------------------------------------------------------------------------
+//
+void CLmkFieldData::SetEditorType( const TUint16 aType )
+    {
+    iEditorType = aType;
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkFieldData::EditorType
+// ----------------------------------------------------------------------------
+//
+TUint16 CLmkFieldData::EditorType() const
+    {
+    return iEditorType;
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkFieldData::SetText
+// ----------------------------------------------------------------------------
+//
+void CLmkFieldData::SetTextL( const TPtrC aText )
+    {
+    delete iTextData;
+    iTextData = NULL;
+    iTextData = aText.AllocL();
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkFieldData::SetText
+// ----------------------------------------------------------------------------
+//
+void CLmkFieldData::SetText( HBufC* aText )
+    {
+    if ( aText )
+        {
+        delete iTextData;
+        iTextData = aText;
+        }
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkFieldData::TextData
+// ----------------------------------------------------------------------------
+//
+const HBufC& CLmkFieldData::TextData() const
+    {
+    return *iTextData;
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkFieldData::SetInt
+// ----------------------------------------------------------------------------
+//
+void CLmkFieldData::SetInt( const TInt aTInt )
+    {
+    iIntData = aTInt;
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkFieldData::IntegerData
+// ----------------------------------------------------------------------------
+//
+TInt CLmkFieldData::IntegerData() const
+    {
+    return iIntData;
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkFieldData::SetTReal
+// ----------------------------------------------------------------------------
+//
+void CLmkFieldData::SetTReal( const TReal32 aTReal )
+    {
+    iTRealData32 = aTReal;
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkFieldData::FloatData
+// ----------------------------------------------------------------------------
+//
+TReal32 CLmkFieldData::FloatData() const
+    {
+    return iTRealData32;
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkFieldData::SetTReal
+// ----------------------------------------------------------------------------
+//
+void CLmkFieldData::SetTReal( const TReal64 aTReal )
+    {
+    iTRealData64 = aTReal;
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkFieldData::DoubleData
+// ----------------------------------------------------------------------------
+//
+TReal64 CLmkFieldData::DoubleData() const
+    {
+    return iTRealData64;
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkFieldData::Categories
+// ----------------------------------------------------------------------------
+//
+RArray<TPosLmItemId>& CLmkFieldData::Categories()
+    {
+    return iCategories;
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkFieldData::UniqueFieldIdentity
+// ----------------------------------------------------------------------------
+//
+TInt CLmkFieldData::UniqueFieldIdentity() const
+    {
+    return iUniqueFieldIdentity;
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkFieldData::SetFieldType
+// ----------------------------------------------------------------------------
+//
+void CLmkFieldData::SetFieldType( const TUint16 aFieldType )
+    {
+    iFieldType = aFieldType;
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkFieldData::FieldType
+// ----------------------------------------------------------------------------
+//
+TUint16 CLmkFieldData::FieldType() const
+    {
+    return iFieldType;
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkFieldData::SetPositionFieldId
+// ----------------------------------------------------------------------------
+//
+void CLmkFieldData::SetPositionFieldId( const TUint16 aPositionFieldId )
+    {
+    iPositionFieldId = aPositionFieldId;
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkFieldData::PositionFieldId
+// ----------------------------------------------------------------------------
+//
+TUint16 CLmkFieldData::PositionFieldId() const
+    {
+    return iPositionFieldId;
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkFieldData::SetFieldLength
+// ----------------------------------------------------------------------------
+//
+void CLmkFieldData::SetFieldLength( const TInt aLength )
+    {
+    iFieldLength = aLength;
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkFieldData::FieldLength
+// ----------------------------------------------------------------------------
+//
+TInt CLmkFieldData::FieldLength() const
+    {
+    return iFieldLength;
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkFieldData::SetTitleField
+// ----------------------------------------------------------------------------
+//
+void CLmkFieldData::SetTitleField( const TBool aTitleField )
+    {
+    iTitleField = aTitleField;
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkFieldData::IsTitleField
+// ----------------------------------------------------------------------------
+//
+TBool CLmkFieldData::IsTitleField() const
+    {
+    return iTitleField;
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkFieldData::SetIconId
+// ----------------------------------------------------------------------------
+//
+void CLmkFieldData::SetIconId( const TInt aIconId )
+    {
+    iIconId = aIconId;
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkFieldData::IconId
+// ----------------------------------------------------------------------------
+//
+TInt CLmkFieldData::IconId() const
+    {
+    return iIconId;
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkFieldData::SetIconPathL
+// ----------------------------------------------------------------------------
+//
+void CLmkFieldData::SetIconPathL( const TDesC& aIconPath )
+    {
+    if ( aIconPath.Length() > 0 )
+        {
+        delete iIconPath;
+        iIconPath = NULL;
+        iIconPath = aIconPath.AllocL();
+        }
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkFieldData::IconPath
+// ----------------------------------------------------------------------------
+//
+HBufC* CLmkFieldData::IconPath()
+    {
+    return iIconPath;
+    }
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/engine/src/CLmkFields.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,956 @@
+/*
+* Copyright (c) 2002-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:    LandmarksUi Content File -    This file has implementation methods for Landmarks
+*                individual fields.
+*
+*/
+
+
+
+
+
+
+
+// INCLUDE FILES
+#include <sysutil.h>
+#include <e32math.h>
+#include <EPos_CPosLandmarkDatabase.h>
+#include <AknUtils.h>
+#include "landmarks.hrh"
+#include "LmkConsts.h"
+#include "CLmkDbUtils.h"
+#include "CLmkFieldData.h"
+#include "CLmkFields.h"
+
+// CONSTANTS
+const TInt KMaxFieldLength50( 50 );
+const TInt KMaxFieldLength20( 20 );
+const TInt KMaxFieldLength10( 10 );
+//const TInt KParaChar( 0x2029 );
+
+
+// ============================ MEMBER FUNCTIONS ==============================
+// ----------------------------------------------------------------------------
+// CLmkFields::CLmkFields
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// ----------------------------------------------------------------------------
+//
+
+CLmkFields::CLmkFields(
+    RPointerArray<HBufC>& aLabelArray,
+    CPosLandmarkDatabase& aDb,
+    TLmkEditorAttributes aAttributes,
+    TPosLmItemId aLandmarkId,
+    CPosLandmark* aLandmark,
+    TBool aJapaneseInputMode)
+    : iDb( aDb ),
+      iAttributes( aAttributes ),
+      iLandmarkId( aLandmarkId ),
+      iLandmark( aLandmark ),
+      iFieldsArray(5),
+      iLabelArray( &aLabelArray ),
+      iJapaneseMode( aJapaneseInputMode )
+    {
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkFields::ConstructL
+// Symbian 2nd phase constructor can leave.
+// ----------------------------------------------------------------------------
+//
+void CLmkFields::ConstructL()
+    {
+    iNewLandmark = EFalse;
+    if ( !iLandmark )
+        {
+        if ( iLandmarkId != KPosLmNullItemId )
+            {
+            iLandmark = iDb.ReadLandmarkLC(iLandmarkId);
+            iNewLandmark = ETrue;
+            CleanupStack::Pop(); //landmark
+            }
+        else
+            {
+            //create new empty landmark
+            iLandmark = CPosLandmark::NewL();
+            iNewLandmark = ETrue;
+            }
+        }
+
+    TRealX nan;
+    nan.SetNaN();
+        
+	iLocationData.iLatitude				=nan;
+	iLocationData.iLongitude			=nan;
+	iLocationData.iAltitude				=nan;
+	iLocationData.iVerticalAccuracy		=nan;               
+	iLocationData.iHorizontalAccuracy	=nan;
+	
+    CreateLmkFieldsL();
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkFields::NewL
+// Two-phased constructor.
+// ----------------------------------------------------------------------------
+//
+EXPORT_C CLmkFields* CLmkFields::NewL( RPointerArray<HBufC>& aLabelArray,
+                                       CPosLandmarkDatabase& aDb,
+                                       TLmkEditorAttributes aAttributes,
+                                       TPosLmItemId aLandmarkId,
+                                       CPosLandmark* aLandmark,
+                                       TBool aJapaneseInputMode )
+
+    {
+
+    CLmkFields* self = new ( ELeave ) CLmkFields( aLabelArray,
+                                                  aDb,
+                                                  aAttributes,
+                                                  aLandmarkId,
+                                                  aLandmark,
+                                                  aJapaneseInputMode );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop();
+    return self;
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkFields::~CLmkFields
+// ----------------------------------------------------------------------------
+//
+EXPORT_C CLmkFields::~CLmkFields()
+    {
+    if ( iNewLandmark )
+        {
+        delete iLandmark;
+        }
+    iFieldsArray.ResetAndDestroy();
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkFields::Fields
+// ----------------------------------------------------------------------------
+//
+EXPORT_C CArrayPtrFlat<MLmkFieldData>& CLmkFields::Fields()
+    {
+    return iFieldsArray;
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkFields::SaveFieldsL
+// ----------------------------------------------------------------------------
+//
+EXPORT_C void CLmkFields::SaveFieldsL()
+	{
+
+    TInt count(iFieldsArray.Count());
+    TBool isPosFieldPresent = EFalse;
+    
+    for ( TInt i = 0; i < count; i++ )
+        {
+        switch( iFieldsArray[i]->FieldType() )
+            {
+            case EName:
+                {
+                iLandmark->SetLandmarkNameL( iFieldsArray[i]->TextData() );
+                HBufC* path = iFieldsArray[i]->IconPath();
+                if ( path && path->Length() > 0 &&
+                    iFieldsArray[i]->IconId() != KErrNotFound )
+                    {
+                    // Get the default Mask index
+                    iLandmark->SetIconL( *path, iFieldsArray[i]->IconId() , KLmkDefaultId+1);
+                    }
+
+                break;
+                }
+            case ECategory:
+            case ECategories:
+                {
+                //Add categories to landmark
+                RArray<TPosLmItemId>& categories =
+                    iFieldsArray[i]->Categories();
+                TInt Tcount( categories.Count() );
+                for ( TInt j=0; j < Tcount; j++ )
+                    {
+                    iLandmark->AddCategoryL( categories[j] );
+                    }
+                break;
+                }
+			case EDescription:
+				{
+				iLandmark->SetLandmarkDescriptionL( iFieldsArray[i]->TextData() );
+				break;
+				}
+            //these all are same
+            case EStreet:
+            case EPostCode:
+            case ECity:
+            case EStateProvince:
+            case ECountry:
+			case EPhoneNumber:
+			case EWebAddress:
+                {
+                iLandmark->SetPositionFieldL(
+                        iFieldsArray[i]->PositionFieldId(),
+                        iFieldsArray[i]->TextData() );
+                break;
+                }
+            case ELatitude:
+                {
+                isPosFieldPresent = ETrue;
+                iLocationData.iLatitude = iFieldsArray[i]->DoubleData();
+                break;
+                }
+            case ELongitude:
+                {
+                isPosFieldPresent = ETrue;
+                iLocationData.iLongitude = iFieldsArray[i]->DoubleData();
+                break;
+                }
+            case EPositionAccuracy:
+                {
+                iLocationData.iHorizontalAccuracy =
+                    iFieldsArray[i]->FloatData();
+                break;
+                }
+            case EAltitude:
+                {
+                iLocationData.iAltitude = iFieldsArray[i]->FloatData();
+                break;
+                }
+            case EAltitudeAccuracy:
+                {
+                iLocationData.iVerticalAccuracy = iFieldsArray[i]->FloatData();
+                break;
+                }
+            default:
+                {
+                break;
+                }
+            }
+        }
+
+    //Position data
+    iLocality = TLocality(); // empty locality
+    
+    if( isPosFieldPresent )
+        {
+        // remove the old values to set new values       
+        iLandmark->RemoveLandmarkAttributes(CPosLandmark::EPosition);
+
+        if ( !Math::IsNaN(iLocationData.iLatitude) && !Math::IsNaN(iLocationData.iLongitude) )         
+            {
+            if (!Math::IsNaN(iLocationData.iAltitude))
+                {
+                iLocality.SetCoordinate(
+                    iLocationData.iLatitude,
+                    iLocationData.iLongitude,
+                    iLocationData.iAltitude);
+
+                if (!Math::IsNaN(iLocationData.iVerticalAccuracy))
+                    {
+                    if( iLocationData.iVerticalAccuracy > 0 )
+                        iLocality.SetVerticalAccuracy(iLocationData.iVerticalAccuracy);
+                    }
+                }
+            else
+                {
+                iLocality.SetCoordinate(
+                    iLocationData.iLatitude,
+                    iLocationData.iLongitude);
+                }
+
+            if (!Math::IsNaN(iLocationData.iHorizontalAccuracy))
+                {
+                if( iLocationData.iHorizontalAccuracy > 0 )
+                    iLocality.SetHorizontalAccuracy(iLocationData.iHorizontalAccuracy);
+                }
+            // save position if at least lat/lon are entered
+            iLandmark->SetPositionL(iLocality);            
+            }
+        }
+
+    /*
+    * Check if this landmark still exists in database
+    * (could have been potentially deleted some other app)
+    * It it doesn't, then create a new landmark and add it to database
+    */
+
+    TBool isLmPresent = ETrue;
+    CPosLandmark *landmark = NULL;
+    TPosLmItemId lmId = iLandmark->LandmarkId();
+
+    TRAPD(err, landmark = iDb.ReadLandmarkLC(lmId);
+		CleanupStack::PopAndDestroy(landmark);
+    )
+
+    if (err == KErrNotFound) // Landmark deleted already
+	    {
+	    isLmPresent = EFalse;
+	    }
+
+    if ( (isLmPresent) &&
+       (iLandmark->LandmarkId() != KPosLmNullItemId) ) // Landmark exists in db
+        {
+        iDb.UpdateLandmarkL( *iLandmark );
+        }
+    else // Lm does not exist in db
+        {
+        iLandmarkId = iDb.AddLandmarkL( *iLandmark );
+        }
+	}
+
+// ----------------------------------------------------------------------------
+// CLmkFields::DeleteLandmarkL
+// ----------------------------------------------------------------------------
+//
+EXPORT_C void CLmkFields::DeleteLandmarkL()
+    {
+    if ( iLandmark )
+        {
+        CLmkDbUtils::DeleteLandmarkL( iLandmark->LandmarkId(), iDb );
+        }
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkFields::GetField
+// ----------------------------------------------------------------------------
+//
+EXPORT_C MLmkFieldData* CLmkFields::GetField( TUint16 aFieldType )
+    {
+    TInt count( iFieldsArray.Count() );
+
+    for ( TInt i=0; i<count; i++ )
+        {
+        if ( iFieldsArray[i]->FieldType() == aFieldType )
+            {
+            return iFieldsArray[i];
+            }
+        }
+    return NULL;
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkFields::CreateLmkFieldsL
+// ----------------------------------------------------------------------------
+//
+EXPORT_C TPosLmItemId CLmkFields::LandmarkId() const
+    {
+    return iLandmarkId;
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkFields::CreateLmkFieldsL
+// ----------------------------------------------------------------------------
+//
+void CLmkFields::CreateLmkFieldsL()
+    {
+    if ( iJapaneseMode ) // Japanese mode
+        {
+        CreateLmkFieldsInJapaneseModeL();
+        }
+    else
+        {
+        CreateLmkFieldsInNormalModeL();
+        }
+    }
+// ----------------------------------------------------------------------------
+// CLmkFields::CreateLmkFieldsInJapaneseModeL()
+// ----------------------------------------------------------------------------
+//
+void CLmkFields::CreateLmkFieldsInJapaneseModeL()
+    {
+    // Japanese address fields format
+    //get location position
+    iLandmark->GetPosition( iLocality );
+    CreateNameFieldL( ENameJapaneseMode ); // name field is always shown
+
+    if ( ( iAttributes & CLmkEditorDlg::ELmkCategory ) != 0 )
+        {
+        CreateCategoryFieldL();
+        }
+    if ( ( iAttributes & CLmkEditorDlg::ELmkDescription ) != 0 )
+        {
+        CreateDescriptionFieldL( EDescriptionJapaneseMode );
+        }
+    if ( ( iAttributes & CLmkEditorDlg::ELmkPostalZIP ) != 0 )
+        {
+        CreatePostCodeFieldL( EPostCodeJapaneseMode );
+        }
+    if ( ( iAttributes & CLmkEditorDlg::ELmkStateProvince ) != 0 )
+        {
+        CreateStateProvinceFieldL( EStateProvinceJapaneseMode );
+        }
+    if ( ( iAttributes & CLmkEditorDlg::ELmkCity ) != 0 )
+        {
+        CreateCityFieldL( ECityJapaneseMode );
+        }
+    if ( ( iAttributes & CLmkEditorDlg::ELmkStreet ) != 0 )
+        {
+        CreateStreetFieldL( EStreetJapaneseMode );
+        }
+    if ( ( iAttributes & CLmkEditorDlg::ELmkCountry ) != 0 )
+        {
+        CreateCountryFieldL( ECountryJapaneseMode );
+        }
+    if ( ( iAttributes & CLmkEditorDlg::ELmkPhoneNumber ) != 0 )
+        {
+        CreatePhoneNumberFieldL( EPhoneNumberJapaneseMode );
+        }
+    if ( ( iAttributes & CLmkEditorDlg::ELmkWebAddress ) != 0 )
+        {
+        CreateWebAddressFieldL(	EWebAddressJapaneseMode );
+        }
+    if ( ( iAttributes & CLmkEditorDlg::ELmkLatitude ) != 0 )
+        {
+        CreateLatitudeFieldsL( ELatitudeJapaneseMode );
+        }
+    if ( ( iAttributes & CLmkEditorDlg::ELmkLongitude ) != 0 )
+        {
+        CreateLongitudeFieldsL( ELongitudeJapaneseMode );
+        }
+    if ( ( iAttributes & CLmkEditorDlg::ELmkPositionAccuracy ) != 0 )
+        {
+        CreatePositionAccuracyFieldL( EPositionAccuracyJapaneseMode );
+        }
+    if ( ( iAttributes & CLmkEditorDlg::ELmkAltitude ) != 0 )
+        {
+        CreateAltitudeFieldL( EAltitudeJapaneseMode );
+        }
+    if ( ( iAttributes & CLmkEditorDlg::ELmkAltitudeAccuracy ) != 0 )
+        {
+        CreateAltitudeAccuracyFieldL( EAltitudeAccuracyJapaneseMode );
+        }
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkFields::CreateLmkFieldsInNormalModeL()
+// ----------------------------------------------------------------------------
+//
+void CLmkFields::CreateLmkFieldsInNormalModeL()
+    {
+    //get location position
+    iLandmark->GetPosition( iLocality );
+    CreateNameFieldL( EName ); // name field is always shown
+
+    if ( ( iAttributes & CLmkEditorDlg::ELmkCategory ) != 0 )
+        {
+        CreateCategoryFieldL( );
+        }
+    if ( ( iAttributes & CLmkEditorDlg::ELmkDescription ) != 0 )
+        {
+        CreateDescriptionFieldL( EDescription );
+        }
+    if ( ( iAttributes & CLmkEditorDlg::ELmkStreet ) != 0 )
+        {
+        CreateStreetFieldL( EStreet );
+        }
+    if ( ( iAttributes & CLmkEditorDlg::ELmkPostalZIP ) != 0 )
+        {
+        CreatePostCodeFieldL( EPostCode );
+        }
+    if ( ( iAttributes & CLmkEditorDlg::ELmkCity ) != 0 )
+        {
+        CreateCityFieldL( ECity );
+        }
+    if ( ( iAttributes & CLmkEditorDlg::ELmkStateProvince ) != 0 )
+        {
+        CreateStateProvinceFieldL( EStateProvince );
+        }
+    if ( ( iAttributes & CLmkEditorDlg::ELmkCountry ) != 0 )
+        {
+        CreateCountryFieldL( ECountry );
+        }
+    if ( ( iAttributes & CLmkEditorDlg::ELmkPhoneNumber ) != 0 )
+        {
+        CreatePhoneNumberFieldL( EPhoneNumberJapaneseMode );
+        }
+    if ( ( iAttributes & CLmkEditorDlg::ELmkWebAddress ) != 0 )
+        {
+        CreateWebAddressFieldL(	EWebAddressJapaneseMode );
+        }
+    if ( ( iAttributes & CLmkEditorDlg::ELmkLatitude ) != 0 )
+        {
+        CreateLatitudeFieldsL( ELatitude );
+        }
+    if ( ( iAttributes & CLmkEditorDlg::ELmkLongitude ) != 0 )
+        {
+        CreateLongitudeFieldsL( ELongitude );
+        }
+    if ( ( iAttributes & CLmkEditorDlg::ELmkPositionAccuracy ) != 0 )
+        {
+        CreatePositionAccuracyFieldL( EPositionAccuracy );
+        }
+    if ( ( iAttributes & CLmkEditorDlg::ELmkAltitude ) != 0 )
+        {
+        CreateAltitudeFieldL( EAltitude );
+        }
+    if ( ( iAttributes & CLmkEditorDlg::ELmkAltitudeAccuracy ) != 0 )
+        {
+        CreateAltitudeAccuracyFieldL( EAltitudeAccuracy );
+        }
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkFields::CreateNameFieldL
+// ----------------------------------------------------------------------------
+//
+void CLmkFields::CreateNameFieldL( TInt aPos )
+    {
+    // Landmark name field includes also icon id and path
+
+    MLmkFieldData* field = CLmkFieldData::NewL(
+                            iLabelArray->operator[]( aPos ) );
+    CleanupStack::PushL(field);
+
+    TPtrC lmkName;
+    if ( iLandmark->GetLandmarkName( lmkName ) == KErrNone )
+        {
+        field->SetTextL( lmkName );
+        field->SetFieldType( EName );
+        }
+
+    TPtrC iconPath;
+    TInt iconId;
+    TInt iconMaskIndex;
+
+
+    if ( iLandmark->GetIcon(iconPath,iconId,  iconMaskIndex) == KErrNone )
+        {
+        field->SetIconId( iconId );
+        field->SetIconPathL( iconPath );
+        }
+    else
+        {
+        field->SetIconId( KErrNotFound );
+        }
+
+    field->SetPositionFieldId( EPositionFieldNone );
+    field->SetEditorType( ETextGenericFieldEditor );
+    field->SetFieldLength( KMaxFieldLength50 );
+    field->SetTitleField( ETrue );
+    iFieldsArray.AppendL(field);
+
+    CleanupStack::Pop(); //field
+
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkFields::CreateCategoryFieldL
+// ----------------------------------------------------------------------------
+//
+void CLmkFields::CreateCategoryFieldL()
+    {
+    TInt catLabelPos(0);
+    if ( iJapaneseMode )
+        {
+        catLabelPos = ECategoryJapaneseMode;
+        }
+    else
+        {
+        catLabelPos = ECategoryJapaneseMode;
+        }
+
+    MLmkFieldData* field = CLmkFieldData::NewL(
+                             iLabelArray->operator[](catLabelPos) );
+    CleanupStack::PushL(field);
+
+    RArray<TPosLmItemId>& categories = field->Categories();
+    iLandmark->GetCategoriesL(categories);
+
+    field->SetPositionFieldId( EPositionFieldNone );
+    if ( categories.Count() <= 1 )
+        {
+        field->SetFieldType( ECategory );
+        }
+    else
+        {
+        field->SetFieldType( ECategories );
+        if ( iJapaneseMode )
+            {
+            field->SetLabel( iLabelArray->operator[]( ECategoriesJapaneseMode ) );
+            }
+        else
+            {
+            field->SetLabel( iLabelArray->operator[]( ECategories ) );
+            }
+        }
+    field->SetEditorType( EListFieldEditor );
+    iFieldsArray.AppendL(field);
+    CleanupStack::Pop(); //field
+
+    //Remove all categories from landmark
+    TInt count( categories.Count() );
+    for ( TInt i=0; i < count; i++ )
+        {
+        iLandmark->RemoveCategory( categories[i] );
+        }
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkFields::CreateStreetFieldL
+// ----------------------------------------------------------------------------
+//
+void CLmkFields::CreateStreetFieldL( TInt aPos )
+    {
+    MLmkFieldData* field = CLmkFieldData::NewL(
+                                iLabelArray->operator[]( aPos ) );
+    CleanupStack::PushL(field);
+
+    TPtrC street;
+    if ( iLandmark->GetPositionField(
+            EPositionFieldStreet, street ) == KErrNone )
+        {
+        field->SetTextL( street );
+        }
+
+    field->SetFieldType( EStreet );
+    field->SetPositionFieldId( EPositionFieldStreet );
+    field->SetEditorType( ETextGenericFieldEditor );
+    field->SetFieldLength( KMaxFieldLength50 );
+    iFieldsArray.AppendL(field);
+
+    CleanupStack::Pop(); //field
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkFields::CreateCityFieldL
+// ----------------------------------------------------------------------------
+//
+void CLmkFields::CreateCityFieldL( TInt aPos )
+    {
+    MLmkFieldData* field = CLmkFieldData::NewL(
+                            iLabelArray->operator[]( aPos ) );
+    CleanupStack::PushL(field);
+
+    TPtrC city;
+    if ( iLandmark->GetPositionField( EPositionFieldCity, city ) == KErrNone )
+        {
+        field->SetTextL( city );
+        }
+
+    field->SetFieldType( ECity );
+    field->SetPositionFieldId( EPositionFieldCity );
+    field->SetEditorType( ETextGenericFieldEditor );
+    field->SetFieldLength( KMaxFieldLength50 );
+    iFieldsArray.AppendL(field);
+
+    CleanupStack::Pop(); //field
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkFields::CreateStateProvinceFieldL
+// ----------------------------------------------------------------------------
+//
+void CLmkFields::CreateStateProvinceFieldL( TInt aPos )
+    {
+    MLmkFieldData* field = CLmkFieldData::NewL(
+                            iLabelArray->operator[]( aPos ) );
+    CleanupStack::PushL(field);
+
+    TPtrC stateProvince;
+    if ( iLandmark->GetPositionField(
+          EPositionFieldState, stateProvince ) == KErrNone )
+        {
+        field->SetTextL( stateProvince );
+        }
+
+    field->SetFieldType( EStateProvince );
+    field->SetPositionFieldId( EPositionFieldState );
+    field->SetEditorType( ETextGenericFieldEditor );
+    field->SetFieldLength( KMaxFieldLength50 );
+    iFieldsArray.AppendL(field);
+
+    CleanupStack::Pop(); //field
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkFields::CreateCountryFieldL
+// ----------------------------------------------------------------------------
+//
+void CLmkFields::CreateCountryFieldL( TInt aPos )
+    {
+    MLmkFieldData* field = CLmkFieldData::NewL(
+                            iLabelArray->operator[]( aPos ) );
+    CleanupStack::PushL(field);
+
+    TPtrC country;
+    if ( iLandmark->GetPositionField(
+          EPositionFieldCountry, country ) == KErrNone )
+        {
+        field->SetTextL( country );
+        }
+
+    field->SetFieldType( ECountry );
+    field->SetPositionFieldId( EPositionFieldCountry );
+    field->SetEditorType( ETextGenericFieldEditor );
+    field->SetFieldLength( KMaxFieldLength50 );
+    iFieldsArray.AppendL(field);
+
+    CleanupStack::Pop(); //field
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkFields::CreatePostCodeFieldL
+// ----------------------------------------------------------------------------
+//
+void CLmkFields::CreatePostCodeFieldL( TInt aPos )
+    {
+    MLmkFieldData* field = CLmkFieldData::NewL(
+                            iLabelArray->operator[]( aPos) );
+    CleanupStack::PushL(field);
+
+    TPtrC postcode;
+    if ( iLandmark->GetPositionField(
+          EPositionFieldPostalCode, postcode ) == KErrNone )
+        {
+        field->SetTextL( postcode );
+        }
+
+    field->SetFieldType( EPostCode );
+    field->SetPositionFieldId( EPositionFieldPostalCode );
+    field->SetEditorType( ETextGenericFieldEditor );
+    field->SetFieldLength( KMaxFieldLength20 );
+    iFieldsArray.AppendL(field);
+
+    CleanupStack::Pop(); //field
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkFields::CreateLatitudeFieldsL
+// ----------------------------------------------------------------------------
+//
+void CLmkFields::CreateLatitudeFieldsL( TInt aPos )
+    {
+    MLmkFieldData* field = CLmkFieldData::NewL(
+                            iLabelArray->operator[]( aPos ) );
+    CleanupStack::PushL(field);
+
+    field->SetFieldType( ELatitude );
+    field->SetPositionFieldId( EPositionFieldNone );
+    field->SetEditorType( ECoordinateFieldEditor );
+    field->SetFieldLength( KMaxFieldLength10 );
+    field->SetTReal( iLocality.Latitude() );
+    iFieldsArray.AppendL(field);
+
+    CleanupStack::Pop(); //field
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkFields::CreateLongitudeFieldsL
+// ----------------------------------------------------------------------------
+//
+void CLmkFields::CreateLongitudeFieldsL( TInt aPos )
+    {
+    MLmkFieldData* field = CLmkFieldData::NewL(
+                            iLabelArray->operator[]( aPos ) );
+    CleanupStack::PushL(field);
+
+    field->SetFieldType( ELongitude );
+    field->SetPositionFieldId( EPositionFieldNone );
+    field->SetEditorType( ECoordinateFieldEditor );
+    field->SetFieldLength( KMaxFieldLength10 );
+    field->SetTReal( iLocality.Longitude() );
+    iFieldsArray.AppendL(field);
+
+    CleanupStack::Pop(); //field
+    }
+// ----------------------------------------------------------------------------
+// CLmkFields::CreatePositionAccuracyFieldL
+// ----------------------------------------------------------------------------
+//
+void CLmkFields::CreatePositionAccuracyFieldL( TInt aPos )
+    {
+    MLmkFieldData* field = CLmkFieldData::NewL(
+                             iLabelArray->operator[]( aPos ) );
+    CleanupStack::PushL(field);
+
+    field->SetFieldType( EPositionAccuracy );
+    field->SetPositionFieldId( EPositionFieldNone );
+    field->SetEditorType( ENumberFieldEditor );
+    field->SetFieldLength( KMaxFieldLength10 );
+    field->SetTReal( iLocality.HorizontalAccuracy() );
+    iFieldsArray.AppendL(field);
+
+    CleanupStack::Pop(); //field
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkFields::CreateAltitudeFieldL
+// ----------------------------------------------------------------------------
+//
+void CLmkFields::CreateAltitudeFieldL( TInt aPos )
+    {
+    MLmkFieldData* field = CLmkFieldData::NewL(
+                            iLabelArray->operator[]( aPos ) );
+    CleanupStack::PushL(field);
+
+    field->SetFieldType( EAltitude );
+    field->SetPositionFieldId( EPositionFieldNone );
+    field->SetEditorType( ENumberFieldEditor );
+    field->SetFieldLength( KMaxFieldLength10 );
+    field->SetTReal( iLocality.Altitude() );
+    iFieldsArray.AppendL(field);
+
+    CleanupStack::Pop(); //field
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkFields::CreateAltitudeAccuracyFieldL
+// ----------------------------------------------------------------------------
+//
+void CLmkFields::CreateAltitudeAccuracyFieldL( TInt aPos )
+    {
+    MLmkFieldData* field = CLmkFieldData::NewL(
+                            iLabelArray->operator[]( aPos ) );
+    CleanupStack::PushL(field);
+
+    field->SetFieldType( EAltitudeAccuracy );
+    field->SetPositionFieldId( EPositionFieldNone );
+    field->SetEditorType( ENumberFieldEditor );
+    field->SetFieldLength( KMaxFieldLength10 );
+    field->SetTReal( iLocality.VerticalAccuracy() );
+    iFieldsArray.AppendL(field);
+
+    CleanupStack::Pop(); //field
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkFields::CreateDescriptionFieldL
+// ----------------------------------------------------------------------------
+//
+void CLmkFields::CreateDescriptionFieldL( TInt aPos )
+    {
+    MLmkFieldData* field = CLmkFieldData::NewL(
+                                iLabelArray->operator[]( aPos ) );
+    CleanupStack::PushL(field);
+
+    TPtrC lmkDescription;
+
+    // Get the description field info
+    if ( iLandmark->GetLandmarkDescription( lmkDescription ) == KErrNone )
+        {
+        field->SetTextL( lmkDescription );
+        field->SetFieldType( EDescription );
+        }
+
+    field->SetFieldType( EDescription );
+    field->SetPositionFieldId(  EPositionFieldNone );
+    field->SetEditorType( ETextGenericFieldEditor );
+    field->SetFieldLength( KMaxDescriptionFieldLen );
+    iFieldsArray.AppendL(field);
+    CleanupStack::Pop(); //field
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkFields::CreatePhoneNumberFieldL
+// ----------------------------------------------------------------------------
+//
+void CLmkFields::CreatePhoneNumberFieldL( TInt aPos )
+    {
+    MLmkFieldData* field = CLmkFieldData::NewL(
+                                iLabelArray->operator[]( aPos ) );
+    CleanupStack::PushL(field);
+
+    TPtrC phoneNumber;
+    if ( iLandmark->GetPositionField(
+             ELmkPositionFieldPhoneNumber, phoneNumber ) == KErrNone )
+        {
+        field->SetTextL( phoneNumber );
+        }
+
+    field->SetFieldType( EPhoneNumber );
+    field->SetPositionFieldId( ELmkPositionFieldPhoneNumber );
+    field->SetEditorType( ETextPhoneNumberFieldEditor );
+    field->SetFieldLength( KMaxPhoneNumberFieldLen );
+    iFieldsArray.AppendL(field);
+
+    CleanupStack::Pop(); //field
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkFields::CreateWebAddressFieldL
+// ----------------------------------------------------------------------------
+//
+void CLmkFields::CreateWebAddressFieldL( TInt aPos )
+    {
+    MLmkFieldData* field = CLmkFieldData::NewL( iLabelArray->operator[]( aPos ) );
+    CleanupStack::PushL(field);
+
+    TPtrC webAddress;
+    if ( iLandmark->GetPositionField(
+            	ELmkPositionFieldWebAddress, webAddress ) == KErrNone )
+        {
+        field->SetTextL( webAddress );
+        }
+
+    /*
+     * Web Address field is one of the data part of whole media link info
+     * Media link -- name + Mime Info/format + URL
+     * Right now Mime info not supported.
+     * landmark's media link info containing '//' indicates a empty mime info
+     * and remove the same before saving the received landmark to database
+     */
+
+    HBufC* lmkField =  HBufC::NewL( 256);
+    CleanupStack::PushL( lmkField );
+    lmkField->Des().Copy( field->TextData() );
+    TPtr a = lmkField->Des();
+    CLmkDbUtils::RemoveDefaultProtocolL(a);
+    field->SetTextL( lmkField->Des());
+    CleanupStack::PopAndDestroy( lmkField );
+
+    field->SetFieldType( EWebAddress);
+    field->SetPositionFieldId( ELmkPositionFieldWebAddress);
+    field->SetEditorType( ETextUriFieldEditor );
+    field->SetFieldLength( KMaxUrlFieldLen);
+    iFieldsArray.AppendL(field);
+
+    CleanupStack::Pop(); //field
+    }
+//----------------------------------------------------------------------------
+// CLmkFields::CheckDiscSpace()
+// ----------------------------------------------------------------------------
+//
+EXPORT_C TInt CLmkFields::CheckDiscSpaceL()
+    {
+    RFs fs;
+    User::LeaveIfError(fs.Connect());
+    CleanupClosePushL( fs );
+    if ( SysUtil::DiskSpaceBelowCriticalLevelL( &fs, sizeof( CPosLandmark ), EDriveC ) )
+        {
+        CleanupStack::PopAndDestroy(); // fs
+        return KErrDiskFull;
+        }
+    CleanupStack::PopAndDestroy(); // fs
+    return KErrNone;
+    }
+//----------------------------------------------------------------------------
+// CLmkFields::RemoveEnterCharacter()
+// ----------------------------------------------------------------------------
+//
+EXPORT_C TPtr  CLmkFields::RemoveEnterCharacter( TPtrC aText )
+	{
+	_LIT( KReplaceWhitespaceChars, "\x0009\x000A\x000B\x000C\x000D\x2028\x2029" );
+	_LIT(KSpace," ");
+	TUint16* data = const_cast<TUint16*>(aText.Ptr());
+    TPtr des1(data,aText.Length());
+    des1.Copy(aText);
+	AknTextUtils::ReplaceCharacters(des1,KReplaceWhitespaceChars,TChar(' '));
+	AknTextUtils::PackWhiteSpaces(des1, KSpace);
+    return des1;
+	}
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/engine/src/CLmkIconOperation.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,206 @@
+/*
+* 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:    LandmarksUi Content File -
+*
+*/
+
+
+
+
+
+
+
+
+// INCLUDE FILES
+#include "CLmkIconOperation.h"
+#include <EPos_CPosLmCategoryManager.h>
+#include "LmkConsts.h"
+#include <lmkerrors.h>
+
+#if defined(_DEBUG)
+// CONSTANTS
+/// Unnamed namespace for local definitions
+namespace {
+
+_LIT( KPanicMsg, "CLmkIconOperation" );
+
+void Panic( TPanicCode aReason )
+    {
+    User::Panic( KPanicMsg, aReason );
+    }
+}  // namespace
+#endif
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CLmkIconOperation::CLmkIconOperation
+// C++ constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+CLmkIconOperation::CLmkIconOperation(
+    CPosLandmarkDatabase& aDb,
+    TLmkItemType aItemsType,
+    TInt aIconIndex )
+    : iDb( aDb ),
+      iIconIndex( aIconIndex )
+    {
+    // Set method pointer:
+    if ( aItemsType == ELmkItemTypeLandmark )
+        {
+        iStepMethodL = &CLmkIconOperation::DoLandmarkStepL;
+        }
+    else
+        {
+        __ASSERT_DEBUG( aItemsType == ELmkItemTypeCategory,
+                        Panic( KLmkPanicUnknownItemType ) );
+        iStepMethodL = &CLmkIconOperation::DoCategoryStepL;
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkIconOperation::ConstructL
+// Symbian 2nd phase constructor can leave.
+// -----------------------------------------------------------------------------
+//
+void CLmkIconOperation::ConstructL(
+    const RArray<TPosLmItemId>& aIdArray,
+    TLmkItemType aItemsType,
+    const TDesC& aMbmFileName )
+    {
+    TInt count = aIdArray.Count();
+    for ( TInt i( 0 ); i < count; ++i )
+        {
+        User::LeaveIfError( iIdArray.Append( aIdArray[i] ) );
+        }
+
+    if ( aItemsType == ELmkItemTypeCategory )
+        {
+        iCategoryMgr = CPosLmCategoryManager::NewL( iDb );
+        }
+    iMbmFileName = aMbmFileName.AllocL();
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkIconOperation::NewL
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+CLmkIconOperation* CLmkIconOperation::NewL(
+    CPosLandmarkDatabase& aDb,
+    const RArray<TPosLmItemId>& aIdArray,
+    TLmkItemType aItemsType,
+    const TDesC& aMbmFileName,
+    TInt aIconIndex )
+    {
+    CLmkIconOperation* self = new ( ELeave ) CLmkIconOperation( aDb,
+                                                                aItemsType,
+                                                                aIconIndex );
+
+    CleanupStack::PushL( self );
+    self->ConstructL( aIdArray, aItemsType, aMbmFileName );
+    CleanupStack::Pop();
+
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkIconOperation::~CLmkIconOperation
+// -----------------------------------------------------------------------------
+//
+CLmkIconOperation::~CLmkIconOperation()
+    {
+    iIdArray.Close();
+    delete iCategoryMgr;
+    delete iMbmFileName;
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkIconOperation::NextStep
+// -----------------------------------------------------------------------------
+//
+void CLmkIconOperation::NextStep( TRequestStatus& aStatus, TReal32& aProgress )
+    {
+    aStatus = KRequestPending;
+    aProgress = 0;
+
+    TInt count = iIdArray.Count();
+    // Index should be smaller than count if NextStep called properly:
+    __ASSERT_DEBUG( iCurrentIndex < count, Panic( KLmkPanicIllegalMethodCall ) );
+
+    TInt result( KErrNone );
+
+    // Do one step:
+    if ( iCurrentIndex < count )
+        {
+        TRAP( result, ( this->*iStepMethodL )( iIdArray[iCurrentIndex++] ) );
+        }
+
+    // Check result:
+    if ( result != KErrNone || iCurrentIndex == count )
+        {
+        --iCurrentIndex;
+        aProgress = 1;
+        }
+    else
+        {
+        result = KPosLmOperationNotComplete;
+        // Neither divider nor dividend can be zero in this if-branch:
+        __ASSERT_DEBUG( ( iCurrentIndex > 0 ) && ( count > 0 ),
+                        Panic( KLmkPanicMathError ) );
+        aProgress = static_cast<TReal32>( iCurrentIndex ) / count;
+        }
+    TRequestStatus* status = &aStatus;
+    User::RequestComplete( status, result );
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkIconOperation::ExecuteL
+// -----------------------------------------------------------------------------
+//
+void CLmkIconOperation::ExecuteL()
+    {
+    // We never use asynchronous methods in synchronous way and therefore
+    // don't need to support this method
+    User::Leave( KErrNotSupported );
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkIconOperation::DoLandmarkStepL
+// -----------------------------------------------------------------------------
+//
+void CLmkIconOperation::DoLandmarkStepL( TPosLmItemId aId )
+    {
+
+    CPosLandmark* landmark = iDb.ReadLandmarkLC( aId );
+    landmark->SetIconL( *iMbmFileName, iIconIndex, KLmkDefaultId+1 );
+	iDb.UpdateLandmarkL( *landmark );
+    CleanupStack::PopAndDestroy(); // landmark
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkIconOperation::DoCategoryStepL
+// -----------------------------------------------------------------------------
+//
+void CLmkIconOperation::DoCategoryStepL( TPosLmItemId aId )
+    {
+
+    CPosLandmarkCategory* category =
+        iCategoryMgr->ReadCategoryLC( aId );
+    category->SetIconL( *iMbmFileName, iIconIndex, KCategoryDefaultId+1);
+	iCategoryMgr->UpdateCategoryL( *category );
+    CleanupStack::PopAndDestroy(); // category
+    }
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/engine/src/CLmkLandMarkCategoriesName.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,123 @@
+/*
+* 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:    CLmkLandmarkCategoriesName holds category names for particular Landmark
+*
+*/
+
+
+
+
+
+
+
+/**
+* CLmkLandMarkCategoriesName class.
+* This class holds category names for perticuler landmark.
+*/
+
+#include "CLmkLandMarkCategoriesName.h"
+
+// ---------------------------------------------------------
+// CLmkLandMarkCategoriesName::NewL
+// ---------------------------------------------------------
+//
+EXPORT_C CLmkLandMarkCategoriesName* CLmkLandMarkCategoriesName::NewL()
+{
+	CLmkLandMarkCategoriesName * self = new (ELeave) CLmkLandMarkCategoriesName();
+	CleanupStack::PushL(self);
+	self->ConstructL();
+	CleanupStack::Pop();
+	return self;
+}
+
+// ---------------------------------------------------------
+// CLmkLandMarkCategoriesName::NewL
+// ---------------------------------------------------------
+//
+EXPORT_C CLmkLandMarkCategoriesName* CLmkLandMarkCategoriesName::NewL(CLmkLandMarkCategoriesName& aLmkLandMarkCategoriesName)
+{
+	CLmkLandMarkCategoriesName * self  = CLmkLandMarkCategoriesName::NewL();
+	RArray<TCategoryName>   categoryNameArray;
+	aLmkLandMarkCategoriesName.GetCategoryNames(categoryNameArray);
+	self->SetCategoryNames(categoryNameArray);
+	categoryNameArray.Close();
+	return self;
+}
+
+// ---------------------------------------------------------
+// CLmkLandMarkCategoriesName::~CLmkLandMarkCategoriesName()
+// ---------------------------------------------------------
+//
+
+CLmkLandMarkCategoriesName::~CLmkLandMarkCategoriesName()
+{
+	iCategoriesName.Close();
+}
+
+// ---------------------------------------------------------
+// CLmkLandMarkCategoriesName::CLmkLandMarkCategoriesName()
+// ---------------------------------------------------------
+//
+
+CLmkLandMarkCategoriesName::CLmkLandMarkCategoriesName()
+{
+
+}
+
+// ---------------------------------------------------------
+// CLmkLandMarkCategoriesName::ConstructL()
+// ---------------------------------------------------------
+//
+void CLmkLandMarkCategoriesName::ConstructL()
+{
+//may be needed
+}
+
+// ---------------------------------------------------------
+// CLmkLandMarkCategoriesName::GetCategoryNames()
+// ---------------------------------------------------------
+//
+EXPORT_C void CLmkLandMarkCategoriesName::GetCategoryNames(RArray<TCategoryName>&  aCategoryNameArray) const
+{
+	TInt totalCategories = iCategoriesName.Count();
+	for( TInt cnt = 0; cnt < totalCategories; cnt++ )
+	{
+			aCategoryNameArray.Append(iCategoriesName[cnt]);
+	}
+}
+
+// ---------------------------------------------------------
+// CLmkLandMarkCategoriesName::SetCategoryNames()
+// ---------------------------------------------------------
+//
+
+EXPORT_C void CLmkLandMarkCategoriesName::SetCategoryNames(RArray<TCategoryName> &  aCategoryNameArray)
+{
+	iCategoriesName.Reset();
+	TInt totalCategories = aCategoryNameArray.Count();
+	for( TInt cnt =0; cnt < totalCategories; cnt++ )
+	{
+			iCategoriesName.Append(aCategoryNameArray[cnt]);
+	}
+}
+
+// ---------------------------------------------------------
+// CLmkLandMarkCategoriesName::AddCategoryName()
+// ---------------------------------------------------------
+//
+EXPORT_C void CLmkLandMarkCategoriesName::AddCategoryName(const TDesC &aCategoryName)
+{
+	iCategoriesName.Append(aCategoryName);
+}
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/engine/src/CLmkLandmark.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,110 @@
+/*
+* 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:    LandmarksUi Content File -
+*
+*/
+
+
+
+
+
+
+
+
+// INCLUDE FILES
+#include "CLmkLandmark.h"
+#include <e32math.h>
+
+
+// ================= MEMBER FUNCTIONS =======================
+// -----------------------------------------------------------------------------
+// CLmkLandmark::CLmkLandmark()
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+
+// -----------------------------------------------------------------------------
+// CLmkLandmark::CLmkLandmark()
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+CLmkLandmark::CLmkLandmark()
+{
+}
+
+
+// -----------------------------------------------------------------------------
+// CLmkLandmark::ConstructL
+// Symbian 2nd phase constructor can leave.
+// -----------------------------------------------------------------------------
+//
+void CLmkLandmark::ConstructL(const CPosLandmark* aLandmark,
+                     const RPointerArray<CPosLandmarkCategory>& aCategories)
+    {
+    iLandmark = CPosLandmark::NewL(*aLandmark);
+    TInt count = aCategories.Count();
+    for (TInt i(0); i < count ; i++)
+        {
+        CPosLandmarkCategory* category = CPosLandmarkCategory::NewL(*aCategories[i]);
+        CleanupStack::PushL(category);
+        User::LeaveIfError(iCategories.Append(category));
+        CleanupStack::Pop();//category
+        }
+    }
+
+
+// -----------------------------------------------------------------------------
+// CLmkLandmark::NewL
+// Two-phased copy constructor.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CLmkLandmark* CLmkLandmark::NewL(
+    const CPosLandmark*  aLandmark,
+    const RPointerArray<CPosLandmarkCategory>& aCategories)
+    {
+    CLmkLandmark* self = new (ELeave) CLmkLandmark();
+    CleanupStack::PushL(self);
+    self->ConstructL(aLandmark,aCategories);
+    CleanupStack::Pop();
+    return self;
+    }
+
+EXPORT_C CLmkLandmark* CLmkLandmark::NewL(
+    const CLmkLandmark&  aLandmark)
+    {
+    CLmkLandmark* self = new (ELeave) CLmkLandmark();
+    CleanupStack::PushL(self);
+    self->ConstructL(aLandmark.iLandmark,aLandmark.iCategories);
+    CleanupStack::Pop();
+    return self;
+    }
+// Destructor
+CLmkLandmark::~CLmkLandmark()
+    {
+    delete iLandmark;
+    iCategories.ResetAndDestroy();
+    }
+
+EXPORT_C CPosLandmark* CLmkLandmark::PosLandmark()
+    {
+    return iLandmark;
+    }
+EXPORT_C RPointerArray<CPosLandmarkCategory>& CLmkLandmark::Categories()
+    {
+    return iCategories;
+    }
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/engine/src/CLmkLandmarkListProvider.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,520 @@
+/*
+* Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies 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 mainly is responsible for handling the database event
+*               w.r.t landmarks & preparing landmark lists accordingly.
+*
+*/
+
+
+
+
+
+
+
+// SYSTEM INCLUDE
+#include <EPos_CPosLmPartialReadParameters.h>
+#include <EPos_CPosLandmark.h>
+#include <EPos_TPosLmSortPref.h>
+#include <EPos_CPosLandmarkDatabase.h>
+#include <EPos_CPosLmItemIterator.h>
+#include <EPos_CPosLandmarkSearch.h>
+#include <EPos_CPosLmTextCriteria.h>
+#include <EPos_CPosLmCompositeCriteria.h>
+#include <e32math.h>
+#include <AknWaitDialog.h>
+#include <lmkui.rsg>
+
+// USER INCLUDES
+#include "CLmkLandmarkListProvider.h"
+#include "CLmkLandmarkUiItem.h"
+#include "CLmkAOOperation.h"
+#include "MLmkSelectorIconMgr.h"
+#include <lmkerrors.h>
+
+// CONSTANTS
+_LIT(KDefaultTextCriteria,"*");
+_LIT(KSpaceTextCriteria,"* ");
+
+
+#if defined(_DEBUG)
+// CONSTANTS
+/// Unnamed namespace for local definitions
+namespace {
+
+_LIT( KPanicMsg, "CLmkLandmarkListProvider" );
+
+void Panic( TPanicCode aReason )
+    {
+    User::Panic( KPanicMsg, aReason );
+    }
+}  // namespace
+#endif
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CLmkLandmarkListProvider::CLmkLandmarkListProvider
+// C++ constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+CLmkLandmarkListProvider::CLmkLandmarkListProvider(
+    CPosLandmarkDatabase& aDb )
+    : CLmkLmItemListProvider( aDb )
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkLandmarkListProvider::ConstructL
+// Symbian 2nd phase constructor can leave.
+// -----------------------------------------------------------------------------
+//
+void CLmkLandmarkListProvider::ConstructL()
+    {
+    // base class 2nd phase constructor
+    CLmkLmItemListProvider::BaseConstructL();
+
+    iReadParams = CPosLmPartialReadParameters::NewLC();
+    CleanupStack::Pop(); // iReadParams
+    iReadParams->SetRequestedAttributes( CPosLandmark::ELandmarkName |
+                                         CPosLandmark::EIcon | CPosLandmark::ECategoryInfo );
+    iSearch = CPosLandmarkSearch::NewL( iDb );
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkLandmarkListProvider::NewL
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+CLmkLandmarkListProvider* CLmkLandmarkListProvider::NewL(
+    CPosLandmarkDatabase& aDb )
+    {
+    CLmkLandmarkListProvider* self =
+        new ( ELeave ) CLmkLandmarkListProvider( aDb );
+
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop();
+
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkLandmarkListProvider::~CLmkLandmarkListProvider
+// -----------------------------------------------------------------------------
+//
+CLmkLandmarkListProvider::~CLmkLandmarkListProvider()
+    {
+    delete iReadParams;
+    if (iSearchAO)
+	    {
+	    iSearchAO->StopOperation();
+	    }
+    delete iSearchAO;
+    delete iSearch;
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkLandmarkListProvider::ItemAtL
+// -----------------------------------------------------------------------------
+//
+CLmkUiItemBase* CLmkLandmarkListProvider::ItemAtL( TInt aIndex )
+    {
+    __ASSERT_DEBUG( iIconMgr, Panic( KLmkPanicNullMember ) );
+    //landmark with updated icon, if associated with one cat.
+    CPosLandmark* landmark = GetLandmarkLC(aIndex);
+    TPtrC mbmFile;
+    TInt iconFileIndex = -1;
+    TInt iconListIndex = -1;
+    TInt iconMaskIndex = -1;
+
+    TInt result = landmark->GetIcon( mbmFile, iconFileIndex, iconMaskIndex );
+    if ( result == KErrNone )
+        {
+        TRAPD(err, iconListIndex =
+                    iIconMgr->GetIconL( mbmFile, iconFileIndex ) );
+        if ( err == KErrNotFound ) // icon file not found -> fallback to default
+            {
+            iconListIndex = iIconMgr->GetDefaultIconL(
+                MLmkSelectorIconMgr::ELandmarkDefaultIcon );
+            }
+        }
+    else
+        {
+        iconListIndex = iIconMgr->GetDefaultIconL(
+            MLmkSelectorIconMgr::ELandmarkDefaultIcon );
+        }
+
+    CLmkLandmarkUiItem* uiItem =
+        CLmkLandmarkUiItem::NewL( landmark, iconListIndex );
+    CleanupStack::Pop(); // landmark, ownership transferred
+    return uiItem;
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkLandmarkListProvider::PrepareListL
+// -----------------------------------------------------------------------------
+//
+void CLmkLandmarkListProvider::PrepareListL()
+    {
+    if ( iListAllItemsInDb )
+        {        
+        iCount = 0;
+        iDb.SetPartialReadParametersL( *iReadParams );
+	    CPosLmTextCriteria* criteria = CPosLmTextCriteria::NewLC();
+	    criteria->SetTextL(KDefaultTextCriteria);
+	    TPosLmSortPref sortOrder( CPosLandmark::ELandmarkName,
+					          TPosLmSortPref::EAscending );
+
+		CPosLmOperation* searchOperation = iSearch->StartLandmarkSearchL( *criteria , sortOrder );
+	    CleanupStack::PopAndDestroy( criteria ); //criteria
+		CleanupStack::PushL( searchOperation );
+    	if (iSearchAO)
+			{
+    		iSearchAO->StopOperation();
+		    delete iSearchAO; // cancel possibly pending operation
+		    iSearchAO = NULL;
+    		}
+
+		iSearchAO = CLmkAOOperation::NewL( searchOperation,
+		                   				   *this,
+		                  				   MLmkAOOperationObserver::ESearch,
+		                  				   iOperationNotInUse );
+
+		iOperationNotInUse = ETrue;
+		CleanupStack::Pop( searchOperation ); // ownership transferred
+		if( iSearchAO )
+		    iSearchAO->StartOperation();
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkLandmarkListProvider::PrepareListL
+// -----------------------------------------------------------------------------
+//
+TBool CLmkLandmarkListProvider::PrepareListL(const TDesC& aSearchPattern,
+    							TBool aSearchOnlyInPreviousMatches)
+	{
+    iCount = 0;
+	iRequestFromFindBox = ETrue;
+	iOperationNotInUse = ETrue;
+
+	if( aSearchPattern.Compare( KDefaultTextCriteria ) == 0
+			|| aSearchPattern.Length() <= 0  )
+		{
+		PrepareListL();
+	    iRequestFromFindBox = EFalse;
+		return ETrue;
+		}
+
+	// We need to cancel if we are searching/reading landmarks.
+ 	if (iSearchAO)
+	 	{
+	 	iSearchAO->StopOperation();
+	 	delete iSearchAO; // cancel possibly pending operation
+		iSearchAO = NULL;
+	 	}
+
+	// Create the composite criterion
+	CPosLmCompositeCriteria* compCrit = CPosLmCompositeCriteria::NewLC(
+	    CPosLmCompositeCriteria::ECompositionOR );
+
+	// Create the text search criterion and add it to composite
+	CPosLmTextCriteria* textCrit = CPosLmTextCriteria::NewLC();
+
+    const TInt KExtraChars = 3; // 2 chars wildcards
+    HBufC* filterBuf = HBufC::NewLC(aSearchPattern.Length() + KExtraChars);
+    TPtr filter = filterBuf->Des();
+	filter.Copy(KSpaceTextCriteria);
+	filter.Append(aSearchPattern);
+
+	textCrit->SetTextL( filter );
+    textCrit->SetAttributesToSearch(CPosLandmark::ELandmarkName);
+
+	User::LeaveIfError( compCrit->AddArgument( textCrit ) );
+	// Ownership of the text criterion has been passed to the composite
+	CleanupStack::PopAndDestroy( filterBuf );
+	CleanupStack::Pop( textCrit );
+
+	// Create the text search criterion and add it to composite
+	CPosLmTextCriteria* textCrit2 = CPosLmTextCriteria::NewLC();
+	textCrit2->SetTextL( aSearchPattern );
+    textCrit2->SetAttributesToSearch(CPosLandmark::ELandmarkName);
+
+	User::LeaveIfError( compCrit->AddArgument( textCrit2 ) );
+	// Ownership of the text criterion has been passed to the composite
+	CleanupStack::Pop( textCrit2 );
+
+    iDb.SetPartialReadParametersL( *iReadParams );
+
+    TPosLmSortPref sortOrder( CPosLandmark::ELandmarkName,
+                              TPosLmSortPref::EAscending );
+	// Start the search
+    // Create search operation
+    CPosLmOperation* operation = iSearch->StartLandmarkSearchL(
+    					*compCrit, sortOrder, aSearchOnlyInPreviousMatches );
+
+ 	CleanupStack::PopAndDestroy( compCrit );
+ 	CleanupStack::PushL( operation );
+
+	iSearchAO = CLmkAOOperation::NewL( operation,
+                                   *this,
+                                   MLmkAOOperationObserver::ESearch,
+                                   ETrue );
+	CleanupStack::Pop( operation ); // ownership transferred
+
+    if( iSearchAO )
+        iSearchAO->StartOperation();
+    return ETrue;
+	}
+
+// -----------------------------------------------------------------------------
+// CLmkLandmarkListProvider::HandleDatabaseEvent
+// -----------------------------------------------------------------------------
+//
+void CLmkLandmarkListProvider::HandleDatabaseEvent( TPosLmEvent& aEvent )
+    {
+// TODO: we need a helper method like ValidatedIdArrayL() to check id
+// array given by the client (that means: iListAllItemsInDb == EFalse)
+// in case when database items are modified. Some items might have been
+// deleted for instance. Possibly CLmkLmItemListProvider functionality?
+
+	TBool needRefresh = ETrue;
+
+	// check any items are selected to do operations like iconchanges or add to category.
+	if( iSelectedItemsCount > 0 )
+		{
+		iCount++;
+		if( iSelectedItemsCount == iCount )
+			{
+			iSelectedItemsCount = 0;
+			iCount = 0;
+			}
+		needRefresh = EFalse;
+		}
+    switch ( aEvent.iEventType )
+        {
+        case EPosLmEventLandmarkUpdated: 		// lm icon changes, lm renaming
+        case EPosLmEventLandmarkUnknownChanges:	// lm multiple deletion, lm add to category
+        case EPosLmEventUnknownChanges:
+        case EPosLmEventLandmarkCreated:
+            {
+			if( needRefresh )
+				{
+		        if( iSearchAO )
+		        	{
+		        	iSearchAO->StopOperation();
+					delete iSearchAO;
+			        iSearchAO = NULL;
+		        	}
+	            iOperationNotInUse = EFalse;
+	            TInt err = KErrNone;
+	            do
+	                {
+	                TRAP( err, PrepareListL() );
+	                }while(err == KErrLocked);
+	            if ( err )
+	                {
+	                HandleError( err );
+	                }
+				}
+			else
+				{
+				NotifyObservers( ELmkEventListReady );
+				}
+            break;
+            }
+        case EPosLmEventLandmarkDeleted:
+        	{
+		   	TInt index = iIdArray.Find( aEvent.iLandmarkItemId );
+		   	if( index != KErrNotFound && index < iIdArray.Count())
+		   		{
+		   		iIdArray.Remove(index);
+			   	NotifyObservers( ELmkEventListReady );
+		   		}
+		   	break;
+        	}
+        default:
+            { // Not interesting event for this provider
+            break;
+            }
+       	}
+    // Remember to call base class observer method too
+    CLmkLmItemListProvider::HandleDatabaseEvent( aEvent );
+    }
+
+// ---------------------------------------------------------
+//  CLmkLandmarkListProvider::HandleOperationL
+// ---------------------------------------------------------
+//
+void CLmkLandmarkListProvider::HandleOperationL(
+    TOperationTypes aType,
+    TReal32 aProgress,
+    TInt aStatus )
+    {
+    if ( aType == MLmkAOOperationObserver::EDeleteLandmarks )
+    	{
+    	return;
+    	}
+    if ( aType == MLmkAOOperationObserver::ESearch )
+        {
+	    ReadItemsToArrayL();
+       	if ( aStatus == KErrNone )
+	        {
+	        if( iSearchAO )
+	        	{
+	        	iSearchAO->StopOperation();
+				delete iSearchAO;
+		        iSearchAO = NULL;
+	        	}
+			if (iOperationNotInUse == EFalse )
+	        	{
+	        	NotifyObservers( ELmkEventItemAdditionComplete );
+	        	}
+	        else
+		        {
+		        if (iRequestFromFindBox)
+			        {
+			        NotifyObservers( ELmkEventFindListReady );
+			        }
+				else
+					{
+		        	NotifyObservers( ELmkEventListReady );
+					}
+		        }
+	        iOperationNotInUse = ETrue;
+
+	        iCount = 0;
+    		if(iItemsDeleted < iItemsToDelete)
+    			{
+    			PrepareForDeleteL();
+    			}
+    		else
+    			{
+    			if(iWaitNote)
+    				{
+		            iWaitNote->ProcessFinishedL();
+		            iWaitNote = NULL;
+    				}
+    			}
+	        return;
+	        } // end of if ( aStatus == KErrNone )
+
+	    else if ( iCount == ELmkStepOne || iCount == ELmkStepTwo )
+        	{
+	        if (iRequestFromFindBox)
+		        {
+		        NotifyObservers( ELmkEventFindListReady );
+		        }
+	        else
+		        {
+    			NotifyObservers( ELmkEventListReady );
+		        }
+			iOperationNotInUse = EFalse;
+        	}
+ 		}
+    else
+        { // This is not this classes' operation
+        CLmkLmItemListProvider::HandleOperationL( aType, aProgress, aStatus);
+        }
+    }
+
+// ---------------------------------------------------------
+// CLmkLandmarkListProvider::ReadItemsToArrayL
+// ---------------------------------------------------------
+//
+void CLmkLandmarkListProvider::ReadItemsToArrayL()
+	{
+	iIdArray.Reset();
+    CPosLmItemIterator* iterator = iSearch->MatchIteratorL();
+    CleanupStack::PushL( iterator );
+    iCount = iterator->NumOfItemsL();
+    if ( iCount > 0 )
+        { // can only be called if there are some items
+        iterator->GetItemIdsL( iIdArray, 0, iCount ); // array is first reseted
+      	}
+    CleanupStack::PopAndDestroy( iterator );
+	}
+
+// ---------------------------------------------------------
+// CLmkLandmarkListProvider::RemoveLandmarksL
+// ---------------------------------------------------------
+//
+void CLmkLandmarkListProvider::RemoveLandmarksL(const RArray<TPosLmItemId>& aSelectedItems )
+	{
+	iItemsToDelete = aSelectedItems.Count();
+	iSelectedForDelete.Reset();
+	for(TInt i=0;i<iItemsToDelete;i++)
+		iSelectedForDelete.Append(aSelectedItems[i]);
+	iItemsDeleted = 0;
+	iIsRemoveLandmarks = ETrue;
+
+	if(iWaitNote)
+		{
+		delete iWaitNote;
+		iWaitNote = NULL;
+		}
+	PrepareForDeleteL();
+	}
+
+// ---------------------------------------------------------
+// CLmkLandmarkListProvider::PrepareForDelete
+// ---------------------------------------------------------
+//
+void CLmkLandmarkListProvider::PrepareForDeleteL()
+	{
+	RArray<TPosLmItemId> bufItems;
+	TInt count = iItemsDeleted;
+	if(iItemsToDelete > (iItemsDeleted + 10))
+		{
+		iItemsDeleted = iItemsDeleted + 10;
+		}
+	else
+		{
+		iItemsDeleted = iItemsDeleted + (iItemsToDelete - iItemsDeleted);
+		}
+
+	for(TInt i=count;i<iItemsDeleted;i++)
+		{
+		bufItems.Append(iSelectedForDelete[i]);
+		}
+
+	CPosLmOperation* operation =
+	                    iDb.RemoveLandmarksL( bufItems );
+
+	CleanupStack::PushL( operation );
+	iSearchAO = CLmkAOOperation::NewL( operation,
+	               *this,
+	               MLmkAOOperationObserver::EDeleteLandmarks,
+	               EFalse );
+	CleanupStack::Pop( operation ); // ownership transferred
+
+    if( iSearchAO )
+        {
+        iSearchAO->StartOperation();
+        if(!iWaitNote)
+            {
+            iWaitNote = new (ELeave) CAknWaitDialog(NULL, ETrue);
+            if(!iWaitNote->ExecuteLD(R_LMK_PROCESSING_WAIT_NOTE))
+                {
+                iSearchAO->StopOperation();
+                delete iSearchAO;
+                iSearchAO = NULL;                
+                iWaitNote = NULL;
+                }
+            }
+        }
+	bufItems.Close();
+	}
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/engine/src/CLmkLandmarkUiItem.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,133 @@
+/*
+* Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:    Landmarks info for landmarks list box model
+*
+*/
+
+
+
+
+
+
+// INCLUDE FILES
+#include "CLmkLandmarkUiItem.h"
+#include <EPos_CPosLandmark.h>
+#include "CLmkFields.h"
+#include <lmkerrors.h>
+
+#if defined(_DEBUG)
+// CONSTANTS
+/// Unnamed namespace for local definitions
+namespace {
+
+_LIT( KPanicMsg, "CLmkLandmarkUiItem" );
+
+void Panic( TPanicCode aReason )
+    {
+    User::Panic( KPanicMsg, aReason );
+    }
+}  // namespace
+#endif
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CLmkLandmarkUiItem::CLmkLandmarkUiItem
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+CLmkLandmarkUiItem::CLmkLandmarkUiItem(
+    CPosLandmark* aLandmark,
+    TInt aIconListIndex )
+    : iLandmark( aLandmark ),
+      iIconListIndex( aIconListIndex )
+    {
+    TPtrC name;
+    iLandmark->GetLandmarkName( name );
+    TPtr des1 = CLmkFields::RemoveEnterCharacter( name );
+    iText.Set( des1 );
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkLandmarkUiItem::ConstructL
+// Symbian 2nd phase constructor can leave.
+// -----------------------------------------------------------------------------
+//
+void CLmkLandmarkUiItem::ConstructL()
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkLandmarkUiItem::NewL
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+CLmkLandmarkUiItem* CLmkLandmarkUiItem::NewL(
+    CPosLandmark* aLandmark,
+    TInt aIconListIndex )
+    {
+    __ASSERT_DEBUG( aLandmark, Panic( KLmkPanicNullMember ) );
+    CLmkLandmarkUiItem* self =
+        new ( ELeave ) CLmkLandmarkUiItem( aLandmark, aIconListIndex );
+
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop();
+
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkLandmarkUiItem::~CLmkLandmarkUiItem
+// -----------------------------------------------------------------------------
+//
+CLmkLandmarkUiItem::~CLmkLandmarkUiItem()
+    {
+    delete iLandmark;
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkLandmarkUiItem::Type
+// ?implementation_description
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+TLmkItemType CLmkLandmarkUiItem::Type()
+    {
+    return ELmkItemTypeLandmark;
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkLandmarkUiItem::Text
+// ?implementation_description
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+TPtrC CLmkLandmarkUiItem::Text()
+    {
+    return iText;
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkLandmarkUiItem::GetIconId
+// ?implementation_description
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+TInt CLmkLandmarkUiItem::GetIconId()
+    {
+    return iIconListIndex;
+    }
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/engine/src/CLmkListProviderBase.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,128 @@
+/*
+* 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:    LandmarksUi Content File -
+*
+*/
+
+
+
+
+
+
+
+
+// INCLUDE FILES
+#include "CLmkListProviderBase.h"
+#include "MLmkSelectorIconMgr.h"
+
+// CONSTANTS
+/// Unnamed namespace for local definitions
+namespace {
+
+// two observers assumed
+const TInt KObserverArraySize = 2;
+}  // namespace
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CLmkListProviderBase::CLmkListProviderBase
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+CLmkListProviderBase::CLmkListProviderBase()
+    : iObservers( KObserverArraySize )
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkListProviderBase::BaseConstructL
+// Symbian 2nd phase constructor can leave.
+// -----------------------------------------------------------------------------
+//
+void CLmkListProviderBase::BaseConstructL()
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkListProviderBase::~CLmkListProviderBase
+// -----------------------------------------------------------------------------
+//
+CLmkListProviderBase::~CLmkListProviderBase()
+    {
+    iObservers.Close();
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkListProviderBase::AddObserverL
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CLmkListProviderBase::AddObserverL(
+    MLmkListProviderObserver& aObserver )
+    {
+    User::LeaveIfError( iObservers.Append( &aObserver ) );
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkListProviderBase::RemoveObserver
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TInt CLmkListProviderBase::RemoveObserver(
+    MLmkListProviderObserver& aObserver )
+    {
+    TInt index = iObservers.Find( &aObserver );
+    if ( index >= 0)
+        {
+        iObservers.Remove( index );
+        return KErrNone;
+        }
+    return KErrNotFound;
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkListProviderBase::SetIconMgrL
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CLmkListProviderBase::SetIconMgrL(
+    MLmkSelectorIconMgr& aIconMgr )
+    {
+    iIconMgr = &aIconMgr;
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkListProviderBase::NotifyObservers
+// -----------------------------------------------------------------------------
+//
+void CLmkListProviderBase::NotifyObservers( TLmkListProviderEventType aEvent )
+    {
+    for ( TInt i( 0 ); i < iObservers.Count(); ++i )
+        {
+        iObservers[i]->HandleListProviderEvent( aEvent );
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkListProviderBase::NotifyError
+// -----------------------------------------------------------------------------
+//
+void CLmkListProviderBase::NotifyError( TInt aError )
+    {
+    for ( TInt i( 0 ); i < iObservers.Count(); ++i )
+        {
+        iObservers[i]->HandleListProviderError( aError );
+        }
+    }
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/engine/src/CLmkLmItemListProvider.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,418 @@
+/*
+* Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:    Base class landmarks list provider for listbox model
+*
+*/
+
+
+// SYSTEM INCLUDES
+#include <EPos_CPosLandmarkDatabase.h>
+#include <EPos_CPosLmOperation.h>
+#include <EPos_CPosLmCategoryManager.h>
+#include <AknWaitDialog.h>
+
+// USER INCLUDES
+#include "CLmkLmItemListProvider.h"
+#include "MLmkListProviderObserver.h"
+#include "CLmkDbUtils.h"
+#include "CLmkDbInitializer.h"
+#include "CLmkEventListenerSingleton.h"
+#include "CLmkAOOperation.h"
+#include "LmkConsts.h"
+#include <lmkerrors.h>
+
+// CONSTANTS
+/// Unnamed namespace for local definitions
+namespace {
+
+_LIT( KPanicMsg, "CLmkLmItemListProvider" );
+
+void Panic( TPanicCode aReason )
+    {
+    User::Panic( KPanicMsg, aReason );
+    }
+}  // namespace
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CLmkLmItemListProvider::CLmkLmItemListProvider
+// C++ constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+CLmkLmItemListProvider::CLmkLmItemListProvider(
+    CPosLandmarkDatabase& aDb )
+    : iDb( aDb ),
+      iListAllItemsInDb( ETrue ),
+      iIdArray( KLmItemArrayGranularity ),
+      iSelectedItemsCount( 0 ), iCount( 0 ),
+      iRequestFromFindBox(EFalse),
+      iOperationNotInUse( ETrue ),
+      iOperationCmd( ELmkCmdStopOperation ),  //temp default value
+      iSelectedForDelete(KLmItemArrayGranularity),
+      iItemsToDelete( 0 ),
+      iItemsDeleted( 0 ),
+      iIsRemoveLandmarks( EFalse ),
+      iCategoryId(KPosLmNullItemId)
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkLmItemListProvider::ConstructL
+// Symbian 2nd phase constructor can leave.
+// -----------------------------------------------------------------------------
+//
+void CLmkLmItemListProvider::BaseConstructL()
+    {
+    // Create db utils, request callback only when operations completed:
+    iDbUtils = CLmkDbUtils::NewL( iDb, *this, EFalse );
+    //Create landmark array, which will hold all those landmarks, which belong
+    //to one category and needs icon change.
+    iIconChangeLmkArray = new(ELeave) RPointerArray<CPosLandmark>;
+    // base class 2nd phase constructor
+    CLmkListProviderBase::BaseConstructL();
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkLmItemListProvider::~CLmkLmItemListProvider
+// -----------------------------------------------------------------------------
+//
+CLmkLmItemListProvider::~CLmkLmItemListProvider()
+    {
+    if ( iWaitNote )
+        {
+        TRAPD( err, iWaitNote->ProcessFinishedL() );
+        if (err != KErrNone)
+    		{
+		    delete iWaitNote;
+            iWaitNote = NULL;
+	    	}
+        }
+    // Stop db event observing:
+    CLmkEventListenerSingleton::RemoveObserver( *this );
+	if (iIconChangeLmkArray)
+		{
+		iIconChangeLmkArray->ResetAndDestroy();
+    	delete iIconChangeLmkArray;
+		}
+    delete iInitializer;
+    delete iDbUtils;
+
+    iSelectedForDelete.Close();
+    iIdArray.Close();
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkLmItemListProvider::SelectedIndexesL
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CArrayFix<TInt>* CLmkLmItemListProvider::SelectedIndexesL(
+    const RArray<TPosLmItemId>& aSelectedItems ) const
+    {
+    CArrayFix<TInt>* array = NULL;
+    TInt count = aSelectedItems.Count();
+    if ( count < KLmkMultiSelectionGranularity )
+        { // decent minimum granularity because of possible user selections
+        array =
+            new ( ELeave ) CArrayFixFlat<TInt>( KLmkMultiSelectionGranularity );
+        }
+    else
+        {
+        array = new ( ELeave ) CArrayFixFlat<TInt>( aSelectedItems.Count() );
+        }
+    CleanupStack::PushL( array );
+
+    GetSelectedIndexesL( *array, aSelectedItems );
+
+    CleanupStack::Pop( array );
+    return array;
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkLmItemListProvider::GetSelectedIndexesL
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CLmkLmItemListProvider::GetSelectedIndexesL(
+    CArrayFix<TInt>& aSelectedIndexes,
+    const RArray<TPosLmItemId>& aSelectedItems ) const
+    {
+    aSelectedIndexes.Reset();
+    TInt count = aSelectedItems.Count();
+    for ( TInt i( 0 ); i < count; ++i )
+        {
+        TInt index = iIdArray.Find( aSelectedItems[i] );
+        if ( index >= 0 )
+            { // item found --> append it's index
+            aSelectedIndexes.AppendL( index );
+            }
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkLmItemListProvider::GetSelectedItemIdsL
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CLmkLmItemListProvider::GetSelectedItemIdsL(
+    RArray<TPosLmItemId>& aSelectedItems,
+    const CArrayFix<TInt>& aSelectedIndexes ) const
+    {
+    aSelectedItems.Reset();
+    TInt itemCount = iIdArray.Count();
+    TInt selectionCount = aSelectedIndexes.Count();
+
+    for ( TInt i( 0 ); i < selectionCount; ++i )
+        {
+        TInt index = aSelectedIndexes[i];
+        __ASSERT_ALWAYS( index >= 0 && index < itemCount,
+                         Panic( KLmkPanicInvalidIndex ) );
+
+        User::LeaveIfError( aSelectedItems.Append( iIdArray[index] ) );
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkLmItemListProvider::GetAllItemIdsL
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CLmkLmItemListProvider::GetAllItemIdsL(
+    RArray<TPosLmItemId>& aSelectedItems ) const
+    {
+    aSelectedItems.Reset();
+    TInt itemCount = iIdArray.Count();
+
+    for ( TInt i( 0 ); i < itemCount; ++i )
+        {
+        User::LeaveIfError( aSelectedItems.Append( iIdArray[i] ) );
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkLmItemListProvider::SelectedIndex
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TInt CLmkLmItemListProvider::SelectedIndex(
+    TPosLmItemId aSelectedItem ) const
+    {
+    return iIdArray.Find( aSelectedItem );
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkLmItemListProvider::GetSelectedItemId
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CLmkLmItemListProvider::GetSelectedItemId(
+    TPosLmItemId& aSelected,
+    TInt aIndex ) const
+    {
+    __ASSERT_ALWAYS( aIndex >= 0 && aIndex < iIdArray.Count(),
+                     Panic( KLmkPanicInvalidIndex ) );
+
+    aSelected = iIdArray[aIndex];
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkLmItemListProvider::SetSelectedItemsCount
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CLmkLmItemListProvider::SetSelectedItemsCount( TInt aSelectedItemsCount )
+	{
+	iSelectedItemsCount = aSelectedItemsCount;
+	}
+
+// -----------------------------------------------------------------------------
+// CLmkLmItemListProvider::RemoveItem
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CLmkLmItemListProvider::RemoveItem( TPosLmItemId aItemId )
+	{
+   	TInt index = iIdArray.Find(aItemId);
+   	if( index != KErrNotFound && index < iIdArray.Count())
+   		{
+   		iIdArray.Remove(index);
+		NotifyObservers( ELmkEventListReady );
+   		}
+	}
+
+// -----------------------------------------------------------------------------
+// CLmkLmItemListProvider::RemoveItemsL
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CLmkLmItemListProvider::RemoveItemsL(
+											const RArray<TPosLmItemId>& aSelectedItems,
+											MLmkAOOperationObserver::TOperationTypes aType,
+											TPosLmItemId aCategoryId )
+	{
+	iCategoryId = aCategoryId;
+	iType = aType;
+	RemoveLandmarksL(aSelectedItems);
+	}
+
+// -----------------------------------------------------------------------------
+// CLmkLmItemListProvider::SetOperationCmd
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CLmkLmItemListProvider::SetOperationCmd( TLmkAppCmdId aOperationCmd )
+	{
+	iOperationCmd = aOperationCmd;
+	}
+
+// -----------------------------------------------------------------------------
+// CLmkLmItemListProvider::InitializeL
+// -----------------------------------------------------------------------------
+//
+void CLmkLmItemListProvider::InitializeL()
+    {
+    __ASSERT_DEBUG( !iInitializer, Panic( KLmkPanicIllegalMethodCall ) );
+    // We don't want intermediate callbacks -> 3rd parameter EFalse
+    iInitializer = CLmkDbInitializer::NewL( iDb, *this, EFalse );
+    iInitializer->StartInitAndCompactL();
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkLmItemListProvider::StartSearchingLandmarksL()
+// -----------------------------------------------------------------------------
+//
+TBool CLmkLmItemListProvider::StartSearchingLandmarksL(
+								const TDesC& aSearchPattern,
+    							TBool aSearchOnlyInPreviousMatches)
+	{
+	iRequestFromFindBox = ETrue;
+	return PrepareListL(aSearchPattern, aSearchOnlyInPreviousMatches);
+	}
+
+// -----------------------------------------------------------------------------
+// CLmkLmItemListProvider::ItemCount
+// -----------------------------------------------------------------------------
+//
+TInt CLmkLmItemListProvider::ItemCount() const
+    {
+    return iIdArray.Count();
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkLmItemListProvider::HandleOperationL
+// -----------------------------------------------------------------------------
+//
+void CLmkLmItemListProvider::HandleOperationL(
+    TOperationTypes /*aType*/,
+    TReal32 /*aProgress*/,
+    TInt aStatus )
+    {
+    __ASSERT_DEBUG( aStatus != KPosLmOperationNotComplete,
+                    Panic( KLmkPanicIntermediateCallback ) );
+
+    // init and compact completed, delete unnecessary helper object:
+    delete iInitializer;
+    iInitializer = NULL;
+
+    TInt err( aStatus );
+
+    if ( aStatus == KErrNone )
+        {
+        TRAP( err, HandleDatabaseInitializedL() );
+        }
+
+    if ( err != KErrNone )
+        { // Error already in aStatus or within this method
+        HandleError( err );
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkLmItemListProvider::HandleDatabaseInitializedL
+// -----------------------------------------------------------------------------
+//
+void CLmkLmItemListProvider::HandleDatabaseInitializedL()
+    {
+    // Start db event observing:
+    CLmkEventListenerSingleton::AddObserverL( *this, iDb );
+    
+    iRequestFromFindBox = EFalse;
+    
+    // Call provider-specific templated method for preparing list:
+    PrepareListL();
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkLmItemListProvider::HandleError
+// -----------------------------------------------------------------------------
+//
+void CLmkLmItemListProvider::HandleError( TInt aError )
+    {
+    if ( aError != KErrNone )
+        {
+        NotifyError( aError );
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkLmItemListProvider::HandleDatabaseEvent
+// -----------------------------------------------------------------------------
+//
+void CLmkLmItemListProvider::HandleDatabaseEvent( TPosLmEvent& aEvent )
+    {
+    switch ( aEvent.iEventType )
+        {
+        case EPosLmEventNewDefaultDatabaseLocation:
+        case EPosLmEventMediaRemoved:
+            {
+            //TODO:
+            break;
+            }
+        default:
+            {
+            //TODO:
+            // not interesting event for this class
+            break;
+            }
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkLmItemListProvider::GetLandmarkLC
+// -----------------------------------------------------------------------------
+//
+CPosLandmark* CLmkLmItemListProvider::GetLandmarkLC(TInt aIndex)
+	{
+	RArray<TPosLmItemId> itemArray;
+	CPosLandmark* landmark = iDb.ReadPartialLandmarkLC( iIdArray[aIndex] );
+	//check whether landmark is associated with more than one cat.
+	landmark->GetCategoriesL(itemArray);
+	if (itemArray.Count() == 1)
+		{
+		//if associated with one cat, check if the icon is not set by the
+		//user explicitly
+		TPtrC iconPath;
+	    TInt iconId;
+	    TInt iconMaskIndex;
+		if (landmark->GetIcon(iconPath,iconId,  iconMaskIndex))
+	        {
+	       	//lmk has one cat & icon is not set by the user:
+			CPosLmCategoryManager* categoryMgr = CPosLmCategoryManager::NewL(iDb);
+			CleanupStack::PushL( categoryMgr );
+			CPosLandmarkCategory* category = categoryMgr->ReadCategoryLC( itemArray[0] );
+			//get the cat icon and set it as landmark icon only for display
+			if (category->GetIcon(iconPath,iconId,  iconMaskIndex) == KErrNone )
+				{
+				landmark->SetIconL(iconPath,iconId,iconMaskIndex);
+				}
+			CleanupStack::PopAndDestroy();//category
+			CleanupStack::PopAndDestroy();//categoryMgr
+	        }
+		}
+	itemArray.Close();
+	return landmark;
+	}
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/engine/src/CLmkLocationService.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,204 @@
+/*
+* Copyright (c) 2002-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 contains the methods which interface with Location Acquisition
+*     API for getting location information
+*
+*/
+
+
+
+
+
+
+
+// INCLUDE FILES
+
+#include <f32file.h>
+#include <sysutil.h>
+#include "LmkConsts.h"
+#include "MLmkLocationObserver.h"
+#include "CLmkLocationService.h"
+
+
+// ============================ MEMBER FUNCTIONS ==============================
+// ----------------------------------------------------------------------------
+// CLmkLocationService::CLmkLocationService
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// ----------------------------------------------------------------------------
+//
+CLmkLocationService::CLmkLocationService() : CActive(EPriorityStandard)
+	{
+	CActiveScheduler::Add( this );
+	}
+
+// ----------------------------------------------------------------------------
+// CLmkLocationService::NewL
+// Two-phased constructor.
+// ----------------------------------------------------------------------------
+//
+EXPORT_C CLmkLocationService* CLmkLocationService::NewL(const TDesC& aSrvName)
+	{
+	CLmkLocationService* self = new ( ELeave ) CLmkLocationService;
+	CleanupStack::PushL( self );
+	self->ConstructL(aSrvName);
+	CleanupStack::Pop(); // self
+	return self;
+	}
+
+// ---------------------------------------------------------
+// CLmkLocationService::ConstructL
+// ---------------------------------------------------------
+//
+void CLmkLocationService::ConstructL( const TDesC& aSrvName )
+	{
+	User::LeaveIfError(iServer.Connect());
+	User::LeaveIfError(iPositioner.Open( iServer ));
+
+	/*TPositionUpdateOptions updateOptions;
+	updateOptions.SetUpdateTimeOut( TTimeIntervalMicroSeconds(KLmkLRTimeOut));
+	User::LeaveIfError( iPositioner.SetUpdateOptions(updateOptions) );*/
+
+	User::LeaveIfError( iPositioner.SetRequestor(
+	                    CRequestor::ERequestorService,
+	                    CRequestor::EFormatApplication,
+	                    aSrvName ));
+	}
+
+// ---------------------------------------------------------
+// CLmkLocationService::~CLmkLocationService
+// ---------------------------------------------------------
+//
+CLmkLocationService::~CLmkLocationService()
+	{
+	Cancel();
+	iPositioner.Close();
+	iServer.Close();
+	}
+
+// ---------------------------------------------------------
+// CLmkLocationService::SetObserver
+// ---------------------------------------------------------
+//
+EXPORT_C void CLmkLocationService::SetObserver(MLmkLocationObserver& aObserver)
+	{
+	iObserver = &aObserver;
+	}
+
+// ---------------------------------------------------------
+// CLmkLocationService::RemoveModelObserver
+// ---------------------------------------------------------
+//
+EXPORT_C void CLmkLocationService::RemoveModelObserver()
+    {
+    iObserver = NULL;
+    }
+
+// ---------------------------------------------------------
+// CLmkLocationService::LocationRequestL
+// ---------------------------------------------------------
+//
+EXPORT_C void CLmkLocationService::LocationRequestL()
+	{
+	iPositioner.NotifyPositionUpdate( iPositionInfo, iStatus );
+	SetActive();
+	}
+
+// ---------------------------------------------------------
+// CLmkLocationService::CurrentPosition
+// ---------------------------------------------------------
+//
+EXPORT_C TPosition& CLmkLocationService::CurrentPosition()
+	{
+	return iPosition;
+	}
+
+// ---------------------------------------------------------
+// CLmkLocationService::CancelRequest
+// ---------------------------------------------------------
+//
+EXPORT_C void CLmkLocationService::CancelRequest()
+	{
+	Cancel();
+	}
+
+// ---------------------------------------------------------
+// CLmkLocationService::RunL
+// ---------------------------------------------------------
+//
+void CLmkLocationService::RunL()
+	{
+	switch ( iStatus.Int() )
+		{
+		case KErrNone:
+		case KPositionPartialUpdate:
+			{
+			iPositionInfo.GetPosition( iPosition );
+			TReal32 altitude = iPosition.Altitude();
+			if (Math::IsNaN( altitude))
+				{
+				TRealX nan;
+				nan.SetNaN();
+				iPosition.SetVerticalAccuracy( nan );
+				}
+			iObserver->NotifyL( iStatus.Int() );
+			break;
+			}
+		case KErrAccessDenied:
+			{
+			User::Leave( KErrAccessDenied );
+			break;
+			}
+		case KPositionQualityLoss:
+		case KErrTimedOut:
+		case KErrNotFound: // No PSY selected.
+		case KErrUnknown:
+		case KErrCancel:
+		case KErrArgument:
+		default:
+			{
+			User::Leave( iStatus.Int() );
+			break;
+			}
+		}
+	}
+
+// ---------------------------------------------------------
+// CLmkLocationService::DoCancel
+// ---------------------------------------------------------
+//
+void CLmkLocationService::DoCancel()
+    {
+    iPositioner.CancelRequest( EPositionerNotifyPositionUpdate );
+    }
+
+// ---------------------------------------------------------
+// CLmkLocationService::RunError
+// ---------------------------------------------------------
+//
+TInt CLmkLocationService::RunError(TInt aError)
+    {
+    if ( iObserver )
+        {
+        TRAPD( error, iObserver->NotifyErrorL( aError ) );
+        if (error != KErrNone)
+        {
+        error = KErrNone;
+        }
+        }
+    return KErrNone;
+    }
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/engine/src/CLmkParseAllWrapper.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,263 @@
+/*
+* 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:    LandmarksUi Content File -
+*
+*/
+
+
+// INCLUDE FILES
+#include "EPos_CPosLandmarkDatabase.h"
+#include <EPos_CPosLmCategoryManager.h>
+#include "CLmkParseAllWrapper.h"
+#include <EPos_CPosLandmarkParser.h>
+#include <EPos_CPosLmOperation.h>
+#include <EPos_CPosLandmark.h>
+#include <EPos_CPosLmOperation.h>
+#include "CLmkAOOperation.h"
+#include "CLmkLandMarkCategoriesName.h"
+#include <lmkerrors.h>
+
+#if defined(_DEBUG)
+// CONSTANTS
+/// Unnamed namespace for local definitions
+namespace {
+
+_LIT( KPanicMsg, "CLmkParseAllWrapper" );
+
+void Panic( TPanicCode aReason )
+    {
+    User::Panic( KPanicMsg, aReason );
+    }
+}  // namespace
+#endif
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CLmkParseAllWrapper::CLmkParseAllWrapper
+// C++ constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+CLmkParseAllWrapper::CLmkParseAllWrapper(
+    CPosLandmarkParser& aParser,
+    MLmkAOOperationObserver& aObserver,
+    CPosLandmarkDatabase& aDb )
+    : iParser( aParser ),
+      iObserver( aObserver),
+      iDb(aDb)
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkParseAllWrapper::ConstructL
+// Symbian 2nd phase constructor can leave.
+// -----------------------------------------------------------------------------
+//
+void CLmkParseAllWrapper::ConstructL()
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkParseAllWrapper::NewL
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+CLmkParseAllWrapper* CLmkParseAllWrapper::NewL(
+    CPosLandmarkParser& aParser,
+    MLmkAOOperationObserver& aObserver,
+    CPosLandmarkDatabase& aDb )
+    {
+    CLmkParseAllWrapper* self =
+        new ( ELeave ) CLmkParseAllWrapper( aParser, aObserver, aDb );
+
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop();
+
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkParseAllWrapper::~CLmkParseAllWrapper
+// -----------------------------------------------------------------------------
+//
+CLmkParseAllWrapper::~CLmkParseAllWrapper()
+    {
+    iLmkLandmarks.ResetAndDestroy();
+    iCategoriesNames.ResetAndDestroy();
+    delete iAOOperation;
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkParseAllWrapper::ParseAllL
+// -----------------------------------------------------------------------------
+//
+void CLmkParseAllWrapper::ParseAllL()
+    {
+    CPosLmOperation* operation = iParser.ParseContentL();
+
+    __ASSERT_DEBUG( !iAOOperation, Panic( KLmkPanicAlreadyActive ) );
+
+    iAOOperation =
+        CLmkAOOperation::NewL( operation,
+                               *this,
+                               MLmkAOOperationObserver::EParse,
+                               ETrue );
+    iAOOperation->StartOperation();
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkParseAllWrapper::LandmarkLC
+// -----------------------------------------------------------------------------
+//
+CPosLandmark* CLmkParseAllWrapper::LandmarkLC( TUint aLandmarkIndex )
+    {
+    __ASSERT_DEBUG( aLandmarkIndex < TUint( iLmkLandmarks.Count() ),
+                    Panic( KLmkPanicInvalidIndex ) );
+
+    CLmkLandmark* lmkLandmarks = iLmkLandmarks[aLandmarkIndex];
+    CPosLandmark* landmark = lmkLandmarks->PosLandmark();
+    return CPosLandmark::NewLC( *landmark );
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+// CLmkParseAllWrapper::CategoryNameLC
+// -----------------------------------------------------------------------------
+//
+CLmkLandMarkCategoriesName* CLmkParseAllWrapper::CategoryNameLC( TUint aLandmarkIndex )
+    {
+    __ASSERT_DEBUG( aLandmarkIndex < TUint( iCategoriesNames.Count() ),
+                    Panic( KLmkPanicInvalidIndex ) );
+
+	CLmkLandMarkCategoriesName* category = CLmkLandMarkCategoriesName::NewL( *iCategoriesNames[aLandmarkIndex]);
+	CleanupStack::PushL(category);
+	return category;
+    }
+// CLmkParseAllWrapper::HandleOperationL
+// -----------------------------------------------------------------------------
+//
+void CLmkParseAllWrapper::HandleOperationL(
+    TOperationTypes aType,
+    TReal32 aProgress,
+    TInt aStatus )
+    {
+    __ASSERT_DEBUG( aType == EParse, Panic( KLmkPanicUnknownOperation ) );
+
+    if ( aStatus == KPosLmOperationNotComplete ||
+         aStatus == KErrNone )
+        {
+        CPosLandmark* landmark = iParser.LandmarkLC();
+	        CLmkLandMarkCategoriesName* categoryNames = CLmkLandMarkCategoriesName::NewL();
+	    	CleanupStack::PushL(categoryNames);
+
+	        RArray<TPosLmItemId>*  categoryIdArray = new(ELeave) RArray<TPosLmItemId>;
+	        CleanupClosePushL(*categoryIdArray);
+	    	landmark->GetCategoriesL( *categoryIdArray );
+	    	HBufC* catName = HBufC::NewLC( KPosLmMaxCategoryNameLength );
+	    	TPtrC categoryPtr(catName->Des());
+	    	RPointerArray<CPosLandmarkCategory>* categories = new(ELeave) RPointerArray<CPosLandmarkCategory>;
+	    	CleanupClosePushL(*categories);
+	        for( TInt cnt = 0; cnt < categoryIdArray->Count(); cnt++ )
+	            {
+	            CPosLandmarkCategory *category = iParser.LandmarkCategoryLC((*categoryIdArray)[cnt]);
+	            category->GetCategoryName( categoryPtr );
+	            /*
+	             * For predefined category, find the name from local database and
+	             * display the localised names to the user
+	             * If received predefined category does not exist in the local db,
+	             * then treat is as a newly received category
+	             */
+	            if ( category->GlobalCategory() != KPosLmNullGlobalCategory ) // global category
+	                {
+	                // Get the name from db (localised name for predefined category is stored in db)
+	                HBufC* globCatName = NULL;
+	                CPosLmCategoryManager* categoryMgr = CPosLmCategoryManager::NewL( iDb );
+		            CleanupStack::PushL( categoryMgr );
+		            globCatName = categoryMgr->GlobalCategoryNameL( category->GlobalCategory() );
+		            if ( globCatName == NULL )
+	    	            {
+	    	            categoryNames->AddCategoryName( categoryPtr );
+	    	            }
+	    	        else
+	        	        {
+	        	        CleanupStack::PushL( globCatName );
+	                    if ( globCatName->Length() > 0 )
+	                        {
+	                        // Add it to categories to be shown
+	                        categoryNames->AddCategoryName( *globCatName );
+	                        }
+	                    CleanupStack::PopAndDestroy( globCatName );
+	        	        }
+		            CleanupStack::PopAndDestroy( categoryMgr );
+	                }
+	            else // User defined categories
+	                {
+	                categoryNames->AddCategoryName( categoryPtr );
+	                }
+	            User::LeaveIfError(categories->Append(category));
+	            CleanupStack::Pop(category);
+	            }
+	    	//categoryIdArray->Close();
+	    	CLmkLandmark* lmkLandmarks = CLmkLandmark::NewL(landmark,*categories);
+	    	CleanupStack::PushL(lmkLandmarks);
+	        User::LeaveIfError( iLmkLandmarks.Append( lmkLandmarks ) );
+	        User::LeaveIfError( iCategoriesNames.Append( categoryNames ) ); //Owner ship transferred to array
+	        CleanupStack::Pop();//lmkLandmarks
+	        CleanupStack::Pop( );//categories
+	        categories->ResetAndDestroy();
+	        delete categories;
+	        CleanupStack::PopAndDestroy( 2 ); //catName,categoryIdArray
+	        delete categoryIdArray;
+	        CleanupStack::Pop();//categoryNames
+	        CleanupStack::PopAndDestroy();//landmark
+
+        }
+
+    if ( aStatus != KPosLmOperationNotComplete )
+        { // parsing finished or error occured
+        __ASSERT_DEBUG( iAOOperation, Panic( KLmkPanicNullMember ) );
+
+        delete iAOOperation;
+        iAOOperation = NULL;
+
+        iObserver.HandleOperationL( aType, aProgress, aStatus );
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+// CLmkParseAllWrapper::NumOfLandmarks
+// -----------------------------------------------------------------------------
+//
+TInt CLmkParseAllWrapper::NumOfLandmarks()
+	{
+	return iLmkLandmarks.Count();
+	}
+
+// -----------------------------------------------------------------------------
+// CLmkParseAllWrapper::LmkLandmarkLC
+// -----------------------------------------------------------------------------
+//
+CLmkLandmark* CLmkParseAllWrapper::LmkLandmarkLC( TInt aLandmarkIndex )
+	{
+	__ASSERT_DEBUG( aLandmarkIndex < TUint( iLmkLandmarks.Count() ),
+                    Panic( KLmkPanicInvalidIndex ) );
+
+    CLmkLandmark* landmark = iLmkLandmarks[aLandmarkIndex];
+    CLmkLandmark* lmkLandmarks = CLmkLandmark::NewL( *landmark );
+    CleanupStack::PushL(lmkLandmarks);
+    return lmkLandmarks;
+	}
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/engine/src/CLmkParsedLmListProvider.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,150 @@
+/*
+* 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:    LandmarksUi Content File -
+*
+*/
+
+
+
+
+
+
+
+
+// INCLUDE FILES
+#include "CLmkParsedLmListProvider.h"
+#include "CLmkLandmarkUiItem.h"
+#include "MLmkSelectorIconMgr.h"
+#include "CLmkParser.h"
+#include <EPos_CPosLandmark.h>
+#include <lmkerrors.h>
+
+#if defined(_DEBUG)
+// CONSTANTS
+/// Unnamed namespace for local definitions
+namespace {
+
+_LIT( KPanicMsg, "CLmkParsedLmListProvider" );
+
+void Panic( TPanicCode aReason )
+    {
+    User::Panic( KPanicMsg, aReason );
+    }
+}  // namespace
+#endif
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CLmkParsedLmListProvider::CLmkParsedLmListProvider
+// C++ constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+CLmkParsedLmListProvider::CLmkParsedLmListProvider(
+    CLmkParser& aParser )
+    : iParser( aParser )
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkParsedLmListProvider::ConstructL
+// Symbian 2nd phase constructor can leave.
+// -----------------------------------------------------------------------------
+//
+void CLmkParsedLmListProvider::ConstructL()
+    {
+    // base class 2nd phase constructor
+    CLmkListProviderBase::BaseConstructL();
+
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkParsedLmListProvider::NewL
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+CLmkParsedLmListProvider* CLmkParsedLmListProvider::NewL(
+    CLmkParser& aParser )
+    {
+    CLmkParsedLmListProvider* self =
+        new ( ELeave ) CLmkParsedLmListProvider( aParser );
+
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop();
+
+    return self;
+    }
+
+// ---------------------------------------------------------
+// CLmkParsedLmListProvider::~CLmkParsedLmListProvider
+// ---------------------------------------------------------
+//
+CLmkParsedLmListProvider::~CLmkParsedLmListProvider()
+    {
+    }
+
+// ---------------------------------------------------------
+// CLmkParsedLmListProvider::InitializeL
+// ---------------------------------------------------------
+//
+void CLmkParsedLmListProvider::InitializeL()
+    {
+    // This class is not responsible of db initialization or
+    // parser initialization.
+    }
+
+// ---------------------------------------------------------
+// CLmkParsedLmListProvider::StartSearchingLandmarksL()
+// ---------------------------------------------------------
+//
+TBool CLmkParsedLmListProvider::StartSearchingLandmarksL(
+								const TDesC& /*aSearchPattern*/,
+    							TBool /*aSearchOnlyInPreviousMatches*/)
+	{
+	// nothing to do
+	return ETrue;
+	}
+
+// ---------------------------------------------------------
+// CLmkParsedLmListProvider::ItemCount
+// ---------------------------------------------------------
+//
+TInt CLmkParsedLmListProvider::ItemCount() const
+    {
+    return iParser.NumOfParsedLandmarks();
+    }
+
+// ---------------------------------------------------------
+// CLmkParsedLmListProvider::ItemAtL
+// ---------------------------------------------------------
+//
+CLmkUiItemBase* CLmkParsedLmListProvider::ItemAtL( TInt aIndex )
+    {
+    __ASSERT_DEBUG( iIconMgr, Panic( KLmkPanicNullMember ) );
+
+    CPosLandmark* landmark = iParser.LandmarkLC( aIndex );
+
+    // Icons are not exchanged when messaging so
+    // use default icon for landmark:
+    TInt iconListIndex = iIconMgr->GetDefaultIconL(
+            MLmkSelectorIconMgr::ELandmarkDefaultIcon );
+
+    CLmkLandmarkUiItem* uiItem =
+        CLmkLandmarkUiItem::NewL( landmark, iconListIndex );
+    CleanupStack::Pop(); // landmark, ownership transferred
+    return uiItem;
+    }
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/engine/src/CLmkParser.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,462 @@
+/*
+* Copyright (c) 2002-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 contains methods which interact with Landmarks Framework
+*                parser which does the job of parsing landmarks in the received
+*                landmark package
+*
+*/
+
+
+
+
+
+
+
+// INCLUDE FILES
+
+#include "EPos_CPosLandmarkParser.h"
+#include "EPos_CPosLandmarkDatabase.h"
+#include "EPos_CPosLandmark.h"
+#include "landmarks.hrh"
+#include "LmkFileUtils.h"
+#include "CLmkAOOperation.h"
+#include "CLmkDbUtils.h"
+#include "CLmkParser.h"
+#include "CLmkParseAllWrapper.h"
+#include <apgcli.h>
+#include <lmkerrors.h>
+
+// CONSTANTS
+/// Unnamed namespace for local definitions
+namespace {
+
+#if defined(_DEBUG)
+_LIT( KPanicMsg, "CLmkParser" );
+
+void Panic( TPanicCode aReason )
+    {
+    User::Panic( KPanicMsg, aReason );
+    }
+#endif
+
+_LIT( KLmkTempDataFile, "c:\\system\\Temp\\LmkTemp.lmx" );
+
+}  // namespace
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CLmkParser::CLmkParser
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+CLmkParser::CLmkParser(
+	CPosLandmarkDatabase& aDb,
+	MLmkAOOperationObserver& aObserver,
+	TBool aProgressNote )
+	: iDb( aDb ),
+	  iObserver( &aObserver ),
+	  iProgressNote( aProgressNote )
+	{
+	}
+
+// ---------------------------------------------------------
+// CLmkParser::NewL
+// ---------------------------------------------------------
+//
+EXPORT_C CLmkParser* CLmkParser::NewL(
+	const TDesC& aFile,
+	CPosLandmarkDatabase& aDb,
+	MLmkAOOperationObserver& aObserver,
+	TBool aProgressNote )
+	{
+	CLmkParser* self =
+        new ( ELeave ) CLmkParser( aDb, aObserver, aProgressNote );
+	CleanupStack::PushL( self );
+	self->ConstructL( aFile );
+	CleanupStack::Pop(); //self
+    return self;
+	}
+
+// ---------------------------------------------------------
+// CLmkParser::NewL
+// ---------------------------------------------------------
+//
+EXPORT_C CLmkParser* CLmkParser::NewL(
+	RFile& aFile,
+	CPosLandmarkDatabase& aDb,
+	MLmkAOOperationObserver& aObserver,
+	TBool aProgressNote )
+	{
+	CLmkParser* self =
+        new ( ELeave ) CLmkParser( aDb, aObserver, aProgressNote );
+	CleanupStack::PushL( self );
+	self->ConstructL( aFile );
+	CleanupStack::Pop(); //self
+	return self;
+	}
+
+
+// -----------------------------------------------------------------------------
+// CLmkParser::ConstructL()
+// -----------------------------------------------------------------------------
+//
+void CLmkParser::ConstructL( const TDesC& aFile )
+	{
+
+	iDbUtils = CLmkDbUtils::NewL( iDb, *this, iProgressNote );
+	RFs fs;
+	User::LeaveIfError(fs.Connect());
+	CleanupClosePushL(fs);
+
+	RFile file;
+	LmkFileUtils::DeleteFileL(KLmkTempDataFile);
+	User::LeaveIfError(file.Create(fs, KLmkTempDataFile, EFileShareAny));
+	CleanupClosePushL(file);
+
+	RFile fileHandle;
+	User::LeaveIfError(fileHandle.Open(fs, aFile, EFileShareAny));
+	CleanupClosePushL(fileHandle);
+
+	TDataType mimeType;
+	User::LeaveIfError(ResolveMimeTypeL(fileHandle,mimeType));
+	iParser = CPosLandmarkParser::NewL(  mimeType.Des8());
+
+	HBufC8* tempBuf = HBufC8::NewLC(5000);  // to manage for 5 Landmarks at the most
+	TPtr8 ptr = tempBuf->Des();
+	User::LeaveIfError(fileHandle.Read( ptr ));
+	User::LeaveIfError(file.Write( ptr ));
+
+	CleanupStack::PopAndDestroy(); // File
+	CleanupStack::PopAndDestroy(1); //tempBuf
+
+	iParser->SetInputFileL( KLmkTempDataFile);
+	iParseWrapper = CLmkParseAllWrapper::NewL( *iParser, *this, iDb );
+	iFileName = HBufC::NewL(256);
+	*iFileName = KLmkTempDataFile;
+	iFileHandleFlag = EFalse;
+
+    CleanupStack::PopAndDestroy(); // File Handle
+	CleanupStack::PopAndDestroy(); // fs
+	}
+
+// -----------------------------------------------------------------------------
+// CLmkParser::ConstructL()
+// -----------------------------------------------------------------------------
+//
+void CLmkParser::ConstructL(RFile& aFile )
+	{
+	iDbUtils = CLmkDbUtils::NewL( iDb, *this, iProgressNote );
+
+	TDataType mimeType;
+	User::LeaveIfError(ResolveMimeTypeL(aFile,mimeType));
+	iParser = CPosLandmarkParser::NewL(  mimeType.Des8());
+	iParser->SetInputFileHandleL(aFile);
+	iParseWrapper = CLmkParseAllWrapper::NewL( *iParser, *this, iDb );
+
+	iFileHandle = &aFile;
+	iFileHandleFlag = ETrue;
+	}
+
+// -----------------------------------------------------------------------------
+// CLmkParser::~CLmkParser()
+// -----------------------------------------------------------------------------
+//
+CLmkParser::~CLmkParser()
+	{
+	delete iAOOperation;
+	delete iParser;
+	delete iParseWrapper;
+	delete iDbUtils;
+	delete iFileName;
+	iFileHandle = NULL;
+	}
+
+// -----------------------------------------------------------------------------
+// CLmkParser::HandleOperationL
+// -----------------------------------------------------------------------------
+//
+void CLmkParser::HandleOperationL(
+TOperationTypes aType,
+TReal32 aProgress,
+TInt aStatus )
+	{
+	// Initialize operation is not done with iAOOperation so in that case
+	// we don't delete iAOOperation.
+	if ( aType != EInitialize && aStatus != KPosLmOperationNotComplete )
+		{
+		/* Parsing is done with iAOOperation when wrapper isn't used anymore.
+		 * Remove the following if-statement when removing wrapper
+		 */
+		if( aType != EParse )
+			{
+			__ASSERT_DEBUG( iAOOperation, Panic( KLmkPanicNullMember ) );
+
+			delete iAOOperation;
+			iAOOperation = NULL;
+			}
+		}
+	__ASSERT_DEBUG( iObserver, Panic( KLmkPanicNullMember ) );
+	iObserver->HandleOperationL( aType, aProgress, aStatus );
+	}
+
+// -----------------------------------------------------------------------------
+// CLmkParser::FileName
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TPtrC CLmkParser::FileName()
+	{
+	TInt error = KErrNone;
+	if( !iFileName )
+		{
+		TRAP( error,iFileName = HBufC::NewL(256));
+		}
+	if( !error )
+		{
+		TPtr ptr = iFileName->Des();
+		iFileHandle->Name( ptr );
+		return *iFileName;
+		}
+	return TPtrC();
+	}
+
+// -----------------------------------------------------------------------------
+// CLmkParser::FileHandle
+// -----------------------------------------------------------------------------
+//
+EXPORT_C RFile& CLmkParser::FileHandle()
+	{
+	return *iFileHandle;
+	}
+
+// -----------------------------------------------------------------------------
+// CLmkParser::IsFileHandle
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TBool CLmkParser::IsFileHandle()
+    {
+    return iFileHandleFlag;
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkParser::InitializeDbL
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CLmkParser::InitializeDbL()
+	{
+	iDbUtils->InitializeDbL();
+	}
+
+// -----------------------------------------------------------------------------
+// CLmkParser::StartParsingL
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CLmkParser::StartParsingL()
+	{
+	LeaveIfInUseL();
+	iParseWrapper->ParseAllL();
+	}
+
+// -----------------------------------------------------------------------------
+// CLmkParser::NumOfParsedLandmarks
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TInt CLmkParser::NumOfParsedLandmarks()
+	{
+	return iParseWrapper->NumOfLandmarks();
+	}
+
+// -----------------------------------------------------------------------------
+// CLmkParser::PackageName
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TPtrC CLmkParser::PackageName()
+	{
+	_LIT( KDot, "." );
+	TPtrC ptr = iParser->CollectionData( EPosLmCollDataCollectionName );
+	if( ptr.Length() == 0)
+		{
+		//get the position of '.' character
+		TInt pos = FileName().Find(KDot);
+		if( pos != KErrNotFound)
+			{
+			//get the left most string starting from '.' char
+			return FileName().Left( pos );
+			}
+		else
+			{
+			return FileName();
+			}
+		}
+	return ptr;
+	}
+
+// -----------------------------------------------------------------------------
+// CLmkParser::LandmarkLC
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CPosLandmark* CLmkParser::LandmarkLC( TInt aIndex )
+	{
+	return iParseWrapper->LandmarkLC( aIndex );
+	}
+
+// -----------------------------------------------------------------------------
+// CLmkParser::LmkLandmarkLC
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CLmkLandmark* CLmkParser::LmkLandmarkLC( TInt aIndex )
+	{
+	return iParseWrapper->LmkLandmarkLC(aIndex);
+	}
+// -----------------------------------------------------------------------------
+// CLmkParser::CategoryNameLC
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CLmkLandMarkCategoriesName* CLmkParser::CategoryNameLC( TInt aIndex )
+    {
+    /* THIS FUNCTIONALITY WILL BE USED WHEN WRAPPER IS REMOVED:
+    return iParser->LandmarkLC( aIndex );
+    */
+    return iParseWrapper->CategoryNameLC( aIndex );
+    }
+
+//
+// -----------------------------------------------------------------------------
+// CLmkParser::ChangeObserver
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CLmkParser::ChangeObserver(
+	MLmkAOOperationObserver& aNewObserver )
+	{
+	iObserver = &aNewObserver;
+	}
+
+// -----------------------------------------------------------------------------
+// CLmkParser::StartImportingL
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CLmkParser::StartImportingL(TBool aIncludeNewCategories)
+	{
+	LeaveIfInUseL();
+
+	CPosLandmarkDatabase::TTransferOptions options;
+
+    if ( aIncludeNewCategories )
+	    {
+	    options = CPosLandmarkDatabase::EIncludeCategories;
+	    }
+	else
+		{
+		options =  (CPosLandmarkDatabase::EIncludeCategories) |
+		           (CPosLandmarkDatabase::ESupressCategoryCreation);
+		}
+
+	CPosLmOperation* operation =
+	    iDb.ImportLandmarksL( *iParser, options );
+	CleanupStack::PushL( operation );
+	iAOOperation = CLmkAOOperation::NewL( operation,
+	                                      *this,
+	                                      EImport,
+	                                      iProgressNote );
+	CleanupStack::Pop( operation ); // ownership transferred
+
+	iAOOperation->StartOperation();
+	}
+
+// -----------------------------------------------------------------------------
+// CLmkParser::StartImportingL
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CLmkParser::StartImportingL(
+	const RArray<TUint>& aSelected, TBool aIncludeNewCategories)
+	{
+	LeaveIfInUseL();
+
+    CPosLandmarkDatabase::TTransferOptions options;
+
+    if ( aIncludeNewCategories )
+	    {
+	    options = CPosLandmarkDatabase::EIncludeCategories;
+	    }
+	else
+		{
+		options = (CPosLandmarkDatabase::EIncludeCategories) | (CPosLandmarkDatabase::ESupressCategoryCreation);
+		}
+
+	CPosLmOperation* operation =
+	    iDb.ImportLandmarksL( *iParser, aSelected, options );
+	CleanupStack::PushL( operation );
+	iAOOperation = CLmkAOOperation::NewL( operation,
+	                                      *this,
+	                                      EImport,
+	                                      iProgressNote );
+	CleanupStack::Pop( operation ); // ownership transferred
+
+	iAOOperation->StartOperation();
+	}
+
+// -----------------------------------------------------------------------------
+// CLmkParser::CancelImporting
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CLmkParser::CancelImporting()
+	{
+	if ( iAOOperation )
+		{
+		iAOOperation->Cancel();
+		delete iAOOperation;
+		iAOOperation = NULL;
+		}
+	}
+
+// -----------------------------------------------------------------------------
+// CLmkParser::LeaveIfInUseL
+// -----------------------------------------------------------------------------
+//
+void CLmkParser::LeaveIfInUseL()
+	{
+	if ( iAOOperation )
+		{
+		User::Leave( KErrInUse );
+		}
+	}
+
+// -----------------------------------------------------------------------------
+// CLmkParser::ResolveMimeTypeL
+// -----------------------------------------------------------------------------
+//
+TInt CLmkParser::ResolveMimeTypeL( RFile& aFile, TDataType& aDataType ) const
+	{
+	TInt result(KErrNotFound);
+	RApaLsSession ls ;
+	TDataRecognitionResult dataType;
+	TInt err( ls.Connect() );
+	if ( err == KErrNone )
+		{
+		CleanupClosePushL( ls );
+		err = ls.RecognizeData(aFile, dataType);
+		if(err == KErrNone &&
+		   (dataType.iConfidence == CApaDataRecognizerType::EProbable
+		    || dataType.iConfidence == CApaDataRecognizerType::ECertain
+		    || dataType.iConfidence == CApaDataRecognizerType::EPossible))
+			{
+			aDataType = dataType.iDataType;
+			result = KErrNone;
+			}
+		CleanupStack::PopAndDestroy(&ls);
+		}
+	return result;
+	}
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/engine/src/CLmkSearchedLmListProvider.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,625 @@
+/*
+ * Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:    Filtered landmarks list provider
+ *
+ */
+
+// SYSTEM INCLUDES
+#include <EPos_CPosLmPartialReadParameters.h>
+#include <EPos_CPosLandmark.h>
+#include <EPos_TPosLmSortPref.h>
+#include <EPos_CPosLandmarkDatabase.h>
+#include <EPos_CPosLmItemIterator.h>
+#include <EPos_CPosLmSearchCriteria.h>
+#include <EPos_CPosLandmarkSearch.h>
+#include <e32math.h>
+#include <EPos_CPosLmCompositeCriteria.h>
+#include <EPos_CPosLmCategoryCriteria.h>
+#include <EPos_CPosLmIdListCriteria.h>
+#include <EPos_CPosLmTextCriteria.h>
+#include <AknWaitDialog.h>
+#include <lmkui.rsg>
+
+// USER INCLUDES
+#include "CLmkSearchedLmListProvider.h"
+#include "CLmkLandmarkUiItem.h"
+#include "CLmkAOOperation.h"
+#include "MLmkSelectorIconMgr.h"
+#include <lmkerrors.h>
+#include "Debug.h"
+
+// CONSTANTS
+_LIT(KSpaceTextCriteria,"* ");
+_LIT(KDefaultTextCriteria,"*");
+
+#if defined(_DEBUG)
+/// Unnamed namespace for local definitions
+namespace
+    {
+    _LIT( KPanicMsg, "CLmkSearchedLmListProvider" );
+    void Panic(TPanicCode aReason)
+        {
+        User::Panic(KPanicMsg, aReason);
+        }
+    } // namespace
+#endif
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CLmkSearchedLmListProvider::CLmkSearchedLmListProvider
+// C++ constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+CLmkSearchedLmListProvider::CLmkSearchedLmListProvider(
+        CPosLandmarkDatabase& aDb, CPosLmSearchCriteria& aCriteria) :
+    CLmkLmItemListProvider(aDb), iCriteria(aCriteria),
+            iIsSecondSearchStarted(EFalse)
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkSearchedLmListProvider::ConstructL
+// Symbian 2nd phase constructor can leave.
+// -----------------------------------------------------------------------------
+//
+void CLmkSearchedLmListProvider::ConstructL()
+    {
+    // base class 2nd phase constructor
+    CLmkLmItemListProvider::BaseConstructL();
+
+    iReadParams = CPosLmPartialReadParameters::NewLC();
+    CleanupStack::Pop(); // iReadParams
+    iReadParams->SetRequestedAttributes(CPosLandmark::ELandmarkName
+            | CPosLandmark::EIcon | CPosLandmark::ECategoryInfo);
+
+    iSearch = CPosLandmarkSearch::NewL(iDb);
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkSearchedLmListProvider::NewL
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+CLmkSearchedLmListProvider* CLmkSearchedLmListProvider::NewL(
+        CPosLandmarkDatabase& aDb, CPosLmSearchCriteria& aCriteria)
+    {
+    CLmkSearchedLmListProvider* self =
+            new (ELeave) CLmkSearchedLmListProvider(aDb, aCriteria);
+
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    CleanupStack::Pop();
+
+    return self;
+    }
+
+// ---------------------------------------------------------
+// CLmkSearchedLmListProvider::~CLmkSearchedLmListProvider
+// ---------------------------------------------------------
+//
+CLmkSearchedLmListProvider::~CLmkSearchedLmListProvider()
+    {
+    delete iReadParams;
+    delete iSearch;
+    if (iSearchAO)
+        {
+        iSearchAO->StopOperation();
+        }
+    delete iSearchAO;
+    }
+
+// ---------------------------------------------------------
+// CLmkSearchedLmListProvider::ItemAtL
+// ---------------------------------------------------------
+//
+CLmkUiItemBase* CLmkSearchedLmListProvider::ItemAtL(TInt aIndex)
+    {
+    __ASSERT_DEBUG( iIconMgr, Panic( KLmkPanicNullMember ) );
+    //landmark with updated icon, if associated with one cat.
+    CPosLandmark* landmark = GetLandmarkLC(aIndex);
+    TPtrC mbmFile;
+    TInt iconFileIndex = -1;
+    TInt iconListIndex = -1;
+    TInt iconMasktIndex = -1;
+    TInt result = landmark->GetIcon(mbmFile, iconFileIndex, iconMasktIndex);
+    if (result == KErrNone)
+        {
+        TRAPD(err, iconListIndex =
+                iIconMgr->GetIconL( mbmFile, iconFileIndex ) );
+        if (err == KErrNotFound) // icon file not found -> fallback to default
+            {
+            iconListIndex = iIconMgr->GetDefaultIconL(
+                    MLmkSelectorIconMgr::ELandmarkDefaultIcon);
+            }
+        }
+    else
+        {
+        iconListIndex = iIconMgr->GetDefaultIconL(
+                MLmkSelectorIconMgr::ELandmarkDefaultIcon);
+        }
+
+    CLmkLandmarkUiItem* uiItem = CLmkLandmarkUiItem::NewL(landmark,
+            iconListIndex);
+    CleanupStack::Pop(); // landmark, ownership transferred
+    return uiItem;
+    }
+
+// ---------------------------------------------------------
+// CLmkSearchedLmListProvider::PrepareListL
+// ---------------------------------------------------------
+//
+void CLmkSearchedLmListProvider::PrepareListL()
+    {
+    DEBUG( CLmkSearchedLmListProvider::PrepareListL start );
+    iCount = 0;
+
+    iDb.SetPartialReadParametersL(*iReadParams);
+
+    TPosLmSortPref sortOrder(CPosLandmark::ELandmarkName,
+            TPosLmSortPref::EAscending);
+    CPosLmOperation* operation = iSearch->StartLandmarkSearchL(iCriteria,
+            sortOrder);
+    CleanupStack::PushL(operation);
+    if (iSearchAO)
+        {
+        iSearchAO->StopOperation();
+        delete iSearchAO; // cancel possibly pending operation
+        iSearchAO = NULL;
+        }
+    iSearchAO = CLmkAOOperation::NewL(operation, *this,
+            MLmkAOOperationObserver::ESearch, iOperationNotInUse);
+    iOperationNotInUse = ETrue;
+    CleanupStack::Pop(operation); // ownership transferred
+    iSearchAO->StartOperation();
+    DEBUG( CLmkSearchedLmListProvider::PrepareListL End );
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkSearchedLmListProvider::PrepareListL
+// -----------------------------------------------------------------------------
+//
+TBool CLmkSearchedLmListProvider::PrepareListL(const TDesC& aSearchPattern,
+        TBool aSearchOnlyInPreviousMatches)
+    {
+    iCount = 0;
+    iRequestFromFindBox = ETrue;
+    iOperationNotInUse = ETrue;
+    iIsSecondSearchStarted = EFalse;
+    DEBUG1( CLmkSearchedLmListProvider::PrepareListL 2 start with aSearchPattern = %d,aSearchPattern.Length());
+
+    if (aSearchPattern.Compare(KDefaultTextCriteria) == 0
+            || aSearchPattern.Length() <= 0)
+        {
+        PrepareListL();
+        iRequestFromFindBox = EFalse;
+        return ETrue;
+        }
+
+    // We need to cancel if we are searching/reading landmarks.
+    if (iSearchAO)
+        {
+        iSearchAO->StopOperation();
+        delete iSearchAO; // cancel possibly pending operation
+        iSearchAO = NULL;
+        }
+
+    // Create the composite criterion
+    CPosLmCompositeCriteria* compCrit = CPosLmCompositeCriteria::NewLC(
+            CPosLmCompositeCriteria::ECompositionOR);
+
+    // Create the text search criterion and add it to composite
+    CPosLmTextCriteria* textCrit1 = CPosLmTextCriteria::NewLC();
+
+    const TInt KExtraChars = 3; // 2 chars wildcards
+    HBufC* filterBuf = HBufC::NewLC(aSearchPattern.Length() + KExtraChars);
+    TPtr filter = filterBuf->Des();
+    filter.Copy(KSpaceTextCriteria);
+    filter.Append(aSearchPattern);
+
+    textCrit1->SetTextL(filter);
+    textCrit1->SetAttributesToSearch(CPosLandmark::ELandmarkName);
+
+    User::LeaveIfError(compCrit->AddArgument(textCrit1));
+    // Ownership of the text criterion has been passed to the composite
+    CleanupStack::PopAndDestroy(filterBuf);
+    CleanupStack::Pop(textCrit1);
+
+    // Create the text search criterion and add it to composite
+    CPosLmTextCriteria* textCrit2 = CPosLmTextCriteria::NewLC();
+    textCrit2->SetTextL(aSearchPattern);
+    textCrit2->SetAttributesToSearch(CPosLandmark::ELandmarkName);
+
+    User::LeaveIfError(compCrit->AddArgument(textCrit2));
+    // Ownership of the text criterion has been passed to the composite
+    CleanupStack::Pop(textCrit2);
+
+    iDb.SetPartialReadParametersL(*iReadParams);
+
+    TPosLmSortPref sortOrder(CPosLandmark::ELandmarkName,
+            TPosLmSortPref::EAscending);
+    // Start the search
+    // Create search operation
+    CPosLmOperation* operation = iSearch->StartLandmarkSearchL(*compCrit,
+            sortOrder, aSearchOnlyInPreviousMatches);
+
+    CleanupStack::PopAndDestroy(compCrit);
+    CleanupStack::PushL(operation);
+
+    iSearchAO = CLmkAOOperation::NewL(operation, *this,
+            MLmkAOOperationObserver::ESearch, ETrue);
+    CleanupStack::Pop(operation); // ownership transferred
+
+    iSearchAO->StartOperation();
+    DEBUG( CLmkSearchedLmListProvider::PrepareListL 2 End );
+    return ETrue;
+    }
+
+// ---------------------------------------------------------
+// CLmkSearchedLmListProvider::StartSecondSearchL
+// ---------------------------------------------------------
+//
+void CLmkSearchedLmListProvider::StartSecondSearchL()
+    {
+    DEBUG( CLmkSearchedLmListProvider::StartSecondSearchL start );
+
+    iIsSecondSearchStarted = ETrue;
+
+    // Create the composite criterion
+    CPosLmCompositeCriteria* compCrit = CPosLmCompositeCriteria::NewLC(
+            CPosLmCompositeCriteria::ECompositionAND);
+
+    // Create the category search criterion and add it to composite
+    CPosLmCategoryCriteria* catCrit = CPosLmCategoryCriteria::NewLC();
+    catCrit->SetCategoryItemId(
+            (static_cast<CPosLmCategoryCriteria&> (iCriteria)).CategoryItemId());
+
+    User::LeaveIfError(compCrit->AddArgument(catCrit));
+    // Ownership of the category criterion has been passed to the composite
+    CleanupStack::Pop(catCrit);
+
+    // Create the text search criterion and add it to composite
+    CPosLmIdListCriteria* idListCrit = CPosLmIdListCriteria::NewLC();
+    idListCrit->SetLandmarkIdsL(iIdArray);
+
+    User::LeaveIfError(compCrit->AddArgument(idListCrit));
+    // Ownership of the text criterion has been passed to the composite
+    CleanupStack::Pop(idListCrit);
+
+    iDb.SetPartialReadParametersL(*iReadParams);
+
+    TPosLmSortPref sortOrder(CPosLandmark::ELandmarkName,
+            TPosLmSortPref::EAscending);
+    // Start the search
+    // Create search operation
+    CPosLmOperation* operation = iSearch->StartLandmarkSearchL(*compCrit,
+            sortOrder);
+
+    CleanupStack::PopAndDestroy(compCrit);
+    CleanupStack::PushL(operation);
+
+    iSearchAO = CLmkAOOperation::NewL(operation, *this,
+            MLmkAOOperationObserver::ESearch, ETrue);
+    CleanupStack::Pop(operation); // ownership transferred
+
+    iSearchAO->StartOperation();
+    DEBUG( CLmkSearchedLmListProvider::StartSecondSearchL End );
+    }
+
+// ---------------------------------------------------------
+// CLmkSearchedLmListProvider::HandleOperationL
+// ---------------------------------------------------------
+//
+void CLmkSearchedLmListProvider::HandleOperationL(TOperationTypes aType,
+        TReal32 aProgress, TInt aStatus)
+    {
+    DEBUG1( CLmkSearchedLmListProvider::HandleOperationL start aType=%d,aType);
+    if (aType == MLmkAOOperationObserver::EDeleteLandmarks)
+        {
+        return;
+        }
+    if (aType == MLmkAOOperationObserver::ERemoveCategory)
+        {
+        return;
+        }
+    if (aType == MLmkAOOperationObserver::ESearch)
+        {
+        ReadItemsToArrayL();
+        if (aStatus == KErrNone)
+            {
+            if (iSearchAO)
+                {
+                iSearchAO->StopOperation();
+                delete iSearchAO;
+                iSearchAO = NULL;
+                }
+
+            // reset operation values
+            iOperationCmd = ELmkCmdStopOperation;//temp default value
+            iCount = 0;
+
+            DEBUG2( CLmkSearchedLmListProvider::HandleOperationL iRequestFromFindBox=%d iIsSecondSearchStarted=%d
+                    ,iRequestFromFindBox,iIsSecondSearchStarted);
+
+            if (iRequestFromFindBox && iIsSecondSearchStarted == EFalse)
+                {
+                DEBUG( CLmkSearchedLmListProvider::HandleOperationL start secondsearch );
+                StartSecondSearchL();
+                return;
+                }
+
+            DEBUG( CLmkSearchedLmListProvider::HandleOperationL refresh list );
+
+            iIsSecondSearchStarted = EFalse;
+
+            if (iOperationNotInUse == EFalse)
+                {
+                NotifyObservers(ELmkEventItemAdditionComplete);
+                }
+            else
+                {
+                if (iRequestFromFindBox)
+                    {
+                    NotifyObservers(ELmkEventFindListReady);
+                    }
+                else
+                    {
+                    NotifyObservers(ELmkEventListReady);
+                    }
+                }
+
+            iOperationNotInUse = ETrue;
+
+            if (iCatDelete)
+                {
+                NotifyObservers(ELmkEventCategoryDeleted);
+                iCatDelete = EFalse;
+                }
+            else if (iCatUpdate)
+                {
+                NotifyObservers(ELmkEventCategoryUpdated);
+                iCatUpdate = EFalse;
+                }
+
+            if (iItemsDeleted < iItemsToDelete)
+                {
+                PrepareForDeleteL();
+                }
+            else
+                {
+                if (iWaitNote)
+                    {
+                    iWaitNote->ProcessFinishedL();
+                    iWaitNote = NULL;
+                    }
+                }
+            return;
+            } // end of if ( aStatus == KErrNone )
+
+        if (iCount == ELmkStepOne || iCount == ELmkStepTwo)
+            {
+            if (iOperationNotInUse == EFalse)
+                {
+                NotifyObservers(ELmkEventItemAdditionComplete);
+                }
+            else
+                {
+                if (iRequestFromFindBox)
+                    {
+                    NotifyObservers(ELmkEventFindListReady);
+                    }
+                else
+                    {
+                    NotifyObservers(ELmkEventListReady);
+                    }
+                }
+            iRequestFromFindBox = EFalse;
+            iOperationNotInUse = EFalse;
+            }
+        }
+    else
+        { // This is not this classes' operation
+        CLmkLmItemListProvider::HandleOperationL(aType, aProgress, aStatus);
+        }
+    }
+
+// ---------------------------------------------------------
+// CLmkSearchedLmListProvider::HandleDatabaseEvent
+// ---------------------------------------------------------
+//
+void CLmkSearchedLmListProvider::HandleDatabaseEvent(TPosLmEvent& aEvent)
+    {
+    iCatDelete = EFalse;
+
+    TBool needRefresh = ETrue;
+
+    // check any items are selected to do operations like iconchanges or add to category.
+    if (iSelectedItemsCount > 0 && iOperationCmd != ELmkCmdAddToCat
+            && iOperationCmd != ERemoveFromCat)
+        {
+        iCount++;
+        if (iSelectedItemsCount == iCount)
+            {
+            iSelectedItemsCount = 0;
+            iCount = 0;
+            }
+        needRefresh = EFalse;
+        }
+
+    switch (aEvent.iEventType)
+        {
+        case EPosLmEventLandmarkUpdated: // lm icon changes, lm renaming
+        case EPosLmEventLandmarkUnknownChanges: // lm multiple deletion, lm add to category
+        case EPosLmEventUnknownChanges:
+        case EPosLmEventLandmarkCreated:
+        case EPosLmEventCategoryDeleted:
+        case EPosLmEventCategoryUpdated:
+            {
+            iOperationNotInUse = EFalse;
+            if (aEvent.iEventType == EPosLmEventCategoryDeleted)
+                {
+                iCatDelete = ETrue;
+                }
+            if (aEvent.iEventType == EPosLmEventCategoryUpdated)
+                {
+                iCatUpdate = ETrue;
+                }
+
+            if (needRefresh)
+                {
+                if (iSearchAO)
+                    {
+                    iSearchAO->StopOperation();
+                    delete iSearchAO;
+                    iSearchAO = NULL;
+                    }
+                iOperationNotInUse = EFalse;
+                TInt err = KErrNone;
+                do
+                    {
+                    TRAP( err, PrepareListL() );
+                    }
+                while (err == KErrLocked);
+                if (err)
+                    {
+                    HandleError(err);
+                    }
+                }
+            else
+                {
+                NotifyObservers(ELmkEventListReady);
+                }
+            break;
+            }
+        case EPosLmEventLandmarkDeleted:
+            {
+            TInt index = iIdArray.Find(aEvent.iLandmarkItemId);
+            if (index != KErrNotFound && index < iIdArray.Count())
+                {
+                iIdArray.Remove(index);
+                NotifyObservers(ELmkEventListReady);
+                }
+            break;
+            }
+        default:
+            { // Not interesting event for this provider
+            break;
+            }
+        }
+    // Remember to call base class observer method too
+    CLmkLmItemListProvider::HandleDatabaseEvent(aEvent);
+    }
+
+// ---------------------------------------------------------
+// CLmkSearchedLmListProvider::ReadItemsToArrayL
+// ---------------------------------------------------------
+//
+void CLmkSearchedLmListProvider::ReadItemsToArrayL()
+    {
+    iIdArray.Reset();
+    CPosLmItemIterator* iterator = iSearch->MatchIteratorL();
+    CleanupStack::PushL(iterator);
+    iCount = iterator->NumOfItemsL();
+    if (iCount > 0)
+        { // can only be called if there are some items
+        iterator->GetItemIdsL(iIdArray, 0, iCount); // array is first reseted
+        }
+    CleanupStack::PopAndDestroy(iterator);
+    }
+
+// ---------------------------------------------------------
+// CLmkSearchedLmListProvider::RemoveLandmarksL
+// ---------------------------------------------------------
+//
+void CLmkSearchedLmListProvider::RemoveLandmarksL(
+        const RArray<TPosLmItemId>& aSelectedItems)
+    {
+    iItemsToDelete = aSelectedItems.Count();
+    iSelectedForDelete.Reset();
+    for (TInt i = 0; i < iItemsToDelete; i++)
+        iSelectedForDelete.Append(aSelectedItems[i]);
+    iItemsDeleted = 0;
+    iIsRemoveLandmarks = ETrue;
+
+    if (iWaitNote)
+        {
+        delete iWaitNote;
+        iWaitNote = NULL;
+        }
+    PrepareForDeleteL();
+    }
+
+// ---------------------------------------------------------
+// CLmkSearchedLmListProvider::PrepareForDelete
+// ---------------------------------------------------------
+//
+void CLmkSearchedLmListProvider::PrepareForDeleteL()
+    {
+    RArray<TPosLmItemId> lmItemsChunk;
+    TInt count = iItemsDeleted;
+    if (iItemsToDelete > (iItemsDeleted + 10))
+        {
+        iItemsDeleted = iItemsDeleted + 10;
+        }
+    else
+        {
+        iItemsDeleted = iItemsDeleted + (iItemsToDelete - iItemsDeleted);
+        }
+
+    for (TInt i = count; i < iItemsDeleted; i++)
+        {
+        lmItemsChunk.Append(iSelectedForDelete[i]);
+        }
+
+    CPosLmOperation* operation = NULL;
+    if (iType == MLmkAOOperationObserver::EDeleteLandmarks)
+        {
+        operation = iDb.RemoveLandmarksL(lmItemsChunk);
+        }
+    if (iType == MLmkAOOperationObserver::ERemoveCategory)
+        {
+        CPosLmCategoryManager* mgr = CPosLmCategoryManager::NewL(iDb);
+        CleanupStack::PushL(mgr);
+        operation = mgr->RemoveCategoryFromLandmarksL(iCategoryId,
+                lmItemsChunk);
+        CleanupStack::PopAndDestroy();//mgr
+        }
+    User::LeaveIfNull(operation);
+
+    CleanupStack::PushL(operation);
+    iSearchAO = CLmkAOOperation::NewL(operation, *this, iType, EFalse);
+    CleanupStack::Pop(operation); // ownership transferred
+
+    if (iSearchAO)
+        {
+        iSearchAO->StartOperation();
+
+        if (!iWaitNote)
+            {
+            iWaitNote = new (ELeave) CAknWaitDialog(NULL, ETrue);
+            if (!iWaitNote->ExecuteLD(R_LMK_PROCESSING_WAIT_NOTE))
+                {
+                iSearchAO->StopOperation();
+                delete iSearchAO;
+                iSearchAO = NULL;
+                iWaitNote = NULL;
+                }
+            }
+        }
+
+    lmItemsChunk.Close();
+    }
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/engine/src/CLmkUiItemBase.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,77 @@
+/*
+* 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:    LandmarksUi Content File -
+*
+*/
+
+
+
+
+
+
+
+
+// INCLUDE FILES
+#include "CLmkUiItemBase.h"
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CLmkAOOperation::CLmkAOOperation
+// C++ constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+CLmkUiItemBase::CLmkUiItemBase()
+    : iExtExists( EFalse )
+    {
+    }
+
+// ---------------------------------------------------------
+// CLmkUiItemBase::~CLmkUiItemBase
+// ---------------------------------------------------------
+//
+CLmkUiItemBase::~CLmkUiItemBase()
+    {
+    }
+
+// ---------------------------------------------------------
+// CLmkUiItemBase::ExtensionIntExists
+// ---------------------------------------------------------
+//
+EXPORT_C TBool CLmkUiItemBase::ExtensionIntExists()
+    {
+    return iExtExists;
+    }
+
+// ---------------------------------------------------------
+// CLmkUiItemBase::SetExtensionInt
+// ---------------------------------------------------------
+//
+EXPORT_C void CLmkUiItemBase::SetExtensionInt( TInt aInt )
+    {
+    iExtInt = aInt;
+    iExtExists = ETrue;
+    }
+
+// ---------------------------------------------------------
+// CLmkUiItemBase::ExtensionInt
+// ---------------------------------------------------------
+//
+EXPORT_C TInt CLmkUiItemBase::ExtensionInt()
+    {
+    return iExtInt;
+    }
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/engine/src/Debug.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,90 @@
+/*
+* 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:    LandmarksUi Content File -    Contains debugging functions
+*
+*/
+
+
+
+// INCLUDE FILES
+#include "Debug.h"
+#include <flogger.h>
+#include <e32svr.h>
+
+#ifdef __LMK_DEBUG_FLAG
+
+// CONSTANTS
+#ifdef _DEBUG
+/// Folder where the log resides
+_LIT( KLogFolder, "Lmk" );
+
+/// The name of the log file
+_LIT( KLogFileName, "Lmk" );
+
+/// The format in which the time is formatted in log
+_LIT( KLogTimeFormat, "%02d.%02d:%02d:%06d ");
+
+/// The length of the string produced by KLocLogTimeFormat
+const TInt KLogTimeFormatLength = 16;
+
+/// How many characters a log line can contain
+const TInt KLogLineLength = 256;
+#endif
+// ========================== OTHER EXPORTED FUNCTIONS =========================
+
+
+// -----------------------------------------------------------------------------
+// Debug
+// Generates a log file if c:\logs\LMK\ folder exists
+// -----------------------------------------------------------------------------
+//
+void Debug( TRefByValue<const TDesC> aText, ... )
+    {
+    #ifdef _DEBUG
+    RDebug::Print(aText);
+
+    VA_LIST args;
+    VA_START( args, aText );
+
+    TBuf<KLogLineLength> buf;
+    buf.FormatList( aText, args );
+
+    RFileLogger logger;
+    TInt ret=logger.Connect();
+    if (ret==KErrNone)
+        {
+        logger.SetDateAndTime( EFalse,EFalse );
+        logger.CreateLog( KLogFolder, KLogFileName, EFileLoggingModeAppend );
+        TBuf<KLogTimeFormatLength> timeStamp;
+        TTime now;
+        now.HomeTime();
+        TDateTime dateTime;
+        dateTime = now.DateTime();
+        timeStamp.Format( KLogTimeFormat,
+            dateTime.Hour(), dateTime.Minute(),
+            dateTime.Second(), dateTime.MicroSecond() );
+        buf.Insert( 0, timeStamp );
+
+        logger.Write(buf);
+        }
+
+    logger.Close();
+
+    VA_END( args );
+    #endif
+    }
+
+#endif // __LMK_DEBUG_FLAG
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/engine/src/DllMain.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,37 @@
+/*
+* 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:    LandmarksUi Content File -    Dll entry point
+*
+*/
+
+
+
+
+
+
+
+// INCLUDE FILES
+#include "DllMain.h"
+
+// ================= MEMBER FUNCTIONS =======================
+
+void LmkEngPanic( TInt aCode ) // panic code
+    {
+    _LIT( KPanicText, "LmkEng" );
+    User::Panic( KPanicText, aCode );
+    }
+
+// ==================== LOCAL FUNCTIONS ====================
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/engine/src/LmkFileUtils.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,60 @@
+/*
+* 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:    LandmarksUi Content File -    Static utility class for file operations.
+*
+*/
+
+
+
+
+
+
+
+// INCLUDE FILES
+#include "LmkFileUtils.h"
+#include <f32file.h>
+
+// ================= MEMBER FUNCTIONS =======================
+
+// ----------------------------------------------------
+// LmkFileUtils::DeleteFileL
+// ----------------------------------------------------
+//
+EXPORT_C void LmkFileUtils::DeleteFileL( const TDesC& aFile )
+    {
+    RFs fs;
+    CleanupClosePushL( fs );
+    User::LeaveIfError( fs.Connect() );
+    TInt result = fs.Delete( aFile );
+    if ( result != KErrNone && result != KErrNotFound )
+        {
+        User::Leave( result );
+        }
+    CleanupStack::PopAndDestroy(); // fs
+    }
+// ----------------------------------------------------
+// LmkFileUtils::IsValidPath
+// ----------------------------------------------------
+//
+EXPORT_C TBool LmkFileUtils::IsValidPathL( TPtrC aFile )
+    {
+    RFs fs;
+    CleanupClosePushL( fs );
+    User::LeaveIfError( fs.Connect() );
+    TBool result = fs.IsValidName( aFile );
+    CleanupStack::PopAndDestroy(); // fs
+    return result;
+    }
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/engine/src/LmkListProviderFactory.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,95 @@
+/*
+* 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:    LandmarksUi Content File -
+*
+*/
+
+
+
+
+
+
+
+
+// INCLUDE FILES
+#include "LmkListProviderFactory.h"
+#include "CLmkLandmarkListProvider.h"
+#include "CLmkCategoryListProvider.h"
+#include "CLmkSearchedLmListProvider.h"
+#include "CLmkParsedLmListProvider.h"
+#include "CLmkParser.h"
+#include <EPos_CPosLandmarkDatabase.h>
+
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// LmkListProviderFactory::CreateProviderL
+// ?implementation_description
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CLmkListProviderBase* LmkListProviderFactory::CreateProviderL(
+    CPosLandmarkDatabase& aDb,
+    TLmkSelectorType aType,
+    TLmkProviderType aShowType )
+    {
+    CLmkListProviderBase* provider = NULL;
+    switch ( aType )
+        {
+        case ELandmarkSelector:
+            {
+            provider = CLmkLandmarkListProvider::NewL( aDb );
+            break;
+            }
+        case ECategorySelector:
+            {
+            provider =
+                CLmkCategoryListProvider::NewL( aDb, aShowType );
+            break;
+            }
+        default:
+            {
+            User::Leave( KErrNotSupported );
+            }
+        }
+    return provider;
+    }
+
+// ---------------------------------------------------------
+// LmkListProviderFactory::CreateProviderL
+// ---------------------------------------------------------
+//
+EXPORT_C CLmkListProviderBase* LmkListProviderFactory::CreateProviderL(
+    CPosLandmarkDatabase& aDb,
+    CPosLmSearchCriteria& aCriteria )
+    {
+    CLmkListProviderBase* provider =
+        CLmkSearchedLmListProvider::NewL( aDb, aCriteria );
+    return provider;
+    }
+
+// ---------------------------------------------------------
+// LmkListProviderFactory::CreateProviderL
+// ---------------------------------------------------------
+//
+EXPORT_C CLmkListProviderBase* LmkListProviderFactory::CreateProviderL(
+    CLmkParser& aParser )
+    {
+    CLmkListProviderBase* provider =
+        CLmkParsedLmListProvider::NewL( aParser );
+    return provider;
+    }
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/engine/src/clmkdbsearchutils.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,231 @@
+/*
+* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:   This file contains search utilities to query the landmarks Db.
+*				 For example getting all landmarks under a category, Name of a
+*				 particular category etc.
+*
+*/
+
+
+
+
+
+
+
+// INCLUDE FILES
+#include <EPos_CPosLandmark.h>
+#include <EPos_CPosLandmarkDatabase.h>
+#include <EPos_CPosLandmarkSearch.h>
+#include <EPos_CPosLmCategoryCriteria.h>
+#include "mlmkdbsearchutilsobserver.h"
+#include "MLmkAOOperationObserver.h"
+#include "CLmkAOOperation.h"
+#include "clmkdbsearchutils.h"
+
+// ================= MEMBER FUNCTIONS =======================
+
+// -----------------------------------------------------------------------------
+// CLmkDbSearchUtils::CLmkDbSearchUtils
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+CLmkDbSearchUtils::CLmkDbSearchUtils():
+	CActive(EPriorityStandard)
+	{
+	CActiveScheduler::Add( this );
+	}
+
+// -----------------------------------------------------------------------------
+// CLmkDbSearchUtils::~CLmkDbSearchUtils
+// Destructor
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CLmkDbSearchUtils::~CLmkDbSearchUtils()
+	{
+	delete iSearch;
+	delete iDb;
+    if (iSearchAO)
+		{
+    	iSearchAO->StopOperation();
+    	}
+	delete iSearchAO;
+	delete iCriteria;
+	if ( IsActive() )
+    	{
+        Cancel();
+    	}
+    iLmItemId.Close();
+	}
+
+// -----------------------------------------------------------------------------
+// CLmkDbSearchUtils::NewL
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CLmkDbSearchUtils* CLmkDbSearchUtils::NewL()
+	{
+	CLmkDbSearchUtils* self = new (ELeave) CLmkDbSearchUtils();
+	CleanupStack::PushL(self);
+	self->ConstructL();
+	CleanupStack::Pop();// self
+	return self;
+	}
+
+// -----------------------------------------------------------------------------
+// CLmkDbSearchUtils::ConstructL
+// -----------------------------------------------------------------------------
+//
+void CLmkDbSearchUtils::ConstructL()
+	{
+	iDb = CPosLandmarkDatabase::OpenL();
+	iSearch = CPosLandmarkSearch::NewL( *iDb );
+	iCriteria = CPosLmCategoryCriteria::NewLC();
+	CleanupStack::Pop(  iCriteria );
+	iSearchAO = NULL;
+	}
+
+// -----------------------------------------------------------------------------
+// CLmkDbSearchUtils::GetLandmarksUnderCategoryL
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CLmkDbSearchUtils::GetLandmarksUnderCategoryL(MLmkDbSearchUtilsObserver* aObserver,
+				  									        TPosLmItemId aCategoryId)
+	{
+	iObserver = aObserver;
+	iCriteria->SetCategoryItemId(aCategoryId);
+	TPosLmSortPref sortOrder( CPosLandmark::ELandmarkName,
+				              TPosLmSortPref::EAscending );
+
+    CPosLmOperation* operation =
+				iSearch->StartLandmarkSearchL( *iCriteria , sortOrder );
+
+	CleanupStack::PushL( operation );
+	if (iSearchAO)
+		{
+    	iSearchAO->StopOperation();
+    	}
+	delete iSearchAO; // Cancel if any pending requests
+	iSearchAO = NULL;
+	iSearchAO = CLmkAOOperation::NewL( operation,
+				                   	   *this,
+				                  	   MLmkAOOperationObserver::ESearch,
+				                   	   EFalse );
+
+	CleanupStack::Pop( operation ); // ownership transferred
+	iSearchAO->StartOperation();
+	}
+
+// -----------------------------------------------------------------------------
+// CLmkDbSearchUtils::GetCategoryNameL
+// -----------------------------------------------------------------------------
+//
+EXPORT_C HBufC* CLmkDbSearchUtils::GetCategoryNameL(TPosLmItemId aCategoryId)
+	{
+	CPosLmCategoryManager* mgr = CPosLmCategoryManager::NewL( *iDb );
+	CleanupStack::PushL( mgr );
+	// Leaves with KErrNotFound if category doesn't exist
+	CPosLandmarkCategory* category = mgr->ReadCategoryLC( aCategoryId );
+	TPtrC categoryName;
+	User::LeaveIfError(category->GetCategoryName(categoryName));
+	// The caller will take ownership of the buffer
+	HBufC* retCategoryName = HBufC::NewL(categoryName.Length());
+	TPtr ptr =  retCategoryName->Des();
+	ptr.Copy(categoryName);
+	CleanupStack::PopAndDestroy( 2 ); // category and mgr
+	return retCategoryName;
+	}
+
+// -----------------------------------------------------------------------------
+// CLmkDbSearchUtils::GetLandmarkForIdL
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CPosLandmark* CLmkDbSearchUtils::GetLandmarkForIdL(TPosLmItemId aLandmarkId)
+	{
+	CPosLandmark* lmk = iDb->ReadLandmarkLC(aLandmarkId);
+	CleanupStack::Pop(); // ReadLandmarkLC
+	return lmk;
+	}
+
+// -----------------------------------------------------------------------------
+// CLmkDbSearchUtils::GetLandmarksL
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CLmkDbSearchUtils::GetLandmarksL(MLmkDbSearchUtilsObserver* aObserver,
+				  							   RArray<TPosLmItemId> aLmItemId,
+									  		   RPointerArray<CPosLandmark>* aArray)
+	{
+	iLmkArray = aArray;
+	iLmItemId = aLmItemId;
+	iSearchIndex = 0;
+	iObserver = aObserver;
+	SetActive();
+	TRequestStatus *status = &iStatus;
+	User::RequestComplete(status, KErrNone);
+	}
+
+// -----------------------------------------------------------------------------
+// CLmkDbSearchUtils::RunL
+// -----------------------------------------------------------------------------
+//
+void CLmkDbSearchUtils::RunL()
+	{
+	if(iSearchIndex >= iLmItemId.Count())
+		{
+		iLmItemId.Close();
+		iObserver->HandleLmkSearchNotifyL();
+		}
+	else
+		{
+		TPosLmItemId itemId = iLmItemId[iSearchIndex];
+		CPosLandmark* landmark = iDb->ReadLandmarkLC(itemId);
+		iLmkArray->Append(landmark);
+		CleanupStack::Pop(); // ReadLandmarkLC
+		++iSearchIndex;
+		SetActive();
+		TRequestStatus *status = &iStatus;
+		User::RequestComplete(status, KErrNone);
+		}
+	}
+
+// -----------------------------------------------------------------------------
+// CLmkDbSearchUtils::DoCancel
+// -----------------------------------------------------------------------------
+//
+void CLmkDbSearchUtils::DoCancel()
+	{
+
+	}
+
+// -----------------------------------------------------------------------------
+// CLmkDbSearchUtils::HandleOperationL
+// -----------------------------------------------------------------------------
+//
+void CLmkDbSearchUtils::HandleOperationL(TOperationTypes /*aType*/,
+									     TReal32 /*aProgress*/,
+							             TInt /*aStatus*/ )
+	{
+	CPosLmItemIterator* iterator = iSearch->MatchIteratorL();
+	CleanupStack::PushL( iterator );
+	RArray<TPosLmItemId> itemIdArray;
+	CleanupClosePushL( itemIdArray );
+	iterator->GetItemIdsL( itemIdArray, 0, iterator->NumOfItemsL() );
+	if ( iObserver )
+    	{
+	    iObserver->HandleCategorySearchNotifyL( itemIdArray );
+    	}
+    CleanupStack::PopAndDestroy(); //itemIdArray
+	CleanupStack::PopAndDestroy( iterator );
+	}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/group/bld.inf	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,52 @@
+/*
+* 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:    LandmarksUi Content File -    
+*	 This file provides the information required for building the
+*    	 whole of a Landmarks application.
+*
+*/
+
+
+
+
+
+
+#include <platform_paths.hrh>
+#include <data_caging_paths.hrh>
+
+PRJ_PLATFORMS
+DEFAULT
+//  Help exports
+#include "../help/group/bld.inf"
+
+PRJ_EXPORTS
+// Export Localization files
+../loc/landmarks.loc                     	APP_LAYER_LOC_EXPORT_PATH(landmarks.loc)  
+../loc/lmkmsgviewer.loc                  	APP_LAYER_LOC_EXPORT_PATH(lmkmsgviewer.loc)  
+
+// Export the IBY file
+../rom/LocationLandmarksUi.iby			CORE_APP_LAYER_IBY_EXPORT_PATH(LocationLandmarksUi.iby)
+../rom/LocationLandmarksUi_resources.iby	LANGUAGE_APP_LAYER_IBY_EXPORT_PATH(LocationLandmarksUi_resources.iby)
+../rom/LocationLandmarksUiStub.iby 		CORE_APP_LAYER_IBY_EXPORT_PATH(LocationLandmarksUiStub.iby)
+
+PRJ_MMPFILES
+
+// Include Bld.infs
+
+#include "../engine/group/bld.inf"
+#include "../uicontrols/group/bld.inf"
+#include "../commonui/group/bld.inf"
+#include "../app/group/bld.inf"
+#include "../msgviewer/group/bld.inf"
+//  End of File  
Binary file landmarksui/help/data/xhtml.zip has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/help/group/bld.inf	Wed Sep 01 12:31:27 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:
+* 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/lm.hlp.hrh	MW_LAYER_PLATFORM_EXPORT_PATH(csxhelp/lm.hlp.hrh)
+../inc/lmmes.hlp.hrh	MW_LAYER_PLATFORM_EXPORT_PATH(csxhelp/lmmes.hlp.hrh)
+
+../rom/landmarksuihelps_variant.iby		CUSTOMER_APP_LAYER_IBY_EXPORT_PATH(landmarksuihelps_variant.iby)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/help/inc/lm.hlp.hrh	Wed Sep 01 12:31:27 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:
+*
+*/
+	
+//
+// lm.hlp.hrh generated by CSXHelp Utilities.
+//           
+
+#ifndef __LM_HLP_HRH__
+#define __LM_HLP_HRH__
+
+_LIT(KLM_HLP_LM_BY_CATEGORY, "LM_HLP_LM_BY_CATEGORY"); // 
+_LIT(KLM_HLP_LM_BY_NAME, "LM_HLP_LM_BY_NAME"); // 
+_LIT(KLM_HLP_CATEGORY_CONTENTS, "LM_HLP_CATEGORY_CONTENTS"); // 
+_LIT(KLM_HLP_EDIT_CATEGORIES, "LM_HLP_EDIT_CATEGORIES"); // 
+_LIT(KLM_HLP_LM_EDITOR, "LM_HLP_LM_EDITOR"); // 
+_LIT(KLM_HLP_LM_VIEWER, "LM_HLP_LM_VIEWER"); // 
+
+#endif 
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/help/inc/lmmes.hlp.hrh	Wed Sep 01 12:31:27 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:
+*
+*/
+	
+//
+// lmmes.hlp.hrh generated by CSXHelp Utilities.
+//           
+
+#ifndef __LMMES_HLP_HRH__
+#define __LMMES_HLP_HRH__
+
+_LIT(KLM_HLP_RECEIVED_LM, "LM_HLP_RECEIVED_LM"); // 
+_LIT(KLM_HLP_RECEIVED_PACKAGE, "LM_HLP_RECEIVED_PACKAGE"); // 
+
+#endif 
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/help/rom/landmarksuihelps_variant.iby	Wed Sep 01 12:31:27 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: 
+*
+*/
+
+#ifndef __LANDMARKSUIHELPS_VARIANT_IBY__
+#define __LANDMARKSUIHELPS_VARIANT_IBY__
+
+#if defined(FF_S60_HELPS_IN_USE) && defined(__LANDMARKS)
+    data=LOCALISE(DATAZ_\resource\xhtml\%02d\0x101F85A2\contents.zip, RESOURCE_FILES_DIR\xhtml\%02d\0x101F85A2\contents.zip)
+    data=LOCALISE(DATAZ_\resource\xhtml\%02d\0x101F85A2\index.xml, RESOURCE_FILES_DIR\xhtml\%02d\0x101F85A2\index.xml)
+    data=LOCALISE(DATAZ_\resource\xhtml\%02d\0x101F85A2\keywords.xml, RESOURCE_FILES_DIR\xhtml\%02d\0x101F85A2\keywords.xml)
+    data=LOCALISE(DATAZ_\resource\xhtml\%02d\0x101F85A2\meta.xml, RESOURCE_FILES_DIR\xhtml\%02d\0x101F85A2\meta.xml)
+
+    data=LOCALISE(DATAZ_\resource\xhtml\%02d\0x101F85C1\contents.zip, RESOURCE_FILES_DIR\xhtml\%02d\0x101F85C1\contents.zip)
+    data=LOCALISE(DATAZ_\resource\xhtml\%02d\0x101F85C1\index.xml, RESOURCE_FILES_DIR\xhtml\%02d\0x101F85C1\index.xml)
+    data=LOCALISE(DATAZ_\resource\xhtml\%02d\0x101F85C1\keywords.xml, RESOURCE_FILES_DIR\xhtml\%02d\0x101F85C1\keywords.xml)
+    data=LOCALISE(DATAZ_\resource\xhtml\%02d\0x101F85C1\meta.xml, RESOURCE_FILES_DIR\xhtml\%02d\0x101F85C1\meta.xml)
+#endif
+
+#endif // __LANDMARKSUIHELPS_VARIANT_IBY__
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/inc/LmkConsts.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,111 @@
+/*
+* Copyright (c) 2002-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:    LandmarksUi Content File -
+*     Contains common constants
+*
+*/
+
+
+
+
+
+
+
+#ifndef LMKCONSTS_H
+#define LMKCONSTS_H
+
+#include <lmkui.mbg>
+#include <landmarks.mbg>
+#include <data_caging_path_literals.hrh>
+#include <landmarks.loc>
+
+
+// CONSTANTS
+_LIT( KLmkTmp_RESOURCE_FILES_DIR, "\\resource\\"); // KDC_RESOURCE_FILES_DIR
+// Following own literals are used because platform's literals are insufficient:
+_LIT( KLmkSystemMbmPath, "\\resource\\apps\\" ); // == KDC_APP_BITMAP_DIR
+_LIT(KLmkEncodedDataFileName, "EncodedLmData" );
+_LIT(KLmkEncodedDataFileExtension, ".lmx");
+_LIT( KLmkUiIconFileName, "LmkUi.mif" );
+_LIT( KLandmarksIconFileName, "Landmarks.mif" );
+_LIT( KLmkUiRscFileName, "LmkUi.rsc" );
+
+//used for url field to identify protocol present or not
+_LIT( KProtocol, ":" );
+//used as default protocol for url field.
+_LIT(KHttp, "http://");
+
+
+
+
+//default icon id
+const TUint KLmkDefaultId(EMbmLmkuiQgn_prop_lm_gene);
+const TUint KCategoryDefaultId(EMbmLmkuiQgn_prop_lm_gene);
+
+// Icon ID defines for generic IconIndex and IconMaskIndex
+
+const TUint KLmkGenericIconIndex( EMbmLmkuiQgn_prop_lm_gene );
+const TUint KLmkGenericIconMaskIndex ( 	EMbmLmkuiQgn_prop_lm_gene_mask );
+
+// default granularity for array containing marked item indexes:
+const TInt KLmkMultiSelectionGranularity( 10 );
+
+// default granularity of landmark or category array:
+const TInt KLmItemArrayGranularity( 100 );
+
+//Zero tab
+const TInt KZeroResourceId( 0 );
+
+const TUid KLmkEventListenerSingletonUid = { 0x1 };
+
+//location request timeout
+const TInt KLmkLRTimeOut( 30000000 ); //30s
+
+//distance converters
+const TInt  KKilometerToMeter( 1000 );
+const TReal KMileToMeter( 1609.344 );
+const TReal KFeetToMeter( 0.3048 );
+const TReal KMetreToFoot( 3.280839895013123 );
+const TInt  KMileToFeet( 5280 );
+
+// Max and Min Limits Number Editor values
+
+const TInt KMaxLatitude = 90;
+const TInt KMinLatitude = -90;
+const TInt KMaxLongitude = 180;
+const TInt KMinLongitude = -180;
+
+const TInt KMaxAltitude = 20000; // Max altitude 20000m
+const TInt KMinAltitude = -500;  // Min altitude -500m
+
+const TInt KMaxAccuracy = 20000;
+const TInt KMinAccuracy = 0;
+
+//Added for Package Name
+const TInt KLmkPackageNameMaxLen(127);
+
+// Invalid List Index
+const TInt KLmkInValidIndex (-1);
+
+const TInt KMaxCategoryNameFieldLen( 150 );
+
+const TInt KMaxDescriptionFieldLen (250);
+const TInt KMaxPhoneNumberFieldLen (48);
+const TInt KMaxUrlFieldLen (150);
+const TInt KMaxBufferLen (255);
+const TInt KMaxUrlFieldLenWithDefaultProtocol(143);
+const TInt KMskCommandPos (3);
+#endif // LMKCONSTS_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/inc/LmkDebugConfig.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,26 @@
+/*
+* 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:    LandmarksUi Content File -    Determines whether debug logging is on or off.
+*
+*/
+
+
+
+
+
+
+
+// turn this flag on/off as needed:
+#define __LMK_DEBUG_FLAG
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/inc/LmkUID.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,55 @@
+/*
+* 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:    LandmarksUi Content File -    Common header for UIDs of Landmarks UI.
+*
+*/
+
+
+
+
+
+
+
+#ifndef LMKUID_H
+#define LMKUID_H
+
+//  MACROS
+
+/// Landmarks application UID3
+#define KLmkAppUID3 0x101F85A2
+
+/// Landmarks application engine UID3
+#define KLmkEngUID3 0x101F85A3
+
+/// Landmarks application UI controls UID3
+#define KLmkUiControlsUID3 0x101F85A4
+
+/// Landmarks common UI components UID3
+#define KLmkCommonUiUID3	0x101F85A5
+
+/// Landmark Message Viewer UID3
+//#define KLmkMsgViewerAppUID3    0x101f4d90//0x101F85C1
+
+#define KLmkMsgViewerAppUID3 0x101F85C1
+
+
+
+//
+// Common system UIDs
+//
+#define KAppUID2 0x100039CE
+
+#endif // LMKUID_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/inc/landmarks.hrh	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,236 @@
+/*
+ * Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:    LandmarksUi Content File -      
+ *
+ */
+
+#ifndef LANDMARKS_HRH
+#define LANDMARKS_HRH
+
+// DATA TYPES
+
+enum TLmkItemType
+    {
+    ELmkItemTypeLandmark, ELmkItemTypeCategory
+    };
+
+enum TLmkAppViewId
+    {
+    ELmkByLmView,
+    ELmkByCategoryView,
+    ELmkSettingsView,
+    ELmkCategorySettingsView,
+    ELmkCategoryContentsView
+    };
+
+enum TLmkSelectorType
+    {
+    ELandmarkSelector,
+    ECategorySelector,
+    ELmByCriteriaSelector,
+    ESearchSelector
+    };
+
+enum TLmkSelectorTabId
+    {
+    ETabLandmarkList, ETabCategoryList
+    };
+
+enum TLmkAppCmdId
+    {
+    ELmkCmdEditLm = 0x6100,             // opens for editing
+    ELmkCmdOpenLm,                      // opens for viewing
+    ELmkCmdNewLm,
+    ELmkCmdNewLmCurrentLocation,
+    ELmkCmdNewLmEmpty,
+    ELmkCmdDeleteLm,
+    ELmkCmdSaveLm,
+    ELmkCmdSaveSelectedLms,
+    ELmkCmdSaveAllLms,
+    ELmkCmdSendSelectedLms,
+    ELmkCmdSendAllLms,
+    ELmkCmdAddToCat,
+    ELmkCmdChangeIcon,
+    ELmkCmdEditCats,
+    ELmkCmdOpenCat,
+    ELmkCmdChangeSetting,
+    ELmkCmdNewCategory,
+    ELmkCmdRenameCat,
+    ELmkCmdDeleteCat,
+    ELmkCmdSelectCategories,
+    ELmkCmdCategories,
+    ELmkCmdCurrentLocation,
+    ELmkCmdFindBoxSearchAfresh,
+    ELmkCmdFindBoxSearchInPreviousResults,
+    ELmkCmdSendDummy,                   // This dummy is required by SendUi
+    ELmkCmdSend,                        // This the "Send as..." command and acts as a base for which 
+    ELmkCmdSendVia1,                    // the selected MTMs are indexed against in SendUi.
+    ELmkCmdSendVia2,                    // "dummy" MTMs, SendUi maps these to actual MTMs.
+    ELmkCmdSendVia3,
+    ELmkCmdSendVia4,
+    ELmkCmdSendVia5,
+    ELmkCmdSendVia6,
+    ELmkCmdSendVia7,
+    ELmkCmdSendVia8,
+    ELmkCmdSendVia9,
+    ELmkCmdSendVia10,
+    ELmkCmdCall,
+    ELmkCmdGoToUrl,
+    ERemoveFromCat,
+    ELmkCmdLaunchPositionSettings,
+    ELmkCmdClearPosInfo,
+    ELmkCmdStopOperation,
+    ELmkShowOnMap,
+    ELmkNavigateTo,
+    ELmkShowOnMapPlaceHolder,
+    ELmkNavigateToPlaceHolder,
+    ELmkFromMapPlaceholder,
+    ELmkCmdEditTextLm,                  // another 100 can be added after this
+    ELmkCmdLast = 0x618D,               // Starting Command for AIW call API's, ends 0x70FFF
+    ELmkCmdMnNav = 0x71000,             // Command for AIW Map and Navigation. Enums after this should
+    ELmkCmdShow = 0x71000 + 50          // start after ELmkCmdMnNav + 50     	
+    };
+
+enum TLmkEditorItemType
+    {
+    EName = 0,
+    ECategory,
+    ECategories,
+    EDescription,
+    EStreet,
+    EPostCode,
+    ECity,
+    EStateProvince,
+    ECountry,
+    EPhoneNumber,
+    EWebAddress,
+    ELatitude,
+    ELongitude,
+    EPositionAccuracy,
+    EAltitude,
+    EAltitudeAccuracy,
+    /*
+     EDescription,
+     EPhoneNumber,
+     EWebAddress,
+     */
+    EAllEditorItems
+    };
+
+enum TLmkEditorItemTypeForJapaneseMode
+    {
+    ENameJapaneseMode = 0,
+    ECategoryJapaneseMode,
+    ECategoriesJapaneseMode,
+    EDescriptionJapaneseMode,
+    EPostCodeJapaneseMode,
+    EStateProvinceJapaneseMode,
+    ECityJapaneseMode,
+    EStreetJapaneseMode,
+    ECountryJapaneseMode,
+    EPhoneNumberJapaneseMode,
+    EWebAddressJapaneseMode,
+    ELatitudeJapaneseMode,
+    ELongitudeJapaneseMode,
+    EPositionAccuracyJapaneseMode,
+    EAltitudeJapaneseMode,
+    EAltitudeAccuracyJapaneseMode,
+    EAllEditorItemsJapaneseMode
+    };
+    
+enum TLmkFieldEditor
+    {
+    //ETextFieldEditor,
+    ETextGenericFieldEditor,
+    ENumberFieldEditor,
+    EListFieldEditor,
+    ECoordinateFieldEditor,
+    // Added for rel3.1
+    ETextPhoneNumberFieldEditor,
+    ETextUriFieldEditor
+    };
+
+//editor's control type
+enum TEditorTypes
+    {
+    EDistanceEditorType = 10000, ECoordinateEditorType
+    };
+
+enum TIconArrayIndex
+    {
+    EIndexTransport = 0,
+    EIndexSport = 1,
+    EIndexSightSeeing = 2,
+    EIndexShopping = 3,
+    EIndexReligious = 4,
+    EIndexPublic = 5,
+    EIndexPeople = 6,
+    EIndexOutdoor = 7,
+    EIndexIndexGeographical = 8,
+    EIndexFood = 9,
+    EIndexEntertainment = 10,
+    EIndexEducational = 11,
+    EIndexCommunication = 12,
+    EIndexBusiness = 13,
+    EIndexAccommodation = 14
+    };
+
+enum TPreDefinedCategoryId
+    {
+    ETransport = 45000,
+    ESport = 42000,
+    ESightSeeing = 39000,
+    EShopping = 36000,
+    EReligious = 33000,
+    EPublic = 30000,
+    EPeople = 27000,
+    EOutdoor = 24000,
+    EGeographical = 21000,
+    EFood = 18000,
+    EEntertainment = 15000,
+    EEducational = 12000,
+    ECommunication = 9000,
+    EBusiness = 6000,
+    Accommodation = 3000
+    };
+
+// For using AIW menu services 	
+enum TLmkAppAiwCmdId
+    {
+    ELmkAppMenuAiwId = 100,
+    ELmkAppSubMenuAiwId,
+    ELmkEditMenuAiwId,
+    ELmkEditSubMenuAiwId
+    };
+
+// For search steps
+enum TLmkSearchStep
+    {
+    ELmkStepOne = 8, ELmkStepTwo = 40
+    };
+    
+enum TLmkValue
+    {
+    ELmkMinusOneValue = -1,
+    ELmkZeroValue = 0,
+    ELmkOneValue = 1,
+    ELmkTwoValue = 2
+    };
+
+#define ELmkCtIconMap 0x2001
+#define ELmkIconMapContentId 5
+
+#endif	// LANDMARKS_HRH
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/install/landmarksstub.pkg	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,64 @@
+;
+; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of "Eclipse Public License v1.0"
+; which accompanies this distribution, and is available
+; at the URL "http://www.eclipse.org/legal/epl-v10.html".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description:    LandmarkUi Content File     
+;
+; Installation file for Landmarks Application, UI and Engine
+;
+
+;Languages
+&EN
+;
+; UID is the app's UID
+;
+#{"Landmarks"},(0x101F85A2),1,0,0,TYPE=SA
+;
+; Localised Vendor name
+%{"Nokia"}
+
+; Unique Vendor name
+:"Nokia"
+
+;Supports Series 60 v 9.x
+;This line indicates that this installation is for the Series 60 platform v9.1
+;This line must appear _exactly_ as shown below in the sis file
+;If this line is missing or incorrect, the sis file will not be able
+;to be installed on Series 60 v3.0 platforms
+;(0x101F7961), 0, 0, 0, {"Series60ProductID"}
+;
+;
+
+; Landmarks Engine
+""-"z:\sys\bin\lmkeng.dll"
+
+; Landmarks UI 
+""-"z:\sys\bin\lmkui.dll"
+""-"z:\resource\lmkui.rsc"
+""-"z:\resource\apps\lmkui.mif"
+
+; Landmarks CommonUI
+""-"z:\sys\bin\lmkcommonui.dll"
+""-"z:\sys\bin\lmkcommonuistub.dll"	
+
+; Landmarks Application
+""-"z:\sys\bin\landmarks.exe"
+""-"z:\resource\apps\Landmarks.rsc"
+""-"z:\resource\apps\Landmarks.mif"
+""-"z:\resource\apps\Landmarks_aif.mif"
+""-"z:\private\10003a3f\import\apps\Landmarks_reg.rsc"
+
+; Landmarks LmkMsgViewer
+""-"z:\sys\bin\lmkmsgviewer.exe"	
+""-"z:\resource\apps\LmkMsgViewer.rsc"	
+""-"z:\resource\apps\lmkmsgviewer_aif.mif"	
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/install/landmarksupgrade.pkg	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,62 @@
+;
+; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of "Eclipse Public License v1.0"
+; which accompanies this distribution, and is available
+; at the URL "http://www.eclipse.org/legal/epl-v10.html".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description:    LandmarkUi Content File     
+;
+&EN
+;
+; UID is the app's UID
+;
+#{"Landmarks"},(0x101F85A2),1,1,0,TYPE=SA,RU
+;
+; Localised Vendor name
+%{"Nokia"}
+
+; Unique Vendor name
+:"Nokia"
+
+;Supports Series 60 v 9.x
+;This line indicates that this installation is for the Series 60 platform v9.1
+;This line must appear _exactly_ as shown below in the sis file
+;If this line is missing or incorrect, the sis file will not be able
+;to be installed on Series 60 v3.0 platforms
+[0x101F7961], 0, 0, 0, {"Series60ProductID"}
+;
+;
+
+; Landmarks Engine
+"\epoc32\release\armv5\urel\lmkeng.dll"                    	- "!:\sys\bin\lmkeng.dll"
+
+; Landmarks UI 
+"\epoc32\release\armv5\urel\lmkui.dll"                  	- "!:\sys\bin\lmkui.dll"
+"\epoc32\data\z\resource\lmkui.rsc"                  		- "!:\resource\lmkui.rsc"
+"\epoc32\data\z\resource\apps\lmkui.mif"                  	- "!:\resource\apps\lmkui.mif"
+
+; Landmarks CommonUI
+"\epoc32\release\armv5\urel\lmkcommonui.dll"			- "!:\sys\bin\lmkcommonui.dll"
+"\epoc32\release\armv5\urel\lmkcommonuistub.dll"		- "!:\sys\bin\lmkcommonuistub.dll"	
+
+; Landmarks Application
+"\epoc32\release\armv5\urel\landmarks.exe"                  	- "!:\sys\bin\landmarks.exe"
+"\epoc32\data\z\resource\apps\Landmarks.rsc"                	- "!:\resource\apps\Landmarks.rsc"
+"\epoc32\data\z\resource\apps\Landmarks.mif"         	    	- "!:\resource\apps\Landmarks.mif"
+"\epoc32\data\z\resource\apps\Landmarks_aif.mif"           	- "!:\resource\apps\Landmarks_aif.mif"
+"\epoc32\data\Z\private\10003a3f\apps\Landmarks_reg.rsc"    	- "!:\private\10003a3f\import\apps\Landmarks_reg.rsc"
+
+; Landmarks LmkMsgViewer
+"\epoc32\release\armv5\urel\lmkmsgviewer.exe"			- "!:\sys\bin\lmkmsgviewer.exe"	
+"\epoc32\data\z\resource\apps\LmkMsgViewer.rsc"			- "!:\resource\apps\LmkMsgViewer.rsc"	
+"\epoc32\data\z\resource\apps\lmkmsgviewer_aif.mif"		- "!:\resource\apps\lmkmsgviewer_aif.mif"	
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/loc/landmarks.loc	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,540 @@
+/*
+* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:      
+*     This is a localisation file for Landmarks UI subsystem.
+*     A .loc file is the one and only place where the logical strings
+*     to be localised are defined. 
+*  -------------------------------------------------------------------
+*
+*/
+
+
+
+
+
+
+
+/**
+ *  Default (implementation English) Resource localisation file.
+ */
+
+//  LOCALISATION STRINGS  
+
+//d:Landmarks Application name
+//d:in the App Shell grid
+//l:cell_app_pane_t1
+//r:3.0
+//
+#define qtn_apps_lm_grid "Landmarks"
+
+//d:Landmarks Application name
+//d:in the App Shell list
+//l:list_single_large_graphic_pane_t1
+//r:3.0
+//
+#define qtn_apps_lm_list "Landmarks" 
+//d:Empty list text in category selector Common UI Component.
+//d:Shown when component user is requesting used categories but none exist.
+//l:main_list_empty_pane
+//r:3.0
+//
+#define qtn_lm_lmsel_no_categorised_landmarks		"(Categorise your landmarks with the Landmarks application)"
+
+//d:Empty list text in landmark selector Common UI Component.
+//d:Shown when there are no landmarks at all in the database.
+//l:main_list_empty_pane
+//r:3.0
+//
+#define qtn_lm_lmsel_no_landmarks		"(Create landmarks with the Landmarks application)"
+
+//d:Options menu item for opening multiple category selector in landmark editor.
+//l:list_single_pane_t1_cp2
+//r:3.0
+//
+#define qtn_lm_opt_select_categories		"Select categories"
+
+
+//d:Information note shown if landmark name has not been entered when user is
+//d:trying to close landmark editor.
+//l:popup_note_window
+//r:3.0
+//
+#define qtn_lm_note_enter_lm_name			"Enter a name for this landmark"
+
+//d:Landmark editor form field heading for altitude accuracy.
+//l:list_double_graphic_pane_t1/opt2
+//r:3.0
+//
+#define qtn_lm_form_label_vert_accuracy		"Altitude accuracy"
+
+//d:Landmark editor form field heading for altitude.
+//l:list_double_graphic_pane_t1/opt2
+//r:3.0
+//
+#define qtn_lm_form_label_altitude		"Altitude"
+
+//d:Landmark editor form field heading for position accuracy.
+//l:list_double_graphic_pane_t1/opt2
+//r:3.0
+//
+#define qtn_lm_form_label_horiz_accuracy		"Position accuracy"
+
+//d:Landmark editor form field heading for longitude.
+//l:list_double_graphic_pane_t1/opt2
+//r:3.0
+//
+#define qtn_lm_form_label_longitude		"Longitude"
+
+//d:Landmark editor form field heading for latitude.
+//l:list_double_graphic_pane_t1/opt2
+//r:3.0
+//
+#define qtn_lm_form_label_latitude		"Latitude"
+
+//d:Landmark editor form field heading for country/region.
+//l:list_double_graphic_pane_t1/opt2
+//r:3.0
+//
+#define qtn_lm_form_label_country		"Country/Region"
+
+//d:Landmark editor form field heading for state/province.
+//l:list_double_graphic_pane_t1/opt2
+//r:3.0
+//
+#define qtn_lm_form_label_state		"State/Province"
+
+//d:Landmark editor form field heading for city.
+//l:list_double_graphic_pane_t1/opt2
+//r:3.0
+//
+#define qtn_lm_form_label_city		"City"
+
+//d:Landmark editor form field heading for postal/zip.
+//l:list_double_graphic_pane_t1/opt2
+//r:3.0
+//
+#define qtn_lm_form_label_postal_code		"Postal/ZIP"
+
+//d:Landmark editor form field heading for street.
+//l:list_double_graphic_pane_t1/opt2
+//r:3.0
+//
+#define qtn_lm_form_label_street		"Street"
+
+//d:Landmark editor form field heading for category.
+//d:This heading is used when there are more than 1 categories selected.
+//l:list_double_graphic_pane_t1/opt2
+//r:3.0
+//
+#define qtn_lm_form_label_categories		"Categories"
+
+//d:Landmark editor form field heading for category.
+//d:This heading is used when there are 0 or 1 categories selected.
+//l:list_double_graphic_pane_t1/opt2
+//r:3.0
+//
+#define qtn_lm_form_label_category		"Category"
+
+//d:Landmark editor form field heading for name.
+//l:list_double_graphic_pane_t1/opt2
+//r:3.0
+//
+#define qtn_lm_form_label_lm_name		"Name"
+
+//d:Confirmation query text when user is about to delete many categories.
+//l:popup_note_window
+//r:3.0
+//
+#define qtn_lm_conf_delete_categories		"Delete %N categories?"
+
+//d:Confirmation query text when user is about to delete one category.
+//l:popup_note_window
+//r:3.0
+//
+#define qtn_lm_conf_delete_category		"Delete category?"
+
+//d:Information note shown when non-unique category name has been entered.
+//l:popup_note_window
+//r:3.0
+//
+#define qtn_lm_note_category_name_already_exists		"This category name already exists."
+
+//d:Data query prompt text when creating or renaming a category.
+//l:popup_query_data_window
+//r:3.0
+//
+#define qtn_lm_prompt_category_name		"Category name:"
+
+//d:Heading text for icon selector pop-up grid.
+//l:heading_pane_t1
+//r:3.0
+//
+#define qtn_lm_heading_select_icon		"Select icon:"
+
+//d:Confirmation query text when location request has failed.
+//l:popup_note_window
+//r:3.0
+//
+#define qtn_lm_conf_retry_location_request		"Location request failed. Retry?"
+
+//d:Wait note text when waiting response for a location request.
+//l:popup_note_wait_window
+//r:3.0
+//
+#define qtn_lm_wait_requesting_location		"Requesting current location"
+
+//d:Confirmation query text when user is about to delete many landmarks.
+//l:popup_note_window
+//r:3.0
+//
+#define qtn_lm_conf_delete_landmarks		"Delete %N landmarks?"
+
+//d:Confirmation query text when user is about to delete one landmark
+//l:popup_note_window
+//r:3.0
+//
+#define qtn_lm_conf_delete_landmark		"Delete landmark?"
+
+//d:Options menu item for deleting selected category(s).
+//l:list_single_pane_t1_cp2
+//r:3.0
+//
+#define qtn_lm_opt_delete_category		"Delete"
+
+//d:Options menu item for renaming selected category.
+//l:list_single_pane_t1_cp2
+//r:3.0
+//
+#define qtn_lm_opt_rename_category		"Rename"
+
+//d:Options menu item for changing icon of selected category(s).
+//l:list_single_pane_t1_cp2
+//r:3.0
+//
+#define qtn_lm_opt_change_category_icon		"Change icon"
+
+//d:Options menu item for creating new category.
+//l:list_single_pane_t1_cp2
+//r:3.0
+//
+#define qtn_lm_opt_new_category		"New category"
+
+//d:Informational text indicating that listed category is empty.
+//l:list_double_graphic_pane_t2
+//r:3.0
+//
+#define qtn_lm_list_category_empty		"Empty"
+
+//d:Application title pane in "Edit Categories" view.
+//l:title_pane_t2/opt9
+//r:3.0
+//
+#define qtn_lm_title_edit_categories		"Categories"
+
+//d:Options menu item for opening category contents view for selected category.
+//l:list_single_pane_t1_cp2
+//r:3.0
+//
+#define qtn_lm_opt_open_category		"Open"
+
+//d:List item which acts as a container for uncategorised landmarks.
+//d:Used in lists where other list items are categories containing landmarks.
+//l:list_single_graphic_pane_t1
+//r:3.0
+//
+#define qtn_lm_list_uncategorised		"(uncategorised)"
+
+//d:Application title pane in "Landmarks by category" view.
+//l:title_pane_t2/opt9
+//r:3.0
+//
+#define qtn_lm_title_categories		"Categories"
+
+//d:Options submenu item for creating new landmark with empty location data.
+//l:list_single_popup_submenu_pane_t1
+//r:3.0
+//
+#define qtn_lm_opt_new_landmark_empty		"Empty"
+
+//d:Options submenu item for creating new landmark based on current location.
+//l:list_single_popup_submenu_pane_t1
+//r:3.0
+//
+#define qtn_lm_opt_new_landmark_current_location		"Current location"
+
+//d:Options menu item for launching icon selector to change landmark icon.
+//l:list_single_pane_t1_cp2
+//r:3.0
+//
+#define qtn_lm_opt_change_landmark_icon		"Change icon"
+
+//d:Options menu item for opening "Edit categories" view for managing categories.
+//l:list_single_pane_t1_cp2
+//r:3.0
+//
+#define qtn_lm_opt_edit_categories		"Edit categories"
+
+//d:Options menu item for assigning category(s) to selected landmark(s).
+//l:list_single_pane_t1_cp2
+//r:3.0
+//
+#define qtn_lm_opt_add_to_category		"Add to category"
+
+//d:Options menu item for deleting selected landmarks(s).
+//l:list_single_pane_t1_cp2
+//r:3.0
+//
+#define qtn_lm_opt_delete_landmark		"Delete"
+
+//d:Options menu item for opening "New landmark" submenu.
+//l:list_single_pane_t1_cp2/opt3
+//r:3.0
+//
+#define qtn_lm_opt_new_landmark		"New landmark"
+
+//d:Options menu item for opening selected landmar in editor.
+//l:list_single_pane_t1_cp2
+//r:3.0
+//
+#define qtn_lm_opt_edit_landmark		"Edit"
+
+//d:Empty list text in "Landmarks by name" and "Landmarks by category" views.
+//l:main_list_empty_pane
+//r:3.0
+//
+#define qtn_lm_empty_create_landmark		"(Select Options to create landmarks)"
+
+//d:Application title pane in "Landmarks by name" view.
+//l:title_pane_t2/opt9
+//r:3.0
+//
+#define qtn_lm_title_landmarks		"Landmarks"
+
+//d:Options menu item for fetching current location information
+//l:list_single_pane_t1_cp2
+//r:3.0
+//
+#define qtn_lm_editor_use_current		"Use current location"
+
+//d:Options menu item for removing category from selected landmark(s).
+//l:list_single_pane_t1_cp2
+//r:3.1
+//
+#define qtn_lm_opt_remove_from_category  "Remove from this category"
+
+//d:Landmark editor form field heading for Description.
+//l:list_double_graphic_pane_t1/opt2
+//r:3.1
+//
+#define qtn_lm_form_label_description  "Description"
+
+//d:Landmark editor form field heading for Web address.
+//l:list_double_graphic_pane_t1/opt2
+//r:3.1
+//
+#define qtn_lm_form_label_url  "Web address" 
+
+//d:Landmark editor form field heading for Phone number.
+//l:list_double_graphic_pane_t1/opt2
+//r:3.1
+//
+#define qtn_lm_form_label_phone  "Phone number"
+
+//d:Empty list text in edit category view.
+//d:Shown when there are no landmark categories at all in the database.
+//l:main_list_empty_pane
+//r:3.1
+//
+#define qtn_lm_no_categories_available  "(No landmarks categories available)"
+
+//d:Confirmation query text when the user requests current location.
+//l:popup_note_window
+//r:3.1
+//
+#define qtn_lm_query_editor_replace  "Landmark’s coordinate data will be replaced. Proceed?" 
+
+//d:Displayed as the last row text of a info Note.
+//l:popup_preview_text_window_t1
+//r:3.1
+//
+#define qtn_lm_editor_many_categories  "..."
+
+//d:Sub Menu item for enabling of landmark's position data updte from map.
+//l:list_single_popup_submenu_pane_t1
+//r:3.1
+//
+#define qtn_lm_opt_new_lm_from_map "From map"
+
+//d:Menu item for enabling user to launch web browser
+//l:list_single_pane_t1_cp2
+//r:3.1
+//
+#define qtn_lm_opt_go_to_url "Go to URL address"
+
+//d:Note text when calling to an entry with no phone numbers and name
+//l:popup_note_window
+//r:3.1
+//
+#define qtn_lm_note_no_number  "No phone number for %U"
+
+//d:Menu item for enabling user to launch web browser
+//l:list_single_pane_t1_cp2
+//r:3.1
+//
+#define qtn_lm_opt_open_browser "Open" 
+
+//d:Error note when empty landmark is shown on map
+//l:popup_note_window
+//r:3.1
+//
+#define qtn_lm_show_error_no_data			"%U does not have valid coordinates or address"
+
+//d:Error note when empty landmark is shown on map
+//l:popup_note_window
+//r:3.1
+//
+#define qtn_lm_show_error_no_coordinates		"Landmarks do not have valid coordinates and cannot be shown on map"
+
+//d:Error note when empty landmark is tried to be shown on map
+//l:popup_note_window
+//r:3.1
+//
+#define qtn_lm_show_query_no_coordinates_single	"%U does not have valid coordinates and is not shown. Continue anyway?"
+
+//d:Error note when some empty landmarks are tried to shown on map
+//l:popup_note_window
+//r:3.1
+//
+#define qtn_lm_show_query_no_coordinates_several	"%N landmarks do not have valid coordinates and are not shown. Continue anyway?"
+
+//d:Error note when all landmarks are empty in a category
+//l:popup_note_window
+//r:3.1
+//
+#define qtn_lm_show_error_category_no_coordinates	"Category %U does not have any landmarks with valid coordinates"
+
+//d:Error note when a landmark is empty in a category
+//l:popup_note_window
+//r:3.1
+//
+#define qtn_lm_show_query_category_no_coordinates_single	"%0U in category %1U does not have valid coordinates and is not shown. Continue anyway?"
+
+//d:Error note when some landmarks are empty in a category
+//l:popup_note_window
+//r:3.1
+//
+#define qtn_lm_show_query_category_no_coordinates_several	"%0N landmarks in category %1U do not have valid coordinates and are not shown. Continue anyway?"
+
+//d:Text in the title pane when map is shown to select landmark
+//l:title_pane_t2/opt9
+//r:3.1
+//
+#define qtn_lm_select_from_map		"Select location for landmark"
+
+
+//d:Options menu item for getting the list of positioning method(s).
+//l:list_single_pane_t1_cp2
+//r:3.2
+//
+#define qtn_lm_options_pos_settings 		"Positioning settings"
+
+//d:Empty list primary text in "Landmarks by name" and "Landmarks by category" views.
+//l:main_pane_empty_t1/opt2
+//r:3.2
+//
+#define qtn_lm_empty_no_landmarks		"(no landmarks)"
+
+//d:Empty list secondary text in "Landmarks by name" and "Landmarks by category" views.
+//l:main_list_empty_pane/opt2
+//r:3.2
+//
+#define qtn_lm_guide_new_landmark		"Select New landmark from options menu"
+
+//d:Empty list primary text in "Landmarks Category View" 
+//l:main_pane_empty_t1/opt2
+//r:3.2
+//
+#define qtn_lm_empty_no_categories		"(no categories)"
+
+//d:Empty list secondary text in "Landmarks Category View"
+//l:main_list_empty_pane/opt2
+//r:3.2
+//
+#define qtn_lm_guide_new_category		"Select New category from options menu"
+
+//d:Empty list secondary text in "Single landmark by name "and "Multiple landmarks selector by name"  and Single landmark by category" and "Multiple landmarks selector by category" views
+//l:main_list_empty_pane/opt2
+//r:3.2
+//
+#define qtn_lm_guide_create_landmarks		"Create landmarks with Landmarks application"
+
+//d:Empty list secondary text in "Single Category Selector" and "Mulitiple Category Selector" Views
+//l:main_list_empty_pane/opt2
+//r:3.2
+//
+#define qtn_lm_guide_categorize_landmarks		"Categorize your landmarks with Landmarks application"
+
+//d:Error note when landmark is saved with only Latitude or Longitude information
+//l: popup_note_window
+//r:3.2
+#define qtn_lm_error_check_coordinates  		"For correct coordinates both latitude and longitude need to be defined"
+
+//d:Error note when landmark is saved with position accuracy but no co-ordinates
+//l: popup_note_window
+//r:3.2
+//
+#define qtn_lm_error_pos_acc_check  		"Position accuracy can not be defined without coordinates"
+
+//d:Error note when landmark is saved with position accuracy but no co-ordinates
+//l: popup_note_window
+//r:3.2
+//
+#define qtn_lm_error_alt_acc_check  		"Altitude accuracy can not be defined without altitude"
+
+//d:Error note when landmark is saved with altitude but no co-ordinates
+//l: popup_note_window
+//r:3.2
+//
+#define qtn_lm_error_altitude_check  		"Altitude can not be defined without coordinates"
+
+//d:Error note when landmark is saved with illegal characters in the web address field
+//l: popup_note_window
+//r:3.2
+//
+#define qtn_lm_error_url_illegal	 		"Illegal characters in web address"
+
+//d:Options menu item for clearing the position info.
+//l:list_single_pane_t1_cp2
+//r:3.2
+//
+#define qtn_lm_opt_clear_pos_info		"Clear position info"
+
+//d:Link text at the bottom of the message query 
+//l:popup_info_list_pane_t1
+//r:3.2
+//
+#define qtn_lm_request_fail_more_info		"More info"
+
+//d:Location request
+//l:heading_pane_t1
+//r:3.2
+//
+#define qtn_lm_location_request		"Location request"
+//d:Heading pane text for, request failed message query
+//l:popup_info_list_pane_t1
+//r:3.2
+//
+#define qtn_lm_request_fail_info_text		"Depending on positioning methods used and other environmental variables location request can fail or be time-consuming."
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/loc/lmkmsgviewer.loc	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,138 @@
+/*
+* 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 contains the localisation string defines
+*
+*/
+
+
+
+
+
+
+
+//d:Heading pane for enter
+//d:waypoint name pop-up window
+//l:heading_pane_t1
+//r:3.0
+//
+#define qtn_lm_query_package_name    "Package name:"
+
+
+//d:Default Lmk package name for
+//d:package name query
+//l:query_popup_data_pane_t1/opt4
+//r:3.0
+//
+#define qtn_lm_default_package_name  "Landmarks"
+
+//d:Forward landmark package containing one or more landmarks
+//l:list_single_pane_t1_cp2
+//r:3.0
+//
+#define qtn_lm_opt_send_package                "Send package"
+
+//d:Editor category item
+//l:setting_code_pane_t1
+//r:3.0
+//
+#define qtn_lm_multiple_categories      "%N categories"
+
+//d:Added for Landmarks Pkgviewer options menu
+//l:list_single_pane_t1_cp2/opt3
+//r:3.0
+//
+#define qtn_lm_opt_save                 "Save"
+
+//d:Sub menu item in Pkgviewer options menu
+//l:list_single_popup_submenu_pane_t1
+//r:3.0
+//
+#define qtn_lm_opt_save_selected        "Selected"
+
+//d:Sub menu item in Pkgviewer options menu
+//l:list_single_popup_submenu_pane_t1
+//r:3.0
+//
+#define qtn_lm_opt_save_all              "All"
+//d:Sub menu item in Pkgviewer options menu
+//l:list_single_pane_t1_cp2
+//r:3.1
+//
+#define qtn_options_send_via            "Send"
+
+//d:Sub menu item in Pkgviewer options menu
+//l:list_single_popup_submenu_pane_t1
+//r:3.1
+//
+#define qtn_lm_opt_send_selected        "Selected"
+
+//d:Sub menu item in Pkgviewer options menu
+//l:list_single_popup_submenu_pane_t1
+//r:3.1
+//
+#define qtn_lm_opt_send_all              "All"
+
+//d:Used when user receives 1 new category
+//l:popup_note_window
+//r:3.0
+//
+#define qtn_lm_query_create_new_category "New category %U available. Create category?"
+
+//d:Used when user receives more than 1 new categories
+//l:popup_note_window
+//r:3.0
+//
+#define qtn_lm_query_create_new_categories "%N new categories available. Create categories?"
+
+//d:Editor category item to be shown as message query prompt
+//l:setting_code_pane_t1
+//r:3.0
+//
+#define qtn_lm_categories_query_prompt      "%N categories:"
+//d:displayed when user saves one landmark
+//l:popup_note_window
+//r:3.0
+//
+#define qtn_lm_note_landmark_saved "%U saved"
+
+//d:displayed when user saves one landmark
+//l:popup_note_window
+//r:3.0
+//
+#define qtn_lm_note_lms_saved "%N landmarks saved"
+//d:Error note shown when unknown format exists in the received Landmarks package
+//l:popup_note_window
+//r:3.0
+//
+#define qtn_lm_badpackage_error        "Unable to open landmark package"
+
+//d:Middle soft key lebel text as Show
+//l: control_pane_t3/opt7
+//r:3.2
+//
+#define qtn_msk_lm_show   		"Show"
+
+//d:Middle soft key lebel text as Call
+//l: control_pane_t3/opt7
+//r:3.2
+//
+#define qtn_msk_lm_call  		"Call"
+
+//d:Middle soft key lebel text as Browse
+//l: control_pane_t3/opt7
+//r:3.2
+//
+#define qtn_msk_lm_browse  		"Browse"
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/msgviewer/data/LmkMsgViewer.rss	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,155 @@
+/*
+* 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:    LandmarksUi Content File -    Contains all the resources for lmkui.dll.
+*
+*/
+
+
+
+
+
+
+
+//  RESOURCE IDENTIFIER
+
+NAME    LMVI
+
+//  INCLUDES
+// For Data caging
+#include <data_caging_paths_strings.hrh>
+
+#include <eikon.rh>
+#include <uikon.rh>
+#include <avkon.rsg>
+#include <appinfo.rh>
+#include <avkon.rh>
+#include <avkon.hrh>
+#include <avkon.mbg>
+#include <avkon.loc>
+#include <landmarks.loc>
+#include <lmkmsgviewer.loc>
+
+#define KIconFileMif APP_BITMAP_DIR"\\LmkMsgViewer_aif.mif"
+#define KIconFileMbm APP_BITMAP_DIR"\\LmkMsgViewer_aif.mbm"
+
+//  RESOURCE DEFINITIONS
+
+RESOURCE RSS_SIGNATURE { }
+
+
+RESOURCE TBUF { buf=""; }
+
+RESOURCE EIK_APP_INFO
+    {
+    }
+
+RESOURCE LOCALISABLE_APP_INFO r_lmkmsgviewer_localisable_app_info
+        {
+        short_caption = qtn_apps_lm_grid;
+        caption_and_icon = CAPTION_AND_ICON_INFO
+                {
+                caption = qtn_apps_lm_list;
+#ifdef __SCALABLE_ICONS
+                number_of_icons = 1;
+                icon_file = KIconFileMif;
+#else
+                number_of_icons = 2;
+                icon_file = KIconFileMbm;
+#endif
+                };
+
+        }
+
+
+//----------------------------------------------------
+//
+//    r_lmk_msgviewer_menubar
+//    ?description
+//
+//----------------------------------------------------
+//
+RESOURCE MENU_BAR r_lmk_msgviewer_menubar
+    {
+    titles=
+        {
+        MENU_TITLE { menu_pane = r_lmk_msgviewer_menu; txt = ""; }
+        };
+    }
+
+//----------------------------------------------------
+//
+//    r_lmk_msgviewer_menu
+//    ?description
+//
+//----------------------------------------------------
+//
+RESOURCE MENU_PANE r_lmk_msgviewer_menu
+    {
+    items =
+        {
+        MENU_ITEM { command = EAknCmdExit; txt = "Exit"; }
+        };
+    }
+
+RESOURCE AVKON_VIEW r_lmkmsgviewer_view
+    {
+//    menubar=r_lmk_msgviewer_menubar;
+//    cba=R_AVKON_SOFTKEYS_OPTIONS_BACK;
+    }
+
+//----------------------------------------------------
+//
+//    r_lmk_msgviewer_wait
+//    Progress note
+//
+//----------------------------------------------------
+//
+RESOURCE DIALOG r_lmk_msgviewer_wait
+    {
+    flags = EAknWaitNoteFlags | EEikDialogFlagWait;
+    buttons = R_AVKON_SOFTKEYS_CANCEL;
+    items =
+        {
+        DLG_LINE
+            {
+            type = EAknCtNote;
+            id = EGeneralNote;
+            control= AVKON_NOTE
+                {
+                layout = EWaitLayout;
+                singular_label = qtn_gen_note_opening;
+                animation = R_QGN_GRAF_WAIT_BAR_ANIM;
+                };
+            }
+        };
+    }
+
+RESOURCE TBUF r_lmk_badpackage_error
+    {
+    buf = qtn_lm_badpackage_error;
+    }
+
+//----------------------------------------------------
+//   
+//    r_lmk_err_eikon_general
+//
+//----------------------------------------------------
+//
+
+RESOURCE TBUF r_lmk_err_eikon_general
+    {
+    buf = qtn_err_eikon_general;
+    }
+    
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/msgviewer/data/LmkMsgViewerAif.rss	Wed Sep 01 12:31:27 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:    LandmarksUi Content File -    
+*
+*/
+
+
+
+
+
+
+
+
+// INCLUDES
+#include <aiftool.rh>
+#include "LmkUID.h"
+
+// DATA
+RESOURCE AIF_DATA
+    {
+    app_uid = KLmkMsgViewerAppUID3;
+    num_icons = 2;
+    embeddability = KAppEmbeddable;
+    hidden = KAppIsHidden;
+    datatype_list = 
+        {
+        DATATYPE
+            {
+            priority = EDataTypePriorityNormal;
+            type = "application/vnd.nokia.landmarkcollection+xml";
+            }
+        };
+    }
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/msgviewer/data/LmkMsgViewer_caption.rss	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,32 @@
+/*
+* 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:    LandmarksUi Content File -    Caption file for LmkMsgViewer
+*
+*/
+
+
+
+
+
+
+
+
+//#include "LmkMsgViewer.loc"
+#include <apcaptionfile.rh>
+
+RESOURCE CAPTION_DATA
+    {
+    caption = " ";
+    shortcaption = " ";
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/msgviewer/data/LmkMsgViewer_reg.rss	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,82 @@
+/*
+* 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:    LandmarksUi Content File -     
+*
+*/
+
+
+
+
+
+
+
+
+#include <data_caging_paths_strings.hrh>
+
+#include <appinfo.rh>
+#include <lmkmsgviewer.rsg>
+#include "LmkUID.h"
+
+UID2 KUidAppRegistrationResourceFile
+UID3 KLmkMsgViewerAppUID3
+
+
+RESOURCE APP_REGISTRATION_INFO
+    {    
+    app_file = "LmkMsgViewer";
+
+	localisable_resource_file = APP_RESOURCE_DIR"\\LmkMsgViewer";
+    //hidden = KAppHidden;
+    localisable_resource_id = R_LMKMSGVIEWER_LOCALISABLE_APP_INFO;
+
+
+    hidden = KAppIsHidden;
+    embeddability = KAppEmbeddableUiNotStandAlone;
+
+#if 0
+    hidden = KAppNotHidden;
+    embeddability = KAppEmbeddable;
+#endif 
+
+    datatype_list = 
+        {
+        DATATYPE
+            {
+            priority = EDataTypePriorityNormal;
+            type = "application/vnd.nokia.landmarkcollection+xml";
+            },
+        DATATYPE
+            {
+            priority = EDataTypePriorityNormal;
+            type = "application/gps+xml";
+            },
+        DATATYPE
+            {
+            priority = EDataTypePriorityNormal;
+            type = "application/vnd.google-earth.kml+xml";
+            },
+        DATATYPE
+            {
+            priority = EDataTypePriorityNormal;
+            type = "application/vnd.google-earth.kmz";
+            }       
+        };
+    }
+
+
+
+
+
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/msgviewer/group/LmkMsgViewer.mmp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,90 @@
+/*
+* 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:    LandmarksUi Content File -    Project file for Landmark Message Viewer application.
+*
+*/
+
+
+
+
+
+
+
+// INCLUDES
+
+// To get the APP_LAYER_SYSTEMINCLUDE-definition
+#include <platform_paths.hrh>
+#include <data_caging_paths.hrh> //Data caging path defines
+#include "../../inc/LmkUID.h"         // Common Location UID definitions
+
+// Target information
+
+TARGET  LmkMsgViewer.exe
+TARGETTYPE exe 
+UID  KAppUID2 KLmkMsgViewerAppUID3 
+
+EPOCHEAPSIZE  1000 16000000
+EPOCSTACKSIZE 0x5000
+
+
+VENDORID    VID_DEFAULT
+CAPABILITY CAP_APPLICATION
+
+
+
+//exportunfrozen
+
+// Project source directory
+SOURCEPATH ../src
+
+SOURCE CLmkMsgViewerApp.cpp
+SOURCE CLmkMsgViewerAppUi.cpp
+SOURCE CLmkMsgViewerDocument.cpp
+SOURCE CLmkMsgViewerAppView.cpp
+
+// Resources
+// RESOURCE /MsgViewerRss/LmkMsgViewer.rss
+
+START RESOURCE ../data/LmkMsgViewer.rss
+HEADER
+TARGETPATH APP_RESOURCE_DIR
+LANGUAGE_IDS
+END //RESOURCE
+
+// Include paths
+USERINCLUDE . ../src ../data ../inc 
+USERINCLUDE ../../engine/inc ../../uicontrols/inc ../../inc
+
+// Other build related files
+//DOCUMENT ../group/landmarks.loc
+
+
+// Default system include paths for application layer modules.
+APP_LAYER_SYSTEMINCLUDE
+
+
+
+LIBRARY LmkUi.lib
+LIBRARY eposlandmarks.lib LmkEng.lib
+LIBRARY euser.lib apparc.lib cone.lib eikcore.lib 
+LIBRARY avkon.lib efsrv.lib
+LIBRARY AknSkins.lib
+LIBRARY CommonEngine.lib//StringLoader
+
+START RESOURCE ../data/LmkMsgViewer_reg.rss
+DEPENDS lmkmsgviewer.rsg
+HEADER
+TARGETPATH /private/10003a3f/apps
+END
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/msgviewer/group/bld.inf	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,39 @@
+/*
+* 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:    LandmarksUi Content File -    
+*	 This file provides the information required for building the
+*    	 whole of a Landmarks application.
+*
+*/
+
+
+
+
+
+
+
+
+PRJ_PLATFORMS
+DEFAULT
+
+
+PRJ_MMPFILES
+LmkMsgViewer.mmp
+
+PRJ_EXTENSIONS
+START EXTENSION s60/mifconv
+OPTION TARGETFILE lmkmsgviewer_aif.mif
+OPTION SOURCES -c8 qgn_menu_lm.svg
+END
+//  End of File  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/msgviewer/inc/CLmkMsgViewerApp.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,58 @@
+/*
+* 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:    LandmarksUi Content File -    Provides factory to create concrete document object.
+*
+*/
+
+
+
+
+
+
+
+#ifndef CLMKMSGVIEWERAPP_H
+#define CLMKMSGVIEWERAPP_H
+
+// INCLUDES
+#include <aknapp.h>
+
+// CLASS DECLARATION
+
+/**
+* CLmkMsgViewerApp application class.
+* Provides factory to create concrete document object.
+*
+*/
+class CLmkMsgViewerApp : public CAknApplication
+    {
+
+    public: // Functions from base classes
+    private:
+
+        /**
+         * From CApaApplication, creates CLmkMsgViewerDocument document object.
+         * @return A pointer to the created document object.
+         */
+        CApaDocument* CreateDocumentL();
+
+        /**
+         * From CApaApplication, returns application's UID (KLMUID3).
+         * @return The value of KLMUID3.
+         */
+        TUid AppDllUid() const;
+    };
+
+#endif // CLMKMSGVIEWERAPP_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/msgviewer/inc/CLmkMsgViewerAppUi.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,168 @@
+/*
+* 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:    LandmarksUi Content File -    Application UI class for Landmark message viewer.
+*
+*/
+
+
+
+
+
+
+
+
+#ifndef CLMKMSGVIEWERAPPUI_H
+#define CLMKMSGVIEWERAPPUI_H
+
+// INCLUDES
+#include "MLmkAOOperationObserver.h"
+#include <aknappui.h>
+
+// FORWARD DECLARATIONS
+class CLmkParser;
+class CPosLandmarkDatabase;
+class CAknWaitDialog;
+class CLmkSender;
+class CLmkMsgViewerAppView;
+
+// CLASS DECLARATION
+
+/**
+* Application UI class for Landmark message viewer.
+*/
+class CLmkMsgViewerAppUi
+: public CAknAppUi,
+  public MLmkAOOperationObserver
+    {
+    public: // Constructors and destructor
+
+        /**
+         * C++ default constructor.
+         */
+        void ConstructL();
+
+        /**
+         * Destructor.
+         */
+        ~CLmkMsgViewerAppUi();
+
+    public: // from CCoeControl
+      /*
+       * Helper function to implement the dynamic resource changes
+       */
+      void HandleResourceChangeL(TInt aType);
+
+    public: // New functions
+        TBool ProcessCommandParametersL( TApaCommand aCommand,
+	                                     TFileName& aDocumentName,
+	                                     const TDesC8& aTail );
+
+        /**
+        * Opens a landmark package file and starts processing it.
+        * @param aFilename full file name
+        */
+        void OpenL( const TDesC& aFilename );
+
+        // Added for FILE_HANDLE change
+        void OpenL(RFile& aFile);
+
+        /**
+        * Returns a reference to landmark sender.
+        * @return landmark sender
+        */
+        CLmkSender& LmkSender() const;
+
+    protected: // From MLmkAOOperationObserver
+        void HandleOperationL( TOperationTypes aType,
+                               TReal32 aProgress,
+                               TInt aStatus );
+
+    private: // From CEikAppUi
+        void HandleCommandL( TInt aCommand );
+		void OpenFileL( const TDesC& aFileName );
+
+        // Added for FILE_HANDLE change
+        void OpenFileL( RFile& aFilHandle );
+
+    private: // New functions
+        /**
+        * Helper function which performs the steps following
+        * database initialization.
+        * @param aStatus result of db initialization
+        */
+        void HandleDbInitFinishedL( TInt aStatus );
+
+        /**
+        * Helper function which performs the steps following
+        * asynchronous parse operation.
+        * @param aStatus result of parse operation
+        */
+        void HandleParseFinishedL( TInt aStatus );
+
+        /**
+        * Helper function which creates and executes a landmark viewer.
+        */
+        void ExecuteLmViewerL();
+
+        /**
+        * Helper function which creates and executes a lm package viewer.
+        */
+        void ExecutePkgViewerL();
+
+        /**
+        * Used to callback by the idle timer in order to launch the dialog
+        * @since 3.0
+        */
+        static TInt CallBackFuncL(TAny *aPtr);
+
+        /**
+        * This function accesses the document and launches the content
+        * using the UI Dialog.
+        * return: ETrue When file handle is not valid
+        *         EFalse When file handle is valid
+        * @since 3.0
+        */
+        TBool LaunchDialogL();
+
+        /**
+        * This function closes wait note.
+        * @since 3.0
+        */
+        void CloseWaitNoteL();
+
+        /** Common part of both OpenL(...) */
+        void DoOpenL();
+
+    private: //Data
+        /// Owns: parser
+        CLmkParser* iParser;
+        /// Owns: landmark database
+        CPosLandmarkDatabase* iDb;
+        /// Owns: wait dialog
+        CAknWaitDialog* iWaitDialog;
+        /// Owns: landmark sender
+        CLmkSender* iLmkSender;
+        /// Owns: empty view
+        CLmkMsgViewerAppView* iAppView;
+
+        CPeriodic* iIdleTimer;
+        /// result of parsing
+        TBool iDataReadyForView;
+        //
+        TBool iIsDbOpen;
+    };
+
+#endif // CLMKMSGVIEWERAPPUI_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/msgviewer/inc/CLmkMsgViewerAppView.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,110 @@
+/*
+* 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:    LandmarksUi Content File -    Application View control class for Landmark Message Viewer.
+*
+*/
+
+
+
+
+
+
+
+#ifndef __CLMKMSGVIEWERAPPVIEW_H
+#define __CLMKMSGVIEWERAPPVIEW_H
+
+// INCLUDES
+#include <coecntrl.h>
+
+// FORWARD DECLARATIONS
+class MAknsSkinInstance;
+class CAknsBasicBackgroundControlContext;
+
+// CLASS DECLARATION
+
+/**
+* Application View control class.
+*/
+class CLmkMsgViewerAppView : public CCoeControl
+    {
+    public: // New methods
+
+        /**
+        * NewL.
+        * Two-phased constructor.
+        * Create a CLmkMsgViewerAppView object, which will draw itself to aRect.
+        * @param aRect The rectangle this view will be drawn to.
+        * @return a pointer to the created instance of CLmkMsgViewerAppView.
+        */
+        static CLmkMsgViewerAppView* NewL( const TRect& aRect );
+
+        /**
+        * NewLC.
+        * Two-phased constructor.
+        * Create a CLmkMsgViewerAppView object, which will draw itself
+        * to aRect.
+        * @param aRect Rectangle this view will be drawn to.
+        * @return A pointer to the created instance of CLmkMsgViewerAppView.
+        */
+        static CLmkMsgViewerAppView* NewLC( const TRect& aRect );
+
+        /**
+        * ~CLmkMsgViewerAppView
+        * Virtual Destructor.
+        */
+        virtual ~CLmkMsgViewerAppView();
+
+    public:  // Functions from base classes
+
+        /**
+        * From CCoeControl, Draw
+        * Draw this CAnimationAppView to the screen.
+        * @param aRect the rectangle of this view that needs updating
+        */
+        void Draw( const TRect& aRect ) const;
+
+    protected:
+        // From CCoeControl
+        TInt CountComponentControls() const;
+        CCoeControl *ComponentControl(TInt aIndex) const;
+
+    private: // Constructors
+
+        /**
+        * ConstructL
+        * 2nd phase constructor.
+        * Perform the second phase construction of a
+        * CLmkMsgViewerAppView object.
+        * @param aRect The rectangle this view will be drawn to.
+        */
+        void ConstructL(const TRect& aRect);
+
+        /**
+        * CLmkMsgViewerAppView.
+        * C++ default constructor.
+        */
+        CLmkMsgViewerAppView();
+
+    private:
+
+        //! Ref: A pointer to skin instance
+        MAknsSkinInstance* iSkinInstance;
+
+        //! Own: A pointer to BasicBackgroundControlContext
+        CAknsBasicBackgroundControlContext* iBackgroundSkinContext;
+    };
+
+#endif // __CLMKMSGVIEWERAPPVIEW_H
+
+// End of File
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/msgviewer/inc/CLmkMsgViewerDocument.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,115 @@
+/*
+* 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:    LandmarksUi Content File -    Landmark message viewer application document class definition.
+*
+*/
+
+
+
+
+
+
+
+#ifndef CLMKMSGVIEWERDOCUMENT_H
+#define CLMKMSGVIEWERDOCUMENT_H
+
+// INCLUDES
+#include <eikdoc.h>
+
+// FORWARD DECLARATIONS
+class CEikAppUi;
+class RFile;
+
+// CLASS DECLARATION
+
+/**
+*  CLmkMsgViewerDocument application class.
+*/
+class CLmkMsgViewerDocument : public CEikDocument
+    {
+    public: // Constructors and destructor
+
+        /**
+         * Two-phased constructor.
+         */
+        static CLmkMsgViewerDocument* NewL( CEikApplication& aApp );
+
+        /**
+         * Destructor.
+         */
+        virtual ~CLmkMsgViewerDocument();
+
+    public: // New functions
+
+       /* GetLandmarkContentFileHandle This function is a get function to
+        * get the file-handle of the file content. This is used by AppUI
+        * @since 3.0
+        */
+        RFile& GetLandmarkContentFileHandle();
+
+        /**
+        * IsFileHandleValid() This function is a get function to
+        * get the flag whether File's handle is valid
+        * AppUi uses this method.
+        * @since 3.0
+        */
+        TBool IsFileHandleValid() const;
+
+    public: // Methods from base class CEikDocument
+
+        /**
+        * Takes care of opening file.
+        */
+       CFileStore* OpenFileL( TBool aDoOpen,
+                              const TDesC& aFilename,
+                              RFs& aFs );
+
+       void OpenFileL(CFileStore*& aFileStore,  RFile& aFile);
+
+    private:
+
+        /**
+         * C++ default constructor.
+         */
+        CLmkMsgViewerDocument( CEikApplication& aApp );
+
+        /**
+         * By default Symbian 2nd phase constructor is private.
+         */
+        void ConstructL();
+
+    private: // From CEikDocument
+        /**
+         * From CEikDocument, create CLocAppUi "App UI" object.
+         */
+        CEikAppUi* CreateAppUiL();
+
+    private: // Data
+
+    	// File handle to the Landmarks Package content
+        RFile iLandmarkContentFileHandle;
+
+        //File Path if the file launched with full filepath.
+        HBufC* iFileFullPath;
+
+        //Was file launched with full-path.
+        TBool iIsFileFullPathValid;
+
+        //OpenFileL updates this flag after getting the file handle.
+        TBool iIsFileHandleValid;
+    };
+
+#endif // CLMKMSGVIEWERDOCUMENT_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/msgviewer/src/CLmkMsgViewerApp.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,73 @@
+/*
+* 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:    LandmarksUi Content File -    Provides LM Application class methods.
+*
+*/
+
+
+
+
+
+
+
+// INCLUDE FILES
+#include "CLmkMsgViewerApp.h"
+#include "CLmkMsgViewerDocument.h"
+#include "LmkUID.h"
+#include<eikstart.h>
+
+
+// ================= MEMBER FUNCTIONS =======================
+
+// ---------------------------------------------------------
+// CLmkMsgViewerApp::AppDllUid()
+// Returns application UID
+// ---------------------------------------------------------
+//
+TUid CLmkMsgViewerApp::AppDllUid() const
+    {
+    return TUid::Uid( KLmkMsgViewerAppUID3 );
+    }
+
+// ---------------------------------------------------------
+// CLocApp::CreateDocumentL()
+// Creates CLmkMsgViewerDocument object
+// ---------------------------------------------------------
+//
+CApaDocument* CLmkMsgViewerApp::CreateDocumentL()
+    {
+    return CLmkMsgViewerDocument::NewL( *this );
+    }
+
+// ================= OTHER EXPORTED FUNCTIONS ==============
+//
+
+LOCAL_C CApaApplication* NewApplication()
+  {
+  return new CLmkMsgViewerApp;
+  }
+
+GLDEF_C TInt E32Main()
+  {
+  return  EikStart::RunApplication(NewApplication);
+  }
+
+#if defined(_WINS_)
+EXPORT_C TInt WinsMain(TDesC* /*aCmdLine*/)
+  {
+  //return EikStart::RunApplication(NewApplication, aCmdLine);
+  return EikStart::RunApplication(NewApplication);
+  }
+#endif
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/msgviewer/src/CLmkMsgViewerAppUi.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,503 @@
+/*
+* 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:    LandmarksUi Content File -    Provides LM UI class methods.
+*
+*/
+
+
+
+
+
+
+
+// INCLUDE FILES
+#include "CLmkMsgViewerAppUi.h"
+#include "CLmkMsgViewerAppView.h"
+#include "landmarks.hrh"
+#include "CLmkMsgViewerDocument.h"
+#include "CLmkParser.h"
+#include "CLmkSender.h"
+#include "CLmkPackageEditorImpl.h"
+#include "CLmkDlgPackageSelectorImpl.h"
+#include "LmkConsts.h"
+#include "CLmkEditorDlg.h"
+#include <AknsUtils.h>
+#include <AknWaitDialog.h>
+#include <EPos_CPosLandmarkDatabase.h>
+#include <lmkmsgviewer.rsg>
+#include <aknnotewrappers.h>
+#include <StringLoader.h>
+#include "LmkNotes.h"
+#include <lmkerrors.h>
+
+#if defined(_DEBUG)
+// CONSTANTS
+/// Unnamed namespace for local definitions
+namespace {
+
+_LIT( KPanicMsg, "CLmkMsgViewerAppUi");
+
+void Panic( TPanicCode aReason )
+    {
+    User::Panic( KPanicMsg, aReason );
+    }
+}  // namespace
+#endif
+
+// Constant for periodic timer
+const TInt KOneMicroSec = 1;
+
+// ================= LOCAL FUNCTIONS =======================
+
+//-----------------------------------------------------------------------
+// ErrorNoteL
+// ----------------------------------------------------------------------------
+//
+void ErrorNoteL(const TInt aResourceId)
+    {
+    HBufC* noteText = CEikonEnv::Static()->AllocReadResourceLC(aResourceId);
+
+    CAknErrorNote* dialog =
+        new( ELeave ) CAknErrorNote( R_AKN_INFORMATION_NOTE_WAIT );
+    dialog->ExecuteLD( *noteText );
+
+    CleanupStack::PopAndDestroy(noteText); //noteText
+    }
+
+// ================= MEMBER FUNCTIONS =======================
+
+// ----------------------------------------------------------
+// CLmkMsgViewerAppUi::ConstructL
+// ----------------------------------------------------------
+//
+void CLmkMsgViewerAppUi::ConstructL()
+    {
+
+    BaseConstructL( EAknEnableSkin | EAknEnableMSK | EAknSingleClickCompatible);
+
+    iAppView = CLmkMsgViewerAppView::NewL( ClientRect() );
+
+    // Start an idle timer to start the dialog synchronously.
+    iIdleTimer = CPeriodic::NewL(CActive::EPriorityIdle);
+    iIdleTimer->Start(KOneMicroSec, KOneMicroSec,
+        TCallBack(CallBackFuncL,this));
+    }
+
+// ----------------------------------------------------
+// CLmkMsgViewerAppUi::~CLmkMsgViewerAppUi
+// Destructor
+// Frees reserved resources
+// ----------------------------------------------------
+//
+CLmkMsgViewerAppUi::~CLmkMsgViewerAppUi()
+    {
+    if ( iIdleTimer )
+        {
+        delete iIdleTimer;
+        iIdleTimer = NULL;
+        }
+
+    TInt err = KErrNone;
+    TRAP(err, CloseWaitNoteL());
+
+    delete iAppView;
+    delete iLmkSender;
+    delete iParser;
+    delete iDb;
+
+    if( iDoorObserver )
+        {
+        iDoorObserver->NotifyExit( MApaEmbeddedDocObserver::EEmpty );
+        }
+    }
+
+// ----------------------------------------------------
+// CLmkMsgViewerAppUi::HandleCommandL
+// ----------------------------------------------------
+//
+void CLmkMsgViewerAppUi::HandleCommandL( TInt aCommand )
+    {
+    switch ( aCommand )
+        {
+        // these all are same: save & exit
+        case EAknSoftkeyBack:
+        case EAknSoftkeyExit:
+        case EAknCmdExit:
+        case EEikCmdExit:
+            {
+            Exit();
+            break;
+            }
+        default:
+            {
+            break;
+            }
+        }
+    }
+
+// ----------------------------------------------------
+// CLmkMsgViewerAppUi::LmkSender
+// ----------------------------------------------------
+//
+CLmkSender& CLmkMsgViewerAppUi::LmkSender() const
+    {
+    __ASSERT_DEBUG( iLmkSender, Panic( KLmkPanicNullMember ) );
+    return *iLmkSender;
+    }
+
+
+// ----------------------------------------------------------------------------
+// CLmkMsgViewerAppUi::OpenFileL
+// This is called by framework when application is already open in background
+// and user opens other file
+// New file to been shown is passed via aFileName.
+// ----------------------------------------------------------------------------
+//
+void CLmkMsgViewerAppUi::OpenFileL( const TDesC& aFileName )
+	{
+	// File changed.
+
+    // TODO: What to do with the possibly existing package?
+    // Should we just leave or do something else?
+    if ( iParser )
+        {
+        User::Leave( KErrAlreadyExists );
+        }
+    else
+        {
+        Document()->OpenFileL( EFalse, aFileName, iEikonEnv->FsSession() );
+        }
+	}
+
+
+// ----------------------------------------------------------------------------
+// CLmkMsgViewerAppUi::OpenFileL
+// This is called by framework when application is already open in background
+// and user opens other file
+// New file to been shown is passed via aFileName.
+// ----------------------------------------------------------------------------
+//
+void CLmkMsgViewerAppUi::OpenFileL(RFile& aFileHandle )
+	{
+	// File changed.
+    if ( iParser )
+        {
+        User::Leave( KErrAlreadyExists );
+        }
+    else
+        {
+        CFileStore* aFileStore = NULL;
+        static_cast<CLmkMsgViewerDocument*>(Document())->OpenFileL(aFileStore, aFileHandle);
+        }
+	}
+
+// ----------------------------------------------------------------------------
+// CLmkMsgViewerAppUi::ProcessCommandParametersL
+// This method must return true or documents OpenFileL() get wrong file name.
+// ----------------------------------------------------------------------------
+//
+TBool CLmkMsgViewerAppUi::ProcessCommandParametersL(
+    TApaCommand /*aCommand*/,
+	TFileName& /*aDocumentName*/,
+	const TDesC8& /*aTail*/ )
+    {
+    // Never call CEikAppUi::ProcessCommandParametersL(..) because
+    // it is so harmful to overwrite and destroy aDocumentName.
+
+	// Return ETrue so that CLmkMsgViewerAppUi::OpenFileL() gets
+    // the right document name.
+    return ETrue;
+    }
+
+
+// ----------------------------------------------------
+// CLmkMsgViewerAppUi::HandleOperationL
+// ----------------------------------------------------
+//
+void CLmkMsgViewerAppUi::HandleOperationL(
+    TOperationTypes aType,
+    TReal32 /*aProgress*/,
+    TInt aStatus )
+    {
+    __ASSERT_DEBUG( ( aType == EInitialize ||
+                      aType == EParse ) &&
+                    aStatus != KPosLmOperationNotComplete,
+                    Panic( KLmkPanicAlreadyActive ) );
+
+    TInt err = KErrNone;
+    if (aType == EInitialize)
+        {
+        TRAP(err, HandleDbInitFinishedL(aStatus));
+        }
+    else // (aType == EParse)
+        {
+        TRAP(err, HandleParseFinishedL(aStatus));
+        }
+
+    if (err)
+        {
+        CloseWaitNoteL(); // when wait note closes, application exits
+        }
+    }
+
+// ----------------------------------------------------
+// CLmkMsgViewerAppUi::HandleDbInitFinishedL
+// ----------------------------------------------------
+//
+void CLmkMsgViewerAppUi::HandleDbInitFinishedL( TInt aStatus )
+    {
+    if (aStatus != KErrNone)
+        {
+        CCoeEnv::Static()->HandleError(aStatus);
+        User::Leave(aStatus);
+        }
+    iParser->StartParsingL();
+    }
+
+// ----------------------------------------------------
+// CLmkMsgViewerAppUi::HandleParseFinishedL
+// ----------------------------------------------------
+//
+void CLmkMsgViewerAppUi::HandleParseFinishedL( TInt aStatus )
+    {
+    if (aStatus != KErrNone)
+        {
+        ErrorNoteL(R_LMK_BADPACKAGE_ERROR);
+        User::Leave(aStatus);
+        }
+    // now everything's ready for viewing
+    iDataReadyForView = ETrue;
+    CloseWaitNoteL(); // when wait note closes, view dialog opens
+    }
+
+void CLmkMsgViewerAppUi::CloseWaitNoteL()
+    {
+    if (iWaitDialog)
+        {
+        iWaitDialog->ProcessFinishedL();
+        iWaitDialog = NULL;
+        }
+    }
+
+// ----------------------------------------------------
+// CLmkMsgViewerAppUi::ExecuteLmViewerL
+// ----------------------------------------------------
+//
+void CLmkMsgViewerAppUi::ExecuteLmViewerL()
+    {
+    __ASSERT_DEBUG( iParser->NumOfParsedLandmarks() == 1,
+                    Panic( KLmkPanicOutOfRange ) );
+
+    CLmkPackageEditorImpl* editorImpl =
+        CLmkPackageEditorImpl::NewL( *iDb, *iParser, *iLmkSender, 0 );
+
+    // Parser observing responsibility is given to the lm viewer,
+    // application is not interested in it anymore:
+    iParser->ChangeObserver( *editorImpl );
+    editorImpl->ExecuteLD();
+    }
+
+// ----------------------------------------------------
+// CLmkMsgViewerAppUi::ExecutePkgViewerL
+// ----------------------------------------------------
+//
+void CLmkMsgViewerAppUi::ExecutePkgViewerL()
+    {
+    __ASSERT_DEBUG( iParser->NumOfParsedLandmarks() > 1,
+                    Panic( KLmkPanicOutOfRange ) );
+
+    CLmkDlgPackageSelectorImpl* pkgViewer =
+        CLmkDlgPackageSelectorImpl::NewL( *iDb, *iParser, *iLmkSender );
+    CleanupStack::PushL( pkgViewer );
+
+    // Parser observing responsibility is given to the package viewer,
+    // application is not interested in it anymore:
+    iParser->ChangeObserver( *pkgViewer );
+
+    CArrayFix<TInt>* selectedItems =
+        new( ELeave ) CArrayFixFlat<TInt>( KLmkMultiSelectionGranularity );
+    CleanupStack::PushL( selectedItems );
+
+    pkgViewer->ExecuteL( *selectedItems,  iParser->PackageName());
+    CleanupStack::PopAndDestroy( selectedItems );
+    CleanupStack::PopAndDestroy( pkgViewer );
+    }
+
+// ----------------------------------------------------
+// CLmkMsgViewerAppUi::OpenL
+// ----------------------------------------------------
+//
+void CLmkMsgViewerAppUi::OpenL( const TDesC& aFilename )
+    {
+    iParser = CLmkParser::NewL( aFilename, *iDb, *this, EFalse );
+    DoOpenL();
+    Exit();
+    }
+
+// ----------------------------------------------------
+// CLmkMsgViewerAppUi::OpenL
+// ----------------------------------------------------
+//
+void CLmkMsgViewerAppUi::OpenL(RFile& aFile)
+    {
+    iParser = CLmkParser::NewL( aFile, *iDb, *this, EFalse );
+    DoOpenL();
+    Exit();
+    }
+
+void CLmkMsgViewerAppUi::DoOpenL()
+    {
+    // We need to initialize db before we start parsing:
+    iParser->InitializeDbL();
+
+    iWaitDialog = new( ELeave ) CAknWaitDialog( NULL, ETrue );
+    if (!iWaitDialog->ExecuteLD( R_LMK_MSGVIEWER_WAIT ))
+        {
+        //making iWaitDialog null, since framework destroys waitnote
+        //dialog on pressing cancel.
+
+        iWaitDialog = NULL;
+        }
+
+    if( iDataReadyForView )
+        {
+        if ( iParser->NumOfParsedLandmarks() == 1 )
+            {
+            ExecuteLmViewerL();
+            }
+        else if ( iParser->NumOfParsedLandmarks() > 1 )
+            {
+            ExecutePkgViewerL();
+            }
+        else
+            {
+            // exit
+            }
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkMsgViewerAppUi::CallBackFuncL()
+// Used to callback by the idle timer in order to launch
+// the dialog
+// -----------------------------------------------------------------------------
+//
+TInt CLmkMsgViewerAppUi::CallBackFuncL(TAny *aPtr)
+    {
+    CLmkMsgViewerAppUi* appUi =
+        static_cast< CLmkMsgViewerAppUi* >( aPtr );
+
+    if ( appUi )
+        {
+        return ( appUi->LaunchDialogL() );
+        }
+    else
+        {
+        // To indicate that the timer is not
+        // called again, return false to the timer
+        // RunL
+        return ( EFalse );
+        }
+    }
+
+
+// -----------------------------------------------------------------------------
+// CLmkMsgViewerAppUi::LaunchDialogL()
+// This function accesses the document and launches the
+// content.
+// -----------------------------------------------------------------------------
+//
+TBool CLmkMsgViewerAppUi::LaunchDialogL()
+	{
+	if(!iIsDbOpen)
+		{
+		// Try to open DB
+		TRAPD( err, iDb = CPosLandmarkDatabase::OpenL() );
+
+    	if( KErrNone != err )
+    		{
+    		// Cancel the periodic timer
+        	if ( iIdleTimer->IsActive() )
+            	{
+            	iIdleTimer->Cancel();
+            	}
+            // Display general system error note
+		    HBufC* noteText = StringLoader::LoadL( R_LMK_ERR_EIKON_GENERAL, iEikonEnv );
+		    CleanupStack::PushL( noteText );
+	    	CAknErrorNote* dialog = new(ELeave)CAknErrorNote( ETrue );
+		    dialog->SetTone( CAknNoteDialog::EErrorTone );
+		    dialog->ExecuteLD( *noteText );
+	   		CleanupStack::PopAndDestroy( noteText ); //noteText
+	   		// exit LmkMsgViewer app
+		    Exit();
+		    }
+    	    // DB was opened successfully
+    	    iIsDbOpen = ETrue;
+    		iLmkSender = CLmkSender::NewL( *iDb );
+    	}
+	CLmkMsgViewerDocument* document =
+	    static_cast<CLmkMsgViewerDocument*>(iDocument);
+
+	// Check if file-handle in document is valid
+	if (document->IsFileHandleValid())
+		{
+		// Obtain the file-handle
+		RFile& fileHandle = document->GetLandmarkContentFileHandle();
+
+        // Cancel the periodic timer
+        if ( iIdleTimer->IsActive() )
+            {
+            iIdleTimer->Cancel();
+            }
+		// Launch the content
+		TRAPD(err,OpenL(fileHandle));
+		if(err != KErrNone)
+			{
+			if( err == KErrNotSupported)
+				{
+				LmkNotes::InformationNoteL( iEikonEnv, R_LMK_BADPACKAGE_ERROR );
+				}
+			Exit();
+			}
+		// Delete and reset the idle-timer
+        delete iIdleTimer;
+        iIdleTimer = NULL;
+
+		// Return False to indicate that
+		// timer need not callback further.
+		return EFalse;
+		}
+	else
+		{
+		// Return True to indicate that the
+		// timer needs to callback this function
+		// again, as the file-handle is not valid
+		// yet.
+		return ETrue;
+		}
+	}
+
+// -----------------------------------------------------------------------------
+// CLmkMsgViewerAppUi::HandleResourceChangeL()
+// -----------------------------------------------------------------------------
+//
+void CLmkMsgViewerAppUi::HandleResourceChangeL(TInt aType)
+    {
+     CAknAppUi::HandleResourceChangeL( aType );
+    if ( aType == KEikDynamicLayoutVariantSwitch )
+        {
+        iAppView->SetRect(ClientRect());
+        }
+    }
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/msgviewer/src/CLmkMsgViewerAppView.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,140 @@
+/*
+* 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:    LandmarksUi Content File -    Application view control.
+*
+*/
+
+
+
+
+
+
+
+
+// INCLUDE FILES
+#include <coemain.h>
+#include <aknlists.h>
+#include <barsread.h>
+
+#include <AknsDrawUtils.h>
+#include <AknsBasicBackgroundControlContext.h>
+
+#include "CLmkMsgViewerAppView.h"
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CLmkMsgViewerAppView::NewL()
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+CLmkMsgViewerAppView* CLmkMsgViewerAppView::NewL( const TRect& aRect )
+    {
+    CLmkMsgViewerAppView* self = CLmkMsgViewerAppView::NewLC( aRect );
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkMsgViewerAppView::NewLC()
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+CLmkMsgViewerAppView* CLmkMsgViewerAppView::NewLC( const TRect& aRect )
+    {
+    CLmkMsgViewerAppView* self = new ( ELeave ) CLmkMsgViewerAppView;
+    CleanupStack::PushL( self );
+    self->ConstructL( aRect );
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkMsgViewerAppView::ConstructL()
+// Symbian 2nd phase constructor can leave.
+// -----------------------------------------------------------------------------
+//
+void CLmkMsgViewerAppView::ConstructL( const TRect& aRect )
+    {
+    // Create a window for this application view
+    CreateWindowL();
+
+    // Set the windows size
+    SetRect( aRect );
+
+    // Get the skin instance
+    iSkinInstance = AknsUtils::SkinInstance();
+
+    // Create background control context for skinning the background
+    iBackgroundSkinContext = CAknsBasicBackgroundControlContext::NewL(
+                    KAknsIIDQsnBgAreaMain, aRect, ETrue );
+
+    // Activate the window, which makes it ready to be drawn
+    ActivateL();
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkMsgViewerAppView::CLmkMsgViewerAppView()
+// C++ default constructor can NOT contain any code, that might leave.
+// -----------------------------------------------------------------------------
+//
+CLmkMsgViewerAppView::CLmkMsgViewerAppView()
+    {
+    // No implementation required
+    }
+
+
+// -----------------------------------------------------------------------------
+// CLmkMsgViewerAppView::~CLmkMsgViewerAppView()
+// Destructor.
+// -----------------------------------------------------------------------------
+//
+CLmkMsgViewerAppView::~CLmkMsgViewerAppView()
+    {
+    delete iBackgroundSkinContext;
+    CloseWindow();
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkMsgViewerAppView::CountComponentControls()
+// -----------------------------------------------------------------------------
+//
+TInt CLmkMsgViewerAppView::CountComponentControls() const
+    {
+    return 0;
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkMsgViewerAppView::ComponentControl()
+// -----------------------------------------------------------------------------
+//
+CCoeControl* CLmkMsgViewerAppView::ComponentControl(TInt /*aIndex*/) const
+    {
+    return NULL;
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkMsgViewerAppView::Draw()
+// Draws the display.
+// -----------------------------------------------------------------------------
+//
+void CLmkMsgViewerAppView::Draw( const TRect& /*aRect*/ ) const
+    {
+    // Get the standard graphics context
+    CWindowGc& gc = SystemGc();
+
+    AknsDrawUtils::Background(
+        iSkinInstance, iBackgroundSkinContext, this, gc, Rect());
+    }
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/msgviewer/src/CLmkMsgViewerDocument.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,154 @@
+/*
+* 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:    LandmarksUi Content File -    Provides LM document class methods.
+*
+*/
+
+
+
+
+
+
+
+// INCLUDE FILES
+
+#include <f32file.h>
+#include "CLmkMsgViewerDocument.h"
+#include "CLmkMsgViewerAppUi.h"
+
+// ================= MEMBER FUNCTIONS =======================
+// ----------------------------------------------------------------------------
+// CLmkMsgViewerDocument::CLmkMsgViewerDocument
+// ----------------------------------------------------------------------------
+//
+CLmkMsgViewerDocument::CLmkMsgViewerDocument( CEikApplication& aApp )
+    : CEikDocument( aApp )
+    {
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkMsgViewerDocument::~CLmkMsgViewerDocument
+// ----------------------------------------------------------------------------
+//
+CLmkMsgViewerDocument::~CLmkMsgViewerDocument()
+    {
+    iLandmarkContentFileHandle.Close();
+    delete iFileFullPath;
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkMsgViewerDocument::ConstructL
+// Symbian 2nd phase constructor can leave.
+// ----------------------------------------------------------------------------
+//
+void CLmkMsgViewerDocument::ConstructL()
+    {
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkMsgViewerDocument::NewL
+// Two-phased constructor.
+// ----------------------------------------------------------------------------
+//
+CLmkMsgViewerDocument* CLmkMsgViewerDocument::NewL( CEikApplication& aApp )
+    {
+    CLmkMsgViewerDocument* self = new( ELeave ) CLmkMsgViewerDocument( aApp );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop();
+    return self;
+    }
+
+// ----------------------------------------------------
+// CLmkMsgViewerDocument::CreateAppUiL
+// constructs CLmkMsgViewerAppUi
+// ----------------------------------------------------
+//
+CEikAppUi* CLmkMsgViewerDocument::CreateAppUiL()
+    {
+    return new( ELeave ) CLmkMsgViewerAppUi;
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkMsgViewerDocument::OpenFileL()
+// Open document.
+// -----------------------------------------------------------------------------
+CFileStore* CLmkMsgViewerDocument::OpenFileL(
+    TBool /*aDoOpen*/,
+    const TDesC& aFilename,
+    RFs& aFs )
+    {
+	//static_cast<CLmkMsgViewerAppUi*>( iAppUi )->OpenL( aFilename );
+
+	// Function is called with Full-path.
+    iIsFileFullPathValid = ETrue;
+    // Store the File's fullpath.
+    iFileFullPath = aFilename.AllocL();
+
+    // Open File Handle for the file
+    TInt openError = iLandmarkContentFileHandle.Open( aFs, aFilename,
+        EFileShareReadersOnly);
+    if ( openError != KErrNone )
+        {
+        User::Leave( openError );
+        }
+    iIsFileHandleValid = ETrue;
+    return NULL;
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkMsgViewerDocument::OpenFileL()
+// Open document.
+// -----------------------------------------------------------------------------
+
+void CLmkMsgViewerDocument::OpenFileL(
+    CFileStore*& /* aFileStore */,
+    RFile& aFile)
+    {
+    // Duplicate the file handle
+    // Function is not called with Full-path.
+    iIsFileFullPathValid = EFalse;
+
+    // File-handle is valid
+    iIsFileHandleValid = ETrue;
+    iLandmarkContentFileHandle.Duplicate(aFile);
+    aFile.Close();
+	//static_cast<CLmkMsgViewerAppUi*>( iAppUi )->OpenL( aFile );
+    //aFileStore = NULL;
+    }
+
+// -----------------------------------------------------------------------------
+//  CLmkMsgViewerDocument::GetLandmarkContentFileHandle
+// This function is a get function to get the file-handle of the file content.
+// This is used by AppUI.
+// Returns: File handle of content by reference .
+// -----------------------------------------------------------------------------
+//
+RFile& CLmkMsgViewerDocument::GetLandmarkContentFileHandle()
+    {
+    return iLandmarkContentFileHandle;
+    }
+
+    // -----------------------------------------------------------------------------
+// CLmkMsgViewerDocument::IsFileHandleValid()
+// Used by UI class to check if file's handle is valid
+// -----------------------------------------------------------------------------
+//
+TBool CLmkMsgViewerDocument::IsFileHandleValid() const
+    {
+    return (iIsFileHandleValid != NULL);
+    }
+
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/rom/LocationLandmarksUi.iby	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,83 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:   LandmarksUi Content File      
+*
+*/
+
+
+
+
+
+
+#ifndef __LandmarksUI_IBY__
+#define __LandmarksUI_IBY__
+
+#include <bldvariant.hrh>
+
+				///////////////////////
+			        // *** Landmarks UI*** //
+				///////////////////////
+
+
+// Landmarks UI Common UI library
+file=ABI_DIR\BUILD_DIR\LmkCommonUi.dll		SHARED_LIB_DIR\LmkCommonUi.dll
+
+/// Lmk UI Ui dll
+file=ABI_DIR\BUILD_DIR\LmkUi.dll		SHARED_LIB_DIR\LmkUi.dll
+
+
+/// Landmark UI Engine library
+file=ABI_DIR\BUILD_DIR\LmkEng.dll		SHARED_LIB_DIR\LmkEng.dll
+
+
+SCALABLE_IMAGE(resource\apps,resource\apps,Landmarks)
+
+
+
+// LmkUi Mif file 
+data=ZRESOURCE\apps\LmkUi.mif              APP_RESOURCE_DIR\LmkUi.mif
+
+
+#if defined(FF_LANDMARKS_UI) 
+
+// Landmarks UI application Icons and Resources 
+
+S60_APP_AIF_ICONS(Landmarks)
+S60_UPGRADABLE_APP_REG_RSC(Landmarks)
+
+// Lmk Application
+
+file=ABI_DIR\BUILD_DIR\Landmarks.exe            PROGRAMS_DIR\Landmarks.exe
+
+
+
+#endif // FF_LANDMARKS_UI
+
+#ifdef __LANDMARKS_CONVERTER
+
+// Landmarks MsgViewer
+
+S60_APP_AIF_ICONS(LmkMsgViewer)
+S60_UPGRADABLE_APP_REG_RSC(LmkMsgViewer)
+
+/// LmkMsgViewer Application
+
+file=ABI_DIR\BUILD_DIR\LmkMsgViewer.exe           PROGRAMS_DIR\LmkMsgViewer.exe 
+
+#endif // __LANDMARKSCONVERTER
+
+
+#endif // __LandmarksUI_IBY__
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/rom/LocationLandmarksUiStub.iby	Wed Sep 01 12:31:27 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:   LandmarksUi Content File      
+*
+*/
+
+
+
+
+
+
+#ifndef __LandmarksUiStub_IBY__
+#define __LandmarksUiStub_IBY__
+
+// Landmarks stub sis file
+data=ZSYSTEM\install\landmarksstub.sis    			\system\install\landmarksstub.sis
+
+
+#endif // __LandmarksUiStub_IBY__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/rom/LocationLandmarksUi_resources.iby	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,54 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:   LandmarksUi Content File      
+*
+*/
+
+
+
+
+
+
+#ifndef __LandmarksUI_RESOURCES_IBY__
+#define __LandmarksUI_RESOURCES_IBY__
+
+#include <bldvariant.hrh>
+
+				///////////////////////
+			        // *** Landmarks UI*** //
+				///////////////////////
+
+/// Landmarks UI dll resources 
+
+data=DATAZ_\RESOURCE_FILES_DIR\lmkui.rsC	RESOURCE_FILES_DIR\lmkui.rsc
+
+
+#if defined(__LANDMARKS) 
+
+/// Lmk Application Resources 
+
+data=ZRESOURCE\apps\Landmarks.rsc               APP_RESOURCE_DIR\Landmarks.rsc
+
+#endif
+
+#ifdef __LANDMARKS_CONVERTER
+
+data=ZRESOURCE\apps\LmkMsgViewer.rsc              APP_RESOURCE_DIR\LmkMsgViewer.rsc
+
+#endif // __LANDMARKS_CONVERTER
+
+
+#endif // __LandmarksUI_RESOURCES_IBY__
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/uicontrols/bwins/LMKUIU_32u.def	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,75 @@
+EXPORTS
+	??1CLmkMapNavigationInterface@@UAE@XZ @ 1 NONAME ; CLmkMapNavigationInterface::~CLmkMapNavigationInterface(void)
+	?AllLandmarksEmptyNoteL@LmkNotes@@SAXPAVCEikonEnv@@@Z @ 2 NONAME ; void LmkNotes::AllLandmarksEmptyNoteL(class CEikonEnv *)
+	?AttachAIWInterestL@CLmkMapNavigationInterface@@QAEXHH@Z @ 3 NONAME ; void CLmkMapNavigationInterface::AttachAIWInterestL(int, int)
+	?AttachMenuPaneL@CLmkMapNavigationInterface@@QAEXPAVCEikMenuPane@@HH@Z @ 4 NONAME ; void CLmkMapNavigationInterface::AttachMenuPaneL(class CEikMenuPane *, int, int)
+	?CategoryConfirmationQueryL@LmkNotes@@SAHPAVCEikonEnv@@H@Z @ 5 NONAME ; int LmkNotes::CategoryConfirmationQueryL(class CEikonEnv *, int)
+	?CategoryEmptyNoteL@LmkNotes@@SAXPAVCEikonEnv@@VTPtrC16@@@Z @ 6 NONAME ; void LmkNotes::CategoryEmptyNoteL(class CEikonEnv *, class TPtrC16)
+	?CategoryNameL@CLmkAppLmSelectorImpl@@QAE?AVTPtrC16@@XZ @ 7 NONAME ; class TPtrC16 CLmkAppLmSelectorImpl::CategoryNameL(void)
+	?CategoryNameQueryL@LmkNotes@@SAHAAVTDes16@@H@Z @ 8 NONAME ; int LmkNotes::CategoryNameQueryL(class TDes16 &, int)
+	?ChangeLmNameLabelIconL@CLmkUiUtils@@SAXAAVMLmkEditorUiBuilder@@AAVMLmkFieldData@@@Z @ 9 NONAME ; void CLmkUiUtils::ChangeLmNameLabelIconL(class MLmkEditorUiBuilder &, class MLmkFieldData &)
+	?ChangeTitlePaneL@CLmkUiUtils@@SAXH@Z @ 10 NONAME ; void CLmkUiUtils::ChangeTitlePaneL(int)
+	?ChangeTitlePaneL@CLmkUiUtils@@SAXPAVHBufC16@@@Z @ 11 NONAME ; void CLmkUiUtils::ChangeTitlePaneL(class HBufC16 *)
+	?CreateFindBoxL@CLmkAppSelectorImplBase@@QAEPAVCAknSearchField@@ABVCCoeControl@@@Z @ 12 NONAME ; class CAknSearchField * CLmkAppSelectorImplBase::CreateFindBoxL(class CCoeControl const &)
+	?CurrentCategoryId@CLmkAppCategorySelectorImpl@@QAEHXZ @ 13 NONAME ; int CLmkAppCategorySelectorImpl::CurrentCategoryId(void)
+	?CurrentItemIndex@CLmkAppSelectorImplBase@@QAEHXZ @ 14 NONAME ; int CLmkAppSelectorImplBase::CurrentItemIndex(void)
+	?DetachInterestL@CLmkMapNavigationInterface@@QAEXHH@Z @ 15 NONAME ; void CLmkMapNavigationInterface::DetachInterestL(int, int)
+	?DisableMapAndNavigationMenuOptions@CLmkEditorImpl@@QAEXXZ @ 16 NONAME ; void CLmkEditorImpl::DisableMapAndNavigationMenuOptions(void)
+	?DisplaySendCascadeMenuL@CLmkSender@@QBEXAAVCEikMenuPane@@@Z @ 17 NONAME ; void CLmkSender::DisplaySendCascadeMenuL(class CEikMenuPane &) const
+	?DisplaySendMenuL@CLmkSender@@QBEXAAVCEikMenuPane@@HH@Z @ 18 NONAME ; void CLmkSender::DisplaySendMenuL(class CEikMenuPane &, int, int) const
+	?ExecuteLD@CLmkEditorImpl@@QAEHXZ @ 19 NONAME ; int CLmkEditorImpl::ExecuteLD(void)
+	?GenericMessageQueryL@LmkNotes@@SAHPAVCEikonEnv@@HH@Z @ 20 NONAME ; int LmkNotes::GenericMessageQueryL(class CEikonEnv *, int, int)
+	?GetFileWithCorrectDriveL@CLmkUiUtils@@SAXAAV?$TBuf@$0BAA@@@@Z @ 21 NONAME ; void CLmkUiUtils::GetFileWithCorrectDriveL(class TBuf<256> &)
+	?GetLandmarkFromMapForCategoryL@CLmkMapNavigationInterface@@QAEXHK@Z @ 22 NONAME ; void CLmkMapNavigationInterface::GetLandmarkFromMapForCategoryL(int, unsigned long)
+	?GetLandmarkFromMapL@CLmkMapNavigationInterface@@QAEXH@Z @ 23 NONAME ; void CLmkMapNavigationInterface::GetLandmarkFromMapL(int)
+	?GetServiceCmdByMenuCmd@CLmkMapNavigationInterface@@QAEHH@Z @ 24 NONAME ; int CLmkMapNavigationInterface::GetServiceCmdByMenuCmd(int)
+	?HandleMenuOperationL@CLmkMapNavigationInterface@@QAEHHPAVCEikMenuPane@@H@Z @ 25 NONAME ; int CLmkMapNavigationInterface::HandleMenuOperationL(int, class CEikMenuPane *, int)
+	?HandleNotifyL@CLmkMapNavigationInterface@@UAEHHHAAVCAiwGenericParamList@@ABV2@@Z @ 26 NONAME ; int CLmkMapNavigationInterface::HandleNotifyL(int, int, class CAiwGenericParamList &, class CAiwGenericParamList const &)
+	?InformationNoteL@LmkNotes@@SAXPAVCEikonEnv@@H@Z @ 27 NONAME ; void LmkNotes::InformationNoteL(class CEikonEnv *, int)
+	?InformationNotewithTextL@LmkNotes@@SAXPAVCEikonEnv@@HVTPtrC16@@@Z @ 28 NONAME ; void LmkNotes::InformationNotewithTextL(class CEikonEnv *, int, class TPtrC16)
+	?IsCriteriaUnCategorizedCat@CLmkAppLmSelectorImpl@@QAEHXZ @ 29 NONAME ; int CLmkAppLmSelectorImpl::IsCriteriaUnCategorizedCat(void)
+	?IsPredefinedCategoryL@CLmkAppCategorySettingsImpl@@QAEHXZ @ 30 NONAME ; int CLmkAppCategorySettingsImpl::IsPredefinedCategoryL(void)
+	?LandmarkConfirmationQueryL@LmkNotes@@SAHPAVCEikonEnv@@H@Z @ 31 NONAME ; int LmkNotes::LandmarkConfirmationQueryL(class CEikonEnv *, int)
+	?LandmarkInCategoryEmptyNoteL@LmkNotes@@SAXPAVCEikonEnv@@VTPtrC16@@1@Z @ 32 NONAME ; void LmkNotes::LandmarkInCategoryEmptyNoteL(class CEikonEnv *, class TPtrC16, class TPtrC16)
+	?LandmarksEmptyNoteL@LmkNotes@@SAXPAVCEikonEnv@@VTPtrC16@@@Z @ 33 NONAME ; void LmkNotes::LandmarksEmptyNoteL(class CEikonEnv *, class TPtrC16)
+	?LaunchPosSettingsL@CLmkAppLmItemSelectorImpl@@IAEXXZ @ 34 NONAME ; void CLmkAppLmItemSelectorImpl::LaunchPosSettingsL(void)
+	?MarkedIndexes@CLmkAppSelectorImplBase@@QAEPBV?$CArrayFix@H@@XZ @ 35 NONAME ; class CArrayFix<int> const * CLmkAppSelectorImplBase::MarkedIndexes(void)
+	?MemorizedItemId@CLmkLmItemListMemento@@QBEKXZ @ 36 NONAME ; unsigned long CLmkLmItemListMemento::MemorizedItemId(void) const
+	?MessageQueryL@LmkNotes@@SAXPAVCEikonEnv@@AAVTDes16@@H@Z @ 37 NONAME ; void LmkNotes::MessageQueryL(class CEikonEnv *, class TDes16 &, int)
+	?MessageQueryWithLinkL@LmkNotes@@SAHPAVCEikonEnv@@HHHVTCallBack@@@Z @ 38 NONAME ; int LmkNotes::MessageQueryWithLinkL(class CEikonEnv *, int, int, int, class TCallBack)
+	?NavigateToLandmarkL@CLmkMapNavigationInterface@@QAEXPAVCPosLandmark@@H@Z @ 39 NONAME ; void CLmkMapNavigationInterface::NavigateToLandmarkL(class CPosLandmark *, int)
+	?NewL@CLmkAppCategorySelectorImpl@@SAPAV1@AAVCPosLandmarkDatabase@@AAVCLmkSender@@H@Z @ 40 NONAME ; class CLmkAppCategorySelectorImpl * CLmkAppCategorySelectorImpl::NewL(class CPosLandmarkDatabase &, class CLmkSender &, int)
+	?NewL@CLmkAppCategorySettingsImpl@@SAPAV1@AAVCPosLandmarkDatabase@@AAVCLmkSender@@H@Z @ 41 NONAME ; class CLmkAppCategorySettingsImpl * CLmkAppCategorySettingsImpl::NewL(class CPosLandmarkDatabase &, class CLmkSender &, int)
+	?NewL@CLmkAppLmSelectorImpl@@SAPAV1@AAVCPosLandmarkDatabase@@AAVCLmkSender@@H@Z @ 42 NONAME ; class CLmkAppLmSelectorImpl * CLmkAppLmSelectorImpl::NewL(class CPosLandmarkDatabase &, class CLmkSender &, int)
+	?NewL@CLmkAppLmSelectorImpl@@SAPAV1@AAVCPosLandmarkDatabase@@ABVMLmkListMemento@@AAVCLmkSender@@H@Z @ 43 NONAME ; class CLmkAppLmSelectorImpl * CLmkAppLmSelectorImpl::NewL(class CPosLandmarkDatabase &, class MLmkListMemento const &, class CLmkSender &, int)
+	?NewL@CLmkCallCmd@@SAPAV1@XZ @ 44 NONAME ; class CLmkCallCmd * CLmkCallCmd::NewL(void)
+	?NewL@CLmkDlgCategorySelectorImpl@@SAPAV1@AAVCPosLandmarkDatabase@@HH@Z @ 45 NONAME ; class CLmkDlgCategorySelectorImpl * CLmkDlgCategorySelectorImpl::NewL(class CPosLandmarkDatabase &, int, int)
+	?NewL@CLmkDlgCombiSelectorImpl@@SAPAV1@AAVCPosLandmarkDatabase@@@Z @ 46 NONAME ; class CLmkDlgCombiSelectorImpl * CLmkDlgCombiSelectorImpl::NewL(class CPosLandmarkDatabase &)
+	?NewL@CLmkDlgLmSelectorImpl@@SAPAV1@AAVCPosLandmarkDatabase@@@Z @ 47 NONAME ; class CLmkDlgLmSelectorImpl * CLmkDlgLmSelectorImpl::NewL(class CPosLandmarkDatabase &)
+	?NewL@CLmkDlgLmSelectorImpl@@SAPAV1@AAVCPosLandmarkDatabase@@PAVCPosLmSearchCriteria@@@Z @ 48 NONAME ; class CLmkDlgLmSelectorImpl * CLmkDlgLmSelectorImpl::NewL(class CPosLandmarkDatabase &, class CPosLmSearchCriteria *)
+	?NewL@CLmkDlgPackageSelectorImpl@@SAPAV1@AAVCPosLandmarkDatabase@@AAVCLmkParser@@AAVCLmkSender@@@Z @ 49 NONAME ; class CLmkDlgPackageSelectorImpl * CLmkDlgPackageSelectorImpl::NewL(class CPosLandmarkDatabase &, class CLmkParser &, class CLmkSender &)
+	?NewL@CLmkEditorImpl@@SAPAV1@AAVCPosLandmarkDatabase@@AAVCLmkSender@@KHK@Z @ 50 NONAME ; class CLmkEditorImpl * CLmkEditorImpl::NewL(class CPosLandmarkDatabase &, class CLmkSender &, unsigned long, int, unsigned long)
+	?NewL@CLmkEditorImpl@@SAPAV1@AAVCPosLandmarkDatabase@@AAVCLmkSender@@KHPAKPAVCPosLandmark@@@Z @ 51 NONAME ; class CLmkEditorImpl * CLmkEditorImpl::NewL(class CPosLandmarkDatabase &, class CLmkSender &, unsigned long, int, unsigned long *, class CPosLandmark *)
+	?NewL@CLmkEditorImpl@@SAPAV1@AAVCPosLandmarkDatabase@@AAVCLmkSender@@KHPAVCPosLandmark@@@Z @ 52 NONAME ; class CLmkEditorImpl * CLmkEditorImpl::NewL(class CPosLandmarkDatabase &, class CLmkSender &, unsigned long, int, class CPosLandmark *)
+	?NewL@CLmkGoToURLCmd@@SAPAV1@XZ @ 53 NONAME ; class CLmkGoToURLCmd * CLmkGoToURLCmd::NewL(void)
+	?NewL@CLmkMapNavigationInterface@@SAPAV1@AAVCPosLandmarkDatabase@@@Z @ 54 NONAME ; class CLmkMapNavigationInterface * CLmkMapNavigationInterface::NewL(class CPosLandmarkDatabase &)
+	?NewL@CLmkPackageEditorImpl@@SAPAV1@AAVCPosLandmarkDatabase@@AAVCLmkParser@@AAVCLmkSender@@H@Z @ 55 NONAME ; class CLmkPackageEditorImpl * CLmkPackageEditorImpl::NewL(class CPosLandmarkDatabase &, class CLmkParser &, class CLmkSender &, int)
+	?NewL@CLmkSaveLandmarkUtils@@SAPAV1@AAVCPosLandmarkDatabase@@AAVCLmkParser@@@Z @ 56 NONAME ; class CLmkSaveLandmarkUtils * CLmkSaveLandmarkUtils::NewL(class CPosLandmarkDatabase &, class CLmkParser &)
+	?NewL@CLmkSender@@SAPAV1@AAVCPosLandmarkDatabase@@@Z @ 57 NONAME ; class CLmkSender * CLmkSender::NewL(class CPosLandmarkDatabase &)
+	?OutOfMemoryNoteL@LmkNotes@@SAXPAVCEikonEnv@@@Z @ 58 NONAME ; void LmkNotes::OutOfMemoryNoteL(class CEikonEnv *)
+	?Release@CLmkMapNavigationInterface@@QAEXXZ @ 59 NONAME ; void CLmkMapNavigationInterface::Release(void)
+	?RemoveLandmarksFromCategoryL@CLmkAppLmSelectorImpl@@QAEXXZ @ 60 NONAME ; void CLmkAppLmSelectorImpl::RemoveLandmarksFromCategoryL(void)
+	?RestoreMemento@CLmkAppSelectorImplBase@@QAEXXZ @ 61 NONAME ; void CLmkAppSelectorImplBase::RestoreMemento(void)
+	?SetHelpContext@CLmkEditorImpl@@QAEXVTCoeHelpContext@@@Z @ 62 NONAME ; void CLmkEditorImpl::SetHelpContext(class TCoeHelpContext)
+	?SetMemento@CLmkSelectorImplBase@@QAEXAAVMLmkListMemento@@@Z @ 63 NONAME ; void CLmkSelectorImplBase::SetMemento(class MLmkListMemento &)
+	?SetMopParent@CLmkDlgSelectorImplBase@@QAEXPAVMObjectProvider@@@Z @ 64 NONAME ; void CLmkDlgSelectorImplBase::SetMopParent(class MObjectProvider *)
+	?SetMopParent@CLmkEditorImpl@@QAEXPAVMObjectProvider@@@Z @ 65 NONAME ; void CLmkEditorImpl::SetMopParent(class MObjectProvider *)
+	?SetMskObserver@CLmkAppSelectorImplBase@@QAEXPAVMLmkMskObserver@@@Z @ 66 NONAME ; void CLmkAppSelectorImplBase::SetMskObserver(class MLmkMskObserver *)
+	?SetObserver@CLmkMapNavigationInterface@@QAEXPAVMLmkMapAndNavigationObserver@@@Z @ 67 NONAME ; void CLmkMapNavigationInterface::SetObserver(class MLmkMapAndNavigationObserver *)
+	?ShowCategoryOnMapL@CLmkMapNavigationInterface@@QAEXKHW4EViewType@1@@Z @ 68 NONAME ; void CLmkMapNavigationInterface::ShowCategoryOnMapL(unsigned long, int, enum CLmkMapNavigationInterface::EViewType)
+	?ShowDelayedInfoPopupL@LmkNotes@@SAPAVCAknInfoPopupNoteController@@AAVTDesC16@@AAVTPoint@@@Z @ 69 NONAME ; class CAknInfoPopupNoteController * LmkNotes::ShowDelayedInfoPopupL(class TDesC16 &, class TPoint &)
+	?ShowLandmarksOnMapL@CLmkMapNavigationInterface@@QAEXAAV?$RPointerArray@VCPosLandmark@@@@HW4EViewType@1@@Z @ 70 NONAME ; void CLmkMapNavigationInterface::ShowLandmarksOnMapL(class RPointerArray<class CPosLandmark> &, int, enum CLmkMapNavigationInterface::EViewType)
+	?ShowOwerriteLocationQueryL@LmkNotes@@SAHPAVCEikonEnv@@@Z @ 71 NONAME ; int LmkNotes::ShowOwerriteLocationQueryL(class CEikonEnv *)
+	?StoreMemento@CLmkAppSelectorImplBase@@QAEXXZ @ 72 NONAME ; void CLmkAppSelectorImplBase::StoreMemento(void)
+	?StartSearchingLandmarksL@CLmkAppLmSelectorImpl@@QAEXABVTDesC16@@H@Z @ 73 NONAME ; void CLmkAppLmSelectorImpl::StartSearchingLandmarksL(class TDesC16 const &, int)
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/uicontrols/bwins/LMKUIUu.def	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,63 @@
+EXPORTS
+	??1CLmkMapNavigationInterface@@UAE@XZ @ 1 NONAME ; CLmkMapNavigationInterface::~CLmkMapNavigationInterface(void)
+	?AllLandmarksEmptyNoteL@LmkNotes@@SAXXZ @ 2 NONAME ; void LmkNotes::AllLandmarksEmptyNoteL(void)
+	?AttachAIWInterestL@CLmkMapNavigationInterface@@QAEXHH@Z @ 3 NONAME ; void CLmkMapNavigationInterface::AttachAIWInterestL(int, int)
+	?AttachMenuPaneL@CLmkMapNavigationInterface@@QAEXPAVCEikMenuPane@@HH@Z @ 4 NONAME ; void CLmkMapNavigationInterface::AttachMenuPaneL(class CEikMenuPane *, int, int)
+	?CategoryConfirmationQueryL@LmkNotes@@SAHH@Z @ 5 NONAME ; int LmkNotes::CategoryConfirmationQueryL(int)
+	?CategoryEmptyNoteL@LmkNotes@@SAXVTPtrC16@@@Z @ 6 NONAME ; void LmkNotes::CategoryEmptyNoteL(class TPtrC16)
+	?CategoryNameL@CLmkAppLmSelectorImpl@@QAE?AVTPtrC16@@XZ @ 7 NONAME ; class TPtrC16 CLmkAppLmSelectorImpl::CategoryNameL(void)
+	?CategoryNameQueryL@LmkNotes@@SAHAAVTDes16@@H@Z @ 8 NONAME ; int LmkNotes::CategoryNameQueryL(class TDes16 &, int)
+	?ChangeLmNameLabelIconL@CLmkUiUtils@@SAXAAVMLmkEditorUiBuilder@@AAVMLmkFieldData@@@Z @ 9 NONAME ; void CLmkUiUtils::ChangeLmNameLabelIconL(class MLmkEditorUiBuilder &, class MLmkFieldData &)
+	?ChangeTitlePaneL@CLmkUiUtils@@SAXH@Z @ 10 NONAME ; void CLmkUiUtils::ChangeTitlePaneL(int)
+	?ChangeTitlePaneL@CLmkUiUtils@@SAXPAVHBufC16@@@Z @ 11 NONAME ; void CLmkUiUtils::ChangeTitlePaneL(class HBufC16 *)
+	?CreateFindBoxL@CLmkAppSelectorImplBase@@QAEPAVCAknSearchField@@ABVCCoeControl@@@Z @ 12 NONAME ; class CAknSearchField * CLmkAppSelectorImplBase::CreateFindBoxL(class CCoeControl const &)
+	?CurrentCategoryId@CLmkAppCategorySelectorImpl@@QAEHXZ @ 13 NONAME ; int CLmkAppCategorySelectorImpl::CurrentCategoryId(void)
+	?DetachInterestL@CLmkMapNavigationInterface@@QAEXHH@Z @ 14 NONAME ; void CLmkMapNavigationInterface::DetachInterestL(int, int)
+	?DisableMapAndNavigationMenuOptions@CLmkEditorImpl@@QAEXXZ @ 15 NONAME ; void CLmkEditorImpl::DisableMapAndNavigationMenuOptions(void)
+	?DisplaySendCascadeMenuL@CLmkSender@@QBEXAAVCEikMenuPane@@@Z @ 16 NONAME ; void CLmkSender::DisplaySendCascadeMenuL(class CEikMenuPane &) const
+	?DisplaySendMenuL@CLmkSender@@QBEXAAVCEikMenuPane@@HH@Z @ 17 NONAME ; void CLmkSender::DisplaySendMenuL(class CEikMenuPane &, int, int) const
+	?ExecuteLD@CLmkEditorImpl@@QAEHXZ @ 18 NONAME ; int CLmkEditorImpl::ExecuteLD(void)
+	?GetFileWithCorrectDriveL@CLmkUiUtils@@SAXAAV?$TBuf@$0BAA@@@@Z @ 19 NONAME ; void CLmkUiUtils::GetFileWithCorrectDriveL(class TBuf<256> &)
+	?GetLandmarkFromMapForCategoryL@CLmkMapNavigationInterface@@QAEXHK@Z @ 20 NONAME ; void CLmkMapNavigationInterface::GetLandmarkFromMapForCategoryL(int, unsigned long)
+	?GetLandmarkFromMapL@CLmkMapNavigationInterface@@QAEXH@Z @ 21 NONAME ; void CLmkMapNavigationInterface::GetLandmarkFromMapL(int)
+	?GetServiceCmdByMenuCmd@CLmkMapNavigationInterface@@QAEHH@Z @ 22 NONAME ; int CLmkMapNavigationInterface::GetServiceCmdByMenuCmd(int)
+	?HandleMenuOperationL@CLmkMapNavigationInterface@@QAEHHPAVCEikMenuPane@@H@Z @ 23 NONAME ; int CLmkMapNavigationInterface::HandleMenuOperationL(int, class CEikMenuPane *, int)
+	?HandleNotifyL@CLmkMapNavigationInterface@@UAEHHHAAVCAiwGenericParamList@@ABV2@@Z @ 24 NONAME ; int CLmkMapNavigationInterface::HandleNotifyL(int, int, class CAiwGenericParamList &, class CAiwGenericParamList const &)
+	?InformationNoteL@LmkNotes@@SAXH@Z @ 25 NONAME ; void LmkNotes::InformationNoteL(int)
+	?InformationNotewithTextL@LmkNotes@@SAXHVTPtrC16@@@Z @ 26 NONAME ; void LmkNotes::InformationNotewithTextL(int, class TPtrC16)
+	?IsPredefinedCategoryL@CLmkAppCategorySettingsImpl@@QAEHXZ @ 27 NONAME ; int CLmkAppCategorySettingsImpl::IsPredefinedCategoryL(void)
+	?LandmarkConfirmationQueryL@LmkNotes@@SAHH@Z @ 28 NONAME ; int LmkNotes::LandmarkConfirmationQueryL(int)
+	?LandmarkInCategoryEmptyNoteL@LmkNotes@@SAXVTPtrC16@@0@Z @ 29 NONAME ; void LmkNotes::LandmarkInCategoryEmptyNoteL(class TPtrC16, class TPtrC16)
+	?LandmarksEmptyNoteL@LmkNotes@@SAXVTPtrC16@@@Z @ 30 NONAME ; void LmkNotes::LandmarksEmptyNoteL(class TPtrC16)
+	?MemorizedItemId@CLmkLmItemListMemento@@QBEKXZ @ 31 NONAME ; unsigned long CLmkLmItemListMemento::MemorizedItemId(void) const
+	?MessageQueryL@LmkNotes@@SAXAAVTDes16@@H@Z @ 32 NONAME ; void LmkNotes::MessageQueryL(class TDes16 &, int)
+	?NavigateToLandmarkL@CLmkMapNavigationInterface@@QAEXPAVCPosLandmark@@H@Z @ 33 NONAME ; void CLmkMapNavigationInterface::NavigateToLandmarkL(class CPosLandmark *, int)
+	?NewL@CLmkAppCategorySelectorImpl@@SAPAV1@AAVCPosLandmarkDatabase@@AAVCLmkSender@@H@Z @ 34 NONAME ; class CLmkAppCategorySelectorImpl * CLmkAppCategorySelectorImpl::NewL(class CPosLandmarkDatabase &, class CLmkSender &, int)
+	?NewL@CLmkAppCategorySettingsImpl@@SAPAV1@AAVCPosLandmarkDatabase@@AAVCLmkSender@@H@Z @ 35 NONAME ; class CLmkAppCategorySettingsImpl * CLmkAppCategorySettingsImpl::NewL(class CPosLandmarkDatabase &, class CLmkSender &, int)
+	?NewL@CLmkAppLmSelectorImpl@@SAPAV1@AAVCPosLandmarkDatabase@@AAVCLmkSender@@H@Z @ 36 NONAME ; class CLmkAppLmSelectorImpl * CLmkAppLmSelectorImpl::NewL(class CPosLandmarkDatabase &, class CLmkSender &, int)
+	?NewL@CLmkAppLmSelectorImpl@@SAPAV1@AAVCPosLandmarkDatabase@@ABVMLmkListMemento@@AAVCLmkSender@@H@Z @ 37 NONAME ; class CLmkAppLmSelectorImpl * CLmkAppLmSelectorImpl::NewL(class CPosLandmarkDatabase &, class MLmkListMemento const &, class CLmkSender &, int)
+	?NewL@CLmkCallCmd@@SAPAV1@XZ @ 38 NONAME ; class CLmkCallCmd * CLmkCallCmd::NewL(void)
+	?NewL@CLmkDlgCategorySelectorImpl@@SAPAV1@AAVCPosLandmarkDatabase@@HH@Z @ 39 NONAME ; class CLmkDlgCategorySelectorImpl * CLmkDlgCategorySelectorImpl::NewL(class CPosLandmarkDatabase &, int, int)
+	?NewL@CLmkDlgCombiSelectorImpl@@SAPAV1@AAVCPosLandmarkDatabase@@@Z @ 40 NONAME ; class CLmkDlgCombiSelectorImpl * CLmkDlgCombiSelectorImpl::NewL(class CPosLandmarkDatabase &)
+	?NewL@CLmkDlgLmSelectorImpl@@SAPAV1@AAVCPosLandmarkDatabase@@@Z @ 41 NONAME ; class CLmkDlgLmSelectorImpl * CLmkDlgLmSelectorImpl::NewL(class CPosLandmarkDatabase &)
+	?NewL@CLmkDlgLmSelectorImpl@@SAPAV1@AAVCPosLandmarkDatabase@@PAVCPosLmSearchCriteria@@@Z @ 42 NONAME ; class CLmkDlgLmSelectorImpl * CLmkDlgLmSelectorImpl::NewL(class CPosLandmarkDatabase &, class CPosLmSearchCriteria *)
+	?NewL@CLmkDlgPackageSelectorImpl@@SAPAV1@AAVCPosLandmarkDatabase@@AAVCLmkParser@@AAVCLmkSender@@@Z @ 43 NONAME ; class CLmkDlgPackageSelectorImpl * CLmkDlgPackageSelectorImpl::NewL(class CPosLandmarkDatabase &, class CLmkParser &, class CLmkSender &)
+	?NewL@CLmkEditorImpl@@SAPAV1@AAVCPosLandmarkDatabase@@AAVCLmkSender@@KHK@Z @ 44 NONAME ; class CLmkEditorImpl * CLmkEditorImpl::NewL(class CPosLandmarkDatabase &, class CLmkSender &, unsigned long, int, unsigned long)
+	?NewL@CLmkEditorImpl@@SAPAV1@AAVCPosLandmarkDatabase@@AAVCLmkSender@@KHPAKPAVCPosLandmark@@@Z @ 45 NONAME ; class CLmkEditorImpl * CLmkEditorImpl::NewL(class CPosLandmarkDatabase &, class CLmkSender &, unsigned long, int, unsigned long *, class CPosLandmark *)
+	?NewL@CLmkEditorImpl@@SAPAV1@AAVCPosLandmarkDatabase@@AAVCLmkSender@@KHPAVCPosLandmark@@@Z @ 46 NONAME ; class CLmkEditorImpl * CLmkEditorImpl::NewL(class CPosLandmarkDatabase &, class CLmkSender &, unsigned long, int, class CPosLandmark *)
+	?NewL@CLmkGoToURLCmd@@SAPAV1@XZ @ 47 NONAME ; class CLmkGoToURLCmd * CLmkGoToURLCmd::NewL(void)
+	?NewL@CLmkMapNavigationInterface@@SAPAV1@AAVCPosLandmarkDatabase@@W4EViewType@1@@Z @ 48 NONAME ; class CLmkMapNavigationInterface * CLmkMapNavigationInterface::NewL(class CPosLandmarkDatabase &, enum CLmkMapNavigationInterface::EViewType)
+	?NewL@CLmkPackageEditorImpl@@SAPAV1@AAVCPosLandmarkDatabase@@AAVCLmkParser@@AAVCLmkSender@@H@Z @ 49 NONAME ; class CLmkPackageEditorImpl * CLmkPackageEditorImpl::NewL(class CPosLandmarkDatabase &, class CLmkParser &, class CLmkSender &, int)
+	?NewL@CLmkSaveLandmarkUtils@@SAPAV1@AAVCPosLandmarkDatabase@@AAVCLmkParser@@@Z @ 50 NONAME ; class CLmkSaveLandmarkUtils * CLmkSaveLandmarkUtils::NewL(class CPosLandmarkDatabase &, class CLmkParser &)
+	?NewL@CLmkSender@@SAPAV1@AAVCPosLandmarkDatabase@@@Z @ 51 NONAME ; class CLmkSender * CLmkSender::NewL(class CPosLandmarkDatabase &)
+	?OutOfMemoryNoteL@LmkNotes@@SAXXZ @ 52 NONAME ; void LmkNotes::OutOfMemoryNoteL(void)
+	?RestoreMemento@CLmkAppSelectorImplBase@@QAEXXZ @ 53 NONAME ; void CLmkAppSelectorImplBase::RestoreMemento(void)
+	?SetHelpContext@CLmkEditorImpl@@QAEXVTCoeHelpContext@@@Z @ 54 NONAME ; void CLmkEditorImpl::SetHelpContext(class TCoeHelpContext)
+	?SetMemento@CLmkSelectorImplBase@@QAEXAAVMLmkListMemento@@@Z @ 55 NONAME ; void CLmkSelectorImplBase::SetMemento(class MLmkListMemento &)
+	?SetMopParent@CLmkDlgSelectorImplBase@@QAEXPAVMObjectProvider@@@Z @ 56 NONAME ; void CLmkDlgSelectorImplBase::SetMopParent(class MObjectProvider *)
+	?SetMopParent@CLmkEditorImpl@@QAEXPAVMObjectProvider@@@Z @ 57 NONAME ; void CLmkEditorImpl::SetMopParent(class MObjectProvider *)
+	?SetObserver@CLmkMapNavigationInterface@@QAEXPAVMLmkMapAndNavigationObserver@@@Z @ 58 NONAME ; void CLmkMapNavigationInterface::SetObserver(class MLmkMapAndNavigationObserver *)
+	?ShowCategoryOnMapL@CLmkMapNavigationInterface@@QAEXKH@Z @ 59 NONAME ; void CLmkMapNavigationInterface::ShowCategoryOnMapL(unsigned long, int)
+	?ShowLandmarksOnMapL@CLmkMapNavigationInterface@@QAEXAAV?$RPointerArray@VCPosLandmark@@@@H@Z @ 60 NONAME ; void CLmkMapNavigationInterface::ShowLandmarksOnMapL(class RPointerArray<class CPosLandmark> &, int)
+	?StoreMemento@CLmkAppSelectorImplBase@@QAEXXZ @ 61 NONAME ; void CLmkAppSelectorImplBase::StoreMemento(void)
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/uicontrols/data/LmkEditor.rss	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,905 @@
+/*
+* 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:    LandmarksUi Content File -    Contains the resources for LmkEditor.
+*
+*/
+
+
+
+
+
+
+
+//  INCLUDES
+#include <AiwCommon.hrh>
+#include <AiwCommon.rh>
+#include <AknFep.rsg>
+#include <eikctl.rsg>
+
+//----------------------------------------------------
+//   
+//    r_lmk_editor_menubar
+//
+//----------------------------------------------------
+//
+RESOURCE MENU_BAR r_lmk_editor_menubar
+    {
+    titles=
+        {
+        MENU_TITLE { menu_pane=r_lmk_editor_menu; txt=""; },	
+        MENU_TITLE { menu_pane=r_lmk_editor_main_menu; txt=""; }
+        
+        };
+    }
+    
+//----------------------------------------------------
+//   
+//    r_lmk_editor_menu
+//
+//----------------------------------------------------
+//
+RESOURCE MENU_PANE r_lmk_editor_main_menu
+    {
+    items=
+        {		
+		MENU_ITEM { command=EAknCmdHelp; txt=qtn_options_help; },
+		MENU_ITEM { command=EAknCmdExit; txt=qtn_options_exit; }
+        };
+    }
+
+//----------------------------------------------------
+//   
+//    r_lmk_editor_menu
+//
+//----------------------------------------------------
+//
+RESOURCE MENU_PANE r_lmk_editor_menu
+    {
+    items=
+        {	
+        MENU_ITEM { command=ELmkCmdEditLm; 
+					txt=qtn_lm_opt_edit_landmark; 
+				  },
+		MENU_ITEM { command=ELmkCmdSelectCategories; 
+					txt=qtn_lm_opt_select_categories;
+				  },
+		MENU_ITEM { command=ELmkCmdCategories; 
+					txt=qtn_lm_title_edit_categories; 
+				  },
+		MENU_ITEM { command=ELmkCmdCurrentLocation; 
+					txt=qtn_lm_editor_use_current; 
+				  },
+		MENU_ITEM { command=ELmkCmdDeleteLm; 
+					txt=qtn_lm_opt_delete_landmark; 
+				  },	
+        MENU_ITEM { command=ELmkCmdChangeIcon; 
+					txt=qtn_lm_opt_change_landmark_icon; 
+				  },
+		MENU_ITEM { command=ELmkCmdSaveLm; 
+					txt=qtn_lm_opt_save; 
+				  },
+	    MENU_ITEM { command = ELmkShowOnMapPlaceHolder;
+	    			txt ="";
+	    		  },
+	    MENU_ITEM { command = ELmkNavigateToPlaceHolder;
+	    		    txt ="";
+	    		  },				
+		MENU_ITEM { command=ELmkCmdSendDummy; 
+					txt = qtn_options_send_via; 
+				  },
+		MENU_ITEM { command=ELmkCmdClearPosInfo; 
+				    txt=qtn_lm_opt_clear_pos_info; 
+				  },
+		MENU_ITEM { command=ELmkCmdEditTextLm; 
+					txt = qtn_options_edit; 				  
+					cascade = R_AKNFEP_EDIT_SUBMENU;
+				  },
+        MENU_ITEM { command=ELmkCmdCall; 
+					txt=qtn_options_call; 
+				  },
+        MENU_ITEM { command=ELmkCmdGoToUrl; 
+				    txt=qtn_lm_opt_go_to_url; 
+				  }
+        };
+    }
+
+//----------------------------------------------------
+//   
+//    r_lmk_editor_dialog
+//
+//----------------------------------------------------
+//
+RESOURCE DIALOG r_lmk_editor_dialog
+    {
+    flags = EEikDialogFlagNoDrag | EEikDialogFlagNoTitleBar | 
+            EEikDialogFlagFillAppClientRect | EEikDialogFlagCbaButtons | 
+            EEikDialogFlagWait;
+    buttons = r_lmk_received_viewer_softkeys_options_done_contextoptions;
+    form = r_lmk_editor_form;
+    }
+
+//----------------------------------------------------
+//   
+//    r_lmk_viewer_dialog
+//
+//----------------------------------------------------
+//
+RESOURCE DIALOG r_lmk_viewer_dialog
+    {
+    flags = EEikDialogFlagNoDrag | EEikDialogFlagNoTitleBar | 
+            EEikDialogFlagFillAppClientRect | EEikDialogFlagCbaButtons | 
+            EEikDialogFlagWait;    
+    buttons =   r_lmk_received_viewer_softkeys_options_back_contextoptions;
+    form = r_lmk_editor_form;
+    }
+
+//----------------------------------------------------
+//   
+//    r_lmk_editor_form
+//
+//----------------------------------------------------
+//
+RESOURCE FORM r_lmk_editor_form
+    {
+	// dynamic form resource
+    flags = EEikFormShowBitmaps | 
+			EEikFormUseDoubleSpacedFormat;
+    } 
+
+//----------------------------------------------------
+//   
+//    r_lmk_name_label
+//
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_lmk_name_label
+    {
+    buf = qtn_lm_form_label_lm_name;
+    }
+
+//----------------------------------------------------
+//   
+//    r_lmk_category_label
+//
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_lmk_category_label
+    {
+    buf = qtn_lm_form_label_category;
+    }
+
+//----------------------------------------------------
+//   
+//    r_lmk_categories_label
+//
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_lmk_categories_label
+    {
+    buf = qtn_lm_form_label_categories;
+    }
+
+//----------------------------------------------------
+//   
+//    r_lmk_street_label
+//
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_lmk_street_label
+    {
+    buf = qtn_lm_form_label_street;
+    }
+
+//----------------------------------------------------
+//   
+//    r_lmk_city_label
+//
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_lmk_city_label
+    {
+    buf = qtn_lm_form_label_city;
+    }
+
+//----------------------------------------------------
+//   
+//    r_lmk_state_province_label
+//
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_lmk_state_province_label
+    {
+    buf = qtn_lm_form_label_state;
+    }
+
+//----------------------------------------------------
+//   
+//    r_lmk_country_label
+//
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_lmk_country_label
+    {
+    buf = qtn_lm_form_label_country;
+    }
+
+//----------------------------------------------------
+//   
+//    r_lmk_post_code_label
+//
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_lmk_post_code_label
+    {
+    buf = qtn_lm_form_label_postal_code;
+    }
+
+//----------------------------------------------------
+//   
+//    r_lmk_latitude_label
+//
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_lmk_latitude_label
+    {
+    buf = qtn_lm_form_label_latitude;
+    }
+
+//----------------------------------------------------
+//   
+//    r_lmk_longitude_label
+//
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_lmk_longitude_label
+    {
+    buf = qtn_lm_form_label_longitude;
+    }
+
+//----------------------------------------------------
+//   
+//    r_lmk_position_accuracy_label
+//
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_lmk_position_accuracy_label
+    {
+    buf = qtn_lm_form_label_horiz_accuracy;
+    }
+
+//----------------------------------------------------
+//   
+//    r_lmk_altitude_label
+//
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_lmk_altitude_label
+    {
+    buf = qtn_lm_form_label_altitude;
+    }
+
+//----------------------------------------------------
+//   
+//    r_lmk_altitude_accuracy_label
+//
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_lmk_altitude_accuracy_label
+    {
+    buf = qtn_lm_form_label_vert_accuracy;
+    }
+    
+//----------------------------------------------------
+//   
+//    r_lmk_description_label
+//
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_lmk_description_label
+    {
+    buf = qtn_lm_form_label_description;
+    }
+       
+//----------------------------------------------------
+//   
+//    r_lmk_phone_number_label
+//
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_lmk_phone_number_label
+    {
+    buf = qtn_lm_form_label_phone;
+    }
+            
+//----------------------------------------------------
+//   
+//    r_lmk_web_address_label
+//
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_lmk_web_address_label
+    {
+    buf = qtn_lm_form_label_url;
+    }
+        
+//----------------------------------------------------
+//   
+//    r_lmk_empty_landmark_name_note
+//	  Information note
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_lmk_empty_landmark_name_note
+    {
+    buf = qtn_lm_note_enter_lm_name;
+    }
+
+//----------------------------------------------------
+//   
+//    r_lmk_categories_list_format
+//	  Format string
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_lmk_categories_list_format
+    {
+    buf = qtn_lm_multiple_categories;
+    }
+
+//----------------------------------------------------
+//   
+//    r_lmk_categories_popup_title
+//	  Categories popup title
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_lmk_categories_popup_title
+    {
+    buf = qtn_lm_title_categories;
+    }
+
+//----------------------------------------------------
+//   
+//    r_lmk_service_rule_name
+//    Logical service rule name
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_lmk_service_rule_name
+    {
+    buf = qtn_lm_service_rule_name;
+    }
+
+//----------------------------------------------------
+//   
+//    r_lmk_distance_editor_type_m
+//    Distance editor's type
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_lmk_distance_editor_type_m
+    {
+    buf = qtn_lm_distance_editor_meter;
+    }
+
+//----------------------------------------------------
+//   
+//    r_lmk_distance_editor_type_km
+//    Distance editor's type
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_lmk_distance_editor_type_km
+    {
+    buf = qtn_lm_distance_editor_kilometer;
+    }
+
+//----------------------------------------------------
+//   
+//    r_lmk_distance_editor_type_ft
+//    Distance editor's type
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_lmk_distance_editor_type_ft
+    {
+    buf = qtn_lm_distance_editor_foot;
+    }
+
+//----------------------------------------------------
+//   
+//    r_lmk_distance_editor_type_mi
+//    Distance editor's type
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_lmk_distance_editor_type_mi
+    {
+    buf = qtn_lm_distance_editor_mile;
+    }
+
+//----------------------------------------------------
+//   
+//    r_lmk_cardinal_point_n
+//    Editor's cardinal point 
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_lmk_cardinal_point_n
+    {
+    buf = qtn_lm_latitude_editor_north;
+    }
+
+//----------------------------------------------------
+//   
+//    r_lmk_cardinal_point_s
+//    Editor's cardinal point 
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_lmk_cardinal_point_s
+    {
+    buf = qtn_lm_latitude_editor_south;
+    }
+
+//----------------------------------------------------
+//   
+//    r_lmk_cardinal_point_w
+//    Editor's cardinal point 
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_lmk_cardinal_point_w
+    {
+    buf = qtn_lm_longitude_editor_west;
+    }
+
+//----------------------------------------------------
+//   
+//    r_lmk_cardinal_point_e
+//    Editor's cardinal point 
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_lmk_cardinal_point_e
+    {
+    buf = qtn_lm_longitude_editor_east;
+    }
+
+//----------------------------------------------------
+//   
+//    r_lmk_degree_mark
+//    Editor's degree mark
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_lmk_degree_mark
+    {
+    buf = qtn_lm_coordinate_editor_degree;
+    }
+
+//----------------------------------------------------
+//   
+//    r_lmk_location_retry_query
+//    Location request Retry query
+//
+//----------------------------------------------------
+//
+RESOURCE DIALOG r_lmk_location_retry_query
+  {
+  flags = EGeneralQueryFlags;
+  buttons = R_AVKON_SOFTKEYS_YES_NO;
+  items =
+    {
+    DLG_LINE
+      {
+      type = EAknCtQuery;
+      id = EGeneralQuery;
+      control = AVKON_CONFIRMATION_QUERY
+        {       		
+		layout = EConfirmationQueryLayout;	
+		label=qtn_lm_conf_retry_location_request;
+		};
+      }
+    };
+  }
+
+//----------------------------------------------------
+//   r_lmk_categories_query_prmopt
+//    
+//    
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_lmk_categories_query_prompt
+    {
+    buf = qtn_lm_categories_query_prompt;
+    }
+
+//----------------------------------------------------
+//   
+//    r_lmk_message_query_dialog
+//
+//
+//----------------------------------------------------
+//
+RESOURCE DIALOG r_lmk_message_query_dialog
+    {
+    flags = EGeneralQueryFlags | EEikDialogFlagNoBorder | EEikDialogFlagNoShadow;
+    buttons = R_AVKON_SOFTKEYS_OK_EMPTY;
+    items=
+        {
+        DLG_LINE
+            {
+            type = EAknCtPopupHeadingPane;
+            id = EAknMessageQueryHeaderId;
+            control = AVKON_HEADING
+                {
+                label = qtn_lm_categories_query_prompt;
+                headinglayout = R_AVKON_WML_SIGN_QUERY_HEADING_PANE;
+                };
+            },
+        DLG_LINE
+            {
+            type = EAknCtMessageQuery;
+            id = EAknMessageQueryContentId;
+            control = AVKON_MESSAGE_QUERY
+                {
+                message = "";
+                };
+            }
+        };
+    }
+    
+//----------------------------------------------------
+//   
+//    r_lmk_editor_context_menubar
+//
+//----------------------------------------------------
+//
+RESOURCE MENU_BAR  r_lmk_editor_context_menubar
+    {
+    titles=
+        {
+        MENU_TITLE { menu_pane=r_lmk_editor_context_menu; txt=""; }
+        };
+    }
+
+//----------------------------------------------------
+//   
+//    r_lmk_editor_context_menu
+//    
+//
+//----------------------------------------------------
+//
+#if 0
+RESOURCE MENU_PANE r_lmk_editor_context_menu
+    {
+    items=
+        {       
+        MENU_ITEM { command = ELmkCmdEditLm; 
+					txt = qtn_form_litxt_edit; 
+				  },  
+				// This menu item will be replaced by AIW.
+				//MENU_ITEM { command = KLmkAppAiwId; // The same ID than in interest.
+				//txt = ""; // Will be replaced by AIW (plugin).
+				//},				      
+        //MENU_ITEM { command=ELmkCmdCall; 
+				//	txt=qtn_options_call; 
+				//  },
+        MENU_ITEM { command=ELmkCmdGoToUrl; 
+					txt=qtn_wml_list_open; 
+				  }
+        };
+    } 
+        
+#endif 
+
+RESOURCE MENU_PANE r_lmk_editor_context_menu
+    {
+    items=
+        {       
+        MENU_ITEM { command = ELmkCmdEditLm; 
+					txt = qtn_form_litxt_edit; 
+				  }, 
+				// This menu item will be replaced by AIW.
+        MENU_ITEM { command = ELmkEditMenuAiwId; // The same ID than in interest.
+				  txt = qtn_options_call; // Will be replaced by AIW (plugin).
+				  cascade = r_lmk_editor_call_submenu; // Added submenu for AIW usage.			
+				}, 
+        MENU_ITEM { command=ELmkCmdGoToUrl; 
+					txt=qtn_options_open; 
+				  }
+        };
+    } 
+
+// -----------------------------------------------------------------------------
+//   
+//    r_lmk_editor_call_submenu
+//    
+//    The submenu where call menu options are put by AVKON.
+// -----------------------------------------------------------------------------
+//
+RESOURCE MENU_PANE r_lmk_editor_call_submenu
+    {
+    items =
+        {
+        // This menu item will be replaced by AIW.
+        MENU_ITEM 
+            { 
+            command = ELmkEditSubMenuAiwId; // The same ID than in interest.
+            txt = ""; // Will be replaced by AIW (plugin).
+            }
+        };
+    }
+
+
+// -----------------------------------------------------------------------------
+//   
+//    r_lmk_editor_aiw_interest
+//
+// -----------------------------------------------------------------------------
+//
+RESOURCE AIW_INTEREST r_lmk_editor_aiw_interest
+    {
+    items=
+        {
+        // This application is interested in calling from menu.
+        AIW_CRITERIA_ITEM      
+            {
+            // Some unique id in this RSS, by default use KaiwCmdCall.
+            id              = ELmkEditSubMenuAiwId;
+            serviceCmd      = KAiwCmdCall;
+            serviceClass    = KAiwClassMenu;
+            contentType     = "*";
+            defaultProvider = 0x101F868E;
+            maxProviders    = 1;
+            }
+        };
+    } 
+
+//----------------------------------------------------
+//   
+//    r_lmk_aiw_interest_showonmap
+//    AIW interest for option show on map
+//
+//----------------------------------------------------
+//
+RESOURCE AIW_INTEREST r_lmk_editor_aiw_interest_showonmap
+    {
+    items =
+        {
+        AIW_CRITERIA_ITEM
+            {
+            id = ELmkShowOnMapPlaceHolder;
+            serviceCmd = KAiwCmdMnShowMap;
+            contentType = "application/x-landmark";
+            serviceClass = KAiwClassMenu;
+            }
+        };
+    }
+
+//----------------------------------------------------
+//   
+//    r_lmk_aiw_interest_navigateto
+//    AIW interest for option navigate to
+//
+//----------------------------------------------------
+//
+RESOURCE AIW_INTEREST r_lmk_editor_aiw_interest_navigateto
+    {
+    items =
+        {
+        AIW_CRITERIA_ITEM
+            {
+            id = ELmkNavigateToPlaceHolder;
+            serviceCmd = KAiwCmdMnNavigateTo;
+            contentType = "application/x-landmark";
+            serviceClass = KAiwClassMenu;
+            }
+        };
+    }
+
+//----------------------------------------------------
+//   
+//    r_lm_msk_show
+//    Show MSK string
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_lm_msk_show
+    {
+	buf = qtn_msk_lm_show;
+    }
+
+//----------------------------------------------------
+//   
+//    r_lm_msk_call
+//    Call MSK string
+//----------------------------------------------------
+//
+RESOURCE TBUF r_lm_msk_call
+    {
+	buf = qtn_msk_lm_call;
+    }
+//----------------------------------------------------
+//   
+//    r_lm_msk_browse
+//    Browse MSK string
+//
+//----------------------------------------------------
+//    
+RESOURCE TBUF r_lm_msk_browse
+    {
+	buf = qtn_msk_lm_browse;
+    }   
+//----------------------------------------------------
+//   
+//    r_lm_msk_edit
+//    Edit MSK string
+//
+//----------------------------------------------------
+//    
+RESOURCE TBUF r_lm_msk_edit
+    {
+	buf = qtn_msk_edit;
+    }   
+//----------------------------------------------------
+//   
+//    r_lm_query_editor_replace
+//    Landmark’s coordinate data will be replaced. Proceed?
+//
+//----------------------------------------------------
+//    
+RESOURCE TBUF r_lm_query_editor_replace
+    {
+	buf = qtn_lm_query_editor_replace;
+    }   
+
+//----------------------------------------------------
+//   
+//    r_lmk_received_viewer_softkeys_options_back_contextoptions
+//    Context menu option for Landmarks viewer
+//
+//----------------------------------------------------
+//    
+RESOURCE CBA r_lmk_received_viewer_softkeys_options_back_contextoptions
+    {
+    buttons =
+        {
+        CBA_BUTTON {id=EAknSoftkeyOptions; txt = text_softkey_option;},
+        CBA_BUTTON {id=EAknSoftkeyBack; txt = text_softkey_back; },
+        CBA_BUTTON {id=EAknSoftkeyContextOptions; txt = text_softkey_option;}
+        };
+    }
+ //----------------------------------------------------
+//   
+//    r_lmk_received_viewer_softkeys_options_done_contextoptions
+//    Currently this is a dummy context menu added to fix
+//    an error, where, when list item is empty,msk clicking
+//    pops up a menu, which is wrong, hence this fix.
+//
+//----------------------------------------------------
+//    
+RESOURCE CBA r_lmk_received_viewer_softkeys_options_done_contextoptions
+    {
+    buttons =
+        {
+        CBA_BUTTON {id=EAknSoftkeyOptions; txt = text_softkey_option;},
+        CBA_BUTTON {id=EAknSoftkeyDone; txt = text_softkey_done; },
+        CBA_BUTTON {id=EAknSoftkeyContextOptions; txt = text_softkey_option;}
+        };
+    }
+//----------------------------------------------------
+//   
+//    r_lmk_msgviewer_context_menubar
+//    Context menu bar for received Landmarks viewer
+//
+//----------------------------------------------------
+//        
+RESOURCE MENU_BAR r_lmk_msgviewer_context_menubar
+    {
+    titles=
+        {
+        MENU_TITLE { menu_pane=r_lmk_editor_menu; txt=""; }	
+        };
+    }
+//----------------------------------------------------
+//   
+//    r_lmk_msgviewer_context_menu
+//    Context menu option for received Landmarks viewer
+//
+//----------------------------------------------------
+//        
+RESOURCE MENU_PANE r_lmk_msgviewer_context_menu
+    {
+    items=
+        {       
+        MENU_ITEM { command = ELmkCmdEditLm; 
+					txt = qtn_form_litxt_edit; 
+				  }, 
+        MENU_ITEM { command=ELmkCmdGoToUrl; 
+					txt=qtn_options_open; 
+				  }
+        };
+    } 
+//----------------------------------------------------
+//   
+//    r_lmk_lat_editor
+//    Avkon's Latitude editor
+//
+//----------------------------------------------------
+//     
+RESOURCE LATITUDE_EDITOR r_lmk_lat_editor
+	{
+	flags = ELocationEdFlagLatitude;
+	latlongresourceid = R_EIK_LATITUDE_AND_LONGITUDE;
+	}
+//----------------------------------------------------
+//   
+//    r_lmk_long_editor
+//    Avkon's Longitude editor
+//
+//----------------------------------------------------
+//     
+RESOURCE LONGITUDE_EDITOR r_lmk_long_editor
+	{
+	flags = ELocationEdFlagLongitude;
+	latlongresourceid = R_EIK_LATITUDE_AND_LONGITUDE;
+	}
+//----------------------------------------------------
+//   
+//    r_lmk_unit_editor_metric
+//    Avkon's distance editor using metric units
+//
+//----------------------------------------------------
+//     
+RESOURCE AVKON_UNIT_EDITOR r_lmk_unit_editor_metric
+    {
+    min = 0;
+    max = 20000;	// KMaxAccuracy
+    maxfractionaldigits = 2;
+    flags = EAknUnitEditorAllowUninitialized;
+    }
+//----------------------------------------------------
+//   
+//    r_lmk_unit_editor_imperial
+//    Avkon's distance editor using imperial units
+//
+//----------------------------------------------------
+//     
+RESOURCE AVKON_UNIT_EDITOR r_lmk_unit_editor_imperial
+    {
+    min = 0;
+    max = 6099;		// KMaxAccuracy/KMetreToFoot
+    maxfractionaldigits = 2;
+    flags = EAknUnitEditorAllowUninitialized;
+    }
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/uicontrols/data/LmkMessaging.rss	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,340 @@
+/*
+ * Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies 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 the resources for Landmarks messaging.
+ *
+ */
+
+//----------------------------------------------------
+//   
+//    r_lmk_pkgviewer_menubar
+//
+//----------------------------------------------------
+//
+RESOURCE MENU_BAR r_lmk_pkgviewer_menubar
+    {
+    titles=
+        {
+        MENU_TITLE
+            {menu_pane=r_lmk_pkgviewer_menu; txt="";}
+        };
+    }
+
+//----------------------------------------------------
+//   
+//    r_lmk_pkgviewer_menu
+//
+//----------------------------------------------------
+//
+
+RESOURCE MENU_PANE r_lmk_pkgviewer_menu
+    {
+    items=
+        {
+        MENU_ITEM
+            {command = ELmkCmdOpenLm; txt = qtn_options_open;},
+        MENU_ITEM
+            {command = ELmkCmdSaveLm; txt = qtn_lm_opt_save;cascade = r_lmk_pkgviewer_save_Landmark_submenu;},
+        MENU_ITEM
+            {command = ELmkShowOnMapPlaceHolder;txt = qtn_mnn_option_show_on_map;},
+        MENU_ITEM
+            {command = ELmkCmdSendDummy; txt = qtn_options_send_via;cascade = r_lmk_pkgviewer_send_Landmark_submenu;},
+        MENU_ITEM
+            {command = EAknCmdHelp; txt = qtn_options_help;},
+        MENU_ITEM
+            {command = EAknCmdExit; txt = qtn_options_exit;}
+        };
+    }
+
+//----------------------------------------------------
+//   
+//   r_lmk_pkgviewer_save_Landmark_submenu
+//
+//----------------------------------------------------
+//
+RESOURCE MENU_PANE r_lmk_pkgviewer_save_Landmark_submenu
+    {
+    items=
+        {
+        MENU_ITEM
+            {command = ELmkCmdSaveSelectedLms; txt = qtn_lm_opt_save_selected;},
+        MENU_ITEM
+            {command = ELmkCmdSaveAllLms; txt = qtn_lm_opt_save_all;}
+        };
+    }
+
+//----------------------------------------------------
+//   
+//   r_lmk_pkgviewer_send_Landmark_submenu
+//
+//----------------------------------------------------
+//
+RESOURCE MENU_PANE r_lmk_pkgviewer_send_Landmark_submenu
+    {
+    items=
+        {
+        MENU_ITEM
+            {command = ELmkCmdSendSelectedLms; txt = qtn_lm_opt_send_selected;},
+        MENU_ITEM
+            {command = ELmkCmdSendAllLms; txt = qtn_lm_opt_send_all;}
+        };
+    }
+
+//----------------------------------------------------
+//   
+//   r_lmk_pkgviewer_options_back_dlg
+//
+//----------------------------------------------------
+//
+RESOURCE DIALOG r_lmk_pkgviewer_options_back_dlg
+    {
+    flags = EAknDialogMultiselectionList | EEikDialogFlagFillAppClientRect | EEikDialogFlagNotifyEsc;
+    buttons = R_AVKON_SOFTKEYS_OPTIONS_BACK;
+    items =
+        {
+        DLG_LINE
+            {
+            type = EAknCtSingleGraphicListBox;
+            id = ESelectionListControl;
+            control = LISTBOX
+                {
+#ifdef RD_SCALABLE_UI_V2
+                flags = EAknListBoxStylusMultiselectionList;
+#else
+                flags = EAknListBoxMultiselectionList;
+#endif
+                };
+            }
+        };
+    }
+
+//----------------------------------------------------
+//   
+//    r_lmk_encoding_wait_note
+//    Encoding wait note
+//
+//----------------------------------------------------
+//
+RESOURCE DIALOG r_lmk_encoding_wait_note
+    {
+    flags = EAknWaitNoteFlags | EEikDialogFlagWait;
+    buttons = R_AVKON_SOFTKEYS_CANCEL;
+    items =
+        {
+        DLG_LINE
+            {
+            type = EAknCtNote;
+            id = EGeneralNote;
+            control= AVKON_NOTE
+                {
+                layout = EWaitLayout;
+                singular_label = qtn_gen_note_processing;
+                animation = R_QGN_GRAF_WAIT_BAR_ANIM;
+                };
+            }
+        };
+    }
+
+//----------------------------------------------------
+//   
+//    r_lmk_importing_wait_note
+//    Encoding wait note
+//
+//----------------------------------------------------
+//
+RESOURCE DIALOG r_lmk_importing_wait_note
+    {
+    flags = EAknWaitNoteFlags | EEikDialogFlagWait;
+    buttons = R_AVKON_SOFTKEYS_CANCEL;
+    items =
+        {
+        DLG_LINE
+            {
+            type = EAknCtNote;
+            id = EGeneralNote;
+            control= AVKON_NOTE
+                {
+                layout = EWaitLayout;
+                singular_label = qtn_gen_note_saving;
+                animation = R_QGN_GRAF_WAIT_BAR_ANIM;
+                };
+            }
+        };
+    }
+
+//----------------------------------------------------
+//   
+//    r_lmk_sendui_menu_text
+//
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_lmk_sendui_menu_text
+    {
+    //buf = qtn_lm_opt_send_package;
+    buf = qtn_options_send_via;
+    }
+
+//----------------------------------------------------
+//   
+//    r_lmk_send_selected
+//
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_lmk_send_selected
+    {
+    buf = qtn_lm_opt_send_selected;
+    }
+
+//----------------------------------------------------
+//   
+//    r_lmk_send_all
+//
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_lmk_send_all
+    {
+    buf = qtn_lm_opt_send_all;
+    }
+
+// Added for LM Package Name Query 
+
+//----------------------------------------------------
+//   
+//    r_lmk_package_name_query
+//    Waypoint name query
+//
+//----------------------------------------------------
+//
+RESOURCE DIALOG r_lmk_package_name_query
+    {
+    flags = EGeneralQueryFlags;
+    buttons = R_AVKON_SOFTKEYS_OK_CANCEL;
+    items =
+        {
+        DLG_LINE
+            {
+            type = EAknCtQuery;
+            id = EGeneralQuery;
+            control = AVKON_DATA_QUERY
+                {
+                label = qtn_lm_query_package_name;
+                layout = EDataLayout;
+                control = EDWIN
+                    {
+                    flags = EEikEdwinNoHorizScrolling | EEikEdwinResizable| EEikEdwinNoLineOrParaBreaks;
+                    width = LMK_QUERY_EDWIN_WIDTH;
+                    lines = LMK_QUERY_EDWIN_LINES;
+                    maxlength = LMK_QUERY_EDWIN_MAXLENGTH;
+                    };
+                };
+            }
+        };
+    }
+
+//----------------------------------------------------
+//   
+//   r_lm_query_package_name
+//    Select Landmarks Package Name
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_lm_query_package_name
+    {
+    buf = qtn_lm_query_package_name;
+    }
+
+//----------------------------------------------------
+//   
+//    r_lmk_default_package_name
+//    Default package name
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_lmk_default_package_name
+    {
+    buf = qtn_lm_default_package_name;
+    }
+
+//----------------------------------------------------
+//   
+//    r_lmk_add_category
+//    add category message
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_lmk_add_category
+    {
+    buf = qtn_lm_query_create_new_category;
+    }
+
+//----------------------------------------------------
+//   
+//    r_lmk_add_category
+//    add category message with number
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_lmk_add_categories
+    {
+    buf = qtn_lm_query_create_new_categories;
+    }
+
+//----------------------------------------------------
+//   
+//    r_lmk_note_landmark_saved
+//    save confirmation note for one landmark
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_lmk_note_landmark_saved
+    {
+    buf = qtn_lm_note_landmark_saved;
+    }
+
+//----------------------------------------------------
+//   
+//    r_lmk_note_lms_saved
+//    save confirmation note
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_lmk_note_lms_saved
+    {
+    buf = qtn_lm_note_lms_saved;
+    }
+
+//----------------------------------------------------
+//   
+//    r_lmk_aiw_interest_showonmap
+//    AIW interest for option show on map
+//
+//----------------------------------------------------
+//
+RESOURCE AIW_INTEREST r_lmk_package_aiw_interest_showonmap
+    {
+    items =
+        {
+        AIW_CRITERIA_ITEM
+            {
+            id = ELmkShowOnMapPlaceHolder;
+            serviceCmd = KAiwCmdMnShowMap;
+            contentType = "application/x-landmark";
+            serviceClass = KAiwClassMenu;
+            }
+        };
+    }
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/uicontrols/data/lmkui.rss	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,1205 @@
+/*
+* 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:    LandmarksUi Content File -    Contains all the resources for lmkui.dll.
+*
+*/
+
+
+
+
+
+
+
+//  RESOURCE IDENTIFIER
+
+NAME    LMUI
+
+//  INCLUDES
+#include <eikon.rh>
+#include <uikon.rh> 
+#include <avkon.rsg> 
+#include <avkon.rh>
+#include <avkon.hrh>
+#include <avkon.mbg> 
+#include <avkon.loc>
+#include "landmarks.hrh"
+#include <landmarks.loc>
+#include <lmkmsgviewer.loc>
+
+//  CONSTANTS  
+#define LMK_QUERY_EDWIN_WIDTH 5
+#define LMK_QUERY_EDWIN_LINES 5
+#define LMK_QUERY_EDWIN_MAXLENGTH 124
+
+//  RESOURCE DEFINITIONS 
+
+RESOURCE RSS_SIGNATURE { } 
+
+//----------------------------------------------------
+//   
+//    r_lmk_lm_selector_navi_decorator
+//    
+//
+//----------------------------------------------------
+//
+RESOURCE TAB_GROUP r_lmk_lm_selector_navi_decorator
+    {
+	tab_width = EAknTabWidthWithTwoTabs;  // two tabs
+	active = 0;
+	tabs =
+		{
+		TAB
+			{
+            id = ETabLandmarkList;
+            txt = "Lm";
+            },
+		TAB
+			{
+            id = ETabCategoryList;
+            txt = "Cat";
+			}
+		};
+	}
+
+//----------------------------------------------------
+//   
+//    r_lmk_selector_ok_back_dlg
+//    
+//
+//----------------------------------------------------
+//
+RESOURCE DIALOG r_lmk_selector_ok_back_dlg
+	{
+	flags = EAknDialogMarkableList | EEikDialogFlagFillAppClientRect | EEikDialogFlagNotifyEsc;
+	buttons = R_AVKON_SOFTKEYS_OK_BACK;
+	items =
+		{ 
+		DLG_LINE
+			{ 
+			type = EAknCtSingleGraphicListBox;
+			id = ESelectionListControl;
+			control = LISTBOX
+				{
+				flags = EAknListBoxMarkableList;
+				};
+			},
+		DLG_LINE  
+			{
+			itemflags = EEikDlgItemNonFocusing;
+			id = EFindControl;
+			type = EAknCtSelectionListFixedFind;
+			}
+		};
+	} 
+
+//----------------------------------------------------
+//   
+//    r_lmk_selector_ok_back_multi_dlg
+//    
+//
+//----------------------------------------------------
+//
+RESOURCE DIALOG r_lmk_selector_ok_back_multi_dlg
+	{
+	flags = EAknDialogMultiselectionList | EEikDialogFlagFillAppClientRect | EEikDialogFlagNotifyEsc;
+	buttons = R_AVKON_SOFTKEYS_OK_BACK;
+	items =
+		{ 
+		DLG_LINE
+			{ 
+			type = EAknCtSingleGraphicListBox;
+			id = ESelectionListControl;
+			control = LISTBOX
+				{
+			    #ifdef RD_SCALABLE_UI_V2
+                flags =	EAknListBoxStylusMultiselectionList;
+                #else
+                flags = EAknListBoxMultiselectionList;
+                #endif
+				};
+			},
+		DLG_LINE  
+			{
+			itemflags = EEikDlgItemNonFocusing;
+			id = EFindControl;
+			type = EAknCtSelectionListFixedFind;
+			}
+		};
+	} 
+
+//----------------------------------------------------
+//   
+//    r_lmk_selector_ok_cancel_dlg
+//    
+//
+//----------------------------------------------------
+//
+RESOURCE DIALOG r_lmk_selector_ok_cancel_dlg
+	{
+	flags = EAknDialogMarkableList | EEikDialogFlagFillAppClientRect | EEikDialogFlagNotifyEsc;
+	buttons = R_AVKON_SOFTKEYS_OK_CANCEL;
+	items =
+		{ 
+		DLG_LINE
+			{ 
+			type = EAknCtSingleGraphicListBox;
+			id = ESelectionListControl;
+			control = LISTBOX
+				{
+				flags = EAknListBoxMarkableList;
+				};
+			},
+		DLG_LINE  
+			{
+			itemflags = EEikDlgItemNonFocusing;
+			id = EFindControl;
+			type = EAknCtSelectionListFixedFind;
+			}
+		};
+	} 
+
+//----------------------------------------------------
+//   
+//    r_lmk_category_selector_ok_cancel_multi_dlg
+//    
+//
+//----------------------------------------------------
+//
+RESOURCE DIALOG r_lmk_category_selector_ok_cancel_multi_dlg
+	{
+	flags = EAknDialogMultiselectionList | EEikDialogFlagFillAppClientRect | EEikDialogFlagNotifyEsc;
+	//buttons = R_AVKON_SOFTKEYS_OK_CANCEL;
+	buttons = r_lmk_catsel_softkeys_ok_cancel;
+	items =
+		{ 
+		DLG_LINE
+			{ 
+			type = EAknCtSingleGraphicListBox;
+			id = ESelectionListControl;
+			control = LISTBOX
+				{
+                #ifdef RD_SCALABLE_UI_V2
+                flags =	EAknListBoxStylusMultiselectionList;
+                #else
+                flags = EAknListBoxMultiselectionList;
+                #endif
+				};
+			},
+		DLG_LINE  
+			{
+			itemflags = EEikDlgItemNonFocusing;
+			id = EFindControl;
+			type = EAknCtSelectionListFixedFind;
+			}
+		};
+	} 
+
+
+
+//----------------------------------------------------
+//   
+//    r_lmk_softkeys_open_cancel
+//    
+//
+//----------------------------------------------------
+//
+RESOURCE CBA  r_lmk_catsel_softkeys_ok_cancel
+    {
+    buttons =
+        {
+        CBA_BUTTON
+            {
+            id = EAknSoftkeyDone; // No dedicated id for "Open" exists
+            //txt = text_softkey_open;
+	    txt = text_softkey_ok; 	
+            },
+        CBA_BUTTON
+            {
+            id = EAknSoftkeyCancel;
+            txt = text_softkey_cancel;
+            }
+        };
+    }
+
+//----------------------------------------------------
+//   
+//    r_lmk_selector_ok_cancel_multi_dlg
+//    
+//
+//----------------------------------------------------
+//
+RESOURCE DIALOG r_lmk_selector_ok_cancel_multi_dlg
+	{
+	flags = EAknDialogMultiselectionList | EEikDialogFlagFillAppClientRect | EEikDialogFlagNotifyEsc;
+	buttons = R_AVKON_SOFTKEYS_OK_CANCEL;
+	items =
+		{ 
+		DLG_LINE
+			{ 
+			type = EAknCtSingleGraphicListBox;
+			id = ESelectionListControl;
+			control = LISTBOX
+				{
+                #ifdef RD_SCALABLE_UI_V2
+                flags =	EAknListBoxStylusMultiselectionList;
+                #else
+                flags = EAknListBoxMultiselectionList;
+                #endif
+				};
+			},
+		DLG_LINE  
+			{
+			itemflags = EEikDlgItemNonFocusing;
+			id = EFindControl;
+			type = EAknCtSelectionListFixedFind;
+			}
+		};
+	} 
+
+//----------------------------------------------------
+//   
+//    r_lmk_selector_open_cancel_dlg
+//    
+//
+//----------------------------------------------------
+//
+RESOURCE DIALOG r_lmk_selector_open_cancel_dlg
+	{
+	flags = EAknDialogMarkableList | EEikDialogFlagFillAppClientRect | EEikDialogFlagNotifyEsc;
+	buttons = r_lmk_softkeys_open_cancel;
+	items =
+		{ 
+		DLG_LINE
+			{ 
+			type = EAknCtSingleGraphicListBox;
+			id = ESelectionListControl;
+			control = LISTBOX
+				{
+				flags = EAknListBoxMarkableList;
+				};
+			},
+		DLG_LINE  
+			{
+			itemflags = EEikDlgItemNonFocusing;
+			id = EFindControl;
+			type = EAknCtSelectionListFixedFind;
+			}
+		};
+	} 
+
+//----------------------------------------------------
+//   
+//    r_lmk_softkeys_open_cancel
+//    
+//
+//----------------------------------------------------
+//
+RESOURCE CBA r_lmk_softkeys_open_cancel
+    {
+    buttons =
+        {
+        CBA_BUTTON
+            {
+            id = EAknSoftkeyOk; // No dedicated id for "Open" exists
+            txt = text_softkey_open;
+            },
+        CBA_BUTTON
+            {
+            id = EAknSoftkeyCancel;
+            txt = text_softkey_cancel;
+            }
+        };
+    }
+
+//----------------------------------------------------
+//   
+//    r_lmk_empty_menubar
+//    
+//
+//----------------------------------------------------
+//
+RESOURCE MENU_BAR r_lmk_empty_menubar
+	{
+	titles = {};
+	}
+
+//----------------------------------------------------
+//   
+//    r_lmk_query
+//    
+//
+//----------------------------------------------------
+//
+RESOURCE DIALOG r_lmk_query
+	{
+	flags = EGeneralQueryFlags;
+	buttons = R_AVKON_SOFTKEYS_YES_NO;
+	items = 
+		{
+		DLG_LINE
+			{
+			type = EAknCtQuery;
+			id = EGeneralQuery;
+			control = AVKON_CONFIRMATION_QUERY
+				{
+				layout = EConfirmationQueryLayout;
+				};
+			}
+		};
+	}
+
+//----------------------------------------------------
+//   
+//    r_lmk_delete_category
+//    Text for confirmation query
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_lmk_delete_category
+    {
+    buf = qtn_lm_conf_delete_category;
+    }
+  
+//----------------------------------------------------
+//   
+//    r_lmk_delete_categories
+//    Text for confirmation query
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_lmk_delete_categories
+    {
+    buf = qtn_lm_conf_delete_categories;
+    }
+
+//----------------------------------------------------
+//   
+//    r_lmk_delete_landmark
+//    Text for confirmation query
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_lmk_delete_landmark
+    {
+    buf = qtn_lm_conf_delete_landmark;
+    }
+
+//----------------------------------------------------
+//   
+//    r_lmk_delete_landmarks
+//    Text for confirmation query
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_lmk_delete_landmarks
+    {
+    buf = qtn_lm_conf_delete_landmarks;
+    }
+
+  
+
+//----------------------------------------------------
+//   
+//    r_lmk_category_selector_title
+//    Title for category selector
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_lmk_category_selector_title
+    {
+    buf = qtn_lm_title_categories;
+    }
+
+//----------------------------------------------------
+//   
+//    r_lmk_landmark_selector_title
+//    Title for landmark selector
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_lmk_landmark_selector_title
+    {
+    buf = qtn_lm_title_landmarks;
+    }
+
+//----------------------------------------------------
+//   
+//    r_lmk_category_name_query
+//    categories name query
+//
+//----------------------------------------------------
+//
+RESOURCE DIALOG r_lmk_category_name_query
+  {
+  flags = EGeneralQueryFlags;
+  buttons = R_AVKON_SOFTKEYS_OK_CANCEL;
+  items =
+    {
+    DLG_LINE
+      {
+      type = EAknCtQuery;
+      id = EGeneralQuery;
+      control = AVKON_DATA_QUERY
+        {       		
+		layout = EDataLayout;
+		label = qtn_lm_prompt_category_name; 
+        control = EDWIN
+          {
+          flags = EEikEdwinNoHorizScrolling | EEikEdwinResizable;
+          width = LMK_QUERY_EDWIN_WIDTH;
+          lines = LMK_QUERY_EDWIN_LINES;
+          maxlength = LMK_QUERY_EDWIN_MAXLENGTH;
+          };
+        };
+      }
+    };
+  } 
+
+//----------------------------------------------------
+//   
+//    r_lmk_category_name_exists_note
+//    Category name already exists information note
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_lmk_category_name_exists_note
+    {
+    buf = qtn_lm_note_category_name_already_exists;
+    }
+
+//----------------------------------------------------
+//   
+//    r_lmk_icon_selector_title
+//    Title of icon selector
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_lmk_icon_selector_title
+    {
+    buf = qtn_lm_heading_select_icon;
+    }
+
+//----------------------------------------------------
+//   
+//    r_lmk_deleting_wait_note
+//    Deleting wait note
+//
+//----------------------------------------------------
+//
+RESOURCE DIALOG r_lmk_deleting_wait_note
+	{	
+	flags = EAknWaitNoteFlags | EEikDialogFlagWait;
+    buttons = R_AVKON_SOFTKEYS_CANCEL;
+    items =
+        {
+        DLG_LINE
+            {
+            type = EAknCtNote;
+            id = EGeneralNote;
+            control= AVKON_NOTE 
+                { 
+                layout = EWaitLayout;
+                singular_label = qtn_fldr_deleting_wait_note;
+                animation = R_QGN_GRAF_WAIT_BAR_ANIM;
+                };
+            }
+        };
+	}
+
+//----------------------------------------------------
+//   
+//    r_lmk_request_location
+//    Progress note 
+//
+//----------------------------------------------------
+//
+RESOURCE DIALOG r_lmk_request_location
+	{	
+	flags = EAknWaitNoteFlags | EEikDialogFlagWait;
+    buttons = R_AVKON_SOFTKEYS_CANCEL;
+    items =
+        {
+        DLG_LINE
+            {
+            type = EAknCtNote;
+            id = EGeneralNote;
+            control= AVKON_NOTE 
+                { 
+                layout = EWaitLayout;
+                singular_label = qtn_lm_wait_requesting_location;
+                animation = R_QGN_GRAF_WAIT_BAR_ANIM;
+                };
+            }
+        };
+	}
+
+//----------------------------------------------------
+//   
+//    r_lmk_processing_wait_note
+//    Processing wait note
+//
+//----------------------------------------------------
+//
+RESOURCE DIALOG r_lmk_processing_wait_note
+	{	
+	flags = EAknWaitNoteFlags | EEikDialogFlagWait;
+    buttons = R_AVKON_SOFTKEYS_CANCEL;
+    items =
+        {
+        DLG_LINE
+            {
+            type = EAknCtNote;
+            id = EGeneralNote;
+            control= AVKON_NOTE 
+                { 
+                layout = EWaitLayout;
+                singular_label = qtn_gen_note_processing;
+                animation = R_QGN_GRAF_WAIT_BAR_ANIM;
+                };
+            }
+        };
+	}
+//----------------------------------------------------
+//   
+//    r_lmk_category_settings_empty
+//    Category settings view's items empty text
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_lmk_category_settings_empty
+    {
+    buf = qtn_lm_list_category_empty;
+    }
+
+//----------------------------------------------------
+//   
+//    r_lmk_category_settings_empty
+//    Category settings view's items empty text
+//
+//----------------------------------------------------
+//
+RESOURCE DIALOG r_empty_dialog	
+    {
+	flags = EEikDialogFlagFillAppClientRect | EEikDialogFlagCbaButtons;
+	buttons = R_AVKON_SOFTKEYS_EMPTY; 
+    items =
+        {
+        };
+    } 	
+
+//----------------------------------------------------
+//   
+//    r_lmk_lm_list_uncategorised
+//    
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_lmk_lm_list_uncategorised
+    {
+    buf = qtn_lm_list_uncategorised;
+    }
+    
+//----------------------------------------------------
+//   
+//    r_lmk_no_categories_available
+//    
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_lmk_no_categories_available
+    {
+    buf = qtn_lm_no_categories_available;
+    }
+    
+//----------------------------------------------------
+//   
+//    r_lmk_note_no_number_to_name
+//    No phone number available note
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_lmk_note_no_number_to_name
+    {
+    buf = qtn_lm_note_no_number;
+    }       
+
+    
+//----------------------------------------------------   
+//    r_lmk_memlo_not_enough_memory
+//    Out of memory note
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_lmk_memlo_not_enough_memory
+	{
+	buf = qtn_memlo_not_enough_memory;
+	}  
+	
+//----------------------------------------------------
+//   
+//    r_lmk_no_landmarks_create_with_application
+//    Create landmark with landmark application
+//
+//----------------------------------------------------
+//
+	RESOURCE TBUF r_lmk_no_landmarks_create_with_application
+    {
+    buf = qtn_lm_lmsel_no_landmarks;
+    }
+    
+//----------------------------------------------------
+//   
+//    qtn_lm_show_error_no_data
+//    No data in selected landmark 
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_lm_show_error_no_data
+    {
+	buf = qtn_lm_show_error_no_data;
+    }
+
+//----------------------------------------------------
+//   
+//    r_lm_show_error_no_coordinates
+//    No data in landmarks available
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_lm_show_error_no_coordinates
+    {
+	buf = qtn_lm_show_error_no_coordinates;
+    }
+
+//----------------------------------------------------
+//   
+//    r_lm_show_query_no_coordinates_single
+//    No data in landmark available
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_lm_show_query_no_coordinates_single
+    {
+	buf = qtn_lm_show_query_no_coordinates_single;
+    }
+
+//----------------------------------------------------
+//   
+//    r_lm_show_query_no_coordinates_several
+//    No data in landmarks available
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_lm_show_query_no_coordinates_several
+    {
+	buf = qtn_lm_show_query_no_coordinates_several;
+    }
+
+//----------------------------------------------------
+//   
+//    r_lm_show_error_category_no_coordinates
+//    No data in landmarks available in category note
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_lm_show_error_category_no_coordinates
+    {
+	buf = qtn_lm_show_error_category_no_coordinates;
+    }
+
+//----------------------------------------------------
+//   
+//    r_lm_show_query_category_no_coordinates_single
+//    No data in landmarks available in category note
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_lm_show_query_category_no_coordinates_single
+    {
+	buf = qtn_lm_show_query_category_no_coordinates_single;
+    }
+
+//----------------------------------------------------
+//   
+//    r_lm_show_query_category_no_coordinates_several
+//    No data in landmarks available in category note
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_lm_show_query_category_no_coordinates_several
+    {
+	buf = qtn_lm_show_query_category_no_coordinates_several;
+    }
+
+//----------------------------------------------------
+//   
+//    r_lm_select_from_map
+//    String to proviers for select from map use case
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_lm_select_from_map
+    {
+	buf = qtn_lm_select_from_map;
+    }
+
+//----------------------------------------------------
+//   
+//    r_empty_landmark_dialog
+//    
+//
+//----------------------------------------------------
+//    
+RESOURCE DIALOG r_empty_landmark_dialog
+	{
+	flags = EGeneralQueryFlags;
+	buttons = R_AVKON_SOFTKEYS_YES_NO;
+	items = 
+		{
+		DLG_LINE
+			{
+			type = EAknCtQuery;
+			id = EGeneralQuery;
+			control = AVKON_CONFIRMATION_QUERY
+				{
+				layout = EConfirmationQueryLayout;
+				};
+			}
+		};
+	}
+
+//----------------------------------------------------
+//   
+//    r_empty_landmarks_dialog
+//    
+//
+//----------------------------------------------------
+//    
+RESOURCE DIALOG r_empty_landmarks_dialog
+	{
+	flags = EGeneralQueryFlags;
+	buttons = R_AVKON_SOFTKEYS_YES_NO;
+	items = 
+		{
+		DLG_LINE
+			{
+			type = EAknCtQuery;
+			id = EGeneralQuery;
+			control = AVKON_CONFIRMATION_QUERY
+				{
+				layout = EConfirmationQueryLayout;
+				};
+			}
+		};
+	}
+
+	
+//----------------------------------------------------
+//   
+//    r_lmkui_processing_wait_note
+//    General wait note
+//
+//----------------------------------------------------
+//
+RESOURCE DIALOG r_lmkui_processing_wait_note
+	{	
+	flags = EAknWaitNoteFlags | EEikDialogFlagWait;
+    buttons = R_AVKON_SOFTKEYS_EMPTY;
+    items =
+        {
+        DLG_LINE
+            {
+            type = EAknCtNote;
+            id = EGeneralNote;
+            control= AVKON_NOTE 
+                { 
+                layout = EWaitLayout;
+                singular_label = qtn_gen_note_processing;
+                animation = R_QGN_GRAF_WAIT_BAR_ANIM;
+                };
+            }
+        };
+	}
+
+RESOURCE DIALOG r_lmk_icon_table_dialog
+    {
+    flags = EGeneralQueryFlags | EEikDialogFlagNoBorder | EEikDialogFlagNoShadow;
+    buttons = r_lmk_icon_softkeys_select_cancel_select;
+    items=
+        {
+        DLG_LINE
+            {
+            type = EAknCtPopupHeadingPane;
+            id = EAknSCTQueryHeadingId;
+            control = AVKON_HEADING
+                {
+                headinglayout = R_AVKON_SCT_LIST_HEADING_PANE;//r_avkon_sct_list_heading_pane;
+                };
+            },
+        DLG_LINE
+            {
+            type = ELmkCtIconMap;//0x2001
+            id = ELmkIconMapContentId;
+            }
+        };
+    }
+
+//----------------------------------------------------
+//   
+//    r_lmk_single_selector_softkeys_ok_cancel_ok
+//    CBA with left & msk are same.
+//
+//----------------------------------------------------
+//
+RESOURCE CBA r_lmk_selector_softkeys_ok_cancel_ok
+    {
+    buttons =
+        {
+        CBA_BUTTON {id=EAknSoftkeyOk; txt=text_softkey_ok;},
+        CBA_BUTTON {id=EAknSoftkeyCancel; txt = text_softkey_cancel; },
+        CBA_BUTTON {id=EAknSoftkeyOk; txt=text_softkey_ok;}
+        };
+    }
+//----------------------------------------------------
+//   
+//    r_lmk_selector_softkeys_ok_back_ok
+//    CBA ok ok back
+//
+//----------------------------------------------------
+//
+RESOURCE CBA r_lmk_selector_softkeys_ok_back_ok
+    {
+    buttons =
+        {
+        CBA_BUTTON {id=EAknSoftkeyOk; txt=text_softkey_ok;},
+        CBA_BUTTON {id=EAknSoftkeyBack; txt = text_softkey_back; },
+        CBA_BUTTON {id=EAknSoftkeyOk; txt=text_softkey_ok;}
+        };
+    }
+
+//----------------------------------------------------
+//   
+//    r_lmk_selector_softkeys_open_cancel_open
+//    CBA open open cancel
+//
+//----------------------------------------------------
+//
+RESOURCE CBA r_lmk_selector_softkeys_open_cancel_open
+    {
+    buttons =
+        {
+        CBA_BUTTON {id=EAknSoftkeyOk; txt=text_softkey_open;},
+        CBA_BUTTON {id=EAknSoftkeyCancel; txt = text_softkey_cancel; },
+        CBA_BUTTON {id=EAknSoftkeyOk; txt=text_softkey_open;}
+        };
+    }    
+
+//----------------------------------------------------
+//   
+//    r_lmk_selector_softkeys_done_cancel_done
+//    CBA done done cancel
+//
+//----------------------------------------------------
+//
+RESOURCE CBA r_lmk_selector_softkeys_done_cancel_done
+    {
+    buttons =
+        {
+        CBA_BUTTON {id=EAknSoftkeyDone; txt=text_softkey_ok;},
+        CBA_BUTTON {id=EAknSoftkeyCancel; txt = text_softkey_cancel; },
+        CBA_BUTTON {id=EAknSoftkeyDone; txt=text_softkey_ok;}
+        };
+    }        
+//----------------------------------------------------
+//   
+//    r_lmk_icon_softkeys_select_cancel_select
+//    CBA with left & msk are same.
+//
+//----------------------------------------------------
+//
+RESOURCE CBA r_lmk_icon_softkeys_select_cancel_select
+    {
+    buttons =
+        {
+        AVKON_CBA_BUTTON{id=EAknSoftkeySelect; longpressid=0; txt= text_softkey_select; },
+        CBA_BUTTON{id=EAknSoftkeyCancel; txt= text_softkey_cancel; },
+        CBA_BUTTON{id=EAknSoftkeySelect; txt= text_softkey_select; }
+        };
+    }
+
+//----------------------------------------------------
+//   
+//    r_lm_msk_mark
+//    Mark string
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_lm_msk_mark
+    {
+	buf = qtn_msk_mark;
+    }
+//----------------------------------------------------
+//   
+//    r_lm_unmark
+//    UnMark string
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_lm_msk_unmark
+    {
+	buf = qtn_msk_unmark;
+    }
+//----------------------------------------------------
+//   
+//    r_lm_unmark
+//    UnMark string
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_lm_editor_many_categories
+    {
+	buf = qtn_lm_editor_many_categories;
+    }
+ 
+ //----------------------------------------------------
+//   
+//    r_lmk_guide_create_landmark
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_lmk_guide_create_landmark
+    {
+    buf = qtn_lm_guide_create_landmarks;
+    }
+//----------------------------------------------------
+//   
+//    r_lmk_empty_no_landmarks
+//	  
+//----------------------------------------------------
+//
+RESOURCE TBUF r_lmk_empty_no_landmarks
+    {
+    buf = qtn_lm_empty_no_landmarks;
+    }
+//----------------------------------------------------
+//   
+//    r_lmk_empty_no_match
+//	  
+//----------------------------------------------------
+//
+RESOURCE TBUF r_lmk_empty_no_match
+    {
+    buf = qtn_find_no_matches; 
+    }
+     
+//----------------------------------------------------
+//    r_lmk_empty_no_categories
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_lmk_empty_no_categories
+    {
+    buf = qtn_lm_empty_no_categories;
+    }
+
+//----------------------------------------------------
+//   
+//    r_lmk_guide_new_category
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_lmk_guide_new_category
+    {
+    buf = qtn_lm_guide_new_category;
+    }
+//----------------------------------------------------
+//   
+//    r_lmk_error_check_note
+//	  Error note
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_lmk_error_check_note
+    {
+    buf = qtn_lm_error_check_coordinates;
+    }
+    
+//----------------------------------------------------
+//   
+//    r_lmk_error_pos_acc_check_note
+//	  Error note
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_lmk_error_pos_acc_check_note
+    {
+    buf = qtn_lm_error_pos_acc_check;
+    }    
+
+//----------------------------------------------------
+//   
+//    r_lmk_error_alt_acc_check_note
+//	  Error note
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_lmk_error_alt_acc_check_note
+    {
+    buf = qtn_lm_error_alt_acc_check;
+    }
+
+//----------------------------------------------------
+//   
+//    r_lmk_error_altitude_check_note
+//	  Error note
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_lmk_error_altitude_check_note
+    {
+    buf = qtn_lm_error_altitude_check;
+    }
+
+//----------------------------------------------------
+//   
+//    r_lmk_error_url_illegal_note
+//	  Error note
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_lmk_error_url_illegal_note
+    {
+    buf = qtn_lm_error_url_illegal;
+    }
+    
+//----------------------------------------------------
+//   
+//    r_lmk_msg_query_heading_pane_text
+//
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_lmk_msg_query_heading_pane_text
+    {
+    buf =qtn_lm_location_request;
+    }
+//----------------------------------------------------
+//   
+//    r_lmk_conf_retry_location_request
+//
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_lmk_conf_retry_location_request
+    {
+    buf =qtn_lm_conf_retry_location_request;
+    }
+
+//----------------------------------------------------
+//   
+//    r_lmk_request_fail_info_text
+//
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_lmk_request_fail_info_text
+    {
+    buf =qtn_lm_request_fail_info_text;
+    }
+
+//----------------------------------------------------
+//   
+//    r_lmk_request_fail_more_info
+//
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_lmk_request_fail_more_info
+    {
+    buf =qtn_lm_request_fail_more_info;
+    }
+//----------------------------------------------------
+//   
+//    r_lmk_message_query_dialog2
+//
+//
+//----------------------------------------------------
+//
+RESOURCE DIALOG r_lmk_message_query_dialog2
+    {
+    flags = EGeneralQueryFlags | EEikDialogFlagNoBorder | EEikDialogFlagNoShadow;
+    buttons = R_AVKON_SOFTKEYS_YES_NO;
+    items=
+        {
+        DLG_LINE
+            {
+            type = EAknCtPopupHeadingPane;
+            id = EAknMessageQueryHeaderId;
+            control = AVKON_HEADING
+                {
+                //label = qtn_lm_categories_query_prompt;
+                headinglayout = R_AVKON_WML_SIGN_QUERY_HEADING_PANE;
+                };
+            },
+        DLG_LINE
+            {
+            type = EAknCtMessageQuery;
+            id = EAknMessageQueryContentId;
+            control = AVKON_MESSAGE_QUERY
+                {
+                };
+            }
+        };
+    }
+ 
+ //----------------------------------------------------
+//   
+//    r_lmk_message_query_dialog3
+//
+//
+//----------------------------------------------------
+//
+RESOURCE DIALOG r_lmk_message_query_dialog3
+    {
+    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
+                {
+                };
+            }
+        };
+    }
+// ---------------------------------------------------------
+//  Additional resource files
+// ---------------------------------------------------------
+//
+#include "LmkEditor.rss"  
+#include "LmkMessaging.rss"
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/uicontrols/eabi/LMKUIU_32u.def	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,156 @@
+EXPORTS
+	_ZN10CLmkSender4NewLER20CPosLandmarkDatabase @ 1 NONAME
+	_ZN11CLmkCallCmd4NewLEv @ 2 NONAME
+	_ZN11CLmkUiUtils16ChangeTitlePaneLEP7HBufC16 @ 3 NONAME
+	_ZN11CLmkUiUtils16ChangeTitlePaneLEi @ 4 NONAME
+	_ZN11CLmkUiUtils22ChangeLmNameLabelIconLER19MLmkEditorUiBuilderR13MLmkFieldData @ 5 NONAME
+	_ZN11CLmkUiUtils24GetFileWithCorrectDriveLER4TBufILi256EE @ 6 NONAME
+	_ZN14CLmkEditorImpl12SetMopParentEP15MObjectProvider @ 7 NONAME
+	_ZN14CLmkEditorImpl14SetHelpContextE15TCoeHelpContext @ 8 NONAME
+	_ZN14CLmkEditorImpl34DisableMapAndNavigationMenuOptionsEv @ 9 NONAME
+	_ZN14CLmkEditorImpl4NewLER20CPosLandmarkDatabaseR10CLmkSendermiP12CPosLandmark @ 10 NONAME
+	_ZN14CLmkEditorImpl4NewLER20CPosLandmarkDatabaseR10CLmkSendermiPmP12CPosLandmark @ 11 NONAME
+	_ZN14CLmkEditorImpl4NewLER20CPosLandmarkDatabaseR10CLmkSendermim @ 12 NONAME
+	_ZN14CLmkEditorImpl9ExecuteLDEv @ 13 NONAME
+	_ZN14CLmkGoToURLCmd4NewLEv @ 14 NONAME
+	_ZN20CLmkSelectorImplBase10SetMementoER15MLmkListMemento @ 15 NONAME
+	_ZN21CLmkAppLmSelectorImpl13CategoryNameLEv @ 16 NONAME
+	_ZN21CLmkAppLmSelectorImpl26IsCriteriaUnCategorizedCatEv @ 17 NONAME
+	_ZN21CLmkAppLmSelectorImpl28RemoveLandmarksFromCategoryLEv @ 18 NONAME
+	_ZN21CLmkAppLmSelectorImpl4NewLER20CPosLandmarkDatabaseR10CLmkSenderi @ 19 NONAME
+	_ZN21CLmkAppLmSelectorImpl4NewLER20CPosLandmarkDatabaseRK15MLmkListMementoR10CLmkSenderi @ 20 NONAME
+	_ZN21CLmkDlgLmSelectorImpl4NewLER20CPosLandmarkDatabase @ 21 NONAME
+	_ZN21CLmkDlgLmSelectorImpl4NewLER20CPosLandmarkDatabaseP20CPosLmSearchCriteria @ 22 NONAME
+	_ZN21CLmkPackageEditorImpl4NewLER20CPosLandmarkDatabaseR10CLmkParserR10CLmkSenderi @ 23 NONAME
+	_ZN21CLmkSaveLandmarkUtils4NewLER20CPosLandmarkDatabaseR10CLmkParser @ 24 NONAME
+	_ZN23CLmkAppSelectorImplBase12StoreMementoEv @ 25 NONAME
+	_ZN23CLmkAppSelectorImplBase13MarkedIndexesEv @ 26 NONAME
+	_ZN23CLmkAppSelectorImplBase14CreateFindBoxLERK11CCoeControl @ 27 NONAME
+	_ZN23CLmkAppSelectorImplBase14RestoreMementoEv @ 28 NONAME
+	_ZN23CLmkAppSelectorImplBase14SetMskObserverEP15MLmkMskObserver @ 29 NONAME
+	_ZN23CLmkAppSelectorImplBase16CurrentItemIndexEv @ 30 NONAME
+	_ZN23CLmkDlgSelectorImplBase12SetMopParentEP15MObjectProvider @ 31 NONAME
+	_ZN24CLmkDlgCombiSelectorImpl4NewLER20CPosLandmarkDatabase @ 32 NONAME
+	_ZN25CLmkAppLmItemSelectorImpl18LaunchPosSettingsLEv @ 33 NONAME
+	_ZN26CLmkDlgPackageSelectorImpl4NewLER20CPosLandmarkDatabaseR10CLmkParserR10CLmkSender @ 34 NONAME
+	_ZN26CLmkMapNavigationInterface11SetObserverEP28MLmkMapAndNavigationObserver @ 35 NONAME
+	_ZN26CLmkMapNavigationInterface13HandleNotifyLEiiR20CAiwGenericParamListRKS0_ @ 36 NONAME
+	_ZN26CLmkMapNavigationInterface15AttachMenuPaneLEP12CEikMenuPaneii @ 37 NONAME
+	_ZN26CLmkMapNavigationInterface15DetachInterestLEii @ 38 NONAME
+	_ZN26CLmkMapNavigationInterface18AttachAIWInterestLEii @ 39 NONAME
+	_ZN26CLmkMapNavigationInterface18ShowCategoryOnMapLEmiNS_9EViewTypeE @ 40 NONAME
+	_ZN26CLmkMapNavigationInterface19GetLandmarkFromMapLEi @ 41 NONAME
+	_ZN26CLmkMapNavigationInterface19NavigateToLandmarkLEP12CPosLandmarki @ 42 NONAME
+	_ZN26CLmkMapNavigationInterface19ShowLandmarksOnMapLER13RPointerArrayI12CPosLandmarkEiNS_9EViewTypeE @ 43 NONAME
+	_ZN26CLmkMapNavigationInterface20HandleMenuOperationLEiP12CEikMenuPanei @ 44 NONAME
+	_ZN26CLmkMapNavigationInterface22GetServiceCmdByMenuCmdEi @ 45 NONAME
+	_ZN26CLmkMapNavigationInterface30GetLandmarkFromMapForCategoryLEim @ 46 NONAME
+	_ZN26CLmkMapNavigationInterface4NewLER20CPosLandmarkDatabase @ 47 NONAME
+	_ZN26CLmkMapNavigationInterface7ReleaseEv @ 48 NONAME
+	_ZN26CLmkMapNavigationInterfaceD0Ev @ 49 NONAME
+	_ZN26CLmkMapNavigationInterfaceD1Ev @ 50 NONAME
+	_ZN26CLmkMapNavigationInterfaceD2Ev @ 51 NONAME
+	_ZN27CLmkAppCategorySelectorImpl17CurrentCategoryIdEv @ 52 NONAME
+	_ZN27CLmkAppCategorySelectorImpl4NewLER20CPosLandmarkDatabaseR10CLmkSenderi @ 53 NONAME
+	_ZN27CLmkAppCategorySettingsImpl21IsPredefinedCategoryLEv @ 54 NONAME
+	_ZN27CLmkAppCategorySettingsImpl4NewLER20CPosLandmarkDatabaseR10CLmkSenderi @ 55 NONAME
+	_ZN27CLmkDlgCategorySelectorImpl4NewLER20CPosLandmarkDatabaseii @ 56 NONAME
+	_ZN8LmkNotes13MessageQueryLEP9CEikonEnvR6TDes16i @ 57 NONAME
+	_ZN8LmkNotes16InformationNoteLEP9CEikonEnvi @ 58 NONAME
+	_ZN8LmkNotes16OutOfMemoryNoteLEP9CEikonEnv @ 59 NONAME
+	_ZN8LmkNotes18CategoryEmptyNoteLEP9CEikonEnv7TPtrC16 @ 60 NONAME
+	_ZN8LmkNotes18CategoryNameQueryLER6TDes16i @ 61 NONAME
+	_ZN8LmkNotes19LandmarksEmptyNoteLEP9CEikonEnv7TPtrC16 @ 62 NONAME
+	_ZN8LmkNotes20GenericMessageQueryLEP9CEikonEnvii @ 63 NONAME
+	_ZN8LmkNotes21MessageQueryWithLinkLEP9CEikonEnviii9TCallBack @ 64 NONAME
+	_ZN8LmkNotes21ShowDelayedInfoPopupLER7TDesC16R6TPoint @ 65 NONAME
+	_ZN8LmkNotes22AllLandmarksEmptyNoteLEP9CEikonEnv @ 66 NONAME
+	_ZN8LmkNotes24InformationNotewithTextLEP9CEikonEnvi7TPtrC16 @ 67 NONAME
+	_ZN8LmkNotes26CategoryConfirmationQueryLEP9CEikonEnvi @ 68 NONAME
+	_ZN8LmkNotes26LandmarkConfirmationQueryLEP9CEikonEnvi @ 69 NONAME
+	_ZN8LmkNotes26ShowOwerriteLocationQueryLEP9CEikonEnv @ 70 NONAME
+	_ZN8LmkNotes28LandmarkInCategoryEmptyNoteLEP9CEikonEnv7TPtrC16S2_ @ 71 NONAME
+	_ZNK10CLmkSender16DisplaySendMenuLER12CEikMenuPaneii @ 72 NONAME
+	_ZNK10CLmkSender23DisplaySendCascadeMenuLER12CEikMenuPane @ 73 NONAME
+	_ZNK21CLmkLmItemListMemento15MemorizedItemIdEv @ 74 NONAME
+	_ZTI10CLmkSender @ 75 NONAME ; #<TI>#
+	_ZTI11CLmkCallCmd @ 76 NONAME ; #<TI>#
+	_ZTI11CLmkUiUtils @ 77 NONAME ; #<TI>#
+	_ZTI14CLmkEditorImpl @ 78 NONAME ; #<TI>#
+	_ZTI14CLmkGoToURLCmd @ 79 NONAME ; #<TI>#
+	_ZTI17CLmkSelectorCache @ 80 NONAME ; #<TI>#
+	_ZTI18CLmkSelectorDialog @ 81 NONAME ; #<TI>#
+	_ZTI18TLmkDeletionHelper @ 82 NONAME ; #<TI>#
+	_ZTI19CLmkEditorFieldBase @ 83 NONAME ; #<TI>#
+	_ZTI19CLmkEditorListField @ 84 NONAME ; #<TI>#
+	_ZTI19CLmkEditorTextField @ 85 NONAME ; #<TI>#
+	_ZTI19CLmkPkgFindNewCatOp @ 86 NONAME ; #<TI>#
+	_ZTI19CLmkSelectorIconMgr @ 87 NONAME ; #<TI>#
+	_ZTI20CLmkEditorFieldArray @ 88 NONAME ; #<TI>#
+	_ZTI20CLmkSelectorImplBase @ 89 NONAME ; #<TI>#
+	_ZTI21CLmkAppLmSelectorImpl @ 90 NONAME ; #<TI>#
+	_ZTI21CLmkDlgLmSelectorImpl @ 91 NONAME ; #<TI>#
+	_ZTI21CLmkEditorNumberField @ 92 NONAME ; #<TI>#
+	_ZTI21CLmkLmItemListMemento @ 93 NONAME ; #<TI>#
+	_ZTI21CLmkPackageEditorImpl @ 94 NONAME ; #<TI>#
+	_ZTI21CLmkSaveLandmarkUtils @ 95 NONAME ; #<TI>#
+	_ZTI23CLmkAppSelectorImplBase @ 96 NONAME ; #<TI>#
+	_ZTI23CLmkDlgSelectorImplBase @ 97 NONAME ; #<TI>#
+	_ZTI23CLmkLocSettingsLauncher @ 98 NONAME ; #<TI>#
+	_ZTI23CLmkMultiSelectorDialog @ 99 NONAME ; #<TI>#
+	_ZTI23CLmkSelectorLBModelBase @ 100 NONAME ; #<TI>#
+	_ZTI24CLmkDlgCombiSelectorImpl @ 101 NONAME ; #<TI>#
+	_ZTI24CLmkDoubleGraphicLBModel @ 102 NONAME ; #<TI>#
+	_ZTI24CLmkSingleGraphicLBModel @ 103 NONAME ; #<TI>#
+	_ZTI25CLmkAppLmItemSelectorImpl @ 104 NONAME ; #<TI>#
+	_ZTI25CLmkEditorCoordinateField @ 105 NONAME ; #<TI>#
+	_ZTI25CLmkMultiSelectionLBModel @ 106 NONAME ; #<TI>#
+	_ZTI26CLmkDlgPackageSelectorImpl @ 107 NONAME ; #<TI>#
+	_ZTI26CLmkMapNavigationInterface @ 108 NONAME ; #<TI>#
+	_ZTI26TLmkLauncherContentHandler @ 109 NONAME ; #<TI>#
+	_ZTI27CLmkAppCategorySelectorImpl @ 110 NONAME ; #<TI>#
+	_ZTI27CLmkAppCategorySettingsImpl @ 111 NONAME ; #<TI>#
+	_ZTI27CLmkDlgCategorySelectorImpl @ 112 NONAME ; #<TI>#
+	_ZTIN17CLmkSelectorCache11CLinkedItemE @ 113 NONAME ; #<TI>#
+	_ZTV10CLmkSender @ 114 NONAME ; #<VT>#
+	_ZTV11CLmkCallCmd @ 115 NONAME ; #<VT>#
+	_ZTV11CLmkUiUtils @ 116 NONAME ; #<VT>#
+	_ZTV14CLmkEditorImpl @ 117 NONAME ; #<VT>#
+	_ZTV14CLmkGoToURLCmd @ 118 NONAME ; #<VT>#
+	_ZTV17CLmkSelectorCache @ 119 NONAME ; #<VT>#
+	_ZTV18CLmkSelectorDialog @ 120 NONAME ; #<VT>#
+	_ZTV18TLmkDeletionHelper @ 121 NONAME ; #<VT>#
+	_ZTV19CLmkEditorFieldBase @ 122 NONAME ; #<VT>#
+	_ZTV19CLmkEditorListField @ 123 NONAME ; #<VT>#
+	_ZTV19CLmkEditorTextField @ 124 NONAME ; #<VT>#
+	_ZTV19CLmkPkgFindNewCatOp @ 125 NONAME ; #<VT>#
+	_ZTV19CLmkSelectorIconMgr @ 126 NONAME ; #<VT>#
+	_ZTV20CLmkEditorFieldArray @ 127 NONAME ; #<VT>#
+	_ZTV20CLmkSelectorImplBase @ 128 NONAME ; #<VT>#
+	_ZTV21CLmkAppLmSelectorImpl @ 129 NONAME ; #<VT>#
+	_ZTV21CLmkDlgLmSelectorImpl @ 130 NONAME ; #<VT>#
+	_ZTV21CLmkEditorNumberField @ 131 NONAME ; #<VT>#
+	_ZTV21CLmkLmItemListMemento @ 132 NONAME ; #<VT>#
+	_ZTV21CLmkPackageEditorImpl @ 133 NONAME ; #<VT>#
+	_ZTV21CLmkSaveLandmarkUtils @ 134 NONAME ; #<VT>#
+	_ZTV23CLmkAppSelectorImplBase @ 135 NONAME ; #<VT>#
+	_ZTV23CLmkDlgSelectorImplBase @ 136 NONAME ; #<VT>#
+	_ZTV23CLmkLocSettingsLauncher @ 137 NONAME ; #<VT>#
+	_ZTV23CLmkMultiSelectorDialog @ 138 NONAME ; #<VT>#
+	_ZTV23CLmkSelectorLBModelBase @ 139 NONAME ; #<VT>#
+	_ZTV24CLmkDlgCombiSelectorImpl @ 140 NONAME ; #<VT>#
+	_ZTV24CLmkDoubleGraphicLBModel @ 141 NONAME ; #<VT>#
+	_ZTV24CLmkSingleGraphicLBModel @ 142 NONAME ; #<VT>#
+	_ZTV25CLmkAppLmItemSelectorImpl @ 143 NONAME ; #<VT>#
+	_ZTV25CLmkEditorCoordinateField @ 144 NONAME ; #<VT>#
+	_ZTV25CLmkMultiSelectionLBModel @ 145 NONAME ; #<VT>#
+	_ZTV26CLmkDlgPackageSelectorImpl @ 146 NONAME ; #<VT>#
+	_ZTV26CLmkMapNavigationInterface @ 147 NONAME ; #<VT>#
+	_ZTV26TLmkLauncherContentHandler @ 148 NONAME ; #<VT>#
+	_ZTV27CLmkAppCategorySelectorImpl @ 149 NONAME ; #<VT>#
+	_ZTV27CLmkAppCategorySettingsImpl @ 150 NONAME ; #<VT>#
+	_ZTV27CLmkDlgCategorySelectorImpl @ 151 NONAME ; #<VT>#
+	_ZTVN17CLmkSelectorCache11CLinkedItemE @ 152 NONAME ; #<VT>#
+	_ZThn4_N26CLmkMapNavigationInterface13HandleNotifyLEiiR20CAiwGenericParamListRKS0_ @ 153 NONAME ; #<thunk>#
+	_ZN21CLmkAppLmSelectorImpl24StartSearchingLandmarksLERK7TDesC16i @ 154 NONAME
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/uicontrols/eabi/LMKUIUu.def	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,152 @@
+EXPORTS
+	_ZN10CLmkSender4NewLER20CPosLandmarkDatabase @ 1 NONAME
+	_ZN11CLmkCallCmd4NewLEv @ 2 NONAME
+	_ZN11CLmkUiUtils16ChangeTitlePaneLEP7HBufC16 @ 3 NONAME
+	_ZN11CLmkUiUtils16ChangeTitlePaneLEi @ 4 NONAME
+	_ZN11CLmkUiUtils22ChangeLmNameLabelIconLER19MLmkEditorUiBuilderR13MLmkFieldData @ 5 NONAME
+	_ZN11CLmkUiUtils24GetFileWithCorrectDriveLER4TBufILi256EE @ 6 NONAME
+	_ZN14CLmkEditorImpl12SetMopParentEP15MObjectProvider @ 7 NONAME
+	_ZN14CLmkEditorImpl14SetHelpContextE15TCoeHelpContext @ 8 NONAME
+	_ZN14CLmkEditorImpl34DisableMapAndNavigationMenuOptionsEv @ 9 NONAME
+	_ZN14CLmkEditorImpl4NewLER20CPosLandmarkDatabaseR10CLmkSendermiP12CPosLandmark @ 10 NONAME
+	_ZN14CLmkEditorImpl4NewLER20CPosLandmarkDatabaseR10CLmkSendermiPmP12CPosLandmark @ 11 NONAME
+	_ZN14CLmkEditorImpl4NewLER20CPosLandmarkDatabaseR10CLmkSendermim @ 12 NONAME
+	_ZN14CLmkEditorImpl9ExecuteLDEv @ 13 NONAME
+	_ZN14CLmkGoToURLCmd4NewLEv @ 14 NONAME
+	_ZN20CLmkSelectorImplBase10SetMementoER15MLmkListMemento @ 15 NONAME
+	_ZN21CLmkAppLmSelectorImpl13CategoryNameLEv @ 16 NONAME
+	_ZN21CLmkAppLmSelectorImpl4NewLER20CPosLandmarkDatabaseR10CLmkSenderi @ 17 NONAME
+	_ZN21CLmkAppLmSelectorImpl4NewLER20CPosLandmarkDatabaseRK15MLmkListMementoR10CLmkSenderi @ 18 NONAME
+	_ZN21CLmkDlgLmSelectorImpl4NewLER20CPosLandmarkDatabase @ 19 NONAME
+	_ZN21CLmkDlgLmSelectorImpl4NewLER20CPosLandmarkDatabaseP20CPosLmSearchCriteria @ 20 NONAME
+	_ZN21CLmkPackageEditorImpl4NewLER20CPosLandmarkDatabaseR10CLmkParserR10CLmkSenderi @ 21 NONAME
+	_ZN21CLmkSaveLandmarkUtils4NewLER20CPosLandmarkDatabaseR10CLmkParser @ 22 NONAME
+	_ZN23CLmkAppSelectorImplBase12StoreMementoEv @ 23 NONAME
+	_ZN23CLmkAppSelectorImplBase14CreateFindBoxLERK11CCoeControl @ 24 NONAME
+	_ZN23CLmkAppSelectorImplBase14RestoreMementoEv @ 25 NONAME
+	_ZN23CLmkDlgSelectorImplBase12SetMopParentEP15MObjectProvider @ 26 NONAME
+	_ZN24CLmkDlgCombiSelectorImpl4NewLER20CPosLandmarkDatabase @ 27 NONAME
+	_ZN26CLmkDlgPackageSelectorImpl4NewLER20CPosLandmarkDatabaseR10CLmkParserR10CLmkSender @ 28 NONAME
+	_ZN26CLmkMapNavigationInterface11SetObserverEP28MLmkMapAndNavigationObserver @ 29 NONAME
+	_ZN26CLmkMapNavigationInterface13HandleNotifyLEiiR20CAiwGenericParamListRKS0_ @ 30 NONAME
+	_ZN26CLmkMapNavigationInterface15AttachMenuPaneLEP12CEikMenuPaneii @ 31 NONAME
+	_ZN26CLmkMapNavigationInterface15DetachInterestLEii @ 32 NONAME
+	_ZN26CLmkMapNavigationInterface18AttachAIWInterestLEii @ 33 NONAME
+	_ZN26CLmkMapNavigationInterface18ShowCategoryOnMapLEmi @ 34 NONAME
+	_ZN26CLmkMapNavigationInterface19GetLandmarkFromMapLEi @ 35 NONAME
+	_ZN26CLmkMapNavigationInterface19NavigateToLandmarkLEP12CPosLandmarki @ 36 NONAME
+	_ZN26CLmkMapNavigationInterface19ShowLandmarksOnMapLER13RPointerArrayI12CPosLandmarkEi @ 37 NONAME
+	_ZN26CLmkMapNavigationInterface20HandleMenuOperationLEiP12CEikMenuPanei @ 38 NONAME
+	_ZN26CLmkMapNavigationInterface22GetServiceCmdByMenuCmdEi @ 39 NONAME
+	_ZN26CLmkMapNavigationInterface30GetLandmarkFromMapForCategoryLEim @ 40 NONAME
+	_ZN26CLmkMapNavigationInterface4NewLER20CPosLandmarkDatabaseNS_9EViewTypeE @ 41 NONAME
+	_ZN26CLmkMapNavigationInterfaceD0Ev @ 42 NONAME
+	_ZN26CLmkMapNavigationInterfaceD1Ev @ 43 NONAME
+	_ZN26CLmkMapNavigationInterfaceD2Ev @ 44 NONAME
+	_ZN27CLmkAppCategorySelectorImpl17CurrentCategoryIdEv @ 45 NONAME
+	_ZN27CLmkAppCategorySelectorImpl4NewLER20CPosLandmarkDatabaseR10CLmkSenderi @ 46 NONAME
+	_ZN27CLmkAppCategorySettingsImpl21IsPredefinedCategoryLEv @ 47 NONAME
+	_ZN27CLmkAppCategorySettingsImpl4NewLER20CPosLandmarkDatabaseR10CLmkSenderi @ 48 NONAME
+	_ZN27CLmkDlgCategorySelectorImpl4NewLER20CPosLandmarkDatabaseii @ 49 NONAME
+	_ZN8LmkNotes13MessageQueryLER6TDes16i @ 50 NONAME
+	_ZN8LmkNotes16InformationNoteLEi @ 51 NONAME
+	_ZN8LmkNotes16OutOfMemoryNoteLEv @ 52 NONAME
+	_ZN8LmkNotes18CategoryEmptyNoteLE7TPtrC16 @ 53 NONAME
+	_ZN8LmkNotes18CategoryNameQueryLER6TDes16i @ 54 NONAME
+	_ZN8LmkNotes19LandmarksEmptyNoteLE7TPtrC16 @ 55 NONAME
+	_ZN8LmkNotes22AllLandmarksEmptyNoteLEv @ 56 NONAME
+	_ZN8LmkNotes24InformationNotewithTextLEi7TPtrC16 @ 57 NONAME
+	_ZN8LmkNotes26CategoryConfirmationQueryLEi @ 58 NONAME
+	_ZN8LmkNotes26LandmarkConfirmationQueryLEi @ 59 NONAME
+	_ZN8LmkNotes28LandmarkInCategoryEmptyNoteLE7TPtrC16S0_ @ 60 NONAME
+	_ZNK10CLmkSender16DisplaySendMenuLER12CEikMenuPaneii @ 61 NONAME
+	_ZNK10CLmkSender23DisplaySendCascadeMenuLER12CEikMenuPane @ 62 NONAME
+	_ZNK21CLmkLmItemListMemento15MemorizedItemIdEv @ 63 NONAME
+	_ZTI10CLmkSender @ 64 NONAME ; #<TI>#
+	_ZTI11CLmkCallCmd @ 65 NONAME ; #<TI>#
+	_ZTI11CLmkUiUtils @ 66 NONAME ; #<TI>#
+	_ZTI13CLmkMfneFloat @ 67 NONAME ; #<TI>#
+	_ZTI14CLmkEditorImpl @ 68 NONAME ; #<TI>#
+	_ZTI14CLmkGoToURLCmd @ 69 NONAME ; #<TI>#
+	_ZTI15CLmkFloatEditor @ 70 NONAME ; #<TI>#
+	_ZTI17CLmkMfneSeparator @ 71 NONAME ; #<TI>#
+	_ZTI17CLmkSelectorCache @ 72 NONAME ; #<TI>#
+	_ZTI18CLmkDistanceEditor @ 73 NONAME ; #<TI>#
+	_ZTI18CLmkSelectorDialog @ 74 NONAME ; #<TI>#
+	_ZTI18TLmkDeletionHelper @ 75 NONAME ; #<TI>#
+	_ZTI19CLmkEditorFieldBase @ 76 NONAME ; #<TI>#
+	_ZTI19CLmkEditorListField @ 77 NONAME ; #<TI>#
+	_ZTI19CLmkEditorTextField @ 78 NONAME ; #<TI>#
+	_ZTI19CLmkPkgFindNewCatOp @ 79 NONAME ; #<TI>#
+	_ZTI19CLmkSelectorIconMgr @ 80 NONAME ; #<TI>#
+	_ZTI20CLmkCoordinateEditor @ 81 NONAME ; #<TI>#
+	_ZTI20CLmkEditorFieldArray @ 82 NONAME ; #<TI>#
+	_ZTI20CLmkSelectorImplBase @ 83 NONAME ; #<TI>#
+	_ZTI21CLmkAppLmSelectorImpl @ 84 NONAME ; #<TI>#
+	_ZTI21CLmkDlgLmSelectorImpl @ 85 NONAME ; #<TI>#
+	_ZTI21CLmkEditorNumberField @ 86 NONAME ; #<TI>#
+	_ZTI21CLmkLmItemListMemento @ 87 NONAME ; #<TI>#
+	_ZTI21CLmkPackageEditorImpl @ 88 NONAME ; #<TI>#
+	_ZTI21CLmkSaveLandmarkUtils @ 89 NONAME ; #<TI>#
+	_ZTI23CLmkAppSelectorImplBase @ 90 NONAME ; #<TI>#
+	_ZTI23CLmkDlgSelectorImplBase @ 91 NONAME ; #<TI>#
+	_ZTI23CLmkMultiSelectorDialog @ 92 NONAME ; #<TI>#
+	_ZTI23CLmkSelectorLBModelBase @ 93 NONAME ; #<TI>#
+	_ZTI24CLmkDlgCombiSelectorImpl @ 94 NONAME ; #<TI>#
+	_ZTI24CLmkDoubleGraphicLBModel @ 95 NONAME ; #<TI>#
+	_ZTI24CLmkSingleGraphicLBModel @ 96 NONAME ; #<TI>#
+	_ZTI25CLmkAppLmItemSelectorImpl @ 97 NONAME ; #<TI>#
+	_ZTI25CLmkEditorCoordinateField @ 98 NONAME ; #<TI>#
+	_ZTI25CLmkMultiSelectionLBModel @ 99 NONAME ; #<TI>#
+	_ZTI26CLmkDlgPackageSelectorImpl @ 100 NONAME ; #<TI>#
+	_ZTI26CLmkMapNavigationInterface @ 101 NONAME ; #<TI>#
+	_ZTI26TLmkLauncherContentHandler @ 102 NONAME ; #<TI>#
+	_ZTI27CLmkAppCategorySelectorImpl @ 103 NONAME ; #<TI>#
+	_ZTI27CLmkAppCategorySettingsImpl @ 104 NONAME ; #<TI>#
+	_ZTI27CLmkDlgCategorySelectorImpl @ 105 NONAME ; #<TI>#
+	_ZTIN17CLmkSelectorCache11CLinkedItemE @ 106 NONAME ; #<TI>#
+	_ZTV10CLmkSender @ 107 NONAME ; #<VT>#
+	_ZTV11CLmkCallCmd @ 108 NONAME ; #<VT>#
+	_ZTV11CLmkUiUtils @ 109 NONAME ; #<VT>#
+	_ZTV13CLmkMfneFloat @ 110 NONAME ; #<VT>#
+	_ZTV14CLmkEditorImpl @ 111 NONAME ; #<VT>#
+	_ZTV14CLmkGoToURLCmd @ 112 NONAME ; #<VT>#
+	_ZTV15CLmkFloatEditor @ 113 NONAME ; #<VT>#
+	_ZTV17CLmkMfneSeparator @ 114 NONAME ; #<VT>#
+	_ZTV17CLmkSelectorCache @ 115 NONAME ; #<VT>#
+	_ZTV18CLmkDistanceEditor @ 116 NONAME ; #<VT>#
+	_ZTV18CLmkSelectorDialog @ 117 NONAME ; #<VT>#
+	_ZTV18TLmkDeletionHelper @ 118 NONAME ; #<VT>#
+	_ZTV19CLmkEditorFieldBase @ 119 NONAME ; #<VT>#
+	_ZTV19CLmkEditorListField @ 120 NONAME ; #<VT>#
+	_ZTV19CLmkEditorTextField @ 121 NONAME ; #<VT>#
+	_ZTV19CLmkPkgFindNewCatOp @ 122 NONAME ; #<VT>#
+	_ZTV19CLmkSelectorIconMgr @ 123 NONAME ; #<VT>#
+	_ZTV20CLmkCoordinateEditor @ 124 NONAME ; #<VT>#
+	_ZTV20CLmkEditorFieldArray @ 125 NONAME ; #<VT>#
+	_ZTV20CLmkSelectorImplBase @ 126 NONAME ; #<VT>#
+	_ZTV21CLmkAppLmSelectorImpl @ 127 NONAME ; #<VT>#
+	_ZTV21CLmkDlgLmSelectorImpl @ 128 NONAME ; #<VT>#
+	_ZTV21CLmkEditorNumberField @ 129 NONAME ; #<VT>#
+	_ZTV21CLmkLmItemListMemento @ 130 NONAME ; #<VT>#
+	_ZTV21CLmkPackageEditorImpl @ 131 NONAME ; #<VT>#
+	_ZTV21CLmkSaveLandmarkUtils @ 132 NONAME ; #<VT>#
+	_ZTV23CLmkAppSelectorImplBase @ 133 NONAME ; #<VT>#
+	_ZTV23CLmkDlgSelectorImplBase @ 134 NONAME ; #<VT>#
+	_ZTV23CLmkMultiSelectorDialog @ 135 NONAME ; #<VT>#
+	_ZTV23CLmkSelectorLBModelBase @ 136 NONAME ; #<VT>#
+	_ZTV24CLmkDlgCombiSelectorImpl @ 137 NONAME ; #<VT>#
+	_ZTV24CLmkDoubleGraphicLBModel @ 138 NONAME ; #<VT>#
+	_ZTV24CLmkSingleGraphicLBModel @ 139 NONAME ; #<VT>#
+	_ZTV25CLmkAppLmItemSelectorImpl @ 140 NONAME ; #<VT>#
+	_ZTV25CLmkEditorCoordinateField @ 141 NONAME ; #<VT>#
+	_ZTV25CLmkMultiSelectionLBModel @ 142 NONAME ; #<VT>#
+	_ZTV26CLmkDlgPackageSelectorImpl @ 143 NONAME ; #<VT>#
+	_ZTV26CLmkMapNavigationInterface @ 144 NONAME ; #<VT>#
+	_ZTV26TLmkLauncherContentHandler @ 145 NONAME ; #<VT>#
+	_ZTV27CLmkAppCategorySelectorImpl @ 146 NONAME ; #<VT>#
+	_ZTV27CLmkAppCategorySettingsImpl @ 147 NONAME ; #<VT>#
+	_ZTV27CLmkDlgCategorySelectorImpl @ 148 NONAME ; #<VT>#
+	_ZTVN17CLmkSelectorCache11CLinkedItemE @ 149 NONAME ; #<VT>#
+	_ZThn4_N26CLmkMapNavigationInterface13HandleNotifyLEiiR20CAiwGenericParamListRKS0_ @ 150 NONAME ; #<thunk>#
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/uicontrols/group/LmkUi.mmp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,164 @@
+/*
+* 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:    LandmarksUi Content File -    
+*
+*/
+
+
+
+
+
+
+
+
+// INCLUDES
+// To get the APP_LAYER_SYSTEMINCLUDE-definition
+#include <platform_paths.hrh>
+#include "../../inc/LmkUID.h"         // Common Landmarks UID definitions
+#include "../../inc/LmkDebugConfig.h" // Debug configuration
+#include <data_caging_paths.hrh>
+// Target information
+TARGET  LmkUi.dll
+TARGETTYPE  dll
+UID  0x0 KLmkUiControlsUID3
+
+CAPABILITY CAP_GENERAL_DLL
+
+VENDORID    VID_DEFAULT
+
+//exportunfrozen
+
+// Project source directory
+SOURCEPATH ../src
+
+// Source files
+
+SOURCE DllMain.cpp
+SOURCE CLmkEditorImpl.cpp
+SOURCE CLmkPackageEditorImpl.cpp
+SOURCE CLmkSelectorCache.cpp
+SOURCE CLmkSelectorIconMgr.cpp
+SOURCE CLmkUiUtils.cpp
+SOURCE LmkNotes.cpp
+SOURCE CLmkSelectorLBModelBase.cpp
+SOURCE CLmkDoubleGraphicLBModel.cpp
+SOURCE CLmkMultiSelectionLBModel.cpp
+SOURCE CLmkSingleGraphicLBModel.cpp
+SOURCE CLmkSelectorImplBase.cpp
+SOURCE CLmkAppSelectorImplBase.cpp
+SOURCE CLmkAppLmItemSelectorImpl.cpp
+SOURCE CLmkAppLmSelectorImpl.cpp
+SOURCE CLmkAppCategorySelectorImpl.cpp
+SOURCE CLmkAppCategorySettingsImpl.cpp
+SOURCE CLmkDlgSelectorImplBase.cpp
+SOURCE CLmkDlgLmSelectorImpl.cpp
+SOURCE CLmkDlgCategorySelectorImpl.cpp
+SOURCE CLmkDlgCombiSelectorImpl.cpp
+SOURCE CLmkDlgPackageSelectorImpl.cpp
+SOURCE CLmkSelectorDialog.cpp
+SOURCE CLmkMultiSelectorDialog.cpp
+SOURCE CLmkEditorFieldBase.cpp
+SOURCE CLmkEditorTextField.cpp
+SOURCE CLmkEditorListField.cpp
+SOURCE CLmkEditorNumberField.cpp
+SOURCE CLmkEditorCoordinateField.cpp
+SOURCE CLmkEditorFieldArray.cpp
+SOURCE LmkEditorFieldFactory.cpp
+SOURCE CLmkLmItemListMemento.cpp
+SOURCE CLmkSender.cpp
+SOURCE TLmkDeletionHelper.cpp
+SOURCE CLmkEmptyDialog.cpp
+SOURCE CLmkSaveLandmarkUtils.cpp
+SOURCE CLmkGoToUrlCmd.cpp
+SOURCE CLmkCallCmd.cpp
+SOURCE clmkmapnavigationinterface.cpp
+SOURCE lmkicondialog.cpp
+SOURCE lmkiconmap.cpp
+SOURCE CLmkPkgFindNewCatOp.cpp
+SOURCE Debug.cpp
+SOURCE CLmkLocSettingLauncher.cpp
+SOURCE cLmkcentralrepository.cpp
+SOURCE lmkwaitdlglauncher.cpp
+
+// Resources
+START RESOURCE ../data/lmkui.rss
+DEPENDS aknfep.rsg
+HEADER 
+TARGETPATH   RESOURCE_FILES_DIR  
+// Language
+LANGUAGE_IDS
+END
+
+
+
+// Resource Documents
+//DOCUMENT ../UiControlsRss/LmkEditor.rss
+
+// Userincludes
+USERINCLUDE . ../inc ../src ../../engine/inc ../../inc
+
+// Default system include paths for application layer modules.
+APP_LAYER_SYSTEMINCLUDE
+
+LIBRARY euser.lib cone.lib eikcore.lib bafl.lib aknskins.lib aknicon.lib
+LIBRARY eikcoctl.lib avkon.lib eikdlg.lib eikctl.lib
+LIBRARY commonengine.lib efsrv.lib egul.lib fbscli.lib 
+LIBRARY eposlandmarks.lib eposlmsearchlib.lib
+LIBRARY LmkEng.lib
+LIBRARY lbs.lib
+LIBRARY hlplch.lib
+LIBRARY sendui.lib
+LIBRARY CdlEngine.lib
+LIBRARY numberconversion.lib
+LIBRARY FeatMgr.lib
+LIBRARY AknLayout2.lib
+LIBRARY gdi.lib
+
+// Added for rel3.1 
+LIBRARY apparc.lib
+LIBRARY servicehandler.lib
+LIBRARY browserlauncher.lib
+LIBRARY ws32.lib
+
+//added for icon map change
+LIBRARY AknLayout2Scalable.lib
+LIBRARY BMPANIM.LIB
+LIBRARY bitgdi.lib
+LIBRARY CentralRepository.lib
+#ifdef __LMK_DEBUG_FLAG
+LIBRARY flogger.lib
+#endif
+//added for rel3.2 for positioning settings
+LIBRARY locsettingsuiclient.lib
+LIBRARY InetProtUtil.lib
+
+// For Sysutils
+LIBRARY sysutil.lib
+
+LIBRARY			aiwdialdata.lib
+LIBRARY         PhoneClient.lib                 //For Emergency call API
+
+// ----------- Touch feedback additions start
+#ifdef RD_TACTILE_FEEDBACK
+LIBRARY         touchfeedback.lib
+#endif //RD_TACTILE_FEEDBACK
+// ----------- Touch feedback additions end
+LIBRARY estor.lib 	// For TStreamId
+
+#if defined(WINS)
+ deffile   ../bwins/LMKUIU_32.def
+#elif defined(EABI)
+ deffile   ../eabi/LMKUIU_32.def
+#endif 
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/uicontrols/group/bld.inf	Wed Sep 01 12:31:27 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:    LandmarksUi Content File -    
+*	 This file provides the information required for building the
+*    	 whole of a Landmarks application.
+*
+*/
+
+
+
+
+
+
+
+
+PRJ_PLATFORMS
+DEFAULT
+
+
+PRJ_MMPFILES
+LmkUi.mmp
+
+
+PRJ_EXTENSIONS
+START EXTENSION s60/mifconv
+OPTION TARGETFILE lmkui.mif
+OPTION HEADERFILE lmkui.mbg
+OPTION SOURCES -c8,1 qgn_prop_lm_transport.svg -c8,1 qgn_prop_lm_sport.svg -c8,1 qgn_prop_lm_sightseeing.svg -c8,1 qgn_prop_lm_shopping.svg -c8,1 qgn_prop_lm_restaurant.svg -c8,1 qgn_prop_lm_public.svg -c8,1 qgn_prop_lm_people.svg -c8,1 qgn_prop_lm_outdoor.svg -c8,1 qgn_prop_lm_hotel.svg -c8,1 qgn_prop_lm_gene.svg -c8,1 qgn_prop_lm_fun.svg -c8,1 qgn_prop_lm_education.svg -c8,1 qgn_prop_lm_communication.svg -c8,1 qgn_prop_lm_church.svg -c8,1 qgn_prop_lm_business.svg -c8,1 qgn_prop_lm_area.svg
+END
+
+//  End of File  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/uicontrols/inc/CLmkAppCategorySelectorImpl.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,107 @@
+/*
+* 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:   	LandmarksUi Content File
+*				Application's (view-based) category selector impl class.
+*
+*/
+
+
+
+
+
+
+
+#ifndef CLMKAPPCATEGORYSELECTORIMPL_H
+#define CLMKAPPCATEGORYSELECTORIMPL_H
+
+//  INCLUDES
+#include "CLmkAppLmItemSelectorImpl.h"
+#include <coecobs.h>
+
+// FORWARD DECLARATIONS
+class CLmkAppLmSelectorImpl;
+class CAknSearchField;
+
+// CLASS DECLARATION
+
+/**
+*  Application's (view-based) category selector impl class.
+*
+*/
+class CLmkAppCategorySelectorImpl : public CLmkAppLmItemSelectorImpl
+    {
+    public:  // Constructors and destructor
+        /**
+        * Two-phased constructor.
+        * @param aDb database reference
+        * @param aSender landmark sender reference
+        * @param aFindBox
+        * @return newly instantiated object
+        */
+        IMPORT_C static CLmkAppCategorySelectorImpl* NewL(
+                                    CPosLandmarkDatabase& aDb,
+                                    CLmkSender& aSender,
+                                    TBool aFindBox );
+
+        /**
+        * Destructor.
+        */
+        ~CLmkAppCategorySelectorImpl();
+
+    public: // From CLmkSelectorImpl
+        void SetupListProviderL();
+        const CLmkListProviderBase& ListProvider() const;
+        IMPORT_C TInt CurrentCategoryId();
+
+    public: //from MLmkMapAndNavigationObserver
+        void HandleLmCreated(TPosLmItemId aNewLmkItemId);
+
+    protected: //from MLmkAOOperationObserver
+        void HandleOperationL( TOperationTypes aType,
+                              TReal32 aProgress,
+                              TInt aStatus );
+
+    protected: // from MCoeControlObserver
+        void HandleControlEventL( CCoeControl* aControl,TCoeEvent aEventType );
+
+    protected: // From MEikCommandObserver
+        void ProcessCommandL( TInt aCommandId );
+
+    protected: // From CLmkAppLmItemSelectorImpl
+        void ChangeIconL( TPosLmItemId aId, TInt aIconIndex, TInt aMaskIndex);
+        void ChangeIconsL( RArray<TPosLmItemId>& aIdArray, TInt aIconIndex, TInt aMaskIndex);
+
+    protected: // Constructors and destructor
+        /**
+        * C++ default constructor.
+        * @param aDb database reference
+        * @param aSender landmark sender reference
+        * @param aFindBox
+        */
+        CLmkAppCategorySelectorImpl( CPosLandmarkDatabase& aDb,
+                                     CLmkSender& aSender,
+                                     TBool aFindBox );
+
+        /**
+        * By default Symbian 2nd phase constructor is private.
+        */
+        void ConstructL();
+
+    private:
+    	CAknSearchField* iFindBox;
+    };
+
+#endif      // CLMKAPPCATEGORYSELECTORIMPL_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/uicontrols/inc/CLmkAppCategorySettingsImpl.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,131 @@
+/*
+* 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:    LandmarksUi Content File -
+*				Application's (view-based) category settings impl class.
+*
+*/
+
+
+
+
+
+
+
+#ifndef CLMKAPPCATEGORYSETTINGSIMPL_H
+#define CLMKAPPCATEGORYSETTINGSIMPL_H
+
+//  INCLUDES
+#include "CLmkAppLmItemSelectorImpl.h"
+#include "TLmkDeletionHelper.h"
+
+// FORWARD DECLARATIONS
+class CAknWaitDialog;
+
+// CLASS DECLARATION
+
+/**
+*  Application's (view-based) category settings impl class.
+*
+*/
+class CLmkAppCategorySettingsImpl : public CLmkAppLmItemSelectorImpl
+    {
+    public:  // Constructors and destructor
+        /**
+        * Two-phased constructor.
+        * @param aDb database reference
+        * @param aSender landmark sender reference
+        * @param aFindBox
+        * @return newly instantiated object
+        */
+        IMPORT_C static CLmkAppCategorySettingsImpl* NewL(
+                                    CPosLandmarkDatabase& aDb,
+                                    CLmkSender& aSender,
+                                    TBool aFindBox );
+
+
+        /**
+        * Destructor.
+        */
+        ~CLmkAppCategorySettingsImpl();
+
+    public: // From CLmkSelectorImpl
+        void SetupListProviderL();
+        const CLmkListProviderBase& ListProvider() const;
+
+    public: // From MEikCommandObserver
+        void ProcessCommandL( TInt aCommandId );
+
+
+    public:// New Member functions
+    	IMPORT_C TBool IsPredefinedCategoryL();
+
+    public: //from MLmkMapAndNavigationObserver
+        void HandleLmCreated(TPosLmItemId aNewLmkItemId);
+
+    protected: //from MLmkAOOperationObserver
+        void HandleOperationL( TOperationTypes aType,
+                              TReal32 aProgress,
+                              TInt aStatus );
+
+    protected: // From CLmkAppLmItemSelectorImpl
+        void ChangeIconL( TPosLmItemId aId, TInt aIconIndex, TInt aMaskIndex);
+        void ChangeIconsL( RArray<TPosLmItemId>& aIdArray, TInt aIconIndex, TInt aMaskIndex);
+        TBool HandleEventListReadyL();
+
+    protected: // Constructors and destructor
+        /**
+        * C++ default constructor.
+        * @param aDb database reference
+        * @param aSender landmark sender reference
+        * @param aFindBox
+        */
+        CLmkAppCategorySettingsImpl( CPosLandmarkDatabase& aDb,
+                                     CLmkSender& aSender,
+                                     TBool aFindBox );
+
+        /**
+        * By default Symbian 2nd phase constructor is private.
+        */
+        void ConstructL();
+
+    private: // New functions
+        /**
+        * Make new category
+        */
+        void NewCategoryCmdL();
+
+        /**
+        * Rename category
+        */
+        void RenameCategoryCmdL();
+
+        /**
+        * Delete category
+        */
+        void DeleteCategoryCmdL();
+
+    protected: // Data
+        /// helps updating the list after deletion
+        TLmkDeletionHelper iDeletionHelper;
+
+        /// Own: iBuffer
+        HBufC* iBuffer;
+
+        ///Own: iWaiNote
+        CAknWaitDialog* iWaitNote;
+    };
+
+#endif      // CLMKAPPCATEGORYSETTINGSIMPL_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/uicontrols/inc/CLmkAppLmItemSelectorImpl.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,226 @@
+/*
+* 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:    LandmarksUi Content File -
+*				Base class for application's (view-based) selectors
+*
+*/
+
+
+
+
+
+
+
+#ifndef CLMKAPPLMITEMSELECTORIMPL_H
+#define CLMKAPPLMITEMSELECTORIMPL_H
+
+//  INCLUDES
+#include "CLmkAppSelectorImplBase.h"
+#include "MLmkAOOperationObserver.h"
+#include "MLmkLocationObserver.h"
+#include "lmkwaitdlglauncher.h"
+#include <CLmkEditorDlg.h>
+
+// FORWARD DECLARATIONS
+class CLmkLmItemListProvider;
+class CLmkDbUtils;
+class CLmkLocationService;
+class TPosition;
+class CPosLandmark;
+class CLmkSender;
+class CLmkLocSettingsLauncher;
+
+
+// CLASS DECLARATION
+
+/**
+*  Base class for application's (view-based) selectors that list items
+*  having TPosLmItemId, i.e. using provider of type CLmkLmItemListProvider.
+*/
+class CLmkAppLmItemSelectorImpl
+: public CLmkAppSelectorImplBase,
+  public MLmkAOOperationObserver,
+  public MLmkLocationObserver,
+  public MLmkWaitDialogLauncherObserver
+    {
+    public:  // Constructors and destructor
+        /**
+        * Destructor.
+        */
+        ~CLmkAppLmItemSelectorImpl();
+
+    public: // New functions
+        /**
+        * Method for changing an icon of a listbox item. Calls templated
+        * method which should handle subclass-specific details.
+        */
+        void ChangeIconCmdL();
+        // Added for Bug Fix
+        void DiskSpaceBelowCriticalLevelL(
+									    TInt aBytesToWrite, TChar aDrive);
+
+		TInt CalculateLandmarkDisksize(
+    									const CPosLandmark& aLandmark);
+
+    public: // From CLmkAppSelectorImplBase
+        MLmkListMemento* MementoL();
+		/**
+		* Method to handle change in screen size.
+		* When the icon selection popup is shown screen size changes have to
+		* be propagated to the popup.
+		*/
+		void HandleScreenSizeChange();
+
+		TInt CurrentCategoryId();
+
+    public: //from MLmkMapAndNavigationObserver
+        void HandleLmCreated(TPosLmItemId aNewLmkItemId);
+
+    public://from MLmkWaitDialogLauncherObserver
+    	void HandleDialogDismissed( TInt aButtonId );
+
+    protected: // From MEikCommandObserver
+        void ProcessCommandL( TInt aCommandId );
+
+    protected: // From MLmkLocationObserver
+        void NotifyL( const TInt aStatus );
+        void NotifyErrorL( TInt aErrorCode );
+
+    protected: // New functions
+        /**
+        * Returns provider reference as CLmkLmItemListProvider type.
+        * @return provider reference
+        */
+        CLmkLmItemListProvider& LmItemListProvider();
+
+        /**
+        * Currently selected item's id
+        * @return TPosLmItemId
+        */
+        TPosLmItemId SelectedIdL();
+
+        /**
+        * Currently marked item ids
+        * @return TPosLmItemId array reference
+        */
+        RArray<TPosLmItemId>& MarkedItemIdsL();
+
+        /**
+        * Template method called by ChangeIconCmdL.
+        * @param aId
+        * @param aIconIndex
+        */
+        virtual void ChangeIconL( TPosLmItemId aId, TInt aIconIndex, TInt aMaskIndex) = 0;
+
+        /**
+        * Template method called by ChangeIconCmdL.
+        * @param aIdArray
+        * @param aIconIndex
+        */
+        virtual void ChangeIconsL( RArray<TPosLmItemId>& aIdArray,
+                                   TInt aIconIndex, TInt aMaskIndex) = 0;
+
+		IMPORT_C void LaunchPosSettingsL();
+        /**
+        * Initial landmark
+        * @param aLandmark
+        */
+        virtual void InitialLandmarkL( CPosLandmark* /*aLandmark*/ ){}
+
+        /**
+        * Method to change the mark index or indexes after adding
+        * new Landmark.
+        * @param None
+        */
+        void UpdateMarkIndexAfterAdditionL( TInt aIndexToBeSelected );
+        //resolves id, to be focussed after deletion.
+        void StoreIdTobeFocussedAfterDeletion( RArray<TPosLmItemId>& markedItemIds );
+        //sets item to focus after deletion
+        void SetFocusToItemAfterDeletionOfMarkedItems();
+
+    protected: // Constructors and destructor
+        /**
+        * C++ default constructor.
+        */
+        CLmkAppLmItemSelectorImpl( CPosLandmarkDatabase& aDb,
+                                   CLmkSender& aSender,
+                                   TBool aFindBox );
+
+        /**
+        * By default Symbian 2nd phase constructor is private.
+        */
+        void BaseConstructL();
+
+    private: //new functions
+        /**
+        * Make new landmark
+        */
+        void NewLandmarkCmdL();
+
+        /**
+        * Executes landmark editor with correct parameters for
+        * new landmark creation.
+        * @param aLandmark empty or initialized landmark for editing
+        */
+        void ExecuteNewLandmarkEditorL( CPosLandmark& aLandmark );
+        /**
+        * Request current location
+        */
+        void RequestCurrenLocationL();
+
+        /**
+        * Create new landmark from current location
+        * @param aPosition
+        */
+        void CreateLmkFromCurrentLocationL( const TPosition& aPosition );
+
+        static TInt MessageQueryCallBack( TAny* aPtr );
+
+    protected: // Data
+        ///Ref:
+        CLmkSender& iSender;
+
+        ///Own:
+        CLmkDbUtils* iDbUtils;
+
+        ///Own:
+        CLmkLocationService* iLocationService;
+
+        RArray<TPosLmItemId> iMarkedItemIds;
+
+        // If a new Item is added then the highlight will have to be
+        // adjusted to point to the currently added Item.
+        // For new Landmarks This flag will be set in this class
+        // For new Categories this flag will be set in the derived class
+        // And the flag is used in the respective derived classes.
+        TBool iNewListBoxItemAdded;
+
+        // Own: Pointer to Location Settings Launcher
+        CLmkLocSettingsLauncher* iLauncher;
+
+	    //this holds the landmark view dialog
+	    CLmkEditorImpl* iDlg;
+
+        /**
+         * Wait dialog launcher
+         * Owns
+         */
+        CLmkWaitDialogLauncher* iWaitDialogLauncher;
+        //item to focus after deletion
+        TPosLmItemId iFocusItemIdAfterDeletion;
+    };
+
+#endif      // CLMKAPPLMITEMSELECTORIMPL_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/uicontrols/inc/CLmkAppLmSelectorImpl.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,241 @@
+/*
+* Copyright (c) 2002-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:    LandmarksUi Content File -
+*				Application's (view-based) landmark selector impl class
+*
+*/
+
+
+
+
+
+
+
+#ifndef CLMKAPPLMSELECTORIMPL_H
+#define CLMKAPPLMSELECTORIMPL_H
+
+//  INCLUDES
+#include "CLmkAppLmItemSelectorImpl.h"
+#include "TLmkDeletionHelper.h"
+#include <CLmkEditorDlg.h>
+#include "CLmkAppSelectorImplBase.h"
+#include "mlmkdbsearchutilsobserver.h"
+#include "clmkcallcmd.h"
+
+// FORWARD DECLARATIONS
+class CPosLmCategoryCriteria;
+class MLmkListMemento;
+class CLmkDbSearchUtils;
+class CLmkGoToURLCmd;
+
+// CLASS DECLARATION
+
+/**
+*  Application's (view-based) landmark selector impl class.
+*
+*/
+class CLmkAppLmSelectorImpl : public CLmkAppLmItemSelectorImpl, public MLmkDbSearchUtilsObserver
+    {
+    public:  // Constructors and destructor
+        /**
+        * Two-phased constructor.
+        * @param aDb database reference
+        * @param aSender landmark sender reference
+        * @param aFindBox tells whether selector contains find box or not
+        * @return newly instantiated object
+        */
+        IMPORT_C static CLmkAppLmSelectorImpl* NewL(
+                                    CPosLandmarkDatabase& aDb,
+                                    CLmkSender& aSender,
+                                    TBool aFindBox );
+
+        /**
+        * Two-phased constructor.
+        * Creates lm selector based on memento of category view's
+        * current selection.
+        * @param aDb database reference
+        * @param aCategoryMemento category view state
+        * @param aSender landmark sender reference
+        * @param aFindBox tells whether selector contains find box or not
+        * @return newly instantiated object
+        */
+        IMPORT_C static CLmkAppLmSelectorImpl* NewL(
+                                    CPosLandmarkDatabase& aDb,
+                                    const MLmkListMemento& aCategoryMemento,
+                                    CLmkSender& aSender,
+                                    TBool aFindBox );
+
+        /**
+        * Destructor.
+        */
+        ~CLmkAppLmSelectorImpl();
+        /**
+        * @return ETrue if opened category is 'Uncategorized' else EFalse.
+        */
+        IMPORT_C TBool IsCriteriaUnCategorizedCat();
+
+    public: // New functions
+        /**
+        * Return category name, used when viewing category contents.
+        * If selector was not created with valid category memento parameter
+        * this method leaves with KErrNotSupported.
+        * @return category name
+        */
+        IMPORT_C TPtrC CategoryNameL();
+
+    public: // From CLmkSelectorImpl
+        void SetupListProviderL();
+        const CLmkListProviderBase& ListProvider() const;
+    public: // From MLmkDbSearchUtilsObserver
+    	void HandleCategorySearchNotifyL(RArray<TPosLmItemId> aArray);
+    	void HandleLmkSearchNotifyL();
+
+    public: //from MLmkMapAndNavigationObserver
+        void HandleLmCreated(TPosLmItemId aNewLmkItemId);
+
+    public: //from MLmkAOOperationObserver
+        void HandleOperationL( TOperationTypes aType,
+                              TReal32 aProgress,
+                              TInt aStatus );
+
+    public: // From MEikCommandObserver
+        void ProcessCommandL( TInt aCommandId );
+
+    protected: // From CLmkAppLmItemSelectorImpl
+        void ChangeIconL( TPosLmItemId aId, TInt aIconIndex, TInt aMaskIndex);
+        void ChangeIconsL( RArray<TPosLmItemId>& aIdArray, TInt aIconIndex, TInt aMaskIndex);
+        void InitialLandmarkL( CPosLandmark* aLandmark );
+        TBool HandleEventListReadyL();
+
+    public:  // From CLmkAppLmItemSelectorImpl
+        /**
+        * Following 3 methods are Wrapper methods for caller's menu and interest
+        * resources to AIW menu service handler
+        */
+        void AttachToAIWMenuL( TInt aMenuResourceId,
+        					   TInt aInterestResourceId);
+
+        void InitializeMenuPaneL( CEikMenuPane& aMenuPane,
+                                  TInt aMenuResourceId);
+
+        void ExecuteAIWCallCmdL( TInt aCommandId );
+        void AttachInterestL ( TInt aInterestResourceId );
+        //from CLmkAppSelectorImplBase
+        TInt ServiceCmdByMenuCmd( TInt aMenuCmd );
+
+        /**
+        * Checks if atleast one landmark with this field exist in database
+        */
+
+        TBool IsLmWithThisFieldExistL( TLmkAppCmdId  aFieldId);
+
+        virtual TInt GetSelectedLandmarksL(RPointerArray<CPosLandmark> &aArray);
+
+		virtual TBool IsLandmarkDataEmptyL(CPosLandmark* aLandmark);
+
+		/**
+        * Removes opened category from the selected landmarks.
+        */
+		IMPORT_C void RemoveLandmarksFromCategoryL();
+
+		/**
+        * From CLmkListProviderBase
+        * Asynchronous starting of Landmarks Search to prepare the list.
+        */
+		IMPORT_C void StartSearchingLandmarksL(const TDesC& aSearchPattern,
+    								  TBool aSearchOnlyInPreviousMatches);
+
+    protected: // Constructors and destructor
+        /**
+        * C++ default constructor.
+        * @param aDb database reference
+        * @param aFindBox
+        * @return newly object
+        */
+        CLmkAppLmSelectorImpl( CPosLandmarkDatabase& aDb,
+                               CLmkSender& aSender,
+                               TBool aFindBox );
+
+        /**
+        * By default Symbian 2nd phase constructor is private.
+        */
+        void ConstructL();
+
+        /**
+        * By default Symbian 2nd phase constructor is private.
+        * @param aCategoryMemento
+        */
+        void ConstructL( const MLmkListMemento& aCategoryMemento );
+
+    private: // New functions
+        /**
+        * Edit landmark
+        */
+        void EditLandmarkCmdL(TLmkEditorMode aEditMode);
+
+        /**
+        * Delete landmark(s)
+        */
+        void DeleteLandmarksCmdL();
+
+        /**
+        * Add landmark(s) to category(s)
+        */
+        void AddToCatCmdL();
+
+        /**
+        * Gets the position field value for a selected Landmark
+        */
+        TInt GetPositionFieldForSelectedLmL(
+	                        TPositionFieldId  aFieldId,
+	                        HBufC& aFieldValue);
+		/**
+		* Closes wait note
+		*/
+		void CloseWaitNoteL();
+
+
+    protected: // Data
+        /// helps updating the list after deletion
+        TLmkDeletionHelper iDeletionHelper;
+
+        ///Own:
+        CPosLmCategoryCriteria* iCriteria;
+
+        ///Own:
+        HBufC* iCategoryName;
+
+        ///Own: pointer to db serach utils
+        CLmkDbSearchUtils* iDbSearchUtils;
+
+        /// Own: Wait dialog displayed while searching landmarks
+        CAknWaitDialog* iWaitNote;
+    private:     
+    	// own
+        CLmkCallCmd *iLmkCallCmd;	          
+        // own
+        TInt iMarkedCatCountAdded;        
+        // own
+        CLmkGoToURLCmd* iLmkGoToURLCmd;        
+        // own
+        CLmkAOOperation* iOperation;
+        // own
+        TInt  iCatRemoveFlag;				
+		// to check dlg open or not                
+        TBool iIsDlgOpen; 
+    };
+
+#endif      // CLMKAPPLMSELECTORIMPL_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/uicontrols/inc/CLmkAppSelectorImplBase.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,233 @@
+/*
+* Copyright (c) 2002-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:    LandmarksUi Content File -
+*				Base class for application's (view-based) selectors.
+*
+*/
+
+
+
+
+
+
+
+#ifndef CLMKAPPSELECTORIMPLBASE_H
+#define CLMKAPPSELECTORIMPLBASE_H
+
+//  INCLUDES
+#include "CLmkSelectorImplBase.h"
+#include <eikcmobs.h>
+#include <eikmenup.h>
+#include "landmarks.hrh"
+#include "MLmkMapAndNavigationObServer.h"
+
+#include <coecobs.h>
+
+// FORWARD DECLARATIONS
+class CEikTextListBox;
+class CCoeControl;
+class CAknSearchField;
+class MLmkMskObserver;
+#ifdef RD_SCALABLE_UI_V2
+class CAknListBoxFilterItems;
+#endif //RD_SCALABLE_UI_V2
+// CLASS DECLARATION
+
+/**
+*  Base class for application's (view-based) selectors.
+*
+*/
+class CLmkAppSelectorImplBase
+: public CLmkSelectorImplBase,
+  public MEikCommandObserver,
+  public MLmkMapAndNavigationObserver
+  #ifdef RD_SCALABLE_UI_V2
+  ,public MCoeControlObserver
+  #endif //RD_SCALABLE_UI_V2
+  {
+    public:  // Constructors and destructor
+        /**
+        * Destructor.
+        */
+        ~CLmkAppSelectorImplBase();
+
+    public: // New functions
+        /**
+        * Stores status to memento.
+        * Can be used after memento has been set.
+        */
+        IMPORT_C void StoreMemento();
+
+        /**
+        * Restores status of a memento. If list is not ready yet then
+        * restoration is postponed a while.
+        * Can be used after memento has been set.
+        */
+        IMPORT_C void RestoreMemento();
+
+        /**
+        * Creates a list box.
+        * Leaves with KErrNotSupported if wrong control type is given.
+        * @param aParent parent for listbox control (usually container)
+        * @param aControlType listbox type, i.e. EAknCt???ListBox
+        * @param aFlags construction flags, e.g. EAknListBoxMarkableList
+        * @param aEmptyLBResource empty listbox text
+        * @return newly instantiated object
+        */
+        virtual CEikTextListBox& CreateListBoxL( CCoeControl* aParent,
+                                                 TInt aControlType,
+                                                 TInt aFlags,
+                                                 TInt aEmptyLBPrimResource ,TInt aEmptyLBSecResource );
+
+		/**
+		* When the screen size changes the event needs to be propagated
+		* to UI components in the selector classes. This will be triggered
+		* from the UI Container classes
+		*/
+		virtual void HandleScreenSizeChange();
+
+        IMPORT_C CAknSearchField* CreateFindBoxL(const CCoeControl &aParent);
+        /**
+		* IT returns an array of items marked.
+		* @return Array of marked item Id's.
+		*/
+        IMPORT_C const CArrayFix<TInt>* MarkedIndexes();
+
+        /**
+		* @return Returns the current item index
+		*/
+        IMPORT_C TInt CurrentItemIndex();
+
+         /**
+        * Sets the observer, to be called , when MSK update is
+        * required
+        * @param aMskObserver reference
+        */
+        IMPORT_C void SetMskObserver(MLmkMskObserver* aMskObserver);
+    public: // From CLmkSelectorImpleBase
+        TInt ListVisibleItemCount();
+        TInt ListMarkedItemCountL();
+
+    public: // From MLmkListProviderObserver
+        void HandleListProviderEvent( TLmkListProviderEventType aEvent );
+        void HandleListProviderError( TInt aError );
+
+    public: //from MLmkMapAndNavigationObserver
+        void HandleLmCreated(TPosLmItemId /*aNewLmkItemId*/){}
+
+    public :// New Method
+    	CAknSearchField* FindBox();
+
+    protected: // New functions
+        /**
+        * Helper function for making empty title
+        * @param aListbox, listbox instance
+        * @param aResourceText, resourse id
+        */
+         void MakeEmptyTextListBoxL( CEikTextListBox& aListBox,
+                                    TInt aResourcePrimText, TInt aResourceSecText,
+                                    TBool aRequestFromFindBox = EFalse ) const;
+
+
+        /**
+        * Helper function for creating and setting a listbox model
+        * @param aListbox, listbox instance
+        * @param aControlType, listbox control type
+        * @param aProvider, engine for listbox model
+        */
+        virtual void CreateListBoxModelL( CEikTextListBox& aListBox,
+                                          TInt aControlType,
+                            CLmkListProviderBase& aProvider ) const;
+
+        /**
+        * Helper function which allows subclasses to handle ELmkEventListReady
+        * in specific manner. By default list is reseted and redrawn.
+        * @return ETrue if subclass handled the event, EFalse otherwise
+        */
+        virtual TBool HandleEventListReadyL();
+
+        //Helper function to enable or disable find box
+        void ShowFindBoxL( TBool aVisible );
+
+        public: // New functions
+        /**
+        * Following are the helper wrapper functions which allow
+        * the Landmarks UI control libary clients to setup AIW services
+        * for invoking phone call. This will be used by Landmarks App or
+        * Landmarks Message Viewer app
+        *
+        */
+
+        virtual void AttachToAIWMenuL( TInt aMenuResourceId,
+        					   TInt aInterestResourceId);
+
+        virtual void InitializeMenuPaneL( CEikMenuPane& aMenuPane,
+                                  TInt aMenuResourceId);
+
+        virtual void ExecuteAIWCallCmdL( TInt aCommandId );
+
+        virtual TBool IsLmWithThisFieldExistL ( TLmkAppCmdId  aFieldId);
+
+        virtual void AttachInterestL ( TInt aInterestResourceId );
+
+        /**
+        * This acts as a wrapper interface, but the actual
+        * derive class implements the functionality to call
+        * proper call service handler.
+        */
+        virtual TInt ServiceCmdByMenuCmd( TInt aMenuCmd );
+
+    #ifdef RD_SCALABLE_UI_V2
+    protected: // from MCoeControlObserver
+        void HandleControlEventL( CCoeControl* aControl,TCoeEvent aEventType );
+	#endif //RD_SCALABLE_UI_V2
+
+    protected: // Constructors and destructor
+        /**
+        * C++ default constructor.
+        * @param aDb reference
+        * @param aFindBox
+        * @return newly instantiated object
+        */
+        CLmkAppSelectorImplBase( CPosLandmarkDatabase& aDb,
+                                 TBool aFindBox );
+
+        /**
+        * By default Symbian 2nd phase constructor is private.
+        */
+        void BaseConstructL();
+
+    protected: // Data
+        ///Own:
+        CEikTextListBox* iListBox;
+
+        TBool iFindBox;
+
+        CAknSearchField* iSearchBox;
+       // TInt iEmptyLBResource;
+        TInt iEmptyLBPrimResource;
+         TInt iEmptyLBSecResource;
+        //ref
+        MLmkMskObserver* iMskObserver;
+
+	#ifdef RD_SCALABLE_UI_V2
+        CAknListBoxFilterItems* iFilter;
+    #endif //RD_SCALABLE_UI_V2
+
+        TPosLmItemId iNewLmkItemId;
+    };
+
+#endif      // CLMKAPPSELECTORIMPLBASE_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/uicontrols/inc/CLmkCoordinateEditor.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,129 @@
+/*
+* 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:    LandmarksUi Content File -    Coordinate editor for editor/viewer form
+*
+*/
+
+
+
+
+
+
+
+
+#ifndef CLmkCoordinateEditor_h
+#define CLmkCoordinateEditor_h
+
+//  INCLUDES
+#include "CLmkFloatEditor.h"
+
+/// FORWARD DECLARATION
+class CEikMfneSymbol;
+class CLmkMfneSeparator;
+
+// CLASS DECLARATION
+
+/**
+ *  CLmkCoordinateEditor extend ClmkFloatEditor's functionality
+ *  Implements both latitude and longitude editors.
+ *  Underlying floating value is just a value, which user inputs.
+ *  Its upper limit depends on editor type: latitude or longitude.
+ *  Lower limit is always 0, because coordinate sign is represented
+ *  by cardinal point.
+ *  Number() always returns coordinate in degrees. Cardinal points
+ *  are represented by number's sign.
+ */
+class CLmkCoordinateEditor : public CLmkFloatEditor
+    {
+    public:
+        enum TEditorType
+            {
+            ELatitudeEditor,
+            ELongitudeEditor
+            };
+
+    public:  // Constructors and destructor
+        /**
+        * Constructor
+        * @return newly instantiated object
+        */
+        CLmkCoordinateEditor();
+
+        /**
+        * Destructor.
+        */
+        virtual ~CLmkCoordinateEditor();
+
+    	/**
+    	* By default Symbian 2nd phase constructor
+    	*/
+    	void ConstructL(TReal aInitialValue,
+                        TEditorType aType);
+
+    public: // From CLmkFloatEditor
+
+        /** Sets value */
+	    void SetNumber(TReal aNumber);
+
+        /** Gets value */
+	    TReal Number() const;
+
+    protected: // From CLmkFloatEditor
+
+        void HandleValueChanged();
+        void HandleCustomFieldChanged(TInt aCustomFieldIndex);
+
+        void HandleEnter();
+        void HandleExit();
+
+    protected: // new functions
+
+        // only NS or WE may be shown
+        enum TCardinalPoint
+        	{
+        	ECardinalNone,
+        	ECardinalNorth,
+        	ECardinalSouth,
+        	ECardinalEast,
+        	ECardinalWest
+        	};
+
+        /** Abs(180) is allowed only for West */
+        void CheckEastLongitude();
+
+        void SetCardinal(TCardinalPoint aUnit);
+        TCardinalPoint Cardinal() const;
+        TCardinalPoint DefaultCardinal();
+
+        void ConstructDegreeMarkFieldL();
+        void ConstructCardinalPointFieldL();
+
+        void ShowDegreeAndCardinal(TBool aVisible);
+
+    private: //data
+
+        /// Ref:
+        CLmkMfneSeparator* iDegreeField;
+
+        /// Ref:
+        CEikMfneSymbol* iCardinalField;
+
+        TEditorType iEditorType;
+
+        HBufC* iDegreeMark;
+    };
+
+#endif      // CLmkCoordinateEditor_h
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/uicontrols/inc/CLmkDecimalEditor.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,118 @@
+/*
+* 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:    LandmarksUi Content File -    Float editor for editor/viewer form
+*
+*/
+
+
+
+
+
+
+#ifndef CLMKDECIMALEDITOR_H
+#define CLMKDECIMALEDITOR_H
+
+//  INCLUDES
+#include <eikmfne.h>
+
+// CLASS DECLARATION
+
+/**
+* CLmkDecimalEditor class
+* Contain two number editor and one separator.
+*/
+class CLmkDecimalEditor : public CEikMfneField
+	{
+public:
+	enum
+		{
+		EFillWithLeadingZeros			=0x1,
+		EPreserveOldWidthBeforeEditing	=0x2,
+		ERepresentsYear					=0x4,
+		EPublicallySettableFlags		=EFillWithLeadingZeros|EPreserveOldWidthBeforeEditing|ERepresentsYear
+		};
+private:
+	enum
+		{
+		EIsBeingEditedWithCursor		=0x8,
+		EIsUninitialised				=0x10
+		};
+private:
+	CLmkDecimalEditor(TInt aMinimumValue, TInt aMaximumValue, TUint32 aFlags);
+	void ConstructL(TInt aNumberOfZeros);
+public:
+	virtual ~CLmkDecimalEditor();
+	static CLmkDecimalEditor* NewL(const CFont& aFont, TResourceReader& aResourceReader);
+	static CLmkDecimalEditor* NewL(const CFont& aFont, TInt aMinimumValue, TInt aMaximumValue, TInt aInitialValue, TUint32 aFlags, TInt aNumberOfZeros);
+	void SetMinimumAndMaximum(TInt aMinimumValue, TInt aMaximumValue, const CFont& aFont); // only values inside the initial minimum and maximum are permitted
+	void GetMinimumAndMaximum(TInt& aMinimumValue, TInt& aMaximumValue) const;
+	void SetValue(TInt aValue, const CFont& aFont);
+	TReal Value() const;
+	virtual TBool IsValid() const;
+
+	void SetUninitialised(TBool aUninitialised);
+	TBool IsUninitialised() const;
+
+public:	// International digit support is only public to to eikstd
+	void SetDigitType(TDigitType aDigitType, const CFont& aFont);
+	TDigitType DigitType() const;
+
+	// Derive digit display type from locale information
+	void RefreshDigitType(const CFont& aFont);
+
+public:
+	TBool IsTextNull() const;
+private: // framework
+	virtual TInt MaximumWidthInPixels(const CFont& aFont, TBool aShrinkToMinimumSize);
+	virtual TCoeInputCapabilities InputCapabilities() const;
+	virtual TBool IsEditable() const;
+	virtual THighlightType HighlightType() const;
+	virtual void HandleKey(const CFont& aFont, const TKeyEvent& aKeyEvent, TBool aInterpretLeftAndRightAsEarEvents, TBool& aDataAltered, TInt& aHighlightIncrement);
+	virtual void HandleDeHighlight(const CFont& aFont, CEikonEnv& aEikonEnv, TBool& aDataAltered, TBool& aError);
+	virtual const TDesC& Text() const;
+	void InvalidFieldAlert() const;
+	TInt AdditionalWidthForHighlights(const CFont& aFont) const;
+	TInt WidthInPixels(const CFont& aFont) const;
+
+private:
+	TInt MaximumNumberOfDigits() const;
+	TInt NumberOfDigits() const;
+	void SetTextToValue(TInt aValue, const CFont& aFont);
+	TInt ValueFromText() const;
+	TBool ConvertsIntoValidValue(TInt& aValue) const;
+
+private: // International digit support
+	TChar NormalizeDigit(TChar aChar);
+	TText ZeroCharacter() const;
+	TText NegativeCharacter() const;
+
+private:
+	TInt iMinimumValue;
+	TInt iMaximumValue;
+	TInt iMaxDigits;
+	TUint32 iFlags;
+	HBufC* iText;
+	TChar iNudgeCharMinus;
+	TChar iNudgeCharPlus;
+	TInt iMaxDigitsMinimumValue;
+    TInt iMaxDigitsMaximumValue;
+	TDigitType	iDigitType;
+	TInt iNumberOfZeros;
+
+protected:
+    // Ref
+    CEikonEnv*	iEnv;
+	};
+
+#endif
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/uicontrols/inc/CLmkDistanceEditor.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,132 @@
+/*
+* 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:    LandmarksUi Content File -    Distance editor for editor/viewer form
+*
+*/
+
+
+
+
+
+
+
+
+#ifndef CLmkDistanceEditor_h
+#define CLmkDistanceEditor_h
+
+//  INCLUDES
+#include "CLmkFloatEditor.h"
+#include "landmarks.hrh"
+
+/// FORWARD DECLARATION
+class CEikMfneSymbol;
+
+// CLASS DECLARATION
+
+/**
+ *  CLmkDistanceEditor extends CLmkFloatEditor's functionality.
+ *  Implements both metric and imperial units.
+ *  Underlying floating value is just a value, which user inputs.
+ *  Its limits depend on current unit.
+ *  Number() method returns distance always in meters.
+ */
+class CLmkDistanceEditor : public CLmkFloatEditor
+    {
+    public:
+        // Constructors and destructor
+        /**
+         * Create CLmkDistanceEditor object
+         * @return newly instantiated object
+         */
+        CLmkDistanceEditor();
+
+        /**
+         * Destructor.
+         */
+        virtual ~CLmkDistanceEditor();
+
+    	/**
+    	 * By default Symbian 2nd phase constructor
+         * @param aMinimumValue
+         * @param aMaximumValue
+         * @param aInitialValue
+         * @param aType
+    	 */
+    	void ConstructL(TReal32 aMinimumValue,
+                        TReal32 aMaximumValue,
+                        TReal32 aInitialValue);
+
+    public: // From CLmkFloatEditor
+
+        /** Sets value */
+	    void SetNumber(TReal aNumber);
+
+        /** Gets value */
+	    TReal Number() const;
+
+    protected: // From CLmkFloatEditor
+
+        void HandleCustomFieldChanged(TInt aCustomFieldIndex);
+
+        void HandleEnter();
+        void HandleExit();
+
+    protected: // new functions
+
+        enum TDistanceUnit
+        	{
+        	EUnitNone,
+        	EUnitMeters,
+        	EUnitKilometers,
+        	EUnitFeet,
+        	EUnitMiles
+        	};
+
+        /** Converts from meters to given units */
+        TReal32 MetersToUnits(
+            TReal32 aMeters,
+            TDistanceUnit aToUnits) const;
+
+        /** Converts from given units to meters */
+        TReal32 UnitsToMeters(
+            TReal32 aValue,
+            TDistanceUnit aFromUnits) const;
+
+
+        /** Updates min and max limits in editor field according to
+         *  current units
+         */
+        void UpdateValueLimits();
+
+        void SetUnit(TDistanceUnit aUnit);
+        TDistanceUnit Unit() const;
+        TDistanceUnit DefaultUnit() const;
+
+        void ConstructUnitFieldL();
+
+        void ShowUnits(TBool aVisible);
+
+    private: //data
+        TReal   iMinimumValue;
+        TReal   iMaximumValue;
+
+        TDistanceUnit iLastUsedUnit;
+
+        // Ref:
+        CEikMfneSymbol* iUnitsField;
+    };
+
+#endif      // CLmkDistanceEditor_h
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/uicontrols/inc/CLmkDlgCategorySelectorImpl.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,93 @@
+/*
+* 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:    LandmarksUi Content File -    Common UI's (dialog-based) category selector impl class.
+*
+*/
+
+
+
+
+
+
+
+#ifndef CLMKDLGCATEGORYSELECTORIMPL_H
+#define CLMKDLGCATEGORYSELECTORIMPL_H
+
+//  INCLUDES
+#include "CLmkDlgSelectorImplBase.h"
+
+// FORWARD DECLARATIONS
+
+// CLASS DECLARATION
+
+/**
+*  Common UI's (dialog-based) category selector impl class.
+*
+*/
+class CLmkDlgCategorySelectorImpl : public CLmkDlgSelectorImplBase
+    {
+    public:  // Constructors and destructor
+        /**
+        * Two-phased constructor.
+        * @param aDb database reference
+        * @param aShowEmptyCategories if ETrue also empty categories are shown
+        * @return newly instantiated object
+        */
+        IMPORT_C static CLmkDlgCategorySelectorImpl* NewL(
+                                    CPosLandmarkDatabase& aDb,
+                                    TBool aShowEmptyCategories,
+                                    TBool aShowBlankNaviPane = EFalse);
+
+        /**
+        * Destructor.
+        */
+        ~CLmkDlgCategorySelectorImpl();
+
+    public: // From CLmkSelectorImplBase
+        void SetupListProviderL();
+        const CLmkListProviderBase& ListProvider() const;
+        void GetDlgResources( TBool aIsSingleSelector,
+                              TInt& aTitlePaneResource,
+                              TInt& aMenuBarResource,
+                              TInt& aDialogResource ) const;
+
+    protected: // From MLmkListProviderObserver
+        void HandleListProviderEvent( TLmkListProviderEventType aEvent );
+        void HandleListProviderError( TInt aError );
+
+    protected:  // Constructors and destructor
+        /**
+        * C++ default constructor.
+        * @param aDb
+        * @param aShowEmptyCategories
+        * @return newly instantiated object
+        */
+        CLmkDlgCategorySelectorImpl( CPosLandmarkDatabase& aDb,
+                                  	 TBool aShowEmptyCategories,
+                                	 TBool aShowBlankNaviPane );
+
+        /**
+        * By default Symbian 2nd phase constructor is private.
+        */
+        void ConstructL();
+
+    private:    // Data
+        ///
+        TBool iShowEmptyCategories;
+        TBool iShowBlankNaviPane;
+    };
+
+#endif      // CLMKDLGCATEGORYSELECTORIMPL_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/uicontrols/inc/CLmkDlgCombiSelectorImpl.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,241 @@
+/*
+* 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:    LandmarksUi Content File -    Common UI's (dialog-based) landmark selector impl class.
+*
+*/
+
+
+
+
+
+
+
+#ifndef CLMKDLGCOMBISELECTORIMPL_H
+#define CLMKDLGCOMBISELECTORIMPL_H
+
+//  INCLUDES
+#include "CLmkDlgSelectorImplBase.h"
+#include "MLmkListProviderObserver.h"
+#include "MLmkListMemento.h"
+#include <eikcmobs.h>       // MEikCommandObserver
+#include <AknTabObserver.h>
+// FORWARD DECLARATIONS
+class CLmkSelectorDialog;
+class CAknNavigationControlContainer;
+class CAknTabGroup;
+class CAknNavigationDecorator;
+
+// CLASS DECLARATION
+
+/**
+*  Common UI's (dialog-based) landmark selector impl class.
+*  This selector contains both landmark by name & by category tabs
+*  and it utilizes landmark and category selectors to do that.
+*
+*/
+class CLmkDlgCombiSelectorImpl : public CLmkDlgSelectorImplBase, public MAknTabObserver
+    {
+    private:    // Type definitions
+
+        enum TLmkSelectorState
+            {
+            ELmkLandmarkSelector = 0,   // used as index in iSelectors
+            ELmkCategorySelector,       // used as index in iSelectors
+            ELmkFilteredLmSelector,     // used as index in iSelectors
+            ELmkInitialState,
+            ELmkFinalState,
+            };
+
+        enum TLmkSelectorStateEvent
+            {
+            ELmkSelectorStart = 0,
+            ELmkSelectorStop,
+            ELmkSelectorNavigating,
+            ELmkSelectorAbort,
+            ELmkSelectorNoEvent
+            };
+
+    public:  // Constructors and destructor
+        /**
+        * Two-phased constructor.
+        * @param aDb database reference
+        * @return newly instantiated object
+        */
+        IMPORT_C static CLmkDlgCombiSelectorImpl* NewL(
+                                    CPosLandmarkDatabase& aDb );
+
+        /**
+        * Destructor.
+        */
+        ~CLmkDlgCombiSelectorImpl();
+
+    public: // From CLmkSelectorImplBase
+        void StopExecutionL();
+        TInt ExecuteL( TPosLmItemId& aOpenedItem,
+                       TBool aAlwaysModifyOpened = EFalse );
+        TInt ExecuteL( RArray<TPosLmItemId>& aSelectedItems,
+                       TBool aAlwaysModifySelected = EFalse );
+
+        void SetupListProviderL();
+        const CLmkListProviderBase& ListProvider() const;
+        void GetDlgResources( TBool aIsSingleSelector,
+                              TInt& aTitlePaneResource,
+                              TInt& aMenuBarResource,
+                              TInt& aDialogResource ) const;
+        
+        void SetDialogTitleL(const TDesC& aTitle);
+
+    protected: // From CLmkDlgSelectorImplBase
+        void StoreMemento();
+        void RestoreMemento();
+
+    protected: // From MEikCommandObserver
+        void ProcessCommandL( TInt aCommandId );
+
+    protected: // From MLmkNavigationObserver
+        TKeyResponse HandleNavigationEventL( const TKeyEvent& aKeyEvent );
+        void HandleLaunchingEventL();
+        void HandleClosingEventL();
+
+	protected: // From MAknTabObserver
+		void TabChangedL( TInt aIndex );
+
+    protected:  // New functions
+        /**
+        * Handle any state event.
+        * @param aEvent
+        * @return TLmkSelectorStateEvent
+        */
+        TLmkSelectorStateEvent HandleAnyStateEventL(
+                                    TLmkSelectorStateEvent aEvent );
+
+        /**
+        * Handle initial state event.
+        * @param aEvent
+        * @return TLmkSelectorStateEvent
+        */
+        TLmkSelectorStateEvent HandleInitialStateEventL(
+                                    TLmkSelectorStateEvent aEvent );
+
+        /**
+        * Handle landmark selector state event.
+        * @param aEvent
+        * @return TLmkSelectorStateEvent
+        */
+        TLmkSelectorStateEvent HandleLandmarkSelectorStateEventL(
+                                    TLmkSelectorStateEvent aEvent );
+
+        /**
+        * Handle category selector state event.
+        * @param aEvent
+        * @return TLmkSelectorStateEvent
+        */
+        TLmkSelectorStateEvent HandleCategorySelectorStateEventL(
+                                    TLmkSelectorStateEvent aEvent );
+
+        /**
+        * Handle filtered selector state event.
+        * @param aEvent
+        * @return TLmkSelectorStateEvent
+        */
+        TLmkSelectorStateEvent HandleFilteredLmSelectorStateEventL(
+                                    TLmkSelectorStateEvent aEvent );
+
+        /**
+        * Handle default state state evelt.
+        * @param aEvent
+        * @return TLmkSelectorStateEvent
+        */
+        TLmkSelectorStateEvent HandleDefaultStateStateEventL(
+                                    TLmkSelectorStateEvent aEvent );
+
+        /**
+        * Helper method for getting selector corresponding to the
+        * current state. If it doesn't exist yet it is created.
+        * @param aCategoryId is only used when creating filtered lm
+        *        selector which requires a category id for criteria
+        */
+        CLmkDlgSelectorImplBase& CurrentStateSelectorL(
+                            TPosLmItemId aCategoryId = KPosLmNullItemId );
+
+    protected:  // Constructors and destructor
+        /**
+        * C++ default constructor.
+        * @param aDb
+        * @return newly instantiated object
+        */
+        CLmkDlgCombiSelectorImpl( CPosLandmarkDatabase& aDb );
+
+        /**
+        * By default Symbian 2nd phase constructor is private.
+        */
+        void ConstructL();
+    private:
+
+		/**
+        * Add the individual tabs to tabgroup of NaviPane
+        * @param aaTabGroup
+        * @
+        */
+		void AddTabsL(CAknTabGroup& aTabGroup);
+
+		/**
+        * Fetch the name of the Bitmap file
+        *
+        * @return pointer to name of bitmap file containing tab icons
+        */
+		HBufC* GetBitmapFilenameLC();
+
+    private:    // Data
+        /// Current state of this class
+        TLmkSelectorState iSelectorState;
+
+        /// used when opening a category contents view
+        TInt iCategoryIndex;
+
+        /// dialog return value
+        TInt iDlgRetVal;
+
+        RPointerArray<CLmkDlgSelectorImplBase> iSelectors;
+
+        RPointerArray<MLmkListMemento> iMementos;
+
+        /// Is user currently navigating between tabs?
+        TBool iNavigating;
+
+        /// Is user interested in return values even if dialog was cancelled?
+        TBool iAlwaysModify;
+
+        ///Ref: used in multi selector mode
+        RArray<TPosLmItemId>* iSelectedItems;
+
+        ///Ref: used in single selector mode
+        TPosLmItemId* iOpenedItem;
+
+        ///Ref: navi pane reference
+        CAknNavigationControlContainer* iNaviPane;
+
+        ///Ref: tab group
+        CAknTabGroup* iTabGroup;
+
+        ///Own: navi decorator
+        CAknNavigationDecorator* iNaviDeco;
+        
+        /// Own: custom title for the landmark selection dialog
+        HBufC* iCustomLandmarksTitle;
+    };
+
+#endif      // CLMKDLGCOMBISELECTORIMPL_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/uicontrols/inc/CLmkDlgLmSelectorImpl.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,121 @@
+/*
+* 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:    LandmarksUi Content File -    CLmkDlgLmSelectorImpl class
+*
+*/
+
+
+
+
+
+
+
+#ifndef CLMKDLGLMSELECTORIMPL_H
+#define CLMKDLGLMSELECTORIMPL_H
+
+//  INCLUDES
+#include "CLmkDlgSelectorImplBase.h"
+#include "MLmkListProviderObserver.h"
+#include <eikcmobs.h>       // MEikCommandObserver
+
+// FORWARD DECLARATIONS
+class CPosLmSearchCriteria;
+
+// CLASS DECLARATION
+
+/**
+* CLmkDlgLmSelectorImpl class
+*/
+class CLmkDlgLmSelectorImpl : public CLmkDlgSelectorImplBase
+    {
+    public:  // Constructors and destructor
+        /**
+        * Create CLmkDlgLmSelectorImpl object
+        * @param aDb
+        * @return newly instantiated object
+        */
+        IMPORT_C static CLmkDlgLmSelectorImpl* NewL(
+                            CPosLandmarkDatabase& aDb );
+
+        /**
+        * Create CLmkDlgLmSelectorImpl object
+        * @param aDb
+        * @param aCriteria
+        * @return newly instantiated object
+        */
+        IMPORT_C static CLmkDlgLmSelectorImpl* NewL(
+                                            CPosLandmarkDatabase& aDb,
+                                            CPosLmSearchCriteria* aCriteria );
+
+        /**
+        * Destructor.
+        */
+        ~CLmkDlgLmSelectorImpl();
+
+    public: // From CLmkSelectorImplBase
+        void SetupListProviderL();
+        const CLmkListProviderBase& ListProvider() const;
+        void GetDlgResources( TBool aIsSingleSelector,
+                              TInt& aTitlePaneResource,
+                              TInt& aMenuBarResource,
+                              TInt& aDialogResource ) const;
+
+    protected: // From MLmkListProviderObserver
+        void HandleListProviderEvent( TLmkListProviderEventType aEvent );
+        void HandleListProviderError( TInt aError );
+
+    protected:  // Constructors and destructor
+        /**
+        * C++ default constructor.
+        * @param aDb
+        * @return newly instantiated object
+        */
+        CLmkDlgLmSelectorImpl( CPosLandmarkDatabase& aDb );
+
+        /**
+        * C++ default constructor.
+        * @param aDb
+        * @parma aCriteria
+        * @return newly instantiated object
+        */
+        CLmkDlgLmSelectorImpl( CPosLandmarkDatabase& aDb,
+                               CPosLmSearchCriteria* aCriteria );
+
+        /**
+        * By default Symbian 2nd phase constructor is private.
+        */
+        void ConstructL();
+
+    private:    // Data
+        /**
+        * Updates the Navi Label, based on the category id
+        * Used only when gets ELmkEventCategoryUpdated event.
+        */
+        void UpdateNaviLabelL();
+        /**
+        * This function is called to check if the criteria based category
+        * exists in the Landmarks database or not, this check is required,
+        * since the category might have been deleted from the landmarks,
+        * Hence the Category contents dialog which is open needs to be
+        * closed.
+        */
+        TBool CheckDbIfCriteriaCategoryExistsL();
+    private:    // Data
+        ///Own:
+        CPosLmSearchCriteria* iCriteria;
+    };
+
+#endif      // CLMKDLGLMSELECTORIMPL_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/uicontrols/inc/CLmkDlgPackageSelectorImpl.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,170 @@
+/*
+* 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:    LandmarksUi Content File -    Landmark package viewer dialog.
+*
+*/
+
+
+
+
+
+
+
+#ifndef CLMKDLGPACKAGEVIEWERIMPL_H
+#define CLMKDLGPACKAGEVIEWERIMPL_H
+
+//  INCLUDES
+#include "CLmkDlgLmSelectorImpl.h"
+#include "MLmkAOOperationObserver.h"
+#include "clmkmapnavigationinterface.h"
+#include "CLmkSaveLandmarkUtils.h"
+
+// FORWARD DECLARATIONS
+class CLmkParser;
+class CLmkSender;
+class CAknWaitDialog;
+
+// CLASS DECLARATION
+
+/**
+*  Landmark package viewer dialog.
+*/
+class CLmkDlgPackageSelectorImpl
+: public CLmkDlgLmSelectorImpl,
+  public MLmkAOOperationObserver
+    {
+    public:  // Constructors and destructor
+
+        /**
+        * Create package viewer dialog
+        * @param aDb database reference
+        * @param aParser landmark parser reference
+        * @param aSender landmark sender reference
+        * @return newly instantiated object
+        */
+        IMPORT_C static CLmkDlgPackageSelectorImpl* NewL(
+                                CPosLandmarkDatabase& aDb,
+                                CLmkParser& aParser,
+                                CLmkSender& aSender );
+
+        /**
+        * Destructor.
+        */
+        ~CLmkDlgPackageSelectorImpl();
+
+    public: // From CLmkDlgSelectorImplBase
+        void SetupListProviderL();
+        void GetDlgResources( TBool aIsSingleSelector,
+                              TInt& aTitlePaneResource,
+                              TInt& aMenuBarResource,
+                              TInt& aDialogResource ) const;
+        TCoeHelpContext HelpContext() const;
+
+    public: //from MLmkAOOperationObserver
+        void HandleOperationL( TOperationTypes aType,
+                              TReal32 aProgress,
+                              TInt aStatus );
+
+    protected: // From MEikCommandObserver
+        void ProcessCommandL( TInt aCommandId );
+
+    protected: // From MLmkDlgMenuObserver
+        void DynInitDlgMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane );
+
+    protected: // From MLmkNavigationObserver
+        void HandleLaunchingEventL();
+
+    protected:  // Constructors and destructor
+        /**
+        * C++ default constructor.
+        */
+        CLmkDlgPackageSelectorImpl( CPosLandmarkDatabase& aDb,
+                                  CLmkParser& aParser,
+                                  CLmkSender& aSender );
+
+        /**
+        * By default Symbian 2nd phase constructor is private.
+        */
+        void ConstructL();
+
+    private: // New functions
+        /**
+        * Open landmark
+        */
+        void OpenLandmarkCmdL();
+
+        /**
+        * Save selected landmark(s)
+        */
+        void SaveLandmarksCmdL();
+
+        /**
+        * Save all landmarks in the package
+        */
+        void SaveAllLandmarksCmdL();
+
+        /**
+        * Sends the selected landmarks from the package
+        */
+        void SendSelectedLandmarksCmdL(TInt aCommandId);
+
+        /**
+        * Sends all the landmarks in package
+        */
+        void SendAllLandmarksCmdL(TInt aCommandId);
+
+		/**
+        *
+        */
+		void GetLandmarksInPackageL(RPointerArray<CPosLandmark> &aLmkArray);
+
+    	/**
+    	* This method is used to check if the supplied landmark has any valid
+    	* coordinates or address. If either Latitude or Longitude are Nan and if
+    	* none of the address fields have any valid entyr then the method returns
+    	* ETrue otherwise returns EFalse.
+    	*
+    	* @param aLandmark is the landmark on which the check needs to be made
+    	* @return ETrue if Landmark does not have any coordinates or address,
+    	*               EFalse otherwise
+    	*/
+    	TBool IsLandmarkDataEmptyL( CPosLandmark* aLandmark );
+
+    private:    // Data
+        ///Ref: landmark parser
+        CLmkParser& iParser;
+
+        ///Ref: landmark sender
+        CLmkSender& iSender;
+
+        ///Own: iWaiNote
+        CAknWaitDialog* iWaitNote;
+
+        //Own: Pointer to map and navigation interface
+        CLmkMapNavigationInterface* iMapNavInterface;
+
+        // Ref: handle to landmark database
+        CPosLandmarkDatabase& iDb;
+
+        TCategoryName iNewCategoryFound;
+        TInt iNoOfNewCategories;
+        CLmkSaveLandmarkUtils* iSaveLmUtils;
+        TOperationTypes iType;
+        RArray<TUint> iTotalLms;
+
+    };
+
+#endif      // CLMKDLGPACKAGEVIEWERIMPL_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/uicontrols/inc/CLmkDlgSelectorImplBase.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,230 @@
+/*
+* 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:    LandmarksUi Content File -    Base class for common ui selectors (dialog-based).
+*
+*/
+
+
+
+
+
+
+
+#ifndef CLMKDLGSELECTORIMPLBASE_H
+#define CLMKDLGSELECTORIMPLBASE_H
+
+//  INCLUDES
+#include "CLmkSelectorImplBase.h"
+#include "MLmkNavigationObserver.h"
+#include "MLmkDlgMenuObserver.h"
+#include <eikcmobs.h>       // MEikCommandObserver
+
+// FORWARD DECLARATIONS
+class MObjectProvider;
+class CEikonEnv;
+class CLmkSelectorDialog;
+class TCoeHelpContext;
+class CEikTextListBox;
+
+// CLASS DECLARATION
+
+/**
+* Base class for common ui selectors (dialog-based).
+* During implementation it was noticed that pre-selection indexes
+* cause difficulties and some refactoring could be done to make the
+* code easier to read and maintain.
+*
+*/
+class CLmkDlgSelectorImplBase
+: public CLmkSelectorImplBase,
+  public MEikCommandObserver,
+  public MLmkNavigationObserver,
+  public MLmkDlgMenuObserver
+    {
+    public:  // Constructors and destructor
+        /**
+        * Destructor.
+        */
+        ~CLmkDlgSelectorImplBase();
+
+    public: // New functions
+        /**
+        * Selector implementation parent receives observed events when
+        * any of the base class's observation methods is executed.
+        * @param aParent parent of this selector implementor
+        */
+        void SetSelectorImplParent( CLmkDlgSelectorImplBase* aParent );
+
+        /**
+        * Object provider mechanism.
+        * @param aParent parent object
+        */
+        IMPORT_C void SetMopParent( MObjectProvider* aParent );
+
+        /**
+        * Runs single item selection dialog.
+        * @param aOpenedItem contains output selection id
+        * @param aAlwaysModifyOpened if ETrue then highlighted item
+        *        is set to aOpenedItem even if dialog was cancelled
+        * @return !=0 if accepted, 0 if canceled
+        */
+        virtual TInt ExecuteL( TPosLmItemId& aOpenedItem,
+                               TBool aAlwaysModifyOpened = EFalse );
+
+        /**
+        * Runs multiple item selection dialog.
+        * aSelectedItems is used as both input and output parameter
+        * (i.e. if a non-empty array is given then those items are
+        * marked selected by default.
+        * @param aSelectedItems contains input/output selection id(s)
+        * @param aAlwaysModifySelected if ETrue then selected items
+        *        are set to aSelectedItems even if dialog was cancelled
+        * @return !=0 if accepted, 0 if canceled
+        */
+        virtual TInt ExecuteL( RArray<TPosLmItemId>& aSelectedItems,
+                               TBool aAlwaysModifySelected = EFalse );
+
+        /**
+        * Runs single item selection dialog. This method is mainly
+        * targeted for internal use within LmkUi component.
+        * @param aOpenedItem contains output selection index
+        * @return !=0 if accepted, 0 if canceled
+        */
+        virtual TInt ExecuteL( TInt& aOpenedItem );
+
+        /**
+        * Runs multiple item selection dialog. This method is mainly
+        * targeted for internal use within LmkUi component.
+        * aSelectedItems is used as both input and output parameter
+        * (i.e. if a non-empty array is given then those items are
+        * marked selected by default.
+        * @param aSelectedItems contains input/output selection indexes
+        * @return !=0 if accepted, 0 if canceled
+        */
+        virtual TInt ExecuteL( CArrayFix<TInt>& aSelectedItems );
+
+         /**
+      	* Stores the empty dialog label
+        * @param aLabelRes Label resource id
+        */
+        virtual void SetEmptyDlgLabel( TInt aLabelPrimRes ,TInt aLabelSecRes );
+
+       // Added for accepting dynamically changing title pane parameter
+		virtual TInt ExecuteL( CArrayFix<TInt>& aSelectedItems, TPtrC aTitlePaneText );
+
+        /**
+        * Template method implemented by the subclass and called by
+        * the base class.
+        */
+        virtual void GetDlgResources( TBool aIsSingleSelector,
+                                      TInt& aTitlePaneResource,
+                                      TInt& aMenuBarResource,
+                                      TInt& aDialogResource ) const = 0;
+
+
+
+        /**
+        * Template method called by the base class,
+        * implemented by the subclass if dialog has a help.
+        * Base class implementation returns null help context.
+        * @return aContext help context
+        */
+        virtual TCoeHelpContext HelpContext() const;
+
+        virtual void StopExecutionL();
+
+        virtual void SetDialogTitleL(const TDesC& aTitle);
+
+    public: // From CLmkSelectorImplBase
+        MLmkListMemento* MementoL();
+        TInt ListVisibleItemCount();
+        TInt ListMarkedItemCountL();
+
+    protected: // From MEikCommandObserver
+        void ProcessCommandL( TInt aCommandId );
+
+    protected: // From MLmkDlgMenuObserver
+        void DynInitDlgMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane );
+
+    protected: // From MLmkListProviderObserver
+        void HandleListProviderEvent( TLmkListProviderEventType aEvent );
+        void HandleListProviderError( TInt aError );
+
+    protected: // From MLmkNavigationObserver
+        TKeyResponse HandleNavigationEventL( const TKeyEvent& aKeyEvent );
+        void HandleLaunchingEventL();
+        void HandleClosingEventL();
+
+        /**
+        * Check whether Coordinates has to be hidden.
+        */
+        void CheckHideCoordinateL( );
+
+    protected: // Constructors and destructor
+        /**
+        * C++ default constructor.
+        * @param aDb
+        * @return newly instantiate object
+        */
+        CLmkDlgSelectorImplBase( CPosLandmarkDatabase& aDb );
+
+        /**
+        * By default Symbian 2nd phase constructor is private.
+        */
+        void BaseConstructL();
+
+    private: // New functions
+
+        /**
+        * Internal helper function which attempts to read indexes
+        * corresponding to stored lm item ids and to set them as
+        * selected in the listbox.
+        */
+        void RetrySetPreSelectedL();
+
+    protected: // Data
+        ///Ref: parent selector
+        CLmkDlgSelectorImplBase* iSelectorImplParent;
+
+        ///Ref: mop parent
+        MObjectProvider* iMopParent;
+
+        ///Own: Note that iDialog is a dynamic object which can be accessed
+        ///     between HandleLaunchingEventL() & HandleClosingEventL().
+        CLmkSelectorDialog* iDialog;
+        TInt iCurrentLabelPrimResource;
+        TInt iCurrentLabelSecResource;
+
+        //It will be ETrue when help has to be hidden.
+        TBool iIsHideHelp;
+
+    private: // Data
+        // These should not be used by subclasses, their content is
+        // guaranteed to be correct only within this class.
+
+        ///Latest provider event recorded by this class
+        TLmkListProviderEventType iDlgSelectorImplBaseLatestListEvent;
+
+        ///Ref: items to be set marked when provider gets ready if it
+        ///     wasn't ready when ExecuteL() was called
+        const RArray<TPosLmItemId>* iInputSelectedItems;
+
+        // user-specified title for the dialog
+        HBufC* iTitle;
+        
+    };
+
+#endif      // CLMKDLGSELECTORIMPLBASE_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/uicontrols/inc/CLmkDoubleGraphicLBModel.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,79 @@
+/*
+* 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:    LandmarksUi Content File -    CLmkDoubleGraphicLBModel class
+*
+*/
+
+
+
+
+
+
+
+#ifndef CLMKDOUBLEGRAPHICLBMODEL_H
+#define CLMKDOUBLEGRAPHICLBMODEL_H
+
+//  INCLUDES
+#include "CLmkSelectorLBModelBase.h"
+
+// FORWARD DECLARATIONS
+class CLmkListProviderBase;
+
+// CLASS DECLARATION
+
+/**
+* CLmkDoubleGraphicLBModel class
+*/
+class CLmkDoubleGraphicLBModel : public CLmkSelectorLBModelBase
+    {
+    public:  // Constructors and destructor
+
+        /**
+        * Create CLmkDoubleGraphicLBModel object
+        * @param aListProvider
+        * @return newly instantiated object
+        */
+        static CLmkDoubleGraphicLBModel* NewL(
+                    CLmkListProviderBase& aListProvider );
+
+        /**
+        * Destructor.
+        */
+        ~CLmkDoubleGraphicLBModel();
+
+    protected:  // Functions from base classes
+        // leaving method
+        virtual void MdcaPointL( TInt aIndex ) const;
+
+    protected:  // Constructors and destructor
+        /**
+        * C++ default constructor.
+        * @return newly instantiated object
+        */
+        CLmkDoubleGraphicLBModel();
+
+        /**
+        * Symbian 2nd phase constructor
+        * @param aListProvider
+        */
+        void ConstructL( CLmkListProviderBase& aListProvider );
+
+    private:    // Data
+        ///Own:
+        HBufC* iEmpty;
+    };
+
+#endif      // CLMKDOUBLEGRAPHICLBMODEL_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/uicontrols/inc/CLmkEditorCoordinateField.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,92 @@
+/*
+* 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:    LandmarksUi Content File -    Landmark editor number field.
+*
+*/
+
+
+
+
+
+
+
+#ifndef __CLmkEditorCoordinateField_H__
+#define __CLmkEditorCoordinateField_H__
+
+//  INCLUDES
+#include "CLmkEditorFieldBase.h"
+
+// FORWARD DECLARATIONS
+class MLmkEditorUiBuilder;
+class CEikCaptionedControl;
+class CAknLocationEditor;
+class TPosition;
+
+// CLASS DECLARATION
+
+/**
+* Landmark editor number field.
+*/
+class CLmkEditorCoordinateField : public CLmkEditorFieldBase
+    {
+    public:  // Constructors and destructor
+        /**
+         * Creates a new instance of this class - number editor to a field.
+		 * @param aField the to be edited field
+		 * @param aUiBuilder reference to UI builder
+         */
+		static CLmkEditorCoordinateField* NewL(
+                MLmkFieldData& aField,
+                MLmkEditorUiBuilder& aUiBuilder);
+
+        /**
+         * Destructor.
+         */
+        ~CLmkEditorCoordinateField();
+
+    public:  // from MLmkEditorField
+        TBool SaveFieldL();
+        void ActivateL();
+        void UpdateL();
+	    //from CLmkEditorFieldBase
+        TReal FieldValue() const;
+
+        /**
+         * Resets the field
+         */
+    	void ResetL();
+
+    protected:  // Implementation
+        CLmkEditorCoordinateField(
+				MLmkFieldData& aField,
+				MLmkEditorUiBuilder& aUiBuilder);
+
+    private:    // implementation
+        void ConstructL();
+		void CreateAvkonCoordinateEditorL();
+		void ConstructEditorFromResourceL();
+		TPosition ConstructPosition(const TReal& aValue);
+
+    protected:  // Data
+        /// Ref: Fields editor
+		CAknLocationEditor* iControl;
+		TBool iIsLatitude;
+        /// Ref: fields captioned control
+        CEikCaptionedControl* iCaptionedCtrl;
+        TReal iCurrentValue;
+    };
+
+#endif // __CLmkEditorCoordinateField_H__
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/uicontrols/inc/CLmkEditorFieldArray.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,141 @@
+/*
+* 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:    LandmarksUi Content File -    Landmark editor field array.
+*
+*/
+
+
+
+
+
+
+
+#ifndef __CLMKEDITORFIELDARRAY_H__
+#define __CLMKEDITORFIELDARRAY_H__
+
+//  INCLUDES
+#include "landmarks.hrh"
+#include "CLmkLandMarkCategoriesName.h"
+#include <e32base.h>
+
+// FORWARD DECLARATIONS
+class MLmkEditorField;
+class MLmkEditorUiBuilder;
+class CLmkFields;
+class CPosLandmark;
+class MLmkFieldData;
+
+// CLASS DECLARATION
+
+/**
+* Landmark editor field array.
+*/
+class CLmkEditorFieldArray :
+        public CBase
+    {
+    public:  // Constructors and destructor
+        /**
+        * Creates an editor for aLmkItem.
+        * @param aLmkItem  edited landmark item
+        * @param aUiBuilder    reference to the UI creator
+        * @return newly instantiated object
+        */
+		static CLmkEditorFieldArray* NewL
+                (CLmkFields& aLmkFields,
+                MLmkEditorUiBuilder& aUiBuilder);
+
+        /**
+        * Destructor.
+        */
+        ~CLmkEditorFieldArray();
+
+    public:  // Interface
+        /**
+        * Update fields
+        * @param aFieldType
+        */
+        void UpdateFieldsL(const TUint16 aFieldType=EAllEditorItems);
+
+        /**
+		* 2nd part constructor.
+        * Create dialog lines from iLmkFields
+        */
+		void CreateFieldsFromLmkL();
+
+        /**
+        * Returns ETrue if all the fields of this lmk are empty
+        * or contain only whitespace characters.
+        * @return TBool
+        */
+        TBool AreAllFieldsEmptyL() const;
+
+		/**
+		* Returns the aFieldIndex field.
+		* @precond	aFieldIndex >= 0 && aFieldIndex < EditorCount()
+		*/
+		const MLmkEditorField& FieldAt(TInt aFieldIndex);
+
+        /**
+        * Returns the lmk editor field corresponding to aControlId.
+		* @return NULL if not found.
+        */
+        //MLmkEditorField* Find( TInt aControlId, TInt* aPos =NULL ) const;
+        MLmkEditorField* Find( TInt aControlId, TInt* aPos=NULL , TInt* aPrevControlId=NULL ) const;
+
+        /**
+        * Saves all fields in the editor to the lmk item.
+		* @return true if at least one field was changed
+        */
+        TBool SaveFieldsL();
+		void SaveFieldsToBufferL();
+
+        public: //new function
+        /**
+        * Its a getter method for returning the field array
+		* @return iFieldArray member by reference
+        */
+        CArrayPtrFlat<MLmkEditorField>& GetFieldArray();
+	public :// Added for category name support
+		void SetCategoryName(const TDesC& aCategoryName);
+		TBool CheckIfFieldIsEmpty(MLmkFieldData& a);
+
+    private:  // Implementation
+        /**
+        * Create CLmkEditorFieldArray object
+        * @param aLmkFields
+        * @param aUiBuilder
+        * @return newly instantiated object
+        */
+        CLmkEditorFieldArray(
+				CLmkFields& aLmkFields,
+				MLmkEditorUiBuilder& aUiBuilder);
+
+        void ConstructL();
+
+    private:  // Data
+        /// Ref:
+        CLmkFields& iLmkFields;
+
+        /// Ref: editor UI creator
+        MLmkEditorUiBuilder& iUiBuilder;
+
+        /// Own: Contact editor fields
+        CArrayPtrFlat<MLmkEditorField> iFieldArray;
+        TCategoryName iCategoryName;
+        TBool iCategoryFlag;
+    };
+
+#endif // __CLMKEDITORFIELDARRAY_H__
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/uicontrols/inc/CLmkEditorFieldBase.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,95 @@
+/*
+* 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:    LandmarksUi Content File -    Base class for fields of form
+*
+*/
+
+
+
+
+
+
+
+#ifndef __CLMKEDITORFIELDBASE_H__
+#define __CLMKEDITORFIELDBASE_H__
+
+//  INCLUDES
+#include "MLmkEditorField.h"
+#include "MLmkFieldData.h"
+#include <e32std.h>
+#include <e32base.h>
+
+// FORWARD DECLARATIONS
+class MLmkEditorUiBuilder;
+class CLmkDistanceEditor;
+class CEikonEnv;
+
+
+// CLASS DECLARATION
+
+/**
+* Landmark editor field base class.
+*/
+class CLmkEditorFieldBase :
+        public CBase,
+        public MLmkEditorField
+    {
+    protected:  // Construction
+        /**
+        * Constructor.
+		* @param aField reference to the field to edit
+		* @param aUiBuilder reference to UI builder
+        * @return newly instantiated object
+        */
+        CLmkEditorFieldBase( MLmkFieldData& aField,
+				             MLmkEditorUiBuilder& aUiBuilder );
+
+        /**
+        * Destructor.
+        */
+		~CLmkEditorFieldBase();
+
+        /**
+        * Base constructor.
+        */
+        void BaseConstructL();
+
+    public:  // from MLmkEditorField
+        TInt ControlId() const;
+        TInt FieldId() const;
+        TPtrC FieldLabel() const;
+        void SetFieldLabelL(HBufC* aLabel);
+        MLmkFieldData& LandmarkItemField() const;
+		HBufC* ControlTextL() const;
+        void ActivateL() = 0;
+        //code added
+        virtual TReal FieldValue() const;
+		TReal GetNumberFieldValue() const;
+		//-end-
+
+		void LoadBitmapToFieldL	(MLmkEditorUiBuilder& aUiBuilder);
+    protected:  // Data
+        /// Own: Contact item field associated with this editor field
+        MLmkFieldData& iLmkItemField;
+
+		/// Ref: UI builder
+		MLmkEditorUiBuilder& iUiBuilder;
+
+		// Ref : Eikon Env
+		CEikonEnv*     iEnv;
+    };
+
+#endif // __CLMKEDITORFIELDBASE_H__
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/uicontrols/inc/CLmkEditorImpl.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,482 @@
+/*
+ * Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:    This file contains class for landmarks editor and viewer
+ *
+ */
+
+#ifndef CLMKEDITORIMPL_H
+#define CLMKEDITORIMPL_H
+
+//  INCLUDES
+#include "CLmkFields.h"
+#include "MLmkEditorUiBuilder.h"
+#include "MLmkLocationObserver.h"
+#include <AknForm.h>        // CAknForm
+#include <EPos_Landmarks.h> // Lm typedefs, constants etc.
+#include <CLmkEditorDlg.h>  // dialog flags
+#include <AknInfoPopupNoteController.h>
+#include "CLmkLandMarkCategoriesName.h"
+#include "clmkmapnavigationinterface.h"
+#include "mlmkcentralrepositoryobserver.h"
+#include "lmkwaitdlglauncher.h"
+
+// FORWARD DECLARATIONS
+class CPosLandmarkDatabase;
+class CLmkSender;
+class MObjectProvider;
+class CPosLmPartialReadParameters;
+class CLmkUiUtils;
+class CPosLandmark;
+class CLmkEditorFieldArray;
+class CAknNavigationDecorator;
+class CLmkLocationService;
+class TCoeHelpContext;
+class CLmkCallCmd;
+class CLmkGoToURLCmd;
+class MLmkEditorField;
+class CLmkCentralRepository;
+
+// CLASS DECLARATION
+/**
+ * CLmkEditorImpl class
+ */
+class CLmkEditorImpl : public CAknForm,
+        public MLmkEditorUiBuilder,
+        public MLmkLocationObserver,
+        public MLmkListProviderObserver,
+        public MLmkCentralRepositoryObserver,
+        public MLmkWaitDialogLauncherObserver
+    {
+public:
+    // Constructors and destructor
+    /**
+     * Edit or create new landmark
+     * Create new landmark if aLandmarkId = KPosLmNullItemId
+     * Not take ownership CPosLmPartialReadParameters
+     * @param aDb
+     * @param aSender landmark sender reference
+     * @param aAttributes
+     * @param aEditorMode
+     * @param aLandmarkId
+     * @return newly instantiated object
+     */
+    IMPORT_C static CLmkEditorImpl* NewL(CPosLandmarkDatabase& aDb,
+            CLmkSender& aSender, TLmkEditorAttributes aAttributes,
+            TLmkEditorMode aEditorMode, TPosLmItemId aLandmarkId);
+
+    /**
+     * Edit landmark
+     * Not take ownership CPosLandmark or CPosLmPartialReadParameters
+     * @param aDb
+     * @param aSender landmark sender reference
+     * @param aAttributes
+     * @param aEditorFlags
+     * @param aLandmark
+     * @return newly instantiated object
+     */
+    IMPORT_C static CLmkEditorImpl* NewL(CPosLandmarkDatabase& aDb,
+            CLmkSender& aSender, TLmkEditorAttributes aAttributes,
+            TLmkEditorMode aEditorMode, CPosLandmark* aLandmark);
+    IMPORT_C static CLmkEditorImpl* NewL(CPosLandmarkDatabase& aDb,
+            CLmkSender& aSender, TLmkEditorAttributes aAttributes,
+            TLmkEditorMode aEditorMode, TPosLmItemId* aLandmarkId,
+            CPosLandmark* aLandmark);
+    /**
+     * Destructor.
+     */
+    ~CLmkEditorImpl();
+
+public:
+    // New functions
+    /**
+     * Set parent
+     * @param aParent
+     */
+    IMPORT_C void SetMopParent(MObjectProvider* aParent);
+
+    /**
+     * Set help context
+     * @param aContect
+     */
+    IMPORT_C void SetHelpContext(TCoeHelpContext aContext);
+
+    /**
+     * ExecuteLD
+     * @return error code
+     */
+    IMPORT_C TInt ExecuteLD();
+    /**
+     * This function when invoked, disables the Map and Navigation related Menu Options
+     * This needs to be invoked before ExecuteLD().By default, the Map and Navigation
+     * menu options are enabled and are shown.
+     *
+     */
+    IMPORT_C void DisableMapAndNavigationMenuOptions();
+    /**
+     * This function should be invoked only when,from the landmark
+     * view dialog, edit mode dialog and launched and fields are
+     * updated. This function updates the corresponding the fields
+     * in the landmark viewer dialog.
+     */
+    void UpdateViewDlgL();
+
+public:
+    // From CAknForm
+    void DynInitMenuPaneL(TInt aResourceId, CEikMenuPane *aMenuPane);
+    void ProcessCommandL(TInt aCommandId);
+    void HandleControlStateChangeL(TInt aControlId);
+    void DoNotSaveFormDataL();
+    TInt EditMode();
+public:
+    //from MLmkWaitDialogLauncherObserver
+    void HandleDialogDismissed(TInt aButtonId);
+
+public:
+    //from CCoeControl
+    void GetHelpContext(TCoeHelpContext& aContext) const;
+    TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType);
+
+protected:
+    //from MLmkLocationObserver
+    void NotifyL(const TInt aStatus);
+    void NotifyErrorL(TInt aErrorCode);
+
+public:
+    //from CEikDialog
+    SEikControlInfo CreateCustomControlL(TInt aControlType);
+    MEikDialogPageObserver::TFormControlTypes
+    ConvertCustomControlTypeToBaseControlType(TInt aControlType) const;
+
+#ifdef RD_SCALABLE_UI_V2
+protected:
+    // From MEikDialogPageObserver
+    void HandleDialogPageEventL(TInt aEventID);
+#endif //RD_SCALABLE_UI_V2
+    
+    //from MEikDialogPageObserver
+    void LineChangedL(TInt aControlId);
+
+protected:
+    // from CAknForm
+    void PreLayoutDynInitL();
+    void PostLayoutDynInitL();
+
+protected:
+    //from CEikDialog
+    TBool OkToExitL(TInt aKeyCode);
+
+protected:
+    //from MLmkCentralRepositoryObserver
+    void HandleCentralRepositoryChangeL();
+
+protected:
+    // Constructors and destructor
+    /**
+     * C++ default constructor.
+     * @param aDb
+     * @param aSender landmark sender reference
+     * @param aEditorMode
+     * @return newly instantiated object
+     */
+    CLmkEditorImpl(CPosLandmarkDatabase& aDb, CLmkSender& aSender,
+            TLmkEditorMode aEditorMode);
+
+    /**
+     * By default Symbian 2nd phase constructor is private.
+     * @param aLandmarkId, negative if create new
+     * @param aAttiributes
+     */
+    void ConstructL(TPosLmItemId aLandmarkId,
+            TLmkEditorAttributes aAttributes);
+
+    /**
+     * By default Symbian 2nd phase constructor is private.
+     * @param aLandmark, Null if create new
+     * @param aAttributes
+     */
+    void ConstructL(CPosLandmark* aLandmark,
+            TLmkEditorAttributes aAttributes);
+
+    /**
+     * By default Symbian 2nd phase constructor is private.
+     * @param aLandmarkId, negative if create new
+     * @param aAttiributes
+     */
+    void ConstructL(TPosLmItemId* aLandmarkId, CPosLandmark* aLandmark,
+            TLmkEditorAttributes aAttributes);
+
+    /**
+     * Set default things for both other ConstructL() methods.
+     */
+    void CommonConstructL(TLmkEditorAttributes& aAttributes);
+
+    /**
+     * Context menu bar construction
+     */
+    void ConstructContextMenuL();
+
+    /**
+     * Checks Landmarks Coordinate Data Is available or not.
+     */
+    TBool IsLandmarkDataEmptyL(CPosLandmark* aLandmark);
+
+    /**
+     * Check whether Coordinates has to be hidden.
+     */
+    void CheckHideCoordinateL();
+
+private:
+    // from MPbkContactEditorUiBuilder
+    CCoeControl* CreateLineL(const TDesC& aCaption, TInt aControlId,
+            TInt aControlType);
+    CEikCaptionedControl* LineControl(TInt aControlId) const;
+    void DeleteControl(TInt aControlId);
+    void TryChangeFocusL(TInt aControlId);
+    void SetCurrentLineCaptionL(TInt aControlId, const TDesC& aText);
+    CCoeControl* Control(TInt aControlId) const;
+    void SetEditableL(TBool aState);
+    CPosLandmarkDatabase& Database();
+    CPosLandmark* GetCurrentEditedLandmarkL();
+
+private:
+    // New functions
+    void CreateLabelArrayL();
+    void CreateLabelL(TInt iResourceId, TInt iPos);
+    TBool IsNameFieldEmptyL();
+    TBool OkToExitL();
+    void SelectCategoriesCmdL();
+    void CurrentLocationCmdL();
+    void ChangeIconCmdL();
+    void CategoriesCmdL();
+    void CategoriesCmdFromXmlL();
+    void SetCurrentLocationL(const TPosition& aPosition);
+    void ChangeContextImageL();
+    void AttachAIWMenuInterestL();
+
+    void CreateLabelArrayForNormalModeL();
+    void CreateLabelArrayForJapaneseModeL();
+    /**
+     * Gets the length of text fields
+     */
+    TInt GetFieldTextLengthL(MLmkEditorField& afield);
+
+    //New Functions to update the view dialog when
+    //when the landmark fields are changed during the
+    //editing mode
+
+    void UpdateTextEditorControlL(MLmkEditorField* aEditorField,
+            CPosLandmark* aLandmark, MLmkFieldData* fieldData,
+            TUint aFiledType, TInt aPrevControlId, TInt aPos);
+    void UpdateCoordinateEditorControlL(MLmkEditorField* aEditorField,
+            MLmkFieldData* fieldData, TReal aValue, TInt aPrevControlId,
+            TInt aPos);
+    void UpdateCategoryEditorControlL(MLmkEditorField* aEditorField,
+            MLmkFieldData* fieldData, TInt aPrevControlId, TInt aPos,
+            CPosLandmark& aLandmark);
+    void UpdateNumberEditorControlL(MLmkEditorField* aEditorField,
+            MLmkFieldData* fieldData, TReal32 aValue, TInt aPrevControlId,
+            TInt aPos);
+
+    void UpdateNameEditorControlL(MLmkEditorField* aEditorField,
+            CPosLandmark* aLandmark, MLmkFieldData* fieldData);
+    void UpdateDesEditorControlL(MLmkEditorField* aEditorField,
+            CPosLandmark* aLandmark, MLmkFieldData* fieldData,
+            TInt aPrevControlId, TInt aPos);
+    
+    TBool ShowQueryIfLocationFieldsAlreadyFilledL();
+
+    TBool ValidateContentL();
+
+    void DoNotSaveDataL(const TUint16 aFieldType);
+
+    TBool IsFieldEmptyL(const TUint16 aFieldType);
+
+    TBool IsInvalidUriL();
+
+    void LaunchLmkEditorL();
+
+    void DeleteSelfL();
+	
+    void UpdateCatInfoNotePosition();
+	
+    TBool IsCategoryField();
+
+    /**
+     * Clears the lat/long/pos acc/alt acc fields
+     */
+    void ClearPositionInfoL();
+
+protected:
+    /**
+     * Checks if position fields do not have value
+     */
+    TBool ArePositionFieldEmptyL();
+
+private:
+#ifdef RD_SCALABLE_UI_V2
+    /**
+     * Handles touch click command , only for editor
+     */
+    void HandleEditorCommandL();
+#endif //RD_SCALABLE_UI_V2
+    MLmkEditorField* InsertLineL(MLmkFieldData* aFieldData,
+            TInt aPrevControlId);
+    void DeleteLineL(MLmkEditorField* aEditorField, TInt aCtrlId, TInt aPos);
+    MLmkEditorField* AddOrDeleteLineL(MLmkEditorField* aEditorField,
+            MLmkFieldData* aFieldData, TInt aPrevControlId, TInt aCtrlId,
+            TInt aPos);
+    static TInt MessageQueryCallBack(TAny* aPtr);
+
+private:
+    //from MLmkListProviderObserver
+    void HandleListProviderEvent(TLmkListProviderEventType aEvent);
+
+    void HandleListProviderError(TInt aError);
+
+protected:
+    //overriden virtual from CCoeControl
+    virtual void ActivateL();
+	
+public:
+    // Added for category name support
+    void SetCategoryName(const TDesC& aCategoryName);
+    //This function is called when moving from view mode to
+    //edit mode, which field to be focussed/
+    void SetFieldTypeToFocusInEditMode(TUint aFieldType);
+
+    /**
+     * This function checks if the editing dialog is launched
+     * from the lmk viewer dialog
+     */
+    TBool IsDlgEditing();
+
+    /**
+     * This function sets the mode of the editor dialog as
+     * editing, when launched from lmk viewer dialog
+     * This is to avoid crash in ActivateL
+     */
+    void SetDlgEditing(TBool aEditing);
+    // For Landscape Support
+    void HandleResourceChange(TInt aType);
+	
+protected:
+    //for MSK
+    virtual void UpdateMskOnArrowMoveForViewerL();
+    void AddMskCommandL(TInt aResourceId, TLmkAppCmdId aCommandId);
+    void DimmMiddleSoftKey();
+
+protected:
+    // Data
+    /// Reference to database
+    CPosLandmarkDatabase& iDb;
+
+    /// Ref: landmark sender
+    CLmkSender& iSender;
+
+    /// Ref: CPosLmPartialReadParameters
+    CPosLmPartialReadParameters* iPartialLmk;
+
+    /// TInt
+    TInt iResourceOffset;
+
+    /// Own: landmark UI utils
+    CLmkUiUtils* iLmkUiUtils;
+
+    /// Own:
+    CLmkFields* iLmkFields;
+
+    /// Own:
+    RPointerArray<HBufC> iLabelArray;
+
+    /// Own:
+    CLmkEditorFieldArray* iEditorFieldArray;
+
+    TLmkEditorMode iEditorMode;
+
+    ///Own:
+    CLmkLocationService* iLocationService;
+
+    TCoeHelpContext iHelpContext;
+    TBool iCalegorySelectionFlag;
+    RArray<TCategoryName> iCategoryNames;
+
+    ///Ref:
+    // Used to return the created Landmark Id Value.
+    // Don't allocate or delete memory or set to NULL;
+    // The variable might be a local stack variable.
+    // If no landmarks is created then set it to -1 or if successful
+    // then set it to the Landmark Id value.
+    TPosLmItemId* iLandmarkItemId;
+
+    /// Own: context menu bar
+    CEikMenuBar* iContextMenuBar;
+    CLmkGoToURLCmd* iLmkGoToURLCmd;
+    CLmkCallCmd* iLmkCallCmd;
+    // Flag to determine if Map and Navigation options needs to be shown
+    TBool iMapNavFeature;
+    // Current Input language. (Used for Japanese)
+    TBool iJapaneseInputMode;
+    CPosLandmark* iLandmark;
+
+    // Own: Pointer to map and navigation interface
+    CLmkMapNavigationInterface* iMapNavInterface;
+    // Flag which indicates receive state of landmark editor dialog
+    // Set to true for receive mode
+    TBool iIsLmkReceiveMode;
+    TLmkAppCmdId iMskCmdId;
+    TInt iCurrentResourceId;
+
+    // It will be ETrue when coordinates has to be hidden.
+    TBool iIsHideCoordinate;
+
+    // It will be ETrue when help has to be hidden.
+    TBool iIsHideHelp;
+    
+private:
+    // added data members
+    // holds the field type of the current focussed item in the dialog
+    TUint iFieldTypeToFocus;
+    // Set true when editor dialog is launched from view dialog.
+    TBool iIsEditing;
+
+    TBool iBackspaceStartForWebAddressField;
+
+    TBool iResetWebAddrSize;
+
+    CAknInfoPopupNoteController* iCatInfoPopupNote;
+    // Own:
+    CLmkListProviderBase* iListProvider; 
+    
+    CLmkEditorImpl* iEditor;
+
+    CLmkCentralRepository* iRepository;
+
+    /**
+     * Wait dialog launcher
+     * Owns
+     */
+    CLmkWaitDialogLauncher* iWaitDialogLauncher;
+
+    TBool iIsEndKey;
+
+    TBool iIsEditableField;
+
+    // To check the ownership of iLandmark
+    TBool iIsLmOwned;
+    // To Check category selector launched or not
+    TBool iIsCategorySelctorOpen;
+    };
+#endif      // CLMKEDITORIMPL_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/uicontrols/inc/CLmkEditorListField.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,97 @@
+/*
+* 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:    LandmarksUi Content File -    Landmark's editor text field.
+*
+*/
+
+
+
+
+
+
+
+#ifndef __CLMKEDITORLISTFIELD_H__
+#define __CLMKEDITORLISTFIELD_H__
+
+//  INCLUDES
+#include "CLmkEditorFieldBase.h"
+
+// FORWARD DECLARATIONS
+class CEikEdwin;
+class MLmkEditorUiBuilder;
+class CEikCaptionedControl;
+
+
+// CLASS DECLARATION
+
+/**
+* Landmark editor text field.
+*/
+class CLmkEditorListField : public CLmkEditorFieldBase
+    {
+    public:  // Constructors and destructor
+        /**
+        * Creates a new instance of this class - text editor to a field.
+		* @param aField the to be edited field
+		* @param aUiBuilder reference to UI builder
+        * @return newly instantiated object
+        */
+		static CLmkEditorListField* NewL(
+                MLmkFieldData& aField,
+                MLmkEditorUiBuilder& aUiBuilder );
+
+		static CLmkEditorListField* NewL( MLmkFieldData& aField,
+				 MLmkEditorUiBuilder& aUiBuilder,
+				 const TDesC& aCategoryName  );
+        /**
+        * Destructor.
+        */
+        ~CLmkEditorListField();
+
+    public:  // from MLmkEditorField
+        TBool SaveFieldL();
+        void ActivateL();
+        void UpdateL();
+        CEikEdwin* Control();
+        /**
+         * Resets the field
+         */
+    	void ResetL(){}
+
+    protected:  // Implementation
+        /**
+        * Create CLmkEditorListField object
+        * @param aField field include all item data
+        * @param aUiBuilder reference
+        * @return newly instantiated object
+        */
+        CLmkEditorListField(
+				MLmkFieldData& aField,
+				MLmkEditorUiBuilder& aUiBuilder );
+
+    private:    // implementation
+        void ConstructL();
+        void ConstructL(const TDesC& aCategoryName);
+
+    protected:  // Data
+        /// Ref: Fields editor
+        CEikEdwin* iControl;
+
+        /// Ref: fields captioned control
+        CEikCaptionedControl* iCaptionedCtrl;
+    };
+
+#endif // __CLMKEDITORLISTFIELD_H__
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/uicontrols/inc/CLmkEditorNumberField.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,112 @@
+/*
+* 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:    LandmarksUi Content File -    Landmark editor distance field.
+*
+*/
+
+
+
+
+
+
+
+#ifndef __CLMKEDITORNUMBERFIELD_H__
+#define __CLMKEDITORNUMBERFIELD_H__
+
+//  INCLUDES
+#include "CLmkEditorFieldBase.h"
+
+// FORWARD DECLARATIONS
+class MLmkEditorUiBuilder;
+class CEikCaptionedControl;
+class CLmkDistanceEditor;
+class CAknUnitEditor;
+class CLmkCentralRepository;
+
+
+// CLASS DECLARATION
+
+/**
+ * Landmark editor distance field.
+ */
+class CLmkEditorNumberField : public CLmkEditorFieldBase
+    {
+    public:  // Constructors and destructor
+        /**
+         * Creates a new instance of this class - number editor to a field.
+		 * @param aField the to be edited field
+		 * @param aUiBuilder reference to UI builder
+		 * //@param aIconInfoContainer reference to icon info container
+         */
+		static CLmkEditorNumberField* NewL(
+                MLmkFieldData& aField,
+                MLmkEditorUiBuilder& aUiBuilder);
+
+        /**
+         * Destructor.
+         */
+        ~CLmkEditorNumberField();
+
+    public:  // from MLmkEditorField
+    	/**
+    	* Saves current value to the database
+    	*/
+        TBool SaveFieldL();
+        void ActivateL();
+        /**
+        * Updates the new value to the database.
+        */
+        void UpdateL();
+        /**
+        * This function handles the unit change, by applying conversion to the current
+        * value based on the current unit.
+        */
+        void HandleUnitChangeL();
+       	/**
+         * Resets the field
+         */
+    	void ResetL();
+
+    protected:  // Implementation
+        CLmkEditorNumberField(
+				MLmkFieldData& aField,
+				MLmkEditorUiBuilder& aUiBuilder);
+
+    private:    // implementation
+        void ConstructL();
+        void CreateAvkonUnitEditorL();
+        //from CLmkEditorFieldBase
+        TReal FieldValue() const;
+        void ResolveUnitL();
+        TBool IsSystemUnitMetric();
+        void ConvertFromFootToMeters(TReal32& aValue);
+        void ConvertFromMetersToFoot(TReal32& aValue);
+
+    protected:  // Data
+        /// Ref: Fields editor
+       CAknUnitEditor* iControl;
+       /// Ref: fields captioned control
+       CEikCaptionedControl* iCaptionedCtrl;
+       //owns
+       CLmkCentralRepository* iRepository;
+
+       //represents the current value in db
+       TReal32 iDbData;
+       //represents the converted value either metric or imperial.
+       TReal32 iConvertedData;
+    };
+
+#endif // __CLMKEDITORNUMBERFIELD_H__
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/uicontrols/inc/CLmkEditorTextField.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,115 @@
+/*
+* 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:    LandmarksUi Content File -    Landmark editor text field.
+*
+*/
+
+
+
+
+
+
+
+#ifndef __CLMKEDITORTEXTFIELD_H__
+#define __CLMKEDITORTEXTFIELD_H__
+
+//  INCLUDES
+#include "CLmkEditorFieldBase.h"
+
+// FORWARD DECLARATIONS
+class CEikEdwin;
+class MLmkEditorUiBuilder;
+class CEikCaptionedControl;
+
+
+// CLASS DECLARATION
+
+/**
+ * Landmark editor text field.
+ */
+class CLmkEditorTextField : public CLmkEditorFieldBase
+    {
+    public:  // Constructors and destructor
+        /**
+         * Creates a new instance of this class - text editor to a field.
+		 * @param aField the to be edited field
+		 * @param aUiBuilder reference to UI builder
+		 * //@param aIconInfoContainer reference to icon info container
+         */
+		static CLmkEditorTextField* NewL(
+                MLmkFieldData& aField,
+                MLmkEditorUiBuilder& aUiBuilder );
+
+        /**
+         * Destructor.
+         */
+        ~CLmkEditorTextField();
+
+    public:  // from MLmkEditorField
+        TBool SaveFieldL();
+        void ActivateL();
+        /**
+         * Returns the iControl member
+         */
+        CEikEdwin* Control();
+
+        /**
+         * Returns the iCaptionedCtrl member
+         */
+        CEikCaptionedControl* CaptionedControl();
+    	/**
+         * Resets the field
+         */
+    	void ResetL(){}
+    	 /**
+    	 * Checks, if any prefix-present before the url protocol.
+    	 */
+    	TInt IsWebUrlProtocolPreFixedL( TPtr& aWebUrl );
+    	/**
+    	 * Removes the prefixes from the display text
+    	 */
+		void TrimPrefixesFromWebUrlL( TPtr& aWebUrl,TInt aTrimPos );
+		/**
+    	 * Sets the display text to the control
+    	 */
+		void SetControlTextL( TPtrC& aText);
+		/*
+		* Sets the edit state of the control
+		*/
+		void SetEditableL( TBool aEditable );
+
+    protected:  // Implementation
+        CLmkEditorTextField(
+				MLmkFieldData& aField,
+				MLmkEditorUiBuilder& aUiBuilder );
+
+    private:    // implementation
+        void ConstructL();
+    protected:  // Data
+        /// Ref: Fields editor
+        CEikEdwin* iControl;
+        /// Ref: fields captioned control
+        CEikCaptionedControl* iCaptionedCtrl;
+
+        // e.g image/jpeg/http://www.google.com
+        TBool isUrlPrefixed;
+        //own
+        HBufC* iUrlPrefix;
+        //own
+        HBufC* iText;
+    };
+
+#endif // __CLMKEDITORTEXTFIELD_H__
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/uicontrols/inc/CLmkEmptyDialog.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,49 @@
+/*
+* 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:    LandmarksUi Content File -    For EmptyDialog
+*
+*/
+
+
+
+
+
+
+
+#ifndef EMPTYDIALOG_H
+#define EMPTYDIALOG_H
+
+// System includes
+#include <AknDialog.h>  // CAknDialog
+
+NONSHARABLE_CLASS(CLmkEmptyDialog) : public CAknDialog
+ 	{
+
+	public : // Construct and destructor
+	    CLmkEmptyDialog();
+	    ~CLmkEmptyDialog();
+
+	public: // From CCoeControl
+	    void PreLayoutDynInitL();
+	    void PostLayoutDynInitL();
+	    void SetSizeAndPositionL(const TSize& aSize);
+	    TBool OkToExitL(TInt aButtonId);
+
+	public: 	//For Forcefully Exiting from Dialog
+	    void EmptyDialogExitL();
+	};
+
+#endif  // #ifndef EMPTYDIALOG_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/uicontrols/inc/CLmkFloatEditor.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,115 @@
+/*
+* 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:    LandmarksUi Content File -    Implements float editor's functionality.
+*
+*/
+
+
+
+
+
+
+
+
+#ifndef CLmkFloatEditor_h
+#define CLmkFloatEditor_h
+
+//  INCLUDES
+#include <EikMfne.h>
+class CLmkMfneFloat;
+
+// CLASS DECLARATION
+
+/**
+* CLmkFloatEditor class
+* Contain two number editor and one separator.
+*/
+class CLmkFloatEditor : public CEikMfne
+    {
+    public:  // Constructors and destructor
+        /**
+         * Create CLmkFloatEditor object
+         * @return newly instantiated object
+         */
+        CLmkFloatEditor();
+
+        /**
+         * Destructor.
+         */
+        virtual ~CLmkFloatEditor();
+
+    protected:
+
+		/**
+		* By default Symbian 2nd phase constructor
+        * @param aNumberOfFields field array's size
+		*/
+		void BaseConstructL(TInt aNumberOfFields = 1);
+
+        /** Creates floating point value field
+         *  and adds it to the array of Mfne fields
+         *  @param aMaxNumSignificantDigits number of digits in float editor
+         */
+        void ConstructValueFieldL(
+            TInt aMaxNumSignificantDigits,
+            TInt aMaxDecimals);
+
+    public:
+
+        /** Sets value */
+	    virtual void SetNumber(TReal aNumber);
+
+        /** Gets value */
+	    virtual TReal Number() const;
+
+	    /** Whether value in this editor was modified by user */
+	    TBool IsModified();
+
+        /** Shortcut to know if current value is NaN */
+        TBool IsNan();
+
+    public: // From CCoeControl;
+
+        void FocusChanged(TDrawNow aDrawNow);
+        TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType);
+
+    protected: // from CEikMfne
+
+	protected: //new functions
+
+        TBool SetLimits(TReal aMinimumValue, TReal aMaximumValue);
+        void GetLimits(TReal& aMinimumValue, TReal& aMaximumValue);
+
+        virtual void HandleValueChanged();
+        virtual void HandleCustomFieldChanged(TInt aCustomFieldIndex);
+
+        virtual void HandleEnter();
+        virtual void HandleExit();
+
+        TInt FindValueField();
+        void HighlightField(TInt aFieldPosition);
+
+    private: //data
+        // Ref:
+        CLmkMfneFloat*  iValueField;
+
+        // Whether value in this editor was modified by user
+        TBool           iIsModified;
+
+        TBool           iIsMirroredLayout;
+    };
+
+#endif      // CLmkFloatEditor_h
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/uicontrols/inc/CLmkIconSelectorPopup.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,98 @@
+/*
+* 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:    LandmarksUi Content File -    Icon selector popup.
+*
+*/
+
+
+
+
+
+
+
+
+#ifndef __CLMKICONSELECTORPOPUP_H__
+#define __CLMKICONSELECTORPOPUP_H__
+
+//  INCLUDES
+#include <AknGrid.h>
+
+// CLASS DECLARATION
+/**
+* CLmkIconSelectorPopup class
+*/
+class CLmkIconSelectorPopup : public CBase
+    {
+    public:  // Constructors and destructor
+
+        /**
+        * Two-phased constructor.
+        * @param aGrid
+        * @return
+        */
+        static CLmkIconSelectorPopup* NewL( CAknGrid& aGrid );
+
+    public: // From CAknPopupList
+		TBool ExecuteLD();
+
+		void HandleScreenSizeChange();
+    protected:
+        /**
+        * Destructor.
+        */
+        ~CLmkIconSelectorPopup();
+
+   	private:
+		/**
+		 * By default Symbian 2nd phase constructor is private.
+		 */
+        void ConstructL( CAknGrid& aGrid );
+
+        /**
+        * C++ default constructor.
+        */
+        CLmkIconSelectorPopup();
+
+    private: //new functions
+        /**
+         * Load graphics
+         */
+    	void LoadGraphicsL();
+
+        /**
+         * Add Icons to Popup
+         * @param number of icons
+         */
+		void AddDataL( TInt aNum );
+
+        /**
+         * Set layout to cells in the grid.
+         */
+        void ApplySelGridGraphicStyleL();
+
+    private:    // Data
+        TInt iNumOfColumns;
+        TInt iNumOfRows;
+        TSize iSizeOfItems;
+
+        ///Ref:
+        CAknGrid* iGrid;
+
+        // Ref:
+        CEikonEnv*      iEnv;
+    };
+
+#endif      // __CLMKICONSELECTORPOPUP_H__
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/uicontrols/inc/CLmkLmItemListMemento.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,116 @@
+/*
+* 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:    LandmarksUi Content File -    Store and restore views last state.
+*
+*/
+
+
+
+
+
+
+
+
+#ifndef CLMKLMITEMLISTMEMENTO_H
+#define CLMKLMITEMLISTMEMENTO_H
+
+//  INCLUDES
+#include "MLmkListMemento.h"
+#include <e32base.h>
+#include <EPos_Landmarks.h>
+
+// FORWARD DECLARATIONS
+class CAknFilteredTextListBoxModel;
+
+// CLASS DECLARATION
+
+/**
+* CLmkLmItemListMemento class
+*/
+class CLmkLmItemListMemento : public CBase, public MLmkListMemento
+    {
+    public: // Constructors and destructor
+
+        /**
+        *
+        */
+        static CLmkLmItemListMemento* NewL();
+
+        /**
+        * Destructor.
+        */
+        ~CLmkLmItemListMemento();
+
+    public: // New functions
+
+		TBool IsModelAvailable();
+		void  UpdateModelAvailability(TBool aModelAvailable);
+       /**
+        * Returns memorized item id for specific purposes.
+        * Mainly used for setting up category contents view.
+        * @return item id, KPosLmNullItemId if not applicable
+        */
+        IMPORT_C TPosLmItemId MemorizedItemId() const;
+
+    public: // From MLmkListMemento
+
+        void Store( const CEikListBox& aListBox,
+                    const CLmkListProviderBase& aProvider,
+                    TBool aFiltered );
+
+        void Restore( const CEikListBox& aListBox,
+                      const CLmkListProviderBase& aProvider,
+                      TBool aFiltered );
+
+    protected: // Constructors and destructor
+
+        /**
+        * C++ constructor.
+        */
+        CLmkLmItemListMemento();
+
+        /**
+        * By default Symbian 2nd phase constructor is private.
+        */
+        void ConstructL( );
+
+    private: // New functions
+
+        void StoreFiltered( const CEikListBox& aListBox,
+                            const CLmkListProviderBase& aProvider,
+                            const CAknFilteredTextListBoxModel& aModel );
+
+        void RestoreFiltered( const CEikListBox& aListBox,
+                              const CLmkListProviderBase& aProvider,
+                              const CAknFilteredTextListBoxModel& aModel );
+
+        void StoreNonFiltered( const CEikListBox& aListBox,
+                               const CLmkListProviderBase& aProvider );
+
+        void RestoreNonFiltered( const CEikListBox& aListBox,
+                                 const CLmkListProviderBase& aProvider );
+
+    private: // data
+
+        TInt iMemorizedCurrentItemIndex;
+
+        TPosLmItemId iMemorizedCurrentItemId;
+
+        TInt iMemorizedTopItemIndex;
+        TBool iModelAvailable;
+    };
+
+#endif      // CLMKLMITEMLISTMEMENTO_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/uicontrols/inc/CLmkLocSettingLauncher.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,79 @@
+/*
+* Copyright (c) 2002-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:    LandmarksUi Content File -    Responsible for launching positioning settings
+*
+*/
+
+
+
+
+
+
+#ifndef CLmkLocSettingsLauncher_H
+#define CLmkLocSettingsLauncher_H
+
+// INCLUDES
+#include <e32base.h>
+#include <locsettingsuiclient.h>
+
+// CLASS DECLARATION
+/**
+*  CLmkLocSettingsLauncher class
+*  This class is a wrapper for launching Position settings
+*/
+class CLmkLocSettingsLauncher : public CActive
+	{
+	private : // Constructors and destructor
+	      /**
+	       * C++ default constructor.
+	       */
+	      CLmkLocSettingsLauncher();
+
+	public:
+	      /**
+	       * Destructor.
+	       */
+	      ~CLmkLocSettingsLauncher();
+
+	public:
+		/**
+         * Two-phased constructor.
+         *
+         */
+	     static CLmkLocSettingsLauncher* NewL();
+
+	private:
+		 /**
+          * Second phase of construction.
+          */
+	      void ConstructL();
+
+	public: // new functions
+	      void LaunchL();
+
+	protected: // from CActive
+	      void RunL();
+
+	      void DoCancel();
+
+	      void CancelRequest();
+
+	private:
+	    // Pointer to Location setings client library
+        CLocSettingsUiClient*       iClientLibrary;
+	};
+
+#endif // CLmkLocSettingsLauncher_H
+
+// End of file
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/uicontrols/inc/CLmkMfneFloat.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,119 @@
+/*
+* 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:    LandmarksUi Content File -    Floating point field for CEikMFne
+*
+*/
+
+
+
+
+
+
+#ifndef CLmkMfneFloat_H
+#define CLmkMfneFloat_H
+
+//  INCLUDES
+#include <eikmfne.h>
+
+// CLASS DECLARATION
+
+/**
+* CLmkMfneFloat class
+* Contain two number editor and one separator.
+*/
+class CLmkMfneFloat : public CEikMfneField
+    {
+    public:
+        virtual ~CLmkMfneFloat();
+        static CLmkMfneFloat* NewL(
+            TInt aMaxDigits,
+            TInt aMaxDecimalDigits);
+
+        TBool SetLimits(
+            TReal aMinimumValue,
+            TReal aMaximumValue);
+
+        void GetLimits(
+            TReal& aMinimumValue,
+            TReal& aMaximumValue) const;
+
+        void SetValue(TReal aValue);
+        TReal Value() const;
+
+        void HandleHighlight();
+
+    private:
+        CLmkMfneFloat(
+            TInt aMaxDigits,
+            TInt aMaxDecimalDigits);
+
+        void ConstructL();
+
+    // From CEikMfneField
+    public:
+        virtual TInt MaximumWidthInPixels(
+            const CFont& aFont,
+            TBool aShrinkToMinimumSize);
+
+        virtual TCoeInputCapabilities InputCapabilities() const;
+
+        virtual TBool IsEditable() const;
+
+        // these functions may only be called if
+        // IsEditable returns ETrue - all TBool&/TInt& parameters
+        // in these functions must be first set to EFalse/0 by the caller
+        virtual THighlightType HighlightType() const;
+
+        virtual void HandleKey(
+            const CFont& aFont,
+            const TKeyEvent& aKeyEvent,
+            TBool aInterpretLeftAndRightAsEarEvents,
+            TBool& aDataAltered,
+            TInt& aHighlightIncrement);
+
+        virtual void HandleDeHighlight(
+            const CFont& aFont,
+            CEikonEnv& aEikonEnv,
+            TBool& aDataAltered,
+            TBool& aError);
+
+    private:
+        virtual const TDesC& Text() const;
+
+    // New internal methods
+    private:
+        TBool   EnsureValueInLimits(TReal aValue);
+        TInt    MaxNumOfChars() const;
+
+        TBool   IsDecimalSeparatorAllowed(const TDesC& aText) const;
+        TBool   IsMoreDigitsAllowed(const TDesC& aText) const;
+
+        TReal   ValueFromText(const TDesC& aText) const;
+        void    TextFromValue(TReal aValue, TDes& aText) const;
+
+    private:
+        TReal   iMinimumValue;
+        TReal   iMaximumValue;
+        TInt    iMaxDigits;
+        TInt    iMaxDecimalDigits;
+
+        HBufC*  iText;
+
+        TBool   iIsBeingEditedWithCursor;
+        TBool   iFocus;
+    };
+
+#endif
+
+// end of File
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/uicontrols/inc/CLmkMfneSeparator.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,56 @@
+/*
+* 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:    LandmarksUi Content File -    Separator field for CEikMfne
+*
+*/
+
+
+
+
+
+
+#ifndef CLmkMfneSeparator_H
+#define CLmkMfneSeparator_H
+
+//  INCLUDES
+#include <eikmfne.h>
+
+// CLASS DECLARATION
+
+/** Reimplementation of CEikMfneSeparator
+ *  Allows run-time changing of text
+ */
+class CLmkMfneSeparator : public CEikMfneField
+    {
+    private:
+        CLmkMfneSeparator();
+
+    public:
+        virtual ~CLmkMfneSeparator();
+        static CLmkMfneSeparator* NewL(const TDesC& aText);
+        void SetTextL(const TDesC& aText);
+        const TDesC& Text() const;
+
+    private: // from CEikMfneField
+        TInt MaximumWidthInPixels(
+            const CFont& aFont,
+            TBool aShrinkToMinimumSize);
+
+        TCoeInputCapabilities InputCapabilities() const;
+
+    private:
+        HBufC* iText;
+    };
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/uicontrols/inc/CLmkMultiSelectionLBModel.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,81 @@
+/*
+* 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:    LandmarksUi Content File -    Multi selection listbox model
+*
+*/
+
+
+
+
+
+
+
+#ifndef CLMKMULTISELECTIONLBMODEL_H
+#define CLMKMULTISELECTIONLBMODEL_H
+
+//  INCLUDES
+#include "CLmkSelectorLBModelBase.h"
+
+// FORWARD DECLARATIONS
+class CLmkListProviderBase;
+
+// CLASS DECLARATION
+
+/**
+* CLmkMultiSelectionLBModel class
+*/
+class CLmkMultiSelectionLBModel : public CLmkSelectorLBModelBase
+    {
+    public:  // Constructors and destructor
+
+        /**
+        *
+        *
+        * @return newly instantiated object
+        */
+        static CLmkMultiSelectionLBModel* NewL(
+                        CLmkListProviderBase& aListProvider );
+
+        /**
+        * Destructor.
+        */
+        ~CLmkMultiSelectionLBModel();
+
+    public: // New functions
+
+    protected:  // New functions
+
+        // leaving method
+        virtual void MdcaPointL( TInt aIndex ) const;
+
+    protected:  // Functions from base classes
+
+    protected:  // Constructors and destructor
+
+        /**
+        * C++ default constructor.
+        */
+        CLmkMultiSelectionLBModel();
+
+        /**
+        * Symbian 2nd phase constructor
+        */
+        void ConstructL( CLmkListProviderBase& aListProvider );
+
+    protected:    // Data
+    };
+
+#endif      // CLMKMULTISELECTIONLBMODEL_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/uicontrols/inc/CLmkMultiSelectorDialog.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,140 @@
+/*
+* 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:    LandmarksUi Content File -    Multi selector dialog.
+*
+*/
+
+
+
+
+
+
+
+
+#ifndef CLMKMULTISELECTORDIALOG_H
+#define CLMKMULTISELECTORDIALOG_H
+
+//  INCLUDES
+#include "CLmkSelectorDialog.h"
+#include "LmkConsts.h"
+
+// FORWARD DECLARATIONS
+class CLmkSender;
+class MLmkDlgMenuObserver;
+
+// CLASS DECLARATION
+
+/**
+* CLmkMultiSelectorDialog class
+* Don't have default icons, user should set icon array self
+*/
+class CLmkMultiSelectorDialog : public CLmkSelectorDialog
+    {
+    public:  // Constructors and destructor
+
+        /**
+        * Two-phased constructor.
+        * @param aCurrentItemIndex
+        * @param aSelectionIndexArray
+        * @param aLbModel listbox model, ownership is not transferred
+        * @param aMenuBarResourceId
+        * @param iOkOptionsMenuResourceId
+        * @param aCmdObserver, ownership is not transferred
+        * @param aMenuObserver, ownership is not transferred
+        * @return newly instantiated object
+        */
+        static CLmkMultiSelectorDialog* NewL( TInt& aCurrentItemIndex,
+                                         CArrayFix<TInt>* aSelectionIndexArray,
+                                         MDesCArray* aLbModel,
+                                         TInt aMenuBarResourceId,
+                                         TInt iOkOptionsMenuResourceId,
+                                         MEikCommandObserver* aCmdObserver,
+                                         MLmkDlgMenuObserver* aMenuObserver,
+                                         MLmkListMemento* aMemento = NULL );
+
+        /**
+        * Destructor.
+        */
+        virtual ~CLmkMultiSelectorDialog();
+
+    public: // New functions
+
+        /**
+        * This method prepares the dialog to use "Send as..." menu.
+        * Note: this function requires that command ELmkCmdSendDummy exists
+        * in the menu pane, since it determines the position of "Send as...".
+        * @param aSender reference
+        * @param aSendUiMenuPaneResource, must contain ELmkCmdSendDummy
+        * @param aMenuTextResource customized "Send as..." substitute
+        */
+        void SetupSendMenu( CLmkSender& aSender,
+                            TInt aSendUiMenuPaneResource,
+                            TInt aMenuTextResource = KZeroResourceId );
+		/**
+        * Updates MSK of the dialog.
+        */
+        void UpdateMskL();
+	private:
+		TBool IsCurrentItemMarked();
+
+    protected: // From MEikListBoxObserver
+        void HandleListBoxEventL( CEikListBox* aListBox,
+                                  TListBoxEvent aEventType );
+
+    protected: // From CAknSelectionListDialog
+        void SelectionListProcessCommandL( TInt aCommand );
+        TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent,
+                                     TEventCode aType );
+        void PreLayoutDynInitL();
+        void PostLayoutDynInitL();
+        void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane );
+        TBool OkToExitL( TInt aButtonId );
+
+    protected:
+        /**
+        * C++ default constructor.
+        */
+        CLmkMultiSelectorDialog( TInt& aCurrentItemIndex,
+                                 CArrayFix<TInt>* aSelectionIndexArray,
+                                 MDesCArray* aLbModel,
+                                 TInt aMenuBarResourceId,
+                                 TInt iOkOptionsMenuResourceId,
+                                 MEikCommandObserver* aCmdObserver,
+                                 MLmkDlgMenuObserver* aMenuObserver,
+                                 MLmkListMemento* aMemento = NULL );
+
+    protected:
+
+        TInt iMenuBarResourceId;
+        TInt iOkOptionsMenuResourceId;
+        TInt iSendUiMenuPaneResourceId;
+        TInt iMenuTextResourceId;
+
+    private:
+    	void ConstructL(TInt aMenuBarResourceId);
+    private:
+
+        /// Ref:
+        CArrayFix<TInt> *iSelectionIndexArray;
+        /// Ref:
+        CLmkSender* iLmkSender;
+        /// Ref:
+        MLmkDlgMenuObserver* iMenuObserver;
+        TBool iExited;
+        TBool iIsToClearSelection;
+    };
+
+#endif      // CLMKMULTISELECTORDIALOG_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/uicontrols/inc/CLmkPackageEditorImpl.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,125 @@
+/*
+ * Copyright (c) 2004-2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:    Class for Landmarks Package Viewer 
+ *
+ */
+
+#ifndef CLMKPACKAGEEDITORIMPL_H
+#define CLMKPACKAGEEDITORIMPL_H
+
+//  INCLUDES
+#include "CLmkEditorImpl.h"
+#include "MLmkAOOperationObserver.h"
+
+// FORWARD DECLARATIONS
+class CLmkParser;
+class CLmkLandMarkCategoriesName;
+class CAknWaitDialog;
+
+// CLASS DECLARATION
+/**
+ * CLmkPackageEditorImpl specific class for viewing/editing a landmark
+ * which exists in the received landmark package.
+ */
+class CLmkPackageEditorImpl : public CLmkEditorImpl,
+        public MLmkAOOperationObserver
+    {
+public:
+    // Constructors and destructor
+    /**
+     * View/edit landmark. User must ensure that aItemIndex is
+     * valid index for a parsed item.
+     * @param aDb
+     * @param aParser
+     * @param aSender landmark sender reference
+     * @param aItemIndex index of item to show in editor
+     * @return newly instantiated object
+     */
+    IMPORT_C static CLmkPackageEditorImpl* NewL(CPosLandmarkDatabase& aDb,
+            CLmkParser& aParser, CLmkSender& aSender, TInt aItemIndex);
+
+    /**
+     * Destructor.
+     */
+    ~CLmkPackageEditorImpl();
+
+public:
+    //from MLmkAOOperationObserver
+    void HandleOperationL(TOperationTypes aType, TReal32 aProgress,
+            TInt aStatus);
+
+protected:
+    // From CAknForm
+    void DynInitMenuPaneL(TInt aResourceId, CEikMenuPane *aMenuPane);
+    void ProcessCommandL(TInt aCommandId);
+
+private:
+    // New functions
+    void SaveLandmarkCmdL();
+    /**
+     * Sends the current displayed landmark
+     */
+    void SendLandmarkCmdL(TInt aCommandId);
+    void DimmMenuItemsL(CEikMenuPane* aMenuPane);
+
+private:
+    // Constructors and destructor
+    /**
+     * C++ default constructor.
+     * @param aDb
+     * @param aParser
+     * @param aSender landmark sender reference
+     * @param aItemIndex index of item to show in editor
+     * @return newly instantiated object
+     */
+    CLmkPackageEditorImpl(CPosLandmarkDatabase& aDb, CLmkParser& aParser,
+            CLmkSender& aSender, TInt aItemIndex);
+
+    /**
+     * By default Symbian 2nd phase constructor is private.
+
+     */
+    void ConstructL();
+    
+private:
+    //from CLmkEditorImpl
+    void UpdateMskOnArrowMoveForViewerL();
+    void EnableMskMenuL();
+    void PostLayoutDynInitL();
+    
+#ifdef RD_SCALABLE_UI_V2
+protected:
+    // From MEikDialogPageObserver
+    void HandleDialogPageEventL(TInt aEventID);
+#endif //RD_SCALABLE_UI_V2
+    
+private:
+    // Data
+    ///Ref: landmark package parser
+    CLmkParser& iParser;
+
+    // edited item's index within parser
+    TInt iItemIndex;
+
+    ///Owns: parsed landmark
+    CPosLandmark* iLandmark;
+    CLmkLandMarkCategoriesName* iCategoryNameArray;
+
+    // Owns.
+    CAknWaitDialog* iWaitNote;
+    };
+
+#endif      // CLMKPACKAGEEDITORIMPL_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/uicontrols/inc/CLmkPkgFindNewCatOp.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,124 @@
+/*
+* 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:    LandmarksUi Content File -    This class provides functionality of finding out new categories
+*                that are received from a landmarks package, which do not exists in
+*                the landmarks database.
+*
+*/
+
+
+
+
+
+
+
+
+#ifndef CLMKPKGFINDNEWCATOP_H
+#define CLMKPKGFINDNEWCATOP_H
+
+//  INCLUDES
+#include "MLmkAOOperationObserver.h"
+#include <EPos_CPosLmOperation.h>
+#include <EPos_Landmarks.h>
+#include "CLmkParser.h"
+#include "CLmkSaveLandmarkUtils.h"
+
+// CLASS DECLARATION
+
+/**
+* CLmkPkgFindNewCatOp class.
+* This class provides functionality of finding out new categories
+* that are received from a landmarks package, which do not exists in
+* the landmarks database.
+*/
+class CLmkPkgFindNewCatOp
+: public CPosLmOperation
+    {
+    public:  // Constructors and destructor
+        /**
+        * Creates CLmkPkgFindNewCatOp
+        * @param aNoOfNewCategories
+        * @param aNewCategories
+        * @param aNewCategoryFound
+        * @param aSaveLmUtils
+        * @return newly instantiated object
+        */
+        static CLmkPkgFindNewCatOp* NewL(
+                            TInt& aNoOfNewCategories,
+                            RArray<TCategoryName>& aNewCategories,
+                            TCategoryName& aNewCategoryFound,
+                            CLmkSaveLandmarkUtils*aSaveLmUtils ) ;
+
+        /**
+        * Destructor.
+        */
+        ~CLmkPkgFindNewCatOp();
+
+    public: // From CPosLmOperation
+        void NextStep( TRequestStatus& aStatus, TReal32& aProgress );
+        void ExecuteL();
+
+    protected: // From MLmkAOOperationObserver
+        void HandleOperationL( TOperationTypes aType,
+                              TReal32 aProgress,
+                              TInt aStatus );
+
+    protected:  // Constructors and destructor
+        /**
+        * C++ constructor.
+        * @param aNoOfNewCategories
+        * @param aNewCategories
+        * @param aNewCategoryFound
+        * @param aSaveLmUtils
+        * @return newly instantiated object
+        */
+        CLmkPkgFindNewCatOp(TInt& aNoOfNewCategories,
+                            RArray<TCategoryName>& aNewCategories,
+                            TCategoryName& aNewCategoryFound,
+                            CLmkSaveLandmarkUtils*aSaveLmUtils ) ;
+
+        /**
+        * By default Symbian 2nd phase constructor is private.
+        * @param aLandmarkIdArray
+        * @param aCategoryIdArray
+        */
+        void ConstructL();
+
+    private:    // Data
+
+        ///Ref:
+        TRequestStatus* iStatus;
+
+        ///Ref:
+        TReal32* iProgress;
+
+        //Ref
+        CLmkSaveLandmarkUtils* iSaveLmUtils;
+
+
+        TBool iIsFirstStep;
+
+        //Ref
+        TCategoryName& iNewCategoryFound;
+
+        //Ref
+        RArray<TCategoryName>& iNewCategories;
+
+        //Ref
+        TInt& iNoOfNewCategories;
+    };
+
+#endif      // CLmkPkgFindNewCatOp_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/uicontrols/inc/CLmkSaveLandmarkUtils.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,146 @@
+/*
+* 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:    LandmarksUi Content File -    CLmkSaveLandmarkUtils contains methods in aiding saving landmarks
+*              : from the received landmarks package via Landmarks messaging
+*
+*/
+
+
+
+
+
+
+
+#ifndef CLMKSAVELANDMARKUTILS_H
+#define CLMKSAVELANDMARKUTILS_H
+
+#include <e32std.h>
+#include <e32base.h>
+#include <EPos_CPosLandmarkDatabase.h>
+#include "CLmkLandMarkCategoriesName.h"
+#include "CLmkAOOperation.h"
+
+// FORWARD DECLARATIONS
+class CLmkParser;
+class CEikonEnv;
+
+
+/**
+*  CLmkSaveLandmarkUtils class.
+* This class contains the methods for saving landmarks from
+* received landmarks package via Landmarks messaging
+* These methods are currently used by CLmkPackageEditor and
+* CLmkPackageSelector
+*/
+class  CLmkSaveLandmarkUtils : public CBase, public MLmkAOOperationObserver
+    {
+    public:  // Constructors and destructor
+
+        /**
+        * Creates  CLmkSaveLandmarkUtils
+        * @return newly instantiated object
+        */
+        IMPORT_C static  CLmkSaveLandmarkUtils* NewL(CPosLandmarkDatabase& aDb,CLmkParser& aParser);
+
+        /**
+        * Destructor.
+        */
+        virtual ~ CLmkSaveLandmarkUtils();
+
+    protected:  // Constructors and destructor
+        /**
+        * C++ constructor.
+        * @return newly instantiated object
+        */
+         CLmkSaveLandmarkUtils(CPosLandmarkDatabase& aDb,CLmkParser& aParser);
+
+        /**
+        * By default Symbian 2nd phase constructor is private.
+        */
+        void ConstructL();
+    public://from MLmkAOOperationObserver
+
+        void HandleOperationL(TOperationTypes aType, TReal32 aProgress, TInt aStatus );
+
+    public :
+
+        /*
+         * Check for new received categories
+         */
+        TInt CheckForNewCategoriesL(RArray<TUint> & aSelectedIndices,
+                                    TDes& aNewFoundCategory,
+                                    RArray<TCategoryName>& aNewcategories);
+         /**
+        * Checks the new received categories, this function is used by the
+        * category search operation.
+        * @param aNewFoundCategory
+        * @param aNewcategories
+        */
+        TInt CheckForNewCategories2L(
+                                     TDes& aNewFoundCategory,
+                                     RArray<TCategoryName>& aNewcategories);
+         /*
+         * Display confirmation query
+         */
+        TInt CategoryAddConfirmationQueryL( TInt aAmount, const TDesC& aNewCategoryName );
+         /*
+         * Display confirmation note
+         */
+        void LmsSavedConfirmationNoteL(RArray<TUint> & aImportIndexes,
+                                           			  TInt aEditedItemIndex = 0);
+
+    public://New Functions
+        /**
+        * Sets the observer for searching new categories operations
+        * from a landmarks pacakge.
+        * @param aObserver
+        */
+        void SetObserver(MLmkAOOperationObserver* aObserver);
+        /**
+        * Cancels operations for searching new categories from the landmarks
+        * pacakge
+        */
+        void CancelSearchNewCat();
+        /**
+        * Starts the search operations to find out new categories in landmarks
+        * package
+        * @param aNoOfNewCategories
+        * @param aNewCategories
+        * @param aNewCategoryFound
+        */
+        void StartSearchNewCatL(TInt& aNoOfNewCategories,
+                                RArray<TCategoryName>& aNewCategories,
+                                TCategoryName& aNewCategoryFound);
+ 	private :
+ 		void CheckCategoryInDatabaseL(RArray<TCategoryName>& aNewcategories,
+                                      const TDesC& aCategoryTobeAdded);
+
+        private:    // Data
+
+        /// Reference to database
+        CPosLandmarkDatabase& iDb;
+
+        ///Ref: landmark parser
+        CLmkParser& iParser;
+
+        // Ref :Eikon Env
+        CEikonEnv*      iEnv;
+        //Ref
+        MLmkAOOperationObserver* iObserver;
+
+        //Owns
+        CLmkAOOperation* iAOOperation;
+    };
+
+#endif      // CLMKSAVELANDMARKUTILS_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/uicontrols/inc/CLmkSelectorCache.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,104 @@
+/*
+* 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:    LandmarksUi Content File -    Selector's cache class
+*
+*/
+
+
+
+
+
+
+
+
+#ifndef CLMKSELECTORCACHE_H
+#define CLMKSELECTORCACHE_H
+
+//  INCLUDES
+#include <e32base.h>        // CBase
+#include "MLmkListProviderObserver.h"
+
+// FORWARD DECLARATIONS
+class CLmkListProviderBase;
+class CLmkUiItemBase;
+
+
+// CLASS DECLARATION
+/**
+* CLmkSelectorCache class
+*/
+class CLmkSelectorCache : public CBase, public MLmkListProviderObserver
+    {
+    private:
+        class CLinkedItem: public CBase
+            {
+            public:
+                CLinkedItem();
+                ~CLinkedItem();
+            public:
+                TInt iIndex;
+                CLmkUiItemBase* iPtr;
+            };
+
+    public:  // Constructors and destructor
+
+        /**
+        *
+        *
+        * @return newly instantiated object
+        */
+        static CLmkSelectorCache* NewL( CLmkListProviderBase& aListProvider );
+
+        /**
+        * Destructor.
+        */
+        ~CLmkSelectorCache();
+
+    public: // New functions
+
+        CLmkUiItemBase& ItemAtL( TInt aIndex );
+
+        TInt ItemCount() const;
+
+    public: // From MLmkListProviderObserver
+
+        void HandleListProviderEvent( TLmkListProviderEventType aEvent );
+
+        void HandleListProviderError( TInt aError );
+
+    protected:  // New functions
+
+    protected:  // Functions from base classes
+
+    private:  // Constructors and destructor
+
+        /**
+        * C++ default constructor.
+        */
+        CLmkSelectorCache( CLmkListProviderBase& aListProvider );
+
+        /**
+        * By default Symbian 2nd phase constructor is private.
+        */
+        void ConstructL();
+
+    private:    // Data
+
+        CLmkListProviderBase& iListProvider;
+        RPointerArray<CLinkedItem> iItemList;
+    };
+
+#endif      // CLMKSELECTORCACHE_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/uicontrols/inc/CLmkSelectorDialog.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,204 @@
+/*
+* 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:    LandmarksUi Content File -    CLmkSelectorDialog class
+*
+*/
+
+
+
+
+
+
+
+
+#ifndef CLMKSELECTORDIALOG_H
+#define CLMKSELECTORDIALOG_H
+
+//  INCLUDES
+#include "MLmkListProviderObserver.h"
+#include <aknselectionlist.h>
+#include "MLmkListMemento.h"
+
+// FORWARD DECLARATIONS
+class MLmkNavigationObserver;
+class TCoeHelpContext;
+class CLmkListProviderBase;
+
+// CLASS DECLARATION
+
+/**
+* CLmkSelectorDialog class
+*/
+class CLmkSelectorDialog
+    : public CAknSelectionListDialog,
+      public MLmkListProviderObserver
+    {
+    public:  // Constructors and destructor
+
+        /**
+        * Two-phased constructor.
+        * @param aOpenedItemIndex
+        * @param aLbModel listbox model, ownership is not transferred
+        * @param aMenuBarResourceId
+        * @param aCmdObserver, ownership is not transferred
+        * @param aMemento , maintains reference of memento.
+        * @return newly instantiated object
+        */
+        static CLmkSelectorDialog* NewL( TInt& aOpenedItemIndex,
+                                         MDesCArray* aLbModel,
+                                         TInt aMenuBarResourceId,
+                                         MEikCommandObserver* aCmdObserver,
+                                         MLmkListMemento* aMemento = NULL, CLmkListProviderBase* aListProvider = NULL);
+
+        /**
+        * Destructor.
+        */
+        virtual ~CLmkSelectorDialog();
+
+    public: // New functions
+    	void MakeEmptyTextListBoxL(TInt aResourcePrimText ,TInt aResourceSecText, TBool aRequestFromFindBox = EFalse ) const;
+    	/**
+        * Enable/Disable the find box in list dialog.
+        * @return ETrue to enable find box, EFalse otherwise
+        */
+		void ShowFindBox( TBool aVisible );
+        /**
+        * Tells whether this dialog has a find box or not.
+        * @return ETrue if has find box, EFalse otherwise
+        */
+        TBool HasFindBox() const;
+
+        /**
+        * Number of list items.
+        * @return number of list items
+        */
+        TInt NumberOfItems() const;
+
+        /**
+        * Currently highlighted item's index.
+        * @return highlighted item's index
+        */
+        TInt CurrentItemIndex() const;
+
+        /**
+        * Selection indexes. This class does not support multiselection,
+        * subclasses may support.
+        * @return selection indexes, ownership is not transferred
+        */
+        const CArrayFix<TInt>* SelectionIndexes() const;
+
+        /**
+        * Set help context.
+        * @param aContext
+        */
+        void SetHelpContext( TCoeHelpContext aContext );
+
+        /**
+        * Set observer for navigation events.
+        * @param
+        */
+        void SetNavigationObserver( MLmkNavigationObserver& aObserver );
+
+               // For Landscape Support
+		void HandleResourceChange (TInt aType);
+
+		 /**
+      	* Stores the empty dialog label
+        * @param aLabelRes Label resource id
+        */
+		void SetDlgEmptyResource(TInt aEmptyPrimLabel,TInt aEmptySecLabel);
+		/**
+      	* Enables or Disables left softkey
+        * @param aEnable ETrue for visible, EFalse for invisible
+        */
+		void EnableLeftSoftKey(TBool aEnable);
+		 /**
+        * Updates the MSK for the dialog
+        */
+		virtual void UpdateMskL();
+		void PrepareLC(TInt aDlgResourceId);
+
+	private:
+        /**
+        * By default Symbian 2nd phase constructor is private.
+        */
+        void ConstructL(TInt aMenuBarResourceId);
+
+		void SetCbaResourceAndCommandId(TInt aaDlgResourceId);
+
+    public: // From CAknSelectionListDialog
+        CEikListBox* ListBox() const;
+        CAknSearchField* FindBox() const;
+#ifdef RD_SCALABLE_UI_V2
+    protected: // from MCoeControlObserver
+        void HandleControlEventL( CCoeControl* aControl,TCoeEvent aEventType );
+#endif //RD_SCALABLE_UI_V2
+
+    public: // From MLmkListProviderObserver
+        void HandleListProviderEvent( TLmkListProviderEventType aEvent );
+        void HandleListProviderError( TInt aError );
+
+    protected: // From CCoeControl
+        void GetHelpContext( TCoeHelpContext& aContext ) const;
+        TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent,
+                                     TEventCode aType );
+
+    protected: // From CAknSelectionListDialog
+        void PreLayoutDynInitL();
+        void PostLayoutDynInitL();
+
+    protected: // From CAknDialog
+        TBool OkToExitL( TInt aButtonId );
+
+    protected: // New functions
+
+        /**
+        * Internal method which notifies navigation observer if key event
+        * is navigation event.
+        * @param aEkeyEvent
+        * @param aType
+        * @return EKeyWasConsumed if navigation observer consumed the event
+        */
+        TKeyResponse KeyEventForNavigationL( const TKeyEvent& aKeyEvent,
+                                             TEventCode aType );
+
+    protected:
+
+        /**
+        * C++ default constructor.
+        */
+        CLmkSelectorDialog( TInt& aOpenedItemIndex,
+                            MDesCArray* aLbModel,
+                            MEikCommandObserver* aCmdObserver,
+                            MLmkListMemento* aMemento = NULL, CLmkListProviderBase* aListProvider = NULL );
+
+    protected:    // Data
+        TCoeHelpContext iHelpContext;
+        /// Ref: navigation observer
+        MLmkNavigationObserver* iNavigationObserver;
+        MLmkListMemento* iMemento;
+        TBool iExited;
+        TInt iDlgEmptyLabelPrimResource;
+        TInt iDlgEmptyLabelSecResource;
+     	TInt iMskCmdId;
+     	TInt iCbaResourceId;
+#ifdef RD_SCALABLE_UI_V2
+        CAknListBoxFilterItems* iFilter;
+#endif //RD_SCALABLE_UI_V2
+		CLmkListProviderBase* iListProvider;
+    };
+
+#endif      // CLMKSELECTORDIALOG_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/uicontrols/inc/CLmkSelectorIconMgr.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,180 @@
+/*
+* 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:    LandmarksUi Content File -    CLmkSelectorIconMgr class
+*
+*/
+
+
+
+
+
+
+
+
+#ifndef CLMKSELECTORICONMGR_H
+#define CLMKSELECTORICONMGR_H
+
+//  INCLUDES
+#include "MLmkSelectorIconMgr.h"
+#include <e32base.h>
+#include <AknsItemID.h>
+
+// FORWARD DECLARATIONS
+class CGulIcon;
+
+// CLASS DECLARATION
+
+/**
+* CLmkSelectorIconMgr class
+*/
+class CLmkSelectorIconMgr : public CBase, public MLmkSelectorIconMgr
+    {
+    public:  // Constructors and destructor
+
+        /**
+        * EPOC constructor
+        * @param aArray reference to icon array
+        * @return newly instantiated object
+        */
+        static CLmkSelectorIconMgr* NewL( CAknIconArray& aArray );
+
+        /**
+        * Destructor.
+        */
+        ~CLmkSelectorIconMgr();
+
+    public: // From MLmkSelectorIconMgr
+        TInt GetIconL( const TDesC& aMbmFileName, TInt aIconIdInFile );
+        TInt GetDefaultIconL( TIconType aIcon );
+        void SetDefaultIconL( TIconType aIcon,
+                              const TDesC& aMbmFileName,
+                              TInt aIconIdInFile );
+        void ResetMgrL();
+
+    public: // New functions
+        /**
+        * Some Avkon dialogs use icon at index 0 and 1 for selection
+        * marking. Icon manager reserves these indexes to be manually set.
+        * @param aMbmFileName icon file path
+        * @param aSkinID skin id corresponding to the icon
+        * @param aIconId icon id in file
+        * @param aMaskId icon mask id in file
+        */
+        void SetIconAtIndexZeroL( const TDesC& aMbmFileName,
+                                  TAknsItemID aSkinID,
+                                  TInt aIconId,
+                                  TInt aMaskId );
+        /**
+        * Some Avkon dialogs use icon at index 0 and 1 for selection
+        * marking. Icon manager reserves these indexes to be manually set.
+        * @param aMbmFileName icon file path
+        * @param aSkinID skin id corresponding to the icon
+        * @param aIconId icon id in file
+        * @param aMaskId icon mask id in file
+        */
+        void SetIconAtIndexOneL( const TDesC& aMbmFileName,
+                                 TAknsItemID aSkinID,
+                                 TInt aIconId,
+                                 TInt aMaskId );
+
+    private: // new functions
+        /**
+        * Loads icon from file.
+        * @param aMbmFileName icon file path
+        * @param aIconId icon id in file
+        * @return icon, ownership is transferred to the caller
+        */
+        CGulIcon* LoadIconL( const TDesC& aMbmFileName, TInt aIconId );
+
+        /**
+        * Loads icon from file.
+        * @param aMbmFileName icon file path
+        * @param aSkinID skin id corresponding to the icon
+        * @param aIconId icon id in file
+        * @param aMaskId icon mask id in file
+        * @return icon, ownership is transferred to the caller
+        */
+        CGulIcon* LoadIconL( const TDesC& aMbmFileName,
+                             TAknsItemID aSkinID,
+                             TInt aIconId,
+                             TInt aMaskId );
+
+        /**
+        * Loads icon from file and appends it to the icon array.
+        * @param aMbmFileName icon file path
+        * @param aIconIdInFile icon id in file
+        * @return array index of loaded icon
+        */
+        TInt LoadAndAppendIconL( const TDesC& aMbmFileName,
+                                 TInt aIconIdInFile );
+
+        /**
+        * Defines icon in icon manager. This does not load icon to icon array.
+        * This can be used to define icons to mgr without loading them to
+        * memory..
+        * NOTE: icon mask id must be next from icon id in icon mbg file.
+        * Leaves with Symbian error code if error.
+        * @param aMbmFileName icon file name
+        * @param aIconIdInFile id number of icon in file
+        * @return aIconIndex, icon manager id.
+        */
+        TInt CreateIconMgrItemL( const TDesC& aMbmFileName,
+                                 TInt aIconIdInFile );
+
+        /**
+        * Appends an icon file to an internal array if it hasn't already
+        * been added. Returns index of the icon file in the array.
+        * @param aMbmFileName icon file path
+        * @return icon file index
+        */
+        TInt AppendedIconFileIndexL( const TDesC& aMbmFileName );
+
+    private:  // Constructors and destructor
+        /**
+        * C++ default constructor.
+        * @param aArray
+        * @return newly instantiated object
+        */
+        CLmkSelectorIconMgr( CAknIconArray& aArray );
+
+        /**
+        * By default Symbian 2nd phase constructor is private.
+        */
+        void ConstructL();
+
+    private: // Type definitions
+        class TIconData
+            {
+            public:
+                TInt        iFileIndex;             // icon file
+                TInt        iIconIndexWithinFile;   // index within file
+                TIconType   iIconType;              // icon type
+                TInt        iIconArrayId;           // index in icon array
+            public:
+                TIconData();
+            };
+
+    private:    // Data
+        ///Own:
+        CDesCArrayFlat* iIconFiles;
+
+        ///Ref:
+        CAknIconArray* iArray;
+
+        RArray<TIconData> iCache;
+    };
+
+#endif      // CLMKSELECTORICONMGR_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/uicontrols/inc/CLmkSelectorImplBase.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,193 @@
+/*
+* 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:    LandmarksUi Content File -    Selector functionality common to both application (view-based) and
+                 common ui components (dialog-based).
+*
+*/
+
+
+
+
+
+
+
+#ifndef CLMKSELECTORIMPLBASE_H
+#define CLMKSELECTORIMPLBASE_H
+
+//  INCLUDES
+#include "MLmkListProviderObserver.h"
+#include <EPos_Landmarks.h> // Lm typedefs, constants etc.
+
+// FORWARD DECLARATIONS
+class CPosLandmarkDatabase;
+class CLmkListProviderBase;
+class CLmkSelectorIconMgr;
+class CAknIconArray;
+class CLmkUiUtils;
+class MLmkListMemento;
+class CEikListBox;
+class CEikonEnv;
+
+// CLASS DECLARATION
+
+/**
+*  Selector functionality common to both application (view-based) and
+*  common ui components (dialog-based).
+*
+*/
+class CLmkSelectorImplBase
+: public CBase,
+  public MLmkListProviderObserver
+    {
+    public:  // Constructors and destructor
+        /**
+        * Destructor.
+        */
+        ~CLmkSelectorImplBase();
+
+    public: // New functions
+        /**
+        * Sets memento to be used by this class. Memento's
+        * lifetime must be at least as long as this class's lifetime.
+        * @param aMemento
+        */
+        IMPORT_C void SetMemento( MLmkListMemento& aMemento );
+
+        /**
+        * Creates a memento (but does not set it with SetMemento()).
+        * @return created memento, ownership is transferred
+        */
+        virtual MLmkListMemento* MementoL() = 0;
+
+        /**
+        * Template method implemented by the subclass and called by
+        * the base class.
+        */
+        virtual void SetupListProviderL() = 0;
+
+        /**
+        * Template method implemented by the subclass and called by
+        * the base class. Needed since composite selector doesn't
+        * have own list provider but it utilizes other providers.
+        * @return CLmkListProviderBase reference
+        */
+        virtual const CLmkListProviderBase& ListProvider() const = 0;
+
+        /**
+        * Return number of visible items
+        * @return TInt
+        */
+        virtual TInt ListVisibleItemCount() = 0;
+
+        /**
+        * Return number of marked items
+        * @return TInt
+        */
+        virtual TInt ListMarkedItemCountL() = 0;
+
+    protected: // New functions
+        /**
+        * Helper method which creates icon array and icon manager, sets
+        * default icons and gives icon manager reference to list provider.
+        * @return created icon array, left in the cleanup stack
+        */
+        CAknIconArray* SetupIconMgrLC();
+
+        /**
+        * Helper method for storing listbox state.
+        * @param aListbox
+        * @param aProvider
+        * @param aFiltered
+        */
+        void Store( const CEikListBox& aListBox,
+                    const CLmkListProviderBase& aProvider,
+                    TBool aFiltered );
+
+        /**
+        * Helper method for restoring listbox state
+        * @param aListbox
+        * @param aProvider
+        * @param aFiltered
+        */
+        void Restore( const CEikListBox& aListBox,
+                      const CLmkListProviderBase& aProvider,
+                      TBool aFiltered );
+
+    protected: // From MLmkListProviderObserver
+        void HandleListProviderEvent( TLmkListProviderEventType aEvent );
+
+    protected: // Constructors and destructor
+        /**
+        * C++ default constructor.
+        * @param aDb
+        * @return newly instantiated object
+        */
+        CLmkSelectorImplBase( CPosLandmarkDatabase& aDb );
+
+        /**
+        * By default Symbian 2nd phase constructor is private.
+        */
+        void BaseConstructL();
+
+    protected: // Data
+
+        ///Ref:
+        CPosLandmarkDatabase& iDb;
+
+        ///Ref:
+        MLmkListMemento* iMemento;
+
+        ///Own:
+        CLmkListProviderBase* iListProvider;
+
+        ///Own:
+        CLmkSelectorIconMgr* iIconMgr;
+
+        ///Own:
+        CLmkUiUtils* iLmkUiUtils;
+
+    private: // Internal classes
+
+        // This struct-like class is used for postponing memento.
+        // It does not own any heap data.
+        class TLmkRestoreData
+            {
+            public: // Constructor:
+                TLmkRestoreData();
+
+            public: // Public data:
+                TBool iRestoreRequested;
+                const CEikListBox* iListBox;
+                const CLmkListProviderBase* iProvider;
+                TBool iFiltered;
+            };
+
+    private: // Data
+        // These should not be used by subclasses, their content is
+        // guaranteed to be correct only within this class.
+
+        ///Latest provider event recorded by this class
+        TLmkListProviderEventType iSelectorImplBaseLatestListEvent;
+
+        ///Contains information for possible postponed memento operation
+        TLmkRestoreData iRestoreData;
+
+    protected:
+        // Ref
+        CEikonEnv*      iEnv;
+    };
+
+#endif      // CLMKSELECTORIMPLBASE_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/uicontrols/inc/CLmkSelectorLBModelBase.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,79 @@
+/*
+* 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:    LandmarksUi Content File -    Base class for selectors listbox model
+*
+*/
+
+
+
+
+
+
+
+#ifndef CLMKSELECTORLBMODELBASE_H
+#define CLMKSELECTORLBMODELBASE_H
+
+//  INCLUDES
+#include <e32base.h>        // CBase
+#include <bamdesca.h>
+
+// FORWARD DECLARATIONS
+class CLmkListProviderBase;
+class CLmkSelectorCache;
+
+// CLASS DECLARATION
+
+/**
+* CLmkSelectorLBModelBase class
+*/
+class CLmkSelectorLBModelBase : public CBase, public MDesCArray
+    {
+    public:  // Constructors and destructor
+        /**
+        * Destructor.
+        */
+        ~CLmkSelectorLBModelBase();
+
+    public: // From MDesCArray
+        TInt MdcaCount() const;
+        TPtrC16 MdcaPoint( TInt aIndex ) const;
+
+    protected:  // New functions
+        // leaving method
+        virtual void MdcaPointL( TInt aIndex ) const = 0;
+
+    protected:  // Constructors and destructor
+        /**
+        * C++ default constructor.
+        * @return newly instantiated object
+        */
+        CLmkSelectorLBModelBase();
+
+        /**
+        * Symbian 2nd phase constructor
+        * @param aListProvider
+        */
+        void BaseConstructL( CLmkListProviderBase& aListProvider );
+
+    protected:    // Data
+        ///Own:
+        CLmkSelectorCache* iCache;
+
+        ///Own:
+        HBufC* iBuffer;
+    };
+
+#endif      // CLMKSELECTORLBMODELBASE_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/uicontrols/inc/CLmkSender.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,226 @@
+/*
+* 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:    LandmarksUi Content File -    This class wraps usage of CLmkEncoder and CSendAppUi
+                 into one simple class.
+*
+*/
+
+
+
+
+
+
+
+#ifndef CLMKSENDER_H
+#define CLMKSENDER_H
+
+//  INCLUDES
+#include "MLmkAOOperationObserver.h"
+#include "LmkConsts.h"
+#include <e32base.h>
+#include <EPos_Landmarks.h>
+#include <EPos_CPosLandmark.h>
+#include "CLmkLandmark.h"
+
+// FORWARD DECLARATIONS
+class CSendUi;
+class CLmkEncoder;
+class CPosLandmarkDatabase;
+class CAknWaitDialog;
+class CEikMenuPane;
+class RFile;
+class CMessageData;
+// CLASS DECLARATION
+
+/**
+*  This class wraps usage of CLmkEncoder and CSendAppUi into one simple class.
+*  This class relies on the fact that given database has been initialized.
+*  It also provides a couple of static helper functions for setting menu.
+*
+*/
+class CLmkSender : public CBase, public MLmkAOOperationObserver
+    {
+    public:  // Constructors and destructor
+
+        /**
+        * Two-phased constructor.
+        * @param aDb
+        * @return
+        */
+        IMPORT_C static CLmkSender* NewL( CPosLandmarkDatabase& aDb );
+
+        /**
+        * Destructor.
+        */
+        virtual ~CLmkSender();
+
+    public: // New functions
+
+        /**
+        * Displays "Send as..." option if SendUI allows and if
+        * there are some visible items in the list.
+        * Note: this function requires that command ELmkCmdSendDummy exists
+        * in the menu pane, since it determines the position of "Send as...".
+        * @param aMenuPane
+        * @param aVisibleCount number of visible items in the list
+        * @param aMenuTextResource customized "Send as..." substitute
+        */
+        IMPORT_C void DisplaySendMenuL(
+                        CEikMenuPane& aMenuPane,
+                        TInt aVisibleCount,
+                        TInt aMenuTextResource = KZeroResourceId ) const;
+
+        /**
+        * Display send's cascade menu
+        * @param aSendUi
+        * @param aMenuPane
+        */
+        IMPORT_C void DisplaySendCascadeMenuL( CEikMenuPane& aMenuPane ) const;
+
+        /**
+        * This method wraps entire encoding and sending procedure.
+        * It is done asynchronously but client doesn't observe it.
+        * This class takes care of error handling etc.
+        * @param aCommandId commmand id which determines the MTM
+        * @aMarkedIds marked item ids
+        * @aSelectedId current item, used if there aren't marked items
+        */
+        void CreateAndSendL( TInt aCommandId,
+                             const RArray<TPosLmItemId>& aMarkedIds,
+                             TPosLmItemId aSelectedId );
+
+        /**
+        * This method wraps entire encoding and sending multiple landmarks.
+        * It is done asynchronously but client doesn't observe it.
+        * This class takes care of error handling etc.
+        * @param aCommandId commmand id which determines the MTM
+        * @aLandmarks Array of CLmkLandmark,which wrap landmarks
+        *             (CPosLandmark) & the respective categories.
+        *
+        */
+        void SendLandmarksL( TInt aCommandId,
+                                    const TDesC& aPackageName,
+                                    const RPointerArray<CLmkLandmark>& aLandmarks );
+
+        /**
+        * This method wraps entire encoding and sending of single landmark.
+        * It is done asynchronously but client doesn't observe it.
+        * This class takes care of error handling etc.
+        * @param aCommandId commmand id which determines the MTM
+        * @param alandmark object CLmkLandmark,which wrap landmarks
+        *             (CPosLandmark) & the respective categories.
+        *
+        */
+        void SendSingleLandmarkL( TInt aCommandId,
+                                      const CLmkLandmark& alandmark );
+        /**
+        * This method wraps entire encoding and sending of single landmark.
+        * This is an overloaded method, which used only for the landmarks,
+        * which exists in the database.
+        * It is done asynchronously but client doesn't observe it.
+        * This class takes care of error handling etc.
+        * @param alandmark object CPosLandmark,which wrap landmarks
+        */
+
+        void SendSingleLandmarkL(const CPosLandmark& alandmark);
+        /**
+        * This method can be used to send a specific file.
+        * It is used when forwarding an existing landmark package.
+        * Note: if file should be deleted then it must be closed and not
+        * read-only, otherwise leave occurs with a system wide error code.
+        * @param aCommandId commmand id which determines the MTM
+        * @aFile full file name to be sent as an attachment
+        * @aDeleteSentFile if TBool then aFile is deleted after sending
+        */
+        void SendFileL( TInt aCommandId,
+                        const TDesC& aFile,
+                        TBool aDeleteSentFile );
+
+
+        void SendFileL( TInt aCommandId,
+                        RFile& aFile,
+                        TBool aDeleteSentFile );
+
+        /**
+        * This method prepares the CLmkLandmark array, from the landmark id's passed.
+        * @param[in/out] aLmkLandmark Array of CLmkLanmark
+        * @param[in] 	 aMarkedIds   landmark ids.
+        */
+        void PrepareMultipleLandmarkForSendL(RPointerArray<CLmkLandmark>& aLmkLandmark,
+        									const RArray<TPosLmItemId>& aMarkedIds);
+       	/**
+        * This method encapsulates CPosLandmark object in CLmkLandmark object
+        * @param[in/out] aLmkLandmark object of CLmkLandmark returned
+        * @param[in] 	 aPosLandmark   landmark object.
+        */
+        void LmkLandmarkFromPosLandmarkL(CLmkLandmark*& aLmkLandmark,
+								   const CPosLandmark& aPosLandmark);
+
+
+
+    public: // From MLmkAOOperationObserver
+
+        void HandleOperationL( TOperationTypes aType,
+                               TReal32 aProgress,
+                               TInt aStatus );
+    private://new functions
+
+    void PrepareSendFilePathL(HBufC*& aFilePath);
+
+    private:
+
+        /**
+        * C++ default constructor.
+        */
+        CLmkSender(CPosLandmarkDatabase& aDb);
+
+        /**
+        * By default Symbian 2nd phase constructor is private.
+        */
+        void ConstructL( CPosLandmarkDatabase& aDb );
+
+
+        void SendL(TDes& iFile, TInt aCommandId);
+
+        TBool QueryNewPackageNameLC(const TDesC& aCurrentPckgName, HBufC*& aNewPackageName);
+ 
+        void SendLandmarksPackageL(TInt aCommandId,const TDesC& aPackageName,const RPointerArray<CLmkLandmark>& aLandmarks );
+
+    	void SendSingleLandmarkL(TInt aCommandId,const RPointerArray<CLmkLandmark>& aLandmarks);
+
+    	void LoadFilteredSendListQueryL(const CMessageData* aMessageData);
+
+        TPtr ReplaceSpecialCharactersL(TPtrC aText);
+
+    private:    // Data
+
+        // Completion code of last asynchronous operation
+        TInt iLastOperationResult;
+
+        ///Own: send ui
+        //CSendAppUi* iSendUi;
+		CSendUi* iSendUi;
+        ///Own: landmark package encoder
+        CLmkEncoder* iEncoder;
+
+        ///Own: wait note
+        CAknWaitDialog* iWaitNote;
+
+        //Added for Bug fix
+        CPosLandmarkDatabase& iDb;
+    };
+
+#endif      // CLMKSENDER_H
+
+// End of File
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/uicontrols/inc/CLmkSingleGraphicLBModel.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,74 @@
+/*
+* 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:    LandmarksUi Content File -    CLmkSingleGraphicLBModel class
+*
+*/
+
+
+
+
+
+
+
+#ifndef CLMKSINGLEGRAPHICLBMODEL_H
+#define CLMKSINGLEGRAPHICLBMODEL_H
+
+//  INCLUDES
+#include "CLmkSelectorLBModelBase.h"
+
+// FORWARD DECLARATIONS
+class CLmkListProviderBase;
+
+// CLASS DECLARATION
+
+/**
+* CLmkSingleGraphicLBModel class
+*/
+class CLmkSingleGraphicLBModel : public CLmkSelectorLBModelBase
+    {
+    public:  // Constructors and destructor
+        /**
+        * Create CLmkSingleGraphicLBModel object
+        * @param aListProvider
+        * @return newly instantiated object
+        */
+        static CLmkSingleGraphicLBModel* NewL(
+                    CLmkListProviderBase& aListProvider );
+
+        /**
+        * Destructor.
+        */
+        ~CLmkSingleGraphicLBModel();
+
+    protected:  // Functions from base classes
+        // leaving method
+        void MdcaPointL( TInt aIndex ) const;
+
+    protected:  // Constructors and destructor
+        /**
+        * C++ default constructor.
+        * @return newly instantiated object
+        */
+        CLmkSingleGraphicLBModel();
+
+        /**
+        * Symbian 2nd phase constructor
+        * @param aListProvider
+        */
+        void ConstructL( CLmkListProviderBase& aListProvider );
+    };
+
+#endif      // CLMKSINGLEGRAPHICLBMODEL_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/uicontrols/inc/CLmkUiUtils.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,227 @@
+/*
+* 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:    LandmarksUi Content File -    Utils class for ui classes.
+*
+*/
+
+
+
+
+
+
+
+#ifndef CLMKUIUTILS_H
+#define CLMKUIUTILS_H
+
+//  INCLUDES
+#include <e32base.h>
+#include <aknnavide.h>
+
+// FORWARD DECLARATIONS
+class CEikStatusPane;
+class CAknTitlePane;
+class CAknContextPane;
+class CEikImage;
+class CPosLandmark;
+
+// Added for testing
+class MLmkEditorUiBuilder;
+class MLmkFieldData;
+class CEikonEnv;
+
+
+// CLASS DECLARATION
+/**
+* CLmkUiUtils class
+* - Store and restore navipane.
+* - Store and restore titlepane.
+* - Read resource file.
+* - etc.
+*/
+class CLmkUiUtils : public CBase
+    {
+    public:  // Constructors and destructor
+        /**
+        * C++ default constructor.
+        * @return created CLmkCategoryContentsView object
+        */
+        static CLmkUiUtils* NewL();
+
+        /**
+        * Destructor.
+        */
+        ~CLmkUiUtils();
+
+    private: // Constructors
+        /**
+        * C++ default constructor.
+        * @return newly instantiated object
+        */
+        CLmkUiUtils();
+
+        /**
+        * By default Symbian 2nd phase constructor is private.
+        */
+        void ConstructL();
+
+    public: // New functions
+        /**
+        * Change title pane
+        * @param aTitle, take ownership
+        */
+        IMPORT_C static void ChangeTitlePaneL( HBufC* aTitle );
+
+        /**
+        * Change title pane. If KZeroResourceId is given then
+        * title pane is not changed.
+        * @param aResourceText resource containing title text
+        */
+        IMPORT_C static void ChangeTitlePaneL( TInt aResourceText );
+
+        /**
+        * Find file from a correct drive, i.e. from drive where dll
+        * being executed is located.
+        * @param aFileName, file name which is updated to contain drive
+        */
+        IMPORT_C static void GetFileWithCorrectDriveL( TFileName& aFileName );
+
+
+
+        // Added for testing
+        /**
+        * Change the icon in Landmark's name label field on a need basis
+        *
+        */
+
+        IMPORT_C static void ChangeLmNameLabelIconL ( MLmkEditorUiBuilder& aUiBuilder,
+                                               MLmkFieldData& nameField);
+
+
+        /**
+        * Method for getting Avkon icon file name with correct
+        * path information.
+        * @return file name
+        */
+        static TFileName* AvkonIconFileLC();
+
+        /**
+        * Method for getting LmkUi icon file name with correct
+        * path information.
+        * @return file name
+        */
+        static TFileName* LmkUiIconFileLC();
+
+        /**
+        * Store current title pane.
+        */
+        void StoreTitlePaneL();
+
+        /**
+        * Restore old title pane.
+        *
+        */
+        void RestoreOldTitlePane();
+
+        /**
+        * Read LmkUi resource file.
+        */
+    	void ReadLmkUiResourceFileL();
+
+        /**
+        * Store current navi pane.
+        */
+        void StoreNaviPaneL();
+
+        /**
+        * Create empty/default navipane.
+        */
+        void CreateDefaultNaviPaneL();
+
+        /**
+        * Create navi label.
+        * @param aLabel
+        */
+        void CreateNaviLabelL( const TDesC& aLabel );
+
+        /**
+        * Restore old navi pane.
+        */
+        void RestoreOldNaviPaneL();
+
+        /**
+        * Swap new context icon and save old icon.
+        * @param aNewImage
+        */
+        void SwapNewContextIconL( CEikImage* aNewImage );
+
+        /**
+        * Set old context icon.
+        */
+        void SetOldContextIcon();
+
+        /**
+        * Update new context image.
+        * @param aNewImage
+        */
+        void UpdateContextIconL( CEikImage* aNewImage );
+
+        /**
+        * Finds if web url field is empty. Ignored http://
+        * @param aUrl web url.
+        */
+        static TBool FindIfWebAddrFieldIsEmpty (const TDes& aUrl);
+
+    private:  // New functions
+        /**
+        * Return status pane.
+        * @return status pane, ownership is not transferred
+        */
+        static CEikStatusPane* StatusPane();
+
+        /**
+        * Set context pane.
+        * @param aContextPane
+        */
+        void SetContextPaneL();
+
+    private:    // Data
+        ///Ref:
+        CAknContextPane* iContextPane;
+
+        ///Own:
+        CEikImage* iOldImage;
+
+        /// TInt variable
+        TInt iResourceOffset;
+
+        /// Own: Title pane text to restore on exit
+        HBufC* iStoredTitlePaneText;
+
+        ///Ref:
+        CAknTitlePane* iTitlePane;
+
+        ///Own:
+        CAknNavigationDecorator* iStoredDecorator;
+
+        //Own:
+        CAknNavigationDecorator* iNaviLabel;
+
+        //Ref:
+        CAknNavigationControlContainer* iNaviPane;
+
+    };
+
+#endif      // CLMKUIUTILS_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/uicontrols/inc/Debug.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,48 @@
+/*
+* 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:    LandmarksUi Content File -    Debug contains debug macros.
+*
+*/
+
+
+
+
+
+
+
+#ifndef DEBUG_H
+#define DEBUG_H
+// INCLUDES
+#include <e32std.h>
+#include "LmkDebugConfig.h"
+
+#ifdef __LMK_DEBUG_FLAG
+
+#define DEBUG(TEXT) Debug( _L(#TEXT) );
+#define DEBUG1(TEXT, ARG1) Debug( _L(#TEXT), (ARG1) );
+#define DEBUG2(TEXT, ARG1, ARG2) Debug( _L(#TEXT), (ARG1), (ARG2) );
+#define DEBUG3(TEXT, ARG1, ARG2, ARG3) Debug( _L(#TEXT), (ARG1), (ARG2), (ARG3) );
+
+void Debug( TRefByValue<const TDesC> aText, ...);
+
+#else
+
+#define DEBUG(TEXT);
+#define DEBUG1(TEXT, ARG1);
+#define DEBUG2(TEXT, ARG1, ARG2);
+#define DEBUG3(TEXT, ARG1, ARG2, ARG3);
+
+#endif // __LMK_DEBUG_FLAG
+
+#endif /* DEBUG_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/uicontrols/inc/DllMain.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,51 @@
+/*
+* 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:    LandmarksUi Content File -
+*
+*/
+
+
+
+
+
+
+
+
+#ifndef LMKUI_DLLMAIN_H
+#define LMKUI_DLLMAIN_H
+
+//  INCLUDES
+#include <e32std.h>
+
+// DATA TYPES
+/// Panic codes.
+enum TLmkUiPanicCode
+    {
+    };
+
+
+// FUNCTION PROTOTYPES
+/**
+* Stop the program execution with module specific text and error code.
+* Call if an unrecoverable error occurs in this module's code.
+*
+* @param aCode     error code
+*
+* @see TLmkUiPanicCode
+*/
+void LmkUiPanic(TInt aCode);
+
+#endif // LMKUI_DLLMAIN_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/uicontrols/inc/LmkEditorFieldFactory.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,60 @@
+/*
+* 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:    LandmarksUi Content File -    Landmark editor field factory class.
+*
+*/
+
+
+
+
+
+
+
+#ifndef __LMKEDITORFIELDFACTORY_H__
+#define __LMKEDITORFIELDFACTORY_H__
+
+#include <e32std.h>
+// FORWARD DECLARATIONS
+class MLmkEditorField;
+class MLmkFieldData;
+class MLmkEditorUiBuilder;
+
+
+// CLASS DECLARATION
+
+/**
+* Landmark editor field factory class.
+*/
+class LmkEditorFieldFactory
+    {
+    public:  // destructor
+        /**
+        * Factory for creating lmk editor fields.
+        * @param aField field which is created
+        * @param aUiBuilder UI builder
+		* @return a contact editor field.
+        */
+        static MLmkEditorField* CreateFieldL(
+                MLmkFieldData& aField,
+                MLmkEditorUiBuilder& aUiBuilder );
+
+		static MLmkEditorField* CreateFieldL(
+				MLmkFieldData& aField,
+				MLmkEditorUiBuilder& aUiBuilder,
+				const TDesC& aCategoryName );
+    };
+
+#endif // __LMKEDITORFIELDFACTORY_H__
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/uicontrols/inc/LmkNotes.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,147 @@
+/*
+* 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:    LandmarksUi Content File -    Landmarks Ui note class definition
+*
+*/
+
+
+
+
+
+
+
+#ifndef __LMKNOTES_H__
+#define __LMKNOTES_H__
+
+#include <e32std.h>
+#include <AknInfoPopupNoteController.h>
+
+
+// CLASS DECLARATION
+
+/**
+*  LmkNotes class.
+*/
+class LmkNotes
+    {
+    public: // new functions
+        /**
+        * Display category deletes confirmation query
+        * @param aAmount
+        * @return positive value if yes, else zero or negative
+        */
+        IMPORT_C static TInt CategoryConfirmationQueryL( CEikonEnv* aEnv, const TInt aAmount );
+
+        /**
+        * Display landmark deletes confirmation query
+        * @param aAmount
+        * @return positive value if yes, else zero or negative
+        */
+        IMPORT_C static TInt LandmarkConfirmationQueryL( CEikonEnv* aEnv,const TInt aAmount=1);
+
+        /**
+        * Display landmark information note.
+        * @param resource id
+        */
+        IMPORT_C static void InformationNoteL( CEikonEnv* aEnv, const TInt aResourceId );
+
+        /**
+        * Display category name query
+        * @param aDataText, empty or existing name
+        * @param resource id (CAknTextQueryDialog)
+        * @return positive value if pressed ok, else negative
+        */
+        IMPORT_C static TInt CategoryNameQueryL( TDes& aDataText,
+       											 const TInt aResourceId );
+        /**
+        * Display landmark information note.
+        * @param resource id
+        * @param extra text to be displayed
+        */
+         IMPORT_C static void InformationNotewithTextL( CEikonEnv* aEnv, TInt aResourceId,
+                                                  TPtrC aTextPtr );
+        /**
+        * Display Out of memory note
+        *
+        */
+        IMPORT_C static void OutOfMemoryNoteL( CEikonEnv* aEnv );
+        /**
+        * Display names in a message query ( List of names, one in each line )
+        * @param aMsg, set of names to be displayed in the query
+        */
+        IMPORT_C static void MessageQueryL( CEikonEnv* aEnv, TDes& aMsg, TInt aCount );
+        /**
+         * Display an information note for show on map use case
+         * when selected landmarks are empty
+         *
+         */
+		IMPORT_C static void AllLandmarksEmptyNoteL( CEikonEnv* aEnv );
+
+		/**
+         * Display an information note for show on map use case when
+         * a landmark are empty
+         *
+         * @param aLandmarkName the name of the landmark which does
+         *                      not have coordinates
+         */
+		IMPORT_C static void LandmarksEmptyNoteL( CEikonEnv* aEnv,TPtrC aLandmarkName );
+
+		/**
+         * Display an information note for category show on map use
+         * case when all landmarks are empty
+         *
+         * @param aLandmarkName the name of the landmark which does
+         *                      not have coordinates
+         */
+		IMPORT_C static void CategoryEmptyNoteL( CEikonEnv* aEnv, TPtrC aCategory );
+
+		/**
+         * Display an information note for category show on map use
+         * case when all landmarks are empty
+         *
+         * @param aLandmarkName the name of the landmark which does
+         *                      not have coordinates
+         */
+		IMPORT_C static void LandmarkInCategoryEmptyNoteL( CEikonEnv* aEnv, TPtrC aCategory, TPtrC aLandmark);
+
+		/**
+         * Display an information popup note after 1 sec.
+         * @param aMsg This is the message to be displayed.
+         * @param aPosition Position of the info popup.
+         */
+		IMPORT_C static CAknInfoPopupNoteController* ShowDelayedInfoPopupL( TDesC& aMsg,TPoint& aPosition );
+		/**
+         * This query dialog will be displayed, when the landmark, already
+         * has location coordinate, which is being replaced with new coordinate
+         * It asks whether to replace or not.
+         */
+		IMPORT_C static TInt ShowOwerriteLocationQueryL( CEikonEnv* aEnv );
+		/**
+         * This message query displays text with the link.
+         * @return returns the button id
+         */
+		IMPORT_C static TInt MessageQueryWithLinkL( CEikonEnv* aEnv, TInt aHeadingText,
+											   TInt aMsgQueryText, TInt aLinkText,
+											   TCallBack aCallBack );
+		/**
+         * This message query is a generic message query.
+         *
+         */
+		IMPORT_C static TInt GenericMessageQueryL( CEikonEnv* aEnv, TInt aMsgQueryText, TInt aHeadingText );
+
+    };
+
+#endif // __LMKNOTES_H__
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/uicontrols/inc/MLmkDlgMenuObserver.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,51 @@
+/*
+* 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:    LandmarksUi Content File -    Dialog menu observer.
+*
+*/
+
+
+
+
+
+
+
+
+#ifndef MLMKDLGMENUOBSERVER_H
+#define MLMKDLGMENUOBSERVER_H
+
+// FORWARD DECLARATIONS
+class CEikMenuPane;
+
+// CLASS DECLARATION
+
+/**
+* MLmkDlgMenuObserver class
+*/
+class MLmkDlgMenuObserver
+    {
+    public: // New functions
+        /**
+        * If observer is set for a dialog then this call back method is
+        * called from the dialog's DynInitMenuPaneL().
+        * @param aResourceId
+        * @param aMenuPane
+        */
+        virtual void DynInitDlgMenuPaneL( TInt aResourceId,
+                                          CEikMenuPane* aMenuPane ) = 0;
+    };
+
+#endif      // MLMKDLGMENUOBSERVER_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/uicontrols/inc/MLmkEditorField.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,111 @@
+/*
+* 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:    LandmarksUi Content File -    Landmark editor field abstract class.
+*
+*/
+
+
+
+
+
+
+
+#ifndef __MLMKEDITORFIELD_H__
+#define __MLMKEDITORFIELD_H__
+
+//  INCLUDES
+#include <e32def.h>
+#include <e32base.h>
+
+// FORWARD DECLARATIONS
+class MLmkFieldData;
+
+// CLASS DECLARATION
+
+/**
+ * Landmark editor field abstract class.
+ */
+class MLmkEditorField
+    {
+    public:  // destructor
+        /**
+         * Destructor.
+         */
+        virtual ~MLmkEditorField(){}
+
+    public:  // Interface
+        /**
+         * Return the dialog control id associated to this field.
+         */
+        virtual TInt ControlId() const = 0;
+
+        /**
+         * Returns the id of this field.
+         */
+        virtual TInt FieldId() const = 0;
+
+        /**
+         * Save editor control data to contact item field.
+		 * @return ETrue if success, EFalse otherwise
+         */
+        virtual TBool SaveFieldL() = 0;
+
+        /**
+         * Returns the landmark item fields label.
+         */
+        virtual TPtrC FieldLabel() const = 0;
+
+        /**
+         * Sets aLabel as the landmark item fields label
+         * Takes ownership of the aLabel.
+         */
+        virtual void SetFieldLabelL(HBufC* aLabel) = 0;
+
+        /**
+         * Returns the landmark item field.
+         */
+        virtual MLmkFieldData& LandmarkItemField() const = 0;
+
+		/**
+		 * Returns the text in the fields control.
+		 */
+		virtual HBufC* ControlTextL() const = 0;
+		// code added -start-
+		virtual TReal FieldValue() const = 0;
+		//-end-
+        /**
+         * Activates the control.
+         */
+        virtual void ActivateL() = 0;
+
+        /**
+         * Update field data. Default implementation is empty
+         */
+        virtual void UpdateL(){}
+        /**
+         * Resets the field
+         */
+        virtual void ResetL()=0;
+        /**
+        * if the control is added when form is created, its state is set
+        * by the form, but, when the control is added dynamically
+        * its state must be set at the time of creation,hence this
+        * function is used to set the state.
+        */
+        virtual void SetEditableL( TBool /*aEditable*/ ){}
+    };
+
+#endif // __MLMKEDITORFIELD_H__
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/uicontrols/inc/MLmkEditorUiBuilder.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,111 @@
+/*
+* 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:    LandmarksUi Content File -    Landmark editor field abstract callback class.
+*
+*/
+
+
+
+
+
+
+
+#ifndef __MLMKEDITORUIBUILDER_H__
+#define __MLMKEDITORUIBUILDER_H__
+
+//  INCLUDES
+#include <e32def.h>
+
+// FORWARD DECLARATIONS
+class CCoeControl;
+class CEikCaptionedControl;
+class CPosLandmarkDatabase;
+
+// CLASS DECLARATION
+
+/**
+* Landmark editor field abstract class.
+*/
+class MLmkEditorUiBuilder
+    {
+    public:  // destructor
+        /**
+        * Destructor.
+        */
+        virtual ~MLmkEditorUiBuilder(){}
+
+    public:  // Interface
+		/**
+		* Creates a User interface control for a line.
+		* @param aCaption	The caption descriptor to the control.
+		* @param aControlId	The created controls ID.
+		* @param aControlType	The created controls type.
+		*/
+        virtual CCoeControl* CreateLineL(const TDesC& aCaption,
+                TInt aControlId, TInt aControlType) = 0;
+
+        /**
+        * Returns the control line corresponding to aControlId.
+        * @param aControlId
+        * @return CEikCaptionedControl pointer
+        */
+        virtual CEikCaptionedControl* LineControl(TInt aControlId) const = 0;
+
+        /**
+        * Removed the aControlId control from the UI.
+        * @param aControlId
+        */
+        virtual void DeleteControl(TInt aControlId) = 0;
+
+		/**
+		* Try to change the focus to aControlId.
+		* @param aControlId
+		*/
+		virtual void TryChangeFocusL(TInt aControlId) = 0;
+
+		/**
+		* Change the line controls caption aText in the UI.
+        * @param aControlId
+        * @param aText
+		*/
+		virtual void SetCurrentLineCaptionL( TInt aControlId,
+                                             const TDesC& aText) = 0;
+
+		/**
+		* Return the control object corresponding to aControlId.
+        * @param aControlId
+		* @return NULL if the control does not exist.
+		*/
+		virtual CCoeControl* Control(TInt aControlId) const = 0;
+
+		/**
+		* Sets the field editable state.
+		* @param aState ETrue to set editable, EFalse otherwise
+		*/
+		virtual void SetEditableL(TBool aState) = 0;
+
+        /**
+        * Return landmark's database
+        * @return landmark's database
+        */
+        virtual CPosLandmarkDatabase& Database() = 0;
+        /**
+        * Return editor's edit state
+        */
+        virtual TInt EditMode() = 0;
+    };
+
+#endif // __MLMKEDITORUIBUILDER_H__
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/uicontrols/inc/MLmkListMemento.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,74 @@
+/*
+* 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:    LandmarksUi Content File -    Interface for storing and restoring listbox UI status
+*
+*/
+
+
+
+
+
+
+
+#ifndef MLMKLISTMEMENTO_H
+#define MLMKLISTMEMENTO_H
+
+//  INCLUDES
+#include <e32base.h>
+
+// FORWARD DECLARATIONS
+class CEikListBox;
+class CLmkListProviderBase;
+
+// CLASS DECLARATION
+
+/**
+* MLmkListMemento class. Interface for storing and restoring
+* listbox UI status (e.g. current item index).
+* Methods in this class are non-leaving since this functionality is
+* just supplementary, error situations should be handled by memento.
+*/
+class MLmkListMemento
+    {
+    public: // Constructors and destructors
+        /**
+        * Destructor
+        */
+        virtual ~MLmkListMemento() {};
+
+    public: // New functions
+        /**
+        * Store listbox state
+        * @param aListbox
+        * @param aProvider
+        * @param aFiltered
+        */
+        virtual void Store( const CEikListBox& aListBox,
+                            const CLmkListProviderBase& aProvider,
+                            TBool aFiltered ) = 0;
+
+        /**
+        * Restore listbox state
+        * @param aListbox
+        * @param aProvider
+        * @param aFiltered
+        */
+        virtual void Restore( const CEikListBox& aListBox,
+                              const CLmkListProviderBase& aProvider,
+                              TBool aFiltered ) = 0;
+    };
+
+#endif      // MLMKLISTMEMENTO_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/uicontrols/inc/MLmkMapAndNavigationObServer.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,46 @@
+/*
+* 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:    LandmarksUi Content File -    Map And navigation event notifier.
+*
+*/
+
+
+
+
+
+
+
+#ifndef MLMKANDNAVIGATIONOBSERVER_H
+#define MLMKANDNAVIGATIONOBSERVER_H
+
+
+/**
+* MLmkMapAndNavigationObserver class
+*/
+class MLmkMapAndNavigationObserver
+    {
+    public: // New functions
+        /**
+        * Virtual method for handling map & navigation notifications.
+        * This function is called when CLmkMapNavigationInterface receives
+        * a notification regarding the landmark creation, it passes
+        * the landmark id back to the observer.
+        * @param aNewLmkItemId
+        */
+        virtual void HandleLmCreated(TPosLmItemId aNewLmkItemId) = 0;
+    };
+
+#endif      // MLMKANDNAVIGATIONOBSERVER_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/uicontrols/inc/MLmkMskObserver.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,47 @@
+/*
+* 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:    LandmarksUi Content File -    Provides an observer interface to Landmarks application
+*				 for updation of middle softkey.
+*
+*/
+
+
+
+
+
+
+#ifndef MMSKOBSERVER_H
+#define MMSKOBSERVER_H
+
+// CLASS DECLARATIONS
+/**
+*  This interface defines specification to update MSK in landmarks
+*  application view w.r.t backend changes in Landmarks/Categores.
+*  It is implemented by the containers of the application to update
+*  the associated view. This callback will be called from the respective
+*  selectors,when there is any change noticed in the Landmarks/Categories.
+*/
+class MLmkMskObserver
+	{
+	public:
+		/**
+        * Notifies the container that Landmarks/Categories have changed,
+        * so that containers can update their respective views.
+        * @param aEnableMsk to enable/disable MSK
+        */
+		virtual void UpdateMskContainerL()=0;
+		virtual void UpdateMskContainerForFilterL(){};
+	};
+
+#endif //MMSKOBSERVER_H
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/uicontrols/inc/MLmkNavigationObserver.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,65 @@
+/*
+* 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:    LandmarksUi Content File -    MLmkNavigationObserver class for observing tab navigation in
+*                dialog.
+*
+*/
+
+
+
+
+
+
+
+
+#ifndef MLMKNAVIGATIONOBSERVER_H
+#define MLMKNAVIGATIONOBSERVER_H
+
+//  INCLUDES
+#include <coedef.h>
+#include <w32std.h>
+
+// CLASS DECLARATION
+
+/**
+* MLmkNavigationObserver class for observing tab navigation in
+* dialog. Also allows observing dialog launching and closing.
+*/
+class MLmkNavigationObserver
+    {
+    public: // New functions
+        /**
+        * Handle navigation events
+        * @param aKeyEvent
+        * @return TKeyResponse
+        */
+        virtual TKeyResponse HandleNavigationEventL(
+                                const TKeyEvent& aKeyEvent ) = 0;
+
+        /**
+        * Handle dialog launching. Called just before showing
+        * the dialog, from dialog's PreLayoutDynInitL.
+        */
+        virtual void HandleLaunchingEventL() = 0;
+
+        /**
+        * Handle dialog closing. Called just before dialog will
+        * be exited.
+        */
+        virtual void HandleClosingEventL() = 0;
+    };
+
+#endif      // MLMKNAVIGATIONOBSERVER_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/uicontrols/inc/TLmkDeletionHelper.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,91 @@
+/*
+* 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:    LandmarksUi Content File -    This class helps updating the listbox after deleting item(s).
+*
+*/
+
+
+
+
+
+
+
+#ifndef TLMKDELETIONHELPER_H
+#define TLMKDELETIONHELPER_H
+
+//  INCLUDES
+#include <e32std.h>
+#include <e32base.h>
+
+// FORWARD DECLARATIONS
+class CEikListBox;
+
+// CLASS DECLARATION
+
+/**
+* This class offers an easy way to handle list update when user is
+* deleting items. This class does not own heap data.
+*/
+class TLmkDeletionHelper
+    {
+    public:  // Constructors and destructor
+
+        /**
+        * C++ default constructor.
+        */
+        TLmkDeletionHelper();
+
+        /**
+        * Destructor.
+        */
+        virtual ~TLmkDeletionHelper();
+
+    public: // New functions
+
+        /**
+        * Store list information when use has requested deleting one
+        * or more items.
+        * @param aListBox reference to the listbox
+        * @param aMultipleItems ETrue if user is deleting multiple items
+        */
+        void StoreListInformation( CEikListBox& aListBox,
+                                   TBool aMultipleItems );
+
+        /**
+        * Updates the list using AknListBoxUtils if delete happened,
+        * i.e. StoreListInformation() has been previously called.
+        * @return ETrue if list was updated, EFalse otherwise
+        */
+        TBool UpdateListIfDeleteHappenedL();
+
+    private:    // Data
+        /// marked ETrue when starting to delete
+        TBool iUserRequestedDelete;
+
+        /// required by AknListBoxUtils
+        TInt iCurrentItemIndexBeforeRemoval;
+
+        /// required by AknListBoxUtils
+        TBool iCurrentItemWasRemoved;
+
+        ///Ref: required by AknListBoxUtils
+        const CArrayFix<TInt>* iIndexesToRemovedItems;
+
+        ///Ref: list to be updated
+        CEikListBox* iListBox;
+    };
+
+#endif      // TLMKDELETIONHELPER_H
+
+// End of File
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/uicontrols/inc/clmkcallcmd.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,123 @@
+/*
+* Copyright (c) 2002-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:    LandmarksUi Content File -    Description : This file contains class which implements methods for
+*                interfacing with Call UI component for calling phonenumber
+*
+*/
+
+
+
+
+
+
+
+#ifndef CLMKCALLCMD_H
+#define CLMKCALLCMD_H
+
+//  INCLUDES
+#include <AiwDialDataTypes.h>
+#include <AiwCommon.h>
+#include <MPhCltEmergencyCallObserver.h>
+
+class CAiwServiceHandler;
+class CAiwGenericParamList;
+class CPhCltEmergencyCall;
+// CLASS DECLARATION
+/**
+* CLmkCallCmd class
+* Implements the methods which interact with Telephony subsystem
+* (CallUI) through AIW FW.
+*/
+class CLmkCallCmd:public CBase, public MPhCltEmergencyCallObserver
+	{
+	public:  // Constructors and destructor
+		/**
+		* Two-phased constructor.
+		* @return
+		*/
+		IMPORT_C static CLmkCallCmd* NewL( );
+
+		/**
+		* Destructor.
+		*/
+		virtual ~CLmkCallCmd();
+
+	private:  // Constructors and destructor
+		/**
+		* Default Constructor
+		*/
+		CLmkCallCmd();
+
+		/**
+		* By default Symbian 2nd phase constructor is private.
+		*/
+		void ConstructL( );
+
+	public:
+		/**
+		* Attaches Application's menu pane and the interest resource to AIW FW service
+		*
+		* @param aMenuResourceId application menu which includes service interest resource
+		* @param aInterestResourceId application resource containing service interest
+        */
+		void AttachMenuPaneL(TInt aMenuResourceId, TInt aInterestResourceId);
+
+		/**
+		* Sets up AIW menu handler service for application (Calling Phone number )
+		* @param aMenuPane application menu pane
+		* @param aMenuResourceId application menu which includes service interest resource
+		* @param aBaseMenuCmdId base commandId which AIW FW uses for attaching application service interst
+        */
+
+		void InitializeMenuPaneL( CEikMenuPane& aMenuPane,
+								  TInt aMenuResourceId,
+								  TInt aBaseMenuCmdId );
+		/**
+		* Configures clinet's service criteria (array of service interest) to AIW FW
+		* @param aInterestId application's service interest
+		*/
+		void AttachInterestL ( RCriteriaArray& aInterestId );
+
+		/**
+		* Overloaded version
+		*/
+		void AttachInterestL ( TInt aInterestId );
+
+		/**
+		* Execute AIW menu service for calling phone number
+		* @param aCommandId application menu command
+		* @param aPhoneNum  phone number to which call is to be made
+		*/
+		void ExecuteAIWCallCmdL( TInt aCommandId, TDesC& aPhoneNum );
+
+		/**
+        * This function makes a call to AIW service handler to get
+        * the mapped AIW menu id for the , menu id clicked.
+        */
+        TInt ServiceCmdByMenuCmd( TInt aMenuCmd );
+
+	private: //new functions
+		TBool HandleEmergencyCallL( TDesC& aPhoneNum );
+		void  HandleNormalCallL( TInt aCommandId, TDesC& aPhoneNum );
+		//MPhCltEmergencyCallObserver
+		void  HandleEmergencyDialL( const TInt aStatus );
+
+	private: // Data members
+		// AIW Call Service Handler instance.
+		CAiwServiceHandler* iAiwCallServiceHandler;
+		//Emergency call handler
+		CPhCltEmergencyCall* iEmergencyCall;
+	};
+#endif
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/uicontrols/inc/clmkcentralrepository.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,172 @@
+/*
+* 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:    LandmarksUi Content File -    This class listens to the changes in the Central Repository
+*                for specific keys and notifies the observer.
+*
+*/
+
+
+
+
+
+
+
+#ifndef __CLMKCENTRALREPOSITORY_H__
+#define __CLMKCENTRALREPOSITORY_H__
+
+//  System Includes
+#include <e32base.h>
+
+// User Includes
+#include "mlmkcentralrepositoryobserver.h"
+
+// Forward Declarations
+class CRepository;
+
+// Constant Declarations
+
+// Class Definition
+/**
+ * This class listens to the change in value of specified key, in the central repository.
+ * When there is any change, it notifies to the observer.
+ * This class can also be used, without notification, just to get key values from
+ * central repository.
+ * To make it start listening on a specific key value change, create an instance of
+ * this class using the argumented NewL/NewLC functions.
+ * A request can only be cancelled, when the object of this class
+ * is deleted.
+ */
+NONSHARABLE_CLASS( CLmkCentralRepository ) : public CActive
+	{
+	public:
+		/**
+         * Creates new central repository listener
+         *
+		 * @return CLmkCentralRepository*	Pointer to self
+         */
+        static CLmkCentralRepository* NewL();
+
+
+		/**
+         * Creates new central repository listener
+         * Leaves the object on the Clean up stack
+   		 *
+		 * @return CLmkCentralRepository*	Pointer to self
+         */
+        static CLmkCentralRepository* NewLC();
+
+        /**
+         * Creates new central repository listener
+         *
+         * @param aKey                              Key, on which change is being listened.
+         * @param  aObserver                        Observer, which will be called when
+         *                                          there is any change in the specified key
+         *                                          value.
+		 * @return CLmkCentralRepository*	Pointer to self
+         */
+        static CLmkCentralRepository* NewL( TUint32 aKey ,
+        					MLmkCentralRepositoryObserver*	aObserver);
+
+
+		/**
+         * Creates new central repository listener
+         * Leaves the object on the Clean up stack
+         *
+         * @param aKey                              Key, on which change is being listened.
+         * @param  aObserver                        Observer, which will be called when
+         *                                          there is any change in the specified key
+         *                                          value.
+		 * @return CLmkCentralRepository*	Pointer to self
+         */
+        static CLmkCentralRepository* NewLC( TUint32 aKey ,
+        					MLmkCentralRepositoryObserver*	aObserver);
+
+
+		/**
+		 * Destructor
+		 */
+		~CLmkCentralRepository ();
+
+	public:
+
+		/**
+		 * Start notification from the Central repository server for any changes in the
+		 * in the specified key value.
+		 *
+		 * @panic             Panics with code KLmkPanicNullMember, when no observer
+		 *                    is set.
+		 *                    Panics with code KLmkKeyNotSet, when no key is set.
+		 *
+		 * @return TInt       KErrNone if successful, KErrAlreadyExists if there is already
+		 *                    a notification from this CRepository on this setting, or an
+		 *                    error from IPC or server side resource allocation failure.
+		 */
+		TInt StartNotification();
+
+		/**
+		* Gets the value for the specified key, from central repository.
+		* @param        aKey    Key for which, value is being fetched.
+		* @param[out]aValue  Fetched value from central repository.
+		*/
+		TInt GetKeyValue(TUint32 aKey, TInt& aValue);
+
+    protected:
+        /**
+         * Inherited from CActive
+         */
+        void RunL();
+
+        /**
+         * Inherited from CActive
+         */
+        void DoCancel();
+
+	private:
+		/**
+ 		 * Constructor
+		 */
+		CLmkCentralRepository( TUint32 aKey ,
+        					   MLmkCentralRepositoryObserver*	aObserver);
+
+		/**
+		 * Second Phase Constructor
+		 */
+		void ConstructL();
+			/**
+		 * Second Phase Constructor
+		 */
+		void Construct2L();
+
+
+	private:
+
+		/**
+	     * Key, which is being observed for any change, in its value.
+	     */
+		const TUint32 iKey;
+	    /**
+	     * Reference to the Settings observer
+	     */
+		MLmkCentralRepositoryObserver*     iObserver;
+
+		/**
+		 * Reference to the Central repository object
+		 *
+		 * Owns
+		 */
+		CRepository*                    iRepository;
+	};
+
+
+#endif //__CLMKCENTRALREPOSITORY_H__
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/uicontrols/inc/clmkgotourlcmd.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,99 @@
+/*
+* Copyright (c) 2002-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:    LandmarksUi Content File -    This file contains class which implements methods for
+*                interfacing with launching browser
+*
+*/
+
+
+
+
+
+
+#ifndef CLMKGOTOURLCMD_H
+#define CLMKGOTOURLCMD_H
+
+//  INCLUDES
+#include <browserlauncher.h>
+#include <downloadedcontenthandler.h>
+#include <AknServerApp.h>
+
+class MDownloadedContentHandler;
+class MAknServerAppExitObserver;
+class CAiwGenericParamList;
+class CBrowserLauncher;
+
+// CLASS DECLARATION
+/**
+* TLmkLauncherContentHandler class
+*
+*/
+class TLmkLauncherContentHandler
+: public MDownloadedContentHandler,
+  public MAknServerAppExitObserver
+    {
+    public:
+        TLmkLauncherContentHandler();
+        TBool HandleContentL( const TDesC& aFileName,
+                              const CAiwGenericParamList& aParamList,
+                              TBool& aContinue );
+        TAny* DownloadedContentHandlerReserved1( TAny* /*aAnyParam*/ );
+        void HandleServerAppExit( TInt aReason );
+    };
+
+/**
+* CLmkGoToURLCmd class
+* This class implements the methods for interacting with Browser launcher
+* API for launching web browser
+*/
+class CLmkGoToURLCmd : public CBase
+	{
+	public:  // Constructors and destructor
+
+		/**
+		* Two-phased constructor.
+		* @return
+		*/
+		IMPORT_C static CLmkGoToURLCmd* NewL();
+
+		/**
+		* Destructor.
+		*/
+		virtual ~CLmkGoToURLCmd();
+
+	private:  // Constructors and destructor
+		/**
+		* Default Constructor
+		*/
+		CLmkGoToURLCmd();
+
+		/**
+		* By default Symbian 2nd phase constructor is private.
+		*/
+		void ConstructL( );
+
+	public:
+	    /**
+	    * Launches Browser for the given web address
+	    * @param aUrl web address
+	    */
+		void LaunchBrowserL(const TDesC& aUrl);
+
+	private:
+		// Data
+		TLmkLauncherContentHandler* iContentHandler;
+		CBrowserLauncher* iLauncher;
+	};
+#endif
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/uicontrols/inc/clmkmapnavigationinterface.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,330 @@
+/*
+* 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:    LandmarksUi Content File -    Application's interface class to Map and Navigation use cases
+*
+*/
+
+
+
+
+
+
+
+#ifndef CLMKMAPNAVIGATIONINTERFACE_H
+#define CLMKMAPNAVIGATIONINTERFACE_H
+
+// INCLUDES
+#include <AiwCommon.h>
+#include <e32std.h>
+#include <EPos_Landmarks.h>
+#include <AknProgressDialog.h>
+#include "mlmkdbsearchutilsobserver.h"
+#include "CLmkAppSelectorImplBase.h"
+#include "MLmkMapAndNavigationObServer.h"
+// FORWARD DECLARATION
+class CPosLandmark;
+class CAiwServiceHandler;
+class CLmkDbSearchUtils;
+class CAknWaitDialog;
+class CPosLandmarkDatabase;
+
+
+/**
+* The class CLmkMapNavigationInterface contains the implemenation
+* for all the uses cases of Map and Navigation. It is a singleton class
+*
+*/
+class CLmkMapNavigationInterface : public CBase,
+								   public MAiwNotifyCallback,
+								   public MLmkDbSearchUtilsObserver,
+								   public MProgressDialogCallback
+	{
+	public:
+	    // Enum for view type
+		enum EViewType
+			{
+			EByLmkView, 	// For landmark view
+			EByCategoryView // For category view
+			};
+	public: // Constructors and destructor
+		/**
+        * Symbian 1st phase static constructor.
+        *
+        * @param aViewType the view type (By Landmark or by category)
+        */
+        IMPORT_C static CLmkMapNavigationInterface* NewL( CPosLandmarkDatabase& aDb );
+
+        /**
+        * Destructor.
+        */
+       IMPORT_C ~CLmkMapNavigationInterface();
+
+	public: // from MAiwNotifyCallback
+		/**
+		* The callback function for the get landmark from map use case
+		* This function gets a callback once the user selects a location
+		* from map to save as a landmark.
+		*/
+		IMPORT_C TInt HandleNotifyL( TInt aCmdId,
+						            TInt aEventId,
+						            CAiwGenericParamList &aEventParamList,
+						            const CAiwGenericParamList &aInParamList );
+	public: // from MProgressDialogCallback
+		/**
+		* Callback function for Progress dialog when ok to exit
+		* the operation.
+		*/
+		void DialogDismissedL( TInt aButtonId );
+
+    public: // New methods for Map & Navigation use cases
+
+    	/**
+    	* Shows the provided landmarks on map
+    	*
+    	* @param aArray pointer array of landmarks which are to be displayed on map
+    	*
+    	* @param aCommand command id for show on map
+    	* @param aViewType
+    	*/
+    	IMPORT_C void ShowLandmarksOnMapL( RPointerArray<CPosLandmark> &aArray,
+    									   TInt aCommand,
+    									   EViewType aViewType );
+
+    	/**
+    	* Shows all the landmarks of a category on Map. The function searches
+    	* Landmaks database through db search utils to get the landmaks in the
+    	* category and then displays the map. While the search is being done a
+    	* progress note is displayed.
+    	*
+    	* @param aCategoryId item id of the category whose landmarks need
+    	*					 to be displayed on map
+    	* @param aViewType
+    	*
+    	*/
+    	IMPORT_C void ShowCategoryOnMapL( TPosLmItemId aCategoryId,
+    									  TInt aCommand,
+    									  EViewType aViewType  );
+
+    	/**
+    	* Displays map to allow navigation to the provided landmark
+    	*
+    	* @param aLandmark the Landmark to navigate to
+    	* @param aCommand is the command id in the menu pane
+    	*/
+    	IMPORT_C void NavigateToLandmarkL( CPosLandmark* aLandmark, TInt aCommand );
+
+    	/**
+    	* This method is called for the get landmarks from map use case. The method
+    	* sends the appropriate aiw command to get landmarks from map. Once user
+    	* selects the opsition on map, a landmarks editor dialog will be displayed,
+    	* populated with the appropriate position data of the position selected.
+    	*
+    	* @param aCommand menu command id for getting location from map
+    	*/
+    	IMPORT_C void GetLandmarkFromMapL( TInt aCommand );
+
+    	/**
+    	* This method is called for the get landmarks from map for saving a category.
+    	* Once user selects the opsition on map, a landmarks editor dialog will be displayed,
+    	* populated with the appropriate position data of the position selected.
+    	*
+    	* @param aCommand menu command id for getting location from map
+    	* @param aCategoryId is the category in which the landmark needs to be saved
+    	*/
+    	IMPORT_C void GetLandmarkFromMapForCategoryL( TInt aCommand, TPosLmItemId aCategoryId );
+
+    	/**
+    	* Method returns the service command of the provided menu command.This
+    	* function needs to be invoked in the HandleCommandL function when a
+    	* menu option is selected. If the function returns anythin other than
+    	* KAiwCommandNone then it is implied that some interest has been attached
+    	* to the menu command and is a AIW operation.
+    	*
+    	* @param aCommand the command id for which the checks need to be made
+    	*
+    	* @return service id if valid, KAiwCmdNone otherwise
+    	*/
+    	IMPORT_C TInt GetServiceCmdByMenuCmd( TInt aCommand );
+
+    	/**
+    	* Method used to attach menu interest to AIW. If it is required to attach
+    	* interest to any menu pane / command then it is require to invoke this
+    	* function with the required menu pane with the required interest. The
+    	* interest is an AIW interest that is defined in the resource file.
+    	*
+    	* @param aMenuPane is the id of the menu pane from the resource file
+    	* 		 to which the interest needs to be attached
+    	*
+    	* @param aInterest is the id of the interest from the resource file
+    	*/
+    	IMPORT_C void AttachAIWInterestL( TInt aMenuPane, TInt aInterest );
+
+    	/**
+    	* Method used to attach menu panes which are specific to Map and Navigation.
+    	* This function bascially handles the dimming of menu commands in menu panes
+    	* and needs to be invoked in function "DynInitMenuPaneL" providing it with the
+    	* resource id, menu pane and the base command, which is the command enum from
+    	* which all Map and Navigation menu id's are declared (basically the offset).
+    	*
+    	* @param aResourceId resource id of the selected item
+    	*
+    	* @param aMenuPane is the pointer of the menu pane to which the submenu
+    	*        will be attached
+    	*
+    	* @param aBaseCommand is the base command for map & navigation menu items
+    	*
+    	* @return ETrue if sub menu pane needs to be attached and will cascade the
+    	*         sub menu, EFalse otherwise
+    	*/
+    	IMPORT_C TBool HandleMenuOperationL( TInt aResourceId, CEikMenuPane *aMenuPane, TInt aBaseCommand );
+
+    	/**
+    	* Method used to attach/edit menu panes. AVKON forms create
+    	* its own menu panes due to which it is required to attach this to AIW's
+    	* menu pane. In such cases this helper function can be used
+    	*
+    	* @param aResourceId resource id of the selected item
+    	*
+    	* @param aMenuPane is the pointer of the menu pane to which the submenu
+    	*        will be attached
+    	*/
+    	IMPORT_C void AttachMenuPaneL( CEikMenuPane *aMenuPane, TInt aResourceId, TInt aBaseCommand );
+
+    	/**
+    	* Detaches a particualr interest from the service handler.
+    	*
+    	* @param aMenuResourceId is the menu id
+    	* @param aInterestResourceId is the resource id of the interest
+    	*/
+    	IMPORT_C void DetachInterestL( TInt aMenuResourceId, TInt aInterestresourceId );
+
+    	/**
+    	* Sets the observer. It is called when map & navigation finishes
+    	* any request related to landmark.
+    	* @param aObserver is of type MLmkMapAndNavigationObserver
+    	*/
+    	IMPORT_C void SetObserver(MLmkMapAndNavigationObserver* aObserver);
+
+    	/**
+    	* Decreases the reference count, if it becomes zero, detroys self
+    	*/
+    	IMPORT_C void Release();
+
+    public: // From CLmkDbSearchUtilsObserver
+        /**
+        * This is the callback function for the asynchronus search notification.
+        * This is used for the "Show category on map" use case. This function is
+        * the callaback to get all landmark id's under a particualre category.
+        *
+        * @param aArray is the array of the landmarks id's associated with the
+        *				particular category
+        */
+    	void HandleCategorySearchNotifyL( RArray<TPosLmItemId> aArray );
+
+    	/**
+    	* This is from CLmkDbSearchUtilsObserver for landmarks search
+    	* This search is not used and will have a dummy block
+    	*/
+    	void HandleLmkSearchNotifyL();
+    private:
+    	/**
+        * C++ default constructor.
+        */
+        CLmkMapNavigationInterface( CPosLandmarkDatabase& aDb );
+
+        /**
+        * Symbian 2nd phase constructor.
+        *
+        * @param aViewType the view type (By Landmark or by category)
+        */
+        void ConstructL();
+
+    private: // Private functions
+    	/**
+    	* This function is the santity check for the incomming landmarks for all
+    	* use cases. The function does all the error checks and also does the
+    	* error notification to the user through error notes and dialogs.
+    	*
+    	* @param aArray is the array of landmarks on which the checks need to made
+    	*/
+    	TBool CheckAndDisplayIfLandmarksEmptyL( RPointerArray<CPosLandmark> &aArray );
+
+    	/**
+    	* Methods saves the Landmark from the Get Landmarks from Map use case.
+    	* This function opens an editor dialog to and populates it with the
+    	* position information of the chosen landamark.
+    	*
+    	* @param aLandmark the landmark to be saved
+    	*/
+    	void SaveLandmarkL( CPosLandmark& aLandmark );
+    	/**
+    	* This method is used to check if the supplied landmark has any valid
+    	* coordinates or address. If either Latitude or Longitude are Nan and if
+    	* none of the address fields have any valid entyr then the method returns
+    	* ETrue otherwise returns EFalse.
+    	*
+    	* @param aLandmark is the landmark on which the check needs to be made
+    	* @return ETrue if Landmark does not have any coordinates or address,
+    	*               EFalse otherwise
+    	*/
+    	TBool IsLandmarkDataEmptyL( CPosLandmark& aLandmark );
+
+
+    private: // Data
+    	// Owns : Pointer to AIW service handler to send service commands
+    	CAiwServiceHandler* iAiwServiceHandler;
+
+    	// Owns : Generic parameter input list
+    	CAiwGenericParamList*   iInList;
+
+    	// Owns : Generic parameter output list
+        CAiwGenericParamList*   iOutList;
+
+        // Describes if view type is by Landmark view or by Category view
+        EViewType iViewType;
+
+        // Owns: Pointer to landmark search util
+        CLmkDbSearchUtils* iSearchUtil;
+
+        // Menu command for showing category on map
+        TInt iCategoryCommand;
+
+        //Owns: Category name, for by category view, to display in error notes
+        HBufC* iCategoryName;
+
+        // Category id to which the select from Map use case needs to save to
+        TPosLmItemId iCategoryId;
+
+        //Owns : processing wait note
+        CAknWaitDialog* iWaitNote;
+
+        // Array of Landmarks required for show category on use case
+        RPointerArray<CPosLandmark> iLandmarkArray;
+
+        //Ref:open handle to landmark database
+        CPosLandmarkDatabase& iDb;
+
+        //Ref
+        MLmkMapAndNavigationObserver* iObserver;
+
+        // Ref
+        CEikonEnv*              iEnv;
+
+        TInt iRefCnt;
+	};
+
+#endif //CLMKMAPNAVIGATIONINTERFACE_H
+
+// End of file
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/uicontrols/inc/lmkicondialog.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,129 @@
+/*
+* 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:    LandmarksUi Content File -
+*
+*/
+
+
+
+
+
+
+
+
+#ifndef LMKICONDIALOG_H
+#define LMKICONDIALOG_H
+
+#include <AknDialog.h>// <eikdialg.h>
+
+/**
+ * Change Icon table for LandmarksUi.Contains all the icon available
+ */
+NONSHARABLE_CLASS(CLmkIconMapDialog) : public CAknDialog
+    {
+public:
+
+    /**
+    * LandmarksUi change Icon table constructor.
+    *
+    * @param aIconIndex contains the reference of the integer,
+    *                   which will give the selected Index.
+    *
+    */
+     CLmkIconMapDialog( TInt& aIconIndex );
+
+    /**
+    * LandmarksUi change Icon table desstructor.
+    *
+    *             C++ destructor
+    */
+    ~CLmkIconMapDialog();
+
+public: // from CEikDialog
+
+    /**
+    * Prepares and runs the dialog and returns the id of the button used to dismiss
+    * it. The dialog is constructed from the resource with id aResourceId and is destroyed
+    * on exit.
+    *
+    * @param aResourceId Resource id for icon table dialog resource.
+    * @return Id of the button used to dismiss dialog.
+    *
+    */
+     TInt ExecuteLD(TInt aResourceId);
+
+#ifdef RD_SCALABLE_UI_V2
+	//From MCoeControlObserver
+	void HandleControlEventL(CCoeControl* aControl,TCoeEvent aEventType);
+	void HandleDialogPageEventL(TInt aEventID);
+	void HandlePointerEventL(const TPointerEvent& aPointerEvent);
+
+#endif //RD_SCALABLE_UI_V2
+
+public: // from CCoeControl
+     TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode);
+
+    /**
+     * Handles a change to the control's resources of type aType
+     * which are shared across the environment, e.g. colors or fonts.
+     *
+     * @since ER5U
+     */
+     void HandleResourceChange(TInt aType);
+
+    /**
+     * CreateCustomControlL(TInt aControlType)
+     * Virtual function of base class has to be overriden to create
+     * a custom controll
+     */
+ 	 SEikControlInfo CreateCustomControlL(TInt aControlType);
+
+protected: // from CEikDialog
+    /**
+     * OkToExitL(TInt)
+     */
+     virtual TBool OkToExitL(TInt);
+
+    /**
+     * PreLayoutDynInitL()
+     */
+     virtual void PreLayoutDynInitL();
+
+     /**
+     * PostLayoutDynInitL()
+     */
+     virtual void PostLayoutDynInitL();
+    /**
+     * SetSizeAndPosition(const TSize& aSize)
+     */
+     virtual void SetSizeAndPosition(const TSize& aSize);
+
+private:
+     virtual void CEikDialog_Reserved_1();
+     virtual void CEikDialog_Reserved_2();
+
+private: // new function
+     virtual void CAknIconMapDialog_Reserved();
+
+private: // helpers
+    void DoLayout();
+
+private:
+    TInt* iIconIndex;
+#ifdef RD_SCALABLE_UI_V2
+    TBool iConSelected;
+#endif //#ifdef RD_SCALABLE_UI_V2
+    };
+
+#endif  // LMKICONDIALOG_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/uicontrols/inc/lmkiconmap.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,267 @@
+/*
+* 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:    LandmarksUi Content File -
+*
+*/
+
+
+
+
+
+
+
+
+#ifndef LMKICONMAP_H
+#define LMKICONMAP_H
+
+#include <coecntrl.h>
+#include <AknUtils.h>
+#include <gulicon.h>
+#include <AknIconArray.h>
+
+
+class CLmkIconMapExtension;
+class CEikScrollBarFrame;
+class CLmkIconMapExtension;
+
+
+/**
+ * Change Icon Dialog table for LandMarksUi
+ *
+ */
+NONSHARABLE_CLASS(CLmkIconMap) : public CCoeControl, public MEikScrollBarObserver
+    {
+public:
+
+    /**
+    * CLmkIconMap two phase constructor
+    *
+    */
+    static CLmkIconMap* NewL();
+
+    /**
+    * CLmkIconMap destructor
+    *
+    */
+     ~CLmkIconMap();
+
+    /**
+    * CLmkIconMap resource constructor.
+    *
+    * @param aReader Icon Dialog table Resource
+    *
+    */
+     void ConstructFromResourceL(TResourceReader& aReader);
+
+    /**
+    * Number of rows in the icon table.
+    *
+    * @return Number of rows in icon table.
+    *
+    */
+     TInt HeightInRows();
+
+    /**
+    * Create the scrollbar Ptr and set the No of Rows in the
+    * Icon table depends upon the Icon array count.
+    *
+    */
+     void CreateScrollBarAndIconRowL();
+
+    /**
+    * Sets reference to the index where selected icon index is put.
+    *
+    * @param aIconIndex Reference to the integer where selected icon index is put.
+    */
+     void SetIndex(TInt& aIconIndex);
+
+private:
+    /**
+    * CLmkIconMap constructor
+    *
+    */
+     CLmkIconMap();
+
+    /**
+    * CLmkIconMap two phase constructor
+    *
+    */
+    void ConstructL();
+
+public: // from CCoeControl
+     TSize MinimumSize();
+     TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode);
+     TCoeInputCapabilities InputCapabilities() const;
+     virtual void ActivateL();
+
+
+#ifdef RD_SCALABLE_UI_V2
+ 	 void HandlePointerEventL(const TPointerEvent& aPointerEvent);
+ 	 void SetObserver( MCoeControlObserver* aObserver  );
+#endif //RD_SCALABLE_UI_V2
+
+
+protected: // from CCoeControl
+     void SizeChanged();
+     void HandleResourceChange(TInt aType);
+     TInt CountComponentControls() const;
+     CCoeControl* ComponentControl(TInt aIndex) const;
+
+public:
+    /**
+    * DrawOffscreenBackgroundIfRequired().
+    *
+    * @Description:Draw the offscreen bitmap if applicable.
+    *              Specially in case of Skin change
+    */
+    void DrawOffscreenBackgroundIfRequired() const;
+
+    /**
+    * DoLayout()
+    * @Description: Sets the Layout of the Icon table.
+    */
+    void DoLayout();
+
+private:
+    /**
+    * Draw().
+    *
+    * @Description:
+    */
+    void Draw(const TRect& aRect) const;
+
+    /**
+    * DrawItem().
+    *
+    * @Description:
+    */
+    void DrawItem(
+                  CWindowGc& aGc,
+                  const TRect& aSctPosition,
+                  TInt aIconIndex,
+                  TBool aHighlighted,
+                  TBool aDrawBackground ) const;
+
+    /**
+    * DrawCursor().
+    *
+    * @Description:
+    */
+    void DrawCursor() const;
+
+    /**
+    * MoveCursorL().
+    *
+    * @Description:
+    */
+    void MoveCursorL(TInt aX, TInt aY);
+
+    /**
+    * DrawCell().
+    *
+    * @Description:
+    */
+    void DrawCell( TInt aCursorPos, TBool aHighLighted ) const;
+
+    /**
+    * CursorRect().
+    *
+    * @Description:
+    */
+    TRect CursorRect( TInt aCursorPos ) const;
+
+    /**
+    * CursorPoint().
+    *
+    * @Description:
+    */
+    TPoint CursorPoint( TInt aCursorPos ) const;
+
+    /**
+    * UpdateScrollIndicatorL().
+    *
+    * @Description:
+    */
+    void UpdateScrollIndicatorL();
+
+    /**
+    * CountMaxColumnsAndCellSizes().
+    *
+    * @Description:
+    */
+    void CountMaxColumnsAndCellSizes();
+
+    /**
+    * LoadIconL().
+    *
+    * @Description:
+    */
+    void LoadIconL();
+
+   /**
+    * Extension().
+    *
+    * @Description:
+    */
+    CLmkIconMapExtension* Extension() const;
+
+
+private: //from CCoeContrl
+    void Reserved_1();
+
+    void Reserved_2();
+
+public:
+     /**
+     * This function handles pointer events directed at the iconmapdialog.
+     * @param aScrollBar The scrollbar to be observed.
+     * @param aEventType The incomming event type so that correct functionality can be done.
+     */
+    void HandleScrollEventL(CEikScrollBar* aScrollBar, TEikScrollEvent aEventType);
+
+private:
+    TInt                iGridItemWidth;
+    TInt                iGridItemHeight;
+    TBool               iIsMirrored;
+    TInt                iRows;
+    TInt                iFirstVisibleRow;
+    TPoint              iOffset;
+    TPoint              iGridTopLeft;
+
+    TPoint              iCursorPos;
+    TPoint              iOldCursorPos;
+    mutable TBool       iDrawnBefore;
+
+    CEikScrollBarFrame* iSBFrame;
+    TInt*               iIconIndex;
+
+    TBool               iAnimated;
+
+    CFbsBitmap*         iOffscreenBg;
+    CFbsBitmapDevice*   iBitmapDevice;
+    CFbsBitGc*          iBitmapGc;
+    TBool               iHasBitmapBackground;
+    mutable TBool       iOffscreenBgDrawn;
+
+    TInt                iMaxColumns;
+    TInt                iCurrentPage;
+    TInt                iNumPages;
+    CLmkIconMapExtension*   iExtension;
+    CArrayPtr< CGulIcon >*  iConsArray;
+
+    TBool iIsChangeIcon;
+
+    };
+
+#endif // __LMKICONMAP_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/uicontrols/inc/lmkwaitdlglauncher.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,141 @@
+/*
+* 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:    LandmarksUi Content File -    Encapuslates the Wait dialog in an Active Object interface
+*
+*/
+
+
+
+
+
+
+
+#ifndef CLMWAITDLGLAUNCHER_H
+#define CLMWAITDLGLAUNCHER_H
+
+// System Includes
+#include <AknWaitDialog.h>
+#include <AknProgressDialog.h>
+#include <e32base.h>
+
+// Class Declaration
+/**
+* MLmkDlgMenuObserver class
+*/
+class MLmkWaitDialogLauncherObserver
+    {
+    public: // New functions
+        virtual void HandleDialogDismissed( TInt aButtonId ) = 0;
+    };
+/**
+ * Class used to encapsulate the AknWaitDialog in an Active object interface.
+ * Provides the functionality to launch the Wait dialog in an asynchronous mode
+ * so that the current running context is not blocked.
+ */
+NONSHARABLE_CLASS ( CLmkWaitDialogLauncher ) : public CActive,
+                                               public MProgressDialogCallback
+    {
+    public:
+        /**
+         * Two phased constructor for creating the Wait dialog launcher.
+         *
+         * @return CLmkWaitDialogLauncher* Pointer to the created object.
+         */
+        static CLmkWaitDialogLauncher* NewL();
+
+        /**
+         * Destructor.
+         */
+        ~CLmkWaitDialogLauncher();
+
+        /**
+         * Issues an asynchronous request to start the Wait dialog. The termination
+         * of the dialog either when User terminated or when terminated using the
+         * StopWaitingDialog call will be notified using the MProgressDialogCallback
+         * observer object.
+         */
+        void StartWaitDialogL();
+
+        /**
+         * Issues an asynchronous request to the stop the running Wait dialog. The
+         * actual dismissal of the dialog will be communicated using the
+         * MProgressDialogCallback observer object.
+         *
+         * @return TInt The Button ID with which the dialog was dismissed
+         */
+        TInt StopWaitDialogL();
+
+        /**
+         * Sets an observer, so that, client can be notified about the
+         * button id, after the dialog dismissal.
+         */
+        void SetObserver( MLmkWaitDialogLauncherObserver* aObserver);
+
+    private:
+        /**
+         * Inherited from MProgressDialogCallback. The scope of the function is
+         * made private since, this should be called only from the
+         * MProgressDialogCallback interface and from the Wait dialog alone.
+         */
+        void DialogDismissedL( TInt aButtonId );
+
+    private:
+        /**
+         * Overloaded C++ constructor
+         */
+        CLmkWaitDialogLauncher();
+
+        /**
+         * Second phase constructor
+         */
+        void ConstructL();
+
+    protected:
+        /**
+         * Inherited from CActive
+         */
+        void RunL();
+
+        /**
+         * Inherited from CActive
+         */
+        void DoCancel();
+
+    private:
+
+        /**
+         * Button ID with which the dialog was cancelled
+         */
+        TInt                        iButtonId;
+
+        /**
+         * Wait Note
+         * Owns
+         */
+        CAknWaitDialog*             iWaitNote;
+
+        /**
+         * Active Scheduler re-loop to make Stop synchronous
+         */
+        CActiveSchedulerWait*       iSchedWait;
+        /**
+         * ref
+         * Observer for callback, when the dialog is dissmissed.
+         */
+        MLmkWaitDialogLauncherObserver*       iObserver;
+    };
+
+#endif // CLMWAITDLGLAUNCHER_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/uicontrols/inc/mlmkcentralrepositoryobserver.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,49 @@
+/*
+* 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:    LandmarksUi Content File -    This interface provides, handler functions to handle
+*                central repository changes
+*
+*/
+
+
+
+
+
+
+
+
+#ifndef __MLMKCENTRALREPOSITORYOBSERVER__H
+#define __MLMKCENTRALREPOSITORYOBSERVER__H
+
+// CLASS DECLARATION
+
+/**
+*  This interface provides functions to handle changes in the central
+*  repository.
+*/
+class MLmkCentralRepositoryObserver
+    {
+    public: // New functions
+
+        /**
+         * Callback function,called when, there is any change in the
+         * central repository
+         * @return None
+         */
+        virtual void HandleCentralRepositoryChangeL() = 0;
+    };
+
+#endif      // __MLMKCENTRALREPOSITORYOBSERVER__H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/uicontrols/src/CLmkAppCategorySelectorImpl.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,208 @@
+/*
+* 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:    LandmarksUi Content File -
+*
+*/
+
+
+
+
+
+
+
+
+// INCLUDE FILES
+#include "CLmkDbUtils.h"
+#include "CLmkUiUtils.h"
+#include "LmkConsts.h"
+#include "CLmkAppCategorySelectorImpl.h"
+#include "CLmkLmItemListProvider.h"
+#include "LmkListProviderFactory.h"
+#include <aknlists.h>
+#include <lmkerrors.h>
+
+
+#if defined(_DEBUG)// CONSTANTS
+/// Unnamed namespace for local definitions
+namespace {
+
+_LIT( KPanicMsg, "CLmkAppCategorySelectorImpl" );
+
+void Panic( TPanicCode aReason )
+    {
+    User::Panic( KPanicMsg, aReason );
+    }
+}  // namespace
+#endif
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CLmkAppCategorySelectorImpl::CLmkAppCategorySelectorImpl
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+CLmkAppCategorySelectorImpl::CLmkAppCategorySelectorImpl(
+    CPosLandmarkDatabase& aDb,
+    CLmkSender& aSender,
+    TBool aFindBox )
+    : CLmkAppLmItemSelectorImpl( aDb, aSender, aFindBox )
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkAppCategorySelectorImpl::ConstructL
+// Symbian 2nd phase constructor can leave.
+// -----------------------------------------------------------------------------
+//
+void CLmkAppCategorySelectorImpl::ConstructL()
+    {
+    CLmkAppLmItemSelectorImpl::BaseConstructL();
+
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkAppCategorySelectorImpl::NewL
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CLmkAppCategorySelectorImpl* CLmkAppCategorySelectorImpl::NewL(
+    CPosLandmarkDatabase& aDb,
+    CLmkSender& aSender,
+    TBool aFindBox )
+    {
+    CLmkAppCategorySelectorImpl* self =
+        new( ELeave ) CLmkAppCategorySelectorImpl( aDb, aSender, aFindBox );
+
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop();
+
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkAppCategorySelectorImpl::~CLmkAppCategorySelectorImpl
+// -----------------------------------------------------------------------------
+//
+CLmkAppCategorySelectorImpl::~CLmkAppCategorySelectorImpl()
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkAppCategorySelectorImpl::SetupListProviderL
+// -----------------------------------------------------------------------------
+//
+void CLmkAppCategorySelectorImpl::SetupListProviderL()
+    {
+    if ( !iListProvider )
+        {
+        iListProvider =
+            LmkListProviderFactory::CreateProviderL( iDb, ECategorySelector );
+        iListProvider->AddObserverL( *this );
+        iListProvider->InitializeL();
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkAppCategorySelectorImpl::ListProvider
+// -----------------------------------------------------------------------------
+//
+const CLmkListProviderBase& CLmkAppCategorySelectorImpl::ListProvider() const
+    {
+    __ASSERT_DEBUG( iListProvider, Panic( KLmkPanicNullMember ) );
+    return *iListProvider;
+    }
+// -----------------------------------------------------------------------------
+// CLmkAppCategorySelectorImpl::CurrentCategoryId
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TInt CLmkAppCategorySelectorImpl::CurrentCategoryId()
+	{
+	return CLmkAppLmItemSelectorImpl::CurrentCategoryId();
+	}
+
+// -----------------------------------------------------------------------------
+// CLmkAppCategorySelectorImpl::ProcessCommandL
+// -----------------------------------------------------------------------------
+//
+void CLmkAppCategorySelectorImpl::ProcessCommandL( TInt aCommandId )
+	{
+	CLmkAppLmItemSelectorImpl::ProcessCommandL( aCommandId );
+	}
+
+// -----------------------------------------------------------------------------
+// CLmkAppCategorySelectorImpl::HandleOperationL
+// -----------------------------------------------------------------------------
+//
+void CLmkAppCategorySelectorImpl::HandleOperationL(
+                                       TOperationTypes /*aType*/,
+                                       TReal32 /*aProgress*/,
+                                       TInt /*aStatus*/ )
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkAppCategorySelectorImpl::ChangeIconL
+// -----------------------------------------------------------------------------
+//
+void CLmkAppCategorySelectorImpl::ChangeIconL(
+    TPosLmItemId aId,
+    TInt aIconIndex,
+    TInt aMaskIndex)
+    {
+    TFileName* iconFile = CLmkUiUtils::LmkUiIconFileLC();
+    iDbUtils->ChangeIconL( iDb, aId, ELmkItemTypeCategory,
+                           *iconFile, aIconIndex, aMaskIndex );
+	CleanupStack::PopAndDestroy();//iconFile
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkAppCategorySelectorImpl::ChangeIconsL
+// -----------------------------------------------------------------------------
+//
+void CLmkAppCategorySelectorImpl::ChangeIconsL(
+    RArray<TPosLmItemId>& aIdArray,
+    TInt aIconIndex, TInt aMaskIndex)
+    {
+    TFileName* iconFile = CLmkUiUtils::LmkUiIconFileLC();
+    iDbUtils->ChangeIconsL( aIdArray, ELmkItemTypeCategory,
+                            *iconFile, aIconIndex, aMaskIndex );
+	CleanupStack::PopAndDestroy();//iconFile
+    }
+// -----------------------------------------------------------------------------
+// CLmkAppCategorySelectorImpl::HandleLmCreated
+// -----------------------------------------------------------------------------
+//
+void CLmkAppCategorySelectorImpl::HandleLmCreated(TPosLmItemId aNewLmkItemId)
+    {
+    iNewLmkItemId = aNewLmkItemId;
+    iNewListBoxItemAdded = ETrue;
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkAppCategorySelectorImpl::HandleControlEventL
+// -----------------------------------------------------------------------------
+//
+//#ifdef RD_SCALABLE_UI_V2
+void CLmkAppCategorySelectorImpl::HandleControlEventL( CCoeControl* aControl,TCoeEvent aEventType )
+	{
+	//Update the listbox a sper the search criteria
+	if (iFilter)
+		{
+		iFilter->HandleControlEventL(aControl, aEventType);
+		}
+	}
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/uicontrols/src/CLmkAppCategorySettingsImpl.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,447 @@
+/*
+* 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:    Category settings implementation for LandmarksUi
+*
+*/
+
+
+// INCLUDE FILES
+#include "CLmkAppCategorySettingsImpl.h"
+#include "LmkListProviderFactory.h"
+#include "CLmkLmItemListProvider.h"
+#include "CLmkUiItemBase.h"
+#include "CLmkDbUtils.h"
+#include "CLmkUiUtils.h"
+#include "LmkConsts.h"
+#include "LmkNotes.h"
+#include <lmkui.rsg>
+#include <eiktxlbx.h>
+#include <EPos_CPosLandmarkCategory.h>
+#include <EPos_CPosLmCategoryManager.h>
+#include <EPos_CPosLandmarkCategory.h>
+#include <AknWaitDialog.h>
+#include <EPos_CPosLandmarkDatabase.h>
+#include <EPos_CPosLandmark.h>
+#include <EPos_TPosLmSortPref.h>
+#include <EPos_CPosLmItemIterator.h>
+#include <lmkerrors.h>
+
+
+// CONSTANTS
+/// Unnamed namespace for local definitions
+namespace {
+
+#if defined(_DEBUG)
+
+_LIT( KPanicMsg, "CLmkAppCategorySettingsImpl" );
+
+void Panic( TPanicCode aReason )
+    {
+    User::Panic( KPanicMsg, aReason );
+    }
+#endif
+
+}  // namespace
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CLmkAppCategorySettingsImpl::CLmkAppCategorySettingsImpl
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+CLmkAppCategorySettingsImpl::CLmkAppCategorySettingsImpl(
+    CPosLandmarkDatabase& aDb,
+    CLmkSender& aSender,
+    TBool aFindBox )
+    : CLmkAppLmItemSelectorImpl( aDb, aSender, aFindBox )
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkAppCategorySettingsImpl::ConstructL
+// Symbian 2nd phase constructor can leave.
+// -----------------------------------------------------------------------------
+//
+void CLmkAppCategorySettingsImpl::ConstructL()
+    {
+    CLmkAppLmItemSelectorImpl::BaseConstructL();
+    iBuffer = HBufC::NewL( KMaxCategoryNameFieldLen );
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkAppCategorySettingsImpl::NewL
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CLmkAppCategorySettingsImpl* CLmkAppCategorySettingsImpl::NewL(
+    CPosLandmarkDatabase& aDb,
+    CLmkSender& aSender,
+    TBool aFindBox )
+    {
+    CLmkAppCategorySettingsImpl* self =
+        new( ELeave ) CLmkAppCategorySettingsImpl( aDb, aSender, aFindBox );
+
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop();
+
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkAppCategorySettingsImpl::~CLmkAppCategorySettingsImpl
+// -----------------------------------------------------------------------------
+//
+CLmkAppCategorySettingsImpl::~CLmkAppCategorySettingsImpl()
+    {
+    if ( iWaitNote )
+        {
+        TRAPD( err, iWaitNote->ProcessFinishedL() );
+        if (err != KErrNone)
+    		{
+		    delete iWaitNote;
+            iWaitNote = NULL;
+	    	}
+        }
+    delete iBuffer;
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkAppCategorySettingsImpl::SetupListProviderL
+// -----------------------------------------------------------------------------
+//
+void CLmkAppCategorySettingsImpl::SetupListProviderL()
+    {
+    if ( !iListProvider )
+        {
+        iListProvider =
+            LmkListProviderFactory::CreateProviderL( iDb, ECategorySelector,
+                                                  ELmkShowExtendedCategories );
+        iListProvider->AddObserverL( *this );
+        iListProvider->InitializeL();
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkAppCategorySettingsImpl::ListProvider
+// -----------------------------------------------------------------------------
+//
+const CLmkListProviderBase& CLmkAppCategorySettingsImpl::ListProvider() const
+    {
+    __ASSERT_DEBUG( iListProvider, Panic( KLmkPanicNullMember ) );
+    return *iListProvider;
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkAppCategorySettingsImpl::ProcessCommandL
+// -----------------------------------------------------------------------------
+//
+void CLmkAppCategorySettingsImpl::ProcessCommandL( TInt aCommandId )
+    {
+    switch ( aCommandId )
+        {
+        case ELmkCmdNewCategory:
+			{
+            NewCategoryCmdL();
+			break;
+			}
+		case ELmkCmdChangeIcon:
+			{
+            ChangeIconCmdL();
+			break;
+			}
+		case ELmkCmdRenameCat:
+			{
+            RenameCategoryCmdL();
+			break;
+			}
+		case ELmkCmdDeleteCat:
+			{
+            DeleteCategoryCmdL();
+			break;
+            }
+        default:
+            {
+            // leave command handling to others
+            break;
+            }
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkAppCategorySettingsImpl::HandleOperationL
+// -----------------------------------------------------------------------------
+//
+void CLmkAppCategorySettingsImpl::HandleOperationL(
+                                       TOperationTypes aType,
+                                       TReal32 /*aProgress*/,
+                                       TInt aStatus )
+    {
+    if ( aType == EDeleteCategories )
+        {
+        if ( aStatus != KPosLmOperationNotComplete && iWaitNote )
+            {
+            iWaitNote->ProcessFinishedL();
+            iWaitNote = NULL;
+            }
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkAppCategorySettingsImpl::ChangeIconL
+// -----------------------------------------------------------------------------
+//
+void CLmkAppCategorySettingsImpl::ChangeIconL(
+    TPosLmItemId aId,
+    TInt aIconIndex,
+    TInt aMaskIndex)
+    {
+    TFileName* iconFile = CLmkUiUtils::LmkUiIconFileLC();
+    iDbUtils->ChangeIconL( iDb, aId, ELmkItemTypeCategory,
+                           *iconFile, aIconIndex, aMaskIndex);
+    CleanupStack::PopAndDestroy();//iconFile
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkAppCategorySettingsImpl::ChangeIconsL
+// -----------------------------------------------------------------------------
+//
+void CLmkAppCategorySettingsImpl::ChangeIconsL(
+    RArray<TPosLmItemId>& aIdArray,
+    TInt aIconIndex,
+    TInt aMaskIndex)
+    {
+    TFileName* iconFile = CLmkUiUtils::LmkUiIconFileLC();
+    iDbUtils->ChangeIconsL( aIdArray, ELmkItemTypeCategory,
+                            *iconFile, aIconIndex, aMaskIndex);
+    CleanupStack::PopAndDestroy();//iconFile
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkAppCategorySettingsImpl::NewCategoryCmdL
+// -----------------------------------------------------------------------------
+//
+void CLmkAppCategorySettingsImpl::NewCategoryCmdL()
+    {
+    TPtr catName( iBuffer->Des() );
+    catName.Zero();
+    CPosLandmarkCategory* newCategory = CPosLandmarkCategory::NewLC();
+
+    while( LmkNotes::CategoryNameQueryL( catName, R_LMK_CATEGORY_NAME_QUERY ) )
+        {
+        newCategory->SetCategoryNameL( catName );
+        TRAPD( err, iDbUtils->AddCategoryL( *newCategory, iDb ) );
+        if( err == KErrNone )
+            {
+            iNewListBoxItemAdded = ETrue;      
+            break;
+            }
+        else if ( err == KErrAlreadyExists )
+            {            
+            LmkNotes::InformationNoteL( iEnv,R_LMK_CATEGORY_NAME_EXISTS_NOTE );
+            }
+        else
+            {
+            User::LeaveIfError( err ); // other error cases
+            break; // exit while loop if no error
+            }
+        }    
+    CleanupStack::PopAndDestroy(); // newCategory
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkAppCategorySettingsImpl::RenameCategoryCmdL
+// -----------------------------------------------------------------------------
+//
+void CLmkAppCategorySettingsImpl::RenameCategoryCmdL()
+    {
+    __ASSERT_DEBUG( iListProvider, Panic( KLmkPanicNullMember ) );
+    TInt index = iListBox->CurrentItemIndex();
+    CLmkUiItemBase* item =
+        iListProvider->ItemAtL( index );
+    CleanupStack::PushL( item );
+
+    TPtr catName( iBuffer->Des() );
+    catName.Zero();
+    catName.Append( item->Text() );
+
+    while( LmkNotes::CategoryNameQueryL( catName, R_LMK_CATEGORY_NAME_QUERY ) )
+        {
+        TRAPD( err,
+               iDbUtils->RenameCategoryL( catName, SelectedIdL(), iDb ) );
+        if ( err == KErrAlreadyExists )
+            {
+            LmkNotes::InformationNoteL( iEnv, R_LMK_CATEGORY_NAME_EXISTS_NOTE );
+            }
+        else if ( err == KErrNone)
+        	{
+        	iNewListBoxItemAdded = ETrue;
+        	break;
+        	}
+        else
+            {
+            User::LeaveIfError( err ); // other error cases
+            break; // exit while loop if no error
+            }
+        }
+
+    CleanupStack::PopAndDestroy(); //item
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkAppCategorySettingsImpl::IsGlobalCategory
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TBool CLmkAppCategorySettingsImpl::IsPredefinedCategoryL()
+	{
+
+	TBool isGlobalCategory = EFalse;
+
+	RArray<TPosLmItemId>& markedItemIds = MarkedItemIdsL();
+    TInt markedCount = markedItemIds.Count();
+
+    if (markedCount)
+        {
+        CPosLmCategoryManager* categoryMgr = CPosLmCategoryManager::NewL( iDb );
+        CleanupStack::PushL( categoryMgr );
+
+        for(TInt i =0; i < markedCount; i++)
+        	{
+        	if(!isGlobalCategory)
+        		{
+        		CPosLandmarkCategory* category = categoryMgr->ReadCategoryLC(markedItemIds[i]);
+        		if (category->GlobalCategory() != KPosLmNullGlobalCategory)
+		        	{
+		           	isGlobalCategory = ETrue;
+		        	}
+		        CleanupStack::PopAndDestroy(1); //category
+        		}
+        	}
+        CleanupStack::PopAndDestroy(1); //categoryMgr
+	    }
+    else
+        {
+        TPosLmItemId categoryId = SelectedIdL();
+        CPosLmCategoryManager* categoryMgr = CPosLmCategoryManager::NewL( iDb );
+
+        CleanupStack::PushL( categoryMgr );
+        CPosLandmarkCategory* category = categoryMgr->ReadCategoryLC( categoryId );
+
+        // Check for Global category
+        if (category->GlobalCategory() != KPosLmNullGlobalCategory)
+        	{
+           	isGlobalCategory = ETrue;
+        	}
+
+        CleanupStack::PopAndDestroy( 2 ); //category, categoryMgr
+	    }
+	return isGlobalCategory;
+	}
+// -----------------------------------------------------------------------------
+// CLmkAppCategorySettingsImpl::DeleteCategoryCmdL
+// -----------------------------------------------------------------------------
+//
+void CLmkAppCategorySettingsImpl::DeleteCategoryCmdL()
+    {
+    RArray<TPosLmItemId>& markedItemIds = MarkedItemIdsL();
+    TInt markedCount = markedItemIds.Count();
+
+    if(IsPredefinedCategoryL())
+    	return;
+
+    if ( markedCount )
+        {
+        if ( LmkNotes::CategoryConfirmationQueryL( iEnv, markedCount ) )
+            {
+            StoreIdTobeFocussedAfterDeletion( markedItemIds );
+            iDeletionHelper.StoreListInformation( *iListBox, ETrue );
+            iDbUtils->DeleteCategoriesL( markedItemIds );
+            // wait note
+            iWaitNote = new( ELeave ) CAknWaitDialog( NULL, ETrue );
+            if ( !iWaitNote->ExecuteLD( R_LMK_DELETING_WAIT_NOTE ) )
+                {
+                //making iWaitNote null, since framework destroys waitnote
+        		//dialog on pressing cancel.
+        		iWaitNote = NULL;
+                iDbUtils->CancelLmOperation();
+                }
+            }
+
+        }
+    else
+        {
+        // One item only
+        RArray<TPosLmItemId> categoryIdArray( 1 );
+        CleanupClosePushL( categoryIdArray );
+        User::LeaveIfError( categoryIdArray.Append( SelectedIdL() ) );
+        if ( LmkNotes::CategoryConfirmationQueryL( iEnv, 1 ) )
+            {
+            iDeletionHelper.StoreListInformation( *iListBox, EFalse );
+            iDbUtils->DeleteCategoriesL( categoryIdArray  );
+            }
+        CleanupStack::PopAndDestroy( 1 ); // categoryIdArray
+
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkAppCategorySettingsImpl::HandleEventListReadyL
+// -----------------------------------------------------------------------------
+//
+TBool CLmkAppCategorySettingsImpl::HandleEventListReadyL()
+    {
+    // Possibly user-initiated delete finished --> if yes, update the list:
+    TBool retVal;
+	if( iNewListBoxItemAdded )
+		{
+	    TPosLmItemId lmkItemId = iDbUtils->CategoryIdL(iDb, *iBuffer);
+	    TInt listboxIndex = LmItemListProvider().SelectedIndex(lmkItemId);
+	    if ( listboxIndex == KLmkInValidIndex )
+		    {
+		    retVal = EFalse;
+		    return retVal;
+		    }
+		/* This line is added to hold the current before changing
+		 * the selection with the new one.
+		 */
+		iListBox->HandleItemAdditionL();
+		iListBox->SetCurrentItemIndex( listboxIndex );
+		UpdateMarkIndexAfterAdditionL( listboxIndex );
+		iListBox->DrawDeferred();
+		iNewListBoxItemAdded = EFalse;
+		retVal = ETrue;
+		}
+    else
+    	{
+    	retVal = iDeletionHelper.UpdateListIfDeleteHappenedL();
+    	if( retVal )
+			{
+			//delete has been performed, reset the focus.
+			SetFocusToItemAfterDeletionOfMarkedItems();
+			}
+    	iListBox->DrawDeferred();
+    	}
+    return retVal;
+    }
+// -----------------------------------------------------------------------------
+// CLmkAppCategorySettingsImpl::HandleLmCreated
+// -----------------------------------------------------------------------------
+//
+void CLmkAppCategorySettingsImpl::HandleLmCreated(TPosLmItemId aNewLmkItemId)
+    {
+    iNewLmkItemId = aNewLmkItemId;
+    iNewListBoxItemAdded = ETrue;
+    }
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/uicontrols/src/CLmkAppLmItemSelectorImpl.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,759 @@
+/*
+* Copyright (c) 2002-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 contains methods of selector's base class
+*
+*/
+
+
+
+
+
+
+// INCLUDE FILES
+#include <aknsfld.h>
+#include <lmkui.rsg>
+#include <StringLoader.h>
+#include <AknQueryDialog.h>
+#include <EPos_CPosLandmarkDatabase.h>
+#include <sysutil.h>
+#include "landmarks.hrh"
+#include "LmkConsts.h"
+#include "LmkNotes.h"
+#include "CLmkDbUtils.h"
+#include "CLmkLocationService.h"
+#include <CLmkEditorDlg.h> // TLmkEditorAttributes, TLmkEditorMode
+#include "CLmkLmItemListProvider.h"
+#include "CLmkLmItemListMemento.h"
+#include "CLmkEditorImpl.h"
+#include "CLmkAppLmItemSelectorImpl.h"
+#include "CLmkLocSettingLauncher.h"
+#include "lmkicondialog.h"
+#include "lmkwaitdlglauncher.h" // Wait dialog launcher
+#include <lmkerrors.h>
+
+
+const TInt KFatClusterSize = 2048;
+
+#if defined(_DEBUG)
+
+// CONSTANTS
+/// Unnamed namespace for local definitions
+namespace {
+
+_LIT( KPanicMsg, "CLmkAppLmItemSelectorImpl" );
+
+void Panic( TPanicCode aReason )
+    {
+    User::Panic( KPanicMsg, aReason );
+    }
+}  // namespace
+
+#endif
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CLmkAppLmItemSelectorImpl::CLmkAppLmItemSelectorImpl
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+CLmkAppLmItemSelectorImpl::CLmkAppLmItemSelectorImpl(
+    CPosLandmarkDatabase& aDb,
+    CLmkSender& aSender,
+    TBool aFindBox )
+    : CLmkAppSelectorImplBase( aDb, aFindBox ),
+      iSender( aSender ),
+      iNewListBoxItemAdded(EFalse)
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkAppLmItemSelectorImpl::BaseConstructL
+// Symbian 2nd phase constructor can leave.
+// -----------------------------------------------------------------------------
+//
+void CLmkAppLmItemSelectorImpl::BaseConstructL()
+    {
+    CLmkAppSelectorImplBase::BaseConstructL();
+    iDbUtils = CLmkDbUtils::NewL( iDb, *this, ETrue );
+    iWaitDialogLauncher = CLmkWaitDialogLauncher::NewL();
+    iWaitDialogLauncher->SetObserver(this);
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkAppLmItemSelectorImpl::~CLmkAppLmItemSelectorImpl
+// -----------------------------------------------------------------------------
+//
+CLmkAppLmItemSelectorImpl::~CLmkAppLmItemSelectorImpl()
+    {
+    delete iWaitDialogLauncher;
+    delete iLocationService;
+    delete iDbUtils;
+    delete iLauncher;
+    iMarkedItemIds.Close();
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkAppLmItemSelectorImpl::LmItemListProvider
+// -----------------------------------------------------------------------------
+//
+CLmkLmItemListProvider& CLmkAppLmItemSelectorImpl::LmItemListProvider()
+    {
+    __ASSERT_DEBUG( iListProvider, Panic( KLmkPanicNullMember ) );
+    return static_cast<CLmkLmItemListProvider&>( *iListProvider );
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkAppLmItemSelectorImpl::CurrentCategoryId
+// -----------------------------------------------------------------------------
+//
+TInt CLmkAppLmItemSelectorImpl::CurrentCategoryId()
+	{
+	TInt catId = KPosLmNullItemId;
+	TRAP_IGNORE(catId = SelectedIdL());
+	return catId;
+	}
+
+// -----------------------------------------------------------------------------
+// CLmkAppLmItemSelectorImpl::ChangeIconCmdL
+// -----------------------------------------------------------------------------
+//
+void CLmkAppLmItemSelectorImpl::ChangeIconCmdL()
+    {
+
+    TInt lSelectedIconIndex(0);
+    CLmkIconMapDialog* dialog = new(ELeave) CLmkIconMapDialog( lSelectedIconIndex );
+    if (dialog->ExecuteLD(R_LMK_ICON_TABLE_DIALOG) )
+        {
+        if(lSelectedIconIndex >= 0)
+            {
+            // icon file also contains masks, therefore 2*
+            TInt iconIndex =  2*lSelectedIconIndex;
+            TInt maskIndex =  2*lSelectedIconIndex;
+
+            RArray<TPosLmItemId>& markedItemIds = MarkedItemIdsL();
+		    RFs fs;
+		    User::LeaveIfError(fs.Connect());
+		    CleanupClosePushL( fs );
+
+		    if ( SysUtil::DiskSpaceBelowCriticalLevelL( &fs, sizeof( CPosLandmark ), EDriveC ) )
+		        {
+		        CleanupStack::PopAndDestroy(); // fs
+		        User::LeaveNoMemory();
+		        }
+			else
+				{
+            TInt markedCount = markedItemIds.Count();
+            if ( markedCount )
+                {
+	            	LmItemListProvider().SetSelectedItemsCount(markedCount);
+                ChangeIconsL( markedItemIds, iconIndex + EMbmLmkuiQgn_prop_lm_transport, maskIndex + EMbmLmkuiQgn_prop_lm_transport_mask); // subclass implements
+                iListBox->ClearSelection();
+                }
+            else
+                {
+	            	LmItemListProvider().SetSelectedItemsCount(1);
+                ChangeIconL( SelectedIdL(),(iconIndex + EMbmLmkuiQgn_prop_lm_transport),(maskIndex + EMbmLmkuiQgn_prop_lm_transport_mask)); // subclass implements
+                }
+				}
+			CleanupStack::PopAndDestroy(); // fs
+            }
+        }
+    lSelectedIconIndex = 0;
+
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkAppLmItemSelectorImpl::MementoL
+// -----------------------------------------------------------------------------
+//
+MLmkListMemento* CLmkAppLmItemSelectorImpl::MementoL()
+    {
+    CLmkLmItemListMemento* memento = CLmkLmItemListMemento::NewL();
+    return memento;
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkAppLmItemSelectorImpl::ProcessCommandL
+// -----------------------------------------------------------------------------
+//
+void CLmkAppLmItemSelectorImpl::ProcessCommandL( TInt aCommandId )
+    {
+    switch( aCommandId )
+        {
+        case ELmkCmdNewLmCurrentLocation:
+            {
+            RequestCurrenLocationL();
+            break;
+            }
+        case ELmkCmdNewLmEmpty:
+            {
+            NewLandmarkCmdL();
+            break;
+            }
+        case ELmkCmdDeleteLm:
+            {
+            // This is left empty intentionally, if subclasses do not
+            // implement handling of this command then deletion using
+            // backspace key is not supported for that selector.
+            break;
+            }
+        case ELmkCmdLaunchPositionSettings:
+        	{
+        	LaunchPosSettingsL();
+			break;
+        	}
+        default:
+            {
+            break;
+            }
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkAppLmItemSelectorImpl::NotifyL
+// -----------------------------------------------------------------------------
+//
+void CLmkAppLmItemSelectorImpl::NotifyL( const TInt aStatus )
+    {
+    // Stop the running wait dialog
+ 	TInt buttonId = iWaitDialogLauncher->StopWaitDialogL();
+ 	if( EEikBidCancel != buttonId )
+ 	    {
+	    switch( aStatus )
+    		{
+            case KErrNone:
+            case KPositionPartialUpdate:
+                {
+                if(iLocationService)
+                	{
+                	TPosition position = iLocationService->CurrentPosition();
+			    	CreateLmkFromCurrentLocationL( position );
+                	}
+                break;
+                }
+            default:
+                {
+                break;
+                }
+    		}
+ 	    }
+    delete iLocationService;
+    iLocationService = NULL;
+	}
+
+// -----------------------------------------------------------------------------
+// CLmkAppLmItemSelectorImpl::NotifyErrorL
+// -----------------------------------------------------------------------------
+//
+void CLmkAppLmItemSelectorImpl::NotifyErrorL( TInt aErrorCode )
+    {
+
+    // Stop the running wait dialog
+ 	TInt buttonId = iWaitDialogLauncher->StopWaitDialogL();
+
+    delete iLocationService;
+    iLocationService = NULL;
+
+ 	if( EEikBidCancel != buttonId )
+ 	    {
+	    switch( aErrorCode )
+    		{
+	        case KPositionQualityLoss:
+    		case KErrTimedOut:
+    		case KErrNotFound: // No PSY selected.
+    		case KErrUnknown:
+    		case KErrCancel:
+    		case KErrArgument:
+    		default:
+    		    // The above errors are because of location request failures
+		        // Ask user to retry location request
+    			{
+    			if ( LmkNotes::MessageQueryWithLinkL(iEnv,R_LMK_MSG_QUERY_HEADING_PANE_TEXT,
+    												R_LMK_CONF_RETRY_LOCATION_REQUEST,R_LMK_REQUEST_FAIL_MORE_INFO,
+    												MessageQueryCallBack) )
+    				{
+    				if( iLocationService )
+    					{
+    					delete iLocationService;
+    					iLocationService = NULL;
+    					}
+    				RequestCurrenLocationL();
+    				}
+    			}
+    		}
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkAppLmItemSelectorImpl::SelectedIdL
+// -----------------------------------------------------------------------------
+//
+TPosLmItemId CLmkAppLmItemSelectorImpl::SelectedIdL()
+    {
+    __ASSERT_DEBUG( iListBox, Panic( KLmkPanicNullMember ) );
+    TPosLmItemId selected( KPosLmNullItemId );
+    TInt currentItemIndex = iListBox->CurrentItemIndex();
+    if ( iFindBox )
+        {
+        CAknFilteredTextListBoxModel* model =
+            static_cast<CAknFilteredTextListBoxModel*>( iListBox->Model() );
+        TInt filteredItemIndex =
+            model->Filter()->FilteredItemIndex( currentItemIndex );
+        LmItemListProvider().GetSelectedItemId( selected, filteredItemIndex );
+        }
+    else
+        {
+        LmItemListProvider().GetSelectedItemId( selected, currentItemIndex );
+        }
+    return selected;
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkAppLmItemSelectorImpl::MarkedItemIdsL
+// -----------------------------------------------------------------------------
+//
+RArray<TPosLmItemId>& CLmkAppLmItemSelectorImpl::MarkedItemIdsL()
+    {
+    __ASSERT_DEBUG( iListBox, Panic( KLmkPanicNullMember ) );
+    const CArrayFix<TInt>* markedIndexes = NULL;
+    if ( iFindBox )
+        {
+        CAknFilteredTextListBoxModel* model =
+            static_cast<CAknFilteredTextListBoxModel*>( iListBox->Model() );
+        model->Filter()->UpdateSelectionIndexesL();
+        markedIndexes = model->Filter()->SelectionIndexes();
+        }
+    else
+        {
+        markedIndexes = iListBox->SelectionIndexes();
+        }
+    if( markedIndexes->Count() == LmItemListProvider().ItemCount() )
+    	{
+    	LmItemListProvider().GetAllItemIdsL( iMarkedItemIds );
+    	}
+    else
+    	{
+		LmItemListProvider().GetSelectedItemIdsL( iMarkedItemIds, *markedIndexes );
+    	}
+    return iMarkedItemIds;
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkAppLmItemSelectorImpl::NewLandmarkCmdL
+// -----------------------------------------------------------------------------
+//
+void CLmkAppLmItemSelectorImpl::NewLandmarkCmdL()
+    {
+    CPosLandmark* landmark = CPosLandmark::NewL();
+    CleanupStack::PushL( landmark );
+    InitialLandmarkL( landmark );
+
+    TInt BytesToWrite = CalculateLandmarkDisksize(*landmark);
+    TChar DriveName = 'c';
+    DiskSpaceBelowCriticalLevelL(BytesToWrite, DriveName);
+
+    ExecuteNewLandmarkEditorL( *landmark );
+    CleanupStack::PopAndDestroy( landmark );
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkAppLmItemSelectorImpl::DiskSpaceBelowCriticalLevelL
+// -----------------------------------------------------------------------------
+//
+void CLmkAppLmItemSelectorImpl::DiskSpaceBelowCriticalLevelL(
+    TInt aBytesToWrite, TChar aDrive)
+    {
+    RFs  iFs;   // File session
+    User::LeaveIfError(iFs.Connect());
+
+    // Resource value is in kilobytes, convert to bytes. (* 1024)
+    TInt iCriticalDiskLevel = 120 * 1024;
+    TVolumeInfo* volumeInfo = new(ELeave) TVolumeInfo;
+    CleanupStack::PushL(volumeInfo);
+    TInt drive;
+
+    User::LeaveIfError(iFs.CharToDrive(aDrive, drive));
+    User::LeaveIfError(iFs.Volume(*volumeInfo, drive));
+
+    // RFs allocates bytes in steps of 2048 bytes. Calculate the actual
+    // bytes to write according to this.
+    TInt bytesInLastCluster = aBytesToWrite % KFatClusterSize;
+    TInt paddedBytesToFillCluster = 0;
+    if (bytesInLastCluster > 0)
+        {
+        paddedBytesToFillCluster = KFatClusterSize - bytesInLastCluster;
+        }
+
+    TInt64* bytesToWrite= new(ELeave) TInt64(aBytesToWrite + paddedBytesToFillCluster);
+    CleanupStack::PushL(bytesToWrite);
+    TInt64* freeAfterWrite = new(ELeave) TInt64((*volumeInfo).iFree - (*bytesToWrite));
+	CleanupStack::PushL(freeAfterWrite);
+    TInt64* limit = new(ELeave) TInt64(iCriticalDiskLevel);
+    CleanupStack::PushL(limit);
+    iFs.Close();
+    if ((*freeAfterWrite) < (*limit))
+        {
+        User::Leave(KErrDiskFull);
+        }
+    CleanupStack::PopAndDestroy(4);//volumeInfo
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkAppLmItemSelectorImpl::CalculateLandmarkDisksize
+// -----------------------------------------------------------------------------
+//
+TInt CLmkAppLmItemSelectorImpl::CalculateLandmarkDisksize(
+    const CPosLandmark& aLandmark)
+	{
+	// Constant for estimating disk size
+    const TReal bytesToDisk = 4.4;
+    // A bare landmark takes 44 bytes on disk
+    const TInt bareLm = 44;
+    // Adding 73 bytes when landmark have an icon.
+    const TInt iconIncluded = 73;
+
+    // Method variables
+    TInt err = KErrNone;
+    TReal result = 0;
+
+    // Bare landmark
+    result += bareLm * bytesToDisk;
+
+    // Estimate location
+    TLocality loc;
+    err = aLandmark.GetPosition(loc);
+    if (!err)
+        {
+        if (!TRealX(loc.Latitude()).IsNaN())
+            {
+            // TReal64
+            result += bytesToDisk * bytesToDisk * 4;
+            }
+        if (!TRealX(loc.Longitude()).IsNaN())
+            {
+            // TReal64
+            result += bytesToDisk * bytesToDisk * 4;
+            }
+        if (!TRealX(loc.Altitude()).IsNaN())
+            {
+            // TReal32
+            result += bytesToDisk * bytesToDisk * 2;
+            }
+        if (!TRealX(loc.HorizontalAccuracy()).IsNaN())
+            {
+            // TReal32
+            result += bytesToDisk * bytesToDisk * 2;
+            }
+        if (!TRealX(loc.VerticalAccuracy()).IsNaN())
+            {
+            // TReal32
+            result += bytesToDisk * bytesToDisk * 2;
+            }
+        }
+
+    // Calculate landmark coverage radius
+    TReal32 real;
+    err = aLandmark.GetCoverageRadius(real);
+    if (!err)
+        {
+        result += bytesToDisk * bytesToDisk * 2;
+        }
+
+    // Calculate landmark name
+    TPtrC des;
+    err = aLandmark.GetLandmarkName(des);
+    if (!err)
+        {
+        result += des.Length() * bytesToDisk * 2;
+        }
+
+    // Calculate landmark description
+    err = aLandmark.GetLandmarkDescription(des);
+    if (!err)
+        {
+        result += des.Length() * bytesToDisk * 2;
+        }
+
+    // Icon
+    // Constants for adding a icon
+    TInt iconIndex;
+    TInt maskIndex;
+    err = aLandmark.GetIcon(des, iconIndex, maskIndex);
+    if (!err)
+        {
+        result += iconIncluded;
+        }
+
+    // Calculating position fields
+    TInt nrFields = aLandmark.NumOfAvailablePositionFields();
+    TPositionFieldId fid = aLandmark.FirstPositionFieldId();
+    for (TInt j = 0; j < nrFields; j++)
+        {
+        err = aLandmark.GetPositionField(fid, des);
+        if (!err)
+            {
+            result += des.Length() * bytesToDisk;
+            }
+
+        fid = aLandmark.NextPositionFieldId(fid);
+        }
+
+    return static_cast<TInt> (result);
+	}
+
+// -----------------------------------------------------------------------------
+// CLmkAppLmItemSelectorImpl::ExecuteNewLandmarkEditorL
+// -----------------------------------------------------------------------------
+//
+void CLmkAppLmItemSelectorImpl::ExecuteNewLandmarkEditorL(
+    CPosLandmark& aLandmark )
+    {
+    TLmkEditorAttributes attributeFlags( CLmkEditorDlg::ELmkAll );
+    TLmkEditorMode editorMode( CLmkEditorDlg::ELmkEditor );
+
+    iNewLmkItemId = 0;
+
+    if(iDlg)
+    	{
+    	delete iDlg;
+    	iDlg = NULL;
+    	}
+    iDlg = CLmkEditorImpl::NewL( iDb,
+                                                iSender,
+                                                attributeFlags,
+                                                editorMode,
+                                                &iNewLmkItemId,
+                                                &aLandmark );
+    if(iDlg->ExecuteLD())
+    	{
+    	iNewListBoxItemAdded = ETrue;
+    	}
+    iDlg = NULL;
+    TInt searchTextLength = iSearchBox->TextLength();
+	iSearchBox->ResetL();
+    if( !iNewLmkItemId && searchTextLength > 0 )
+        {
+        ProcessCommandL( ELmkCmdFindBoxSearchAfresh );
+        }
+	iSearchBox->DrawNow();
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkAppLmItemSelectorImpl::RequestCurrenLocationL
+// -----------------------------------------------------------------------------
+//
+void CLmkAppLmItemSelectorImpl::RequestCurrenLocationL()
+    {
+    HBufC* srvName = StringLoader::LoadLC(
+                      R_LMK_SERVICE_RULE_NAME, const_cast<CEikonEnv *>( iEnv ));
+
+    iLocationService = CLmkLocationService::NewL(*srvName);
+   	CleanupStack::PopAndDestroy(srvName); //srvName
+    iLocationService->SetObserver( *this );
+
+    iLocationService->LocationRequestL();
+
+    TRAPD( error, iWaitDialogLauncher->StartWaitDialogL());
+    if( error )
+        {
+        delete iLocationService;
+        iLocationService = NULL;
+
+        User::Leave( error );
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkAppLmItemSelectorImpl::CreateLmkFromCurrentLocationL
+// -----------------------------------------------------------------------------
+//
+void CLmkAppLmItemSelectorImpl::CreateLmkFromCurrentLocationL(
+                                    const TPosition& aPosition)
+    {
+    CPosLandmark* landmark = CPosLandmark::NewL();
+    CleanupStack::PushL( landmark );
+    landmark->SetPositionL( aPosition );
+    InitialLandmarkL( landmark );
+    ExecuteNewLandmarkEditorL( *landmark );
+    CleanupStack::PopAndDestroy( landmark );
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkAppLmItemSelectorImpl::UpdateMarkIndexAfterAdditionL
+// -----------------------------------------------------------------------------
+//
+void CLmkAppLmItemSelectorImpl::UpdateMarkIndexAfterAdditionL(
+    TInt aIndexToBeSelected )
+    {
+    __ASSERT_DEBUG( iListBox, Panic( KLmkPanicNullMember ) );
+	CListBoxView* lListBoxView = ( CListBoxView* )NULL;
+	lListBoxView = iListBox->View();
+	if( lListBoxView )
+    	{
+		//Fetching the array of marked item
+		CArrayFix<TInt>* lActualSelectionArray = (CArrayFix<TInt>*)lListBoxView->SelectionIndexes();
+    	if( lActualSelectionArray && (lActualSelectionArray->Count() > 0) )
+        	{
+			TInt lCnt(0);
+    		TInt lSelectedIndexCnt = lActualSelectionArray->Count();
+    		/*Sorting these array item in Accessding order
+    		 *Because user may marked the item in any order
+    		 */
+    		TKeyArrayFix lKeyArrayFix(0,ECmpTInt);
+    		lActualSelectionArray->Sort(lKeyArrayFix);
+
+    		/*Declaring a local array.which will hold selected indexs.
+    		 *this need because if we change any selection in the listbox
+    		 *that will effect the original array.That may crash the logic
+    		 */
+			CArrayFix<TInt>* lLocalArray = (CArrayFix<TInt>*)NULL;
+			lLocalArray = new( ELeave ) CArrayFixFlat<TInt>(iListBox->Model()->NumberOfItems());
+
+			//Copying the indexs from the original array to the local array
+			while( lSelectedIndexCnt > 0)
+    			{
+				lLocalArray->AppendL( lActualSelectionArray->At(lCnt) );
+				lCnt++;
+				lSelectedIndexCnt--;
+    			}
+
+			lSelectedIndexCnt = lLocalArray->Count();
+			while( lSelectedIndexCnt > 0 )
+    			{
+				TInt lToSelectIndex(0);
+				lToSelectIndex = lLocalArray->At( lSelectedIndexCnt - 1 );
+				/*if the currently added item index is less than or equals to
+				 *marked index then only change the selection
+				 */
+				if( aIndexToBeSelected <= lToSelectIndex )
+    				{
+		    		lListBoxView->DeselectItem( lToSelectIndex );
+		    		lListBoxView->SelectItemL( lToSelectIndex + 1 );
+    				}
+				lSelectedIndexCnt--;
+    			}
+
+			delete lLocalArray;
+			lLocalArray = ( CArrayFix<TInt>* )NULL;
+        	}
+    	}
+	}
+
+// -----------------------------------------------------------------------------
+// CLmkAppLmItemSelectorImpl::HandleScreenSizeChange
+// -----------------------------------------------------------------------------
+//
+void CLmkAppLmItemSelectorImpl::HandleScreenSizeChange()
+    {
+	}
+// -----------------------------------------------------------------------------
+// CLmkAppLmItemSelectorImpl::HandleLmCreated
+// -----------------------------------------------------------------------------
+//
+void CLmkAppLmItemSelectorImpl::HandleLmCreated(TPosLmItemId aNewLmkItemId)
+    {
+    iNewLmkItemId = aNewLmkItemId;
+    iNewListBoxItemAdded = ETrue;
+    }
+// -----------------------------------------------------------------------------
+// CLmkAppLmItemSelectorImpl::LaunchPosSettingsL
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CLmkAppLmItemSelectorImpl::LaunchPosSettingsL()
+	{
+	if(!iLauncher)
+        		{
+        		iLauncher = CLmkLocSettingsLauncher::NewL();
+        		}
+        	iLauncher->LaunchL();
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkAppLmItemSelectorImpl::StoreIdTobeFocussedAfterDeletion
+// -----------------------------------------------------------------------------
+//
+void CLmkAppLmItemSelectorImpl::StoreIdTobeFocussedAfterDeletion( RArray<TPosLmItemId>& markedItemIds )
+	{
+	TInt markedCount = markedItemIds.Count();
+	TInt index = iListBox->CurrentItemIndex();
+	TInt cnt = LmItemListProvider().ItemCount();
+	TBool bItemSelected = iListBox->View()->ItemIsSelected(index);
+	iFocusItemIdAfterDeletion = KPosLmNullItemId;
+	if(bItemSelected)
+		{
+		for( TInt i=index+1;i<cnt;i++)
+			{
+			if(!iListBox->View()->ItemIsSelected(i))
+				{
+				index = i;
+				break;
+				}
+			}
+		}
+	if( index < cnt)
+		{
+		LmItemListProvider().GetSelectedItemId(iFocusItemIdAfterDeletion,index);
+		}
+}
+// -----------------------------------------------------------------------------
+// CLmkAppLmItemSelectorImpl::SetFocusToItemAfterDeletionOfMarkedItems
+// -----------------------------------------------------------------------------
+//
+void CLmkAppLmItemSelectorImpl::SetFocusToItemAfterDeletionOfMarkedItems()
+	{
+	//check if the focus to be moved to the item after deleting the marked item.
+	if( iFocusItemIdAfterDeletion != KPosLmNullItemId)
+		{
+		//get the new index position of this item, after deletion.
+		TInt index = LmItemListProvider().SelectedIndex(iFocusItemIdAfterDeletion);
+	    if ( index != KErrNotFound &&
+	         index < iListBox->Model()->NumberOfItems() )
+			{
+			iListBox->SetCurrentItemIndex( index );
+			}
+		else
+			{
+			iListBox->SetCurrentItemIndex( 0 );
+			}
+		}
+	iFocusItemIdAfterDeletion = KPosLmNullItemId;
+	}
+// -----------------------------------------------------------------------------
+// CLmkAppLmItemSelectorImpl::HandleDialogDismissed
+// -----------------------------------------------------------------------------
+//
+void CLmkAppLmItemSelectorImpl::HandleDialogDismissed( TInt aButtonId )
+	{
+	if( EEikBidCancel == aButtonId )
+		{
+		delete iLocationService;
+    	iLocationService = NULL;
+		}
+	}
+
+// -----------------------------------------------------------------------------
+// CLmkAppLmItemSelectorImpl::MessageQueryCallBack()
+// -----------------------------------------------------------------------------
+//
+TInt CLmkAppLmItemSelectorImpl::MessageQueryCallBack( TAny* /*aPtr*/ )
+	{
+	TInt result = KErrNone;
+	CEikonEnv* env = CEikonEnv::Static();
+	TRAP_IGNORE(LmkNotes::GenericMessageQueryL(env,R_LMK_REQUEST_FAIL_INFO_TEXT,
+									R_LMK_MSG_QUERY_HEADING_PANE_TEXT));
+	return result;
+	}
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/uicontrols/src/CLmkAppLmSelectorImpl.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,1100 @@
+/*
+* Copyright (c) 2002-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  This file contains the selector implementation for landmarks by
+*               name view
+*
+*/
+
+
+
+
+
+
+
+// INCLUDE FILES
+#include <AiwServiceHandler.h>      // AIW
+#include <AiwCommon.hrh>            // AIW
+#include <lbsfields.h>
+#include <aknsfld.h>
+#include <aknlists.h>
+#include <StringLoader.h>
+#include <EPos_CPosLmCategoryCriteria.h>
+#include <EPos_CPosLmCategoryManager.h>
+#include <AknWaitDialog.h>
+#include <lmkui.rsg>
+#include <landmarks.rsg>
+#include <CLmkEditorDlg.h> // from system include!
+#include "clmkdbsearchutils.h"
+#include "LmkConsts.h"
+#include "landmarks.hrh"
+#include "CLmkDbUtils.h"
+#include "CLmkFields.h"
+#include "CLmkUiUtils.h"
+#include "CLmkEditorImpl.h"
+#include "LmkNotes.h"
+#include "CLmkSender.h"
+#include "LmkListProviderFactory.h"
+#include "CLmkLmItemListProvider.h"
+#include "CLmkDlgCategorySelectorImpl.h"
+#include "CLmkLmItemListMemento.h"
+#include "clmkgotourlcmd.h"
+#include "CLmkAppLmSelectorImpl.h"
+#include "MLmkMapAndNavigationObServer.h"
+#include "CLmkAOOperation.h"
+#include "MLmkMskObserver.h"
+#include "CLmkLocSettingLauncher.h"
+#include <lmkerrors.h>
+
+
+
+// CONSTANTS
+/// Unnamed namespace for local definitions
+namespace {
+//Below three flags are used only for category remove operation.
+//This one is used, when the remove operation starts
+const TInt KRemoveOperationStarted(2);
+//This one is used when, remove operation ends.
+const TInt KRemoveOperationCompleted(4);
+//This one is used, when the remove operation ends & the list box model
+//also is updated, after getting an event from database.
+const TInt KRremoveListBoxModUpdated(8);
+#if defined(_DEBUG)
+_LIT( KPanicMsg, "CLmkAppLmSelectorImpl" );
+
+void Panic( TPanicCode aReason )
+    {
+    User::Panic( KPanicMsg, aReason );
+    }
+#endif
+}  // namespace
+
+_LIT(KWildCard, "*");
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CLmkAppLmSelectorImpl::CLmkAppLmSelectorImpl
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+CLmkAppLmSelectorImpl::CLmkAppLmSelectorImpl(
+    CPosLandmarkDatabase& aDb,
+    CLmkSender& aSender,
+    TBool aFindBox )
+    : CLmkAppLmItemSelectorImpl( aDb, aSender, aFindBox ),iIsDlgOpen(EFalse)
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkAppLmSelectorImpl::ConstructL
+// Symbian 2nd phase constructor can leave.
+// -----------------------------------------------------------------------------
+//
+void CLmkAppLmSelectorImpl::ConstructL()
+    {
+    CLmkAppLmItemSelectorImpl::BaseConstructL();
+    // Added for rel 3.1
+    iLmkCallCmd = CLmkCallCmd::NewL();
+    iDbSearchUtils = NULL;
+    // launching browser
+    iLmkGoToURLCmd = CLmkGoToURLCmd::NewL();
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkAppLmSelectorImpl::ConstructL
+// Symbian 2nd phase constructor can leave.
+// -----------------------------------------------------------------------------
+//
+void CLmkAppLmSelectorImpl::ConstructL(
+    const MLmkListMemento& aCategoryMemento )
+	{
+	// Listing contents of current category is implemented using category
+	// view's memento:
+	const CLmkLmItemListMemento& categoryMemento =
+	static_cast<const CLmkLmItemListMemento&>( aCategoryMemento );
+	TPosLmItemId categoryId = categoryMemento.MemorizedItemId();
+
+	if (categoryId == KPosLmNullItemId) // 'uncategorised' category
+		{
+		// set criteria for searchnig 'Uncategorised' landmarks
+		iCategoryName = StringLoader::LoadL(
+		    R_LMK_LM_LIST_UNCATEGORISED, const_cast<CEikonEnv *>( iEnv ));
+		}
+	else
+		{
+		// Construction must fail if category has been deleted:
+		CPosLmCategoryManager* mgr = CPosLmCategoryManager::NewL( iDb );
+		CleanupStack::PushL( mgr );
+		// Leaves with KErrNotFound if category doesn't exist
+		CPosLandmarkCategory* category = mgr->ReadCategoryLC( categoryId );
+		TPtrC categoryName;
+		User::LeaveIfError(category->GetCategoryName(categoryName));
+		iCategoryName = categoryName.AllocL();
+		CleanupStack::PopAndDestroy( 2 ); // category, mgr
+		}
+
+	iCriteria = CPosLmCategoryCriteria::NewLC();
+	CleanupStack::Pop(); // iCriteria
+	iCriteria->SetCategoryItemId( categoryId );
+    iMarkedCatCountAdded = 0;
+	// Call "normal" ConstructL():
+	ConstructL();
+	}
+
+// -----------------------------------------------------------------------------
+// CLmkAppLmSelectorImpl::NewL
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CLmkAppLmSelectorImpl* CLmkAppLmSelectorImpl::NewL(
+    CPosLandmarkDatabase& aDb,
+    CLmkSender& aSender,
+    TBool aFindBox )
+    {
+    CLmkAppLmSelectorImpl* self =
+        new( ELeave ) CLmkAppLmSelectorImpl( aDb, aSender, aFindBox );
+
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop();
+
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkAppLmSelectorImpl::NewL
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CLmkAppLmSelectorImpl* CLmkAppLmSelectorImpl::NewL(
+    CPosLandmarkDatabase& aDb,
+    const MLmkListMemento& aCategoryMemento,
+    CLmkSender& aSender,
+    TBool aFindBox )
+    {
+    CLmkAppLmSelectorImpl* self =
+        new( ELeave ) CLmkAppLmSelectorImpl( aDb, aSender, aFindBox );
+
+    CleanupStack::PushL( self );
+    self->ConstructL( aCategoryMemento );
+    CleanupStack::Pop();
+
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkAppLmSelectorImpl::~CLmkAppLmSelectorImpl
+// -----------------------------------------------------------------------------
+//
+CLmkAppLmSelectorImpl::~CLmkAppLmSelectorImpl()
+    {
+    delete iCriteria;
+    delete iCategoryName;
+    delete iLmkCallCmd;
+    delete iDbSearchUtils;
+    delete iLmkGoToURLCmd;
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkAppLmSelectorImpl::CategoryNameL
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TPtrC CLmkAppLmSelectorImpl::CategoryNameL()
+    {
+    return *iCategoryName;
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkAppLmSelectorImpl::SetupListProviderL
+// -----------------------------------------------------------------------------
+//
+void CLmkAppLmSelectorImpl::SetupListProviderL()
+    {
+    if ( !iListProvider )
+        {
+        if ( iCriteria )
+            {
+            iListProvider =
+                LmkListProviderFactory::CreateProviderL( iDb, *iCriteria );
+            }
+        else
+            {
+            iListProvider =
+                LmkListProviderFactory::CreateProviderL( iDb,
+                                                         ELandmarkSelector );
+            }
+        iListProvider->AddObserverL( *this );
+        iListProvider->InitializeL();
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkAppLmSelectorImpl::ListProvider
+// -----------------------------------------------------------------------------
+//
+const CLmkListProviderBase& CLmkAppLmSelectorImpl::ListProvider() const
+    {
+    __ASSERT_DEBUG( iListProvider, Panic( KLmkPanicNullMember ) );
+    return *iListProvider;
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkAppLmSelectorImpl::HandleCategorySearchNotifyL
+// -----------------------------------------------------------------------------
+//
+void CLmkAppLmSelectorImpl::HandleCategorySearchNotifyL(RArray<TPosLmItemId> /*aArray*/)
+	{
+	// This search is not used
+	}
+
+// -----------------------------------------------------------------------------
+// CLmkAppLmSelectorImpl::HandleLmkSearchNotifyL
+// -----------------------------------------------------------------------------
+//
+void CLmkAppLmSelectorImpl::HandleLmkSearchNotifyL()
+	{
+	iWaitNote->ProcessFinishedL();
+	}
+
+// -----------------------------------------------------------------------------
+// CLmkAppLmSelectorImpl::ProcessCommandL
+// -----------------------------------------------------------------------------
+//
+void CLmkAppLmSelectorImpl::ProcessCommandL( TInt aCommandId )
+    {
+    __ASSERT_DEBUG( iListProvider, Panic( KLmkPanicNullMember ) );
+    switch ( aCommandId )
+        {
+        case ELmkCmdEditLm:
+            {
+            if( iIsDlgOpen )
+            	break;
+            	
+          	EditLandmarkCmdL(CLmkEditorDlg::ELmkEditor);
+  					iSearchBox->ResetL();
+
+            break;
+            }
+        case ELmkCmdOpenLm:
+            {
+            if( iIsDlgOpen )
+            	break;
+
+            EditLandmarkCmdL(CLmkEditorDlg::ELmkViewer);
+    		iSearchBox->ResetL();
+
+    	#ifdef RD_SCALABLE_UI_V2
+    		iSearchBox->DrawDeferred();
+        #endif// RD_SCALABLE_UI_V2
+       		iListProvider->StartSearchingLandmarksL(KWildCard, EFalse);
+            break;
+            }
+        case ELmkCmdGoToUrl:
+            {
+			HBufC* lmkUrl = HBufC::NewL( KMaxBufferLen );
+			CleanupStack::PushL( lmkUrl );
+			if (GetPositionFieldForSelectedLmL(
+							ELmkPositionFieldWebAddress,
+							*lmkUrl ) == KErrNone)
+				{
+				if ( lmkUrl->Length() > 0 )
+					{
+					// Get the URL of the LM and launch browser
+					iLmkGoToURLCmd->LaunchBrowserL( *lmkUrl );
+					}
+				}
+			CleanupStack::PopAndDestroy( lmkUrl );
+			break;
+            }
+        case ELmkCmdCall:
+	        {
+			// Create AIW interest
+	        ExecuteAIWCallCmdL( aCommandId );
+	        break;
+	        }
+        case ELmkCmdDeleteLm:
+            {
+            DeleteLandmarksCmdL();
+            break;
+            }
+		case ELmkCmdChangeIcon:
+			{
+            ChangeIconCmdL();
+			break;
+			}
+        case ELmkCmdAddToCat:
+            {
+            AddToCatCmdL();
+            break;
+            }
+        case ELmkCmdSendVia1:
+        case ELmkCmdSendVia2:
+        case ELmkCmdSendVia3:
+        case ELmkCmdSendVia4:
+        case ELmkCmdSendVia5:
+        case ELmkCmdSendVia6:
+        case ELmkCmdSendVia7:
+        case ELmkCmdSendVia8:
+        case ELmkCmdSendVia9:
+        case ELmkCmdSendVia10:
+        case ELmkCmdSend:
+            {
+            RArray<TPosLmItemId>& markedIds = MarkedItemIdsL();
+            if(markedIds.Count() == 0)
+            	{
+            	CPosLandmark* landmark = iDb.ReadLandmarkLC(SelectedIdL());
+            	iSender.SendSingleLandmarkL(*landmark);
+            	CleanupStack::PopAndDestroy();//landmark
+            	}
+            else
+            	{
+            	//Send multiple landmarks
+           		TPtrC ptr;
+	        	RPointerArray<CLmkLandmark> lmkArray;
+	        	TRAPD( sendErr, iSender.PrepareMultipleLandmarkForSendL(lmkArray,markedIds) );
+	        	if(sendErr == KErrNone)
+	        		{
+	        		TRAP( sendErr, iSender.SendLandmarksL(aCommandId,ptr,lmkArray) );
+	        		}
+	        	lmkArray.ResetAndDestroy();
+	        	if(sendErr == KErrNoMemory)
+	        		{
+	        		User::LeaveNoMemory();
+	        		}
+            	}
+            break;
+            }
+        case EAknCmdMark:
+        case EAknCmdUnmark:
+        case EAknMarkAll:
+        case EAknUnmarkAll:
+	        {
+	        if(iMskObserver)
+				{
+				iMskObserver->UpdateMskContainerL();
+				}
+			break;
+	        }
+		case ELmkCmdLaunchPositionSettings:
+			{
+			LaunchPosSettingsL();
+			break;
+			}
+        case ELmkCmdFindBoxSearchAfresh:
+        case ELmkCmdFindBoxSearchInPreviousResults:
+        	{
+			TInt searchTextLength = iSearchBox->TextLength();
+		    const TInt KExtraChars = 2; // 2 chars wildcards
+		    HBufC* filterBuf = HBufC::NewLC(searchTextLength + KExtraChars);
+		    TPtr filter = filterBuf->Des();
+		    iSearchBox->GetSearchText(filter);
+	        filter.Append(KWildCard);
+	        iListProvider->StartSearchingLandmarksL(filter, EFalse);
+            CleanupStack::PopAndDestroy( filterBuf );
+
+	        break;
+        	}
+        default:
+            {
+            CLmkAppLmItemSelectorImpl::ProcessCommandL( aCommandId );
+            break;
+            }
+        }
+    }
+
+EXPORT_C void CLmkAppLmSelectorImpl::StartSearchingLandmarksL(
+								const TDesC& /*aSearchPattern*/,
+    							TBool /*aSearchOnlyInPreviousMatches*/)
+	{
+	iListProvider->InitializeL();
+	}
+
+// -----------------------------------------------------------------------------
+// CLmkAppLmSelectorImpl::HandleOperationL
+// -----------------------------------------------------------------------------
+//
+void CLmkAppLmSelectorImpl::HandleOperationL(
+                                       TOperationTypes aType,
+                                       TReal32 /*aProgress*/,
+                                       TInt aStatus )
+    {
+    TBool deleteNote = EFalse;
+    switch (aType)
+        {
+         case EDeleteLandmarks:
+             {
+             if (aStatus != KPosLmOperationNotComplete)
+                 {
+                 deleteNote = ETrue;
+                 }
+             }
+         break;
+         case EAddToCategory:
+             {
+             if (iMarkedCatCountAdded ==1)
+                 {
+                 deleteNote = ETrue;
+                 }
+              else if (iMarkedCatCountAdded > 1)
+                 {
+                 --iMarkedCatCountAdded;
+                 }
+             }
+         break;
+        case ERemoveCategory:
+        	{
+        	if (iOperation && aStatus != KPosLmOperationNotComplete)
+	        	{
+		        if((iCatRemoveFlag & KRremoveListBoxModUpdated) &&
+		           (iCatRemoveFlag & KRemoveOperationStarted )&& iWaitNote)
+					{
+					//Since the operation is completed and listbox model
+					//is updated first, wait note can be closed now
+					CloseWaitNoteL();
+			        iListBox->SetCurrentItemIndex(0);
+			        //nullify all the flags
+			        iCatRemoveFlag &= ~KRemoveOperationCompleted;
+			        iCatRemoveFlag &= ~KRremoveListBoxModUpdated;
+			        iCatRemoveFlag &= ~KRemoveOperationStarted;
+					}
+				else
+					{
+					//operation completed but cannot close the wait dialog
+					//since, the listbox model is not updated.Now , it will
+					//be closed in HandleEventListReadyL function.Set the operation
+					//completion flag
+					iCatRemoveFlag |= KRemoveOperationCompleted;
+					}
+				}
+    	   	}
+         break;
+         default:
+         break;
+        }
+
+    if (deleteNote && iWaitNote)
+        {
+        iWaitNote->ProcessFinishedL();
+        iWaitNote = NULL;
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkAppLmSelectorImpl::ChangeIconL
+// -----------------------------------------------------------------------------
+//
+void CLmkAppLmSelectorImpl::ChangeIconL(
+    TPosLmItemId aId,
+    TInt aIconIndex,
+    TInt aMaskIndex)
+    {
+    TFileName* iconFile = CLmkUiUtils::LmkUiIconFileLC();
+    iDbUtils->ChangeIconL( iDb, aId, ELmkItemTypeLandmark,
+                           *iconFile, aIconIndex, aMaskIndex);
+    CleanupStack::PopAndDestroy();//iconFile
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkAppLmSelectorImpl::ChangeIconsL
+// -----------------------------------------------------------------------------
+//
+void CLmkAppLmSelectorImpl::ChangeIconsL(
+    RArray<TPosLmItemId>& aIdArray,
+    TInt aIconIndex,
+    TInt aMaskIndex)
+    {
+    TFileName* iconFile = CLmkUiUtils::LmkUiIconFileLC();
+    iDbUtils->ChangeIconsL( aIdArray, ELmkItemTypeLandmark,
+                            *iconFile, aIconIndex, aMaskIndex);
+	CleanupStack::PopAndDestroy();//iconFile
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkAppLmSelectorImpl::InitialLandmarkL
+// -----------------------------------------------------------------------------
+//
+void CLmkAppLmSelectorImpl::InitialLandmarkL( CPosLandmark* aLandmark )
+    {
+    if ( iCriteria )
+        {// category is a valid category in the LM database (not 'uncategorised')
+        if (iCriteria->CategoryItemId() != KPosLmNullItemId)
+	        {
+	        aLandmark->AddCategoryL( iCriteria->CategoryItemId() );
+	        }
+
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkAppLmSelectorImpl::EditLandmarkCmdL
+// -----------------------------------------------------------------------------
+//
+void CLmkAppLmSelectorImpl::EditLandmarkCmdL(TLmkEditorMode aEditMode)
+    {
+    TLmkEditorAttributes attributeFlags( CLmkEditorDlg::ELmkAll );
+    TChar DriveName = 'c';
+    TInt BytesToWrite = 0;
+
+    DiskSpaceBelowCriticalLevelL(BytesToWrite, DriveName);
+    iNewLmkItemId = SelectedIdL();
+    if(iDlg)
+    	{
+    	iDlg = NULL;
+    	}
+    iDlg = CLmkEditorImpl::NewL( iDb,
+                                                iSender,
+                                                attributeFlags,
+                                                aEditMode,
+                                                iNewLmkItemId );
+    iDlg->ExecuteLD();
+    iDlg = NULL;
+
+#ifdef RD_SCALABLE_UI_V2
+   TInt listProviderCount = LmItemListProvider().ItemCount();
+   TInt listBoxItemCount = iListBox->Model()->NumberOfItems();
+   TInt currentItemIndex = LmItemListProvider().SelectedIndex(iNewLmkItemId);// iListBox->CurrentItemIndex();
+   if (listProviderCount != listBoxItemCount)
+       {
+       iDeletionHelper.StoreListInformation( *iListBox, EFalse );
+       }
+   iDeletionHelper.UpdateListIfDeleteHappenedL();
+   if( currentItemIndex >= 0 && currentItemIndex < iListBox->Model()->NumberOfItems() )
+       {
+       iListBox->SetCurrentItemIndex(currentItemIndex);
+       }   
+#endif // RD_SCALABLE_UI_V2
+   TRAPD(err,CPosLandmark* landmark = iDb.ReadLandmarkLC(iNewLmkItemId);CleanupStack::PopAndDestroy( landmark ));
+   if (err == KErrNotFound)
+       {
+       LmItemListProvider().RemoveItem( iNewLmkItemId );
+       }      
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkAppLmSelectorImpl::GetSelectedLandmarksL
+// -----------------------------------------------------------------------------
+//
+TInt CLmkAppLmSelectorImpl::GetSelectedLandmarksL(RPointerArray<CPosLandmark> &aArray)
+	{
+	if( ! iListBox->Model()->NumberOfItems() )
+		{
+		return KErrNotFound;
+		}
+
+	RArray<TPosLmItemId>& markedItemIds = MarkedItemIdsL();
+    TInt markedCount = markedItemIds.Count();
+    if ( markedCount == 0 )
+    	{
+    	TPosLmItemId itemId = SelectedIdL();
+    	CPosLandmark *lmk = iDb.ReadLandmarkLC(itemId);
+    	aArray.Append(lmk);
+    	CleanupStack::Pop(); // ReadLandmarkLC
+    	return KErrNone;
+    	}
+    else
+    	{
+    	if(markedCount == 1)
+    		{
+    		// Donot request if only one landmark
+    		TPosLmItemId itemId = markedItemIds[0];
+    		CPosLandmark *lmk = iDb.ReadLandmarkLC(itemId);
+    		aArray.Append(lmk);
+    		CleanupStack::Pop(); // ReadLandmarkLC
+    		return KErrNone;
+    		}
+    	RArray<TPosLmItemId> itemIds;
+    	for(TInt index = 0;index < markedCount; index++)
+    		{
+    		TPosLmItemId itemId = markedItemIds[index];
+    		itemIds.Append(itemId);
+    		}
+    	if(iDbSearchUtils == NULL)
+    		{
+    		iDbSearchUtils = CLmkDbSearchUtils::NewL();
+    		}
+    	iDbSearchUtils->GetLandmarksL(this, itemIds ,&aArray);
+    	iWaitNote = new (ELeave) CAknWaitDialog(NULL, ETrue);
+		iWaitNote->ExecuteLD(R_LMKUI_PROCESSING_WAIT_NOTE);
+		iWaitNote = NULL;
+		return KErrNone;
+    	}
+	}
+
+// -----------------------------------------------------------------------------
+// CLmkAppLmSelectorImpl::IsLandmarkDataEmptyL
+// -----------------------------------------------------------------------------
+//
+TBool CLmkAppLmSelectorImpl::IsLandmarkDataEmptyL(CPosLandmark* aLandmark)
+	{
+	// verify that destination landmark has coordinates
+    TLocality loc;
+    TBool isValid = (KErrNone == aLandmark->GetPosition( loc ) );
+    isValid &= !Math::IsNaN( loc.Latitude() ) && !Math::IsNaN( loc.Longitude() );
+    return !isValid;
+    
+/*
+    if ( !isValid )
+        {
+        // verify that destination landmark has address info
+        TPositionFieldId fieldId = aLandmark->FirstPositionFieldId();
+        while ( fieldId != EPositionFieldNone )
+            {
+            if ( fieldId > EPositionFieldAddressCapabilitiesBegin &&
+                 fieldId < EPositionFieldBuildingTelephone)
+                {
+                TPtrC field;
+                aLandmark->GetPositionField( fieldId, field );
+                if ( field.Length() )
+                    {
+                    isValid = ETrue;
+                    break;
+                    }
+                }
+            fieldId = aLandmark->NextPositionFieldId( fieldId );
+            }
+        }
+    return !isValid;
+*/
+	}
+
+
+// -----------------------------------------------------------------------------
+// CLmkAppLmSelectorImpl::DeleteLandmarksCmdL
+// -----------------------------------------------------------------------------
+//
+void CLmkAppLmSelectorImpl::DeleteLandmarksCmdL()
+    {
+
+    if( ! iListBox->Model()->NumberOfItems() )
+    	return;
+
+    RArray<TPosLmItemId>& markedItemIds = MarkedItemIdsL();
+    TInt markedCount = markedItemIds.Count();
+    if ( markedCount == 0 )
+        {
+        if ( LmkNotes::LandmarkConfirmationQueryL( iEnv, 1 ) )
+            {
+            iDeletionHelper.StoreListInformation( *iListBox, EFalse );
+            TPosLmItemId selectedId = SelectedIdL();
+            LmItemListProvider().RemoveItem( selectedId );
+            iDbUtils->DeleteLandmarkL( selectedId, iDb );
+            }
+
+        }
+    else
+        {
+        if ( LmkNotes::LandmarkConfirmationQueryL( iEnv, markedCount ) )
+            {
+			StoreIdTobeFocussedAfterDeletion( markedItemIds );
+            iDeletionHelper.StoreListInformation( *iListBox, ETrue );
+
+            if( markedCount == 1 )
+            	{
+            	LmItemListProvider().RemoveItem( markedItemIds[0] );
+            	iDbUtils->DeleteLandmarkL( markedItemIds[0], iDb );
+            	return;
+            	}
+			// The 10 value is set as standard to remove the multiple landmarks and new procedure for operation
+            if( markedCount > 10)
+            	{
+            	LmItemListProvider().RemoveItemsL(markedItemIds,
+            								MLmkAOOperationObserver::EDeleteLandmarks,
+            								KPosLmNullItemId);
+            	}
+        	else
+        		{
+        		iDbUtils->DeleteLandmarksL( markedItemIds );
+
+	            // wait note
+	            iWaitNote = new (ELeave) CAknWaitDialog( NULL, ETrue );
+	            if ( !iWaitNote->ExecuteLD( R_LMK_DELETING_WAIT_NOTE ) )
+	                {
+	                //making iWaitNote null, since framework destroys waitnote
+	        		//dialog on pressing cancel.
+	        		iWaitNote = NULL;
+	                iDbUtils->CancelLmOperation();
+	                }
+        		}
+            }
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkAppLmSelectorImpl::AddToCatL
+// -----------------------------------------------------------------------------
+//
+void CLmkAppLmSelectorImpl::AddToCatCmdL()
+    {
+    CLmkDlgCategorySelectorImpl* dlg =
+        CLmkDlgCategorySelectorImpl::NewL( iDb, ETrue, ETrue );
+    CleanupStack::PushL( dlg );
+    dlg->SetEmptyDlgLabel( R_LMK_EMPTY_NO_CATEGORIES ,R_LMK_GUIDE_CREATE_LANDMARK );
+    RArray<TPosLmItemId> categories;
+    CleanupClosePushL( categories );
+    if ( dlg->ExecuteL( categories ) )
+        {
+        RArray<TPosLmItemId>& markedLmIds = MarkedItemIdsL();
+        TInt markedLmCount = markedLmIds.Count();
+        TInt markedCatCount = categories.Count();
+        iMarkedCatCountAdded = markedCatCount;
+        if ( markedCatCount > 0 )
+            {
+            LmItemListProvider().SetOperationCmd( ELmkCmdAddToCat );
+            LmItemListProvider().SetSelectedItemsCount( markedCatCount );
+
+            if( markedLmCount == 0 )
+            	markedLmIds.Append( SelectedIdL() );
+
+            iDbUtils->AddLmsToCategoriesL( markedLmIds, categories );
+
+            // wait note
+            iWaitNote = new (ELeave) CAknWaitDialog( NULL, ETrue );
+            if ( !iWaitNote->ExecuteLD( R_LMK_PROCESSING_WAIT_NOTE ) )
+                {
+                //making iWaitNote null, since framework destroys waitnote
+        		//dialog on pressing cancel.
+	        	LmItemListProvider().SetSelectedItemsCount( 0 );
+        		iWaitNote = NULL;
+                iDbUtils->CancelLmOperation();
+                }
+            iListBox->ClearSelection();
+	        }
+
+		if( iMskObserver )
+			{
+			iMskObserver->UpdateMskContainerL();
+			}
+        }
+    CleanupStack::PopAndDestroy( 2 ); // categories, dlg
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkAppLmSelectorImpl::HandleEventListReadyL
+// -----------------------------------------------------------------------------
+//
+TBool CLmkAppLmSelectorImpl::HandleEventListReadyL()
+    {
+    // Possibly user-initiated delete finished --> if yes, update the list:
+    TBool retVal;
+	if( iNewListBoxItemAdded )
+		{
+		CAknFilteredTextListBoxModel* model = static_cast<CAknFilteredTextListBoxModel*>( iListBox->Model() );
+        CAknListBoxFilterItems* filter = static_cast<CAknListBoxFilterItems*>( model->Filter() );
+        filter->HandleItemArrayChangeL();
+
+	    TInt listboxIndex = LmItemListProvider().SelectedIndex(iNewLmkItemId);
+
+	    /* When the user tries to create a new landmark in category content view (catId = n)
+	     * Chooses to deselect that category from multiple category selector
+	     * The landmark gets added to either 'uncategorised' category or any other
+	     * category than the current category -->n
+	     */
+
+	    if ( listboxIndex == KLmkInValidIndex )
+		    {
+		    retVal = EFalse;
+		    return retVal;
+		    }
+
+	    if ( listboxIndex != KErrNotFound &&
+	         listboxIndex < iListBox->Model()->NumberOfItems() )
+	        {
+			iListBox->SetCurrentItemIndex(listboxIndex);
+	        }
+        UpdateMarkIndexAfterAdditionL( listboxIndex );
+		iListBox->DrawDeferred();
+		iNewListBoxItemAdded = EFalse;
+		retVal = ETrue;
+		}
+    else  // Either item is updated/deleted
+		{
+		/*Check if the database item count and list item count are same or not
+		*If there is a change, update the list box
+		*(The deletion of an item due to updates in landmark category info
+		*via category in selection via landmark editor or via 'Addtocategory'
+		*command from the Landmark App views)
+		*/
+		if(iDlg)
+		{
+		TRAP_IGNORE(iDlg->UpdateViewDlgL());
+		}
+		TInt listProviderCount = LmItemListProvider().ItemCount();
+		TInt listBoxItemCount = iListBox->Model()->NumberOfItems();
+		if (listProviderCount != listBoxItemCount)
+			{
+			iDeletionHelper.StoreListInformation( *iListBox, EFalse );
+			}
+
+		retVal = iDeletionHelper.UpdateListIfDeleteHappenedL();
+
+		if( retVal)
+			{
+			SetFocusToItemAfterDeletionOfMarkedItems();
+			}
+		//
+		if( (iCatRemoveFlag & KRemoveOperationStarted) )
+			{
+			if((iCatRemoveFlag & KRemoveOperationCompleted) && iWaitNote)
+				{
+				CloseWaitNoteL();
+		        iListBox->SetCurrentItemIndex(0);
+		        iCatRemoveFlag &= ~KRremoveListBoxModUpdated;
+		        iCatRemoveFlag &= ~KRemoveOperationCompleted;
+		        iCatRemoveFlag &= ~KRemoveOperationStarted;
+				}
+			else
+				{
+				//operation completed but cannot close the wait dialog
+				//since, the operation is not yet completed , it will
+				//be closed in HandleOperationL function.
+				iCatRemoveFlag |= KRremoveListBoxModUpdated;
+				}
+			}
+		}
+    return retVal;
+    }
+
+// ----------------------------------------------------
+// CLmkAppLmSelectorImpl::AttachToAIWMenuL()
+// ----------------------------------------------------
+//
+void CLmkAppLmSelectorImpl::AttachToAIWMenuL(
+		TInt aMenuResourceId,
+		TInt aInterestResourceId)
+	{
+	iLmkCallCmd->AttachMenuPaneL( aMenuResourceId, aInterestResourceId);
+	}
+
+// ----------------------------------------------------
+// CLmkAppLmSelectorImpl::InitializeMenuPaneL()
+// ----------------------------------------------------
+//
+void CLmkAppLmSelectorImpl::InitializeMenuPaneL(
+		CEikMenuPane& aMenuPane,
+		TInt aMenuResourceId)
+	{
+	// Initialize the AIW menu service
+	iLmkCallCmd->InitializeMenuPaneL(
+				aMenuPane,
+				aMenuResourceId,
+				ELmkCmdLast // Must not overlap with the other menu ids!
+				);
+	}
+// ----------------------------------------------------
+// CLmkAppLmSelectorImpl::AttachInterestL()
+// ----------------------------------------------------
+//
+void CLmkAppLmSelectorImpl::AttachInterestL (
+		TInt aInterestResourceId)
+	{
+	iLmkCallCmd->AttachInterestL(aInterestResourceId);
+	}
+
+// -----------------------------------------------------------------------------
+// CLmkAppLmSelectorImpl::ExecuteAIWCallCmdL()
+// -----------------------------------------------------------------------------
+//
+void CLmkAppLmSelectorImpl::ExecuteAIWCallCmdL(
+		 TInt aCommandId )
+	{
+	HBufC* lmkPhoneNum = HBufC:: NewL( KMaxPhoneNumberFieldLen );
+	CleanupStack::PushL(lmkPhoneNum);
+
+	if ( (GetPositionFieldForSelectedLmL(
+							ELmkPositionFieldPhoneNumber,
+							*lmkPhoneNum ) == KErrNone) && (lmkPhoneNum->Des().Length() > 0) )
+		{
+		iLmkCallCmd->ExecuteAIWCallCmdL( aCommandId, *lmkPhoneNum );
+		}
+	else
+		{
+		// Info note here with landmark name
+		TPosLmItemId lmId = SelectedIdL();
+		CPosLandmark* landmark = iDb.ReadLandmarkLC(lmId);
+		// Get name
+		TPtrC lmkNamePtr;
+		if ( landmark->GetLandmarkName ( lmkNamePtr ) == KErrNone )
+			{
+			LmkNotes::InformationNotewithTextL( iEnv,
+			                 R_LMK_NOTE_NO_NUMBER_TO_NAME, lmkNamePtr);
+			}
+		CleanupStack::PopAndDestroy( landmark );
+		}
+	CleanupStack::PopAndDestroy(lmkPhoneNum);
+	}
+
+// -----------------------------------------------------------------------------
+// CLmkAppLmSelectorImpl::GetPositionFieldForSelectedLmL()
+// -----------------------------------------------------------------------------
+//
+TInt CLmkAppLmSelectorImpl::GetPositionFieldForSelectedLmL(
+	                        TPositionFieldId  aFieldId,
+	                        HBufC& aFieldValue )
+	{
+	TPosLmItemId lmId = SelectedIdL();
+	TPtrC tmpPtr;
+
+	CPosLandmark* landmark = iDb.ReadLandmarkLC(lmId);
+	TInt retVal (-1);
+	if ( landmark->IsPositionFieldAvailable( aFieldId ) )
+		{
+		retVal = landmark->GetPositionField( aFieldId, tmpPtr );
+		}
+	if ( aFieldValue.Des().MaxLength() >= tmpPtr.Length() )
+    	{
+        aFieldValue.Des().Copy( tmpPtr );
+    	}
+	CleanupStack::PopAndDestroy( landmark );
+	return retVal;
+	}
+
+// -----------------------------------------------------------------------------
+// CLmkAppLmSelectorImpl::IsThisLandmarkFieldDefined
+// -----------------------------------------------------------------------------
+//
+TBool CLmkAppLmSelectorImpl::IsLmWithThisFieldExistL ( TLmkAppCmdId aCmdId )
+    {
+
+    TBool lmkFieldExist = EFalse;
+    TPositionFieldId lmkPostionField (0);
+
+    if ( aCmdId == ELmkCmdCall )
+        {
+        lmkPostionField = ELmkPositionFieldPhoneNumber;
+        }
+    if ( aCmdId == ELmkCmdGoToUrl )
+        {
+        lmkPostionField = ELmkPositionFieldWebAddress;
+        }
+
+    HBufC* lmkField =  HBufC::NewL( KMaxBufferLen );
+    CleanupStack::PushL( lmkField );
+
+    if ( (GetPositionFieldForSelectedLmL(
+							lmkPostionField,
+							*lmkField ) == KErrNone) &&
+							(lmkField->Des().Length() > 0) )
+        {
+        lmkFieldExist = ETrue;
+        }
+    CleanupStack::PopAndDestroy( lmkField );
+    return lmkFieldExist;
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkAppLmSelectorImpl::HandleLmCreated
+// -----------------------------------------------------------------------------
+//
+void CLmkAppLmSelectorImpl::HandleLmCreated(TPosLmItemId aNewLmkItemId)
+    {
+    iNewLmkItemId = aNewLmkItemId;
+    iNewListBoxItemAdded = ETrue;
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkAppLmSelectorImpl::RemoveLandmarksFromCategory
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CLmkAppLmSelectorImpl::RemoveLandmarksFromCategoryL()
+	{
+	if(iCriteria)
+		{
+		TPosLmItemId catId = iCriteria->CategoryItemId();
+		RArray<TPosLmItemId>& itemArray = MarkedItemIdsL();
+        LmItemListProvider().SetOperationCmd( ERemoveFromCat );
+		if (itemArray.Count() == 0)
+			{
+			TPosLmItemId id = SelectedIdL();
+			itemArray.AppendL(id);
+			}
+			// The 10 value is set as standard to remove the multiple landmarks and new procedure for operation
+		if( itemArray.Count() > 10)
+			{
+        	LmItemListProvider().RemoveItemsL(itemArray,
+        								MLmkAOOperationObserver::ERemoveCategory,
+        								catId);
+			return;
+			}
+		else
+			{
+			CPosLmCategoryManager* mgr = CPosLmCategoryManager::NewL( iDb );
+			CleanupStack::PushL(mgr);
+			CPosLmOperation* operation = mgr->RemoveCategoryFromLandmarksL(catId,itemArray);
+			CleanupStack::PopAndDestroy();//mgr
+			if (iOperation)
+				{
+				delete iOperation;
+				iOperation = NULL;
+				}
+			iOperation = CLmkAOOperation::NewL(operation,
+								*this,MLmkAOOperationObserver::ERemoveCategory,ETrue);
+			iOperation->StartOperation();
+			}
+		}
+	iCatRemoveFlag |= KRemoveOperationStarted;
+	iWaitNote = new (ELeave) CAknWaitDialog(NULL, ETrue);
+	if(!iWaitNote->ExecuteLD(R_LMK_PROCESSING_WAIT_NOTE))
+		{
+		if (iOperation)
+			{
+			delete iOperation;
+			iOperation = NULL;
+			}
+		iWaitNote = NULL;
+		}
+	iCatRemoveFlag &= ~KRemoveOperationStarted;
+	}
+
+
+// -----------------------------------------------------------------------------
+// CLmkAppLmSelectorImpl::IsCriteriaUnCategorizedCat
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TBool CLmkAppLmSelectorImpl::IsCriteriaUnCategorizedCat()
+	{
+	TBool result = EFalse;
+	if (iCriteria && iCriteria->CategoryItemId() == KPosLmNullItemId)
+		{
+		result = ETrue;
+		}
+	return result;
+	}
+
+// -----------------------------------------------------------------------------
+// CLmkAppLmSelectorImpl::ServiceCmdByMenuCmd
+// -----------------------------------------------------------------------------
+//
+TInt CLmkAppLmSelectorImpl::ServiceCmdByMenuCmd( TInt aMenuCmd )
+	{
+	return iLmkCallCmd->ServiceCmdByMenuCmd( aMenuCmd );
+	}
+
+// -----------------------------------------------------------------------------
+// CLmkAppLmSelectorImpl::CloseWaitNoteL
+// -----------------------------------------------------------------------------
+//
+void CLmkAppLmSelectorImpl::CloseWaitNoteL()
+	{
+	iWaitNote->ProcessFinishedL();
+    iWaitNote = NULL;
+	if (iOperation)
+		{
+		delete iOperation;
+		iOperation = NULL;
+		}
+	}
+
+//  End of File
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/uicontrols/src/CLmkAppSelectorImplBase.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,590 @@
+/*
+* Copyright (c) 2002-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 base class for Selector implementation
+*
+*/
+
+
+
+// INCLUDE FILES
+#include <avkon.mbg>
+#include <AknsConstants.h>
+#include <aknlists.h>
+#include <eikclbd.h>
+#include <AknIconArray.h>
+#include <StringLoader.h>
+#include <landmarks.rsg>
+#include <aknsfld.h>
+#include <aknlayout.cdl.h>
+#include "LmkConsts.h"
+#include "CLmkSelectorIconMgr.h"
+#include "MLmkListMemento.h"
+#include "CLmkUiUtils.h"
+#include "CLmkSingleGraphicLBModel.h"
+#include "CLmkDoubleGraphicLBModel.h"
+#include "CLmkAppSelectorImplBase.h"
+#include "MLmkMskObserver.h"
+#include "CLmkLmItemListProvider.h"
+#include <lmkerrors.h>
+
+#include <lmkui.rsg>
+
+
+const TInt KTextLimit( 40 );
+_LIT(KFetchingData, " ");
+#if defined(_DEBUG)
+// CONSTANTS
+/// Unnamed namespace for local definitions
+namespace {
+
+_LIT( KPanicMsg, "CLmkAppSelectorImplBase" );
+
+void Panic( TPanicCode aReason )
+    {
+    User::Panic( KPanicMsg, aReason );
+    }
+}  // namespace
+
+#endif
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CLmkAppSelectorImplBase::CLmkAppSelectorImplBase
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+CLmkAppSelectorImplBase::CLmkAppSelectorImplBase(
+    CPosLandmarkDatabase& aDb,
+    TBool aFindBox )
+    : CLmkSelectorImplBase( aDb ),
+      iFindBox( aFindBox )
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkAppSelectorImplBase::BaseConstructL
+// Symbian 2nd phase constructor can leave.
+// -----------------------------------------------------------------------------
+//
+void CLmkAppSelectorImplBase::BaseConstructL()
+    {
+    CLmkSelectorImplBase::BaseConstructL();
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkAppSelectorImplBase::~CLmkAppSelectorImplBase
+// -----------------------------------------------------------------------------
+//
+CLmkAppSelectorImplBase::~CLmkAppSelectorImplBase()
+    {
+    delete iListBox;
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkAppSelectorImplBase::StoreMemento
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CLmkAppSelectorImplBase::StoreMemento()
+    {
+    __ASSERT_DEBUG( iListBox && iListProvider, Panic( KLmkPanicNullMember ) );
+    Store( *iListBox, *iListProvider, iFindBox );
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkAppSelectorImplBase::RestoreMemento
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CLmkAppSelectorImplBase::RestoreMemento()
+    {
+    __ASSERT_DEBUG( iListBox && iListProvider, Panic( KLmkPanicNullMember ) );
+    Restore( *iListBox, *iListProvider, iFindBox );
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkAppSelectorImplBase::ListVisibleItemCount
+// -----------------------------------------------------------------------------
+//
+TInt CLmkAppSelectorImplBase::ListVisibleItemCount()
+    {
+    __ASSERT_DEBUG( iListBox, Panic( KLmkPanicNullMember ) );
+    return iListBox->Model()->NumberOfItems();
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkAppSelectorImplBase::ListMarkedItemCountL
+// -----------------------------------------------------------------------------
+//
+TInt CLmkAppSelectorImplBase::ListMarkedItemCountL()
+    {
+    __ASSERT_DEBUG( iListBox, Panic( KLmkPanicNullMember ) );
+    const CArrayFix<TInt>* markedIndexes = NULL;
+    if ( iFindBox )
+        {
+        CAknFilteredTextListBoxModel* model =
+            static_cast<CAknFilteredTextListBoxModel*>( iListBox->Model() );
+        model->Filter()->UpdateSelectionIndexesL();
+        markedIndexes = model->Filter()->SelectionIndexes();
+        }
+    else
+        {
+        markedIndexes = iListBox->SelectionIndexes();
+        }
+    return markedIndexes->Count();
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkAppSelectorImplBase::CreateListBoxL
+// -----------------------------------------------------------------------------
+//
+CEikTextListBox& CLmkAppSelectorImplBase::CreateListBoxL(
+    CCoeControl* aParent,
+    TInt aControlType,
+    TInt aFlags,
+    TInt aEmptyLBPrimResource,TInt aEmptyLBSecResource )
+    {
+    if ( iListBox )
+        {
+        delete iListBox;
+        iListBox = NULL;
+        }
+
+    // For maintaining empty listbox resource
+    iEmptyLBPrimResource = aEmptyLBPrimResource;
+    iEmptyLBSecResource = aEmptyLBSecResource;
+
+    TBool isFormattedCellListBox = EFalse;
+    switch ( aControlType )
+        {
+        case EAknCtSingleGraphicListBox:
+            {
+            iListBox = new( ELeave ) CAknSingleGraphicStyleListBox;
+            break;
+            }
+        case EAknCtDoubleGraphicListBox:
+            {
+            iListBox = new( ELeave ) CAknDoubleGraphicStyleListBox;
+            isFormattedCellListBox = ETrue;
+            break;
+            }
+        default:
+            {
+            User::Leave( KErrNotSupported );
+            break;
+            }
+        }
+
+    iListBox->SetMopParent(aParent);
+    iListBox->SetParent(aParent);
+    iListBox->ConstructL( aParent, aFlags );
+
+	HBufC* textForFetchingData;
+	textForFetchingData = HBufC::NewL(20);
+	CleanupStack::PushL(textForFetchingData);  // textForFetchingData
+	*textForFetchingData = KFetchingData;
+    iListBox->View()->SetListEmptyTextL( *textForFetchingData);
+    CleanupStack::PopAndDestroy();  // textForFetchingData.
+
+    // create icon array & icons
+    CAknIconArray* icons = SetupIconMgrLC();
+	TFileName* iconFile = CLmkUiUtils::AvkonIconFileLC();
+    iIconMgr->SetIconAtIndexZeroL( *iconFile,
+                                   KAknsIIDQgnIndiMarkedAdd,
+                                   EMbmAvkonQgn_indi_marked_add,
+                                   EMbmAvkonQgn_indi_marked_add_mask );
+
+    if ( isFormattedCellListBox )
+	    {
+	    ( static_cast<CEikFormattedCellListBox*>( iListBox ) )
+            ->ItemDrawer()->FormattedCellData()->SetIconArray( icons );
+         ((CEikFormattedCellListBox*)iListBox)->ItemDrawer()->FormattedCellData()
+		            ->EnableMarqueeL( ETrue );
+	    }
+    else
+	    {
+	    ( static_cast<CEikColumnListBox*>( iListBox ) )
+            ->ItemDrawer()->ColumnData()->SetIconArray( icons );
+          ((CEikColumnListBox*)iListBox)->ItemDrawer()->ColumnData()->EnableMarqueeL( ETrue );
+	    }
+	CleanupStack::PopAndDestroy(); // iconFile
+    CleanupStack::Pop( icons ); // ownership was transferred
+
+    // create listbox model for listbox
+    CreateListBoxModelL( *iListBox, aControlType, *iListProvider );
+    return *iListBox;
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkAppSelectorImplBase::HandleListProviderEvent
+// -----------------------------------------------------------------------------
+//
+void CLmkAppSelectorImplBase::HandleListProviderEvent(
+    TLmkListProviderEventType aEvent )
+    {
+    if( !iListBox )
+        return;
+    
+    if ( aEvent == ELmkEventItemAdditionComplete )
+    	{
+        TRAPD( error, iListBox->HandleItemAdditionL() );
+        if ( error != KErrNone )
+            {
+            iListBox->Reset();
+            iListBox->DrawNow();
+            }
+    	return;
+    	}
+    if ( aEvent == ELmkEventListReady || aEvent == ELmkEventFindListReady )
+        {
+        TBool handled( EFalse );
+        TRAPD( error, handled = HandleEventListReadyL() );
+        if ( !handled || error != KErrNone )
+            {
+            //CLmkLmItemListProvider& lstpr = static_cast<CLmkLmItemListProvider&>( *iListProvider );
+            //TInt currentItemIndex = lstpr.SelectedIndex(iNewLmkItemId);	    //iListBox->CurrentItemIndex();
+            TInt currentItemIndex = iListBox->CurrentItemIndex();
+            TRAP( error, iListBox->HandleItemAdditionL() );
+			if( currentItemIndex >= 0 && currentItemIndex < iListBox->Model()->NumberOfItems() )
+				iListBox->SetCurrentItemIndex(currentItemIndex);
+            if ( error != KErrNone )
+                {
+                iListBox->DrawNow();
+                }
+            }
+        }
+
+    TInt count = static_cast<CTextListBoxModel*>(iListBox->Model())->ItemTextArray()->MdcaCount();
+    if( count == 0 )
+        {
+        TRAPD( error, MakeEmptyTextListBoxL( *iListBox, iEmptyLBPrimResource,iEmptyLBSecResource ));
+        if( error != KErrNone )
+            {
+            return;
+            }
+        }
+
+    //Enable Find box only if at least one item is there in the list box
+	if( count )
+		{
+		if( aEvent != ELmkEventFindListReady )
+			{
+			TRAP_IGNORE( ShowFindBoxL( ETrue ) );
+			}
+		CLmkSelectorImplBase::HandleListProviderEvent( aEvent );
+		}
+    else
+	    {
+	    if ( aEvent == ELmkEventFindListReady )
+		    {
+		    TRAPD( error, MakeEmptyTextListBoxL( *iListBox, iEmptyLBPrimResource,iEmptyLBSecResource, ETrue ));
+		    if( error != KErrNone )
+		    	{
+		        return;
+		        }
+		    }
+		else
+			{
+	        TRAPD( error, MakeEmptyTextListBoxL( *iListBox, iEmptyLBPrimResource,iEmptyLBSecResource ));
+	        if( error != KErrNone )
+	            {
+	            return;
+	            }
+			TRAP_IGNORE( ShowFindBoxL( EFalse ) );
+			}
+	    }
+	if(iMskObserver)
+		{
+		TRAP_IGNORE(iMskObserver->UpdateMskContainerL());
+		}
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkAppSelectorImplBase::HandleListProviderError
+// -----------------------------------------------------------------------------
+//
+void CLmkAppSelectorImplBase::HandleListProviderError( TInt /*aError*/ )
+    {
+    if ( iListBox )
+        {
+        iListBox->Reset();
+        TRAPD( error, iListBox->HandleItemAdditionL() );
+        if ( error != KErrNone )
+            {
+            iListBox->DrawNow();
+            }
+        }
+    }
+
+// ----------------------------------------------------
+// CLmkAppSelectorImplBase::MakeEmptyTextListBoxL
+// ----------------------------------------------------
+//
+ void CLmkAppSelectorImplBase::MakeEmptyTextListBoxL(
+    CEikTextListBox& aListBox,
+    TInt aResourcePrimText ,TInt aResourceSecText, TBool aRequestFromFindBox ) const
+    {
+    _LIT( KNChar,"\n" );
+
+    if (aRequestFromFindBox)
+	    {
+	    HBufC* text1 = StringLoader::LoadLC( R_LMK_EMPTY_NO_MATCH, const_cast<CEikonEnv *>( iEnv ));
+		TPtr ptr1 = text1->Des();
+		aListBox.View()->SetListEmptyTextL( ptr1 );
+		CleanupStack::PopAndDestroy(text1);
+	    }
+    else
+	    {
+		HBufC* text1 = StringLoader::LoadLC( aResourcePrimText, const_cast<CEikonEnv *>( iEnv ));
+		HBufC* text2 = StringLoader::LoadLC( aResourceSecText, const_cast<CEikonEnv *>( iEnv ));
+
+		TPtr ptr1 = text1->Des();
+		TPtr ptr2 = text2->Des();
+
+		HBufC* buffer = HBufC::NewLC(text1->Length() + text2->Length() + 2);
+		TPtr textFromResourceFile = buffer->Des();
+    	textFromResourceFile.Copy(ptr1);
+    	textFromResourceFile.Append(KNChar);
+    	textFromResourceFile.Append(ptr2);
+
+ 		aListBox.View()->SetListEmptyTextL( textFromResourceFile );
+		CleanupStack::PopAndDestroy(3);//buffer,text2,text1
+	    }
+    }
+
+// ----------------------------------------------------
+// CLmkAppSelectorImplBase::CreateListBoxModelL
+// ----------------------------------------------------
+//
+void CLmkAppSelectorImplBase::CreateListBoxModelL(
+    CEikTextListBox& aListBox,
+    TInt aControlType,
+    CLmkListProviderBase& aProvider ) const
+    {
+    CLmkSelectorLBModelBase* lbModel = NULL;
+    // create listbox model, pass ownership
+    switch( aControlType )
+        {
+        case EAknCtSingleGraphicListBox:
+            {
+            lbModel = CLmkSingleGraphicLBModel::NewL( aProvider );
+            break;
+            }
+        case EAknCtDoubleGraphicListBox:
+            {
+            lbModel = CLmkDoubleGraphicLBModel::NewL( aProvider );
+            break;
+            }
+        default:
+            {
+            User::Leave( KErrNotSupported );
+            break;
+            }
+        }
+    aListBox.Model()->SetItemTextArray( lbModel );
+    aListBox.Model()->SetOwnershipType( ELbmOwnsItemArray );
+    }
+
+// ----------------------------------------------------
+// CLmkAppSelectorImplBase::HandleEventListReadyL()
+// ----------------------------------------------------
+//
+TBool CLmkAppSelectorImplBase::HandleEventListReadyL()
+    {
+    // default implementation
+    return EFalse;
+    }
+
+// ----------------------------------------------------
+// CLmkAppSelectorImplBase::CreateFindBoxL()
+// ----------------------------------------------------
+//
+EXPORT_C CAknSearchField* CLmkAppSelectorImplBase::CreateFindBoxL(
+                                            const CCoeControl &aParent)
+	{
+	CAknFilteredTextListBoxModel* model =
+	static_cast<CAknFilteredTextListBoxModel*> ( iListBox->Model() );
+	iSearchBox =
+	CAknSearchField::NewL( aParent, CAknSearchField::ESearch, NULL, KTextLimit );
+
+	// Creates CAknListBoxFilterItems object.
+	model->CreateFilterL( iListBox, iSearchBox );
+
+#ifdef RD_SCALABLE_UI_V2
+	iFilter = model->Filter();
+	iSearchBox->SetObserver(this);
+#endif// RD_SCALABLE_UI_V2
+	iSearchBox->SetFocus( EFalse );
+	iSearchBox->MakeVisible( EFalse );     //by defult disable the find box
+	return iSearchBox;
+	}
+
+// ----------------------------------------------------
+// CLmkAppSelectorImplBase::ShowFindBoxL()
+// ----------------------------------------------------
+//
+void CLmkAppSelectorImplBase::ShowFindBoxL( TBool aVisible )
+	{
+	const TRect rect(iListBox->Parent()->Rect());
+	if (iSearchBox)
+		{
+	//	iSearchBox->ResetL();
+		iSearchBox->SetFocus(aVisible);
+		iSearchBox->MakeVisible(aVisible);
+		static_cast<CAknColumnListBoxView*>
+		(iListBox->View())->SetFindEmptyListState(aVisible);
+
+		if (aVisible && iListBox && iSearchBox)
+			{
+			AknLayoutUtils::LayoutControl(iListBox, rect,
+			AKN_LAYOUT_WINDOW_list_gen_pane(1));
+			AknLayoutUtils::LayoutControl(iSearchBox, rect,
+			AKN_LAYOUT_WINDOW_find_pane);
+			if (iSearchBox->IsVisible() && iListBox->IsVisible())
+				{
+				// The correct line position to use is 2, which corresponds
+				// EABColumn in Avkon (not a public enumeration,
+				// hence hard-coding used here)
+				const TInt KSeparatorLinePos = 2;
+				iSearchBox->SetLinePos(KSeparatorLinePos);
+				}
+			}
+		else if (iListBox)
+			{
+			AknLayoutUtils::LayoutControl(iListBox, rect,
+			AKN_LAYOUT_WINDOW_list_gen_pane(0));
+			}
+		iSearchBox->DrawDeferred();
+		}
+
+	if ( !aVisible )
+		{
+		iListBox->SetRect(rect);
+		iListBox->DrawDeferred();
+		}
+	}
+// ----------------------------------------------------
+// CLmkAppSelectorImplBase::HandleScreenSizeChange()
+// ----------------------------------------------------
+//
+void CLmkAppSelectorImplBase::HandleScreenSizeChange()
+    {
+    // Dummy implementation in base class.
+	}
+
+// ----------------------------------------------------
+// CLmkAppLmSelectorImpl::AttachToAIWMenuL()
+// ----------------------------------------------------
+//
+void CLmkAppSelectorImplBase::AttachToAIWMenuL(
+		TInt /*aMenuResourceId*/,
+		TInt /*aInterestResourceId*/)
+	{
+	 // Dummy function
+	}
+
+// ----------------------------------------------------
+// CLmkAppSelectorImplBase::AttachInterestL()
+// ----------------------------------------------------
+//
+void CLmkAppSelectorImplBase::AttachInterestL (
+		TInt /*aInterestResourceId*/)
+	{
+	// Dummy function
+	}
+
+
+// ----------------------------------------------------
+// CLmkAppLmSelectorImpl::InitializeMenuPaneL()
+// ----------------------------------------------------
+//
+void CLmkAppSelectorImplBase::InitializeMenuPaneL(
+		CEikMenuPane& /*aMenuPane */,
+		TInt /* aMenuResourceId */)
+	{
+	// Dummy function
+	}
+
+// -----------------------------------------------------------------------------
+// CLmkAppLmSelectorImpl::ExecuteAIWCallCmdL()
+// -----------------------------------------------------------------------------
+//
+void CLmkAppSelectorImplBase::ExecuteAIWCallCmdL(
+		 TInt /*aCommandId*/ )
+	{
+	// Dummy function
+	}
+
+// -----------------------------------------------------------------------------
+// CLmkAppLmSelectorImpl::IsThisLandmarkFieldDefined
+// -----------------------------------------------------------------------------
+//
+TBool CLmkAppSelectorImplBase::IsLmWithThisFieldExistL ( TLmkAppCmdId  /*aFieldId*/)
+    {
+    // Dummy function
+    return EFalse;
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkAppLmSelectorImpl::MarkedIndexes
+// -----------------------------------------------------------------------------
+//
+EXPORT_C const CArrayFix<TInt>* CLmkAppSelectorImplBase::MarkedIndexes()
+    {
+      const CArrayFix<TInt>* markedIndexes = NULL;
+      markedIndexes = iListBox->SelectionIndexes();
+      return markedIndexes;
+    }
+// -----------------------------------------------------------------------------
+// CLmkAppLmSelectorImpl::CurrentItemIndex
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TInt CLmkAppSelectorImplBase::CurrentItemIndex()
+	{
+	return iListBox->CurrentItemIndex();
+	}
+// -----------------------------------------------------------------------------
+// CLmkAppLmSelectorImpl::SetMskObserver
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CLmkAppSelectorImplBase::SetMskObserver(MLmkMskObserver* aMskObserver)
+	{
+	iMskObserver = aMskObserver;
+	}
+
+// -----------------------------------------------------------------------------
+// CLmkAppSelectorImplBase::ServiceCmdByMenuCmd
+// -----------------------------------------------------------------------------
+//
+TInt CLmkAppSelectorImplBase::ServiceCmdByMenuCmd( TInt /*aMenuCmd*/ )
+	{
+	//dummy function
+	return 0;
+	}
+
+CAknSearchField* CLmkAppSelectorImplBase::FindBox()
+	{
+	return iSearchBox;
+	}
+
+#ifdef RD_SCALABLE_UI_V2
+void CLmkAppSelectorImplBase::HandleControlEventL( CCoeControl* aControl,TCoeEvent aEventType )
+	{
+	//Update the listbox a sper the search criteria
+	if (iFilter)
+		{
+		iFilter->HandleControlEventL(aControl, aEventType);
+		}
+	}
+#endif //RD_SCALABLE_UI_V2
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/uicontrols/src/CLmkCallCmd.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,203 @@
+/*
+* 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:   This file contains methods which implements methods for
+*                interfacing with call UI component for making a phonecall
+*
+*/
+
+
+
+
+
+
+// INCLUDE FILES
+#include <AiwServiceHandler.h>      // AIW
+#include <AiwCommon.hrh>          // AIW
+#include <CPhCltEmergencyCall.h>
+#include "landmarks.hrh"            // AIW
+#include <coemain.h>
+#include "clmkcallcmd.h"
+#include <aiwdialdata.h>
+
+//============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+//  CLmkCallCmd::CLmkCallCmd
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+CLmkCallCmd::CLmkCallCmd()
+	{
+	}
+
+// ----------------------------------------------------
+//  CLmkCallCmd::ConstructL()
+// ----------------------------------------------------
+//
+void CLmkCallCmd::ConstructL( )
+	{
+	iAiwCallServiceHandler = CAiwServiceHandler::NewL();
+	iEmergencyCall = CPhCltEmergencyCall::NewL(this);
+	}
+
+// -----------------------------------------------------------------------------
+// CLmkCallCmd::NewL
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CLmkCallCmd* CLmkCallCmd::NewL()
+	{
+	CLmkCallCmd* self =
+	    new( ELeave ) CLmkCallCmd;
+	CleanupStack::PushL( self );
+	self->ConstructL();
+	CleanupStack::Pop();
+	return self;
+	}
+
+// ----------------------------------------------------
+// CLmkCallCmd::~CLmkCallCmd()
+// ----------------------------------------------------
+//
+CLmkCallCmd::~CLmkCallCmd()
+	{
+	delete iAiwCallServiceHandler;
+	delete iEmergencyCall;
+	}
+
+// ----------------------------------------------------
+// CLmkCallCmd::AttachMenuPaneL()
+// ----------------------------------------------------
+//
+void CLmkCallCmd::AttachMenuPaneL(TInt aMenuResourceId, TInt aInterestResourceId)
+	{
+	// Attach the wanted menu with wanted interest to AIW.
+	iAiwCallServiceHandler->AttachMenuL( aMenuResourceId, aInterestResourceId );
+	}
+
+// ----------------------------------------------------
+// CLmkCallCmd::AttachInterestL()
+// ----------------------------------------------------
+//
+void CLmkCallCmd::AttachInterestL ( RCriteriaArray& aInterestId )
+	{
+	// For using non-menu services
+	iAiwCallServiceHandler->AttachL( aInterestId );
+	}
+
+// ----------------------------------------------------
+// CLmkCallCmd::AttachInterestL()
+// ----------------------------------------------------
+//
+void CLmkCallCmd::AttachInterestL ( TInt aInterestId )
+	{
+	// For using non-menu services
+	iAiwCallServiceHandler->AttachL( aInterestId );
+	}
+// CLmkCallCmd::InitializeMenuPaneL()
+// ----------------------------------------------------
+//
+void CLmkCallCmd::InitializeMenuPaneL(
+		CEikMenuPane& aMenuPane,
+		TInt aMenuResourceId,
+		TInt aBaseMenuCmdId)
+	{
+	//AIW service menu initialization
+	iAiwCallServiceHandler->InitializeMenuPaneL(
+					aMenuPane,
+					aMenuResourceId,
+					aBaseMenuCmdId, // Must not overlap with the other menu ids!
+					iAiwCallServiceHandler->InParamListL() );
+	}
+
+// -----------------------------------------------------------------------------
+// CLmkCallCmd::ExecuteAIWCallCmdL()
+// -----------------------------------------------------------------------------
+//
+void CLmkCallCmd::ExecuteAIWCallCmdL( TInt aCommandId, TDesC& aPhoneNum )
+	{
+	//first give a chance to emergency call
+	if(!HandleEmergencyCallL(aPhoneNum))
+		{
+		//number is not an emergency number, call normal.
+		HandleNormalCallL( aCommandId,aPhoneNum );
+		}
+	}
+// ----------------------------------------------------------------------------
+// CLmkCallCmd::HandleEmergencyDialL
+// ----------------------------------------------------------------------------
+//
+void CLmkCallCmd::HandleEmergencyDialL( const TInt /*aStatus */)
+    {
+    // TODO: Show some note to user if there is error?
+    // belongs to MPhCltEmergencyCallObserver interface
+    }
+// -----------------------------------------------------------------------------
+// CLmkCallCmd::HandleEmergencyCall
+// -----------------------------------------------------------------------------
+//
+TBool CLmkCallCmd::HandleEmergencyCallL( TDesC& aPhoneNum )
+	{
+	TBool isEmerNum = EFalse;
+	iEmergencyCall->IsEmergencyPhoneNumber(aPhoneNum,isEmerNum);
+	if( isEmerNum)
+		{
+		iEmergencyCall->DialEmergencyCallL(aPhoneNum);
+		}
+	return isEmerNum;
+	}
+// -----------------------------------------------------------------------------
+// CLmkCallCmd::HandleNormalCall
+// -----------------------------------------------------------------------------
+//
+void CLmkCallCmd::HandleNormalCallL( TInt aCommandId, TDesC& aPhoneNum )
+	{
+		// Set basic dial data
+	CAiwDialData* dialData = CAiwDialData::NewLC();
+	dialData->SetPhoneNumberL( aPhoneNum );
+	dialData->SetWindowGroup( AIWDialData::KAiwGoToIdle );
+	CAiwGenericParamList& paramList = iAiwCallServiceHandler->InParamListL();
+	dialData->FillInParamListL( paramList );
+	CleanupStack::PopAndDestroy();
+
+	if ( ELmkCmdCall == aCommandId )
+		{// invoked from 'sendkey'
+		iAiwCallServiceHandler->ExecuteServiceCmdL(
+            KAiwCmdCall,
+            paramList,
+            iAiwCallServiceHandler->OutParamListL(),
+            0,
+            NULL );
+		}
+	else // invoked from 'menu'
+		{
+		iAiwCallServiceHandler->ExecuteMenuCmdL(
+			aCommandId,
+			paramList,
+			iAiwCallServiceHandler->OutParamListL(),
+			0, 		// No options used.
+			NULL);  // No need for callback
+		}
+	}
+
+// -----------------------------------------------------------------------------
+// CLmkCallCmd::ServiceCmdByMenuCmd
+// -----------------------------------------------------------------------------
+//
+TInt CLmkCallCmd::ServiceCmdByMenuCmd( TInt aMenuCmd )
+	{
+	return iAiwCallServiceHandler->ServiceCmdByMenuCmd( aMenuCmd );
+	}
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/uicontrols/src/CLmkCoordinateEditor.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,396 @@
+/*
+* 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:    LandmarksUi Content File -
+*
+*/
+
+
+
+
+
+
+
+
+// INCLUDE FILES
+#include <e32math.h>
+#include <stringloader.h>
+#include <eikenv.h>
+#include <AknUtils.h>
+
+#include <LmkUi.rsg>
+#include "LmkConsts.h"
+#include "landmarks.hrh"
+#include "CLmkMfneSeparator.h"
+#include "CLmkCoordinateEditor.h"
+#include <AknBidiTextUtils.h>
+
+// CONSTANTS
+/// Unnamed namespace for local definitions
+namespace {
+
+const TInt KKeyToMatchEmptyCardinal = 0;
+
+const TInt KKeyToMatchNorth = 78;
+const TInt KKeyToMatchSouth = 83;
+const TInt KKeyToMatchWest = 87;
+const TInt KKeyToMatchEast = 69;
+
+const TInt KNumFields = 3; // value, degree, cardinal
+
+const TInt KLatitudeMaxLength = 7; // DD.DDDD
+const TInt KLatitudeMaxDecimals = 4;
+const TInt KLongitudeMaxLength = 8; // DDD.DDDD
+const TInt KLongitudeMaxDecimals = 4;
+
+const TReal KLatitudeMaxLimit = 90;
+const TReal KLongitudeMaxLimit = 180;
+
+const TInt KNumCardinalSymbols = 3; // NS / WE + empty
+
+_LIT(KEmptyDegreeMark, "");
+
+#if defined(_DEBUG)
+/// Panic codes for CLmkCoordinateEditor
+enum TPanicCode
+    {
+	EPanicUnknownEditorType
+    };
+
+void Panic(TPanicCode aReason)
+    {
+    _LIT(KPanicText, "CLmkCoordinateEditor");
+    User::Panic(KPanicText, aReason);
+    }
+#endif  // _DEBUG
+
+}  // namespace
+
+// ============================ MEMBER FUNCTIONS ==============================
+
+// ----------------------------------------------------------------------------
+// CLmkCoordinateEditor::CLmkCoordinateEditor
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// ----------------------------------------------------------------------------
+//
+CLmkCoordinateEditor::CLmkCoordinateEditor()
+    {
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkCoordinateEditor::~CLmkCoordinateEditor
+// ----------------------------------------------------------------------------
+//
+CLmkCoordinateEditor::~CLmkCoordinateEditor()
+    {
+    delete iDegreeMark;
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkCoordinateEditor::ConstructL
+// Symbian 2nd phase constructor can leave.
+// ----------------------------------------------------------------------------
+//
+void CLmkCoordinateEditor::ConstructL(
+    TReal aInitialValue,
+    CLmkCoordinateEditor::TEditorType aType)
+    {
+	iEditorType = aType;
+
+    TInt maxLength = 0, maxDecimals = 0;
+    TReal maxLimit = 0;
+    switch( iEditorType )
+        {
+        case ELatitudeEditor:
+            {
+            maxLength = KLatitudeMaxLength;
+            maxDecimals = KLatitudeMaxDecimals;
+            maxLimit = KLatitudeMaxLimit;
+            break;
+            }
+        case ELongitudeEditor:
+            {
+            maxLength = KLongitudeMaxLength;
+            maxDecimals = KLongitudeMaxDecimals;
+            maxLimit = KLongitudeMaxLimit;
+            break;
+            }
+        default:
+            {
+            __ASSERT_DEBUG(EFalse, Panic(EPanicUnknownEditorType));
+            break;
+            }
+        }
+
+    // create float field
+    BaseConstructL(KNumFields);
+
+    if (!AknLayoutUtils::LayoutMirrored())
+        {
+        ConstructValueFieldL(maxLength, maxDecimals);
+        ConstructDegreeMarkFieldL();
+        ConstructCardinalPointFieldL();
+        }
+    else
+        {
+        ConstructCardinalPointFieldL();
+        ConstructValueFieldL(maxLength, maxDecimals);
+        ConstructDegreeMarkFieldL();
+        }
+
+    SetCardinal(DefaultCardinal());
+    SetLimits(0, maxLimit);
+    SetNumber(aInitialValue);
+    ShowDegreeAndCardinal(!Math::IsNaN(aInitialValue));
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkCoordinateEditor::ConstructDegreeMarkFieldL
+// ----------------------------------------------------------------------------
+//
+void CLmkCoordinateEditor::ConstructDegreeMarkFieldL()
+    {
+    iDegreeMark = StringLoader::LoadL( R_LMK_DEGREE_MARK, iCoeEnv );
+    iDegreeField = CLmkMfneSeparator::NewL(iDegreeMark->Des());
+    AddField(iDegreeField);
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkCoordinateEditor::ConstructCardinalPointFieldL
+// ----------------------------------------------------------------------------
+//
+void CLmkCoordinateEditor::ConstructCardinalPointFieldL()
+    {
+    HBufC* text = NULL;
+    iCardinalField = CEikMfneSymbol::NewL(KNumCardinalSymbols);
+
+    // add empty cardinal
+    text = HBufC::NewLC(1);
+    iCardinalField->AddSymbolicItem(
+        CEikMfneSymbol::CItem::NewL(ECardinalNone, KKeyToMatchEmptyCardinal, text),
+        ETrue);
+    CleanupStack::Pop(text);
+
+    // read and add cardinals
+    if ( iEditorType == ELatitudeEditor  )
+        {
+        text = StringLoader::LoadLC(R_LMK_CARDINAL_POINT_N, iCoeEnv );
+        iCardinalField->AddSymbolicItem(
+            CEikMfneSymbol::CItem::NewL(ECardinalNorth, KKeyToMatchNorth, text),
+            EFalse);
+        CleanupStack::Pop(text);
+
+		text = StringLoader::LoadLC(R_LMK_CARDINAL_POINT_S, iCoeEnv );
+        iCardinalField->AddSymbolicItem(
+            CEikMfneSymbol::CItem::NewL(ECardinalSouth, KKeyToMatchSouth, text),
+            EFalse);
+        CleanupStack::Pop(text);
+        }
+    else
+        {
+		text = StringLoader::LoadLC(R_LMK_CARDINAL_POINT_E, iCoeEnv );
+        iCardinalField->AddSymbolicItem(
+            CEikMfneSymbol::CItem::NewL(ECardinalEast, KKeyToMatchEast, text),
+            EFalse);
+        CleanupStack::Pop(text);
+
+        text = StringLoader::LoadLC(R_LMK_CARDINAL_POINT_W, iCoeEnv );
+        iCardinalField->AddSymbolicItem(
+            CEikMfneSymbol::CItem::NewL(ECardinalWest, KKeyToMatchWest, text),
+            EFalse);
+        CleanupStack::Pop(text);
+        }
+
+    AddField(iCardinalField);
+    }
+
+// ----------------------------------------------------
+// CLmkCoordinateEditor::Number
+// ----------------------------------------------------
+//
+TReal CLmkCoordinateEditor::Number() const
+    {
+    TReal coord = CLmkFloatEditor::Number();
+    if (Math::IsNaN(coord))
+        {
+        return coord;
+        }
+
+    // South and West coordinates are negative
+    switch(Cardinal())
+        {
+        case ECardinalSouth:
+        case ECardinalWest:
+            {
+            coord = -coord;
+            break;
+            }
+        default:
+            break;
+        }
+
+    return coord;
+    }
+
+// ----------------------------------------------------
+// CLmkCoordinateEditor::SetNumber
+// ----------------------------------------------------
+//
+void CLmkCoordinateEditor::SetNumber(TReal aNumber)
+    {
+    if (!Math::IsNaN(aNumber))
+        {
+        // set cardinal point according to number sign
+        // zero belongs to positive cardinals
+        TCardinalPoint cardinalId = ECardinalNone;
+        if (iEditorType == ELatitudeEditor)
+            {
+            cardinalId = (aNumber >= 0) ? ECardinalNorth : ECardinalSouth;
+            }
+        else // ELongitudeEditor
+            {
+            cardinalId = (aNumber >= 0) ? ECardinalEast : ECardinalWest;
+            }
+        SetCardinal(cardinalId);
+		ShowDegreeAndCardinal(ETrue);
+        CLmkFloatEditor::SetNumber(Abs(aNumber));
+        }
+    else
+        {
+        ShowDegreeAndCardinal(EFalse);
+        CLmkFloatEditor::SetNumber(aNumber); // nan
+        }
+    }
+
+// ----------------------------------------------------
+// CLmkCoordinateEditor::SetCardinal
+// ----------------------------------------------------
+//
+void CLmkCoordinateEditor::SetCardinal(TCardinalPoint aCardinalId)
+    {
+    iCardinalField->SetCurrentSymbolicItemToId(aCardinalId);
+    CheckEastLongitude();
+    }
+
+// ----------------------------------------------------
+// CLmkCoordinateEditor::Cardinal
+// ----------------------------------------------------
+//
+CLmkCoordinateEditor::TCardinalPoint CLmkCoordinateEditor::Cardinal() const
+    {
+    return (TCardinalPoint) iCardinalField->IdOfCurrentSymbolicItem();
+    }
+
+// ----------------------------------------------------
+// CLmkCoordinateEditor::DefaultCardinal
+// ----------------------------------------------------
+//
+CLmkCoordinateEditor::TCardinalPoint CLmkCoordinateEditor::DefaultCardinal()
+    {
+    return (iEditorType == ELatitudeEditor) ? ECardinalNorth : ECardinalEast;
+    }
+
+// ----------------------------------------------------
+// CLmkCoordinateEditor::CheckEastLongitude
+// Abs(180) is allowed only for West
+// ----------------------------------------------------
+//
+void CLmkCoordinateEditor::CheckEastLongitude()
+    {
+    if (Cardinal() == ECardinalEast &&
+        CLmkFloatEditor::Number() == KLongitudeMaxLimit)
+        {
+        SetCardinal(ECardinalWest);
+        }
+    }
+
+// ----------------------------------------------------
+// CLmkCoordinateEditor::ShowDegreeAndCardinal
+// ----------------------------------------------------
+//
+void CLmkCoordinateEditor::ShowDegreeAndCardinal(TBool aVisible)
+    {
+    if (aVisible)
+        {
+        if (iDegreeField->Text() == KEmptyDegreeMark)
+            {
+            TInt err = KErrNone;
+            TRAP(err, iDegreeField->SetTextL(*iDegreeMark));
+            }
+
+        if (Cardinal() == ECardinalNone)
+            {
+            SetCardinal(DefaultCardinal());
+            }
+        }
+    else
+        {
+        TInt err = KErrNone;
+        TRAP(err, iDegreeField->SetTextL(KEmptyDegreeMark));
+        SetCardinal(ECardinalNone);
+        }
+    }
+
+// ----------------------------------------------------
+// CLmkCoordinateEditor::HandleEnter
+// ----------------------------------------------------
+//
+void CLmkCoordinateEditor::HandleEnter()
+    {
+    ShowDegreeAndCardinal(ETrue);
+    CLmkFloatEditor::HandleEnter();
+    }
+
+// ----------------------------------------------------
+// CLmkCoordinateEditor::HandleExit
+// ----------------------------------------------------
+//
+void CLmkCoordinateEditor::HandleExit()
+    {
+    ShowDegreeAndCardinal(!IsNan());
+    CLmkFloatEditor::HandleExit();
+    }
+
+// ----------------------------------------------------
+// CLmkCoordinateEditor::HandleValueChanged
+// ----------------------------------------------------
+//
+void CLmkCoordinateEditor::HandleValueChanged()
+    {
+    CheckEastLongitude();
+    CLmkFloatEditor::HandleValueChanged();
+    }
+
+// ----------------------------------------------------
+// CLmkCoordinateEditor::HandleCustomFieldChanged
+// ----------------------------------------------------
+//
+void CLmkCoordinateEditor::HandleCustomFieldChanged(TInt aFieldIndex)
+    {
+    if (Field(aFieldIndex) == iCardinalField)
+        {
+        if (Cardinal() == ECardinalNone)
+            {
+            // cycle from empty cardinal
+            SetCardinal(DefaultCardinal());
+            }
+        else
+            {
+            CheckEastLongitude();
+            }
+        }
+    CLmkFloatEditor::HandleCustomFieldChanged(aFieldIndex);
+    }
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/uicontrols/src/CLmkDecimalEditor.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,703 @@
+/*
+* 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:    LandmarksUi Content File -
+*
+*/
+
+
+
+
+
+
+
+
+// INCLUDE FILES
+#include <barsread.h>
+#include <eikenv.h>
+#include <NumberConversion.h>
+#include <AknUtils.h>
+#include <aknsoundsystem.h>
+#include <AknAppUi.h>
+#include <AknTextDecorationMetrics.h>
+#include <eikctl.rsg>
+#include <e32math.h>
+
+#include "CLmkDecimalEditor.h"
+
+
+_LIT(KMinus,"-");
+
+namespace EUtils
+	{
+	LOCAL_D TBool IsAnyDigit(TChar aCharacter)
+		{
+		return ( aCharacter.GetNumericValue() != KErrNotFound);
+		}
+	}
+
+
+// ---------------------------------------------------------
+// CLmkDecimalEditor::CLmkDecimalEditor
+// ---------------------------------------------------------
+//
+CLmkDecimalEditor::CLmkDecimalEditor(TInt aMinimumValue, TInt aMaximumValue, TUint32 aFlags)
+									:iMinimumValue(aMinimumValue),
+									 iMaximumValue(aMaximumValue),
+									 iFlags(aFlags),
+									 iDigitType(EDigitTypeWestern)
+	{
+	TBuf<16> minText;
+	minText.AppendNum(aMinimumValue);
+	TBuf<16> maxText;
+	maxText.AppendNum(aMaximumValue);
+	iMaxDigits=Max(minText.Length(),maxText.Length());
+
+	iMaxDigitsMinimumValue=minText.Length();
+	iMaxDigitsMaximumValue=maxText.Length();
+	iEnv = CEikonEnv::Static();
+	}
+
+// ---------------------------------------------------------
+// CLmkDecimalEditor::~CLmkDecimalEditor
+// ---------------------------------------------------------
+//
+CLmkDecimalEditor::~CLmkDecimalEditor()
+	{
+	delete iText;
+	}
+
+// ---------------------------------------------------------
+// CLmkDecimalEditor::NewL
+// ---------------------------------------------------------
+//
+CLmkDecimalEditor* CLmkDecimalEditor::NewL(const CFont& aFont, TResourceReader& aResourceReader)
+	{
+	TInt minimumValue=aResourceReader.ReadInt32();
+	TInt maximumValue=aResourceReader.ReadInt32();
+	TUint32 flags=aResourceReader.ReadUint8();
+	return NewL(aFont, minimumValue, maximumValue, maximumValue, flags, 0);
+	}
+
+// ---------------------------------------------------------
+// CLmkDecimalEditor::NewL
+// ---------------------------------------------------------
+//
+CLmkDecimalEditor* CLmkDecimalEditor::NewL(const CFont& aFont, TInt aMinimumValue, TInt aMaximumValue, TInt aInitialValue, TUint32 aFlags, TInt aNumberOfZeros)
+	{
+	CLmkDecimalEditor* number=new(ELeave) CLmkDecimalEditor(aMinimumValue, aMaximumValue, aFlags);
+	CleanupStack::PushL(number);
+	number->iText=HBufC::NewL(number->MaximumNumberOfDigits()+((aMinimumValue<0)? 1: 0));
+	number->ConstructL(aNumberOfZeros);
+	number->SetValue(aInitialValue, aFont);
+	CleanupStack::Pop();
+	return number;
+	}
+
+// ---------------------------------------------------------
+// CLmkDecimalEditor::InvalidFieldAlert
+// ---------------------------------------------------------
+//
+void CLmkDecimalEditor::InvalidFieldAlert() const
+	{
+    CAknKeySoundSystem* soundPlayer = (static_cast<CAknAppUi*>(iEnv->AppUi()))->KeySounds();
+    if(soundPlayer)
+        {
+        soundPlayer->PlaySound(EAvkonSIDWarningTone);
+        }
+    }
+
+// ---------------------------------------------------------
+// CLmkDecimalEditor::AdditionalWidthForHighlights
+// ---------------------------------------------------------
+//
+TInt CLmkDecimalEditor::AdditionalWidthForHighlights(const CFont& aFont) const
+    {
+    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 addedWidth;
+    }
+
+// ---------------------------------------------------------
+// CLmkDecimalEditor::WidthInPixels
+// ---------------------------------------------------------
+//
+TInt CLmkDecimalEditor::WidthInPixels(const CFont& aFont) const
+	{
+	return Max( iMinimumWidthInPixels, aFont.TextWidthInPixels(Text()) + AdditionalWidthForHighlights(aFont) );
+	}
+
+// ---------------------------------------------------------
+// CLmkDecimalEditor::ConstructL
+// ---------------------------------------------------------
+//
+void CLmkDecimalEditor::ConstructL(TInt aNumberOfZeros)
+	{
+	iNudgeCharMinus=iEnv->NudgeCharMinus();
+	iNudgeCharPlus=iEnv->NudgeCharPlus();
+	iNumberOfZeros = aNumberOfZeros;
+	}
+
+// ---------------------------------------------------------
+// CLmkDecimalEditor::SetMinimumAndMaximum
+// ---------------------------------------------------------
+//
+void CLmkDecimalEditor::SetMinimumAndMaximum(TInt aMinimumValue, TInt aMaximumValue, const CFont& aFont)
+	{
+	TBuf<16> minText;
+	minText.AppendNum(aMinimumValue);
+	TBuf<16> maxText;
+	maxText.AppendNum(aMaximumValue);
+	TInt minTextLength=minText.Length();
+	TInt maxTextLength=maxText.Length();
+	iMinimumValue=aMinimumValue;
+	iMaximumValue=aMaximumValue;
+	TInt value=ValueFromText();
+	if (value<aMinimumValue||!NumberOfDigits())
+		SetTextToValue(aMinimumValue, aFont);
+	else if (value>aMaximumValue)
+		SetTextToValue(aMaximumValue, aFont);
+	}
+
+// ---------------------------------------------------------
+// CLmkDecimalEditor::GetMinimumAndMaximum
+// ---------------------------------------------------------
+//
+void CLmkDecimalEditor::GetMinimumAndMaximum(TInt& aMinimumValue, TInt& aMaximumValue) const
+	{
+	aMinimumValue=iMinimumValue;
+	aMaximumValue=iMaximumValue;
+	}
+
+// ---------------------------------------------------------
+// CLmkDecimalEditor::SetValue
+// ---------------------------------------------------------
+//
+void CLmkDecimalEditor::SetValue(TInt aValue, const CFont& aFont)
+	{
+	SetTextToValue(aValue, aFont);
+	}
+
+// ---------------------------------------------------------
+// CLmkDecimalEditor::Value
+// ---------------------------------------------------------
+//
+TReal CLmkDecimalEditor::Value() const
+	{
+	TInt numberOfDigits = NumberOfDigits();
+	TReal retVal(0);
+	TReal temp(0);
+
+    if (numberOfDigits == 0)
+        {
+        InvalidFieldAlert();
+        }
+
+    TInt value = ValueFromText();
+    if (value < iMinimumValue)
+        {
+		InvalidFieldAlert();
+	    iEnv->LeaveWithInfoMsg(R_EIK_TBUF_NUMBER_BELOW_MIN, iMinimumValue);
+        }
+    if (value > iMaximumValue)
+		{
+	    iEnv->LeaveWithInfoMsg(R_EIK_TBUF_NUMBER_ABOVE_MAX, iMaximumValue);
+        }
+    Math::Pow10(temp, numberOfDigits * (-1));
+    retVal = value * temp;
+    return retVal;
+	}
+
+// ---------------------------------------------------------
+// CLmkDecimalEditor::IsValid
+// ---------------------------------------------------------
+//
+TBool CLmkDecimalEditor::IsValid() const
+	{
+	return (NumberOfDigits() != 0);
+	}
+
+// ---------------------------------------------------------
+// CLmkDecimalEditor::NormalizeDigit
+// ---------------------------------------------------------
+//
+TChar CLmkDecimalEditor::NormalizeDigit(TChar aChar)
+	{
+	TBuf<1> buf;
+	buf.Append(aChar);
+	NumberConversion::ConvertDigits(buf, iDigitType);
+	return buf[0];
+	}
+
+// ---------------------------------------------------------
+// CLmkDecimalEditor::ZeroCharacter
+// ---------------------------------------------------------
+//
+TText CLmkDecimalEditor::ZeroCharacter() const
+		{
+		return TText(iDigitType);
+		}
+
+// ---------------------------------------------------------
+// CLmkDecimalEditor::NegativeCharacter
+// ---------------------------------------------------------
+//
+TText CLmkDecimalEditor::NegativeCharacter() const
+		{
+		return TText('-');
+		}
+
+// ---------------------------------------------------------
+// CLmkDecimalEditor::IsTextNull
+// ---------------------------------------------------------
+//
+TBool CLmkDecimalEditor::IsTextNull() const
+	{
+	return ( Text().Length() < 1 );
+	}
+
+// ---------------------------------------------------------
+// CLmkDecimalEditor::MaximumWidthInPixels
+// ---------------------------------------------------------
+//
+TInt CLmkDecimalEditor::MaximumWidthInPixels(const CFont& aFont, TBool aShrinkToMinimumSize)
+	{
+	if (aShrinkToMinimumSize)
+		{
+		TBuf<16> minText;
+		minText.AppendNum(iMinimumValue);
+		TBuf<16> maxText;
+		maxText.AppendNum(iMaximumValue);
+
+		iMaxDigits=Max(2,Max(minText.Length(),maxText.Length()));
+		}
+	return (MaximumNumberOfDigits()*TFindWidthOfWidestDigitType(DigitType()).MaximumWidthInPixels(aFont)) + AdditionalWidthForHighlights(aFont) /*+((iMinimumValueCateredForInFieldWidth<0)? aFont.TextWidthInPixels(_L("-")): 0)*/;
+	}
+
+// ---------------------------------------------------------
+// CLmkDecimalEditor::InputCapabilities
+// ---------------------------------------------------------
+//
+TCoeInputCapabilities CLmkDecimalEditor::InputCapabilities() const
+	{
+	TUint inputCapabilities=TCoeInputCapabilities::ENone;
+	if (iMinimumValue<0)
+		{
+		inputCapabilities|=TCoeInputCapabilities::EWesternNumericIntegerNegative;
+		}
+	if (iMaximumValue>0)
+		{
+		inputCapabilities|=TCoeInputCapabilities::EWesternNumericIntegerPositive;
+		}
+	return TCoeInputCapabilities(inputCapabilities);
+	}
+
+// ---------------------------------------------------------
+// CLmkDecimalEditor::Text
+// ---------------------------------------------------------
+//
+const TDesC& CLmkDecimalEditor::Text() const
+	{
+	if (IsUninitialised())
+		return KNullDesC();
+	else
+		return *iText;
+	}
+
+// ---------------------------------------------------------
+// CLmkDecimalEditor::IsEditable
+// ---------------------------------------------------------
+//
+TBool CLmkDecimalEditor::IsEditable() const
+	{
+	return ETrue;
+	}
+
+// ---------------------------------------------------------
+// CLmkDecimalEditor::HighlightType
+// ---------------------------------------------------------
+//
+CEikMfneField::THighlightType CLmkDecimalEditor::HighlightType() const
+	{
+	return (iFlags&EIsBeingEditedWithCursor)? ECursor: EInverseVideo;
+	}
+
+// ---------------------------------------------------------
+// CLmkDecimalEditor::HandleKey
+// ---------------------------------------------------------
+//
+void CLmkDecimalEditor::HandleKey(const CFont& aFont, const TKeyEvent& aKeyEvent, TBool aInterpretLeftAndRightAsEarEvents, TBool& aDataAltered, TInt& aHighlightIncrement)
+	{
+	TChar ch=aKeyEvent.iCode;
+
+	TPtr text=iText->Des();
+	TInt textLength=text.Length();
+	TBool nudgeTen=EFalse;
+	switch (ch)
+		{
+	case EKeyLeftArrow:
+	case EKeyRightArrow:
+		if (!aInterpretLeftAndRightAsEarEvents)
+			HandleLeftOrRightArrow(ch, aDataAltered, aHighlightIncrement);
+		else
+			{
+		doAdjust:
+			const TInt nudge=(nudgeTen? 10 : 1);
+			TInt newValue;
+
+
+			if ((textLength==0) || ! EUtils::IsAnyDigit( TChar(text[textLength-1]) ) )
+				newValue=0;
+			else
+				newValue=ValueFromText()+((ch==EKeyLeftArrow)? -nudge: nudge);
+			if (newValue>=iMaximumValue)
+				newValue=iMaximumValue;
+			else if (newValue<=iMinimumValue)
+				newValue=iMinimumValue;
+			SetTextToValue(newValue, aFont);
+			aHighlightIncrement=0;// Always highlight the field being nudged
+			aDataAltered=ETrue;
+			SetUninitialised(EFalse);
+			iFlags&=~EIsBeingEditedWithCursor;
+			}
+		break;
+    case EKeyDownArrow:
+    case EKeyUpArrow:
+        {
+		if (IsUninitialised())
+			{
+			SetUninitialised(EFalse);
+			}
+		else
+			{
+		        const TInt nudge=(nudgeTen? 10 : 1);
+        		TInt newValue;
+
+
+		        if ((textLength==0) || ! EUtils::IsAnyDigit( TChar(text[textLength-1])) )
+        		    newValue=0;
+        		else
+            			newValue=ValueFromText()+((ch==EKeyDownArrow)? -nudge: nudge);
+
+	 		if (newValue>iMaximumValue)
+            			newValue=iMinimumValue;
+        		else if (newValue<iMinimumValue)
+		            newValue=iMaximumValue;
+       			SetTextToValue(newValue, aFont);
+        		aHighlightIncrement=0;// Always highlight the field being nudged
+        		aDataAltered=ETrue;
+        		iFlags&=~EIsBeingEditedWithCursor;
+			}
+		aDataAltered=ETrue;
+        }
+        break;
+    case EKeyBackspace:
+		if (textLength)
+			{
+			iFlags|=EIsBeingEditedWithCursor;
+			text.SetLength(textLength-1);
+			if (text==KMinus)
+				text.SetLength(0);
+			aDataAltered=ETrue;
+			SetUninitialised(EFalse);
+			}
+		break;
+	case '+':
+		break;
+	case '-':
+        if (iMinimumValue < 0)
+            {
+			if (~iFlags&EIsBeingEditedWithCursor)
+				{
+				iFlags|=EIsBeingEditedWithCursor;
+				text.SetLength(0);
+				}
+			if (text.Length()==0)
+				{
+				text.Append('-');
+				aDataAltered=ETrue;
+				SetUninitialised(EFalse);
+				}
+			}
+		break;
+	default:
+		TBuf<2> nudgeTenChars;
+		CCoeEnv::Static()->ReadResource(nudgeTenChars,R_EIK_TBUF_NUDGE_TEN_CHARS);
+
+		if ( EUtils::IsAnyDigit(ch) )
+			{
+			if (~iFlags&EIsBeingEditedWithCursor)
+				{
+				iFlags|=EIsBeingEditedWithCursor;
+				text.SetLength(0);
+				}
+			text.Append(NormalizeDigit(ch) );
+			aDataAltered=ETrue;
+			SetUninitialised(EFalse);
+			if (NumberOfDigits()>=MaximumNumberOfDigits())
+				aHighlightIncrement=1;
+			}
+		if (ch==iNudgeCharMinus)
+			{
+			ch=EKeyLeftArrow;
+			goto doAdjust;
+			}
+		else if (ch==iNudgeCharPlus)
+			{
+			ch=EKeyRightArrow;
+			goto doAdjust;
+			}
+		else if (ch==((TUint)nudgeTenChars[0]))
+			{
+			ch=EKeyLeftArrow;
+			nudgeTen=ETrue;
+			goto doAdjust;
+			}
+		else if (ch==((TUint)nudgeTenChars[1]))
+			{
+			ch=EKeyRightArrow;
+			nudgeTen=ETrue;
+			goto doAdjust;
+			}
+		break;
+		}
+	}
+
+// ---------------------------------------------------------
+// CLmkDecimalEditor::HandleDeHighlight
+// ---------------------------------------------------------
+//
+void CLmkDecimalEditor::HandleDeHighlight(const CFont& aFont, CEikonEnv& aEikonEnv, TBool& aDataAltered, TBool& aError)
+	{
+	iFlags&=~EIsBeingEditedWithCursor;
+	if (NumberOfDigits()==0)
+		{
+		SetTextToValue(iMaximumValue, aFont);
+		aDataAltered=ETrue;
+		aError=ETrue;
+		aEikonEnv.InfoMsg(R_EIK_TBUF_NO_NUMBER_ENTERED);
+		return;
+		}
+	TInt value=ValueFromText();
+    if ((value<iMinimumValue) || (value>iMaximumValue))
+        {
+        TBool succeeded = ConvertsIntoValidValue(value);
+        if ( !succeeded )
+            {
+            aDataAltered=ETrue;
+            aError=ETrue;
+            if (value<iMinimumValue)
+                {
+                SetTextToValue(iMinimumValue, aFont);
+				InvalidFieldAlert();
+                aEikonEnv.InfoMsg(R_EIK_TBUF_NUMBER_BELOW_MIN, iMinimumValue);
+                return;
+                }
+            if (value>iMaximumValue)
+                {
+				InvalidFieldAlert();
+                SetTextToValue(iMaximumValue, aFont);
+                aEikonEnv.InfoMsg(R_EIK_TBUF_NUMBER_ABOVE_MAX, iMaximumValue);
+                return;
+                }
+            }
+        }
+	TBuf<128> oldText=*iText;
+	TBool unInit = IsUninitialised();
+	//SetTextToValue(value, aFont);
+	if (oldText!=*iText)
+		aDataAltered=ETrue;
+	else
+		SetUninitialised(unInit);
+	}
+
+// ---------------------------------------------------------
+// CLmkDecimalEditor::MaximumNumberOfDigits
+// ---------------------------------------------------------
+//
+TInt CLmkDecimalEditor::MaximumNumberOfDigits() const
+	{
+	return Max(2,iMaxDigits);
+	}
+
+// ---------------------------------------------------------
+// CLmkDecimalEditor::NumberOfDigits
+// ---------------------------------------------------------
+//
+TInt CLmkDecimalEditor::NumberOfDigits() const
+	{
+	return iText->Length();
+	}
+
+// ---------------------------------------------------------
+// CLmkDecimalEditor::SetTextToValue
+// ---------------------------------------------------------
+//
+void CLmkDecimalEditor::SetTextToValue(TInt aValue, const CFont& aFont)
+	{
+	SetUninitialised(EFalse);
+	TPtr text=iText->Des();
+	text.SetLength(0);
+	if (aValue<0)
+		{
+		text.Append('-');
+		aValue=-aValue;
+		}
+	TInt firstUnsetCharacter=text.Length();
+	text.SetLength(firstUnsetCharacter+MaximumNumberOfDigits());
+	TInt lastUnsetCharacter=text.Length()-1;
+	if (aValue==0)
+		text[lastUnsetCharacter--]=ZeroCharacter();
+	else
+		{
+		for (; aValue; aValue/=10)
+			text[lastUnsetCharacter--]=(TText)(ZeroCharacter()+(aValue%10));
+		}
+	while(iNumberOfZeros--)
+		{
+		text[lastUnsetCharacter--]=(TText)(ZeroCharacter());
+		}
+	iNumberOfZeros = 0;
+
+	if (lastUnsetCharacter>=firstUnsetCharacter)
+		{
+		if (iFlags&EFillWithLeadingZeros)
+			while (lastUnsetCharacter>=firstUnsetCharacter) text[lastUnsetCharacter--]=ZeroCharacter();
+		else
+			text.Delete(firstUnsetCharacter, (lastUnsetCharacter+1)-firstUnsetCharacter);
+		}
+	if (iFlags&EPreserveOldWidthBeforeEditing)
+		iMinimumWidthInPixels = WidthInPixels(aFont);
+	}
+
+// ---------------------------------------------------------
+// CLmkDecimalEditor::ValueFromText
+// ---------------------------------------------------------
+//
+TInt CLmkDecimalEditor::ValueFromText() const
+	{
+	if (!NumberOfDigits())
+		return iMinimumValue;
+	TInt i=0;
+	TInt valueFromText=0;
+	TBool isNegative=EFalse;
+	switch ((*iText)[i])
+		{
+	case '-':
+		++i;
+		isNegative=ETrue;
+		break;
+		}
+	TInt textLength=iText->Length();
+	for (; i<textLength; ++i)
+		{
+		TText digit=(*iText)[i];
+		if (i>=textLength-2)
+			{
+			if (!isNegative && valueFromText>(KMaxTInt32/10))
+				return KMaxTInt32;
+			else if (isNegative && (-valueFromText)<(KMinTInt32/10))
+				return KMinTInt32;
+			}
+		valueFromText=(valueFromText*10)+(TInt)(digit-ZeroCharacter());
+		}
+	if (isNegative==EFalse && valueFromText<0)
+		return KMaxTInt32;// Deals with overflow
+	if (isNegative)
+		valueFromText=-valueFromText;
+	return valueFromText;
+	}
+
+// ---------------------------------------------------------
+// CLmkDecimalEditor::ConvertsIntoValidValue
+// ---------------------------------------------------------
+//
+TBool CLmkDecimalEditor::ConvertsIntoValidValue(TInt& aValue) const
+	{
+	if ((iFlags&ERepresentsYear) && (aValue>=0) && (aValue<100))
+		{
+		TTime homeTime;
+		homeTime.HomeTime();
+		TInt currentYear=homeTime.DateTime().Year();
+		if (currentYear>0)
+			{
+			TInt yearsSinceStartOfCurrentCentury=currentYear%100;
+			TInt newValue=(currentYear-yearsSinceStartOfCurrentCentury)+aValue;
+            // If two digit year is given, 2000 + aValue is expected.
+    		aValue=newValue;
+			if ((newValue>=iMinimumValue) && (newValue<=iMaximumValue))
+				{
+				return ETrue;
+				}
+			}
+		}
+	return EFalse;
+	}
+
+// ---------------------------------------------------------
+// CLmkDecimalEditor::SetUninitialised
+// ---------------------------------------------------------
+//
+void CLmkDecimalEditor::SetUninitialised(TBool aUninitialised)
+	{
+	if (aUninitialised)
+		iFlags |= EIsUninitialised;
+	else
+		iFlags &= ~EIsUninitialised;
+	}
+
+// ---------------------------------------------------------
+// CLmkDecimalEditor::IsUninitialised
+// ---------------------------------------------------------
+//
+TBool CLmkDecimalEditor::IsUninitialised() const
+	{
+	return iFlags & EIsUninitialised;
+	}
+
+// ---------------------------------------------------------
+// CLmkDecimalEditor::RefreshDigitType
+// ---------------------------------------------------------
+//
+void CLmkDecimalEditor::RefreshDigitType( const CFont& aFont)
+	{
+	SetDigitType( AknTextUtils::NumericEditorDigitType(), aFont);
+	}
+
+// ---------------------------------------------------------
+// CLmkDecimalEditor::SetDigitType
+// ---------------------------------------------------------
+//
+void CLmkDecimalEditor::SetDigitType(TDigitType aDigitType, const CFont& aFont)
+	{
+	TInt value = Value();
+	iDigitType = aDigitType;
+	SetTextToValue(value, aFont);
+	}
+
+// ---------------------------------------------------------
+// CLmkDecimalEditor::DigitType
+// ---------------------------------------------------------
+//
+TDigitType CLmkDecimalEditor::DigitType() const
+	{
+	return iDigitType;
+	}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/uicontrols/src/CLmkDistanceEditor.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,355 @@
+/*
+* 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:    LandmarksUi Content File -
+*
+*/
+
+
+
+
+
+
+
+
+// INCLUDE FILES
+#include <eikmfne.h>
+
+#include <eikenv.h>
+#include <stringloader.h>
+#include <e32math.h>
+#include <AknUtils.h>
+
+#include <LmkUi.rsg>
+#include "landmarks.hrh"
+#include "LmkConsts.h"
+
+#include "CLmkMfneFloat.h"
+#include "CLmkDistanceEditor.h"
+#include <AknBidiTextUtils.h>
+
+// CONSTANTS
+/// Unnamed namespace for local definitions
+namespace {
+
+const TInt KKeyToMatchEmptyUnits = 0;
+
+const TInt KKeyToMatchMeters = 109;
+const TInt KKeyToMatchKilometers = 75;
+const TInt KKeyToMatchFeet = 87;
+const TInt KKeyToMatchMiles = 77;
+
+const TInt KNumMetricUnitSymbols = 2;
+const TInt KNumImperialUnitSymbols = 2;
+
+const TInt KMaxNumSignificantDigits = 7;  // DDDDD.DD
+const TInt KMaxNumDecimalDigits = 2;
+const TInt KNumFields = 2; // float, Units
+}  // namespace
+
+// ============================ MEMBER FUNCTIONS ==============================
+
+// ----------------------------------------------------------------------------
+// CLmkDistanceEditor::CLmkDistanceEditor
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// ----------------------------------------------------------------------------
+//
+CLmkDistanceEditor::CLmkDistanceEditor()
+    {
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkDistanceEditor::ConstructL
+// Symbian 2nd phase constructor can leave.
+// ----------------------------------------------------------------------------
+//
+void CLmkDistanceEditor::ConstructL(
+    TReal32 aMinimumValue,
+    TReal32 aMaximumValue,
+    TReal32 aInitialValue)
+    {
+    iMinimumValue = aMinimumValue;
+    iMaximumValue = aMaximumValue;
+
+    // create float field
+    BaseConstructL(KNumFields);
+
+    if (!AknLayoutUtils::LayoutMirrored())
+        {
+        ConstructValueFieldL(KMaxNumSignificantDigits, KMaxNumDecimalDigits);
+        ConstructUnitFieldL();
+        }
+    else
+        {
+        ConstructUnitFieldL();
+        ConstructValueFieldL(KMaxNumSignificantDigits, KMaxNumDecimalDigits);
+        }
+
+    // Init value
+    SetUnit(DefaultUnit());
+    UpdateValueLimits();
+    SetNumber(aInitialValue);
+    ShowUnits(!Math::IsNaN(aInitialValue));
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkDistanceEditor::ConstructUnitFieldL
+// ----------------------------------------------------------------------------
+//
+void CLmkDistanceEditor::ConstructUnitFieldL()
+    {
+    TLocale locale;
+
+    //create distance types
+    TInt numUnitsymbols = KNumMetricUnitSymbols + 1; // +empty Units
+    if (locale.UnitsGeneral() == EUnitsImperial)
+        {
+        numUnitsymbols += KNumImperialUnitSymbols;
+        }
+
+    iUnitsField = CEikMfneSymbol::NewL(numUnitsymbols);
+
+    // create Units field
+    HBufC* type = NULL;
+
+    // add empty Units
+    type = HBufC::NewLC(1);
+    iUnitsField->AddSymbolicItem(
+        CEikMfneSymbol::CItem::NewL(EUnitNone, KKeyToMatchEmptyUnits, type ),
+        ETrue);
+    CleanupStack::Pop(type);
+
+    // add metric Units
+    type = StringLoader::LoadLC( R_LMK_DISTANCE_EDITOR_TYPE_M, iCoeEnv );
+    iUnitsField->AddSymbolicItem(
+        CEikMfneSymbol::CItem::NewL( EUnitMeters, KKeyToMatchMeters, type ),
+        EFalse);
+    CleanupStack::Pop(type);
+
+    type = StringLoader::LoadLC( R_LMK_DISTANCE_EDITOR_TYPE_KM, iCoeEnv );
+    iUnitsField->AddSymbolicItem(
+        CEikMfneSymbol::CItem::NewL( EUnitKilometers, KKeyToMatchKilometers, type ),
+        EFalse);
+    CleanupStack::Pop(type);
+
+    // Add imperial Units for those who use them
+    if ( locale.UnitsGeneral() == EUnitsImperial )
+        {
+        type = StringLoader::LoadLC( R_LMK_DISTANCE_EDITOR_TYPE_FT, iCoeEnv );
+        iUnitsField->AddSymbolicItem(
+            CEikMfneSymbol::CItem::NewL( EUnitFeet, KKeyToMatchFeet, type ),
+            EFalse);
+        CleanupStack::Pop(type);
+
+        type = StringLoader::LoadLC( R_LMK_DISTANCE_EDITOR_TYPE_MI, iCoeEnv );
+        iUnitsField->AddSymbolicItem(
+            CEikMfneSymbol::CItem::NewL( EUnitMiles, KKeyToMatchMiles, type ),
+            EFalse);
+        CleanupStack::Pop(type);
+        }
+
+    AddField(iUnitsField);
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkDistanceEditor::~CLmkDistanceEditor
+// ----------------------------------------------------------------------------
+//
+CLmkDistanceEditor::~CLmkDistanceEditor()
+    {
+    }
+
+// ----------------------------------------------------
+// CLmkDistanceEditor::Number
+// ----------------------------------------------------
+//
+TReal CLmkDistanceEditor::Number() const
+    {
+    return UnitsToMeters(CLmkFloatEditor::Number(), Unit());
+    }
+
+// ----------------------------------------------------
+// CLmkDistanceEditor::SetNumber
+// ----------------------------------------------------
+//
+void CLmkDistanceEditor::SetNumber(TReal aNumber)
+    {
+    ShowUnits(!Math::IsNaN(aNumber));
+    CLmkFloatEditor::SetNumber(MetersToUnits(aNumber, Unit()));
+    }
+
+// ----------------------------------------------------
+// CLmkDistanceEditor::SetUnit
+// ----------------------------------------------------
+//
+void CLmkDistanceEditor::SetUnit(TDistanceUnit aUnitId)
+    {
+    iUnitsField->SetCurrentSymbolicItemToId(aUnitId);
+    UpdateValueLimits();
+    }
+
+// ----------------------------------------------------
+// CLmkDistanceEditor::Unit
+// ----------------------------------------------------
+//
+CLmkDistanceEditor::TDistanceUnit CLmkDistanceEditor::Unit() const
+    {
+    return (TDistanceUnit) iUnitsField->IdOfCurrentSymbolicItem();
+    }
+
+// ----------------------------------------------------
+// CLmkDistanceEditor::DefaultUnit
+// ----------------------------------------------------
+//
+CLmkDistanceEditor::TDistanceUnit CLmkDistanceEditor::DefaultUnit() const
+    {
+    return EUnitMeters;
+    }
+
+// ----------------------------------------------------
+// CLmkDistanceEditor::UpdateValueLimits
+// ----------------------------------------------------
+//
+void CLmkDistanceEditor::UpdateValueLimits()
+    {
+    if (Unit() != EUnitNone)
+        {
+        SetLimits(
+            MetersToUnits(iMinimumValue, Unit()),
+            MetersToUnits(iMaximumValue, Unit()));
+        }
+    }
+
+// ----------------------------------------------------
+// CLmkDistanceEditor::MetersToUnits
+// ----------------------------------------------------
+//
+TReal32 CLmkDistanceEditor::MetersToUnits(
+    TReal32 aMeters,
+    TDistanceUnit aToUnits) const
+    {
+    TRealX nan;
+    nan.SetNaN();
+
+    if (Math::IsNaN(aMeters))
+        {
+        return nan;
+        }
+
+    switch (aToUnits)
+        {
+        case EUnitMeters:
+            return aMeters;
+        case EUnitKilometers:
+            return aMeters / KKilometerToMeter;
+        case EUnitMiles:
+            return aMeters / KMileToMeter;
+        case EUnitFeet:
+            return aMeters * KMetreToFoot;
+        default:
+            return nan;
+        }
+    }
+
+// ----------------------------------------------------
+// CLmkDistanceEditor::UnitsToMeters
+// ----------------------------------------------------
+//
+TReal32 CLmkDistanceEditor::UnitsToMeters(
+    TReal32 aValue,
+    TDistanceUnit aFromUnits) const
+    {
+    TRealX nan;
+    nan.SetNaN();
+
+    if (Math::IsNaN(aValue))
+        {
+        return nan;
+        }
+
+    switch (aFromUnits)
+        {
+        case EUnitMeters:
+            return aValue;
+        case EUnitKilometers:
+            return aValue * KKilometerToMeter;
+        case EUnitMiles:
+            return aValue * KMileToMeter;
+        case EUnitFeet:
+            return aValue / KMetreToFoot;
+        default:
+            return nan;
+        }
+    }
+
+// ----------------------------------------------------
+// CLmkDistanceEditor::ShowUnits
+// ----------------------------------------------------
+//
+void CLmkDistanceEditor::ShowUnits(TBool aVisible)
+    {
+    if (aVisible)
+        {
+        if (Unit() == EUnitNone)
+            {
+            SetUnit(DefaultUnit());
+            }
+        }
+    else
+        {
+        SetUnit(EUnitNone);
+        }
+    }
+
+// ----------------------------------------------------
+// CLmkDistanceEditor::HandleEnter
+// ----------------------------------------------------
+//
+void CLmkDistanceEditor::HandleEnter()
+    {
+    ShowUnits(ETrue);
+    CLmkFloatEditor::HandleEnter();
+    }
+
+// ----------------------------------------------------
+// CLmkDistanceEditor::HandleExit
+// ----------------------------------------------------
+//
+void CLmkDistanceEditor::HandleExit()
+    {
+    ShowUnits(!IsNan());
+    CLmkFloatEditor::HandleExit();
+    }
+
+// ----------------------------------------------------
+// CLmkDistanceEditor::HandleCustomFieldChanged
+// ----------------------------------------------------
+//
+void CLmkDistanceEditor::HandleCustomFieldChanged(TInt aFieldIndex)
+    {
+    if (Field(aFieldIndex) == iUnitsField)
+        {
+        if (Unit() == EUnitNone)
+            {
+            // cycle from empty unit
+            SetUnit(DefaultUnit());
+            }
+        else
+            {
+            UpdateValueLimits();
+            }
+        }
+    }
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/uicontrols/src/CLmkDlgCategorySelectorImpl.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,206 @@
+/*
+* 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:    LandmarksUi Content File -
+*
+*/
+
+
+
+
+
+
+
+
+// INCLUDE FILES
+#include <aknlists.h>
+#include "CLmkDlgCategorySelectorImpl.h"
+#include "CLmkMultiSelectorDialog.h"
+#include "CLmkLmItemListProvider.h"
+#include "LmkListProviderFactory.h"
+#include "CLmkUiUtils.h"
+#include <lmkui.rsg>
+#include <lmkerrors.h>
+
+
+#if defined(_DEBUG)
+
+// CONSTANTS
+/// Unnamed namespace for local definitions
+namespace {
+
+_LIT( KPanicMsg, "CLmkDlgCategorySelectorImpl" );
+
+void Panic( TPanicCode aReason )
+    {
+    User::Panic( KPanicMsg, aReason );
+    }
+}  // namespace
+#endif
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CLmkDlgCategorySelectorImpl::CLmkDlgCategorySelectorImpl
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+CLmkDlgCategorySelectorImpl::CLmkDlgCategorySelectorImpl(
+    CPosLandmarkDatabase& aDb,
+    TBool aShowEmptyCategories,
+    TBool aShowBlankNaviPane
+     )
+    : CLmkDlgSelectorImplBase( aDb ),
+      iShowEmptyCategories( aShowEmptyCategories ),
+      iShowBlankNaviPane (aShowBlankNaviPane)
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkDlgCategorySelectorImpl::ConstructL
+// Symbian 2nd phase constructor can leave.
+// -----------------------------------------------------------------------------
+//
+void CLmkDlgCategorySelectorImpl::ConstructL()
+    {
+    BaseConstructL();
+    // Hide the navi pane contents of the dialog Launcher
+    if (iShowBlankNaviPane)
+	    {
+	    iLmkUiUtils->StoreNaviPaneL();
+	    iLmkUiUtils->CreateDefaultNaviPaneL();
+	    }
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkDlgCategorySelectorImpl::NewL
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CLmkDlgCategorySelectorImpl* CLmkDlgCategorySelectorImpl::NewL(
+    CPosLandmarkDatabase& aDb,
+    TBool aShowEmptyCategories, TBool aShowBlankNaviPane)
+    {
+    CLmkDlgCategorySelectorImpl* self =
+        new( ELeave ) CLmkDlgCategorySelectorImpl( aDb, aShowEmptyCategories, aShowBlankNaviPane );
+
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop();
+
+    return self;
+    }
+
+// ----------------------------------------------------
+// CLmkDlgCategorySelectorImpl::~CLmkDlgCategorySelectorImpl
+// ----------------------------------------------------
+//
+CLmkDlgCategorySelectorImpl::~CLmkDlgCategorySelectorImpl()
+    {
+    }
+
+// ----------------------------------------------------
+// CLmkDlgCategorySelectorImpl::SetupListProviderL
+// ----------------------------------------------------
+//
+void CLmkDlgCategorySelectorImpl::SetupListProviderL()
+    {
+    if ( !iListProvider )
+        {
+        TLmkProviderType providerType( ELmkNotShowEmptyCategories );
+        if ( iShowEmptyCategories )
+            {
+            providerType = ELmkShowEmptyCategories;
+            }
+        iListProvider = LmkListProviderFactory::CreateProviderL( iDb,
+                                    ECategorySelector, providerType );
+
+        iListProvider->AddObserverL( *this );
+        iListProvider->InitializeL();
+        }
+    }
+
+// ----------------------------------------------------
+// CLmkDlgCategorySelectorImpl::ListProvider
+// ----------------------------------------------------
+//
+const CLmkListProviderBase& CLmkDlgCategorySelectorImpl::ListProvider() const
+    {
+    __ASSERT_DEBUG( iListProvider, Panic( KLmkPanicNullMember ) );
+    return *iListProvider;
+    }
+
+// ----------------------------------------------------
+// CLmkDlgCategorySelectorImpl::GetDlgResources
+// ----------------------------------------------------
+//
+void CLmkDlgCategorySelectorImpl::GetDlgResources(
+    TBool aIsSingleSelector,
+    TInt& aTitlePaneResource,
+    TInt& aMenuBarResource,
+    TInt& aDialogResource ) const
+    {
+    aTitlePaneResource = R_LMK_CATEGORY_SELECTOR_TITLE;
+    aMenuBarResource = R_LMK_EMPTY_MENUBAR;
+
+    if ( iSelectorImplParent )
+        { // category selector as a part of landmark selector
+        aDialogResource = R_LMK_SELECTOR_OPEN_CANCEL_DLG;
+        }
+    else
+        {
+        if ( aIsSingleSelector )
+            {
+            aDialogResource = R_LMK_SELECTOR_OK_CANCEL_DLG;
+            }
+        else
+            {
+            aDialogResource = R_LMK_CATEGORY_SELECTOR_OK_CANCEL_MULTI_DLG;
+            }
+        }
+    }
+
+// ----------------------------------------------------
+// CLmkDlgCategorySelectorImpl::HandleListProviderEvent
+// ----------------------------------------------------
+//
+void CLmkDlgCategorySelectorImpl::HandleListProviderEvent(
+    TLmkListProviderEventType aEvent )
+    {
+    // Give event to the dialog as the first step since others
+    // may then interact with the updated dialog:
+    if ( iDialog )
+        {
+        iDialog->HandleListProviderEvent( aEvent );
+        }
+
+    // Base class implementation:
+    CLmkDlgSelectorImplBase::HandleListProviderEvent( aEvent );
+    }
+
+// ----------------------------------------------------
+// CLmkDlgCategorySelectorImpl::HandleListProviderError
+// ----------------------------------------------------
+//
+void CLmkDlgCategorySelectorImpl::HandleListProviderError( TInt aError )
+    {
+    // Base class implementation:
+    CLmkDlgSelectorImplBase::HandleListProviderError( aError );
+
+    if ( iDialog )
+        {
+        iDialog->HandleListProviderError( aError );
+        }
+    }
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/uicontrols/src/CLmkDlgCombiSelectorImpl.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,806 @@
+/*
+* Copyright (c) 2002-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:    LandmarksUi Content File -    This contains methods implementing a combined dialog for Landmarks
+*                by name view and categories view
+*
+*/
+
+
+
+
+
+
+
+// INCLUDE FILES
+
+#include <eikapp.h>
+#include <eikenv.h>
+#include <StringLoader.h>
+#include <AknsUtils.h>
+#include <akntabgrp.h>
+#include <eikspane.h>
+#include <aknnavide.h>
+#include <aknnavi.h>
+#include <barsread.h>
+#include <lmkui.rsg>
+#include <EPos_CPosLmCategoryCriteria.h>
+#include "LmkConsts.h"
+#include "landmarks.hrh"
+#include "CLmkDbUtils.h"
+#include "CLmkLmItemListProvider.h"
+#include "CLmkUiUtils.h"
+#include "CLmkSelectorDialog.h"
+#include "CLmkEmptyDialog.h"
+#include "CLmkDlgLmSelectorImpl.h"
+#include "CLmkDlgCategorySelectorImpl.h"
+#include "CLmkDlgCombiSelectorImpl.h"
+#include "CLmkLmItemListMemento.h"
+#include <lmkerrors.h>
+
+
+// CONSTANTS
+/// Unnamed namespace for local definitions
+namespace {
+
+const TInt KLmkNumberOfSelectors = 3;
+
+#if defined(_DEBUG)
+_LIT( KPanicMsg, "CLmkDlgCombiSelectorImpl" );
+void Panic( TPanicCode aReason )
+    {
+    User::Panic( KPanicMsg, aReason );
+    }
+#endif
+}  // namespace
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CLmkDlgCombiSelectorImpl::CLmkDlgCombiSelectorImpl
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+CLmkDlgCombiSelectorImpl::CLmkDlgCombiSelectorImpl( CPosLandmarkDatabase& aDb )
+    : CLmkDlgSelectorImplBase( aDb ),
+      iSelectorState( ELmkInitialState ),
+      iSelectors( KLmkNumberOfSelectors ),
+      iMementos( KLmkNumberOfSelectors ),
+      iNavigating( EFalse ),
+      iAlwaysModify( EFalse ),
+      iCustomLandmarksTitle(0)
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkDlgCombiSelectorImpl::ConstructL
+// Symbian 2nd phase constructor can leave.
+// -----------------------------------------------------------------------------
+//
+void CLmkDlgCombiSelectorImpl::ConstructL()
+    {
+    BaseConstructL();
+
+    // Default status pane:
+    CEikStatusPane* sp = iEnv->AppUiFactory()->StatusPane();
+
+    // Fetch pointer to the default navi pane control:
+    iNaviPane = static_cast<CAknNavigationControlContainer*>(
+                        sp->ControlL( TUid::Uid( EEikStatusPaneUidNavi ) ) );
+    __ASSERT_DEBUG( iNaviPane, Panic( KLmkPanicNullMember ) );
+    iNaviDeco = iNaviPane->CreateTabGroupL();
+   	iNaviDeco->SetControlType( CAknNavigationDecorator::ETabGroup );
+    iTabGroup = static_cast<CAknTabGroup*>( iNaviDeco->DecoratedControl() );
+    __ASSERT_DEBUG( iTabGroup, Panic( KLmkPanicNullMember ) );
+
+    // Add Tab Icons
+    AddTabsL( *iTabGroup );
+
+    // Set observer for CAknTabGroup
+    iTabGroup->SetObserver( this );
+
+    // Create mementos and initialize selector array with NULL pointers:
+    MLmkListMemento* memento = NULL;
+    for ( TInt i( 0 ); i < KLmkNumberOfSelectors; ++i )
+        {
+        memento = MementoL();
+        User::LeaveIfError( iMementos.Append( memento ) );
+        User::LeaveIfError( iSelectors.Append( NULL ) );
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkDlgCombiSelectorImpl::NewL
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CLmkDlgCombiSelectorImpl* CLmkDlgCombiSelectorImpl::NewL(
+    CPosLandmarkDatabase& aDb )
+    {
+    CLmkDlgCombiSelectorImpl* self =
+        new( ELeave ) CLmkDlgCombiSelectorImpl( aDb );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop();
+    return self;
+    }
+
+// ----------------------------------------------------
+// CLmkDlgCombiSelectorImpl::~CLmkDlgCombiSelectorImpl
+// ----------------------------------------------------
+//
+CLmkDlgCombiSelectorImpl::~CLmkDlgCombiSelectorImpl()
+    {
+    iSelectors.ResetAndDestroy();
+    iMementos.ResetAndDestroy();
+    delete iNaviDeco;
+    if( iCustomLandmarksTitle )
+    	delete iCustomLandmarksTitle;
+    }
+
+// ----------------------------------------------------
+// CLmkDlgCombiSelectorImpl::StopExecutionL
+// ----------------------------------------------------
+//
+void CLmkDlgCombiSelectorImpl::StopExecutionL()
+    {
+    __ASSERT_DEBUG( iSelectors.Count() == KLmkNumberOfSelectors,
+                    Panic( KLmkPanicSelectorArrayIndex ) );
+
+    for ( TInt i( 0 ); i < KLmkNumberOfSelectors; ++i )
+        {
+        if ( iSelectors[i] )
+            {
+            iSelectors[i]->StopExecutionL();
+            }
+        }
+    iNaviPane->Pop( iNaviDeco );
+    // Dialog ExecuteL returns and we must consider it in final state
+    iSelectorState = ELmkFinalState;
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkDlgCombiSelectorImpl::ExecuteL
+//
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+TInt CLmkDlgCombiSelectorImpl::ExecuteL(
+    TPosLmItemId& aOpenedItem,
+    TBool aAlwaysModifyOpened )
+    {
+    // Ensure that ExecuteL is not already running:
+    __ASSERT_DEBUG( iSelectorState == ELmkFinalState ||
+                    iSelectorState == ELmkInitialState,
+                    Panic( KLmkPanicIllegalMethodCall ) );
+
+    iSelectorState = ELmkInitialState;
+    iOpenedItem = &aOpenedItem;
+    iAlwaysModify = aAlwaysModifyOpened;
+    CLmkEmptyDialog * lDlg = new(ELeave)CLmkEmptyDialog();
+    lDlg->SetMopParent(iMopParent);
+	lDlg->ExecuteLD(R_EMPTY_DIALOG);
+
+    TLmkSelectorStateEvent nextEvent( ELmkSelectorStart );
+    do
+        {
+        nextEvent = HandleAnyStateEventL( nextEvent );
+
+        } while ( nextEvent != ELmkSelectorNoEvent );
+
+    lDlg->EmptyDialogExitL();
+    return iDlgRetVal;
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkDlgCombiSelectorImpl::ExecuteL
+//
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+TInt CLmkDlgCombiSelectorImpl::ExecuteL(
+     RArray<TPosLmItemId>& aSelectedItems,
+     TBool aAlwaysModifySelected )
+    {
+    // Ensure that ExecuteL is not already running:
+    __ASSERT_DEBUG( iSelectorState == ELmkFinalState ||
+                    iSelectorState == ELmkInitialState,
+                    Panic( KLmkPanicIllegalMethodCall ) );
+
+    iSelectorState = ELmkInitialState;
+    iSelectedItems = &aSelectedItems;
+    iAlwaysModify = aAlwaysModifySelected;
+
+
+    TLmkSelectorStateEvent nextEvent( ELmkSelectorStart );
+    do
+        {
+        nextEvent = HandleAnyStateEventL( nextEvent );
+
+        } while ( nextEvent != ELmkSelectorNoEvent );
+
+    return iDlgRetVal;
+    }
+
+// ----------------------------------------------------
+// CLmkDlgCombiSelectorImpl::HandleAnyStateEventL
+// ----------------------------------------------------
+//
+CLmkDlgCombiSelectorImpl::TLmkSelectorStateEvent
+CLmkDlgCombiSelectorImpl::HandleAnyStateEventL(
+    TLmkSelectorStateEvent aEvent )
+    {
+    TLmkSelectorStateEvent nextEvent( ELmkSelectorNoEvent );
+
+    switch ( iSelectorState )
+        {
+        case ELmkInitialState:
+            {
+            nextEvent = HandleInitialStateEventL( aEvent );
+            break;
+            }
+        case ELmkLandmarkSelector:
+            {
+            nextEvent = HandleLandmarkSelectorStateEventL( aEvent );
+            break;
+            }
+        case ELmkCategorySelector:
+            {
+            nextEvent = HandleCategorySelectorStateEventL( aEvent );
+            break;
+            }
+        case ELmkFilteredLmSelector:
+            {
+            nextEvent = HandleFilteredLmSelectorStateEventL( aEvent );
+            break;
+            }
+        default: // ELmkFinalState
+            {
+            nextEvent = HandleDefaultStateStateEventL( aEvent );
+            }
+        }
+    if ( iNavigating )
+        { // navigation variable overrides dialog return value
+        iNavigating = EFalse;
+        nextEvent = ELmkSelectorNavigating;
+        }
+
+    return nextEvent;
+    }
+
+// ----------------------------------------------------
+// CLmkDlgCombiSelectorImpl::HandleInitialStateEventL
+// ----------------------------------------------------
+//
+CLmkDlgCombiSelectorImpl::TLmkSelectorStateEvent
+CLmkDlgCombiSelectorImpl::HandleInitialStateEventL(
+    TLmkSelectorStateEvent /*aEvent*/ )
+    {
+
+    iTabGroup->SetActiveTabById( ETabLandmarkList );
+    iNaviPane->PushL( *iNaviDeco );
+    iSelectorState = ELmkLandmarkSelector;
+    CLmkDlgSelectorImplBase& selector = CurrentStateSelectorL();
+
+    if ( iSelectedItems )
+        { // multi selector mode
+        iDlgRetVal = selector.ExecuteL( *iSelectedItems, iAlwaysModify );
+        }
+    else
+        { // single selector mode
+        iDlgRetVal = selector.ExecuteL( *iOpenedItem, iAlwaysModify );
+        }
+    return ELmkSelectorStop;
+    }
+
+// ----------------------------------------------------
+// CLmkDlgCombiSelectorImpl::HandleAnyStateEventL
+// ----------------------------------------------------
+//
+CLmkDlgCombiSelectorImpl::TLmkSelectorStateEvent
+CLmkDlgCombiSelectorImpl::HandleLandmarkSelectorStateEventL(
+    TLmkSelectorStateEvent aEvent )
+    {
+    __ASSERT_DEBUG( aEvent == ELmkSelectorNavigating ||
+                    aEvent == ELmkSelectorStop,
+                    Panic( KLmkPanicUnexpectedEvent ) );
+
+    if ( aEvent == ELmkSelectorNavigating )
+        {
+        iSelectorState = ELmkCategorySelector;
+        CLmkDlgSelectorImplBase& selector = CurrentStateSelectorL();
+        iDlgRetVal = selector.ExecuteL( iCategoryIndex );
+        return ELmkSelectorStop;
+        }
+    else
+        { // aEvent == ELmkSelectorStop
+        iSelectorState = ELmkFinalState;
+        return ELmkSelectorNoEvent;
+        }
+    }
+
+// ----------------------------------------------------
+// CLmkDlgCombiSelectorImpl::HandleCategorySelectorStateEventL
+// ----------------------------------------------------
+//
+CLmkDlgCombiSelectorImpl::TLmkSelectorStateEvent
+CLmkDlgCombiSelectorImpl::HandleCategorySelectorStateEventL(
+    TLmkSelectorStateEvent aEvent )
+    {
+    __ASSERT_DEBUG( aEvent == ELmkSelectorNavigating ||
+                    aEvent == ELmkSelectorStop,
+                    Panic( KLmkPanicUnexpectedEvent ) );
+
+    if ( aEvent == ELmkSelectorNavigating )
+        {
+        iSelectorState = ELmkLandmarkSelector;
+        CLmkDlgSelectorImplBase& selector = CurrentStateSelectorL();
+
+        if ( iSelectedItems )
+            { // multi selector mode
+            iDlgRetVal = selector.ExecuteL( *iSelectedItems, iAlwaysModify );
+            }
+        else
+            { // single selector mode
+            iDlgRetVal = selector.ExecuteL( *iOpenedItem, iAlwaysModify );
+            }
+        return ELmkSelectorStop;
+        }
+    else if ( aEvent == ELmkSelectorStop && iDlgRetVal != 0 )
+        { // -> open category contents
+        TPosLmItemId categoryId( KPosLmNullItemId );
+        static_cast<const CLmkLmItemListProvider&>( ListProvider() ).
+            GetSelectedItemId( categoryId, iCategoryIndex );
+
+		HBufC* catName = NULL;
+
+        if (categoryId == KPosLmNullItemId) // 'uncategorised' category
+        {
+	        // 'uncategorised' category
+	        // set criteria for searchnig 'Uncategorised' landmarks
+			catName = StringLoader::LoadL(
+			        R_LMK_LM_LIST_UNCATEGORISED,
+			        const_cast<CEikonEnv *>( iEnv ));
+        }
+        else
+        {
+           //HBufC* catName = CLmkDbUtils::CategoryNameL( iDb, categoryId );
+           catName = CLmkDbUtils::CategoryNameL( iDb, categoryId );
+        }
+
+        CleanupStack::PushL( catName );
+        //Store old and create new navi pane
+        iLmkUiUtils->StoreNaviPaneL();
+        iLmkUiUtils->CreateNaviLabelL( *catName );
+        CleanupStack::PopAndDestroy(); //catName
+
+        iSelectorState = ELmkFilteredLmSelector;
+        CLmkDlgSelectorImplBase& selector = CurrentStateSelectorL( categoryId );
+		if(iMementos[iSelectorState])
+	    	{
+	    	CLmkLmItemListMemento* memento =
+				 static_cast<CLmkLmItemListMemento*>(iMementos[iSelectorState]);
+	    	memento->UpdateModelAvailability(EFalse);
+	    	}
+        if ( iSelectedItems )
+            { // Return value is stored even if "Back" was pressed:
+            iDlgRetVal = selector.ExecuteL( *iSelectedItems, ETrue );
+            }
+        else
+            { // Return value is not stored if "Back" was pressed:
+            iDlgRetVal = selector.ExecuteL( *iOpenedItem, EFalse );
+            }
+        return ELmkSelectorStop;
+        }
+    else // aEvent == ELmkSelectorStop && dialog canceled
+        {
+        iSelectorState = ELmkFinalState;
+        return ELmkSelectorNoEvent;
+        }
+    }
+
+// ----------------------------------------------------
+// CLmkDlgCombiSelectorImpl::HandleFilteredLmSelectorStateEventL
+// ----------------------------------------------------
+//
+CLmkDlgCombiSelectorImpl::TLmkSelectorStateEvent
+CLmkDlgCombiSelectorImpl::HandleFilteredLmSelectorStateEventL(
+    TLmkSelectorStateEvent aEvent )
+    {
+    __ASSERT_DEBUG( aEvent == ELmkSelectorStop,
+                    Panic( KLmkPanicUnexpectedEvent ) );
+
+    // filtered lm selector shouldn't be removed earlier
+    CLmkDlgSelectorImplBase*& selector = iSelectors[ELmkFilteredLmSelector];
+    delete selector;
+    selector = NULL; // iSelector's pointer points to NULL now!
+
+    //Restore navi panel
+    iLmkUiUtils->RestoreOldNaviPaneL();
+
+    if ( aEvent == ELmkSelectorStop && iDlgRetVal != 0 )
+        {
+        iSelectorState = ELmkFinalState;
+        return ELmkSelectorNoEvent;
+        }
+    else // aEvent == ELmkSelectorStop & dialog canceled
+        {
+        iSelectorState = ELmkCategorySelector;
+        CLmkDlgSelectorImplBase& dlgselector = CurrentStateSelectorL();
+        TInt categoryIndex( -1 );
+        iDlgRetVal = dlgselector.ExecuteL( categoryIndex );
+        iCategoryIndex = categoryIndex;
+        return ELmkSelectorStop;
+        }
+    }
+
+// ----------------------------------------------------
+// CLmkDlgCombiSelectorImpl::HandleDefaultStateStateEventL
+// ----------------------------------------------------
+//
+CLmkDlgCombiSelectorImpl::TLmkSelectorStateEvent
+CLmkDlgCombiSelectorImpl::HandleDefaultStateStateEventL(
+    TLmkSelectorStateEvent /*aEvent*/ )
+    {
+    return ELmkSelectorNoEvent;
+    }
+
+// ----------------------------------------------------
+// CLmkDlgCombiSelectorImpl::SetupListProviderL
+// ----------------------------------------------------
+//
+void CLmkDlgCombiSelectorImpl::SetupListProviderL()
+    {
+    // This class does not create own provider
+    }
+
+// ----------------------------------------------------
+// CLmkDlgCombiSelectorImpl::ListProvider
+// ----------------------------------------------------
+//
+const CLmkListProviderBase& CLmkDlgCombiSelectorImpl::ListProvider() const
+    {
+    if ( iSelectorState ==  ELmkCategorySelector )
+        {
+        return iSelectors[ELmkCategorySelector]->ListProvider();
+        }
+    else if ( iSelectorState ==  ELmkFilteredLmSelector )
+        {
+        return iSelectors[ELmkFilteredLmSelector]->ListProvider();
+        }
+    else // ELmkLandmarkSelector
+        {
+        return iSelectors[ELmkLandmarkSelector]->ListProvider();
+        }
+    }
+
+// ----------------------------------------------------
+// CLmkDlgCombiSelectorImpl::GetDlgResources
+// ----------------------------------------------------
+//
+void CLmkDlgCombiSelectorImpl::GetDlgResources(
+    TBool /*aIsSingleSelector*/,
+    TInt& aTitlePaneResource,
+    TInt& aMenuBarResource,
+    TInt& aDialogResource ) const
+    {
+    // This class does not define resources
+    aTitlePaneResource = NULL;
+    aMenuBarResource = NULL;
+    aDialogResource = NULL;
+    }
+
+// ----------------------------------------------------
+// CLmkDlgCombiSelectorImpl::StoreMemento
+// ----------------------------------------------------
+//
+void CLmkDlgCombiSelectorImpl::StoreMemento()
+    {
+    // This class does not store
+    }
+
+// ----------------------------------------------------
+// CLmkDlgCombiSelectorImpl::RestoreMemento
+// ----------------------------------------------------
+//
+void CLmkDlgCombiSelectorImpl::RestoreMemento()
+    {
+    // This class does not restore
+    }
+
+// ----------------------------------------------------
+// CLmkDlgCombiSelectorImpl::ProcessCommandL
+// ----------------------------------------------------
+//
+void CLmkDlgCombiSelectorImpl::ProcessCommandL( TInt /*aCommandId*/ )
+    {
+    // This class does not process cmds
+    }
+
+// ----------------------------------------------------
+// CLmkDlgCombiSelectorImpl::HandleNavigationEventL
+// ----------------------------------------------------
+//
+TKeyResponse CLmkDlgCombiSelectorImpl::HandleNavigationEventL(
+    const TKeyEvent& aKeyEvent )
+    {
+    __ASSERT_DEBUG( iTabGroup, Panic( KLmkPanicNullMember ) );
+    // tab scroll key event handling is not needed 'Landmark Contents' view
+    if ( iSelectorState ==  ELmkFilteredLmSelector)
+	    {
+	    return EKeyWasNotConsumed;
+	    }
+
+    TInt active = iTabGroup->ActiveTabId();
+    TBool shift = EFalse;
+
+    if ( active == ETabCategoryList )
+        {
+        if(AknLayoutUtils::LayoutMirrored())
+        	{
+        	if(aKeyEvent.iCode == EKeyRightArrow)
+        		{
+        		shift = ETrue;
+        		}
+        	else
+	        	{//aKeyEvent.iCode == EKeyLeftArrow
+	        	shift = EFalse;
+	        	}
+        	}
+        else
+        	{
+        	if(aKeyEvent.iCode == EKeyLeftArrow)
+        		{
+        		shift = ETrue;
+        		}
+        	else
+	        	{//aKeyEvent.iCode == EKeyRightArrow
+	        	shift = EFalse;
+	        	}
+        	}
+
+        if(shift)
+        	{
+        	iTabGroup->SetActiveTabById( ETabLandmarkList );
+	        iNaviPane->PushL(*iNaviDeco);
+	        iNavigating = ETrue;
+        	}
+        else
+	        {// no need to set the tab id
+	        return EKeyWasNotConsumed;
+	        }
+        }
+    else if ( active == ETabLandmarkList )
+        {
+        TBool shift = EFalse;
+        if(AknLayoutUtils::LayoutMirrored())
+        	{
+        	if(aKeyEvent.iCode == EKeyLeftArrow)
+        		{
+        		shift = ETrue;
+        		}
+        	else //aKeyEvent.iCode == EKeyRightArrow
+	        	{
+	        	shift = EFalse;
+	        	}
+        	}
+        else
+        	{
+        	if(aKeyEvent.iCode == EKeyRightArrow)
+        		{
+        		shift = ETrue;
+        		}
+        	else //aKeyEvent.iCode == EKeyLeftArrow
+	        	{
+	        	shift = EFalse;
+	        	}
+        	}
+
+        if(shift)
+        	{
+        	iTabGroup->SetActiveTabById( ETabCategoryList );
+	        iNaviPane->PushL(*iNaviDeco);
+	        iNavigating = ETrue;
+        	}
+        else // no need to set the tab id
+	        {
+	        return EKeyWasNotConsumed;
+	        }
+        }
+    else
+        {
+        return EKeyWasNotConsumed;
+        }
+    return EKeyWasConsumed;
+    }
+
+// ----------------------------------------------------
+// CLmkDlgCombiSelectorImpl::HandleLaunchingEventL
+// ----------------------------------------------------
+//
+void CLmkDlgCombiSelectorImpl::HandleLaunchingEventL()
+    {
+    // This class does not do anything with this event
+    }
+
+// ----------------------------------------------------
+// CLmkDlgCombiSelectorImpl::HandleClosingEventL
+// ----------------------------------------------------
+//
+void CLmkDlgCombiSelectorImpl::HandleClosingEventL()
+    {
+    // This class does not do anything with this event
+    }
+
+CLmkDlgSelectorImplBase& CLmkDlgCombiSelectorImpl::CurrentStateSelectorL(
+    TPosLmItemId aCategoryId )
+    {
+    __ASSERT_DEBUG( iSelectors.Count() == KLmkNumberOfSelectors,
+                    Panic( KLmkPanicSelectorArrayIndex ) );
+
+    CLmkDlgSelectorImplBase*& selector = iSelectors[iSelectorState];
+    if ( selector == NULL )
+        { // iSelector's pointer will be modified!
+        if ( iSelectorState == ELmkLandmarkSelector )
+            {
+            selector = CLmkDlgLmSelectorImpl::NewL( iDb );
+            if (iCustomLandmarksTitle) 
+            		{
+            		selector->CLmkDlgSelectorImplBase::SetDialogTitleL(*iCustomLandmarksTitle);
+            		}
+            }
+        else if ( iSelectorState == ELmkCategorySelector )
+            {
+            // Don't show empty categories -> 2nd parameter EFalse
+            selector = CLmkDlgCategorySelectorImpl::NewL( iDb, EFalse );
+            }
+        else //ELmkFilteredLmSelector
+            {
+            __ASSERT_DEBUG( iSelectorState == ELmkFilteredLmSelector,
+                            Panic( KLmkPanicWrongSelector ) );
+            CPosLmCategoryCriteria* criteria = CPosLmCategoryCriteria::NewLC();
+            criteria->SetCategoryItemId( aCategoryId );
+            selector = CLmkDlgLmSelectorImpl::NewL( iDb, criteria );
+            if (iCustomLandmarksTitle) 
+            		{
+            		selector->CLmkDlgSelectorImplBase::SetDialogTitleL(*iCustomLandmarksTitle);	
+            		}
+            CleanupStack::Pop(); // criteria, ownership was transferred
+            }
+
+        selector->SetMopParent(iMopParent);
+        selector->SetSelectorImplParent( this );
+        selector->SetMemento( *( iMementos[iSelectorState] ) );
+        selector->SetEmptyDlgLabel(iCurrentLabelPrimResource , iCurrentLabelSecResource);
+        }
+
+    return *selector;
+    }
+
+// ----------------------------------------------------
+// CLmkDlgCombiSelectorImpl::AddTabsL
+// ----------------------------------------------------
+//
+void CLmkDlgCombiSelectorImpl::AddTabsL(CAknTabGroup& aTabGroup)
+    {
+    aTabGroup.SetTabFixedWidthL(EAknTabWidthWithTwoTabs);
+
+    MAknsSkinInstance* skin = AknsUtils::SkinInstance();
+
+    TFileName filename( KLmkSystemMbmPath );
+    filename.Append(KLandmarksIconFileName);
+	CLmkUiUtils::GetFileWithCorrectDriveL( filename );
+
+    //Add tab icon 1
+    CFbsBitmap* lmkListBitmap = NULL;
+    CFbsBitmap* lmkBitmapMask = NULL;
+    
+    AknsUtils::CreateIconLC( skin,
+                            KAknsIIDQgnPropLmNamesTab2,
+                            lmkListBitmap,
+                            lmkBitmapMask,
+                            /**filename*/filename,
+                            EMbmLandmarksQgn_prop_lm_names_tab2,
+                            EMbmLandmarksQgn_prop_lm_names_tab2_mask );
+
+    CleanupStack::Pop(2); //lmkListBitmap, lmkBitmapMask
+
+    //Add tab icon 2
+    CFbsBitmap* lmkCatBitmap = NULL;
+    CFbsBitmap* lmkCatBitmapMask = NULL;
+
+    AknsUtils::CreateIconLC( skin,
+                            KAknsIIDQgnPropLmCategoriesTab2,
+                            lmkCatBitmap,
+                            lmkCatBitmapMask,
+                            /* *filename */filename,
+                            EMbmLandmarksQgn_prop_lm_categories_tab2,
+                            EMbmLandmarksQgn_prop_lm_categories_tab2_mask );
+
+    CleanupStack::Pop(2); //lmkCatBitmap, lmkCatBitmapMask
+
+    if(AknLayoutUtils::LayoutMirrored())
+    	{
+    	aTabGroup.AddTabL(ETabCategoryList, lmkCatBitmap, lmkCatBitmapMask); // ELmkByCategoryView
+    	aTabGroup.AddTabL( ETabLandmarkList, lmkListBitmap, lmkBitmapMask ); //ELmkByLmView
+    	}
+    else
+    	{
+    	aTabGroup.AddTabL( ETabLandmarkList, lmkListBitmap, lmkBitmapMask ); //ELmkByLmView
+    	aTabGroup.AddTabL(ETabCategoryList, lmkCatBitmap, lmkCatBitmapMask); // ELmkByCategoryView
+    	}
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkDlgCombiSelectorImpl::GetBitmapFilenameL
+// ----------------------------------------------------------------------------
+//
+HBufC* CLmkDlgCombiSelectorImpl::GetBitmapFilenameLC()
+	{
+	// Path and file name:
+	HBufC* filename = HBufC::NewLC( KMaxFileName);
+	TPtr fileNamePtr = 	filename->Des();
+	fileNamePtr.Append(KLmkSystemMbmPath);
+	fileNamePtr.Append(KLandmarksIconFileName);
+
+	TBuf<20> aApp; // Holds drive name where the file is stored
+	CEikAppUi *appUi = (CEikAppUi *)(iEnv->AppUi());
+	HBufC* fullPath = HBufC::NewLC( KMaxFileName);
+	*fullPath = appUi->Application()->AppFullName();
+	TPtr fullPathPtr =  fullPath->Des();
+	TParsePtr ptr(fullPathPtr);
+	aApp.Copy(ptr.Drive());
+
+	// Add drive to path & file name:
+	TParse parse;
+	User::LeaveIfError( parse.Set( fileNamePtr, &aApp, NULL ) );
+	CleanupStack::PopAndDestroy(2); // fullPath, filename
+	return parse.FullName().AllocLC();
+	}
+
+// ----------------------------------------------------------------------------
+// CLmkDlgCombiSelectorImpl::TabChangedL
+// ----------------------------------------------------------------------------
+//
+void CLmkDlgCombiSelectorImpl::TabChangedL( TInt /*aIndex*/ )
+	{
+	iNaviPane->PushL(*iNaviDeco);
+	iNavigating = ETrue;
+
+	TInt active = iTabGroup->ActiveTabId();
+
+	if ( active == ETabCategoryList ) // After tab change, ETabCategoryList tab is active
+		{
+		iSelectors[ETabLandmarkList]->StopExecutionL();
+		iSelectorState = ELmkLandmarkSelector;
+		}
+	else if( active == ETabLandmarkList ) // After tab change, ETabLandmarkList tab is active
+		{
+		iSelectors[ETabCategoryList]->StopExecutionL();
+		iSelectorState = ELmkCategorySelector;
+		}
+	}
+	
+// ----------------------------------------------------------------------------
+// CLmkDlgCombiSelectorImpl::SetDialogTitleL
+// ----------------------------------------------------------------------------
+//
+void CLmkDlgCombiSelectorImpl::SetDialogTitleL(const TDesC& aTitle)
+    {
+    delete iCustomLandmarksTitle;
+    iCustomLandmarksTitle = NULL;
+    iCustomLandmarksTitle = aTitle.AllocL();
+    }
+
+		
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/uicontrols/src/CLmkDlgLmSelectorImpl.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,305 @@
+/*
+* 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:    LandmarksUi Content File -
+*
+*/
+
+
+
+
+
+
+
+
+// INCLUDE FILES
+#include "CLmkDlgLmSelectorImpl.h"
+#include "CLmkMultiSelectorDialog.h"
+#include "CLmkLmItemListProvider.h"
+#include "LmkListProviderFactory.h"
+#include <lmkui.rsg>
+#include "CLmkDbUtils.h"
+#include "CLmkUiUtils.h"
+
+#include <EPos_CPosLmSearchCriteria.h>
+#include <EPos_CPosLmCategoryCriteria.h>
+#include <EPos_CPosLmCategoryManager.h>
+#include <eiktxlbx.h>
+#include <lmkerrors.h>
+
+
+#if defined(_DEBUG)
+
+// CONSTANTS
+/// Unnamed namespace for local definitions
+namespace {
+
+_LIT( KPanicMsg, "CLmkDlgLmSelectorImpl" );
+
+void Panic( TPanicCode aReason )
+    {
+    User::Panic( KPanicMsg, aReason );
+    }
+}  // namespace
+#endif
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CLmkDlgLmSelectorImpl::CLmkDlgLmSelectorImpl
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+CLmkDlgLmSelectorImpl::CLmkDlgLmSelectorImpl(
+    CPosLandmarkDatabase& aDb )
+    : CLmkDlgSelectorImplBase( aDb )
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkDlgLmSelectorImpl::CLmkDlgLmSelectorImpl
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+CLmkDlgLmSelectorImpl::CLmkDlgLmSelectorImpl(
+    CPosLandmarkDatabase& aDb,
+    CPosLmSearchCriteria* aCriteria )
+    : CLmkDlgSelectorImplBase( aDb ),
+      iCriteria( aCriteria )
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkDlgLmSelectorImpl::ConstructL
+// Symbian 2nd phase constructor can leave.
+// -----------------------------------------------------------------------------
+//
+void CLmkDlgLmSelectorImpl::ConstructL()
+    {
+    BaseConstructL();
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkDlgLmSelectorImpl::NewL
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CLmkDlgLmSelectorImpl* CLmkDlgLmSelectorImpl::NewL(
+    CPosLandmarkDatabase& aDb )
+    {
+    CLmkDlgLmSelectorImpl* self =
+        new( ELeave ) CLmkDlgLmSelectorImpl( aDb );
+
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop();
+
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkDlgLmSelectorImpl::NewL
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CLmkDlgLmSelectorImpl* CLmkDlgLmSelectorImpl::NewL(
+    CPosLandmarkDatabase& aDb,
+    CPosLmSearchCriteria* aCriteria )
+    {
+    CLmkDlgLmSelectorImpl* self =
+        new( ELeave ) CLmkDlgLmSelectorImpl( aDb, aCriteria );
+
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop();
+
+    return self;
+    }
+
+// ----------------------------------------------------
+// CLmkDlgLmSelectorImpl::~CLmkDlgLmSelectorImpl
+// ----------------------------------------------------
+//
+CLmkDlgLmSelectorImpl::~CLmkDlgLmSelectorImpl()
+    {
+    delete iCriteria;
+    }
+
+// ----------------------------------------------------
+// CLmkDlgLmSelectorImpl::SetupListProviderL
+// ----------------------------------------------------
+//
+void CLmkDlgLmSelectorImpl::SetupListProviderL()
+    {
+    if ( !iListProvider )
+        {
+        if ( iCriteria )
+            {
+            iListProvider =
+                LmkListProviderFactory::CreateProviderL( iDb, *iCriteria );
+            }
+        else
+            {
+            iListProvider =
+                LmkListProviderFactory::CreateProviderL( iDb,
+                                                         ELandmarkSelector );
+            }
+        iListProvider->AddObserverL( *this );
+        iListProvider->InitializeL();
+        }
+    }
+
+// ----------------------------------------------------
+// CLmkDlgLmSelectorImpl::ListProvider
+// ----------------------------------------------------
+//
+const CLmkListProviderBase& CLmkDlgLmSelectorImpl::ListProvider() const
+    {
+    __ASSERT_DEBUG( iListProvider, Panic( KLmkPanicNullMember ) );
+    return *iListProvider;
+    }
+
+// ----------------------------------------------------
+// CLmkDlgLmSelectorImpl::GetDlgResources
+// ----------------------------------------------------
+//
+void CLmkDlgLmSelectorImpl::GetDlgResources(
+    TBool aIsSingleSelector,
+    TInt& aTitlePaneResource,
+    TInt& aMenuBarResource,
+    TInt& aDialogResource ) const
+    {
+    aTitlePaneResource = R_LMK_LANDMARK_SELECTOR_TITLE;
+    aMenuBarResource = R_LMK_EMPTY_MENUBAR;
+
+    if ( aIsSingleSelector )
+        {
+        if ( iCriteria )
+            { // this is a "sub-dialog" when search criteria exists
+            aDialogResource = R_LMK_SELECTOR_OK_BACK_DLG;
+            }
+        else
+            {
+            aDialogResource = R_LMK_SELECTOR_OK_CANCEL_DLG;
+            }
+        }
+    else
+        {
+        if ( iCriteria )
+            { // this is a "sub-dialog" when search criteria exists
+            aDialogResource = R_LMK_SELECTOR_OK_BACK_MULTI_DLG;
+            }
+        else
+            {
+            aDialogResource = R_LMK_SELECTOR_OK_CANCEL_MULTI_DLG;
+            }
+        }
+    }
+
+// ----------------------------------------------------
+// CLmkDlgLmSelectorImpl::HandleListProviderEvent
+// ----------------------------------------------------
+//
+void CLmkDlgLmSelectorImpl::HandleListProviderEvent(
+    TLmkListProviderEventType aEvent )
+    {
+    // Give event to the dialog as the first step since others
+    // may then interact with the updated dialog:
+    if (iCriteria)
+	    {
+	    if ( aEvent == ELmkEventCategoryDeleted )
+		    {
+		    TBool result = ETrue;
+		    TRAP_IGNORE( result = CheckDbIfCriteriaCategoryExistsL() );
+		    if ( !result )
+    		    {
+    		    // Delete the dialog
+    		    delete iDialog;
+    		    iDialog = NULL;
+    		    }
+		    }
+		else if ( aEvent == ELmkEventCategoryUpdated )
+		    {
+		    TRAP_IGNORE( UpdateNaviLabelL() );
+		    }
+	    }
+    if ( iDialog )
+        {
+         iDialog->HandleListProviderEvent( aEvent );
+        }
+
+    // Base class implementation:
+    CLmkDlgSelectorImplBase::HandleListProviderEvent( aEvent );
+    }
+
+// ----------------------------------------------------
+// CLmkDlgLmSelectorImpl::HandleListProviderError
+// ----------------------------------------------------
+//
+void CLmkDlgLmSelectorImpl::HandleListProviderError( TInt aError )
+    {
+    // Base class implementation:
+    CLmkDlgSelectorImplBase::HandleListProviderError( aError );
+
+    if ( iDialog )
+        {
+        iDialog->HandleListProviderError( aError );
+        }
+    }
+
+// ----------------------------------------------------
+// CLmkDlgLmSelectorImpl::UpdateNaviLabelL
+// ----------------------------------------------------
+//
+void CLmkDlgLmSelectorImpl::UpdateNaviLabelL()
+    {
+    CPosLmCategoryCriteria* criteria =
+    reinterpret_cast<CPosLmCategoryCriteria*>( iCriteria );
+    TPosLmItemId categoryId( KPosLmNullItemId );
+    categoryId = criteria->CategoryItemId();
+    HBufC* catName = CLmkDbUtils::CategoryNameL( iDb, categoryId );
+    CleanupStack::PushL( catName );
+    iLmkUiUtils->StoreNaviPaneL();
+    iLmkUiUtils->CreateNaviLabelL(catName->Des());
+    CleanupStack::PopAndDestroy(); //catName
+    }
+
+// ----------------------------------------------------
+// CLmkDlgLmSelectorImpl::CheckDbIfCriteriaCategoryExistsL
+// ----------------------------------------------------
+//
+TBool CLmkDlgLmSelectorImpl::CheckDbIfCriteriaCategoryExistsL()
+    {
+    TBool result = ETrue;
+    CPosLmCategoryCriteria* criteria =
+    static_cast<CPosLmCategoryCriteria*>( iCriteria );
+    TPosLmItemId categoryId( KPosLmNullItemId );
+    categoryId = criteria->CategoryItemId();
+    if ( categoryId )
+        {
+        // Construction must fail if category has been deleted:
+		CPosLmCategoryManager* mgr = CPosLmCategoryManager::NewL( iDb );
+		CleanupStack::PushL( mgr );
+		// Leaves with KErrNotFound if category doesn't exist
+		TInt err = KErrNone;
+		TRAP(err,CPosLandmarkCategory* category = mgr->ReadCategoryLC( categoryId );CleanupStack::PopAndDestroy( category ));
+	    if(err == KErrNotFound)
+		    {
+		    result = EFalse;
+		    }
+		 CleanupStack::PopAndDestroy( 1 );//mgr
+        }
+    return result;
+    }
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/uicontrols/src/CLmkDlgPackageSelectorImpl.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,638 @@
+/*
+ * Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:    LandmarksUi Packaged Landmarks Selector View Implementation
+ *
+ */
+
+// SYSTEM INCLUDE FILES
+#include <featmgr.h>
+#include <AknDef.h>
+#include <StringLoader.h>
+#include <AknQueryDialog.h>
+#include <EPos_CPosLmCategoryManager.h>
+#include <AknsConstants.h>
+#include <AknIconArray.h>
+#include <eikmenup.h>
+#include <eikspane.h>
+#include <AknWaitDialog.h>
+#include <e32math.h>
+#include <hlplch.h>
+#include <csxhelp/lmmes.hlp.hrh>
+#include <avkon.mbg>
+#include <lmkui.rsg>
+
+// USER INCLUDE FILES
+#include "CLmkSaveLandmarkUtils.h"
+#include "CLmkDlgPackageSelectorImpl.h"
+#include "CLmkLmItemListProvider.h"
+#include "LmkListProviderFactory.h"
+#include "CLmkMultiSelectorDialog.h"
+#include "CLmkParser.h"
+#include "LmkConsts.h"
+#include "LmkUID.h"
+#include "CLmkSender.h"
+#include "CLmkPackageEditorImpl.h"
+#include "CLmkDlgSelectorImplBase.h"
+#include "CLmkUiUtils.h"
+#include "CLmkSelectorDialog.h"
+#include "CLmkSelectorLBModelBase.h"
+#include "CLmkSingleGraphicLBModel.h"
+#include "CLmkMultiSelectionLBModel.h"
+#include "CLmkLmItemListMemento.h"
+#include "CLmkSelectorIconMgr.h"
+#include "CLmkAOOperation.h"
+
+// ================= LOCAL FUNCTIONS =======================
+static void CleanupArray(TAny* aArray)
+    {
+    ( static_cast<RPointerArray<CPosLandmark>*>( aArray ) )->ResetAndDestroy();
+    }
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CLmkDlgPackageSelectorImpl::CLmkDlgPackageSelectorImpl
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+CLmkDlgPackageSelectorImpl::CLmkDlgPackageSelectorImpl(
+    CPosLandmarkDatabase& aDb,
+    CLmkParser& aParser,
+    CLmkSender& aSender )
+    : CLmkDlgLmSelectorImpl( aDb ),
+      iParser( aParser ),
+      iSender( aSender ),
+      iDb(aDb)
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkDlgPackageSelectorImpl::ConstructL
+// Symbian 2nd phase constructor can leave.
+// -----------------------------------------------------------------------------
+//
+void CLmkDlgPackageSelectorImpl::ConstructL()
+    {
+    CLmkDlgLmSelectorImpl::ConstructL();
+    iMapNavInterface = CLmkMapNavigationInterface::NewL( iDb );
+    iMapNavInterface->AttachAIWInterestL(R_LMK_PKGVIEWER_MENU, R_LMK_PACKAGE_AIW_INTEREST_SHOWONMAP);
+     for (TUint i(0); i < iParser.NumOfParsedLandmarks(); i++)
+	    {
+	    User::LeaveIfError( iTotalLms.Append(i) );
+	    }
+	iSaveLmUtils = CLmkSaveLandmarkUtils::NewL(iDb,iParser);
+	//setting of observer is needed for the search operation.
+	iSaveLmUtils->SetObserver(this);
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkDlgPackageSelectorImpl::NewL
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CLmkDlgPackageSelectorImpl* CLmkDlgPackageSelectorImpl::NewL(
+    CPosLandmarkDatabase& aDb,
+    CLmkParser& aParser,
+    CLmkSender& aSender )
+    {
+    CLmkDlgPackageSelectorImpl* self =
+        new( ELeave ) CLmkDlgPackageSelectorImpl( aDb, aParser, aSender );
+
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop();
+
+    return self;
+    }
+
+// ----------------------------------------------------
+// CLmkDlgPackageSelectorImpl::~CLmkDlgPackageSelectorImpl
+// ----------------------------------------------------
+//
+CLmkDlgPackageSelectorImpl::~CLmkDlgPackageSelectorImpl()
+    {
+    if(iMapNavInterface)
+    	{
+    	iMapNavInterface->Release();
+    	}
+    iTotalLms.Close();
+    delete iSaveLmUtils;
+    }
+
+// ----------------------------------------------------
+// CLmkDlgPackageSelectorImpl::HelpContext
+// ----------------------------------------------------
+//
+TCoeHelpContext CLmkDlgPackageSelectorImpl::HelpContext() const
+    {
+    return TCoeHelpContext( TUid::Uid( KLmkMsgViewerAppUID3 ),
+                            KLM_HLP_RECEIVED_PACKAGE );
+    }
+
+// ----------------------------------------------------
+// CLmkDlgPackageSelectorImpl::SetupListProviderL
+// ----------------------------------------------------
+//
+void CLmkDlgPackageSelectorImpl::SetupListProviderL()
+    {
+    if ( !iListProvider )
+        {
+        iListProvider =
+            LmkListProviderFactory::CreateProviderL( iParser );
+        iListProvider->AddObserverL( *this );
+        iListProvider->InitializeL();
+        }
+    }
+
+// ----------------------------------------------------
+// CLmkDlgPackageSelectorImpl::GetDlgResources
+// ----------------------------------------------------
+//
+
+
+void CLmkDlgPackageSelectorImpl::GetDlgResources(
+    TBool /*aIsSingleSelector*/,
+    TInt& aTitlePaneResource,
+    TInt& aMenuBarResource,
+    TInt& aDialogResource ) const
+    {
+    aTitlePaneResource = KZeroResourceId;
+    aMenuBarResource = R_LMK_PKGVIEWER_MENUBAR;
+    aDialogResource = R_LMK_PKGVIEWER_OPTIONS_BACK_DLG;
+    }
+
+
+
+// ----------------------------------------------------
+// CLmkDlgPackageSelectorImpl::HandleLaunchingEventL
+// ----------------------------------------------------
+//
+void CLmkDlgPackageSelectorImpl::HandleLaunchingEventL()
+    {
+    // Call base class implementation:
+    CLmkDlgSelectorImplBase::HandleLaunchingEventL();
+
+    // cast is safe, package selector is always multiselector
+    static_cast<CLmkMultiSelectorDialog*>( iDialog )->SetupSendMenu(
+                    iSender, R_LMK_PKGVIEWER_MENU, R_LMK_SENDUI_MENU_TEXT );
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkDlgPackageSelectorImpl::HandleOperationL
+// -----------------------------------------------------------------------------
+//
+void CLmkDlgPackageSelectorImpl::HandleOperationL(
+                                       TOperationTypes aType,
+                                       TReal32 /*aProgress*/,
+                                       TInt aStatus )
+    {
+    if(aType == ENewPkgCategory && aStatus != KPosLmOperationNotComplete)
+    	{
+    	if (iSaveLmUtils->CategoryAddConfirmationQueryL(iNoOfNewCategories,iNewCategoryFound) )
+			{
+			iType  = EImport;
+			iParser.StartImportingL( iTotalLms, ETrue );// Save landmarks with new categories
+			}
+		else
+			{
+			iType  = EImport;
+			iParser.StartImportingL( iTotalLms , EFalse); //Save landmarks without new categories
+			}
+    	}
+    else if( (aType == EImport ) && (aStatus != KPosLmOperationNotComplete && iWaitNote ))
+    	{
+    	iWaitNote->ProcessFinishedL();
+        iWaitNote = NULL;
+    	}
+    }
+
+// ----------------------------------------------------
+// CLmkDlgPackageSelectorImpl::GetLandmarksInPackageL
+// ----------------------------------------------------
+//
+void CLmkDlgPackageSelectorImpl::GetLandmarksInPackageL(RPointerArray<CPosLandmark> &aLmkArray)
+	{
+	const CArrayFix<TInt>* indexes = iDialog->ListBox()->SelectionIndexes();
+	CPosLandmark* lmk;
+	if(indexes->Count() == 0)
+		{
+		lmk = iParser.LandmarkLC(iDialog->ListBox()->CurrentItemIndex());
+		aLmkArray.Append(lmk);
+		CleanupStack::Pop();//iParser.LandmarkLC
+		}
+	else
+		{
+		TInt count = indexes->Count();
+		for(TInt i = 0;i < count; ++i)
+			{
+			TInt index = indexes->At(i);
+			lmk = iParser.LandmarkLC(index);
+			aLmkArray.Append(lmk);
+			CleanupStack::Pop();//iParser.LandmarkLC
+			}
+		}
+	}
+
+// ----------------------------------------------------
+// CLmkDlgPackageSelectorImpl::ProcessCommandL
+// ----------------------------------------------------
+//
+void CLmkDlgPackageSelectorImpl::ProcessCommandL( TInt aCommandId )
+    {
+    TInt aiwCmd = iMapNavInterface->GetServiceCmdByMenuCmd(aCommandId);
+
+    if(KAiwCmdNone != aiwCmd)
+    	{
+    	RPointerArray<CPosLandmark> lmkArray;
+    	switch(aiwCmd)
+    		{
+    		case KAiwCmdMnShowMap:
+    			{
+    			GetLandmarksInPackageL(lmkArray);
+    			CleanupStack::PushL( TCleanupItem( CleanupArray, &lmkArray ) );
+    			iMapNavInterface->ShowLandmarksOnMapL(lmkArray, aCommandId,
+    												CLmkMapNavigationInterface::EByLmkView);
+    			CleanupStack::PopAndDestroy(); // lmkArray
+    			break;
+    			}
+    		default:
+    			{
+    			break;
+    			}
+    		}
+    	return;
+    	}
+    switch ( aCommandId )
+        {
+        case EAknCmdHelp:
+            {
+            HlpLauncher::LaunchHelpApplicationL( iEnv->WsSession(),
+                                iEnv->EikAppUi()->AppHelpContextL() );
+            break;
+            }
+        case ELmkCmdSendVia1: // These commands are used by SendUi
+        case ELmkCmdSendVia2:
+        case ELmkCmdSendVia3:
+        case ELmkCmdSendVia4:
+        case ELmkCmdSendVia5:
+        case ELmkCmdSendVia6:
+        case ELmkCmdSendVia7:
+        case ELmkCmdSendVia8:
+        case ELmkCmdSendVia9:
+        case ELmkCmdSendVia10:
+        case ELmkCmdSend:
+            {
+            SendSelectedLandmarksCmdL(aCommandId);
+            break;
+            }
+        case ELmkCmdOpenLm:
+            {
+            OpenLandmarkCmdL();
+            break;
+            }
+        case ELmkCmdSaveSelectedLms:
+            {
+            SaveLandmarksCmdL();
+            break;
+            }
+        case ELmkCmdSaveAllLms:
+            {
+            SaveAllLandmarksCmdL();
+            break;
+            }
+        case ELmkCmdSendSelectedLms:
+            {
+            SendSelectedLandmarksCmdL(aCommandId);
+            break;
+            }
+        case ELmkCmdSendAllLms:
+            {
+            SendAllLandmarksCmdL(aCommandId);
+            break;
+            }
+        default:
+            {
+            // Command not handled here, forward it to the app ui.
+            static_cast<MEikCommandObserver*>(iEnv->EikAppUi())->ProcessCommandL( aCommandId );
+            break;
+            }
+        }
+    }
+
+// ----------------------------------------------------
+// CLmkDlgPackageSelectorImpl::DynInitDlgMenuPaneL
+// ----------------------------------------------------
+//
+void CLmkDlgPackageSelectorImpl::DynInitDlgMenuPaneL(TInt aResourceId,
+        CEikMenuPane* aMenuPane)
+    {
+    iMapNavInterface->HandleMenuOperationL(aResourceId, aMenuPane,
+            ELmkCmdMnNav);
+
+    TInt markedCount = ListMarkedItemCountL();
+
+    switch (aResourceId)
+        {
+        case R_LMK_PKGVIEWER_MENU:
+            {
+            if (FeatureManager::FeatureSupported(KFeatureIdLandmarksConverter))
+                {
+                aMenuPane->SetItemDimmed(ELmkCmdSendDummy, EFalse);
+                }
+            else
+                {
+                aMenuPane->SetItemDimmed(ELmkCmdSendDummy, ETrue);
+                }
+
+            if (FeatureManager::FeatureSupported(KFeatureIdHelp)
+                    && !iIsHideHelp)
+                {
+                aMenuPane->SetItemDimmed(EAknCmdHelp, EFalse);
+                }
+            else
+                {
+                aMenuPane->SetItemDimmed(EAknCmdHelp, ETrue);
+                }
+
+            if (markedCount < 1)
+                {
+                aMenuPane->SetItemDimmed(ELmkCmdOpenLm, ETrue);
+                }
+            else if (markedCount == 1)
+                {
+                aMenuPane->SetItemDimmed(ELmkCmdOpenLm, EFalse);
+                }
+            else if (markedCount > 1)
+                {
+                aMenuPane->SetItemDimmed(ELmkCmdOpenLm, ETrue);
+                }
+
+            TBool isLandmarkDataEmpty = EFalse;
+
+            // check for show on map for single selected landmark
+            if (markedCount == 1)
+                {
+                CLmkLandmark* lmklandmark = iParser.LmkLandmarkLC(
+                        iDialog->CurrentItemIndex());
+                if (IsLandmarkDataEmptyL(lmklandmark->PosLandmark()))
+                    {
+                    isLandmarkDataEmpty = ETrue;
+                    }
+                CleanupStack::PopAndDestroy(lmklandmark); //lmklandmark
+                }
+            else if (markedCount < 1)
+                {
+                isLandmarkDataEmpty = ETrue;
+                }
+
+            TInt cnt = aMenuPane->NumberOfItemsInPane();
+            for (TInt i = 0; i < cnt; ++i)
+                {
+                CEikMenuPaneItem::SData& itemData =
+                        aMenuPane->ItemDataByIndexL(i);
+                if (iMapNavInterface->GetServiceCmdByMenuCmd(
+                        itemData.iCommandId) == KAiwCmdMnShowMap)
+                    {
+		            if (isLandmarkDataEmpty)
+		                aMenuPane->SetItemDimmed(itemData.iCommandId, ETrue);
+		            else 
+		                aMenuPane->SetItemDimmed(itemData.iCommandId, EFalse);
+		            break;
+                    }
+                }
+            break;
+            }
+        case R_LMK_PKGVIEWER_SAVE_LANDMARK_SUBMENU:
+            {
+            if (markedCount < 1)
+                {
+                aMenuPane->SetItemDimmed(ELmkCmdSaveSelectedLms, ETrue);
+                }
+            break;
+            }
+        case R_LMK_PKGVIEWER_SEND_LANDMARK_SUBMENU:
+            {
+            if (markedCount < 1)
+                {
+                aMenuPane->SetItemDimmed(ELmkCmdSendSelectedLms, ETrue);
+                }
+            break;
+            }
+        default:
+            break;
+        }
+    }
+
+// ----------------------------------------------------
+// CLmkDlgPackageSelectorImpl::OpenLandmarkCmdL
+// ----------------------------------------------------
+//
+void CLmkDlgPackageSelectorImpl::OpenLandmarkCmdL()
+    {
+    CLmkPackageEditorImpl* editorImpl =
+        CLmkPackageEditorImpl::NewL( iDb, iParser, iSender,
+                                     iDialog->CurrentItemIndex() );
+    iParser.ChangeObserver(*editorImpl);
+    editorImpl->ExecuteLD();
+    // Restore the parser's observer back to LmkPkg Selector
+    iParser.ChangeObserver(*this);
+    }
+
+// ----------------------------------------------------
+// CLmkDlgPackageSelectorImpl::SaveLandmarksCmdL
+// ----------------------------------------------------
+//
+void CLmkDlgPackageSelectorImpl::SaveLandmarksCmdL()
+    {
+    const CArrayFix<TInt>* markedIndexes = iDialog->SelectionIndexes();
+    RArray<TUint> importIndexes;
+    CleanupClosePushL( importIndexes );
+    TInt count( markedIndexes->Count() );
+    TUint markedIndex (0);
+    if ( count > 0 )
+        {
+        for ( TInt i( 0 ); i < count; ++i )
+            {
+            User::LeaveIfError(
+                importIndexes.Append( markedIndexes->At( i ) ) );
+            }
+        markedIndex = importIndexes[0];
+        }
+    else
+        { // only highlighted item, no marked items
+        User::LeaveIfError(
+            importIndexes.Append( iDialog->CurrentItemIndex() ) );
+        markedIndex = iDialog->CurrentItemIndex();
+        }
+
+
+ 	CLmkSaveLandmarkUtils* saveLmUtils = CLmkSaveLandmarkUtils::NewL(iDb,iParser);
+	CleanupStack::PushL(saveLmUtils );
+
+	RArray<TCategoryName> newCategories;
+	CleanupClosePushL(newCategories);
+	TCategoryName newCategoryFound;
+
+	TInt noOfNewCategories = saveLmUtils->CheckForNewCategoriesL( importIndexes,newCategoryFound,newCategories);
+
+	if (saveLmUtils->CategoryAddConfirmationQueryL( noOfNewCategories,newCategoryFound) )
+		{
+		iParser.StartImportingL( importIndexes, ETrue );// Save landmarks with new categories
+		}
+	else
+		{
+		iParser.StartImportingL( importIndexes , EFalse); //Save landmarks without new categories
+		}
+    // wait note
+    iWaitNote = new (ELeave) CAknWaitDialog( NULL, ETrue );
+    if ( !iWaitNote->ExecuteLD( R_LMK_IMPORTING_WAIT_NOTE ) )
+        {
+        //making iWaitNote null, since framework destroys waitnote
+        //dialog on pressing cancel.
+        iWaitNote = NULL;
+        iParser.CancelImporting();
+       	CleanupStack::PopAndDestroy(3); // newCategories, saveLmUtils,totalLms
+		return;
+        }
+
+    // Saved confirmation note
+    saveLmUtils->LmsSavedConfirmationNoteL(importIndexes, markedIndex);
+
+	iDialog->ListBox()->ClearSelection();
+	iDialog->UpdateMskL();
+    CleanupStack::PopAndDestroy(3); // newCategories, saveLmUtils,importIndexes
+    }
+
+// ----------------------------------------------------
+// CLmkDlgPackageSelectorImpl::SaveAllLandmarksCmdL
+// ----------------------------------------------------
+//
+void CLmkDlgPackageSelectorImpl::SaveAllLandmarksCmdL()
+	{
+
+	RArray<TCategoryName> newCategories;
+	CleanupClosePushL(newCategories);
+	iSaveLmUtils->StartSearchNewCatL(iNoOfNewCategories,newCategories,iNewCategoryFound);
+	iType  = ENewPkgCategory;
+	// wait note
+	iWaitNote = new (ELeave) CAknWaitDialog( NULL, ETrue );
+	if ( !iWaitNote->ExecuteLD( R_LMK_IMPORTING_WAIT_NOTE ) )
+		{
+		//making iWaitNote null, since framework destroys waitnote
+	    //dialog on pressing cancel.
+	    iWaitNote = NULL;
+		(iType == ENewPkgCategory )?iSaveLmUtils->CancelSearchNewCat():iParser.CancelImporting();
+	    CleanupStack::PopAndDestroy();//newCategories
+		return;
+		}
+	// Saved confirmation note
+    iSaveLmUtils->LmsSavedConfirmationNoteL( iTotalLms );
+    CleanupStack::PopAndDestroy();//newCategories
+    }
+
+// ----------------------------------------------------
+// CLmkDlgPackageSelectorImpl::SendSelectedLandmarksCmdL
+// ----------------------------------------------------
+//
+void CLmkDlgPackageSelectorImpl::SendSelectedLandmarksCmdL(TInt aCommandId)
+    {
+    RPointerArray<CLmkLandmark> lmkArray;
+    const CArrayFix<TInt>* constMarkedIndexes = iDialog->SelectionIndexes();
+    TUint index(0);
+    TBool oneItemSelected = EFalse;
+    if (constMarkedIndexes->Count() == 0)
+        {
+        oneItemSelected = ETrue;
+        }
+    TInt markedItemCount = constMarkedIndexes->Count();
+    TInt i(0);
+    while( markedItemCount >0 || oneItemSelected)
+	    {
+	    if(oneItemSelected)
+		    {
+		    index = iDialog->CurrentItemIndex();
+		    oneItemSelected = EFalse;
+		    }
+		else
+			{
+			index = constMarkedIndexes->At(i);
+			i++;
+			}
+		CLmkLandmark* lmklandmark = iParser.LmkLandmarkLC(index);
+        User::LeaveIfError(lmkArray.Append(lmklandmark));
+        CleanupStack::Pop();//lmklandmark
+        --markedItemCount;
+	    }
+	iDialog->ListBox()->ClearSelection();
+	iDialog->UpdateMskL();
+    iSender.SendLandmarksL(aCommandId,iParser.PackageName(),lmkArray);
+    lmkArray.ResetAndDestroy();
+    }
+
+// ----------------------------------------------------
+// CLmkDlgPackageSelectorImpl::SendAllLandmarksCmdL
+// ----------------------------------------------------
+//
+void CLmkDlgPackageSelectorImpl::SendAllLandmarksCmdL(TInt aCommandId)
+    {
+
+    RPointerArray<CLmkLandmark> lmkArray;
+    for ( TInt i(0); i < iParser.NumOfParsedLandmarks(); i++ )
+        {
+        CLmkLandmark* lmklandmark = iParser.LmkLandmarkLC(i);
+        User::LeaveIfError(lmkArray.Append(lmklandmark));
+        CleanupStack::Pop();//lmklandmark
+        }
+
+	iSender.SendLandmarksL(aCommandId,iParser.PackageName(),lmkArray);
+    lmkArray.ResetAndDestroy();
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkDlgPackageSelectorImpl::IsLandmarkDataEmptyL
+// -----------------------------------------------------------------------------
+//
+TBool CLmkDlgPackageSelectorImpl::IsLandmarkDataEmptyL(
+        CPosLandmark* aLandmark)
+    {
+    // verify that destination landmark has coordinates
+    TLocality loc;
+    TBool isValid = (KErrNone == aLandmark->GetPosition(loc));
+    isValid &= !Math::IsNaN(loc.Latitude()) && !Math::IsNaN(loc.Longitude());
+    return !isValid;
+    
+/*    if (!isValid)
+        {
+        // verify that destination landmark has address info
+        TPositionFieldId fieldId = aLandmark->FirstPositionFieldId();
+        while (fieldId != EPositionFieldNone)
+            {
+            if (fieldId > EPositionFieldAddressCapabilitiesBegin && fieldId
+                    < EPositionFieldBuildingTelephone)
+                {
+                TPtrC field;
+                aLandmark->GetPositionField(fieldId, field);
+                if (field.Length())
+                    {
+                    isValid = ETrue;
+                    break;
+                    }
+                }
+            fieldId = aLandmark->NextPositionFieldId(fieldId);
+            }
+        }
+    return !isValid;*/
+    }
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/uicontrols/src/CLmkDlgSelectorImplBase.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,708 @@
+/*
+* 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:    LandmarksUi Content File -
+*
+*/
+
+
+
+
+
+
+
+
+// INCLUDE FILES
+#include <StringLoader.h>
+#include <aknlists.h>
+#include <aknsfld.h>
+#include <avkon.mbg>
+#include <AknsConstants.h>
+#include <AknIconArray.h>
+#include <lmkui.rsg>
+#include <locationvariationdomaincrkeys.h>
+#include <centralrepository.h>
+#include "LmkConsts.h"
+#include "CLmkUiUtils.h"
+#include "CLmkLmItemListProvider.h"
+#include "CLmkSelectorLBModelBase.h"
+#include "CLmkSingleGraphicLBModel.h"
+#include "CLmkMultiSelectionLBModel.h"
+#include "CLmkLmItemListMemento.h"
+#include "CLmkSelectorIconMgr.h"
+#include "CLmkSelectorDialog.h"
+#include "CLmkMultiSelectorDialog.h"
+#include "CLmkDlgSelectorImplBase.h"
+#include <lmkerrors.h>
+
+
+#if defined(_DEBUG)
+
+// CONSTANTS
+/// Unnamed namespace for local definitions
+namespace {
+
+_LIT( KPanicMsg, "CLmkDlgSelectorImplBase" );
+
+void Panic( TPanicCode aReason )
+    {
+    User::Panic( KPanicMsg, aReason );
+    }
+}  // namespace
+#endif
+_LIT(KFetchingData, " ");
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CLmkDlgSelectorImplBase::CLmkDlgSelectorImplBase
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+CLmkDlgSelectorImplBase::CLmkDlgSelectorImplBase( CPosLandmarkDatabase& aDb )
+    : CLmkSelectorImplBase( aDb ),
+      iDlgSelectorImplBaseLatestListEvent( ELmkEventNull ),
+      iTitle(0)
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkDlgSelectorImplBase::BaseConstructL
+// Symbian 2nd phase constructor can leave.
+// -----------------------------------------------------------------------------
+//
+void CLmkDlgSelectorImplBase::BaseConstructL()
+    {
+    CLmkSelectorImplBase::BaseConstructL();
+	
+    // Check if the Coordinates has to be hidden
+	CheckHideCoordinateL();
+
+    // CommonUi selector API promises that construction of a dialog leaves with
+    // KErrNotSupported if the framework is not available. This is satisfied
+    // since providers try to initialize the db during the construction.
+    // However, it is not really even important since the selector API cannot
+    // be even called if framework isn't available since the API requires
+    // a landmark db reference, and user can't get it without the framework!
+    }
+
+// ----------------------------------------------------
+// CLmkDlgSelectorImplBase::~CLmkDlgSelectorImplBase
+// ----------------------------------------------------
+//
+CLmkDlgSelectorImplBase::~CLmkDlgSelectorImplBase()
+    {
+    if( iTitle )
+    	delete iTitle;
+    }
+
+// ----------------------------------------------------
+// CLmkDlgSelectorImplBase::SetSelectorImplParent
+// ----------------------------------------------------
+//
+void CLmkDlgSelectorImplBase::SetSelectorImplParent(
+    CLmkDlgSelectorImplBase* aParent )
+    {
+    iSelectorImplParent = aParent;
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkDlgSelectorImplBase::SetMopParent
+// ?implementation_description
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CLmkDlgSelectorImplBase::SetMopParent( MObjectProvider* aParent )
+    {
+    iMopParent = aParent;
+    }
+
+// ----------------------------------------------------
+// CLmkDlgSelectorImplBase::ExecuteL
+// ----------------------------------------------------
+//
+TInt CLmkDlgSelectorImplBase::ExecuteL(
+    TPosLmItemId& aOpenedItem,
+    TBool aAlwaysModifyOpened )
+    {
+    const CLmkLmItemListProvider& provider =
+        static_cast<const CLmkLmItemListProvider&>( ListProvider() );
+
+    // First item in the list will be highlighted when launching the
+    // single item selector, regardless of aOpenedItem input value:
+    TInt index( 0 );
+    TInt result = ExecuteL( index );
+    if ( result || aAlwaysModifyOpened )
+        {
+        provider.GetSelectedItemId( aOpenedItem, index );
+        }
+    return result;
+    }
+
+// ----------------------------------------------------
+// CLmkDlgSelectorImplBase::ExecuteL
+// ----------------------------------------------------
+//
+TInt CLmkDlgSelectorImplBase::ExecuteL(
+    RArray<TPosLmItemId>& aSelectedItems,
+    TBool aAlwaysModifySelected )
+    {
+    const CLmkLmItemListProvider& provider =
+        static_cast<const CLmkLmItemListProvider&>( ListProvider() );
+
+    // If provider is not ready yet then selectedIndexes will not
+    // contain any/all pre-selected indexes but this is still
+    // a safe way to create an array for selections:
+    CArrayFix<TInt>* selectedIndexes =
+        provider.SelectedIndexesL( aSelectedItems );
+
+    // If provider is not ready yet we will need to set pre-selected
+    // indexes again later when it gets ready:
+    if ( iDlgSelectorImplBaseLatestListEvent != ELmkEventListReady )
+        {
+        // Pre-selected items will be set marked when provider is ready:
+        iInputSelectedItems = &aSelectedItems;
+        }
+
+    CleanupStack::PushL( selectedIndexes );
+
+    TInt result = ExecuteL( *selectedIndexes );
+
+    if ( result || aAlwaysModifySelected )
+        {
+        provider.GetSelectedItemIdsL( aSelectedItems,
+                                      *selectedIndexes );
+        }
+    else
+        {
+        //Below code, if user might have passed some
+        //pre-selection, which needs to be retunred
+        //back to the user in case of cancel.
+        RArray<TPosLmItemId> tempIdArray;
+        TInt count = aSelectedItems.Count();
+        for ( TInt i = 0; i < count; i++ )
+            {
+            TInt found = provider.SelectedIndex(aSelectedItems[i]);
+            if ( found < 0 )
+                {
+                tempIdArray.Append(aSelectedItems[i]);
+                }
+            }
+        count = tempIdArray.Count();
+        for ( TInt i = 0; i < count; i++ )
+            {
+            TInt found = aSelectedItems.Find(tempIdArray[i]);
+            if ( found != KErrNotFound )
+                {
+                aSelectedItems.Remove(found);
+                }
+            }
+        tempIdArray.Close();
+        }
+    CleanupStack::PopAndDestroy( selectedIndexes );
+    return result;
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkDlgSelectorImplBase::ExecuteL
+// ?implementation_description
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+TInt CLmkDlgSelectorImplBase::ExecuteL( TInt& aOpenedItem )
+    {
+    TInt menuBarResource( KZeroResourceId );
+    TInt dialogResource( KZeroResourceId );
+    TInt titleResource( KZeroResourceId );
+    GetDlgResources( ETrue, titleResource, menuBarResource, dialogResource );
+
+    CLmkSelectorLBModelBase* lbModel =
+        CLmkSingleGraphicLBModel::NewL( *iListProvider );
+    CleanupStack::PushL( lbModel );
+
+    CLmkSelectorDialog* dialog = CLmkSelectorDialog::NewL( aOpenedItem,
+                                                           lbModel,
+                                                           menuBarResource,
+                                                           this,iMemento, iListProvider );
+
+    dialog->SetNavigationObserver( *this );
+    dialog->SetMopParent( iMopParent );
+    dialog->PrepareLC( dialogResource );
+    dialog->SetHelpContext( HelpContext() );
+    dialog->SetDlgEmptyResource(iCurrentLabelPrimResource,iCurrentLabelSecResource);
+
+	HBufC* textForFetchingData;
+	textForFetchingData = HBufC::NewL(20);
+	CleanupStack::PushL(textForFetchingData);  // textForFetchingData
+	*textForFetchingData = KFetchingData;
+    dialog->ListBox()->View()->SetListEmptyTextL( *textForFetchingData);
+
+    CleanupStack::PopAndDestroy();  // textForFetchingData.
+
+    CAknIconArray* icons = SetupIconMgrLC();
+
+    dialog->SetIconArrayL( icons );
+    CleanupStack::Pop(); // icons
+
+    // pointer needs to be stored in a member during exection:
+    iDialog = dialog;
+    iLmkUiUtils->StoreTitlePaneL();
+    if (iTitle) {
+        HBufC* titleTextBuf = iTitle->AllocL();
+        iLmkUiUtils->ChangeTitlePaneL(titleTextBuf); // iLmkUiUtils takes ownership
+    }
+    else {
+        iLmkUiUtils->ChangeTitlePaneL( titleResource );
+    }
+    TInt result = iDialog->RunLD();
+    iDialog = NULL; // dialog was popped and destroyed
+    iLmkUiUtils->RestoreOldTitlePane();
+    CleanupStack::PopAndDestroy( lbModel );
+
+    return result;
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkDlgSelectorImplBase::ExecuteL
+// ?implementation_description
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+TInt CLmkDlgSelectorImplBase::ExecuteL( CArrayFix<TInt>& aSelectedItems )
+    {
+    TInt openedItemIndex( 0 );
+    TInt menuBarResource( KZeroResourceId );
+    TInt dialogResource( KZeroResourceId );
+    TInt titleResource( KZeroResourceId );
+
+
+    GetDlgResources( EFalse, titleResource, menuBarResource, dialogResource );
+
+		CLmkSelectorLBModelBase* lbModel =
+        CLmkMultiSelectionLBModel::NewL( *iListProvider );
+    CleanupStack::PushL( lbModel );
+
+    CLmkSelectorDialog* dialog = CLmkMultiSelectorDialog::NewL(
+                            openedItemIndex, &aSelectedItems, lbModel,
+                            menuBarResource, NULL, this, this,iMemento );
+
+    dialog->SetNavigationObserver( *this );
+    dialog->SetMopParent( iMopParent );
+    dialog->PrepareLC( dialogResource );
+    dialog->SetHelpContext( HelpContext() );
+    dialog->SetDlgEmptyResource(iCurrentLabelPrimResource,iCurrentLabelSecResource);
+
+  	HBufC* textForFetchingData;
+	textForFetchingData = HBufC::NewL(20);
+	CleanupStack::PushL(textForFetchingData);  // textForFetchingData
+	*textForFetchingData = KFetchingData;
+    dialog->ListBox()->View()->SetListEmptyTextL( *textForFetchingData);
+    CleanupStack::PopAndDestroy();  // textForFetchingData.
+
+
+    CAknIconArray* icons = SetupIconMgrLC();
+	TFileName* iconFile = CLmkUiUtils::AvkonIconFileLC();
+    iIconMgr->SetIconAtIndexZeroL( *iconFile,
+                                   KAknsIIDQgnPropCheckboxOn,
+                                   EMbmAvkonQgn_prop_checkbox_on,
+                                   EMbmAvkonQgn_prop_checkbox_on_mask );
+
+    iIconMgr->SetIconAtIndexOneL( *iconFile,
+                                  KAknsIIDQgnPropCheckboxOff,
+                                  EMbmAvkonQgn_prop_checkbox_off,
+                                  EMbmAvkonQgn_prop_checkbox_off_mask );
+
+    dialog->SetIconArrayL( icons );
+    CleanupStack::PopAndDestroy(); // iconFile
+    CleanupStack::Pop(); // icons
+
+    // pointer needs to be stored in a member during exection:
+    iDialog = dialog;
+    iLmkUiUtils->StoreTitlePaneL();
+    if (iTitle) {
+        HBufC* titleTextBuf = iTitle->AllocL();
+        iLmkUiUtils->ChangeTitlePaneL(titleTextBuf); // iLmkUiUtils takes ownership
+    }
+    else {
+        iLmkUiUtils->ChangeTitlePaneL( titleResource );
+    }
+
+    TInt result = iDialog->RunLD();
+    iDialog = NULL; // dialog was popped and destroyed
+    iLmkUiUtils->RestoreOldTitlePane();
+    CleanupStack::PopAndDestroy( lbModel );
+
+    return result;
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkDlgSelectorImplBase::ExecuteL
+// ?implementation_description
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+TInt CLmkDlgSelectorImplBase::ExecuteL( CArrayFix<TInt>& aSelectedItems, TPtrC aTitlePaneText )
+    {
+    TInt openedItemIndex( 0 );
+    TInt menuBarResource( KZeroResourceId );
+    TInt dialogResource( KZeroResourceId );
+    TInt titleResource( KZeroResourceId );
+
+    GetDlgResources( EFalse, titleResource, menuBarResource, dialogResource );
+
+
+    CLmkSelectorLBModelBase* lbModel =
+        CLmkMultiSelectionLBModel::NewL( *iListProvider );
+    CleanupStack::PushL( lbModel );
+
+    CLmkSelectorDialog* dialog = CLmkMultiSelectorDialog::NewL(
+                            openedItemIndex, &aSelectedItems, lbModel,
+                            menuBarResource, NULL, this, this,iMemento );
+
+    dialog->SetNavigationObserver( *this );
+    dialog->SetMopParent( iMopParent );
+    dialog->PrepareLC( dialogResource );
+    dialog->SetHelpContext( HelpContext() );
+	dialog->SetDlgEmptyResource(iCurrentLabelPrimResource,iCurrentLabelSecResource);
+
+    HBufC* textForFetchingData;
+	textForFetchingData = HBufC::NewL(20);
+	CleanupStack::PushL(textForFetchingData);  // textForFetchingData
+	*textForFetchingData = KFetchingData;
+    dialog->ListBox()->View()->SetListEmptyTextL( *textForFetchingData);
+    CleanupStack::PopAndDestroy();  // textForFetchingData.
+
+    CAknIconArray* icons = SetupIconMgrLC();
+	TFileName* iconFile = CLmkUiUtils::AvkonIconFileLC();
+    iIconMgr->SetIconAtIndexZeroL( *iconFile,
+                                   KAknsIIDQgnPropCheckboxOn,
+                                   EMbmAvkonQgn_prop_checkbox_on,
+                                   EMbmAvkonQgn_prop_checkbox_on_mask );
+
+    iIconMgr->SetIconAtIndexOneL( *iconFile,
+                                  KAknsIIDQgnPropCheckboxOff,
+                                  EMbmAvkonQgn_prop_checkbox_off,
+                                  EMbmAvkonQgn_prop_checkbox_off_mask );
+
+    dialog->SetIconArrayL( icons );
+    CleanupStack::PopAndDestroy(); // iconFile
+    CleanupStack::Pop(); // icons
+
+    // pointer needs to be stored in a member during exection:
+    iDialog = dialog;
+    iLmkUiUtils->StoreTitlePaneL();
+
+    HBufC* titleText  = NULL;
+
+    titleText  = aTitlePaneText.AllocL();
+
+    iLmkUiUtils->ChangeTitlePaneL(titleText );
+
+    TInt result = iDialog->RunLD();
+    iDialog = NULL; // dialog was popped and destroyed
+    iLmkUiUtils->RestoreOldTitlePane();
+    CleanupStack::PopAndDestroy( lbModel );
+
+    return result;
+    }
+
+
+// ----------------------------------------------------
+// CLmkDlgSelectorImplBase::HelpContext
+// ----------------------------------------------------
+//
+TCoeHelpContext CLmkDlgSelectorImplBase::HelpContext() const
+    {
+    // Default null help context:
+    return TCoeHelpContext();
+    }
+
+// ----------------------------------------------------
+// CLmkDlgSelectorImplBase::StopExecutionL
+// ----------------------------------------------------
+//
+void CLmkDlgSelectorImplBase::StopExecutionL()
+    {
+    delete iDialog;
+    iDialog = NULL;
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkDlgSelectorImplBase::MementoL
+// -----------------------------------------------------------------------------
+//
+MLmkListMemento* CLmkDlgSelectorImplBase::MementoL()
+    {
+    CLmkLmItemListMemento* memento = CLmkLmItemListMemento::NewL();
+    return memento;
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkDlgSelectorImplBase::ListVisibleItemCount
+// -----------------------------------------------------------------------------
+//
+TInt CLmkDlgSelectorImplBase::ListVisibleItemCount()
+    {
+    TInt retval( 0 );
+    if ( iDialog )
+        {
+        retval = iDialog->NumberOfItems();
+        }
+    return retval;
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkDlgSelectorImplBase::ListMarkedItemCountL
+// -----------------------------------------------------------------------------
+//
+TInt CLmkDlgSelectorImplBase::ListMarkedItemCountL()
+    {
+    TInt retval( 0 );
+    if ( iDialog )
+        {
+        const CArrayFix<TInt>* markedIndexes = iDialog->SelectionIndexes();
+        retval = markedIndexes->Count();
+        }
+    return retval;
+    }
+
+// ----------------------------------------------------
+// CLmkDlgSelectorImplBase::ProcessCommandL
+// ----------------------------------------------------
+//
+void CLmkDlgSelectorImplBase::ProcessCommandL( TInt aCommandId )
+    {
+    if ( iSelectorImplParent )
+        {
+        iSelectorImplParent->ProcessCommandL( aCommandId );
+        }
+    }
+
+// ----------------------------------------------------
+// CLmkDlgSelectorImplBase::DynInitDlgMenuPaneL
+// ----------------------------------------------------
+//
+void CLmkDlgSelectorImplBase::DynInitDlgMenuPaneL(
+    TInt aResourceId,
+    CEikMenuPane* aMenuPane )
+    {
+    if ( iSelectorImplParent )
+        {
+        iSelectorImplParent->DynInitDlgMenuPaneL( aResourceId, aMenuPane );
+        }
+    }
+
+// ----------------------------------------------------
+// CLmkDlgSelectorImplBase::HandleListProviderEvent
+// ----------------------------------------------------
+//
+void CLmkDlgSelectorImplBase::HandleListProviderEvent(
+    TLmkListProviderEventType aEvent )
+    {
+    iDlgSelectorImplBaseLatestListEvent = aEvent;
+
+    if ( ( iDlgSelectorImplBaseLatestListEvent == ELmkEventListReady ||
+    		iDlgSelectorImplBaseLatestListEvent == ELmkEventItemAdditionComplete ) &&
+         	iInputSelectedItems )
+        { // First attempt to set pre-selected items wasn't successful,
+          // but now list provider is ready so let's try again:
+        TRAPD( ignore, RetrySetPreSelectedL() );
+        if (ignore != KErrNone)
+        {
+        ignore = KErrNone;
+        }
+        iInputSelectedItems = NULL;
+        }
+        if (iDialog)
+	        {
+	        TRAP_IGNORE(iDialog->UpdateMskL());
+	        }
+    if ( iSelectorImplParent )
+        {
+        iSelectorImplParent->HandleListProviderEvent( aEvent );
+        }
+    // It's better do this as last step as base class restores memento
+    // which should be done AFTER event has been handled otherwise:
+    if(iDialog && iDialog->ListBox()->View() && iDialog->ListBox()->Model())
+        {
+        CLmkSelectorImplBase::HandleListProviderEvent( aEvent );
+        }
+    if( iDialog )
+        {
+        TInt index = iDialog->ListBox()->CurrentItemIndex();
+        TInt count = iDialog->ListBox()->Model()->NumberOfItems();
+
+        if ( index == KErrNotFound && count > 0)
+            {
+            iDialog->ListBox()->SetCurrentItemIndex(count - 1);
+            }
+        }
+    if(iDialog && (iDialog->ListBox()->Model()->NumberOfItems() == 0))
+    	{
+    	if(iMemento)
+	    	{
+	    	CLmkLmItemListMemento* memento =
+	    							static_cast<CLmkLmItemListMemento*>(iMemento);
+	    	memento->UpdateModelAvailability(ETrue);
+	    	}
+
+	    if(aEvent != ELmkEventFindListReady)
+	    	{
+	    	iDialog->ShowFindBox(EFalse);
+	    	}
+	    iDialog->EnableLeftSoftKey(EFalse);
+    	}
+    else if	(iDialog && (iDialog->ListBox()->Model()->NumberOfItems() > 0))
+    	{
+    	if(iMemento)
+	    	{
+	    	CLmkLmItemListMemento* memento =
+	    							static_cast<CLmkLmItemListMemento*>(iMemento);
+	    	memento->UpdateModelAvailability(ETrue);
+	    	}
+    	// Enable the find box
+    	if(aEvent != ELmkEventFindListReady)
+	    	{
+	    	iDialog->ShowFindBox(ETrue);
+	    	}
+    	iDialog->EnableLeftSoftKey(ETrue);
+    	}
+    if(iDialog)
+    	{
+    	iDialog->ListBox()->DrawDeferred();
+    	}
+    }
+
+// ----------------------------------------------------
+// CLmkDlgSelectorImplBase::HandleListProviderError
+// ----------------------------------------------------
+//
+void CLmkDlgSelectorImplBase::HandleListProviderError( TInt aError )
+    {
+    if ( iSelectorImplParent )
+        {
+        iSelectorImplParent->HandleListProviderError( aError );
+        }
+    }
+
+// ----------------------------------------------------
+// CLmkDlgSelectorImplBase::HandleNavigationEventL
+// ----------------------------------------------------
+//
+TKeyResponse CLmkDlgSelectorImplBase::HandleNavigationEventL(
+    const TKeyEvent& aKeyEvent )
+    {
+    if ( iSelectorImplParent )
+        {
+        return iSelectorImplParent->HandleNavigationEventL( aKeyEvent );
+        }
+    else
+        {
+        return EKeyWasNotConsumed;
+        }
+    }
+
+// ----------------------------------------------------
+// CLmkDlgSelectorImplBase::HandleLaunchingEventL
+// ----------------------------------------------------
+//
+void CLmkDlgSelectorImplBase::HandleLaunchingEventL()
+    {
+    if ( iSelectorImplParent )
+        {
+        iSelectorImplParent->HandleLaunchingEventL();
+        }
+    // listbox always exists when HandleLaunchingEventL() is called:
+    __ASSERT_DEBUG( iDialog && iDialog->ListBox(),
+                    Panic( KLmkPanicNullListBox ) );
+    Restore( *( iDialog->ListBox() ), *iListProvider, iDialog->HasFindBox() );
+    }
+
+// ----------------------------------------------------
+// CLmkDlgSelectorImplBase::HandleClosingEventL
+// ----------------------------------------------------
+//
+void CLmkDlgSelectorImplBase::HandleClosingEventL()
+    {
+    if ( iSelectorImplParent )
+        {
+        iSelectorImplParent->HandleClosingEventL();
+        }
+    // listbox always exists when HandleClosingEventL() is called:
+    __ASSERT_DEBUG( iDialog->ListBox(), Panic( KLmkPanicNullListBox ) );
+    Store( *( iDialog->ListBox() ), *iListProvider, iDialog->HasFindBox() );
+    }
+
+// ----------------------------------------------------
+// CLmkDlgSelectorImplBase::RetrySetPreSelectedL
+// ----------------------------------------------------
+//
+void CLmkDlgSelectorImplBase::RetrySetPreSelectedL()
+    {
+    const CLmkLmItemListProvider& provider =
+        static_cast<const CLmkLmItemListProvider&>( ListProvider() );
+    CArrayFix<TInt>* selectedIndexes =
+        provider.SelectedIndexesL( *iInputSelectedItems );
+    CleanupStack::PushL( selectedIndexes );
+    __ASSERT_DEBUG( iDialog && iDialog->ListBox(),
+                    Panic( KLmkPanicNullListBox ) );
+    iDialog->ListBox()->SetSelectionIndexesL( selectedIndexes );
+    CAknFilteredTextListBoxModel* model =
+	         static_cast<CAknFilteredTextListBoxModel*>( iDialog->ListBox()->Model() );
+            model->Filter()->UpdateSelectionIndexesL();
+     model->Filter()->HandleItemArrayChangeL();
+    // Listbox made a copy of selection indexes
+    CleanupStack::PopAndDestroy( selectedIndexes );
+    }
+
+// ----------------------------------------------------
+// CLmkDlgSelectorImplBase::SetEmptyDlgLabel
+// ----------------------------------------------------
+//
+void CLmkDlgSelectorImplBase::SetEmptyDlgLabel(TInt aLabelPrimRes, TInt aLabelSecRes)
+	{
+	iCurrentLabelPrimResource = aLabelPrimRes;
+	iCurrentLabelSecResource = aLabelSecRes;
+	}
+
+// ---------------------------------------------------------
+// CLmkDlgSelectorImplBase::CheckHideCoordinateL()
+// ---------------------------------------------------------
+//
+void CLmkDlgSelectorImplBase::CheckHideCoordinateL()
+	{
+    TInt helpSettingValue = ELocHelpNotHidden;
+    CRepository* repository = CRepository::NewL( TUid::Uid( KCRUidLocLocalVariation) );
+    CleanupStack::PushL( repository ); 
+    User::LeaveIfError( repository->Get( KLocHideHelp,
+                                              helpSettingValue ));  
+    CleanupStack::PopAndDestroy( repository );
+	
+	if( ELocHelpHidden == helpSettingValue )
+		iIsHideHelp = ETrue;
+	else
+		iIsHideHelp = EFalse;
+	 
+	}
+
+// ---------------------------------------------------------
+// CLmkDlgSelectorImplBase::SetDialogTitleL
+// ---------------------------------------------------------
+//
+void CLmkDlgSelectorImplBase::SetDialogTitleL(const TDesC& aTitle)
+    {
+    delete iTitle;
+    iTitle = NULL;
+    iTitle = aTitle.AllocL();
+    }
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/uicontrols/src/CLmkDoubleGraphicLBModel.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,108 @@
+/*
+* 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:    LandmarksUi Content File -
+*
+*/
+
+
+
+
+
+
+
+
+// INCLUDE FILES
+#include "CLmkDoubleGraphicLBModel.h"
+#include "CLmkListProviderBase.h"
+#include "CLmkSelectorCache.h"
+#include "CLmkUiItemBase.h"
+#include <lmkui.rsg>
+#include <EPos_Landmarks.h>
+#include <e32keys.h>
+#include <eikenv.h>
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CLmkDoubleGraphicLBModel::CLmkDoubleGraphicLBModel
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+CLmkDoubleGraphicLBModel::CLmkDoubleGraphicLBModel()
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkDoubleGraphicLBModel::ConstructL
+// Symbian 2nd phase constructor can leave.
+// -----------------------------------------------------------------------------
+//
+void CLmkDoubleGraphicLBModel::ConstructL(CLmkListProviderBase& aListProvider)
+    {
+    BaseConstructL( aListProvider );
+
+    iEmpty = CEikonEnv::Static()->AllocReadResourceL(
+                R_LMK_CATEGORY_SETTINGS_EMPTY );
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkDoubleGraphicLBModel::NewL
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+CLmkDoubleGraphicLBModel* CLmkDoubleGraphicLBModel::NewL(
+    CLmkListProviderBase& aListProvider )
+    {
+    CLmkDoubleGraphicLBModel* self = new( ELeave )
+    				CLmkDoubleGraphicLBModel();
+
+    CleanupStack::PushL( self );
+    self->ConstructL( aListProvider );
+    CleanupStack::Pop();
+
+    return self;
+    }
+
+// ----------------------------------------------------
+// CLmkDoubleGraphicLBModel::~CLmkDoubleGraphicLBModel
+// ----------------------------------------------------
+//
+CLmkDoubleGraphicLBModel::~CLmkDoubleGraphicLBModel()
+    {
+    delete iEmpty;
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkDoubleGraphicLBModel::MdcaPointL
+// ?implementation_description
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+void CLmkDoubleGraphicLBModel::MdcaPointL( TInt aIndex ) const
+    {
+    CLmkUiItemBase& item = iCache->ItemAtL( aIndex );
+    TPtr16 modBuffer = iBuffer->Des();
+    modBuffer.Zero();
+    modBuffer.AppendNum( item.GetIconId() );
+    modBuffer.Append( EKeyTab );
+    modBuffer.Append( item.Text() );
+    modBuffer.Append( EKeyTab );
+    if ( item.ExtensionIntExists() && !item.ExtensionInt() )
+        {
+        modBuffer.Append( *iEmpty );
+        }
+    modBuffer.Append( EKeyTab );
+    }
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/uicontrols/src/CLmkEditorCoordinateField.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,245 @@
+/*
+* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:    Methods for Landmark editor number field.
+*
+*/
+
+
+
+
+
+
+
+// INCLUDE FILES
+#include "CLmkEditorCoordinateField.h"
+#include "MLmkEditorUiBuilder.h"
+#include "LmkConsts.h"
+#include "landmarks.hrh"
+#include <eikcapc.h>
+#include <e32math.h>
+#include <lbsposition.h>
+#include <aknlocationed.h>
+#include <barsread.h>
+#include <lmkui.rsg>
+
+// CONSTANTS
+/// Unnamed namespace for local definitions
+namespace {
+const TReal KDefaultHorizontalAccuracy = 0.1;
+}  // namespace
+
+// ================= MEMBER FUNCTIONS =======================
+
+// ----------------------------------------------------
+// CLmkEditorCoordinateField::CLmkEditorCoordinateField
+// ----------------------------------------------------
+//
+CLmkEditorCoordinateField::CLmkEditorCoordinateField
+        ( MLmkFieldData& aField,
+		  MLmkEditorUiBuilder& aUiBuilder ) :
+    CLmkEditorFieldBase( aField, aUiBuilder )
+    {
+    }
+
+// ----------------------------------------------------
+// CLmkEditorCoordinateField::ConstructL
+// ----------------------------------------------------
+//
+void CLmkEditorCoordinateField::ConstructL()
+    {
+    // Create and insert a line in the dialog
+	//using AVKON's coordinate editor
+	CreateAvkonCoordinateEditorL();
+    iCaptionedCtrl = iUiBuilder.LineControl( ControlId() );
+    iCaptionedCtrl->SetTakesEnterKey( ETrue );
+    TPosition position;
+	iControl->Get(position);
+	if (iIsLatitude)
+		{
+		iCurrentValue = position.Latitude();
+		}
+	else
+		{
+		iCurrentValue = position.Longitude();
+		}
+    }
+
+// ----------------------------------------------------
+// CLmkEditorCoordinateField::NewL
+// ----------------------------------------------------
+//
+CLmkEditorCoordinateField* CLmkEditorCoordinateField::NewL
+        ( MLmkFieldData& aField,
+		 MLmkEditorUiBuilder& aUiBuilder )
+    {
+    CLmkEditorCoordinateField* self =
+        new(ELeave) CLmkEditorCoordinateField( aField, aUiBuilder );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+// ----------------------------------------------------
+// CLmkEditorCoordinateField::~CLmkEditorCoordinateField
+// ----------------------------------------------------
+//
+CLmkEditorCoordinateField::~CLmkEditorCoordinateField()
+    {
+    }
+
+// ----------------------------------------------------
+// CLmkEditorCoordinateField::SaveFieldL
+// ----------------------------------------------------
+//
+TBool CLmkEditorCoordinateField::SaveFieldL()
+    {
+    TPosition position;
+	iControl->Get(position);
+	TReal field = LandmarkItemField().DoubleData();
+	TReal controlData;
+	if (iIsLatitude)
+		{
+		controlData = position.Latitude();
+		}
+	else
+		{
+		controlData = position.Longitude();
+		}
+
+	if( iCurrentValue != controlData)
+		{
+		LandmarkItemField().SetTReal(controlData);
+		}
+   	return ETrue;
+    }
+
+// ----------------------------------------------------
+// CLmkEditorCoordinateField::ActivateL
+// ----------------------------------------------------
+//
+void CLmkEditorCoordinateField::ActivateL()
+    {
+    iCaptionedCtrl->ActivateL();
+    }
+
+// ----------------------------------------------------
+// CLmkEditorCoordinateField::UpdateL
+// ----------------------------------------------------
+//
+void CLmkEditorCoordinateField::UpdateL()
+    {
+    TReal fieldData = LandmarkItemField().DoubleData();
+	TPosition position = ConstructPosition(fieldData);
+	iControl->Set(position);
+	iControl->DrawDeferred();
+    }
+
+// ----------------------------------------------------
+// CLmkEditorCoordinateField::CreateAvkonCoordinateEditorL
+// ----------------------------------------------------
+//
+void CLmkEditorCoordinateField::CreateAvkonCoordinateEditorL()
+	{
+		//using AVKON's coordinate editor
+	iControl = static_cast<CAknLocationEditor*>( iUiBuilder.CreateLineL(
+            FieldLabel(), LandmarkItemField().UniqueFieldIdentity(),
+            EAknCtLocationEditor));
+    ConstructEditorFromResourceL();
+
+	}
+// ----------------------------------------------------
+// CLmkEditorCoordinateField::ConstructEditorFromResourceL
+// ----------------------------------------------------
+//
+void CLmkEditorCoordinateField::ConstructEditorFromResourceL()
+	{
+
+	TRealX fieldData;
+	fieldData.SetNaN();
+	TInt resId = R_LMK_LONG_EDITOR;
+	fieldData = LandmarkItemField().DoubleData();
+	if	(LandmarkItemField().FieldType() == ELatitude )
+		{
+		resId = R_LMK_LAT_EDITOR;
+		iIsLatitude = ETrue;
+		}
+	TPosition position = ConstructPosition(fieldData);
+	TResourceReader reader;
+	iEnv->CreateResourceReaderLC(reader, resId);
+	iControl->ConstructFromResourceL(reader);
+	iControl->Set(position);
+	CleanupStack::PopAndDestroy(); // reader
+	}
+// ----------------------------------------------------
+// CLmkEditorCoordinateField::ConstructPosition
+// ----------------------------------------------------
+//
+TPosition CLmkEditorCoordinateField::ConstructPosition(const TReal& aValue)
+	{
+	TRealX latData;
+	latData.SetNaN();
+	TRealX longData;
+	longData.SetNaN();
+	TTime time;
+	time.HomeTime();
+	if (iIsLatitude)
+		{
+		latData = aValue;
+		}
+	else
+		{
+		longData = aValue;
+		}
+	TCoordinate coord(latData, longData);
+	TLocality loc(coord, KDefaultHorizontalAccuracy);
+	TPosition position(loc, time);
+	return position;
+	}
+
+// -----------------------------------------------------------------------------
+//CLmkEditorFieldBase::FieldValue()
+// -----------------------------------------------------------------------------
+//
+TReal CLmkEditorCoordinateField::FieldValue() const
+	{
+	TReal64 number = 0;
+	if (iControl)
+		{
+		TPosition pos;
+        iControl->Get(pos);
+        if (iIsLatitude)
+        	{
+        	number = pos.Latitude();
+        	}
+        else
+        	{
+        	number = pos.Longitude();
+        	}
+		}
+	return number;
+	}
+
+// -----------------------------------------------------------------------------
+//CLmkEditorFieldBase::ResetL()
+// -----------------------------------------------------------------------------
+//
+void CLmkEditorCoordinateField::ResetL()
+	{
+	TRealX latData;
+	latData.SetNaN();
+	TPosition position = ConstructPosition(latData);
+	iControl->Set(position);
+	}
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/uicontrols/src/CLmkEditorFieldArray.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,382 @@
+/*
+* 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:    LandmarksUi Content File -
+*           Methods for Landmark editor field array.
+*
+*/
+
+
+
+
+
+
+
+// INCLUDE FILES
+#include "CLmkEditorFieldArray.h"  // this class
+#include "MLmkEditorUiBuilder.h"
+#include "MLmkEditorField.h"
+#include "LmkEditorFieldFactory.h"
+#include "CLmkFields.h"
+#include "landmarks.hrh"
+#include "CLmkUiUtils.h"
+#include <bldvariant.hrh>
+#include <EPos_CPosLandmark.h>
+// Code added
+#include <e32math.h>
+#include <e32des16.h>
+
+// CONSTANTS
+/// Unnamed namespace for local definitions
+namespace {
+const TInt KNumberOfFields( 5 );
+}  // namespace
+// ================= MEMBER FUNCTIONS =======================
+
+// ----------------------------------------------------
+// CLmkEditorFieldArray::CLmkEditorFieldArray
+// ----------------------------------------------------
+//
+CLmkEditorFieldArray::CLmkEditorFieldArray( CLmkFields& aLmkFields,
+        MLmkEditorUiBuilder& aUiBuilder ) :
+    iLmkFields( aLmkFields ),
+    iUiBuilder( aUiBuilder ),
+    iFieldArray(KNumberOfFields)
+    {
+    }
+
+// ----------------------------------------------------
+// CLmkEditorFieldArray::ConstructL
+// ----------------------------------------------------
+//
+void CLmkEditorFieldArray::ConstructL()
+    {
+	    iCategoryFlag = EFalse; // Used for showing categories
+    }
+
+// ----------------------------------------------------
+// CLmkEditorFieldArray::NewL
+// ----------------------------------------------------
+//
+CLmkEditorFieldArray* CLmkEditorFieldArray::NewL
+        ( CLmkFields& aLmkFields,
+        MLmkEditorUiBuilder& aUiBuilder )
+    {
+	CLmkEditorFieldArray* dlg = new(ELeave) CLmkEditorFieldArray( aLmkFields,
+                                                                  aUiBuilder );
+    CleanupStack::PushL( dlg );
+    dlg->ConstructL();
+    CleanupStack::Pop();  // dlg
+    return dlg;
+    }
+
+// ----------------------------------------------------
+// CLmkEditorFieldArray::~CLmkEditorFieldArray
+// ----------------------------------------------------
+//
+CLmkEditorFieldArray::~CLmkEditorFieldArray()
+    {
+    iFieldArray.ResetAndDestroy();
+    }
+
+// ----------------------------------------------------
+// CLmkEditorFieldArray::UpdateFieldsL
+// ----------------------------------------------------
+//
+void CLmkEditorFieldArray::UpdateFieldsL( const TUint16 aFieldType )
+    {
+    TInt count = iFieldArray.Count();
+    for ( TInt i=0; i < count; i++ )
+        {
+        if ( ( iFieldArray[i]->LandmarkItemField().FieldType() ==
+               aFieldType ) || ( aFieldType == EAllEditorItems ) )
+            {
+            iFieldArray[i]->UpdateL();
+            }
+        }
+    }
+
+// ----------------------------------------------------
+// CLmkEditorFieldArray::CreateFieldsFromLmkL
+// ----------------------------------------------------
+//
+void CLmkEditorFieldArray::CreateFieldsFromLmkL()
+    {
+    CArrayPtrFlat<MLmkFieldData>& fields = iLmkFields.Fields();
+    TInt count = fields.Count();
+
+    for ( TInt i = 0; i < count; i++ )
+        {
+        MLmkFieldData& lmkItemField = *fields[i];
+        TBool tight = ETrue;
+        if(iUiBuilder.EditMode())
+	        {
+	        tight =  CheckIfFieldIsEmpty(lmkItemField);
+	        }
+	        MLmkEditorField* editorField = NULL;
+	        if( tight && iCategoryFlag && lmkItemField.EditorType() == EListFieldEditor )
+	        {	//if there are
+		        editorField = LmkEditorFieldFactory::CreateFieldL(
+	                                        lmkItemField, iUiBuilder,iCategoryName);
+	            iCategoryFlag = EFalse; // Safty purpose....
+	        }
+	        else if(tight)
+			{
+	        	editorField = LmkEditorFieldFactory::CreateFieldL(
+	                                        lmkItemField, iUiBuilder );
+			}
+        CleanupStack::PushL( editorField );
+        if ( editorField )
+            {
+            iFieldArray.AppendL( editorField );
+            }
+        CleanupStack::Pop(); //editorField
+        }
+    }
+
+// ----------------------------------------------------
+// CLmkEditorFieldArray::AreAllFieldsEmptyL
+// ----------------------------------------------------
+//
+TBool CLmkEditorFieldArray::AreAllFieldsEmptyL() const
+   {
+   TBool result = ETrue;
+   TReal localVar;
+
+   const TInt fieldCount = iFieldArray.Count();
+   for ( TInt i=0; i < fieldCount; i++ )
+        {
+        switch( iFieldArray[i]->LandmarkItemField().EditorType() )
+            {
+            //case ETextFieldEditor:
+            case ETextGenericFieldEditor:
+            case ETextPhoneNumberFieldEditor:
+                {
+                HBufC* fieldText = iFieldArray[i]->ControlTextL();
+                if ( fieldText && fieldText->Length() > 0 )
+                    {
+					//Check if any active character or not
+					TPtr16 ptr = fieldText->Des();
+					ptr.Trim();
+					if (ptr.Length() == 0)
+						{
+						result = ETrue;
+						}
+					else
+						{
+						result = EFalse;
+						}
+                    }
+                delete fieldText;
+                break;
+                }
+            case ETextUriFieldEditor:
+                {
+                HBufC* fieldText = iFieldArray[i]->ControlTextL();
+
+                if( fieldText && fieldText->Length() > 0 )
+                    {
+                    //Check if any active character or not
+					TPtr16 ptr = fieldText->Des();
+					ptr.Trim();
+					// Checking if the String present is only "http:\\"
+					// If that is the case then the field is still
+					// considered empty
+					if(!CLmkUiUtils::FindIfWebAddrFieldIsEmpty(ptr))
+					    {
+					    result = EFalse;
+					    }
+                    }
+                delete fieldText;
+                break;
+                }
+            case EListFieldEditor:
+                {
+                if ( iFieldArray[i]->LandmarkItemField().Categories().Count() )
+                    {
+                    result = EFalse;
+                    }
+                break;
+                }
+           case ENumberFieldEditor:
+   		        {
+                localVar = iFieldArray[i]->FieldValue();
+                if (!Math::IsNaN(localVar))
+			        result = EFalse;
+			    break;
+		        }
+
+           case ECoordinateFieldEditor:
+   		        {
+                localVar = iFieldArray[i]->FieldValue();
+                if (!Math::IsNaN(localVar))
+                    result = EFalse;
+			    break;
+		        }
+
+
+            default:
+                {
+                break;
+                }
+            }
+
+        if ( !result )
+            {
+            break;
+            }
+        }
+    return result;
+    }
+
+// ----------------------------------------------------
+// CLmkEditorFieldArray::FieldAt
+// ----------------------------------------------------
+//
+const MLmkEditorField& CLmkEditorFieldArray::FieldAt
+		( TInt aFieldIndex )
+	{
+    return *iFieldArray[aFieldIndex];
+	}
+
+// ----------------------------------------------------
+// CLmkEditorFieldArray::Find
+// ----------------------------------------------------
+//
+MLmkEditorField* CLmkEditorFieldArray::Find( TInt aControlId, TInt* aPos,
+											 TInt* aPrevControlId ) const
+    {
+    MLmkEditorField* field = NULL;
+	const TInt count = iFieldArray.Count();
+    for (TInt i = 0; i < count; ++i)
+        {
+        MLmkEditorField* temp = iFieldArray.At(i);
+        if (temp && temp->ControlId() == aControlId )
+            {
+            field = temp;
+            if(aPos)
+	            {
+	            *aPos =i;
+	            }
+            break;
+            }
+        if( (temp && aPrevControlId) && temp->ControlId() < aControlId)
+	        {
+	        *aPrevControlId = temp->ControlId();
+	        }
+        }
+    return field;
+    }
+
+// ----------------------------------------------------
+// CLmkEditorFieldArray::SaveFieldsL
+// ----------------------------------------------------
+//
+TBool CLmkEditorFieldArray::SaveFieldsL()
+    {
+	TBool result = EFalse;
+    for ( TInt i(0); i < iFieldArray.Count(); ++i )
+        {
+        if ( iFieldArray[i]->SaveFieldL() )
+			{
+			result = ETrue;
+			}
+        }
+
+    iLmkFields.SaveFieldsL();
+    return result;
+	}
+
+// ----------------------------------------------------
+// CLmkEditorFieldArray::SetCategoryName
+// ----------------------------------------------------
+//
+void CLmkEditorFieldArray::SetCategoryName(const TDesC& aCategoryName)
+{
+	iCategoryName.Copy(aCategoryName);
+	iCategoryFlag = ETrue;
+}
+
+// ----------------------------------------------------
+// CLmkEditorFieldArray::SaveFieldsToBufferL
+// ----------------------------------------------------
+//
+void CLmkEditorFieldArray::SaveFieldsToBufferL()
+	{
+    for ( TInt i(0); i < iFieldArray.Count(); ++i )
+        {
+        iFieldArray[i]->SaveFieldL();
+        }
+	}
+
+// ----------------------------------------------------
+// CLmkEditorFieldArray::GetFieldArray
+// ----------------------------------------------------
+//
+CArrayPtrFlat<MLmkEditorField>& CLmkEditorFieldArray::GetFieldArray()
+{
+	return iFieldArray;
+}
+
+// ----------------------------------------------------
+// CLmkEditorFieldArray::CheckIfFieldIsEmpty
+// ----------------------------------------------------
+//
+TBool CLmkEditorFieldArray::CheckIfFieldIsEmpty(MLmkFieldData& a)
+	{
+	TBool result = EFalse;
+	switch( a.EditorType() )
+	    {
+	    //case ETextFieldEditor:
+	    case ETextGenericFieldEditor:
+	    case ETextPhoneNumberFieldEditor:
+	    case ETextUriFieldEditor:
+	        {
+	        TPtrC buf = a.TextData();
+	        if ( buf.Length() > 0 )
+	            {
+	            result = ETrue;
+	            }
+	        break;
+	        }
+	    case EListFieldEditor:
+	    	{
+	    	RArray<TPosLmItemId>& t = a.Categories();
+	    	if ( t.Count() > 0 )
+	            {
+	            result = ETrue;
+	            }
+	        break;
+	        }
+	    case ENumberFieldEditor:
+	        {
+	        TReal32 y = a.FloatData();
+	        if(!Math::IsNaN(y))
+	            {
+	            result = ETrue;
+	            }
+	        break;
+	        }
+	    case ECoordinateFieldEditor:
+	    	{
+	    	TReal64 z = a.DoubleData();
+	    	if(!Math::IsNaN(z))
+	            {
+	            result = ETrue;
+	            }
+	        break;
+	        }
+	    }
+	  return result;
+	}
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/uicontrols/src/CLmkEditorFieldBase.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,204 @@
+/*
+* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:    Methods for landmark editor base class.
+*
+*/
+
+
+
+
+
+
+
+// INCLUDE FILES
+#include <eikcapc.h>
+#include <eikimage.h>
+
+#include <AknIconUtils.h>
+#include <eikedwin.h>
+#include <eikenv.h>
+#include "LmkConsts.h"
+#include "landmarks.hrh"
+#include "CLmkUiUtils.h"
+
+#include "CLmkEditorFieldBase.h"
+#include "MLmkEditorUiBuilder.h"
+
+#include "avkon.loc"
+
+
+// ================= MEMBER FUNCTIONS =======================
+
+// ----------------------------------------------------
+// CLmkEditorFieldBase::CLmkEditorFieldBase
+// ----------------------------------------------------
+//
+CLmkEditorFieldBase::CLmkEditorFieldBase
+        ( MLmkFieldData& aField,
+				MLmkEditorUiBuilder& aUiBuilder ) :
+    iLmkItemField( aField ), iUiBuilder( aUiBuilder )
+    {
+    iEnv = CEikonEnv::Static();
+    }
+
+// ----------------------------------------------------
+// CLmkEditorFieldBase::BaseConstructL
+// ----------------------------------------------------
+//
+void CLmkEditorFieldBase::BaseConstructL()
+    {
+    }
+
+// ----------------------------------------------------
+// CLmkEditorFieldBase::~CLmkEditorFieldBase
+// ----------------------------------------------------
+//
+CLmkEditorFieldBase::~CLmkEditorFieldBase()
+    {
+    }
+
+// ----------------------------------------------------
+// CLmkEditorFieldBase::ControlId
+// ----------------------------------------------------
+//
+TInt CLmkEditorFieldBase::ControlId() const
+    {
+    return iLmkItemField.UniqueFieldIdentity();
+    }
+
+// ----------------------------------------------------
+// CLmkEditorFieldBase::FieldId
+// ----------------------------------------------------
+//
+TInt CLmkEditorFieldBase::FieldId() const
+    {
+    return 0;
+    }
+
+// ----------------------------------------------------
+// CLmkEditorFieldBase::FieldLabel
+// ----------------------------------------------------
+//
+TPtrC CLmkEditorFieldBase::FieldLabel() const
+    {
+    return iLmkItemField.Label();
+    }
+
+// ----------------------------------------------------
+// CLmkEditorFieldBase::SetFieldLabelL
+// ----------------------------------------------------
+//
+void CLmkEditorFieldBase::SetFieldLabelL
+		(HBufC* aLabel)
+    {
+	iUiBuilder.SetCurrentLineCaptionL(ControlId(),*aLabel);
+    }
+
+// ----------------------------------------------------
+// CLmkEditorFieldBase::ControlTextL
+// ----------------------------------------------------
+//
+HBufC* CLmkEditorFieldBase::ControlTextL() const
+	{
+	HBufC* textBuf = NULL;
+	CCoeControl* ctrl = iUiBuilder.Control(ControlId());
+	if (ctrl)
+		{
+        textBuf = static_cast<CEikEdwin*>(ctrl)->GetTextInHBufL();
+		}
+	return textBuf;
+	}
+
+// ----------------------------------------------------
+// CLmkEditorFieldBase::LandmarkItemField
+// ----------------------------------------------------
+//
+MLmkFieldData& CLmkEditorFieldBase::LandmarkItemField() const
+    {
+    return iLmkItemField;
+    }
+
+// -----------------------------------------------------------------------------
+//CLmkEditorFieldBase::GetNumberFieldValue()
+// -----------------------------------------------------------------------------
+//
+TReal CLmkEditorFieldBase::GetNumberFieldValue() const
+	{
+	return 0;
+	}
+
+// -----------------------------------------------------------------------------
+//CLmkEditorFieldBase::FieldValue()
+// -----------------------------------------------------------------------------
+//
+TReal CLmkEditorFieldBase::FieldValue() const
+	{
+	return 0;
+	}
+// -----------------------------------------------------------------------------
+//CLmkEditorFieldBase::LoadBitmapToFieldL
+// -----------------------------------------------------------------------------
+//
+void CLmkEditorFieldBase::LoadBitmapToFieldL
+			(MLmkEditorUiBuilder& aUiBuilder)
+	{
+	// Get the landmark field to which the Icon should be added
+	MLmkFieldData& nameField = LandmarkItemField();
+
+	// Implemented only for Name field
+	if ( nameField.FieldType() == EName )
+		{
+	    CEikImage* image = new(ELeave) CEikImage();
+	    CleanupStack::PushL( image );
+	    //TFileName defaultIconFile( CLmkUiUtils::LmkUiIconFileL() );
+		// No need to add iconFile to cleanupstack since it is a member variable from CLmkFieldData class
+	    HBufC* iconFile = nameField.IconPath();
+		TInt err = KErrNotFound;
+		CFbsBitmap* bitmap = NULL;
+		CFbsBitmap* mask = NULL;
+
+		if (iconFile) // landmark has a defined icon
+			{
+			if ( nameField.IconId() != KErrNotFound )
+		        {
+				TRAP(err,AknIconUtils::CreateIconL( bitmap, mask,
+									   *iconFile, nameField.IconId(),
+									   nameField.IconId()+1 ););
+		        }
+			image->SetPictureOwnedExternally(EFalse);
+			image->SetPicture(bitmap, mask);
+			image->CopyControlContextFrom(aUiBuilder.LineControl(ControlId()));
+			image->SetContainerWindowL(*aUiBuilder.LineControl(ControlId()));
+			image->SetNonFocusing();
+			image->SetBrushStyle(CGraphicsContext::ENullBrush);
+
+			delete aUiBuilder.LineControl(ControlId())->iBitmap;
+			aUiBuilder.LineControl(ControlId())->iBitmap = image;
+
+			TRect rect = aUiBuilder.LineControl(ControlId())->Rect();
+			rect.Resize(-1, -1);
+			aUiBuilder.LineControl(ControlId())->SetRect(rect);
+			rect.Resize(1, 1);
+			aUiBuilder.LineControl(ControlId())->SetRect(rect);
+			CleanupStack::Pop(image);
+			}
+		else
+    		{
+			CleanupStack::PopAndDestroy(image);
+    		}
+
+		}
+	}
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/uicontrols/src/CLmkEditorImpl.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,3124 @@
+/*
+ * Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:   This file contains the methods implementing the core
+ *                functionality of landmarks editor
+ *
+ */
+
+// INCLUDE FILES
+#include <AknSettingCache.h>
+#include <AiwServiceHandler.h>      // AIW
+#include <AiwCommon.hrh>            // AIW
+#include <featmgr.h>
+#include <aknlayoutscalable_avkon.cdl.h>
+#include <layoutmetadata.cdl.h>
+#include <aknmessagequerydialog.h>
+#include <AknIconUtils.h>
+#include <AknWaitDialog.h>
+#include <aknlists.h>
+#include <StringLoader.h>
+#include <AknQueryDialog.h>
+#include <eikcapc.h>
+#include <eikmenup.h>
+#include <hlplch.h>
+#include <sendnorm.rsg> // R_SENDUI_MENU
+#include <lmkui.rsg>
+#include <CLmkEditorDlg.h>
+#include <EPos_CPosLandmark.h>
+#include <EPos_CPosLandmarkDatabase.h>
+#include <epos_poslandmarkserialization.h>
+#include <bldvariant.hrh>
+#include <AknDef.h>
+#include <sysutil.h>
+
+#include <baclipb.h>                        // for CClipboard
+#include <txtrich.h>
+#include <txtetext.h>
+#include <s32std.h>
+
+#include "CLmkUiUtils.h"
+#include "landmarks.hrh"
+#include "LmkConsts.h"
+#include "LmkUID.h"
+#include "CLmkLocationService.h"
+#include "CLmkDbUtils.h"
+#include "CLmkEditorFieldArray.h"
+#include "MLmkEditorField.h"
+#include "LmkNotes.h"
+#include "CLmkDlgCategorySelectorImpl.h"
+#include <csxhelp/lm.hlp.hrh>
+#include "CLmkSender.h"
+#include "clmkgotourlcmd.h"
+#include "clmkcallcmd.h"
+#include "CLmkEditorImpl.h"
+#include "CLmkEditorTextField.h"
+#include "lmkicondialog.h"
+#include "CLmkEditorListField.h"
+#include "CLmkEditorCoordinateField.h"
+#include <landmarks.rsg>
+#include <uriutils.h>
+#include "LmkListProviderFactory.h"
+#include "CLmkListProviderBase.h"
+#include <locnotprefplugindomaincrkeys.h>
+#include "clmkcentralrepository.h"
+#include "CLmkEditorNumberField.h"
+#include "lmkwaitdlglauncher.h" // Wait dialog launcher
+#include "LmkEditorFieldFactory.h"
+#include <locationvariationdomaincrkeys.h>
+#include <lmkerrors.h>
+#include "Debug.h"
+
+// CONSTANTS
+/// Unnamed namespace for local definitions
+namespace
+    {
+    const TInt KHOffsetCatInfoPopup(100);
+    const TInt KVOffsetCatInfoPopup(30);
+#if defined(_DEBUG)
+    _LIT( KPanicMsg, "CLmkEditorImpl");
+
+    void Panic(TPanicCode aReason)
+        {
+        User::Panic(KPanicMsg, aReason);
+        }
+#endif
+    } // namespace
+
+// ================= LOCAL FUNCTIONS =======================
+static void CleanupArray(TAny* aArray)
+    {
+    (static_cast<RPointerArray<CPosLandmark>*> (aArray))->ResetAndDestroy();
+    }
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CLmkEditorImpl::CLmkEditorImpl
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+CLmkEditorImpl::CLmkEditorImpl(CPosLandmarkDatabase& aDb,
+        CLmkSender& aSender, TLmkEditorMode aEditorMode) :
+    iDb(aDb), iSender(aSender), iEditorMode(aEditorMode), iIsEditing(EFalse),
+            iResetWebAddrSize(ETrue), iIsCategorySelctorOpen(EFalse)
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkEditorImpl::ConstructL
+// Symbian 2nd phase constructor can leave.
+// -----------------------------------------------------------------------------
+//
+void CLmkEditorImpl::ConstructL(TPosLmItemId aLandmarkId,
+        TLmkEditorAttributes aAttributes)
+    {
+    DEBUG( CLmkEditorImpl::ConstructL Editing/Viewing Existing Landmark with LandmarkId )
+    CommonConstructL(aAttributes);
+    iLandmark = iDb.ReadLandmarkLC(aLandmarkId);
+    iLmkFields = CLmkFields::NewL(iLabelArray, iDb, aAttributes, aLandmarkId,
+            iLandmark, iJapaneseInputMode);
+    ChangeContextImageL();
+    iEditorFieldArray = CLmkEditorFieldArray::NewL(*iLmkFields, *this);
+    CleanupStack::Pop(iLandmark);
+    if (iLandmark)
+        {
+        iIsLmOwned = ETrue;
+        }
+    iListProvider = LmkListProviderFactory::CreateProviderL( iDb, ELandmarkSelector );
+    iListProvider->AddObserverL( *this );
+    iListProvider->InitializeL();    
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkEditorImpl::ConstructL
+// Symbian 2nd phase constructor can leave.
+// -----------------------------------------------------------------------------
+//
+void CLmkEditorImpl::ConstructL(CPosLandmark* aLandmark,
+        TLmkEditorAttributes aAttributes)
+    {
+    DEBUG( CLmkEditorImpl::ConstructL Editing/Viewing Existing Landmark with Landmark Object );
+    CommonConstructL(aAttributes);
+    iLmkFields = CLmkFields::NewL(iLabelArray, iDb, aAttributes,
+            aLandmark->LandmarkId(), aLandmark, iJapaneseInputMode);
+    iLandmark = aLandmark;
+    ChangeContextImageL();
+    iEditorFieldArray = CLmkEditorFieldArray::NewL(*iLmkFields, *this);
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkEditorImpl::ConstructL
+// Symbian 2nd phase constructor can leave.
+// Empty Landmark Editor
+// -----------------------------------------------------------------------------
+//
+void CLmkEditorImpl::ConstructL(TPosLmItemId* aLandmarkId,
+        CPosLandmark* aLandmark, TLmkEditorAttributes aAttributes)
+    {
+    DEBUG( CLmkEditorImpl::ConstructL Empty Landmarks Editor Construction );
+    CommonConstructL(aAttributes);
+    iLmkFields = CLmkFields::NewL(iLabelArray, iDb, aAttributes,
+            *aLandmarkId, aLandmark, iJapaneseInputMode);
+    iLandmarkItemId = aLandmarkId;
+    iLandmark = aLandmark;
+    ChangeContextImageL();
+    iEditorFieldArray = CLmkEditorFieldArray::NewL(*iLmkFields, *this);
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkEditorImpl::CommonConstructL
+// -----------------------------------------------------------------------------
+//
+void CLmkEditorImpl::CommonConstructL(TLmkEditorAttributes& aAttributes)
+    {
+    DEBUG( CLmkEditorImpl::CommonConstructL Start )
+    iLandmarkItemId = NULL; // Set to NULL by default. Use only where needed.
+    iLmkUiUtils = CLmkUiUtils::NewL();
+    iLmkUiUtils->ReadLmkUiResourceFileL();
+    CAknForm::ConstructL(R_LMK_EDITOR_MENUBAR);
+
+    iLmkUiUtils->StoreNaviPaneL(); // store old navi pane
+    iLmkUiUtils->CreateDefaultNaviPaneL();
+    // For setting Japanese input mode
+    CAknSettingCache& cache = CAknEnv::Static()->SettingCache();
+    TLanguage currentLanguage = cache.InputLanguage();
+    if (currentLanguage == ELangJapanese)
+        {
+        iJapaneseInputMode = ETrue;
+        }
+    else
+        {
+        iJapaneseInputMode = EFalse;
+        }
+    CreateLabelArrayL();
+    ConstructContextMenuL();
+
+    // launching browser
+    iLmkGoToURLCmd = CLmkGoToURLCmd::NewL();
+    // Launching Call UI
+    iLmkCallCmd = CLmkCallCmd::NewL();
+    iLmkCallCmd->AttachMenuPaneL(R_LMK_EDITOR_CALL_SUBMENU,
+            R_LMK_EDITOR_AIW_INTEREST);
+    // Create AIW interest
+    iLmkCallCmd->AttachInterestL(R_LMK_EDITOR_AIW_INTEREST);
+    // By default enable map and navigation feature
+    iMapNavFeature = ETrue;
+
+    iMapNavInterface = CLmkMapNavigationInterface::NewL(iDb);
+    iCatInfoPopupNote = NULL;
+    iRepository = CLmkCentralRepository::NewL(KLocSystemofMeasurements, this);
+
+    // Create the wait dialog launcher
+    iWaitDialogLauncher = CLmkWaitDialogLauncher::NewL();
+    iWaitDialogLauncher->SetObserver(this);
+
+    iIsLmOwned = EFalse;
+
+    // Check if the Coordinates has to be hidden
+    CheckHideCoordinateL();
+
+    if (iIsHideCoordinate)
+        {
+        aAttributes &= ~CLmkEditorDlg::ELmkLatitude;
+        aAttributes &= ~CLmkEditorDlg::ELmkLongitude;
+        aAttributes &= ~CLmkEditorDlg::ELmkPositionAccuracy;
+        aAttributes &= ~CLmkEditorDlg::ELmkAltitude;
+        aAttributes &= ~CLmkEditorDlg::ELmkAltitudeAccuracy;
+        }
+    DEBUG( CLmkEditorImpl::CommonConstructL End )
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkEditorImpl::NewL
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CLmkEditorImpl* CLmkEditorImpl::NewL(CPosLandmarkDatabase& aDb,
+        CLmkSender& aSender, TLmkEditorAttributes aAttributes,
+        TLmkEditorMode aEditorMode, TPosLmItemId aLandmarkId)
+    {
+    CLmkEditorImpl* self = new (ELeave) CLmkEditorImpl(aDb, aSender,
+            aEditorMode);
+
+    CleanupStack::PushL(self);
+    self->ConstructL(aLandmarkId, aAttributes);
+    CleanupStack::Pop(); //self
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkEditorImpl::NewL
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CLmkEditorImpl* CLmkEditorImpl::NewL(CPosLandmarkDatabase& aDb,
+        CLmkSender& aSender, TLmkEditorAttributes aAttributes,
+        TLmkEditorMode aEditorMode, CPosLandmark* aLandmark)
+    {
+    CLmkEditorImpl* self = new (ELeave) CLmkEditorImpl(aDb, aSender,
+            aEditorMode);
+
+    CleanupStack::PushL(self);
+    self->ConstructL(aLandmark, aAttributes);
+    CleanupStack::Pop(); //self
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkEditorImpl::NewL
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CLmkEditorImpl* CLmkEditorImpl::NewL(CPosLandmarkDatabase& aDb,
+        CLmkSender& aSender, TLmkEditorAttributes aAttributes,
+        TLmkEditorMode aEditorMode, TPosLmItemId* aLandmarkId,
+        CPosLandmark* aLandmark)
+    {
+    CLmkEditorImpl* self = new (ELeave) CLmkEditorImpl(aDb, aSender,
+            aEditorMode);
+
+    CleanupStack::PushL(self);
+    self->ConstructL(aLandmarkId, aLandmark, aAttributes);
+    CleanupStack::Pop(); //self
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkEditorImpl::~CLmkEditorImpl()
+// -----------------------------------------------------------------------------
+//
+CLmkEditorImpl::~CLmkEditorImpl()
+    {
+    delete iWaitDialogLauncher;
+
+    CEikButtonGroupContainer* cba = CEikButtonGroupContainer::Current();
+    cba->RemoveCommandObserver(KMskCommandPos);
+
+    if (iLmkUiUtils)
+        {
+        iLmkUiUtils->SetOldContextIcon();
+        iLmkUiUtils->RestoreOldTitlePane();
+        }
+
+    delete iLmkUiUtils;
+    delete iLmkFields;
+    iLabelArray.ResetAndDestroy();
+    iCategoryNames.Close();
+    iLabelArray.Close();
+    delete iEditorFieldArray;
+    delete iLocationService;
+
+    if (iContextMenuBar)
+        {
+        iEikonEnv->EikAppUi()->RemoveFromStack(iContextMenuBar);
+        delete iContextMenuBar;
+        }
+    delete iLmkGoToURLCmd;
+    delete iLmkCallCmd;
+    iMapNavInterface->Release();
+    delete iCatInfoPopupNote;
+
+    if(iListProvider)
+        {
+        iListProvider->RemoveObserver(*this);
+        delete iListProvider;
+        }    
+    
+    delete iRepository;
+    if (iIsLmOwned && iLandmark)
+        delete iLandmark;
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkEditorImpl::SetMopParent
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CLmkEditorImpl::SetMopParent(MObjectProvider* aParent)
+    {
+    CCoeControl::SetMopParent(aParent);
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkEditorImpl::SetHelpContext
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CLmkEditorImpl::SetHelpContext(TCoeHelpContext aContext)
+    {
+    iHelpContext = aContext;
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkEditorImpl::ExecuteL
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TInt CLmkEditorImpl::ExecuteLD()
+    {
+    CleanupStack::PushL(this);
+    AttachAIWMenuInterestL();
+    CleanupStack::Pop();//this
+    if (iEditorMode == CLmkEditorDlg::ELmkEditor)
+        {
+        iIsEditing = ETrue;
+        return CAknForm::ExecuteLD(R_LMK_EDITOR_DIALOG);
+        }
+    else // viewer/receive state of editor
+        {
+        iIsEditing = EFalse;
+        return CAknForm::ExecuteLD(R_LMK_VIEWER_DIALOG);
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkEditorImpl::DisableMapAndNavigationMenuOptions
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CLmkEditorImpl::DisableMapAndNavigationMenuOptions()
+    {
+    iMapNavFeature = EFalse;
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkEditorImpl::DynInitMenuPaneL
+// -----------------------------------------------------------------------------
+//
+void CLmkEditorImpl::DynInitMenuPaneL(TInt aResourceId,
+        CEikMenuPane* aMenuPane)
+    {
+    switch (aResourceId)
+        {
+        case R_AVKON_FORM_MENUPANE:
+            {
+            CAknForm::DynInitMenuPaneL(aResourceId, aMenuPane);
+            TBool isLandmarkDataEmpty = EFalse;
+            TBool dimClearPos = ETrue;
+
+            // Disable Map and Navigation feature when opted not to show    
+            if (!iMapNavFeature)
+                {
+                isLandmarkDataEmpty = ETrue;
+                }
+            else if (iLandmark && iIsHideCoordinate)
+                {
+                isLandmarkDataEmpty = IsLandmarkDataEmptyL(iLandmark);
+                }
+            else
+                {
+                isLandmarkDataEmpty = ArePositionFieldEmptyL();
+                }
+
+            if (isLandmarkDataEmpty)
+                {
+                // delete the show on map & Navigate To options
+                aMenuPane->DeleteMenuItem(ELmkShowOnMapPlaceHolder);
+                aMenuPane->DeleteMenuItem(ELmkNavigateToPlaceHolder);
+                }
+            else if (IsEditable())
+                {
+                // delete the Navigate To option for editor
+                aMenuPane->DeleteMenuItem(ELmkNavigateToPlaceHolder);
+                }
+
+            if (IsEditable())
+                {
+                dimClearPos = ArePositionFieldEmptyL();
+                }
+
+            if (dimClearPos || iIsHideCoordinate)
+                {
+                aMenuPane->SetItemDimmed(ELmkCmdClearPosInfo, ETrue);
+                }
+
+            if (iMapNavFeature)
+                {
+                iMapNavInterface->AttachMenuPaneL(aMenuPane,
+                        R_LMK_EDITOR_MENU, ELmkCmdMnNav);
+                }
+
+            // Send menu is handled by the sender:
+            if (FeatureManager::FeatureSupported(KFeatureIdLandmarksConverter))
+                {
+                aMenuPane->SetItemDimmed(ELmkCmdSendDummy, EFalse);
+                iSender.DisplaySendMenuL(*aMenuPane, 1);
+                }
+            else
+                {
+                aMenuPane->SetItemDimmed(ELmkCmdSendDummy, ETrue);
+                }
+
+            if (FeatureManager::FeatureSupported(
+                    KFeatureIdLocationFrameworkCore))
+                {
+                aMenuPane->SetItemDimmed(ELmkCmdCurrentLocation,
+                        !IsEditable());
+                }
+            else
+                {
+                aMenuPane->SetItemDimmed(ELmkCmdCurrentLocation, ETrue);
+                }
+
+            if (FeatureManager::FeatureSupported(KFeatureIdHelp)
+                    && !iIsHideHelp)
+                {
+                aMenuPane->SetItemDimmed(EAknCmdHelp, EFalse);
+                }
+            else
+                {
+                aMenuPane->SetItemDimmed(EAknCmdHelp, ETrue);
+                }
+
+            //only in edit mode
+            aMenuPane->SetItemDimmed(ELmkCmdSelectCategories, !IsEditable());
+            aMenuPane->SetItemDimmed(ELmkCmdChangeIcon, !IsEditable());
+
+            //additional commands always dimmed in this class:
+            aMenuPane->SetItemDimmed(ELmkCmdSaveLm, ETrue);
+            // Only in view mode
+            aMenuPane->SetItemDimmed(ELmkCmdEditLm, IsEditable());
+            //allways dimmed
+            aMenuPane->SetItemDimmed(EAknFormCmdEdit, ETrue);
+            aMenuPane->SetItemDimmed(EAknFormCmdSave, ETrue);
+            aMenuPane->SetItemDimmed(EAknFormCmdLabel, ETrue);
+            aMenuPane->SetItemDimmed(EAknFormCmdAdd, ETrue);
+            aMenuPane->SetItemDimmed(EAknFormCmdDelete, ETrue);
+            aMenuPane->SetItemDimmed(ELmkCmdCategories, ETrue);
+            aMenuPane->SetItemDimmed(ELmkCmdEditTextLm, ETrue);
+
+            if (IsEditable())
+                {
+                aMenuPane->SetItemDimmed(ELmkCmdCall, ETrue);
+                aMenuPane->SetItemDimmed(ELmkCmdGoToUrl, ETrue);
+                }
+            else
+                {
+                MLmkFieldData* field = iLmkFields->GetField(EPhoneNumber);
+                if (field)
+                    {
+                    TInt id = field->UniqueFieldIdentity();
+                    MLmkEditorField* control = iEditorFieldArray->Find(id);
+                    if ((!control) || GetFieldTextLengthL(*control) <= 0)
+                        {
+                        aMenuPane->SetItemDimmed(ELmkCmdCall, ETrue);
+                        }
+
+                    MLmkFieldData* field2 = iLmkFields->GetField(EWebAddress);
+                    if (field2)
+                        {
+                        TInt id2 = field2->UniqueFieldIdentity();
+                        control = iEditorFieldArray->Find(id2);
+                        if ((!control) || GetFieldTextLengthL(*control) <= 0)
+                            {
+                            aMenuPane->SetItemDimmed(ELmkCmdGoToUrl, ETrue);
+                            }
+                        }
+                    }
+                }
+            break;
+            }
+        case R_SENDUI_MENU: // Dynamically created send ui menu
+            {
+            // Send menu is handled by the sender:
+            if (FeatureManager::FeatureSupported(KFeatureIdLandmarksConverter))
+                {
+                iSender.DisplaySendCascadeMenuL(*aMenuPane);
+                }
+            break;
+            }
+        case R_LMK_EDITOR_CONTEXT_MENU:
+            {
+            MLmkEditorField* field = iEditorFieldArray->Find(
+                    IdOfFocusControl());
+            TUint type = field->LandmarkItemField().FieldType();
+
+            if (type != EPhoneNumber)
+                {
+                aMenuPane->SetItemDimmed(ELmkEditMenuAiwId, ETrue);
+                }
+            if (type != EWebAddress)
+                {
+                aMenuPane->SetItemDimmed(ELmkCmdGoToUrl, ETrue);
+                }
+            if (type == EPhoneNumber)
+                {
+                if (GetFieldTextLengthL(*field) <= 0)
+                    {
+                    aMenuPane->SetItemDimmed(ELmkEditMenuAiwId, ETrue);
+                    }
+                }
+            if (type == EWebAddress)
+                {
+                if (GetFieldTextLengthL(*field) <= 0)
+                    {
+                    aMenuPane->SetItemDimmed(ELmkCmdGoToUrl, ETrue);
+                    }
+                }
+            break;
+            }
+        case R_LMK_EDITOR_CALL_SUBMENU:
+            {
+            // Initialize the AIW menu service
+            // Must not overlap with other menu ids
+            iLmkCallCmd->InitializeMenuPaneL(*aMenuPane, aResourceId,
+                    ELmkCmdLast);
+            break;
+            }
+        default:
+            {
+            break;
+            }
+        }
+    iMapNavInterface->HandleMenuOperationL(aResourceId, aMenuPane,
+            ELmkCmdMnNav);
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkEditorImpl::IsLandmarkDataEmptyL
+// -----------------------------------------------------------------------------
+//
+TBool CLmkEditorImpl::IsLandmarkDataEmptyL(CPosLandmark* aLandmark)
+    {
+    // verify that destination landmark has coordinates
+    TLocality loc;
+    TBool isValid = (KErrNone == aLandmark->GetPosition(loc));
+    isValid &= !Math::IsNaN(loc.Latitude()) && !Math::IsNaN(loc.Longitude());
+    return !isValid;
+
+    /*    if (!isValid)
+     {
+     // verify that destination landmark has address info
+     TPositionFieldId fieldId = aLandmark->FirstPositionFieldId();
+     while (fieldId != EPositionFieldNone)
+     {
+     if (fieldId > EPositionFieldAddressCapabilitiesBegin && fieldId
+     < EPositionFieldBuildingTelephone)
+     {
+     TPtrC field;
+     aLandmark->GetPositionField(fieldId, field);
+     if (field.Length())
+     {
+     isValid = ETrue;
+     break;
+     }
+     }
+     fieldId = aLandmark->NextPositionFieldId(fieldId);
+     }
+     }
+     return !isValid;*/
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkEditorImpl::ProcessCommandL
+// -----------------------------------------------------------------------------
+//
+void CLmkEditorImpl::ProcessCommandL(TInt aCommandId)
+    {
+    DEBUG1( CLmkEditorImpl::ProcessCommandL aCommandId=%d, aCommandId );
+    // Hide the context sensitive menu here
+    HideMenu();
+    iContextMenuBar->StopDisplayingMenuBar();
+
+    CAknDialog::ProcessCommandL(aCommandId);
+    TInt aiwCmd = iMapNavInterface->GetServiceCmdByMenuCmd(aCommandId);
+
+    // Handles Map and Navigation commands
+    if (KAiwCmdNone != aiwCmd)
+        {
+        // Landmark array to pass to M&N interface
+        RPointerArray<CPosLandmark> lmkArray;
+        switch (aiwCmd)
+            {
+            case KAiwCmdMnShowMap:
+                {
+                CPosLandmark* landmark = GetCurrentEditedLandmarkL();
+                lmkArray.Append(landmark);
+                CleanupStack::PushL(TCleanupItem(CleanupArray, &lmkArray));
+                iMapNavInterface->ShowLandmarksOnMapL(lmkArray, aCommandId,
+                        CLmkMapNavigationInterface::EByLmkView);
+                CleanupStack::PopAndDestroy(); //lmkArray
+                break;
+                }
+            case KAiwCmdMnNavigateTo:
+                {
+                CPosLandmark* landmark = GetCurrentEditedLandmarkL();
+                lmkArray.Append(landmark);
+                CleanupStack::PushL(TCleanupItem(CleanupArray, &lmkArray));
+                iMapNavInterface->NavigateToLandmarkL(lmkArray[0], aCommandId);
+                CleanupStack::PopAndDestroy(); //lmkArray
+                break;
+                }
+            }
+        lmkArray.Reset();
+        return;
+        }
+    switch (aCommandId)
+        {
+        case EAknCmdHelp:
+            {
+            HlpLauncher::LaunchHelpApplicationL(
+                    iEikonEnv->WsSession(),
+                    static_cast<CAknAppUi*> (iCoeEnv->AppUi())->AppHelpContextL());
+            break;
+            }
+            // these all are same: save & exit
+        case EAknSoftkeyBack:
+        case EAknSoftkeyExit:
+        case EEikCmdExit:
+        case EAknCmdExit:
+            {
+            CAknForm::OkToExitL(aCommandId);
+            iLmkUiUtils->RestoreOldNaviPaneL();
+            CEikAppUi* appUi = iEikonEnv->EikAppUi();
+            // Close this dialog first
+            delete this;
+            // Exit application
+            static_cast<MEikCommandObserver*> (appUi)->ProcessCommandL(
+                    aCommandId);
+            break;
+            }
+        case ELmkCmdDeleteLm:
+            {
+            if (LmkNotes::LandmarkConfirmationQueryL(iEikonEnv))
+                {
+                iLmkFields->DeleteLandmarkL();
+                iLmkUiUtils->RestoreOldNaviPaneL();
+                iIsEditing = EFalse;
+                delete this;
+                }
+            break;
+            }
+        case ELmkCmdSelectCategories:
+            {
+            if (!iIsCategorySelctorOpen)
+                {
+                iIsCategorySelctorOpen = ETrue;
+                SelectCategoriesCmdL();
+                }
+            break;
+            }
+        case ELmkCmdChangeIcon:
+            {
+            ChangeIconCmdL();
+            break;
+            }
+        case ELmkCmdCurrentLocation:
+            {
+            CurrentLocationCmdL();
+            break;
+            }
+        case ELmkCmdSendVia1:
+        case ELmkCmdSendVia2:
+        case ELmkCmdSendVia3:
+        case ELmkCmdSendVia4:
+        case ELmkCmdSendVia5:
+        case ELmkCmdSendVia6:
+        case ELmkCmdSendVia7:
+        case ELmkCmdSendVia8:
+        case ELmkCmdSendVia9:
+        case ELmkCmdSendVia10:
+        case ELmkCmdSend:
+            {
+            if (!IsNameFieldEmptyL())
+                {
+                // Obtain the current landmark object
+                CPosLandmark* lmk = GetCurrentEditedLandmarkL();
+                CleanupStack::PushL(lmk);
+                iSender.SendSingleLandmarkL(*lmk);
+                CleanupStack::PopAndDestroy(lmk);
+                }
+            else
+                {
+                DoNotSaveFormDataL();
+                }
+            break;
+            }
+        case ELmkCmdGoToUrl:
+            {
+            // Get URL field
+            MLmkFieldData* field = iLmkFields->GetField(EWebAddress);
+            if (field)
+                {
+                TInt id = field->UniqueFieldIdentity();
+                MLmkEditorField* control = iEditorFieldArray->Find(id);
+                if (control)
+                    {
+                    HBufC* fieldText = control->ControlTextL();
+                    CleanupStack::PushL(fieldText);
+                    TPtr urlPtr = fieldText->Des();
+                    if (urlPtr.Length() > 0)
+                        {
+                        iLmkGoToURLCmd->LaunchBrowserL(urlPtr);
+                        }
+                    CleanupStack::PopAndDestroy(fieldText);
+                    }
+                }
+            break;
+            }
+        case ELmkCmdEditLm:
+            {
+            if (!iIsEditing)
+                {
+                LaunchLmkEditorL();
+                }
+            break;
+            }
+        case ELmkCmdCall:
+        case ELmkCmdLast:
+            {
+            MLmkFieldData* field = iLmkFields->GetField(EPhoneNumber);
+            if (field)
+                {
+                TInt id = field->UniqueFieldIdentity();
+                MLmkEditorField* control = iEditorFieldArray->Find(id);
+                if (control)
+                    {
+                    HBufC* fieldText = control->ControlTextL();
+                    CleanupStack::PushL(fieldText);
+                    if (fieldText && fieldText->Length() > 0)
+                        {
+                        //Check if any active character or not
+                        TPtr ptr = fieldText->Des();
+                        ptr.Trim();
+                        if (ptr.Length() > 0)
+                            {
+                            //modified for 3.2, since   command is not coming
+                            //from menu item, hence need to pass diff command.
+                            //this code needs some more modification to make it
+                            //genericly work for all the commands.
+                            iLmkCallCmd->ExecuteAIWCallCmdL(ELmkCmdCall, ptr);
+                            }
+                        }
+                    CleanupStack::PopAndDestroy(fieldText);
+                    }
+                }
+            break;
+            }
+        case ELmkCmdShow:
+            {
+            MLmkEditorField* field = iEditorFieldArray->Find(
+                    IdOfFocusControl());
+            TUint type = field->LandmarkItemField().FieldType();
+            if (type == ECategories)
+                {
+                if (iCalegorySelectionFlag) // Receive mode
+                    {
+                    CategoriesCmdFromXmlL();
+                    }
+                else
+                    {
+                    CategoriesCmdL(); // View mode
+                    }
+                }
+            break;
+            }
+        case ELmkCmdClearPosInfo:
+            {
+            ClearPositionInfoL();
+            break;
+            }
+        default:
+            {
+            CAknForm::ProcessCommandL(aCommandId);
+            break;
+            }
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkEditorImpl::HandleControlStateChangeL
+// -----------------------------------------------------------------------------
+//
+void CLmkEditorImpl::HandleControlStateChangeL(TInt aControlId)
+    {
+    MLmkEditorField* changedField = iEditorFieldArray->Find(aControlId);
+    if (changedField)
+        {
+        if (changedField->LandmarkItemField().IsTitleField())
+            {
+            HBufC* title = changedField->ControlTextL();
+            CleanupStack::PushL(title);
+            if (!title)
+                {
+                title = HBufC::New(0);
+                }
+            iLmkUiUtils->ChangeTitlePaneL(title);
+            CleanupStack::Pop(); //title
+            }
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkEditorImpl::DoNotSaveFormDataL
+// -----------------------------------------------------------------------------
+//
+void CLmkEditorImpl::DoNotSaveFormDataL()
+    {
+    if (!iIsEndKey)
+        {
+        LmkNotes::InformationNoteL(iEikonEnv, R_LMK_EMPTY_LANDMARK_NAME_NOTE);
+        }
+    MLmkFieldData* field = iLmkFields->GetField(EName);
+    if (field)
+        {
+        TInt id = field->UniqueFieldIdentity();
+        TryChangeFocusL(id);
+        }
+    CAknForm::SetInitialCurrentLine();
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkEditorImpl::GetHelpContext
+// -----------------------------------------------------------------------------
+//
+void CLmkEditorImpl::GetHelpContext(TCoeHelpContext& aContext) const
+    {
+    if (iHelpContext.iContext.Length() > 0)
+        {
+        aContext.iContext = iHelpContext.iContext;
+        aContext.iMajor = iHelpContext.iMajor;
+        }
+    else if (iEditorMode == CLmkEditorDlg::ELmkViewer)
+        {
+        aContext.iContext = KLM_HLP_LM_VIEWER;
+        aContext.iMajor = TUid::Uid(KLmkAppUID3);
+        }
+    else
+        {
+        aContext.iContext = KLM_HLP_LM_EDITOR;
+        aContext.iMajor = TUid::Uid(KLmkAppUID3);
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkEditorImpl::OfferKeyEventL
+// -----------------------------------------------------------------------------
+//
+TKeyResponse CLmkEditorImpl::OfferKeyEventL(const TKeyEvent& aKeyEvent,
+        TEventCode aType)
+    {
+    /**
+     * By def, dialog opens in view mode
+     * selecting 'edit' option from (either from context menu/options menu)
+     * to edit landmark fields
+     *
+     */
+    if (IsEditable())
+        {
+        //always dimmed for the editor
+        DimmMiddleSoftKey();
+        }
+    else if (aKeyEvent.iCode == EKeyBackspace)
+        {
+        if (!IsEditable() && iIsLmkReceiveMode == EFalse)
+            {
+            ProcessCommandL(ELmkCmdDeleteLm);
+            return EKeyWasConsumed;
+            }
+        }
+    else if (aKeyEvent.iCode == EKeyPhoneEnd)
+        {
+        iIsEndKey = ETrue;
+        OkToExitL(EAknSoftkeyDone);
+        }
+    else // for 'sendkey' handling
+        {
+        if (aKeyEvent.iCode == EKeyPhoneSend && (!IsEditable())
+                && (!Layout_Meta_Data::IsPenEnabled()))
+            {
+            // Get Landmark's telephone number
+            TPosLmItemId lmId = iLmkFields->LandmarkId();
+            CPosLandmark* landmark = iDb.ReadLandmarkLC(lmId);
+            // Get phone num field
+            if (landmark->IsPositionFieldAvailable(
+                    ELmkPositionFieldPhoneNumber))
+                {
+                TPtrC telnumPtr;
+                if ((landmark->GetPositionField(ELmkPositionFieldPhoneNumber,
+                        telnumPtr) == KErrNone) && (telnumPtr.Length() > 0))
+                    {
+                    iLmkCallCmd->ExecuteAIWCallCmdL(ELmkCmdCall, telnumPtr);
+                    }
+                else
+                    {
+                    // Get name
+                    TPtrC lmkNamePtr;
+                    if (landmark->GetLandmarkName(lmkNamePtr) == KErrNone)
+                        {
+                        LmkNotes::InformationNotewithTextL(iEikonEnv,
+                                R_LMK_NOTE_NO_NUMBER_TO_NAME, lmkNamePtr);
+                        }
+                    }
+                }
+            CleanupStack::PopAndDestroy(landmark);
+            }
+        }
+
+    if (aType == EEventKey && (aKeyEvent.iCode == EKeyEnter
+            || aKeyEvent.iScanCode == EStdKeyEnter))
+        {
+        TBool isCategoryField = EFalse;
+        MLmkEditorField* field = iEditorFieldArray->Find(IdOfFocusControl());
+        TUint type = field->LandmarkItemField().FieldType();
+
+        if (type == ECategory || type == ECategories)
+            isCategoryField = ETrue;
+
+        // check the editor mode and category field focus
+        if (IsEditable() == EFalse || isCategoryField)
+            {
+            TKeyEvent enterKeyEvent(aKeyEvent);
+            enterKeyEvent.iCode = EKeyOK;
+            CEikButtonGroupContainer* cba =
+                    CEikButtonGroupContainer::Current();
+            return cba->OfferKeyEventL(enterKeyEvent, aType);
+            }
+        }
+    TKeyResponse response = CAknForm::OfferKeyEventL(aKeyEvent, aType);
+    return response;
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkEditorImpl::NotifyL
+// -----------------------------------------------------------------------------
+//
+void CLmkEditorImpl::NotifyL(const TInt aStatus)
+    {
+    // Stop the running wait dialog
+    TInt buttonId = iWaitDialogLauncher->StopWaitDialogL();
+    if (EEikBidCancel != buttonId)
+        {
+        switch (aStatus)
+            {
+            case KErrNone:
+            case KPositionPartialUpdate:
+                {
+                if (iLocationService)
+                    {
+                    TPosition position = iLocationService->CurrentPosition();
+                    SetCurrentLocationL(position);
+                    }
+                break;
+                }
+            default:
+                {
+                break;
+                }
+            }
+        }
+    delete iLocationService;
+    iLocationService = NULL;
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkEditorImpl::NotifyErrorL
+// -----------------------------------------------------------------------------
+//
+void CLmkEditorImpl::NotifyErrorL(TInt aErrorCode)
+    {
+    // Stop the running wait dialog
+    TInt buttonId = iWaitDialogLauncher->StopWaitDialogL();
+
+    delete iLocationService;
+    iLocationService = NULL;
+
+    if (EEikBidCancel != buttonId)
+        {
+        switch (aErrorCode)
+            {
+            case KPositionQualityLoss:
+            case KErrTimedOut:
+            case KErrNotFound: // No PSY selected.
+            case KErrUnknown:
+            case KErrCancel:
+            case KErrArgument:
+            default:
+                // The above errors are because of location request failures
+                // Ask user to retry location request
+                {
+                if (LmkNotes::MessageQueryWithLinkL(iEikonEnv,
+                        R_LMK_MSG_QUERY_HEADING_PANE_TEXT,
+                        R_LMK_CONF_RETRY_LOCATION_REQUEST,
+                        R_LMK_REQUEST_FAIL_MORE_INFO, MessageQueryCallBack))
+                    {
+                    if (iLocationService)
+                        {
+                        delete iLocationService;
+                        iLocationService = NULL;
+                        }
+                    CurrentLocationCmdL();
+                    }
+                }
+            }
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkEditorImpl::CreateCustomControlL
+// -----------------------------------------------------------------------------
+//
+SEikControlInfo CLmkEditorImpl::CreateCustomControlL(TInt /*aControlType*/)
+    {
+    SEikControlInfo ctrl;
+    ctrl.iControl = NULL;
+    ctrl.iTrailerTextId = 0;
+    ctrl.iFlags = 0;
+    /*switch( aControlType )
+     {
+     case EDistanceEditorType:
+     {
+     ctrl.iControl = new(ELeave) CLmkDistanceEditor();
+     break;
+     }
+     default:
+     {
+     break;
+     }
+     }*/
+    return ctrl;
+    }
+
+// ----------------------------------------------------
+// CLmkEditorImpl::ConvertCustomControlTypeToBaseControlType
+// ----------------------------------------------------
+//
+MEikDialogPageObserver::TFormControlTypes CLmkEditorImpl::ConvertCustomControlTypeToBaseControlType(
+        TInt aControlType) const
+    {
+    switch (aControlType)
+        {
+        case EDistanceEditorType:
+            {
+            return MEikDialogPageObserver::EMfneDerived;
+            //break;
+            }
+        default:
+            {
+            return MEikDialogPageObserver::EUnknownType;
+            //break;
+            }
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkEditorImpl::PreLayoutDynInitL
+// -----------------------------------------------------------------------------
+//
+void CLmkEditorImpl::PreLayoutDynInitL()
+    {
+    CAknForm::PreLayoutDynInitL();
+    // When adding fields the form must be editable:
+    SetEditableL(ETrue);
+    if (iCalegorySelectionFlag && iCategoryNames.Count() >= 1)
+        iEditorFieldArray->SetCategoryName(iCategoryNames[0]);
+    iEditorFieldArray->CreateFieldsFromLmkL();
+    SetEditableL(EFalse);
+    CAknForm::SetInitialCurrentLine();
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkEditorImpl::PostLayoutDynInitL
+// -----------------------------------------------------------------------------
+//
+void CLmkEditorImpl::PostLayoutDynInitL()
+    {
+    CAknForm::PostLayoutDynInitL();
+    MLmkFieldData* fields = iLmkFields->GetField(EName);
+    if (fields)
+        {
+        TPtrC name = fields->TextData();
+        //ChangeTitle
+        HBufC* title = name.Alloc();
+        CleanupStack::PushL(title);
+        iLmkUiUtils->StoreTitlePaneL(); // save old title pane
+        iLmkUiUtils->ChangeTitlePaneL(title); //take ownership
+        CleanupStack::Pop(title); //title
+        }
+
+    SetEditableL(iEditorMode == CLmkEditorDlg::ELmkEditor);
+    CEikButtonGroupContainer* cba = CEikButtonGroupContainer::Current();
+    cba->UpdateCommandObserverL(KMskCommandPos, *this);
+    if (!IsEditable())
+        {
+        AddMskCommandL(R_LM_MSK_EDIT, ELmkCmdEditLm);
+        }
+    else
+        {
+        //only for editor
+        DimmMiddleSoftKey();
+        if (iFieldTypeToFocus == ECategory || iFieldTypeToFocus
+                == ECategories)
+            {
+            AddMskCommandL(R_LM_MSK_EDIT, ELmkCmdSelectCategories);
+            }
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkEditorImpl::OkToExitL
+// -----------------------------------------------------------------------------
+//
+TBool CLmkEditorImpl::OkToExitL(TInt aKeyCode)
+    {
+    DEBUG( CLmkEditorImpl::OkToExitL start );
+    TBool ret = EFalse;
+    switch (aKeyCode)
+        {
+        case EAknSoftkeyDone:
+            {
+            if (IsEditable())
+                {
+                if (iEditorFieldArray->AreAllFieldsEmptyL())
+                    {
+                    if (iLandmark && iIsHideCoordinate)
+                        {
+                        TLocality locality;
+                        iLandmark->GetPosition(locality);
+                        if (!Math::IsNaN(locality.Latitude()))
+                            {
+                            DoNotSaveFormDataL();
+                            iIsEndKey = EFalse;
+                            // Stay back in the editor mode
+                            break;
+                            }
+                        }
+                    TRAPD(err,CPosLandmark* landmark = iDb.ReadLandmarkLC(iLmkFields->LandmarkId());CleanupStack::PopAndDestroy( landmark ));
+                    if (err == KErrNotFound)
+                        {
+                        // The Landmark is not in the database.Dont save the 
+                        // landmark. Just return
+                        // Don't save when all landmark fields are empty 
+                        iLmkUiUtils->RestoreOldNaviPaneL();
+                        ret = ETrue;
+                        }
+                    else
+                        {
+                        // The landmark is in the database. Hence, confirm
+                        // from the user whether he wants to delete the
+                        // landmark
+                        if (LmkNotes::LandmarkConfirmationQueryL(iEikonEnv))
+                            {
+                            iLmkFields->DeleteLandmarkL();
+                            iLmkUiUtils->RestoreOldNaviPaneL();
+                            ret = ETrue;
+                            }
+                        else
+                            {
+                            // Stay back in the editor mode
+                            ret = EFalse;
+                            }
+                        }
+
+                    }
+                else
+                    {
+                    if (!ValidateContentL())
+                        {
+                        ret = EFalse;
+                        return ret;
+                        }
+                    else
+                        {                        
+                        /**
+                         * Do not save landmark if disc space is not
+                         * enough
+                         */
+                        TRAPD( err, iEditorFieldArray->SaveFieldsL() );
+                        if (err == KErrDiskFull)
+                            {
+                            ret = EFalse;
+                            LmkNotes::OutOfMemoryNoteL(iEikonEnv);
+                            delete this;
+                            return ret;
+                            }
+
+                        if (iLandmarkItemId)
+                            {
+                            *iLandmarkItemId = iLmkFields->LandmarkId();
+                            }
+                        iLmkUiUtils->RestoreOldNaviPaneL();
+                        ret = ETrue;
+                        }
+                    }
+                }
+            else
+                {
+                iLmkUiUtils->RestoreOldNaviPaneL();
+                ret = ETrue;
+                }
+            break;
+            }
+        default:
+            break;
+        }
+    if (!ret)
+        {
+        ret = CAknForm::OkToExitL(aKeyCode);
+        }
+    DEBUG1( CLmkEditorImpl::OkToExitL start ret=%d,ret );
+    return ret;
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkEditorImpl::CreateLineL
+// -----------------------------------------------------------------------------
+//
+CCoeControl* CLmkEditorImpl::CreateLineL(const TDesC& aCaption,
+        TInt aControlId, TInt aControlType)
+    {
+    return CreateLineByTypeL(aCaption, aControlId, aControlType, NULL);
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkEditorImpl::LineControl
+// -----------------------------------------------------------------------------
+//
+CEikCaptionedControl* CLmkEditorImpl::LineControl(TInt aControlId) const
+    {
+    return Line(aControlId);
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkEditorImpl::DeleteControl
+// -----------------------------------------------------------------------------
+//
+void CLmkEditorImpl::DeleteControl(TInt aControlId)
+    {
+    DeleteLine(aControlId);
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkEditorImpl::TryChangeFocusL
+// -----------------------------------------------------------------------------
+//
+void CLmkEditorImpl::TryChangeFocusL(TInt aControlId)
+    {
+    if (ControlOrNull(aControlId))
+        {
+        TryChangeFocusToL(aControlId);
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkEditorImpl::SetCurrentLineCaptionL
+// -----------------------------------------------------------------------------
+//
+void CLmkEditorImpl::SetCurrentLineCaptionL(TInt aControlId,
+        const TDesC& aText)
+    {
+    CEikCaptionedControl* ctl = Line(aControlId);
+    if (ctl)
+        {
+        ctl->SetCaptionL(aText);
+        ctl->DrawDeferred();
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkEditorImpl::Control
+// -----------------------------------------------------------------------------
+//
+CCoeControl* CLmkEditorImpl::Control(TInt aControlId) const
+    {
+    return ControlOrNull(aControlId);
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkEditorImpl::SetEditableL
+// -----------------------------------------------------------------------------
+//
+void CLmkEditorImpl::SetEditableL(TBool aState)
+    {
+    CAknForm::SetEditableL(aState);
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkEditorImpl::Database
+// -----------------------------------------------------------------------------
+//
+CPosLandmarkDatabase& CLmkEditorImpl::Database()
+    {
+    return iDb;
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkEditorImpl::GetCurrentEditedLandmarkL
+// -----------------------------------------------------------------------------
+//
+CPosLandmark* CLmkEditorImpl::GetCurrentEditedLandmarkL()
+    {
+    iEditorFieldArray->SaveFieldsToBufferL();
+    CArrayPtrFlat<MLmkFieldData>& fieldArray = iLmkFields->Fields();
+    TInt count(fieldArray.Count());
+    CPosLandmark* lmk = NULL;
+    if (iLandmark)
+        {
+        HBufC8* lmBuf = PosLandmarkSerialization::PackL(*iLandmark);
+        CleanupStack::PushL(lmBuf);
+        lmk = PosLandmarkSerialization::UnpackL(lmBuf->Des());
+        CleanupStack::PopAndDestroy(lmBuf);
+        }
+    else
+        {
+        lmk = CPosLandmark::NewL();
+        }
+
+    TBool isPosFieldPresent = EFalse;
+
+    TLocationData locationData; // to store editor position data
+
+    //Position data
+    TLocality locality = TLocality(); // empty locality
+
+    locationData.iLatitude = locality.Latitude();
+    locationData.iLongitude = locality.Longitude();
+    locationData.iAltitude = locality.Altitude();
+    locationData.iHorizontalAccuracy = locality.HorizontalAccuracy();
+    locationData.iVerticalAccuracy = locality.VerticalAccuracy();
+
+    for (TInt i = 0; i < count; i++)
+        {
+        switch (fieldArray[i]->FieldType())
+            {
+            case EName:
+                {
+                lmk->SetLandmarkNameL(fieldArray[i]->TextData());
+                HBufC* path = fieldArray[i]->IconPath();
+                if (path && path->Length() > 0 && fieldArray[i]->IconId()
+                        != KErrNotFound)
+                    {
+                    // Get the default Mask index
+                    lmk->SetIconL(*path, fieldArray[i]->IconId(),
+                            KLmkDefaultId + 1);
+                    }
+
+                break;
+                }
+            case ECategory:
+            case ECategories:
+                {
+                //Add categories to landmark
+                RArray<TPosLmItemId>& categories =
+                        fieldArray[i]->Categories();
+                TInt Tcount(categories.Count());
+                for (TInt j = 0; j < Tcount; j++)
+                    {
+                    lmk->AddCategoryL(categories[j]);
+                    }
+                break;
+                }
+            case EDescription:
+                {
+                lmk->SetLandmarkDescriptionL(fieldArray[i]->TextData());
+                break;
+                }
+                //these all are same
+            case EStreet:
+            case EPostCode:
+            case ECity:
+            case EStateProvince:
+            case ECountry:
+            case EPhoneNumber:
+            case EWebAddress:
+                {
+                lmk->SetPositionFieldL(fieldArray[i]->PositionFieldId(),
+                        fieldArray[i]->TextData());
+                break;
+                }
+            case ELatitude:
+                {
+                isPosFieldPresent = ETrue;
+                locationData.iLatitude = fieldArray[i]->DoubleData();
+                break;
+                }
+            case ELongitude:
+                {
+                isPosFieldPresent = ETrue;
+                locationData.iLongitude = fieldArray[i]->DoubleData();
+                break;
+                }
+            case EPositionAccuracy:
+                {
+                locationData.iHorizontalAccuracy = fieldArray[i]->FloatData();
+                break;
+                }
+            case EAltitude:
+                {
+                locationData.iAltitude = fieldArray[i]->FloatData();
+                break;
+                }
+            case EAltitudeAccuracy:
+                {
+                locationData.iVerticalAccuracy = fieldArray[i]->FloatData();
+                break;
+                }
+            default:
+                {
+                break;
+                }
+            }
+        }
+
+    if (isPosFieldPresent)
+        {
+        // remove the old values to set new values       
+        lmk->RemoveLandmarkAttributes(CPosLandmark::EPosition);
+
+        if (!Math::IsNaN(locationData.iLatitude) && !Math::IsNaN(
+                locationData.iLongitude))
+            {
+            if (!Math::IsNaN(locationData.iAltitude))
+                {
+                locality.SetCoordinate(locationData.iLatitude,
+                        locationData.iLongitude, locationData.iAltitude);
+
+                if (!Math::IsNaN(locationData.iVerticalAccuracy))
+                    {
+                    if (locationData.iVerticalAccuracy > 0)
+                        locality.SetVerticalAccuracy(
+                                locationData.iVerticalAccuracy);
+                    }
+                }
+            else
+                {
+                locality.SetCoordinate(locationData.iLatitude,
+                        locationData.iLongitude);
+                }
+
+            if (!Math::IsNaN(locationData.iHorizontalAccuracy))
+                {
+                if (locationData.iHorizontalAccuracy > 0)
+                    locality.SetHorizontalAccuracy(
+                            locationData.iHorizontalAccuracy);
+                }
+            // save position if at least lat/lon are entered
+            lmk->SetPositionL(locality);
+            }
+        }
+    return lmk;
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkEditorImpl::CreateLabelArrayL
+// -----------------------------------------------------------------------------
+//
+void CLmkEditorImpl::CreateLabelArrayL()
+    {
+
+    if (iJapaneseInputMode)
+        {
+        // Display in Japanese order
+        CreateLabelArrayForJapaneseModeL();
+        }
+    else
+        { // Normal mode
+        CreateLabelArrayForNormalModeL();
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkEditorImpl::CreateLabelArrayForNormalModeL()
+// -----------------------------------------------------------------------------
+//
+void CLmkEditorImpl::CreateLabelArrayForNormalModeL()
+    {
+    CreateLabelL(R_LMK_NAME_LABEL, EName);
+    CreateLabelL(R_LMK_CATEGORY_LABEL, ECategory);
+    CreateLabelL(R_LMK_CATEGORIES_LABEL, ECategories);
+    CreateLabelL(R_LMK_DESCRIPTION_LABEL, EDescription);
+    CreateLabelL(R_LMK_STREET_LABEL, EStreet);
+    CreateLabelL(R_LMK_POST_CODE_LABEL, EPostCode);
+    CreateLabelL(R_LMK_CITY_LABEL, ECity);
+    CreateLabelL(R_LMK_STATE_PROVINCE_LABEL, EStateProvince);
+    CreateLabelL(R_LMK_COUNTRY_LABEL, ECountry);
+    CreateLabelL(R_LMK_PHONE_NUMBER_LABEL, EPhoneNumber);
+    CreateLabelL(R_LMK_WEB_ADDRESS_LABEL, EWebAddress);
+    CreateLabelL(R_LMK_LATITUDE_LABEL, ELatitude);
+    CreateLabelL(R_LMK_LONGITUDE_LABEL, ELongitude);
+    CreateLabelL(R_LMK_POSITION_ACCURACY_LABEL, EPositionAccuracy);
+    CreateLabelL(R_LMK_ALTITUDE_LABEL, EAltitude);
+    CreateLabelL(R_LMK_ALTITUDE_ACCURACY_LABEL, EAltitudeAccuracy);
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkEditorImpl::CreateLabelArrayForJapaneseModeL()
+// -----------------------------------------------------------------------------
+//
+void CLmkEditorImpl::CreateLabelArrayForJapaneseModeL()
+    {
+    CreateLabelL(R_LMK_NAME_LABEL, ENameJapaneseMode);
+    CreateLabelL(R_LMK_CATEGORY_LABEL, ECategoryJapaneseMode);
+    CreateLabelL(R_LMK_CATEGORIES_LABEL, ECategoriesJapaneseMode);
+    CreateLabelL(R_LMK_DESCRIPTION_LABEL, EDescriptionJapaneseMode);
+    CreateLabelL(R_LMK_POST_CODE_LABEL, EPostCodeJapaneseMode);
+    CreateLabelL(R_LMK_STATE_PROVINCE_LABEL, EStateProvinceJapaneseMode);
+    CreateLabelL(R_LMK_CITY_LABEL, ECityJapaneseMode);
+    CreateLabelL(R_LMK_STREET_LABEL, EStreetJapaneseMode);
+    CreateLabelL(R_LMK_COUNTRY_LABEL, ECountryJapaneseMode);
+    CreateLabelL(R_LMK_PHONE_NUMBER_LABEL, EPhoneNumberJapaneseMode);
+    CreateLabelL(R_LMK_WEB_ADDRESS_LABEL, EWebAddressJapaneseMode);
+    CreateLabelL(R_LMK_LATITUDE_LABEL, ELatitudeJapaneseMode);
+    CreateLabelL(R_LMK_LONGITUDE_LABEL, ELongitudeJapaneseMode);
+    CreateLabelL(R_LMK_POSITION_ACCURACY_LABEL, EPositionAccuracyJapaneseMode);
+    CreateLabelL(R_LMK_ALTITUDE_LABEL, EAltitudeJapaneseMode);
+    CreateLabelL(R_LMK_ALTITUDE_ACCURACY_LABEL, EAltitudeAccuracyJapaneseMode);
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkEditorImpl::CreateLabelL
+// -----------------------------------------------------------------------------
+//
+void CLmkEditorImpl::CreateLabelL(TInt iResourceId, TInt iPos)
+    {
+    HBufC* label = iCoeEnv->AllocReadResourceL(iResourceId);
+    CleanupStack::PushL(label);
+    User::LeaveIfError(iLabelArray.Insert(label, iPos));
+    CleanupStack::Pop(); //label
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkEditorImpl::IsNameFieldEmptyL
+// -----------------------------------------------------------------------------
+//
+TBool CLmkEditorImpl::IsNameFieldEmptyL()
+    {
+    const MLmkEditorField* field = &iEditorFieldArray->FieldAt(0);
+    HBufC* fieldText = field->ControlTextL();
+    TBool ret(ETrue);
+    if (fieldText && fieldText->Length() > 0)
+        {
+        //Check if any active character or not
+        TPtr16 ptr = fieldText->Des();
+        ptr.Trim();
+        if (ptr.Length() == 0)
+            {
+            ret = ETrue;
+            }
+        else
+            {
+            ret = EFalse;
+            }
+        }
+    delete fieldText;
+    return ret;
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkEditorImpl::ValidateContentL()
+// -----------------------------------------------------------------------------
+//
+TBool CLmkEditorImpl::ValidateContentL()
+    {
+    TBool result = ETrue;
+    if (IsFieldEmptyL(ELatitude) && !IsFieldEmptyL(ELongitude))
+        {
+        LmkNotes::InformationNoteL(iEikonEnv, R_LMK_ERROR_CHECK_NOTE);
+        DoNotSaveDataL(ELatitude);
+        result = EFalse;
+        }
+    else if (!IsFieldEmptyL(ELatitude) && IsFieldEmptyL(ELongitude))
+        {
+        LmkNotes::InformationNoteL(iEikonEnv, R_LMK_ERROR_CHECK_NOTE);
+        DoNotSaveDataL(ELongitude);
+        result = EFalse;
+        }
+    else if (IsFieldEmptyL(ELatitude) && !IsFieldEmptyL(EPositionAccuracy))
+        {
+        LmkNotes::InformationNoteL(iEikonEnv, R_LMK_ERROR_POS_ACC_CHECK_NOTE);
+        DoNotSaveDataL(ELatitude);
+        result = EFalse;
+        }
+    else if (IsFieldEmptyL(ELongitude) && !IsFieldEmptyL(EPositionAccuracy))
+        {
+        LmkNotes::InformationNoteL(iEikonEnv, R_LMK_ERROR_POS_ACC_CHECK_NOTE);
+        DoNotSaveDataL(ELongitude);
+        result = EFalse;
+        }
+    else if (IsFieldEmptyL(EAltitude) && !IsFieldEmptyL(EAltitudeAccuracy))
+        {
+        LmkNotes::InformationNoteL(iEikonEnv, R_LMK_ERROR_ALT_ACC_CHECK_NOTE);
+        DoNotSaveDataL(EAltitude);
+        result = EFalse;
+        }
+    else if ((IsFieldEmptyL(ELatitude) || IsFieldEmptyL(ELongitude))
+            && !IsFieldEmptyL(EAltitude))
+        {
+        LmkNotes::InformationNoteL(iEikonEnv, R_LMK_ERROR_ALTITUDE_CHECK_NOTE);
+        DoNotSaveDataL(ELatitude);
+        result = EFalse;
+        }
+    else if (IsInvalidUriL())
+        {
+        LmkNotes::InformationNoteL(iEikonEnv, R_LMK_ERROR_URL_ILLEGAL_NOTE);
+        DoNotSaveDataL(EWebAddress);
+        result = EFalse;
+        }
+    else if (IsNameFieldEmptyL())
+        {
+        DoNotSaveFormDataL();
+        iIsEndKey = EFalse;
+        result = EFalse;
+        }
+    return result;
+
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkEditorImpl::IsFieldEmptyL()
+// -----------------------------------------------------------------------------
+//
+TBool CLmkEditorImpl::IsFieldEmptyL(const TUint16 aFieldType)
+    {
+    TInt fldId;
+    MLmkFieldData* field = iLmkFields->GetField(aFieldType);
+    if (field)
+        {
+        fldId = field->UniqueFieldIdentity();
+        }
+    else
+        {
+        return EFalse;
+        }
+
+    MLmkEditorField* fld = iEditorFieldArray->Find(fldId);
+    if (!fld)
+        {
+        return ETrue;
+        }
+
+    TReal val;
+    switch (aFieldType)
+        {
+        case ELatitude:
+        case ELongitude:
+            {
+            val = fld->FieldValue();
+            }
+            break;
+        case EPositionAccuracy:
+        case EAltitudeAccuracy:
+        case EAltitude:
+            {
+            val = fld->FieldValue();
+            }
+            break;
+        }
+    return Math::IsNaN(val);
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkEditorImpl::DoNotSaveDataL()
+// -----------------------------------------------------------------------------
+//
+void CLmkEditorImpl::DoNotSaveDataL(const TUint16 aFieldType)
+    {
+    if (iIsEditing)
+        {
+        MLmkFieldData* fields = iLmkFields->GetField(aFieldType);
+        if (fields)
+            {
+            TInt id = fields->UniqueFieldIdentity();
+            TryChangeFocusL(id);
+            }
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkEditorImpl::OkToExitL
+// -----------------------------------------------------------------------------
+//
+TBool CLmkEditorImpl::OkToExitL()
+    {
+    TBool result = ETrue;
+    if (iEditorFieldArray->AreAllFieldsEmptyL())
+        {
+        iLmkFields->DeleteLandmarkL();
+        }
+    else
+        {
+        if (IsNameFieldEmptyL())
+            {
+            DoNotSaveFormDataL();
+            result = EFalse;
+            }
+        else
+            {
+            TRAPD( err, iEditorFieldArray->SaveFieldsL() );
+            if (err == KErrDiskFull)
+                {
+                result = EFalse;
+                LmkNotes::OutOfMemoryNoteL(iEikonEnv);
+                delete this;
+                return result;
+                }
+            if (iLandmarkItemId)
+                {
+                *iLandmarkItemId = iLmkFields->LandmarkId();
+                }
+            }
+        }
+    return result;
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkEditorImpl::SelectCategoriesCmdL
+// -----------------------------------------------------------------------------
+//
+void CLmkEditorImpl::SelectCategoriesCmdL()
+    {
+    if (iCatInfoPopupNote)
+        {
+        iCatInfoPopupNote->HideInfoPopupNote();
+        }
+    MLmkFieldData* fields = iLmkFields->GetField(ECategory);
+    if (!fields)
+        {
+        fields = iLmkFields->GetField(ECategories);
+        }
+    if (fields)
+        {
+        CLmkDlgCategorySelectorImpl* dlg = CLmkDlgCategorySelectorImpl::NewL(
+                iDb, ETrue);
+        CleanupStack::PushL(dlg);
+        dlg->SetEmptyDlgLabel(R_LMK_EMPTY_NO_CATEGORIES,
+                R_LMK_GUIDE_CREATE_LANDMARK);
+        RArray<TPosLmItemId>& categories = fields->Categories();
+        if (dlg->ExecuteL(categories))
+            {
+            iEditorFieldArray->UpdateFieldsL(ECategory);
+            iEditorFieldArray->UpdateFieldsL(ECategories);
+            }
+        CleanupStack::PopAndDestroy(dlg);
+        iIsCategorySelctorOpen = EFalse;
+        DrawNow();
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkEditorImpl::CurrentLocationCmdL
+// -----------------------------------------------------------------------------
+//
+void CLmkEditorImpl::CurrentLocationCmdL()
+    {
+    if (ShowQueryIfLocationFieldsAlreadyFilledL())
+        {
+        return;
+        }
+    HBufC* srvName = StringLoader::LoadLC(R_LMK_SERVICE_RULE_NAME,
+            const_cast<CCoeEnv *> (iCoeEnv));
+    iLocationService = CLmkLocationService::NewL(*srvName);
+    CleanupStack::PopAndDestroy(srvName); //srvName
+    iLocationService->SetObserver(*this);
+    iLocationService->LocationRequestL();
+    TRAPD( error, iWaitDialogLauncher->StartWaitDialogL());
+    if (error)
+        {
+        delete iLocationService;
+        iLocationService = NULL;
+
+        User::Leave(error);
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkEditorImpl::ChangeIconCmdL
+// -----------------------------------------------------------------------------
+//
+void CLmkEditorImpl::ChangeIconCmdL()
+    {
+    TInt lSelectedIconIndex(0);
+    CLmkIconMapDialog* dialog = new (ELeave) CLmkIconMapDialog(
+            lSelectedIconIndex);
+    MLmkFieldData* nameField;
+    if (dialog->ExecuteLD(R_LMK_ICON_TABLE_DIALOG))
+        {
+        // icon file also contains masks, therefore 2*
+        TInt iconIndex = 2 * lSelectedIconIndex;
+        RFs fs;
+        User::LeaveIfError(fs.Connect());
+        CleanupClosePushL(fs);
+
+        if (SysUtil::DiskSpaceBelowCriticalLevelL(&fs, sizeof(CPosLandmark),
+                EDriveC))
+            {
+            CleanupStack::PopAndDestroy(); // fs
+            User::LeaveNoMemory();
+            }
+        else
+            {
+            nameField = iLmkFields->GetField(EName);
+            TFileName* iconFile = CLmkUiUtils::LmkUiIconFileLC();
+            if (nameField && iconFile)
+                {
+                nameField->SetIconId(iconIndex
+                        + EMbmLmkuiQgn_prop_lm_transport);
+                nameField->SetIconPathL(*iconFile);
+
+                //Update context icon
+                CEikImage* image = new (ELeave) CEikImage();
+                CleanupStack::PushL(image);
+                image->CreatePictureFromFileL(*iconFile, nameField->IconId(),
+                        iconIndex + EMbmLmkuiQgn_prop_lm_transport_mask);
+
+                iLmkUiUtils->UpdateContextIconL(image);
+
+                // Added for appending Icon to Name label
+                CLmkUiUtils::ChangeLmNameLabelIconL(*this, *nameField);
+                CleanupStack::Pop(); //image
+                CleanupStack::PopAndDestroy();//iconFile
+                DrawNow();
+                }
+            }
+        CleanupStack::PopAndDestroy(); // fs
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkEditorImpl::CategoriesCmdL
+// -----------------------------------------------------------------------------
+//
+void CLmkEditorImpl::CategoriesCmdL()
+    {
+    MLmkFieldData* categoryField = iLmkFields->GetField(ECategories);
+    if (!categoryField)
+        {
+        return;
+        }
+    RArray<TPosLmItemId> categories = categoryField->Categories();
+    TInt count(categories.Count());
+
+    HBufC* catName;
+    // show the category list in a message query
+    HBufC* message = HBufC::NewLC((KPosLmMaxCategoryNameLength * count) + 1);
+    TPtr msgPtr = message->Des();
+    CDesC16ArrayFlat* desArr = new (ELeave) CDesC16ArrayFlat(count);
+    CleanupStack::PushL(desArr);
+    // fill up the array with category´s names from the engine.
+    for (TInt i = 0; i < count; i++)
+        {
+        catName = CLmkDbUtils::CategoryNameL(iDb, categories[i]);
+        CleanupStack::PushL(catName);
+        desArr->AppendL(catName->Des());
+        CleanupStack::PopAndDestroy(catName); //name
+        }
+    desArr->Sort();
+    for (TInt i = 0; i < count; i++)
+        {
+        msgPtr.Append((*desArr)[i]);
+        if (i != (count - 1))
+            {
+            msgPtr.Append(_L("\n"));
+            }
+        }
+    LmkNotes::MessageQueryL(iEikonEnv, msgPtr, count);
+    CleanupStack::Pop();//desArr
+    delete desArr;
+    CleanupStack::PopAndDestroy(message); //message
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkEditorImpl::SetCurrentLocationL
+// -----------------------------------------------------------------------------
+//
+void CLmkEditorImpl::SetCurrentLocationL(const TPosition& aPosition)
+    {
+    MLmkFieldData* latitude = iLmkFields->GetField(ELatitude);
+    if (latitude)
+        {
+        latitude->SetTReal(aPosition.Latitude());
+
+        MLmkFieldData* longitude = iLmkFields->GetField(ELongitude);
+        if (longitude)
+            longitude->SetTReal(aPosition.Longitude());
+        }
+
+    MLmkFieldData* altitude = iLmkFields->GetField(EAltitude);
+    if (altitude)
+        {
+        altitude->SetTReal(aPosition.Altitude());
+        }
+
+    MLmkFieldData* horizontalAccuracy = iLmkFields->GetField(
+            EPositionAccuracy);
+    if (horizontalAccuracy)
+        {
+        horizontalAccuracy->SetTReal(aPosition.HorizontalAccuracy());
+        }
+
+    MLmkFieldData* verticalAccuracy = iLmkFields->GetField(EAltitudeAccuracy);
+    if (verticalAccuracy)
+        {
+        verticalAccuracy->SetTReal(aPosition.VerticalAccuracy());
+        }
+
+    TRAP_IGNORE(iLandmark->SetPositionL(aPosition));
+
+    iEditorFieldArray->UpdateFieldsL(EAllEditorItems);
+
+    DrawNow();
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkEditorImpl::ChangeContextImageL
+// -----------------------------------------------------------------------------
+//
+void CLmkEditorImpl::ChangeContextImageL()
+    {
+    MLmkFieldData* nameField = iLmkFields->GetField(EName);
+    if (nameField)
+        {
+        CEikImage* image = new (ELeave) CEikImage();
+        CleanupStack::PushL(image);
+        TFileName* defaultIconFile = CLmkUiUtils::LmkUiIconFileLC();
+        // No need to add iconFile to cleanupstack since it is a member variable from CLmkFieldData class
+        HBufC *iconFile = nameField->IconPath();
+        TInt err = KErrNotFound;
+        CFbsBitmap* bitmap;
+        CFbsBitmap* mask;
+        if (nameField->IconId() != KErrNotFound)
+            {
+            TRAP(err,AknIconUtils::CreateIconL( bitmap, mask,
+                            *iconFile, nameField->IconId(),
+                            nameField->IconId()+1 ););
+            }
+        // If the Icon File doesn't exist the CreateIconL in the if statement above will
+        // Leave with KErrNotFound in which case the default Icon should be loaded.
+        // Also when the Landmarks itself doesn't have a valid Icon, the default Icon is
+        // loaded.
+        if (err != KErrNone)
+            {
+            AknIconUtils::CreateIconL(bitmap, mask, *defaultIconFile,
+                    KLmkDefaultId, KLmkDefaultId + 1);
+            }
+        image->SetBitmap(bitmap);
+        image->SetMask(mask);
+        iLmkUiUtils->SwapNewContextIconL(image);
+        CleanupStack::PopAndDestroy(); //defaultIconFile
+        CleanupStack::Pop(); //image
+        }
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkEditorImpl::AttachAIWMenuInterestL
+// ----------------------------------------------------------------------------
+//
+void CLmkEditorImpl::AttachAIWMenuInterestL()
+    {
+    if (iMapNavFeature)
+        {
+        iMapNavInterface->AttachAIWInterestL(R_LMK_EDITOR_MENU,
+                R_LMK_EDITOR_AIW_INTEREST_SHOWONMAP);
+        if (iEditorMode != CLmkEditorDlg::ELmkEditor)
+            {
+            iMapNavInterface->AttachAIWInterestL(R_LMK_EDITOR_MENU,
+                    R_LMK_EDITOR_AIW_INTEREST_NAVIGATETO);
+            }
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkEditorImpl::HandleResourceChange()
+// -----------------------------------------------------------------------------
+//
+void CLmkEditorImpl::HandleResourceChange(TInt aType)
+    {
+    CAknForm::HandleResourceChange(aType);
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkEditorImpl::CategoriesCmdFromXmlL
+// -----------------------------------------------------------------------------
+//
+void CLmkEditorImpl::CategoriesCmdFromXmlL()
+    {
+    TInt count = iCategoryNames.Count();
+    if (count <= 1)
+        {
+        return;
+        }
+    CDesC16ArrayFlat* desArr = new (ELeave) CDesC16ArrayFlat(count);
+    CleanupStack::PushL(desArr);
+    // fill up the array with category´s names from the engine.
+    for (TInt i = 0; i < count; i++)
+        {
+        desArr->AppendL(iCategoryNames[i]);
+        }
+
+    desArr->Sort();
+    // show the category list in a message query
+    HBufC* message = HBufC::NewLC((KPosLmMaxCategoryNameLength
+            * iCategoryNames.Count()) + 1);
+    TPtr msgPtr = message->Des();
+    for (TInt i = 0; i < count; i++)
+        {
+        msgPtr.Append((*desArr)[i]);
+        if (i != (count - 1))
+            {
+            msgPtr.Append(_L("\n"));
+            }
+        }
+    LmkNotes::MessageQueryL(iEikonEnv, msgPtr, count);
+    CleanupStack::PopAndDestroy(2); //message ,desArr
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkEditorImpl::ConstructContextMenuL()
+// -----------------------------------------------------------------------------
+//
+void CLmkEditorImpl::ConstructContextMenuL()
+    {
+    CEikMenuBar* newMenuBar = new (ELeave) CEikMenuBar();
+    CleanupStack::PushL(newMenuBar);
+    newMenuBar->ConstructL(this, NULL, R_LMK_EDITOR_CONTEXT_MENUBAR);
+    iEikonEnv->EikAppUi()->AddToStackL(newMenuBar, ECoeStackPriorityMenu,
+            ECoeStackFlagRefusesFocus);
+    iContextMenuBar = newMenuBar;
+    CleanupStack::Pop(newMenuBar);
+    }
+
+// -----------------------------------------------------------------------------
+//  CLmkEditorImpl::GetFieldTextLengthL
+// -----------------------------------------------------------------------------
+//
+TInt CLmkEditorImpl::GetFieldTextLengthL(MLmkEditorField& afield)
+    {
+    HBufC* fieldText = afield.ControlTextL();
+    TInt fieldLen(0);
+    if (fieldText)
+        {
+        if (fieldText->Length() > 0)
+            {// Remove any blank spaces if any
+            TPtr16 ptr = fieldText->Des();
+            ptr.Trim();
+            fieldLen = ptr.Length();
+            }
+        }
+    delete fieldText;
+    return fieldLen;
+    }
+// -----------------------------------------------------------------------------
+// CLmkEditorImpl::UpdateViewDlgL
+// -----------------------------------------------------------------------------
+//
+void CLmkEditorImpl::UpdateViewDlgL()
+    {
+    DEBUG( CLmkEditorImpl::UpdateViewDlgL start )
+    CPosLandmark* landmark;
+    TInt id = iLmkFields->LandmarkId();
+    landmark = iDb.ReadLandmarkLC(id);
+    TLocality locality;
+    landmark->GetPosition(locality);
+    TRAP_IGNORE(iLandmark->SetPositionL(locality));
+    CArrayPtrFlat<MLmkFieldData>& fieldArray = iLmkFields->Fields();
+    CArrayPtrFlat<MLmkEditorField>& editorFieldArray =
+            iEditorFieldArray->GetFieldArray();
+    TInt count = fieldArray.Count();
+    TInt postn = KErrNotFound;
+    TInt ctrlid = KErrNotFound;
+    for (TInt i(0); i < count; i++)
+        {
+        TUint fieldType = fieldArray[i]->FieldType();
+        MLmkEditorField* fld = iEditorFieldArray->Find(
+                fieldArray[i]->UniqueFieldIdentity(), &postn, &ctrlid);
+
+        switch (fieldType)
+            {
+            case EName:
+                {
+                UpdateNameEditorControlL(fld, landmark, fieldArray[i]);
+                break;
+                }
+            case ECategory:
+            case ECategories:
+                {
+                UpdateCategoryEditorControlL(fld, fieldArray[i], ctrlid,
+                        postn, *landmark);
+                break;
+                }
+            case EDescription:
+                {
+                UpdateDesEditorControlL(fld, landmark, fieldArray[i], ctrlid,
+                        postn);
+                break;
+                }
+                //these all are same
+            case EStreet:
+            case EPostCode:
+            case ECity:
+            case EStateProvince:
+            case ECountry:
+            case EPhoneNumber:
+            case EWebAddress:
+                {
+                UpdateTextEditorControlL(fld, landmark, fieldArray[i],
+                        fieldType, ctrlid, postn);
+                break;
+                }
+            case ELatitude:
+                {
+                UpdateCoordinateEditorControlL(fld, fieldArray[i],
+                        locality.Latitude(), ctrlid, postn);
+                break;
+                }
+            case ELongitude:
+                {
+                UpdateCoordinateEditorControlL(fld, fieldArray[i],
+                        locality.Longitude(), ctrlid, postn);
+                break;
+                }
+            case EPositionAccuracy:
+                {
+                UpdateNumberEditorControlL(fld, fieldArray[i],
+                        locality.HorizontalAccuracy(), ctrlid, postn);
+                break;
+                }
+            case EAltitude:
+                {
+                UpdateNumberEditorControlL(fld, fieldArray[i],
+                        locality.Altitude(), ctrlid, postn);
+                break;
+                }
+            case EAltitudeAccuracy:
+                {
+                UpdateNumberEditorControlL(fld, fieldArray[i],
+                        locality.VerticalAccuracy(), ctrlid, postn);
+                break;
+                }
+            default:
+                {
+                break;
+                }
+            }
+        }
+    iEditorFieldArray->UpdateFieldsL();
+    CleanupStack::PopAndDestroy(landmark);
+    DrawNow();
+    if (!IsEditable())
+        {
+        //only for landmarks viewer
+        UpdateMskOnArrowMoveForViewerL();
+        }
+    DEBUG( CLmkEditorImpl::UpdateViewDlgL End )
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkEditorImpl::ActivateL
+// -----------------------------------------------------------------------------
+//
+void CLmkEditorImpl::ActivateL()
+    {
+    if (iEditorMode == CLmkEditorDlg::ELmkEditor && iIsEditing)
+        {
+        MLmkFieldData* fields = iLmkFields->GetField(iFieldTypeToFocus);
+        if (fields)
+            {
+            TInt id = fields->UniqueFieldIdentity();
+            TryChangeFocusL(id);
+            }
+        }
+    CCoeControl::ActivateL();
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkEditorImpl::UpdateTextEditorControlL
+// -----------------------------------------------------------------------------
+//
+void CLmkEditorImpl::UpdateTextEditorControlL(MLmkEditorField* aEditorField,
+        CPosLandmark* aLandmark, MLmkFieldData* fieldData, TUint aFiledType,
+        TInt aPrevControlId, TInt aPos)
+    {
+    TPositionFieldId fieldId = EPositionFieldNone;
+    switch (aFiledType)
+        {
+        case EStreet:
+            fieldId = EPositionFieldStreet;
+            break;
+        case EPostCode:
+            fieldId = EPositionFieldPostalCode;
+            break;
+        case ECity:
+            fieldId = EPositionFieldCity;
+            break;
+        case EStateProvince:
+            fieldId = EPositionFieldState;
+            break;
+        case ECountry:
+            fieldId = EPositionFieldCountry;
+            break;
+        case EPhoneNumber:
+            fieldId = ELmkPositionFieldPhoneNumber;
+            break;
+        case EWebAddress:
+            fieldId = ELmkPositionFieldWebAddress;
+            break;
+        }
+    TPtrC text;
+    if (aLandmark->GetPositionField(fieldId, text) == KErrNone)
+        {
+        if (IsEditable() && text.Length() == 0 && aFiledType == EWebAddress)
+            {
+            //return if web address field and field is empty and its an editor
+            return;
+            }
+        fieldData->SetTextL(text);
+        if (!IsEditable())
+            {
+            aEditorField = AddOrDeleteLineL(aEditorField, fieldData,
+                    aPrevControlId, fieldData->UniqueFieldIdentity(), aPos);
+            }
+        if (aEditorField)
+            {
+            //now modify the text for display
+            CLmkEditorTextField* field =
+                    static_cast<CLmkEditorTextField*> (aEditorField);
+            HBufC* buff = HBufC::NewLC(text.Length());
+            TPtr dispTxt = buff->Des();
+            if (!IsEditable())
+                {
+                TPtr des1 = CLmkFields::RemoveEnterCharacter(text);
+                dispTxt.Copy(des1);
+                }
+            else
+                {
+                dispTxt.Copy(text);
+                }
+            if (aFiledType == EWebAddress)
+                {
+                TInt position;
+                if ((position = field->IsWebUrlProtocolPreFixedL(dispTxt))
+                        != KErrNotFound)
+                    {
+                    field->TrimPrefixesFromWebUrlL(dispTxt, position + 1);
+                    }
+                }
+            TPtrC ptr;
+            ptr.Set(dispTxt);
+            field->SetControlTextL(ptr);
+            CleanupStack::PopAndDestroy(buff);
+            }
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkEditorImpl::UpdateDesEditorControlL
+// -----------------------------------------------------------------------------
+//
+void CLmkEditorImpl::UpdateDesEditorControlL(MLmkEditorField* aEditorField,
+        CPosLandmark* aLandmark, MLmkFieldData* fieldData,
+        TInt aPrevControlId, TInt aPos)
+    {
+    TPtrC text;
+    aLandmark->GetLandmarkDescription(text);
+    fieldData->SetTextL(text);
+    TPtrC dispTxt;
+    if (!IsEditable())
+        {
+        TPtr des1 = CLmkFields::RemoveEnterCharacter(text);
+        dispTxt.Set(des1);
+        aEditorField = AddOrDeleteLineL(aEditorField, fieldData,
+                aPrevControlId, fieldData->UniqueFieldIdentity(), aPos);
+        }
+    else
+        {
+        dispTxt.Set(text);
+        }
+    CLmkEditorTextField* field =
+            static_cast<CLmkEditorTextField*> (aEditorField);
+    if (aEditorField)
+        {
+        field->Control()->SetTextL(&dispTxt);
+        field->Control()->DrawDeferred();
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkEditorImpl::UpdateCategoryEditorControlL
+// -----------------------------------------------------------------------------
+//
+void CLmkEditorImpl::UpdateCategoryEditorControlL(
+        MLmkEditorField* aEditorField, MLmkFieldData* fieldData,
+        TInt aPrevControlId, TInt aPos, CPosLandmark& aLandmark)
+    {
+    RArray<TPosLmItemId>& categories = fieldData->Categories();
+    aLandmark.GetCategoriesL(categories);
+    TInt count(categories.Count());
+
+    if (count <= 1)
+        {
+        fieldData->SetFieldType(ECategory);
+        }
+    else
+        {
+        fieldData->SetFieldType(ECategories);
+        }
+    if (!IsEditable())
+        {
+        aEditorField = AddOrDeleteLineL(aEditorField, fieldData,
+                aPrevControlId, fieldData->UniqueFieldIdentity(), aPos);
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkEditorImpl::UpdateCoordinateEditorControlL
+// -----------------------------------------------------------------------------
+//
+void CLmkEditorImpl::UpdateCoordinateEditorControlL(
+        MLmkEditorField* aEditorField, MLmkFieldData* fieldData,
+        TReal aValue, TInt aPrevControlId, TInt aPos)
+    {
+    fieldData->SetTReal(aValue);
+    if (!IsEditable())
+        {
+        aEditorField = AddOrDeleteLineL(aEditorField, fieldData,
+                aPrevControlId, fieldData->UniqueFieldIdentity(), aPos);
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkEditorImpl::UpdateNumberEditorControlL
+// -----------------------------------------------------------------------------
+//
+void CLmkEditorImpl::UpdateNumberEditorControlL(
+        MLmkEditorField* aEditorField, MLmkFieldData* fieldData,
+        TReal32 aValue, TInt aPrevControlId, TInt aPos)
+    {
+    fieldData->SetTReal(aValue);
+
+    if (!IsEditable())
+        {
+        aEditorField = AddOrDeleteLineL(aEditorField, fieldData,
+                aPrevControlId, fieldData->UniqueFieldIdentity(), aPos);
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkEditorImpl::UpdateNameEditorControl
+// -----------------------------------------------------------------------------
+//
+void CLmkEditorImpl::UpdateNameEditorControlL(MLmkEditorField* aEditorField,
+        CPosLandmark* aLandmark, MLmkFieldData* fieldData)
+    {
+    if (aEditorField && aLandmark && fieldData)
+        {
+        //name field icon updation
+        TInt iconIden = -1;
+        TInt iconMaskIndex = -1;
+        TPtrC iconFile;
+        CLmkEditorTextField* field =
+                static_cast<CLmkEditorTextField*> (aEditorField);
+        if (aLandmark->GetIcon(iconFile, iconIden, iconMaskIndex) && field)
+            {
+            if (iconIden > 0)
+                {
+                fieldData->SetIconId(iconIden);
+                fieldData->SetIconPathL(iconFile);
+                CEikImage* image = new (ELeave) CEikImage();
+                CleanupStack::PushL(image);
+                image->CreatePictureFromFileL(iconFile, iconIden,
+                        iconMaskIndex);
+                iLmkUiUtils->UpdateContextIconL(image);
+                CLmkUiUtils::ChangeLmNameLabelIconL(*this, *fieldData);
+                CleanupStack::Pop(); //image
+                field->CaptionedControl()->DrawDeferred();
+                }
+            //text control updation
+            TPtrC text;
+            aLandmark->GetLandmarkName(text);
+            TPtrC dispTxt;
+            if (!IsEditable())
+                {
+                TPtr des1 = CLmkFields::RemoveEnterCharacter(text);
+                dispTxt.Set(des1);
+                }
+            else
+                {
+                dispTxt.Set(text);
+                }
+            field->Control()->SetTextL(&dispTxt);
+            fieldData->SetTextL(text);
+            HBufC* buff = dispTxt.AllocL();
+            iLmkUiUtils->ChangeTitlePaneL(buff);
+            field->Control()->DrawDeferred();
+            }
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkEditorImpl::SetFieldTypeToFocusInEditMode
+// -----------------------------------------------------------------------------
+//
+void CLmkEditorImpl::SetFieldTypeToFocusInEditMode(TUint aFieldType)
+    {
+    iFieldTypeToFocus = aFieldType;
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkEditorImpl::IsDlgEditing
+// -----------------------------------------------------------------------------
+//
+TBool CLmkEditorImpl::IsDlgEditing()
+    {
+    return iIsEditing;
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkEditorImpl::SetDlgEditing
+// -----------------------------------------------------------------------------
+//
+void CLmkEditorImpl::SetDlgEditing(TBool aEditing)
+    {
+    iIsEditing = aEditing;
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkEditorImpl::SetDlgEditing
+// -----------------------------------------------------------------------------
+//
+TInt CLmkEditorImpl::EditMode()
+    {
+    return iEditorMode;
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkEditorImpl::UpdateMskOnArrowMoveForViewerL
+// -----------------------------------------------------------------------------
+//
+void CLmkEditorImpl::UpdateMskOnArrowMoveForViewerL()
+    {
+    TBool cmdAdded = EFalse;
+    MLmkEditorField* field = iEditorFieldArray->Find(IdOfFocusControl());
+    TUint type = field->LandmarkItemField().FieldType();
+    switch (type)
+        {
+        case ECategories:
+            {
+            AddMskCommandL(R_LM_MSK_SHOW, ELmkCmdShow);
+            cmdAdded = ETrue;
+            break;
+            }
+        case EPhoneNumber:
+            {
+            HBufC* fieldText = field->ControlTextL();
+            CleanupStack::PushL(fieldText);
+            if (fieldText && fieldText->Length() > 0)
+                {
+                AddMskCommandL(R_LM_MSK_CALL, ELmkCmdLast);
+                cmdAdded = ETrue;
+                }
+            CleanupStack::PopAndDestroy(fieldText);
+            break;
+            }
+        case EWebAddress:
+            {
+            HBufC* fieldText = field->ControlTextL();
+            CleanupStack::PushL(fieldText);
+            if (fieldText && fieldText->Length() > 0)
+                {
+                AddMskCommandL(R_LM_MSK_BROWSE, ELmkCmdGoToUrl);
+                cmdAdded = ETrue;
+                }
+            CleanupStack::PopAndDestroy(fieldText);
+            break;
+            }
+        default:
+            {
+            //nothing
+            break;
+            }
+        }
+    if (!cmdAdded)
+        {
+        AddMskCommandL(R_LM_MSK_EDIT, ELmkCmdEditLm);
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkEditorImpl::AddMskCommandL
+// -----------------------------------------------------------------------------
+//
+void CLmkEditorImpl::AddMskCommandL(TInt aResourceId, TLmkAppCmdId aCommandId)
+    {
+    HBufC* mskTxt = NULL;
+    mskTxt = StringLoader::LoadLC(aResourceId, iEikonEnv);
+    CEikButtonGroupContainer* cba = CEikButtonGroupContainer::Current();
+    cba->RemoveCommandFromStack(KMskCommandPos, iMskCmdId);
+    iMskCmdId = aCommandId;
+    iCurrentResourceId = aResourceId;
+    cba->AddCommandToStackL(KMskCommandPos, iMskCmdId, mskTxt->Des());
+    cba->MakeCommandVisible(iMskCmdId, ETrue);
+    CleanupStack::PopAndDestroy(mskTxt);
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkEditorImpl::AddMskCommandL
+// -----------------------------------------------------------------------------
+//
+void CLmkEditorImpl::DimmMiddleSoftKey()
+    {
+    /*This is required, since there was an error,
+     where the menu item appears if there are not items
+     in the lis, after pressing the middle key.Hence, if
+     dummy msk is added to the resource, it fixes the error,
+     now this dummy button needs to be disabled.Check the
+     dialog resource in editor.rss*/
+    CEikButtonGroupContainer* cba = CEikButtonGroupContainer::Current();
+    cba->MakeCommandVisible(EAknSoftkeyContextOptions, EFalse);
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkEditorImpl::ShowQueryIfLocationFieldsAlreadyFilledL
+// -----------------------------------------------------------------------------
+//
+TBool CLmkEditorImpl::ShowQueryIfLocationFieldsAlreadyFilledL()
+    {
+    TBool result = EFalse;
+    TRealX lati;
+    lati.SetNaN();
+    TRealX longi;
+    longi.SetNaN();
+
+    MLmkFieldData* lat = iLmkFields->GetField(ELatitude);
+    if (lat)
+        {
+        //get latitude control id
+        TInt id = lat->UniqueFieldIdentity();
+        MLmkEditorField* latcontrol = iEditorFieldArray->Find(id);
+        //get latitude control current text
+        lati = static_cast<CLmkEditorCoordinateField*>(latcontrol)->FieldValue();
+        
+        MLmkFieldData* lon = iLmkFields->GetField(ELongitude);
+        if (lon)
+            {
+            //get longitude control id
+            id = lon->UniqueFieldIdentity();
+            MLmkEditorField* longcontrol = iEditorFieldArray->Find(id);
+            //get longitude control current text
+            longi = static_cast<CLmkEditorCoordinateField*>(longcontrol)->FieldValue();         
+    		}
+        
+        if ( (!lati.IsNaN()) && (!longi.IsNaN()))
+            {
+            if (!LmkNotes::ShowOwerriteLocationQueryL(iEikonEnv))
+                {
+                result = ETrue;
+                }
+            }
+        }
+    return result;
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkEditorImpl::IsInvalidUriL
+// -----------------------------------------------------------------------------
+//
+TBool CLmkEditorImpl::IsInvalidUriL()
+    {
+    TBool ret = EFalse;
+    MLmkFieldData* fields = iLmkFields->GetField(EWebAddress);
+    if (fields)
+        {
+        MLmkEditorField* fld = iEditorFieldArray->Find(
+                fields->UniqueFieldIdentity());
+        if (fld)
+            {
+            HBufC* webaddr = HBufC::NewLC(KMaxBufferLen);
+            CLmkEditorTextField* field =
+                    static_cast<CLmkEditorTextField*> (fld);
+            TPtr ptr = webaddr->Des();
+            field->Control()->GetText(ptr);
+            ret = UriUtils::HasInvalidChars(ptr);
+            CleanupStack::PopAndDestroy();//webaddr
+            }
+        }
+    return ret;
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkEditorImpl::HandleListProviderEvent
+// -----------------------------------------------------------------------------
+//
+void CLmkEditorImpl::HandleListProviderEvent(TLmkListProviderEventType /*aEvent*/)
+    {
+    TRAPD(err,CPosLandmark* landmark = iDb.ReadLandmarkLC(iLmkFields->LandmarkId());CleanupStack::PopAndDestroy( landmark ));
+    if (err == KErrNotFound)
+        {
+        TRAP_IGNORE(DeleteSelfL());
+        }
+    else
+        {
+        //update the landmark viewer/editor
+        TRAP_IGNORE(UpdateViewDlgL());
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkEditorImpl::HandleListProviderError
+// -----------------------------------------------------------------------------
+//
+void CLmkEditorImpl::HandleListProviderError(TInt /*aError*/)
+    {
+    //if error do nothing
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkEditorImpl::LaunchLmkEditorL
+// -----------------------------------------------------------------------------
+//
+void CLmkEditorImpl::LaunchLmkEditorL()
+    {
+    CEikButtonGroupContainer* cba = CEikButtonGroupContainer::Current();
+    cba->RemoveCommandFromStack(KMskCommandPos, iMskCmdId);
+    // Launch editor
+    TLmkEditorAttributes attributeFlags(CLmkEditorDlg::ELmkAll);
+    // Check if the Landmark is alreayd present in the database. Incase,
+    // a landmark is associated with the editor and if it is not
+    // added to the Database, then the viewer would be launched with
+    // the lanmark content
+    if (KPosLmNullItemId == iLmkFields->LandmarkId() && iLandmark)
+        {
+        iEditor = CLmkEditorImpl::NewL(iDb, iSender, attributeFlags,
+                CLmkEditorDlg::ELmkEditor, iLandmark);
+        }
+    else
+        {
+        iEditor = CLmkEditorImpl::NewL(iDb, iSender, attributeFlags,
+                CLmkEditorDlg::ELmkEditor, iLmkFields->LandmarkId());
+        }
+
+    MLmkEditorField* field = iEditorFieldArray->Find(IdOfFocusControl());
+    iFieldTypeToFocus = field->LandmarkItemField().FieldType();
+    iEditor->SetFieldTypeToFocusInEditMode(iFieldTypeToFocus);
+    iEditor->SetDlgEditing(ETrue);
+    iIsEditing = ETrue;
+    if (!iMapNavFeature)
+        {
+        iEditor->DisableMapAndNavigationMenuOptions();
+        }
+    iEditor->ExecuteLD();
+    iEditor->SetDlgEditing(EFalse);
+    iIsEditing = EFalse;
+    TInt err = KErrNone;
+    TRAP( err, CPosLandmark* landmark = iDb.ReadLandmarkLC( iLmkFields->LandmarkId() ); CleanupStack::PopAndDestroy( landmark ) );
+    if (err == KErrNotFound)
+        {
+        iLmkUiUtils->RestoreOldNaviPaneL();
+        delete this;
+        return;
+        }
+    AddMskCommandL(iCurrentResourceId, iMskCmdId);
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkEditorImpl::DeleteSelfL
+// -----------------------------------------------------------------------------
+//
+void CLmkEditorImpl::DeleteSelfL()
+    {
+    iLmkUiUtils->RestoreOldNaviPaneL();
+    if (iEditor)
+        {
+        //delete only editor,if editor instance is present,
+        //viewer will be deleted in ProcessCommandL, where
+        //editor was created.
+        delete iEditor;
+        iEditor = NULL;
+        }
+    else
+        {
+        delete this;
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkEditorImpl::HandleCentralRepositoryChangeL()
+// -----------------------------------------------------------------------------
+//
+void CLmkEditorImpl::HandleCentralRepositoryChangeL()
+    {
+    //change unit for position accuracy
+    MLmkFieldData* fldData = iLmkFields->GetField(EPositionAccuracy);
+    if (fldData)
+        {
+        TInt id1 = fldData->UniqueFieldIdentity();
+        CLmkEditorNumberField* field =
+                static_cast<CLmkEditorNumberField*> (iEditorFieldArray->Find(
+                        id1));
+        if (field)
+            field->HandleUnitChangeL();
+        }
+
+    //change altitude unit
+    MLmkFieldData* fldData1 = iLmkFields->GetField(EAltitude);
+    if (fldData1)
+        {
+        TInt id2 = fldData1->UniqueFieldIdentity();
+        CLmkEditorNumberField* field1 =
+                static_cast<CLmkEditorNumberField*> (iEditorFieldArray->Find(
+                        id2));
+        if (field1)
+            field1->HandleUnitChangeL();
+        }
+
+    //change altitude accuracy unit
+    MLmkFieldData* fldData2 = iLmkFields->GetField(EAltitudeAccuracy);
+    if (fldData2)
+        {
+        TInt id3 = fldData2->UniqueFieldIdentity();
+        CLmkEditorNumberField* field2 =
+                static_cast<CLmkEditorNumberField*> (iEditorFieldArray->Find(
+                        id3));
+        if (field2)
+            field2->HandleUnitChangeL();
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkEditorImpl::UpdateCatInfoNotePosition()
+// -----------------------------------------------------------------------------
+//
+void CLmkEditorImpl::UpdateCatInfoNotePosition()
+    {
+    //this is only to set the position of the
+    //cat info note.
+    if (iCatInfoPopupNote && IsCategoryField())
+        {
+        CEikCaptionedControl* tmpline = CurrentLine();
+        TPoint pt1 = tmpline->PositionRelativeToScreen();
+        pt1.iX += KHOffsetCatInfoPopup;
+        pt1.iY += KVOffsetCatInfoPopup;
+        iCatInfoPopupNote->SetPositionAndAlignment(pt1, EHLeftVTop);
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkEditorImpl::IsCategoryField()
+// -----------------------------------------------------------------------------
+//
+TBool CLmkEditorImpl::IsCategoryField()
+    {
+    //to check whether the current focussed field is a
+    //category field.
+    TBool result = ETrue;
+    MLmkEditorField* field = iEditorFieldArray->Find(IdOfFocusControl());
+    TUint type = field->LandmarkItemField().FieldType();
+    if (type != ECategories && type != ECategory)
+        {
+        result = EFalse;
+        }
+    return result;
+    }
+
+#ifdef RD_SCALABLE_UI_V2
+// -----------------------------------------------------------------------------
+// CLmkEditorImpl::HandleDialogPageEventL
+// -----------------------------------------------------------------------------
+//
+void CLmkEditorImpl::HandleDialogPageEventL(TInt aEventID)
+    {
+    CAknForm::HandleDialogPageEventL(aEventID);
+    if (aEventID == MEikDialogPageObserver::EDialogPageTapped)
+        {
+        MLmkEditorField* field = iEditorFieldArray->Find(IdOfFocusControl());
+        TUint type = field->LandmarkItemField().FieldType();
+
+        // check the editor mode
+        if (IsEditable()) // edit mode
+            {
+            if (type == ECategory || type == ECategories)
+                {
+                if (!iIsCategorySelctorOpen)
+                    {
+                    iIsCategorySelctorOpen = ETrue;
+                    SelectCategoriesCmdL();
+                    }
+                }
+            }
+        else
+            {// view or receive mode
+            if (type == ECategories)
+                {
+                if (iCalegorySelectionFlag) // Receive mode
+                    {
+                    CategoriesCmdFromXmlL();
+                    }
+                else
+                    {
+                    CategoriesCmdL(); // View mode
+                    }
+                }
+            else // focus is on any other landmark field
+                {
+                if (!iCalegorySelectionFlag)// No context menu for receive mode
+                    {
+                    if (!iIsEditing)
+                        {
+                        LaunchLmkEditorL();
+                        }
+                    }
+                }
+            }
+        }
+    }
+
+#endif //RD_SCALABLE_UI_V2
+// -----------------------------------------------------------------------------
+// CLmkEditorImpl::LineChangedL
+// -----------------------------------------------------------------------------
+//
+
+void CLmkEditorImpl::LineChangedL(TInt /*aControlId*/)
+    {
+    //hide the category info pop-up if active
+    if (iCatInfoPopupNote)
+        {
+        iCatInfoPopupNote->HideInfoPopupNote();
+        }
+    MLmkEditorField* field = iEditorFieldArray->Find(IdOfFocusControl());
+    __ASSERT_DEBUG( field, Panic( KLmkPanicNullMember ) );
+    TUint type = field->LandmarkItemField().FieldType();
+    if (IsEditable())
+        {
+        //editor
+        if (type == ECategory || type == ECategories)
+            {
+            AddMskCommandL(R_LM_MSK_EDIT, ELmkCmdSelectCategories);
+            }
+        else
+            {
+            CEikButtonGroupContainer* cba =
+                    CEikButtonGroupContainer::Current();
+            cba->MakeCommandVisible(iMskCmdId, EFalse);
+            }
+        }
+    else
+        {
+        //viewer
+        UpdateMskOnArrowMoveForViewerL();
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkEditorImpl::ClearPositionInfoL()
+// -----------------------------------------------------------------------------
+//
+void CLmkEditorImpl::ClearPositionInfoL()
+    {
+    //clear latitude
+    MLmkFieldData* lat = iLmkFields->GetField(ELatitude);
+    if (lat)
+        {
+        TInt id = lat->UniqueFieldIdentity();
+        MLmkEditorField* latcontrol = iEditorFieldArray->Find(id);
+        if (latcontrol)
+            {
+            latcontrol->ResetL();
+            }
+        }
+    //clear longitude
+    MLmkFieldData* lon = iLmkFields->GetField(ELongitude);
+    if (lon)
+        {
+        TInt id = lon->UniqueFieldIdentity();
+        MLmkEditorField* longcontrol = iEditorFieldArray->Find(id);
+        if (longcontrol)
+            {
+            longcontrol->ResetL();
+            }
+        }
+    //clear position accuracy
+    MLmkFieldData* fldData = iLmkFields->GetField(EPositionAccuracy);
+    if (fldData)
+        {
+        TInt id1 = fldData->UniqueFieldIdentity();
+        CLmkEditorNumberField* field =
+                static_cast<CLmkEditorNumberField*> (iEditorFieldArray->Find(
+                        id1));
+        if (field)
+            {
+            field->ResetL();
+            }
+        }
+    //clear altitude
+    MLmkFieldData* fldData1 = iLmkFields->GetField(EAltitude);
+    if (fldData1)
+        {
+        TInt id2 = fldData1->UniqueFieldIdentity();
+        CLmkEditorNumberField* field1 =
+                static_cast<CLmkEditorNumberField*> (iEditorFieldArray->Find(
+                        id2));
+        if (field1)
+            {
+            field1->ResetL();
+            }
+        }
+    //clear altitude accuracy
+    MLmkFieldData* fldData2 = iLmkFields->GetField(EAltitudeAccuracy);
+    if (fldData2)
+        {
+        TInt id3 = fldData2->UniqueFieldIdentity();
+        CLmkEditorNumberField* field2 =
+                static_cast<CLmkEditorNumberField*> (iEditorFieldArray->Find(
+                        id3));
+        if (field2)
+            {
+            field2->ResetL();
+            }
+        }
+    DrawNow();
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkEditorImpl::ArePositionFieldEmptyL()
+// -----------------------------------------------------------------------------
+//
+TBool CLmkEditorImpl::ArePositionFieldEmptyL()
+    {
+    return (IsFieldEmptyL(ELatitude) && IsFieldEmptyL(ELongitude)
+            && IsFieldEmptyL(EAltitude) && IsFieldEmptyL(EAltitudeAccuracy)
+            && IsFieldEmptyL(EPositionAccuracy)) ? ETrue : EFalse;
+    }
+
+#ifdef RD_SCALABLE_UI_V2
+// -----------------------------------------------------------------------------
+// CLmkEditorImpl::HandleEditorCommandL()
+// -----------------------------------------------------------------------------
+//
+void CLmkEditorImpl::HandleEditorCommandL()
+    {
+    MLmkEditorField* field = iEditorFieldArray->Find(IdOfFocusControl());
+    __ASSERT_DEBUG( field, Panic( KLmkPanicNullMember ) );
+
+    TUint type = field->LandmarkItemField().FieldType();
+    switch (type)
+        {
+        case ECategories:
+        case ECategory:
+            {
+            ProcessCommandL(ELmkCmdSelectCategories);
+            break;
+            }
+        }
+    }
+#endif //RD_SCALABLE_UI_V2
+// -----------------------------------------------------------------------------
+// CLmkAppLmItemSelectorImpl::HandleDialogDismissed
+// -----------------------------------------------------------------------------
+//
+void CLmkEditorImpl::HandleDialogDismissed(TInt aButtonId)
+    {
+    if (EEikBidCancel == aButtonId)
+        {
+        delete iLocationService;
+        iLocationService = NULL;
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkEditorImpl::InsertLineL()
+// -----------------------------------------------------------------------------
+//
+MLmkEditorField* CLmkEditorImpl::InsertLineL(MLmkFieldData* aFieldData,
+        TInt aPrevControlId)
+    {
+    MLmkEditorField* editorField = NULL;
+    //data present, but control not present
+    TryChangeFocusL(aPrevControlId);
+    editorField = LmkEditorFieldFactory::CreateFieldL(*aFieldData, *this);
+    CleanupStack::PushL(editorField);
+    if (editorField)
+        {
+        editorField->SetEditableL(EFalse);
+        iEditorFieldArray->GetFieldArray().AppendL(editorField);
+        editorField->ActivateL();
+        }
+    CleanupStack::Pop(); //editorField
+    return editorField;
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkEditorImpl::DeleteLineL()
+// -----------------------------------------------------------------------------
+//
+void CLmkEditorImpl::DeleteLineL(MLmkEditorField* aEditorField, TInt aCtrlId,
+        TInt aPos)
+    {
+    //data not present but control present
+    //iEditorFieldArray->GetFieldArray().Delete( aPos-1 );
+    iEditorFieldArray->GetFieldArray().Delete(aPos);
+    delete aEditorField;
+    aEditorField = NULL;
+    DeleteLine(aCtrlId);
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkEditorImpl::AddOrDeleteLineL()
+// -----------------------------------------------------------------------------
+//
+MLmkEditorField* CLmkEditorImpl::AddOrDeleteLineL(
+        MLmkEditorField* aEditorField, MLmkFieldData* aFieldData,
+        TInt aPrevControlId, TInt aCtrlId, TInt aPos)
+    {
+    TBool valPresent = iEditorFieldArray->CheckIfFieldIsEmpty(*aFieldData);
+    if (valPresent && !aEditorField)
+        {
+        aEditorField = InsertLineL(aFieldData, aPrevControlId);
+        }
+    else if (!valPresent && aEditorField)
+        {
+        DeleteLineL(aEditorField, aCtrlId, aPos);
+        aEditorField = NULL;
+        }
+    return aEditorField;
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkEditorImpl::MessageQueryCallBack()
+// -----------------------------------------------------------------------------
+//
+TInt CLmkEditorImpl::MessageQueryCallBack(TAny* /*aPtr*/)
+    {
+    TInt result = KErrNone;
+    CEikonEnv* env = CEikonEnv::Static();
+    TRAP_IGNORE(result = LmkNotes::GenericMessageQueryL(env,R_LMK_REQUEST_FAIL_INFO_TEXT,
+                    R_LMK_MSG_QUERY_HEADING_PANE_TEXT));
+    return result;
+    }
+
+// ---------------------------------------------------------
+// CLmkEditorImpl::CheckHideCoordinateL()
+// ---------------------------------------------------------
+//
+void CLmkEditorImpl::CheckHideCoordinateL()
+    {
+    TInt coordinateSettingValue = ELocCoordinatesNotHidden;
+    TInt helpSettingValue = ELocHelpNotHidden;
+    CRepository* repository = CRepository::NewL(TUid::Uid(
+            KCRUidLocLocalVariation));
+    CleanupStack::PushL(repository);
+    User::LeaveIfError(repository->Get(KLocHideCoordinates,
+            coordinateSettingValue));
+    User::LeaveIfError(repository->Get(KLocHideHelp, helpSettingValue));
+    CleanupStack::PopAndDestroy(repository);
+
+    if (ELocCoordinatesHidden == coordinateSettingValue)
+        iIsHideCoordinate = ETrue;
+    else
+        iIsHideCoordinate = EFalse;
+
+    if (ELocHelpHidden == helpSettingValue)
+        iIsHideHelp = ETrue;
+    else
+        iIsHideHelp = EFalse;
+    }
+
+//  End of File
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/uicontrols/src/CLmkEditorListField.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,324 @@
+/*
+* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:    Methods for landmark editor text field.
+*
+*/
+
+
+
+
+
+
+
+// INCLUDE FILES
+#include <eikedwin.h>
+#include <AknUtils.h>
+#include <eikcapc.h>
+#include <AknPopupField.h>
+#include <StringLoader.h>
+#include <lmkui.rsg>
+#include "LmkConsts.h"
+#include "CLmkDbUtils.h"
+#include "MLmkEditorUiBuilder.h"
+#include "CLmkEditorListField.h"
+
+// CONSTANTS
+_LIT(KEmptyCatName, " ");
+
+/// Unnamed namespace for local definitions
+namespace {
+const TInt KNumberOfLines( 4 );
+}  // namespace
+
+// ================= MEMBER FUNCTIONS =======================
+
+// ----------------------------------------------------
+// CLmkEditorListField::CLmkEditorListField
+// ----------------------------------------------------
+//
+CLmkEditorListField::CLmkEditorListField
+        ( MLmkFieldData& aField,
+		  MLmkEditorUiBuilder& aUiBuilder ) :
+    CLmkEditorFieldBase( aField, aUiBuilder )
+    {
+    }
+
+// ----------------------------------------------------
+// CLmkEditorListField::ConstructL
+// ----------------------------------------------------
+//
+void CLmkEditorListField::ConstructL()
+    {
+
+    // Create and insert a line in the dialog
+    iControl = static_cast<CEikEdwin*>( iUiBuilder.CreateLineL(
+            FieldLabel(), LandmarkItemField().UniqueFieldIdentity(),
+            EEikCtEdwin ) );
+
+    // ctrl is now owned by the dialog
+    AknEditUtils::ConstructEditingL( iControl,
+                                     KMaxCategoryNameFieldLen,
+                                     KNumberOfLines,
+            EEikEdwinDisplayOnly | EEikEdwinResizable
+            | EEikEdwinNoAutoSelection, EEikEdwinIgnoreVirtualCursor
+            | EEikEdwinAvkonDisableCursor,
+            EFalse, EFalse, EFalse );
+
+    // Get text
+    HBufC* textBuf = HBufC::NewLC( KMaxCategoryNameFieldLen);
+    TPtr text= textBuf->Des();
+    RArray<TPosLmItemId>& categories = LandmarkItemField().Categories();
+    TInt count( categories.Count() );
+
+    HBufC* catName;
+    //if only one category
+    if ( count == 1 )
+        {
+        catName = CLmkDbUtils::CategoryNameL( iUiBuilder.Database(),
+                                    categories[0] );
+        }
+    else
+        {
+        if (count > 1)
+	        {
+	        catName = StringLoader::LoadL( R_LMK_CATEGORIES_LIST_FORMAT,
+	                                       count,
+	                                       const_cast< CEikonEnv *>( iEnv ));
+	        }
+	    else // No Category, Don't display the string
+		    {
+		    catName	=  HBufC::NewL(20);
+			*catName = KEmptyCatName;
+		    }
+        }
+    text.Append( *catName );
+    delete catName;
+    catName = NULL;
+    AknTextUtils::DisplayTextLanguageSpecificNumberConversion( text );
+    iControl->SetAknEditorCase( EAknEditorTextCase );
+
+    // Set formatted text to editor control
+   	iControl->SetTextL( &text );
+    // SetTextL method above copied the text to the control,
+    // so it is safe to destroy the buffer
+    CleanupStack::PopAndDestroy( textBuf );
+
+	// readonly and no cursor
+	iControl->AddFlagToUserFlags( CEikEdwin::EReadOnly | CEikEdwin::EDisplayOnly |
+                                  CEikEdwin::EAvkonDisableCursor );
+
+    // CreateTextViewL() is flagged as deprecated but if it is not
+    // called here the ActivateL() below crashes sometimes.
+    iControl->CreateTextViewL();
+    iCaptionedCtrl = iUiBuilder.LineControl( ControlId() );
+    }
+
+// ----------------------------------------------------
+// CLmkEditorListField::NewL
+// ----------------------------------------------------
+//
+CLmkEditorListField* CLmkEditorListField::NewL
+        ( MLmkFieldData& aField,
+		 MLmkEditorUiBuilder& aUiBuilder  )
+    {
+    CLmkEditorListField* self =
+        new(ELeave) CLmkEditorListField( aField, aUiBuilder );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+// ----------------------------------------------------
+// CLmkEditorListField::~CLmkEditorListField
+// ----------------------------------------------------
+//
+CLmkEditorListField::~CLmkEditorListField()
+    {
+    }
+
+// ----------------------------------------------------
+// CLmkEditorListField::SaveFieldL
+// ----------------------------------------------------
+//
+TBool CLmkEditorListField::SaveFieldL()
+    {
+    return ETrue;
+    }
+
+// ----------------------------------------------------
+// CLmkEditorListField::ActivateL
+// ----------------------------------------------------
+//
+void CLmkEditorListField::ActivateL()
+    {
+    iCaptionedCtrl->ActivateL();
+    }
+
+// ----------------------------------------------------
+// CLmkEditorListField::UpdateL
+// ----------------------------------------------------
+//
+void CLmkEditorListField::UpdateL()
+    {
+    HBufC* textBuf = HBufC::NewLC( KMaxCategoryNameFieldLen );
+    TPtr text= textBuf->Des();
+    RArray<TPosLmItemId> categories = LandmarkItemField().Categories();
+    TInt count( categories.Count() );
+
+    HBufC* catName;
+    if ( count == 1 )
+        {
+        catName = CLmkDbUtils::CategoryNameL( iUiBuilder.Database(),
+                                    categories[0] );
+        }
+    else
+        {
+   		if ( count > 1 )
+	        {
+	        catName = StringLoader::LoadL( R_LMK_CATEGORIES_LIST_FORMAT,
+		                                   count,
+		                                   const_cast< CEikonEnv *>( iEnv ) );
+		    }
+		else // No Category, Don't display the string
+		    {
+		    catName	=  HBufC::NewL(20);
+			*catName = KEmptyCatName;
+		    }
+        }
+
+    text.Append( *catName );
+    delete catName;
+    catName = NULL;
+    AknTextUtils::DisplayTextLanguageSpecificNumberConversion( text );
+    iControl->SetTextL( &text );
+    iControl->DrawDeferred();
+    CleanupStack::PopAndDestroy( textBuf );
+
+    HBufC* label;
+    if ( count > 1 )
+        {
+        label = iEnv->AllocReadResourceL( R_LMK_CATEGORIES_LABEL );
+        }
+    else
+        {
+        label = iEnv->AllocReadResourceL( R_LMK_CATEGORY_LABEL );
+        }
+
+    CleanupStack::PushL( label );
+    LandmarkItemField().SetLabel( label );
+    SetFieldLabelL( label );
+    CleanupStack::PopAndDestroy();
+    }
+
+// Added newly............ for supporting Single Category Name in Editor
+
+// ----------------------------------------------------
+// CLmkEditorListField::ConstructL
+// ----------------------------------------------------
+//
+void CLmkEditorListField::ConstructL(const TDesC& aCategoryName)
+    {
+
+    // Create and insert a line in the dialog
+    iControl = static_cast<CEikEdwin*>( iUiBuilder.CreateLineL(
+            FieldLabel(), LandmarkItemField().UniqueFieldIdentity(),
+            EEikCtEdwin ) );
+
+    // ctrl is now owned by the dialog
+    AknEditUtils::ConstructEditingL( iControl,
+                                     KMaxCategoryNameFieldLen,
+                                     KNumberOfLines,
+            EEikEdwinDisplayOnly | EEikEdwinResizable
+            | EEikEdwinNoAutoSelection, EEikEdwinIgnoreVirtualCursor
+            | EEikEdwinAvkonDisableCursor,
+            EFalse, EFalse, EFalse );
+
+    // Get text
+    HBufC* textBuf = HBufC::NewLC( KMaxCategoryNameFieldLen );
+    TPtr text= textBuf->Des();
+    RArray<TPosLmItemId>& categories = LandmarkItemField().Categories();
+    TInt count( categories.Count() );
+
+    HBufC* catName;
+    //if only one category
+    if ( count == 1 )
+        {
+		text.Append(aCategoryName);
+        }
+    else
+        {
+        if ( count > 1 )
+	        {
+	        catName = StringLoader::LoadL( R_LMK_CATEGORIES_LIST_FORMAT,
+	                                       count,
+	                                       const_cast< CEikonEnv *>( iEnv ));
+			text.Append( *catName );
+			delete catName;
+			catName = NULL;
+	        }
+	    else // No Category, Don't display the string
+		    {
+		    catName	=  HBufC::NewL(20);
+			*catName = KEmptyCatName;
+		    }
+        }
+
+    AknTextUtils::DisplayTextLanguageSpecificNumberConversion( text );
+    iControl->SetAknEditorCase( EAknEditorTextCase );
+
+    // Set formatted text to editor control
+   	iControl->SetTextL( &text );
+    // SetTextL method above copied the text to the control,
+    // so it is safe to destroy the buffer
+    CleanupStack::PopAndDestroy( textBuf );
+
+	// readonly and no cursor
+	iControl->AddFlagToUserFlags( CEikEdwin::EReadOnly | CEikEdwin::EDisplayOnly |
+                                  CEikEdwin::EAvkonDisableCursor );
+
+    // CreateTextViewL() is flagged as deprecated but if it is not
+    // called here the ActivateL() below crashes sometimes.
+    iControl->CreateTextViewL();
+    iCaptionedCtrl = iUiBuilder.LineControl( ControlId() );
+    }
+
+// ----------------------------------------------------
+// CLmkEditorListField::NewL
+// ----------------------------------------------------
+//
+CLmkEditorListField* CLmkEditorListField::NewL
+        ( MLmkFieldData& aField,
+		 MLmkEditorUiBuilder& aUiBuilder,
+		 const TDesC& aCategoryName  )
+    {
+    CLmkEditorListField* self =
+        new(ELeave) CLmkEditorListField( aField, aUiBuilder );
+    CleanupStack::PushL( self );
+    self->ConstructL(aCategoryName);
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+// ----------------------------------------------------
+// CLmkEditorListField::Control
+// ----------------------------------------------------
+//
+
+CEikEdwin* CLmkEditorListField::Control()
+	{
+	return iControl;
+	}
+// End of File
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/uicontrols/src/CLmkEditorNumberField.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,417 @@
+/*
+* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:    Methods for Landmark editor number field.
+*
+*/
+
+
+
+
+
+
+
+// INCLUDE FILES
+#include "CLmkEditorNumberField.h"
+#include "MLmkEditorUiBuilder.h"
+#include "LmkConsts.h"
+#include "landmarks.hrh"
+#include <eikcapc.h>
+#include <e32math.h>
+#include <aknuniteditor.h>
+#include <barsread.h>
+#include <lmkui.rsg>
+#include "clmkcentralrepository.h"
+#include <locnotprefplugindomaincrkeys.h>
+#include <centralrepository.h>
+#include <CLmkEditorDlg.h>
+
+//================== CONSTANTS===============================
+const TReal KFootToMeterFraction = 0.3048;
+// ================= MEMBER FUNCTIONS =======================
+
+// ----------------------------------------------------
+// CLmkEditorNumberField::CLmkEditorNumberField
+// ----------------------------------------------------
+//
+CLmkEditorNumberField::CLmkEditorNumberField
+        ( MLmkFieldData& aField,
+		  MLmkEditorUiBuilder& aUiBuilder ) :
+    CLmkEditorFieldBase( aField, aUiBuilder )
+    {
+    }
+
+// ----------------------------------------------------
+// CLmkEditorNumberField::ConstructL
+// ----------------------------------------------------
+//
+void CLmkEditorNumberField::ConstructL()
+    {
+    iRepository = CLmkCentralRepository::NewL();
+    CreateAvkonUnitEditorL();
+    iCaptionedCtrl = iUiBuilder.LineControl( ControlId() );
+    iCaptionedCtrl->SetTakesEnterKey( ETrue );
+    }
+
+// ----------------------------------------------------
+// CLmkEditorNumberField::NewL
+// ----------------------------------------------------
+//
+CLmkEditorNumberField* CLmkEditorNumberField::NewL
+        ( MLmkFieldData& aField,
+		 MLmkEditorUiBuilder& aUiBuilder )
+    {
+    CLmkEditorNumberField* self =
+        new(ELeave) CLmkEditorNumberField( aField, aUiBuilder );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+// ----------------------------------------------------
+// CLmkEditorNumberField::~CLmkEditorNumberField
+// ----------------------------------------------------
+//
+CLmkEditorNumberField::~CLmkEditorNumberField()
+    {
+    delete iRepository;
+    }
+
+// ----------------------------------------------------
+// CLmkEditorNumberField::SaveFieldL
+// ----------------------------------------------------
+//
+TBool CLmkEditorNumberField::SaveFieldL()
+    {
+    TBool result = EFalse;
+	TReal32 oldData = LandmarkItemField().FloatData();
+	TReal32 currData = iControl->Value();
+	if( oldData != currData)
+        {
+        if (!IsSystemUnitMetric())
+            {
+            if (LandmarkItemField().FieldType() == EPositionAccuracy
+                    || LandmarkItemField().FieldType() == EAltitudeAccuracy)
+                {
+                if (currData < (KMinAccuracy / KFootToMeterFraction))
+                    {
+                    currData = (KMinAccuracy / KFootToMeterFraction);
+                    }
+                else if (currData > (KMaxAccuracy / KFootToMeterFraction))
+                    {
+                    currData = (KMaxAccuracy / KFootToMeterFraction);
+                    }
+                }
+            else if (LandmarkItemField().FieldType() == EAltitude)
+                {
+                if (currData < (KMinAltitude / KFootToMeterFraction))
+                    {
+                    currData = (KMinAltitude / KFootToMeterFraction);
+                    }
+                else if (currData > (KMaxAltitude / KFootToMeterFraction))
+                    {
+                    currData = (KMaxAltitude / KFootToMeterFraction);
+                    }
+                }
+
+            ConvertFromFootToMeters(currData);
+            }
+        else
+            {
+            if (LandmarkItemField().FieldType() == EPositionAccuracy
+                    || LandmarkItemField().FieldType() == EAltitudeAccuracy)
+                {
+                if (currData < KMinAccuracy)
+                    {
+                    currData = KMinAccuracy;
+                    }
+                else if (currData > KMaxAccuracy)
+                    {
+                    currData = KMaxAccuracy;
+                    }
+                }
+
+            else if (LandmarkItemField().FieldType() == EAltitude)
+                {
+                if (currData < KMinAltitude)
+                    {
+                    currData = KMinAltitude;
+                    }
+                else if (currData > KMaxAltitude)
+                    {
+                    currData = KMaxAltitude;
+                    }
+                }
+            }
+
+        LandmarkItemField().SetTReal(currData);
+        result = ETrue;
+        }
+   	return result;
+    }
+
+// ----------------------------------------------------
+// CLmkEditorNumberField::ActivateL
+// ----------------------------------------------------
+//
+void CLmkEditorNumberField::ActivateL()
+    {
+    iCaptionedCtrl->ActivateL();
+    }
+
+// ----------------------------------------------------
+// CLmkEditorNumberField::UpdateL
+// ----------------------------------------------------
+//
+void CLmkEditorNumberField::UpdateL()
+    {
+    TReal32 fieldData = LandmarkItemField().FloatData();
+    TReal32 dispData = fieldData;
+    if( fieldData == iDbData)
+	    {
+	    dispData = 	iConvertedData;
+	    }
+	else
+		{
+		if( !IsSystemUnitMetric())
+			{
+			//Imperial
+			iDbData = fieldData;
+			ConvertFromMetersToFoot( fieldData);
+			iConvertedData = fieldData;
+			dispData = 	iConvertedData;
+			}
+		}
+
+	ResolveUnitL();
+    iControl->SetValue( dispData );
+    }
+
+// ----------------------------------------------------
+// CLmkEditorNumberField::CreateAvkonUnitEditorL
+// ----------------------------------------------------
+//
+void CLmkEditorNumberField::CreateAvkonUnitEditorL()
+	{
+	// Create Distance editor using AVKON's unit editor
+	// and insert a line in the dialog
+	iControl = static_cast<CAknUnitEditor*>( iUiBuilder.CreateLineL(
+            FieldLabel(), LandmarkItemField().UniqueFieldIdentity(),
+            EAknCtUnitEditor ) );
+
+
+	
+	// Obtain the current system of measurement
+	TInt sysOfMeasurement = EAknUnitEditorMeter;
+	if( !IsSystemUnitMetric())
+		{
+		sysOfMeasurement = EAknUnitEditorFoot;
+		}
+	
+	//read control from resource file.
+	TResourceReader reader;
+	if( sysOfMeasurement == EAknUnitEditorMeter)
+		{
+		iEnv->CreateResourceReaderLC(reader, R_LMK_UNIT_EDITOR_METRIC);
+		}
+	else
+		{
+		iEnv->CreateResourceReaderLC(reader, R_LMK_UNIT_EDITOR_IMPERIAL);
+		}
+	
+	iControl->ConstructFromResourceL(reader);
+	CleanupStack::PopAndDestroy(); //reader
+	ResolveUnitL();
+
+    /*
+     if ( LandmarkItemField().FieldType() == EPositionAccuracy ||
+     LandmarkItemField().FieldType() == EAltitudeAccuracy )
+     {
+     if( EAknUnitEditorMeter == sysOfMeasurement )
+     {
+     iControl->SetMinimumAndMaximum(KMinAccuracy, KMaxAccuracy);
+     }
+     else
+     {
+     iControl->SetMinimumAndMaximum( KMinAccuracy / KFootToMeterFraction,
+     KMaxAccuracy / KFootToMeterFraction );
+     }
+
+     }
+     else if ( LandmarkItemField().FieldType() == EAltitude )
+     {
+     if( EAknUnitEditorMeter == sysOfMeasurement )
+     {
+     iControl->SetMinimumAndMaximum( KMinAltitude, KMaxAltitude );
+     }
+     else
+     {
+     iControl->SetMinimumAndMaximum( KMinAltitude / KFootToMeterFraction,
+     KMaxAltitude / KFootToMeterFraction );
+     }
+     }
+     */
+
+    TReal32 fieldData = LandmarkItemField().FloatData();
+    iDbData = fieldData;
+    iConvertedData = fieldData;
+
+	if( EAknUnitEditorFoot == sysOfMeasurement )
+		{
+		//Imperial
+		ConvertFromMetersToFoot( fieldData);
+		iConvertedData = fieldData;
+		}
+	iControl->SetValue(iConvertedData);
+	}
+
+// -----------------------------------------------------------------------------
+//CLmkEditorNumberField::FieldValue()
+// -----------------------------------------------------------------------------
+//
+TReal CLmkEditorNumberField::FieldValue() const
+	{
+	return iControl->Value();
+	}
+
+// -----------------------------------------------------------------------------
+//CLmkEditorNumberField::ResolveUnitL()
+// -----------------------------------------------------------------------------
+//
+void CLmkEditorNumberField::ResolveUnitL()
+	{
+    TReal fieldData = LandmarkItemField().FloatData();
+
+    if( IsSystemUnitMetric())
+		{
+		TInt fieldUnit = EAknUnitEditorMeter;
+		iControl->SetUnitL( fieldUnit );
+		}
+	else
+		{
+		TInt fieldUnit = EAknUnitEditorFoot;
+		iControl->SetUnitL( fieldUnit );
+		}
+	}
+
+// -----------------------------------------------------------------------------
+//CLmkEditorNumberField::ConvertFromFootToMeters()
+// -----------------------------------------------------------------------------
+//
+void CLmkEditorNumberField::ConvertFromFootToMeters(TReal32& aValue)
+	{
+
+	aValue *= KFootToMeterFraction;
+
+	}
+
+// -----------------------------------------------------------------------------
+//CLmkEditorNumberField::ConvertFromMetersToFoot()
+// -----------------------------------------------------------------------------
+//
+void CLmkEditorNumberField::ConvertFromMetersToFoot(TReal32& aValue)
+	{
+
+	aValue /= KFootToMeterFraction;
+
+	}
+
+// -----------------------------------------------------------------------------
+//CLmkEditorNumberField::IsSystemUnitMetric()
+// -----------------------------------------------------------------------------
+//
+TBool CLmkEditorNumberField::IsSystemUnitMetric()
+	{
+	TBool result = EFalse;
+	TInt keyValue;
+	TInt err = iRepository->GetKeyValue( KLocSystemofMeasurements, keyValue );
+	if( keyValue == EUnitsMetric )
+		{
+		result = ETrue;
+		}
+	return result;
+	}
+
+
+// -----------------------------------------------------------------------------
+//CLmkEditorNumberField::HandleUnitChangeL()
+// -----------------------------------------------------------------------------
+//
+void CLmkEditorNumberField::HandleUnitChangeL()
+	{
+	// Obtain the current system of measurement
+	TInt sysOfMeasurement = EAknUnitEditorMeter;
+	if( !IsSystemUnitMetric())
+		{
+		sysOfMeasurement = EAknUnitEditorFoot;
+		}
+
+	TReal32 controlData = iControl->Value();
+	if( controlData != iConvertedData)
+		{
+		iConvertedData = controlData;
+		}
+
+    if( EAknUnitEditorMeter == sysOfMeasurement )
+	    {
+
+	    //Imperial to metric
+	    ConvertFromFootToMeters( iConvertedData );
+	    }
+	else
+		{
+		//metric to imperial
+		ConvertFromMetersToFoot( iConvertedData );
+		}
+
+    if ( LandmarkItemField().FieldType() == EPositionAccuracy ||
+    	 LandmarkItemField().FieldType() == EAltitudeAccuracy )
+        {
+        if( EAknUnitEditorMeter == sysOfMeasurement )
+        	{
+        	iControl->SetMinimumAndMaximum(KMinAccuracy, KMaxAccuracy);
+        	}
+		else
+			{
+			iControl->SetMinimumAndMaximum( KMinAccuracy / KFootToMeterFraction,
+							 			    KMaxAccuracy / KFootToMeterFraction );
+			}
+        }
+    else if ( LandmarkItemField().FieldType() == EAltitude )
+        {
+        if( EAknUnitEditorMeter == sysOfMeasurement )
+        	{
+        	iControl->SetMinimumAndMaximum( KMinAltitude, KMaxAltitude );
+        	}
+		else
+			{
+        	iControl->SetMinimumAndMaximum( KMinAltitude / KFootToMeterFraction,
+        									KMaxAltitude / KFootToMeterFraction );
+			}
+        }
+	ResolveUnitL();
+    iControl->SetValue( iConvertedData );
+	}
+
+// -----------------------------------------------------------------------------
+//CLmkEditorFieldBase::ResetL()
+// -----------------------------------------------------------------------------
+//
+void CLmkEditorNumberField::ResetL()
+	{
+	TRealX temp;
+    temp.SetNaN();
+    iControl->SetValue(temp);
+	}
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/uicontrols/src/CLmkEditorTextField.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,386 @@
+/*
+* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:    Methods for landmark editor text field.
+*
+*/
+
+
+
+
+
+
+
+// INCLUDE FILES
+#include <featmgr.h>
+#include <eikedwin.h>
+#include <AknUtils.h>
+#include <eikcapc.h>
+#include "landmarks.hrh"
+#include "CLmkEditorTextField.h"
+#include "MLmkEditorUiBuilder.h"
+#include "CLmkUiUtils.h"
+#include "LmkConsts.h"
+#include "CLmkFields.h"
+// CONSTANTS
+/// Unnamed namespace for local definitions
+namespace {
+const TInt KNumberOfLines( 8 );
+}  // namespace
+
+// ================= MEMBER FUNCTIONS =======================
+
+// ----------------------------------------------------
+// CLmkEditorTextField::CLmkEditorTextField
+// ----------------------------------------------------
+//
+CLmkEditorTextField::CLmkEditorTextField
+        ( MLmkFieldData& aField,
+		MLmkEditorUiBuilder& aUiBuilder ) :
+    CLmkEditorFieldBase( aField, aUiBuilder )
+    {
+    }
+
+// ----------------------------------------------------
+// CLmkEditorTextField::ConstructL
+// ----------------------------------------------------
+//
+void CLmkEditorTextField::ConstructL()
+    {
+    // Create and insert a line in the dialog
+    iControl = static_cast<CEikEdwin*>( iUiBuilder.CreateLineL(
+            FieldLabel(), LandmarkItemField().UniqueFieldIdentity(),
+            EEikCtEdwin ) );
+    // ctrl is now owned by the dialog
+    AknEditUtils::ConstructEditingL( iControl,
+                                    LandmarkItemField().FieldLength(),
+                                    KNumberOfLines,
+            EAknEditorTextCase | EAknEditorCharactersUpperCase
+            | EAknEditorCharactersLowerCase, EAknEditorAlignLeft,
+            ETrue, ETrue, EFalse );
+
+   // Set Edwin properties for numeric editor (Phone number field)
+	if (ETextPhoneNumberFieldEditor == iLmkItemField.EditorType())
+		{
+		iControl->SetAknEditorNumericKeymap(EAknEditorStandardNumberModeKeymap);
+		iControl->SetAknEditorInputMode(EAknEditorNumericInputMode);
+		iControl->SetAknEditorAllowedInputModes(EAknEditorNumericInputMode);
+		iControl->SetAknEditorSpecialCharacterTable(0);
+		}
+
+    // Set the editor case for URI editor
+    if ( ETextUriFieldEditor == iLmkItemField.EditorType() )
+	    {
+	    iControl->SetAknEditorCase( EAknEditorLowerCase );
+	    iControl->SetAknEditorFlags( EAknEditorFlagLatinInputModesOnly );
+	    }
+	else
+		{
+		iControl->SetAknEditorCase( EAknEditorTextCase );
+		}
+
+    // Get text
+    HBufC* textBuf = HBufC::NewLC( LandmarkItemField().TextData().Length() );
+    TPtr text= textBuf->Des();
+    text = LandmarkItemField().TextData();
+
+    // No Japanese input modes tolerated in Japanese variant,
+    // set the allowed onces manually
+    // Only for postal/zip code field
+
+    if (LandmarkItemField().FieldType() == EPostCode)
+	    {
+			iControl->SetAknEditorInputMode(EAknEditorNumericInputMode);
+			iControl->SetAknEditorAllowedInputModes(EAknEditorAllInputModes);
+	    if (FeatureManager::FeatureSupported(KFeatureIdJapanese))
+	        {
+	        iControl->SetAknEditorFlags(EAknEditorFlagLatinInputModesOnly);
+	        }
+	    else
+	        {
+	        AknTextUtils::DisplayTextLanguageSpecificNumberConversion(text);
+	        }
+	    }
+    else
+	    {
+	    AknTextUtils::DisplayTextLanguageSpecificNumberConversion(text);
+	    }
+
+
+	if(LandmarkItemField().FieldType() == EWebAddress && text.Length() > 0)
+	   	{
+	   	//only for web address field
+	   	TInt position;
+		if((position =  IsWebUrlProtocolPreFixedL(text))!=
+			KErrNotFound)
+			{
+			TrimPrefixesFromWebUrlL( text, position +1 );
+			}
+	   	}
+
+	TPtrC ptr (text);
+    SetControlTextL(ptr);
+
+    // SetTextL method above copied the text to the control,
+    // so it is safe to destroy the buffer
+    CleanupStack::PopAndDestroy( textBuf );
+
+    LoadBitmapToFieldL(iUiBuilder);
+
+	// Place cursor to the end of the line
+	iControl->AddFlagToUserFlags( CEikEdwin::EJustAutoCurEnd );
+
+    // CreateTextViewL() is flagged as deprecated but if it is not
+    // called here the ActivateL() below crashes sometimes.
+    iControl->CreateTextViewL();
+    iCaptionedCtrl = iUiBuilder.LineControl( ControlId() );
+    iCaptionedCtrl->SetTakesEnterKey( ETrue );
+    }
+
+// ----------------------------------------------------
+// CLmkEditorTextField::NewL
+// ----------------------------------------------------
+//
+CLmkEditorTextField* CLmkEditorTextField::NewL
+        ( MLmkFieldData& aField,
+		  MLmkEditorUiBuilder& aUiBuilder  )
+    {
+    CLmkEditorTextField* self =
+        new(ELeave) CLmkEditorTextField( aField, aUiBuilder );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+// ----------------------------------------------------
+// CLmkEditorTextField::~CLmkEditorTextField
+// ----------------------------------------------------
+//
+CLmkEditorTextField::~CLmkEditorTextField()
+    {
+    delete iText;
+    delete iUrlPrefix;
+    }
+
+// ----------------------------------------------------
+// CLmkEditorTextField::SaveFieldL
+// ----------------------------------------------------
+//
+TBool CLmkEditorTextField::SaveFieldL()
+    {
+    TBool result = EFalse;
+    HBufC* text = iControl->GetTextInHBufL();
+    if ( text )
+        {
+        if ( LandmarkItemField().FieldType() == EWebAddress )
+            {
+            TInt totalLength = text->Length();
+            if (totalLength > 0)
+            	{
+            	if(CLmkUiUtils::FindIfWebAddrFieldIsEmpty(text->Des()))
+            		{
+            		//nothing is there after :// e.g http://
+            		// do not save
+            		text->Des().Zero();
+                	LandmarkItemField().SetText( text );
+                	text = NULL;
+                	result = ETrue;
+
+            		}
+            	else
+            		{
+            		//something is there after :// e.g http://www.ebay.com
+
+	                if( iText && *iText != *text)
+	                    {
+	                    // store the text
+	                    // Prepend the webaddress text with "http://" by default
+	                    TInt httpProtoPos = text->Find( KProtocol );
+	                    if ( httpProtoPos == KErrNotFound)
+	                        {
+							if(text->Length() <= KMaxUrlFieldLenWithDefaultProtocol)
+								{
+								text = text->ReAllocL( KHttp().Length() +  text->Length() );
+								text->Des().Insert(0, KHttp);
+								}
+	                        }
+
+	                    if( isUrlPrefixed )
+		                    {
+		                    TPtr text1= text->Des();
+	                    	if(IsWebUrlProtocolPreFixedL(text1)== KErrNotFound)
+		                    	{
+		                    	//insert the pre-fix back to the url, if it was removed.
+			                    //since for ui , prefixes are not shown, but prefixes are
+			                    //retained in its original form.
+			                    text = text->ReAllocL( iUrlPrefix->Length() +  text->Length() );
+								text->Des().Insert(0, iUrlPrefix->Des());
+		                    	}
+		                    }
+	                    LandmarkItemField().SetText( text );
+	                     text = NULL;
+	                     result = ETrue;
+	                    }
+            		}//else
+            	}//end of if statement
+            }// not a web address field
+        else
+            {
+            if ( LandmarkItemField().TextData() != *text )
+                {
+                // store the text
+                LandmarkItemField().SetText( text );
+                text = NULL;
+                result = ETrue;
+                }
+            }
+            delete text;
+        }
+    else
+        {
+        // Ensure field text is empty
+        if ( LandmarkItemField().TextData().Length() > 0)
+            {
+            text = HBufC::New(0);
+            LandmarkItemField().SetText( text );
+            result = ETrue;
+            }
+        }
+
+    return result;
+    }
+
+// ----------------------------------------------------
+// CLmkEditorTextField::ActivateL
+// ----------------------------------------------------
+//
+void CLmkEditorTextField::ActivateL()
+    {
+    iCaptionedCtrl->ActivateL();
+    }
+
+
+// ----------------------------------------------------
+// CLmkEditorTextField::Control
+// ----------------------------------------------------
+//
+CEikEdwin* CLmkEditorTextField::Control()
+	{
+	return iControl;
+	}
+
+// ----------------------------------------------------
+// CLmkEditorTextField::Control
+// ----------------------------------------------------
+//
+CEikCaptionedControl* CLmkEditorTextField::CaptionedControl()
+	{
+	return iCaptionedCtrl;
+	}
+
+// ----------------------------------------------------
+// CLmkEditorTextField::IsWebUrlProtocolPreFixedL()
+// ----------------------------------------------------
+//
+TInt CLmkEditorTextField::IsWebUrlProtocolPreFixedL( TPtr& aWebUrl )
+	{
+	TChar ch = '/';
+	// e.g image/jpeg/http://www.google.com
+	TInt protocolPos = aWebUrl.Find(KProtocol);
+	TInt posPrefix = KErrNotFound;
+	if( protocolPos != KErrNotFound)
+		{
+		//find the left string from ':" character e.g image/jpeg/http
+		TPtrC ptrPrefix = aWebUrl.Left( protocolPos );
+		//search '/' from right handside.
+		posPrefix = ptrPrefix.LocateReverse(ch);
+		if( posPrefix != KErrNotFound)
+			{
+			/*if( !iUrlPrefix )
+			    {*/
+			    delete iUrlPrefix;
+			    iUrlPrefix = NULL;
+			    //prefix e.g image/jpeg.
+			    iUrlPrefix = HBufC::NewL( posPrefix + 1 );
+			    iUrlPrefix->Des().Copy(ptrPrefix.Left( posPrefix + 1 ));
+			    //}
+			isUrlPrefixed = ETrue;
+			}
+		}
+	//returns the position of the prefix.
+	return posPrefix;
+	}
+
+// ----------------------------------------------------
+// CLmkEditorTextField::TrimPrefixesFromWebUrlL()
+// ----------------------------------------------------
+//
+void CLmkEditorTextField::TrimPrefixesFromWebUrlL( TPtr& aWebUrl,
+												    TInt aTrimPos )
+	{
+	//deletes the prefix from url
+	//e.g deletes "image/jpeg" from image/jpeg/http://www.google.com
+	aWebUrl.Delete(0,aTrimPos);
+	}
+// ----------------------------------------------------
+// CLmkEditorTextField::SetControlTextL()
+// ----------------------------------------------------
+//
+void CLmkEditorTextField::SetControlTextL( TPtrC& aText)
+	{
+	TPtrC dispTxt;
+	dispTxt.Set(aText);
+	// Set formatted text to editor control
+    if ( LandmarkItemField().FieldType() == EWebAddress &&
+    	 aText.Length() == 0 && (!iUiBuilder.EditMode()))
+        {
+        //only for web address field
+         // Insert http:// prefix to URL field only in edit mode
+         dispTxt.Set(KHttp());
+        }
+    else
+        {
+        //if it is editor, remove the enter character, if at all present.
+        if (iUiBuilder.EditMode())
+	        {
+	        TPtr des1 = CLmkFields::RemoveEnterCharacter( aText );
+	        dispTxt.Set(des1);
+	        }
+        }
+
+    if( !iText )
+	    {
+	    //currently this member is used only for url field.
+	    //it can be used for other fields also, later.
+	    iText = HBufC::NewL( dispTxt.Length() );
+	    }
+	else if( dispTxt.Length() > iText->Length())
+		{
+		iText = iText->ReAllocL( dispTxt.Length() );
+		}
+	iText->Des().Copy( dispTxt);
+    iControl->SetTextL( &dispTxt );
+    iControl->DrawDeferred();
+	}
+// ----------------------------------------------------
+// CLmkEditorTextField::SetEditableL()
+// ----------------------------------------------------
+//
+void CLmkEditorTextField::SetEditableL( TBool aEditable )
+	{
+	if(iCaptionedCtrl)
+		iCaptionedCtrl->SetEditableL(aEditable);
+	}
+// End of File
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/uicontrols/src/CLmkEmptyDialog.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,111 @@
+/*
+* 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:    LandmarksUi Content File -    Empty Dialog.....
+*
+*/
+
+
+
+
+
+
+
+// Class include
+#include "CLmkEmptyDialog.h"
+#include <eikspane.h>
+#include <avkon.hrh>
+#include <akntitle.h>
+#include <aknViewAppUi.h>
+
+// ================= MEMBER FUNCTIONS =======================
+
+// -----------------------------------------------------------------------------
+// CLmkEmptyDialog::CLmkEmptyDialog
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+CLmkEmptyDialog::CLmkEmptyDialog()
+{
+}
+
+// ----------------------------------------------------------------------------
+// CLmkEmptyDialog::~CLmkEmptyDialog()
+// ----------------------------------------------------------------------------
+//
+CLmkEmptyDialog::~CLmkEmptyDialog()
+{
+}
+
+// ----------------------------------------------------------------------------
+// CLmkEmptyDialog::PostLayoutDynInitL()
+// ----------------------------------------------------------------------------
+//
+void CLmkEmptyDialog::PostLayoutDynInitL()
+	{
+	CAknDialog::PostLayoutDynInitL();
+	}
+
+
+// ----------------------------------------------------------------------------
+// CLmkEmptyDialog::PreLayoutDynInitL()
+// ----------------------------------------------------------------------------
+//
+void CLmkEmptyDialog::PreLayoutDynInitL()
+    {
+    CAknDialog::PreLayoutDynInitL();
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkEmptyDialog::SetSizeAndPosition()
+// ----------------------------------------------------------------------------
+//
+void CLmkEmptyDialog::SetSizeAndPositionL(const TSize& /*aSize*/)
+    {
+    CEikStatusPane * statusPane=iEikonEnv->AppUiFactory()->StatusPane();
+    TRect lStatusRect = statusPane->PaneRectL(TUid::Uid(EEikStatusPaneUidNavi));
+
+    TRect lTitleRect = statusPane->PaneRectL(TUid::Uid(EEikStatusPaneUidTitle));
+
+    CWindowGc& gc=SystemGc();
+    CGraphicsDevice* device = gc.Device();
+    TSize lScreenHight = device->SizeInPixels();
+
+    TInt lHeight =  lScreenHight.iHeight - lTitleRect.Height() - lStatusRect.Height();
+    TInt lStartY =  lTitleRect.Height() + lStatusRect.Height();
+
+    TSize size(lScreenHight.iWidth,lHeight);
+    TPoint point(0,lStartY);
+
+    CEikDialog::SetSizeAndPosition(size);
+    SetPosition(point);
+    }
+// ----------------------------------------------------------------------------
+// CLmkEmptyDialog::OkToExitL()
+// ----------------------------------------------------------------------------
+//
+TBool CLmkEmptyDialog::OkToExitL( TInt /*aButtonId*/)
+    {
+    return (ETrue);
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkEmptyDialog::EmptyDialogExitL()
+// ----------------------------------------------------------------------------
+//
+void CLmkEmptyDialog::EmptyDialogExitL()
+    {
+    TryExitL(-1);
+    }
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/uicontrols/src/CLmkFloatEditor.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,332 @@
+/*
+* 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:    LandmarksUi Content File -
+*
+*/
+
+
+
+
+
+
+
+
+// INCLUDE FILES
+#include <LmkUi.rsg>
+#include <e32math.h>
+#include <eikmfne.h>
+#include <AknUtils.h>
+#include <AknEditStateIndicator.h>
+#include <eikenv.h>
+#include <stringloader.h>
+
+#include "landmarks.hrh"
+#include "LmkConsts.h"
+
+#include "CLmkMfneFloat.h"
+#include "CLmkFloatEditor.h"
+
+// CONSTANTS
+/// Unnamed namespace for local definitions
+namespace {
+
+#if defined(_DEBUG)
+void Panic(TInt aReason)
+    {
+    _LIT(KPanicCategory, "CLmkFloatEditor");
+    User::Panic(KPanicCategory, aReason);
+    }
+#endif
+
+}  // namespace
+
+// ============================ MEMBER FUNCTIONS ==============================
+
+// ----------------------------------------------------------------------------
+// CLmkFloatEditor::CLmkFloatEditor
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// ----------------------------------------------------------------------------
+//
+CLmkFloatEditor::CLmkFloatEditor()
+    {
+    iIsMirroredLayout = AknLayoutUtils::LayoutMirrored();
+    }
+
+// ----------------------------------------------------
+// CLmkFloatEditor::BaseConstructL
+// ----------------------------------------------------
+//
+ void CLmkFloatEditor::BaseConstructL(TInt aMaxNumFields)
+	{
+    __ASSERT_DEBUG(aMaxNumFields > 0, Panic(KErrArgument));
+    CreateFieldArrayL(aMaxNumFields);
+	}
+
+// ----------------------------------------------------
+// CLmkFloatEditor::ConstructValueFieldL
+// ----------------------------------------------------
+//
+ void CLmkFloatEditor::ConstructValueFieldL(
+    TInt aMaxNumSignificantDigits,
+    TInt aMaxDecimals)
+    {
+    __ASSERT_DEBUG(iValueField == NULL, Panic(KErrGeneral));
+
+	iValueField =
+	    CLmkMfneFloat::NewL(
+	        aMaxNumSignificantDigits,
+	        aMaxDecimals);
+
+	AddField(iValueField);
+	}
+
+// ----------------------------------------------------------------------------
+// CLmkFloatEditor::~CLmkFloatEditor
+// ----------------------------------------------------------------------------
+//
+CLmkFloatEditor::~CLmkFloatEditor()
+    {
+    }
+
+// ----------------------------------------------------
+// CLmkDistanceEditor::SetNumberL
+// ----------------------------------------------------
+//
+void CLmkFloatEditor::SetNumber(TReal aNumber)
+    {
+    __ASSERT_DEBUG(iValueField, Panic(KErrGeneral));
+    iValueField->SetValue(aNumber);
+    HandleValueChanged();
+    }
+
+// ----------------------------------------------------
+// CLmkFloatEditor::Number
+// ----------------------------------------------------
+//
+TReal CLmkFloatEditor::Number() const
+    {
+    __ASSERT_DEBUG(iValueField, Panic(KErrGeneral));
+    return iValueField->Value();
+    }
+
+// ----------------------------------------------------
+// CLmkFloatEditor::IsModified
+// ----------------------------------------------------
+//
+TBool CLmkFloatEditor::IsModified()
+    {
+    return iIsModified;
+    }
+
+// ----------------------------------------------------
+// CLmkFloatEditor::IsNan
+// ----------------------------------------------------
+//
+TBool CLmkFloatEditor::IsNan()
+    {
+    __ASSERT_DEBUG(iValueField, Panic(KErrGeneral));
+    return Math::IsNaN(iValueField->Value());
+    }
+
+// ----------------------------------------------------
+// CLmkFloatEditor::SetLimits
+// ----------------------------------------------------
+//
+TBool CLmkFloatEditor::SetLimits(TReal aMinimumValue, TReal aMaximumValue)
+    {
+    __ASSERT_DEBUG(iValueField, Panic(KErrGeneral));
+    if (iValueField->SetLimits(aMinimumValue, aMaximumValue))
+        {
+        HandleValueChanged();
+        return ETrue;
+        }
+    else
+        {
+        return EFalse;
+        }
+    }
+
+// ----------------------------------------------------
+// CLmkFloatEditor::GetLimits
+// ----------------------------------------------------
+//
+void CLmkFloatEditor::GetLimits(TReal& aMinimum, TReal& aMaximum)
+    {
+    __ASSERT_DEBUG(iValueField, Panic(KErrGeneral));
+    iValueField->GetLimits(aMinimum, aMaximum);
+    }
+
+// ----------------------------------------------------
+// CLmkFloatEditor::HandleValueChanged
+// ----------------------------------------------------
+//
+void CLmkFloatEditor::HandleValueChanged()
+    {
+    if (IsNan())
+        {
+        // switch to iValueField,
+        // otherwise it won't be possible to enter value anymore
+        if (Field(CurrentField()) != iValueField)
+            {
+            HighlightField(FindValueField());
+            }
+        }
+    DrawDeferred();
+    }
+
+// ----------------------------------------------------
+// CLmkFloatEditor::HandleCustomFieldChanged
+// ----------------------------------------------------
+//
+void CLmkFloatEditor::HandleCustomFieldChanged(TInt /*aCustomFieldIndex*/)
+    {
+    DrawDeferred();
+    }
+
+void CLmkFloatEditor::HandleEnter()
+    {
+    DrawDeferred();
+    }
+
+void CLmkFloatEditor::HandleExit()
+    {
+    DrawDeferred();
+    }
+
+// ----------------------------------------------------
+// CLmkFloatEditor::FindValueField
+// ----------------------------------------------------
+//
+TInt CLmkFloatEditor::FindValueField()
+    {
+    for (TInt i = 0; i < NumFields(); i++)
+        {
+        if (Field(i) == iValueField)
+            {
+            return i;
+            }
+        }
+    return KErrNotFound;
+    }
+
+// ----------------------------------------------------
+// CLmkFloatEditor::HighlightField
+// ----------------------------------------------------
+//
+void CLmkFloatEditor::HighlightField(TInt aFieldPosition)
+    {
+    if (CurrentField() != aFieldPosition)
+        {
+        TBool dataAltered = EFalse;
+        TBool error = EFalse;
+        const CFont& font=*Font();
+
+        CEikMfne::HandleInteraction(
+            ETrue,
+            aFieldPosition,
+            Field(CurrentField())->MaximumWidthInPixels(font, EFalse),
+            Field(CurrentField())->HighlightType(),
+            dataAltered,
+            error);
+        }
+    }
+
+// ----------------------------------------------------
+// CLmkFloatEditor::FocusChanged
+// ----------------------------------------------------
+//
+void CLmkFloatEditor::FocusChanged(TDrawNow aDrawNow)
+    {
+    if (!IsReadyToDraw())
+        {
+        // this is workaround for MFNE's bug.
+        // otherwise it will panic hiding cursor
+        return;
+        }
+
+    if (IsFocused())
+        {
+        HandleEnter();
+
+        // need to inform CLmkMfneFloat that it is highlighted
+        // because CEikMfne does not do it
+        if (iValueField &&
+            iValueField == Field(CurrentField()))
+            {
+            iValueField->HandleHighlight();
+            }
+        }
+    else
+        {
+        HandleExit();
+        }
+
+    CEikMfne::FocusChanged(aDrawNow);
+    }
+
+// ----------------------------------------------------
+// CLmkFloatEditor::OfferKeyEventL
+// ----------------------------------------------------
+//
+TKeyResponse CLmkFloatEditor::OfferKeyEventL(
+    const TKeyEvent& aKeyEvent,
+    TEventCode aType)
+    {
+
+    // disallow switch to other fields if value is nan,
+    // because it's hard to inform CLmkMfneFloat
+    // that focus has changed to it from other field.
+    // If it is not done, then CEikMfne will panic when
+    // hiding cursor
+    if (IsNan() &&
+       (aKeyEvent.iCode == EKeyLeftArrow ||
+        aKeyEvent.iCode == EKeyRightArrow))
+        {
+        return EKeyWasConsumed;
+        }
+
+    TInt oldField = CurrentField();
+    TKeyResponse response = CEikMfne::OfferKeyEventL(aKeyEvent, aType);
+
+    if (response == EKeyWasConsumed)
+        {
+        // update focus state in CLmkMfneFloat
+        if (oldField != CurrentField() &&
+            Field(CurrentField()) == iValueField)
+            {
+            iValueField->HandleHighlight();
+            }
+
+        // inform about changes
+        if (aKeyEvent.iCode != EKeyLeftArrow &&
+            aKeyEvent.iCode != EKeyRightArrow)
+            {
+            iIsModified = ETrue;
+            if (Field(oldField) == iValueField)
+                {
+                HandleValueChanged();
+                }
+            else
+                {
+                HandleCustomFieldChanged(oldField);
+                }
+            }
+        }
+
+    DrawNow();
+    return response;
+    }
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/uicontrols/src/CLmkGoToUrlCmd.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,144 @@
+/*
+* 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:   This file contains methods which implements methods for
+*                interfacing with launching browser
+*
+*/
+
+
+
+
+
+
+// INCLUDE FILES
+#include <browserlauncher.h>
+#include <downloadedcontenthandler.h>
+#include "clmkgotourlcmd.h"
+
+_LIT(KProtocolForURL, "4 ");
+//============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// TLmkLauncherContentHandler::TLmkLauncherContentHandler
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+TLmkLauncherContentHandler::TLmkLauncherContentHandler()
+	{
+	}
+
+// -----------------------------------------------------------------------------
+// TLmkLauncherContentHandler::HandleContentL
+// -----------------------------------------------------------------------------
+//
+TBool TLmkLauncherContentHandler::HandleContentL(const TDesC& /*aFileName*/,
+												 const CAiwGenericParamList& /*aParamList*/,
+												 TBool& aContinue )
+	{
+	aContinue = ETrue;
+	return EFalse;//ETrue;
+	}
+
+// -----------------------------------------------------------------------------
+// TLmkLauncherContentHandler::DownloadedContentHandlerReserved
+// -----------------------------------------------------------------------------
+//
+TAny* TLmkLauncherContentHandler::DownloadedContentHandlerReserved1( TAny* /*aAnyParam*/ )
+	{
+	// Empty
+	return NULL;
+	}
+
+// -----------------------------------------------------------------------------
+// TLmkLauncherContentHandler::HandleServerAppExit
+// -----------------------------------------------------------------------------
+//
+void TLmkLauncherContentHandler::HandleServerAppExit( TInt /*aReason*/ )
+	{
+	}
+
+// -----------------------------------------------------------------------------
+//  CLmkGoToURLCmd::CLmkGoToURLCmd
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+ CLmkGoToURLCmd::CLmkGoToURLCmd()
+    {
+    }
+
+// ----------------------------------------------------
+//  CLmkGoToURLCmd::ConstructL
+// ----------------------------------------------------
+//
+void CLmkGoToURLCmd::ConstructL( )
+    {
+     /* Nothing right now */
+
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkGoToURLCmd::NewL
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CLmkGoToURLCmd* CLmkGoToURLCmd::NewL()
+    {
+    CLmkGoToURLCmd* self =
+        new( ELeave ) CLmkGoToURLCmd;
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop();
+    return self;
+    }
+
+// ----------------------------------------------------
+// CLmkGoToURLCmd::~CLmkGoToURLCmd()
+// ----------------------------------------------------
+//
+CLmkGoToURLCmd::~CLmkGoToURLCmd()
+    {
+    delete iContentHandler;
+	delete iLauncher;
+    }
+
+// ----------------------------------------------------
+// CLmkGoToURLCmd::LaunchBrowserL()
+// ----------------------------------------------------
+//
+void CLmkGoToURLCmd::LaunchBrowserL(const TDesC& aUrl)
+	{
+	delete iContentHandler;
+	delete iLauncher;
+
+	iContentHandler = NULL;
+	iLauncher = NULL;
+
+	/**
+	* From the Browser API specification
+	* 4 means that there is URL coming after that.
+	* So the message format is "4 http://www.mydomain.com".
+	*/
+
+	HBufC* parameter = HBufC::NewLC( KProtocolForURL().Length() +  aUrl.Length() );
+	parameter->Des().Copy( KProtocolForURL );
+	parameter->Des().Append( aUrl );
+	iContentHandler = new (ELeave) TLmkLauncherContentHandler;
+	iLauncher = CBrowserLauncher::NewL();
+	iLauncher->LaunchBrowserEmbeddedL( *parameter, iContentHandler, iContentHandler );
+	CleanupStack::PopAndDestroy(parameter);
+	}
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/uicontrols/src/CLmkIconSelectorPopup.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,320 @@
+/*
+* 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:    LandmarksUi Content File -
+*
+*/
+
+
+
+
+
+
+
+
+
+// INCLUDE FILES
+#include <AknPopupHeadingPane.h>
+#include "CLmkIconSelectorPopup.h"
+#include "LmkConsts.h"
+#include "CLmkUiUtils.h"
+#include <akniconarray.h>
+#include <gulicon.h>
+#include <AknLists.h>
+#include <Lmkui.rsg>
+#include <aknselectionlist.h>
+#include <AknIconUtils.h>
+#include <AknUtils.h>
+#include <AknLayoutScalable_Avkon.cdl.h>
+#include <LayoutMetaData.cdl.h>
+
+// CONSTANTS
+/// Unnamed namespace for local definitions
+namespace {
+    _LIT( KFormat, "%d\t" );
+//    const TInt KColorIndex( 215 );
+    const TInt KNumOfColumns( 9 );
+    const TInt KNumOfRows( 8 );
+    const TInt KWidth( 18 );
+    const TInt KHeight( 20 );
+    const TInt KTextLength( 50 );
+    const TInt KNumOfIcons( 16 );
+
+}  // namespace
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CLmkIconSelectorPopup::CLmkIconSelectorPopup
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+CLmkIconSelectorPopup::CLmkIconSelectorPopup() :
+    iNumOfColumns( KNumOfColumns ),
+    iNumOfRows( KNumOfRows ),
+    iSizeOfItems( TSize( KWidth, KHeight ) )
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkIconSelectorPopup::NewL
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+CLmkIconSelectorPopup* CLmkIconSelectorPopup::NewL( CAknGrid& aGrid )
+    {
+    CLmkIconSelectorPopup* self =
+        new( ELeave ) CLmkIconSelectorPopup( );
+
+    CleanupStack::PushL( self );
+    self->ConstructL( aGrid );
+    CleanupStack::Pop();
+
+    return self;
+    }
+
+// ----------------------------------------------------
+// CLmkIconSelectorPopup::ConstructL
+// ----------------------------------------------------
+//
+void CLmkIconSelectorPopup::ConstructL( CAknGrid& aGrid )
+	{
+	iEnv = CEikonEnv::Static();
+    iGrid = &aGrid;
+	}
+
+// ----------------------------------------------------
+// CLmkIconSelectorPopup::~CLmkIconSelectorPopup
+// ----------------------------------------------------
+//
+CLmkIconSelectorPopup::~CLmkIconSelectorPopup()
+    {
+    }
+
+// ----------------------------------------------------
+// CLmkIconSelectorPopup::ExecuteLD
+// ----------------------------------------------------
+//
+TBool CLmkIconSelectorPopup::ExecuteLD ()
+	{
+    CAknPopupList* popupList= CAknPopupList::NewL(
+        iGrid, R_AVKON_SOFTKEYS_SELECT_CANCEL, AknPopupLayouts::EMenuGraphicWindow );
+    CleanupStack::PushL( popupList );
+
+	iGrid->ConstructL( popupList, CEikListBox::EPopout);
+
+	TRect clientRect;
+	AknLayoutUtils::LayoutMetricsRect(AknLayoutUtils::EMainPane, clientRect);
+
+	TAknLayoutRect main_pane;
+	main_pane.LayoutRect(
+		clientRect, AknLayoutScalable_Avkon::main_pane(2));
+
+	TAknLayoutRect popup_grid_graphic_window;
+	popup_grid_graphic_window.LayoutRect(
+		clientRect, AknLayoutScalable_Avkon::popup_grid_graphic_window(0));
+
+	popupList->SetRect(main_pane.Rect());
+
+	// Calculate the size relatively
+	TRect relativeDialog(TPoint(0,0),popup_grid_graphic_window.Rect().Size());
+
+	// Get the layout of the actual character grid with scrollbar
+    TAknLayoutRect listscroll_popup_graphic_pane;
+
+    listscroll_popup_graphic_pane.LayoutRect(relativeDialog,
+    	AknLayoutScalable_Avkon::listscroll_popup_graphic_pane());
+
+	TAknLayoutRect grid_graphic_popup_pane;
+
+	grid_graphic_popup_pane.LayoutRect(
+		listscroll_popup_graphic_pane.Rect(),
+		AknLayoutScalable_Avkon::grid_graphic_popup_pane(1));
+
+	TRect popupGridRect = grid_graphic_popup_pane.Rect();
+
+    iGrid->SetRect(popupGridRect);
+
+    iSizeOfItems.iWidth = popupGridRect.Width() / iNumOfColumns;
+    iSizeOfItems.iHeight = popupGridRect.Height() / iNumOfRows;
+
+	// adjust the size of cells to the number of columns.
+	iGrid->SetLayoutL( EFalse, ETrue, ETrue, iNumOfColumns,
+                       iNumOfRows, iSizeOfItems );
+
+    iGrid->SetPrimaryScrollingType(
+                CAknGridView::EScrollIncrementLineAndLoops );
+    iGrid->SetSecondaryScrollingType(
+                CAknGridView::EScrollIncrementLineAndLoops );
+
+	LoadGraphicsL();
+    // create data
+    AddDataL( KNumOfIcons );
+
+    iGrid->CreateScrollBarFrameL(EFalse);
+    iGrid->ScrollBarFrame()->SetScrollBarVisibilityL(
+                                CEikScrollBarFrame::EOff,
+                                CEikScrollBarFrame::EOff);
+
+
+	// add title
+    HBufC* title = iEnv->AllocReadResourceL( R_LMK_ICON_SELECTOR_TITLE );
+    CleanupStack::PushL( title );
+    popupList->SetTitleL( *title );
+    CleanupStack::PopAndDestroy( title ); //title
+    title = NULL;
+
+    CleanupStack::Pop(); //popupList
+	TInt popupOk = popupList->ExecuteLD();
+    delete this;
+    return popupOk;
+	}
+
+// ----------------------------------------------------
+// CLmkIconSelectorPopup::LoadGraphicsL
+// ----------------------------------------------------
+//
+void CLmkIconSelectorPopup::LoadGraphicsL()
+    {
+    TFileName iconFile( CLmkUiUtils::LmkUiIconFileL() );
+
+    CArrayPtr< CGulIcon >* icons = new( ELeave ) CAknIconArray(KNumOfIcons);
+    CleanupStack::PushL( icons );
+
+    // Create icon bitmap and mask.
+    for ( TInt i(0); i < ( KNumOfIcons*2 ); i++ )
+        {
+
+/*******************************************************************/
+			CFbsBitmap* bitmap = NULL;
+			CFbsBitmap* bitmapMask = NULL;
+
+			AknIconUtils::CreateIconLC(bitmap, bitmapMask, iconFile,
+                             EMbmLmkuiQgn_prop_lm_transport + i, EMbmLmkuiQgn_prop_lm_transport + i + 1);
+			i++;
+			AknIconUtils::SetSize(bitmap, iSizeOfItems);  	//fix
+			AknIconUtils::SetSize(bitmapMask, iSizeOfItems); //fix
+			CGulIcon* icon = CGulIcon::NewL( bitmap, bitmapMask );
+	        CleanupStack::PushL( icon );
+		    icons->AppendL( icon );
+			CleanupStack::Pop(3); // icon, mask, bitmap
+/*******************************************************************/
+        }
+
+    // Set icon array.
+    iGrid->ItemDrawer()->FormattedCellData()->SetIconArrayL( icons );
+    CleanupStack::Pop(); // icons array
+    }
+
+// ----------------------------------------------------
+// CLmkIconSelectorPopup::AddDataL
+// ----------------------------------------------------
+//
+void CLmkIconSelectorPopup::AddDataL( TInt aNum )
+    {
+    MDesCArray* array = iGrid->Model()->ItemTextArray();
+    CDesCArray* cArray = ( CDesCArray* )array;
+
+    // Makes text which is added to.
+    TBuf< KTextLength > number;
+    TBuf< KTextLength > format( KFormat );
+
+    // The number of Grids.
+    TInt numberOfData = iGrid->GridModel()->NumberOfData() ;
+
+    // Add the data to the last
+    for ( TInt i = numberOfData; i < aNum + numberOfData; i++ )
+        {
+        number.Format( format, i );
+        cArray->AppendL( number );
+        }
+
+    // Inform list box that data added
+    iGrid->HandleItemAdditionL();
+
+    // If item size changes, need to alter the item style
+    ApplySelGridGraphicStyleL();
+
+    }
+
+// ----------------------------------------------------
+// CLmkIconSelectorPopup::ApplySelGridGraphicStyleL
+// ----------------------------------------------------
+//
+void CLmkIconSelectorPopup::ApplySelGridGraphicStyleL()
+    {
+
+    if ( !iGrid )
+        {
+        return;
+        }
+
+    AknListBoxLayouts::SetupStandardGrid( *iGrid );
+
+    TInt grWidth( iGrid->ColumnWidth() );
+    TInt grHeight( iGrid->ItemHeight() );
+    // layout of the graphic
+    AknListBoxLayouts::SetupGridFormGfxCell( *iGrid,
+            iGrid->ItemDrawer(),
+            0, 0, 0, 0, 0,
+            grWidth,
+            grHeight,
+            TPoint( 0, 0 ),
+            TPoint( grWidth, grHeight ) );
+    }
+void CLmkIconSelectorPopup::HandleScreenSizeChange()
+	{
+	TRect clientRect;
+	AknLayoutUtils::LayoutMetricsRect(AknLayoutUtils::EMainPane, clientRect);
+	TAknLayoutRect popup_grid_graphic_window;
+	popup_grid_graphic_window.LayoutRect(
+		clientRect, AknLayoutScalable_Avkon::popup_grid_graphic_window(0));
+
+	// Calculate the size relatively
+	TRect relativeDialog(TPoint(0,0),popup_grid_graphic_window.Rect().Size());
+
+	// Get the layout of the actual character grid with scrollbar
+    TAknLayoutRect listscroll_popup_graphic_pane;
+
+    listscroll_popup_graphic_pane.LayoutRect(relativeDialog,
+    	AknLayoutScalable_Avkon::listscroll_popup_graphic_pane());
+
+	TAknLayoutRect grid_graphic_popup_pane;
+
+	grid_graphic_popup_pane.LayoutRect(
+		listscroll_popup_graphic_pane.Rect(),
+		AknLayoutScalable_Avkon::grid_graphic_popup_pane(1));
+
+	TRect popupGridRect = grid_graphic_popup_pane.Rect();
+
+	TSize sizeOfItems(popupGridRect.Width() / KNumOfColumns,
+					  popupGridRect.Height() / KNumOfRows);
+
+	// adjust the size of cells to the number of columns.
+	TRAP_IGNORE(iGrid->SetLayoutL( EFalse, ETrue, ETrue, KNumOfColumns,
+                       KNumOfRows, sizeOfItems ));
+
+    CArrayPtr< CGulIcon >* icons =
+    	iGrid->ItemDrawer()->FormattedCellData()->IconArray();
+
+    for ( TInt i(0); i < icons->Count(); i++ )
+        {
+        	CGulIcon *icon = icons->At(i);
+			CFbsBitmap* bitmap = icon->Bitmap();
+			CFbsBitmap* bitmapMask = icon->Mask();
+			AknIconUtils::SetSize(bitmap, sizeOfItems);  	//fix
+			AknIconUtils::SetSize(bitmapMask, sizeOfItems); //fix
+        }
+	TRAP_IGNORE(ApplySelGridGraphicStyleL());
+	}
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/uicontrols/src/CLmkLmItemListMemento.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,270 @@
+/*
+* 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:    LandmarksUi Content File -
+*
+*/
+
+
+
+
+
+
+
+
+// INCLUDE FILES
+#include "CLmkLmItemListMemento.h"
+#include "CLmkLmItemListProvider.h"
+#include <eiklbx.h>
+#include <AknUtils.h>
+#include <lmkerrors.h>
+
+
+// Initial value for iMemorizedCurrentItemId, this is a quick fix for focus on
+// uncategorised category bug.
+//const TInt KIdNotFound = KErrNotFound;
+const TUint32 KInititialValue = 0xFFFFFFFE;
+#if defined(_DEBUG)
+
+// CONSTANTS
+/// Unnamed namespace for local definitions
+namespace {
+
+_LIT( KPanicMsg, "CLmkLmItemListMemento" );
+
+void Panic( TPanicCode aReason )
+    {
+    User::Panic( KPanicMsg, aReason );
+    }
+}  // namespace
+
+#endif
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CLmkLmItemListMemento::CLmkLmItemListMemento
+// C++ constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+CLmkLmItemListMemento::CLmkLmItemListMemento()
+    {
+    //iMemorizedCurrentItemId = KPosLmNullItemId;
+    iMemorizedCurrentItemId = KInititialValue;
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkLmItemListMemento::ConstructL
+// Symbian 2nd phase constructor can leave.
+// -----------------------------------------------------------------------------
+//
+void CLmkLmItemListMemento::ConstructL()
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkLmItemListMemento::NewL
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+CLmkLmItemListMemento* CLmkLmItemListMemento::NewL()
+    {
+    CLmkLmItemListMemento* self = new( ELeave ) CLmkLmItemListMemento();
+
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop();
+
+    return self;
+    }
+
+// ----------------------------------------------------
+// CLmkLmItemListMemento::~CLmkLmItemListMemento
+// ----------------------------------------------------
+//
+CLmkLmItemListMemento::~CLmkLmItemListMemento()
+    {
+    }
+
+// ----------------------------------------------------
+// CLmkLmItemListMemento::MemorizedItemId
+// ----------------------------------------------------
+//
+EXPORT_C TPosLmItemId CLmkLmItemListMemento::MemorizedItemId() const
+    {
+    return iMemorizedCurrentItemId;
+    }
+
+// ----------------------------------------------------
+// CLmkLmItemListMemento::Store
+// ----------------------------------------------------
+//
+void CLmkLmItemListMemento::Store(
+    const CEikListBox& aListBox,
+    const CLmkListProviderBase& aProvider,
+    TBool aFiltered )
+    {
+    if ( aFiltered )
+        {
+        CAknFilteredTextListBoxModel* model =
+            static_cast<CAknFilteredTextListBoxModel*>( aListBox.Model() );
+        __ASSERT_DEBUG( model, Panic( KLmkPanicNoLbModel ) );
+        StoreFiltered( aListBox, aProvider, *model );
+        }
+    else
+        {
+        StoreNonFiltered( aListBox, aProvider );
+        }
+    }
+
+// ----------------------------------------------------
+// CLmkLmItemListMemento::Restore
+// ----------------------------------------------------
+//
+void CLmkLmItemListMemento::Restore(
+    const CEikListBox& aListBox,
+    const CLmkListProviderBase& aProvider,
+    TBool aFiltered )
+    {
+    if ( aFiltered )
+        {
+        CAknFilteredTextListBoxModel* model =
+            static_cast<CAknFilteredTextListBoxModel*>( aListBox.Model() );
+        __ASSERT_DEBUG( model, Panic( KLmkPanicNoLbModel ) );
+        RestoreFiltered( aListBox, aProvider, *model );
+        }
+    else
+        {
+        RestoreNonFiltered( aListBox, aProvider );
+        }
+    }
+
+// ----------------------------------------------------
+// CLmkLmItemListMemento::StoreFiltered
+// ----------------------------------------------------
+//
+void CLmkLmItemListMemento::StoreFiltered(
+    const CEikListBox& aListBox,
+    const CLmkListProviderBase& aProvider,
+    const CAknFilteredTextListBoxModel& aModel )
+    {
+    const CLmkLmItemListProvider& provider =
+        static_cast <const CLmkLmItemListProvider&> ( aProvider );
+    if ( aListBox.Model()->NumberOfItems() > 0 &&
+         aListBox.CurrentItemIndex() >= 0 )
+        {
+        iMemorizedCurrentItemIndex =
+            aModel.Filter()->FilteredItemIndex( aListBox.CurrentItemIndex() );
+        provider.GetSelectedItemId( iMemorizedCurrentItemId,
+                                iMemorizedCurrentItemIndex );
+        }
+    else
+        {
+        iMemorizedCurrentItemIndex = 0;
+       // iMemorizedCurrentItemId = KPosLmNullItemId;
+        iMemorizedCurrentItemId = KInititialValue;
+        }
+    }
+
+// ----------------------------------------------------
+// CLmkLmItemListMemento::RestoreFiltered
+// ----------------------------------------------------
+//
+void CLmkLmItemListMemento::RestoreFiltered(
+    const CEikListBox& aListBox,
+    const CLmkListProviderBase& aProvider,
+    const CAknFilteredTextListBoxModel& /*aModel*/ )
+    {
+    const CLmkLmItemListProvider& provider =
+        static_cast <const CLmkLmItemListProvider&> ( aProvider );
+    TInt index = provider.SelectedIndex( iMemorizedCurrentItemId );
+    if ( index != KErrNotFound &&
+         index < aListBox.Model()->NumberOfItems() )
+        {
+        aListBox.SetCurrentItemIndex( index );
+        aListBox.ScrollToMakeItemVisible( index );
+        }
+    else
+        {
+        aListBox.SetCurrentItemIndex( 0 );
+        }
+    aListBox.DrawDeferred();
+    }
+
+// ----------------------------------------------------
+// CLmkLmItemListMemento::StoreNonFiltered
+// ----------------------------------------------------
+//
+void CLmkLmItemListMemento::StoreNonFiltered(
+    const CEikListBox& aListBox,
+    const CLmkListProviderBase& aProvider )
+    {
+    // TODO: these are not used and implementation is quite sketchy.
+    // Replace with leave KErrNotSupported if this method won't be used.
+    const CLmkLmItemListProvider& provider =
+        static_cast <const CLmkLmItemListProvider&> ( aProvider );
+    iMemorizedCurrentItemIndex = aListBox.CurrentItemIndex();
+    provider.GetSelectedItemId( iMemorizedCurrentItemId,
+                                iMemorizedCurrentItemIndex );
+    iMemorizedTopItemIndex = aListBox.TopItemIndex();
+    }
+
+// ----------------------------------------------------
+// CLmkLmItemListMemento::RestoreNonFiltered
+// ----------------------------------------------------
+//
+void CLmkLmItemListMemento::RestoreNonFiltered(
+    const CEikListBox& aListBox,
+    const CLmkListProviderBase& aProvider )
+    {
+    // TODO: these are not used and implementation is quite sketchy.
+    // Replace with leave KErrNotSupported if this method won't used.
+    const CLmkLmItemListProvider& provider =
+        static_cast <const CLmkLmItemListProvider&> ( aProvider );
+    TInt index = provider.SelectedIndex( iMemorizedCurrentItemId );
+    if ( index != KErrNotFound )
+        {
+        if ( index == iMemorizedCurrentItemIndex )
+            {
+            aListBox.SetCurrentItemIndex( iMemorizedCurrentItemIndex );
+            aListBox.SetTopItemIndex( iMemorizedTopItemIndex );
+            }
+        else
+            {
+            aListBox.ScrollToMakeItemVisible( index );
+            }
+        }
+    else
+        {
+        aListBox.SetCurrentItemIndex( 0 );
+        }
+    aListBox.DrawDeferred();
+    }
+
+// ----------------------------------------------------
+// CLmkLmItemListMemento::IsModelAvailable
+// ----------------------------------------------------
+//anwar
+TBool CLmkLmItemListMemento::IsModelAvailable()
+	{
+	return iModelAvailable;
+	}
+// ----------------------------------------------------
+// CLmkLmItemListMemento::UpdateModelAvailability
+// ----------------------------------------------------
+//anwar
+void  CLmkLmItemListMemento::UpdateModelAvailability(TBool aModelAvailable)
+	{
+	iModelAvailable = aModelAvailable;
+	}
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/uicontrols/src/CLmkLocSettingLauncher.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,114 @@
+/*
+* Copyright (c) 2002-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:    Responsible for launching positioning settings
+*
+*/
+
+
+
+
+
+
+
+// INCLUDE FILES
+#include "CLmkLocSettingLauncher.h"
+
+// ================= MEMBER FUNCTIONS =======================
+// ----------------------------------------------------------------------------
+// CLmkLocSettingsLauncher::NewL
+// Two-phased constructor.
+// ----------------------------------------------------------------------------
+//
+CLmkLocSettingsLauncher* CLmkLocSettingsLauncher:: NewL()
+	{
+	CLmkLocSettingsLauncher* self = new (ELeave) CLmkLocSettingsLauncher();
+	CleanupStack::PushL(self);
+	self->ConstructL();
+	CleanupStack::Pop(); // self
+	return self;
+	}
+
+// ----------------------------------------------------------------------------
+// CLmkLocSettingsLauncher::CLmkLocSettingsLauncher
+// ----------------------------------------------------------------------------
+//
+CLmkLocSettingsLauncher::CLmkLocSettingsLauncher()
+	: CActive( EPriorityStandard )
+	{
+	}
+
+// ----------------------------------------------------------------------------
+// CLmkLocSettingsLauncher::~CLmkLocSettingsLauncher
+// ----------------------------------------------------------------------------
+//
+CLmkLocSettingsLauncher::~CLmkLocSettingsLauncher()
+	{
+	Cancel();
+    delete iClientLibrary;
+	}
+
+// ----------------------------------------------------------------------------
+// CLmkLocSettingsLauncher::ConstructL
+// ----------------------------------------------------------------------------
+//
+void CLmkLocSettingsLauncher::ConstructL()
+	{
+	iClientLibrary  = CLocSettingsUiClient::NewL();
+    CActiveScheduler::Add( this );
+	}
+
+// ----------------------------------------------------------------------------
+// CLmkLocSettingsLauncher::LaunchL
+// ----------------------------------------------------------------------------
+//
+void CLmkLocSettingsLauncher::LaunchL()
+	{
+	iClientLibrary->LaunchPosSettingsAsEmbeddedAppL( iStatus );
+	SetActive();
+	}
+
+// ----------------------------------------------------------------------------
+// CLmkLocSettingsLauncher::RunL
+// ----------------------------------------------------------------------------
+//
+void CLmkLocSettingsLauncher::RunL()
+    {
+    switch( iStatus.Int())
+        {
+        case KErrNone:
+            {
+            break;
+            }
+        case KErrCancel:
+            {
+            break;
+            }
+        default:
+            {
+            break;
+            }
+        }
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkLocSettingsLauncher::DoCancel
+// ----------------------------------------------------------------------------
+//
+void CLmkLocSettingsLauncher::DoCancel()
+    {
+    iClientLibrary->ClosePosSettings();
+    }
+
+// End of File
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/uicontrols/src/CLmkMfneFloat.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,580 @@
+/*
+* 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:    LandmarksUi Content File -
+*
+*/
+
+
+
+
+
+
+
+
+// INCLUDE FILES
+#include <e32math.h>
+#include "CLmkMfneFloat.h"
+#include <aknutils.h>
+
+namespace {
+
+const TInt KNumOtherSymbols = 2; // +/- and decimal point
+
+_LIT(KMinus,"-");
+
+const TInt KEventCodeStarSign(42);
+const TInt KEventCodeMinusSign(45);
+const TInt KKeyToMatchPoint = 35; // Shift/Hash
+const TInt KPointKeyFromQwerty = 46;
+
+#if defined(_DEBUG)
+void Panic(TInt aReason)
+    {
+    _LIT(KPanicCategory, "LMK_MFNE_FLT");
+    User::Panic(KPanicCategory, aReason);
+    }
+#endif
+
+TReal Nan()
+    {
+    TRealX nan;
+    nan.SetNaN();
+    return nan;
+    }
+
+TBool IsAnyDigit(TChar aCharacter)
+	{
+	return (aCharacter.GetNumericValue() != KErrNotFound);
+	}
+
+void TrimRightmostChar(TDes& aText)
+    {
+    if (aText.Length())
+        {
+        aText.SetLength(aText.Length() - 1);
+        }
+    }
+}
+
+// ---------------------------------------------------------
+// CLmkMfneFloat::CLmkMfneFloat
+// ---------------------------------------------------------
+//
+CLmkMfneFloat::CLmkMfneFloat(
+    TInt aMaxDigits,
+    TInt aMaxDecimalDigits)
+    :
+    iMaxDigits(aMaxDigits),
+    iMaxDecimalDigits(aMaxDecimalDigits)
+    {
+    __ASSERT_DEBUG(aMaxDigits > 0, Panic(KErrArgument));
+    __ASSERT_DEBUG(aMaxDecimalDigits > 0, Panic(KErrArgument));
+    __ASSERT_DEBUG(aMaxDecimalDigits <= aMaxDigits, Panic(KErrArgument));
+    }
+
+// ---------------------------------------------------------
+// CLmkMfneFloat::~CLmkMfneFloat
+// ---------------------------------------------------------
+//
+CLmkMfneFloat::~CLmkMfneFloat()
+    {
+    delete iText;
+    }
+
+// ---------------------------------------------------------
+// CLmkMfneFloat::NewL
+// ---------------------------------------------------------
+//
+CLmkMfneFloat* CLmkMfneFloat::NewL(
+    TInt aMaxDigits,
+    TInt aMaxDecimalDigits)
+    {
+    CLmkMfneFloat* number = new(ELeave)
+        CLmkMfneFloat(aMaxDigits, aMaxDecimalDigits);
+
+    CleanupStack::PushL(number);
+    number->ConstructL();
+    CleanupStack::Pop();
+
+    return number;
+    }
+
+// ---------------------------------------------------------
+// CLmkMfneFloat::ConstructL
+// ---------------------------------------------------------
+//
+void CLmkMfneFloat::ConstructL()
+    {
+    iText = HBufC::NewL(MaxNumOfChars());
+    }
+
+// ---------------------------------------------------------
+// CLmkMfneFloat::SetLimits
+// ---------------------------------------------------------
+//
+TBool CLmkMfneFloat::SetLimits(
+    TReal aMinimumValue,
+    TReal aMaximumValue)
+    {
+    __ASSERT_DEBUG(
+        Math::IsNaN(aMinimumValue) ||
+        Math::IsNaN(aMaximumValue) ||
+        (aMinimumValue < aMaximumValue), Panic(KErrArgument));
+
+    iMinimumValue = aMinimumValue;
+    iMaximumValue = aMaximumValue;
+
+    return EnsureValueInLimits(ValueFromText(*iText));
+    }
+
+// ---------------------------------------------------------
+// CLmkMfneFloat::GetLimits
+// ---------------------------------------------------------
+//
+void CLmkMfneFloat::GetLimits(
+    TReal& aMinimumValue,
+    TReal& aMaximumValue) const
+    {
+    aMinimumValue = iMinimumValue;
+    aMaximumValue = iMaximumValue;
+    }
+
+// ---------------------------------------------------------
+// CLmkMfneFloat::SetValue
+// ---------------------------------------------------------
+//
+void CLmkMfneFloat::SetValue(TReal aValue)
+    {
+    TPtr ptr(iText->Des());
+    TextFromValue(aValue, ptr);
+    AknTextUtils::DisplayTextLanguageSpecificNumberConversion( ptr );
+    EnsureValueInLimits(aValue);
+    iIsBeingEditedWithCursor = EFalse;
+    }
+
+// ---------------------------------------------------------
+// CLmkMfneFloat::Value
+// ---------------------------------------------------------
+//
+TReal CLmkMfneFloat::Value() const
+    {
+    return ValueFromText(*iText);
+    }
+
+// ---------------------------------------------------------
+// CLmkMfneFloat::MaximumWidthInPixels
+// ---------------------------------------------------------
+//
+TInt CLmkMfneFloat::MaximumWidthInPixels(
+    const CFont& aFont,
+    TBool /*aShrinkToMinimumSize*/)
+    {
+    TLocale locale;
+    TInt digitWidth =
+        TFindWidthOfWidestDigitType(locale.DigitType()).MaximumWidthInPixels(aFont);
+
+    return MaxNumOfChars() * digitWidth;
+    }
+
+// ---------------------------------------------------------
+// CLmkMfneFloat::InputCapabilities
+// ---------------------------------------------------------
+//
+TCoeInputCapabilities CLmkMfneFloat::InputCapabilities() const
+    {
+    return TCoeInputCapabilities(TCoeInputCapabilities::EWesternNumericReal);
+    }
+
+// ---------------------------------------------------------
+// CLmkMfneFloat::IsEditable
+// ---------------------------------------------------------
+//
+TBool CLmkMfneFloat::IsEditable() const
+    {
+    return ETrue;
+    }
+
+// ---------------------------------------------------------
+// CLmkMfneFloat::HandleHighlight
+// ---------------------------------------------------------
+//
+void CLmkMfneFloat::HandleHighlight()
+    {
+    iFocus = ETrue;
+    if ((iText->Length() == 0))
+        {
+        iIsBeingEditedWithCursor = ETrue;
+        }
+    }
+
+// ---------------------------------------------------------
+// CLmkMfneFloat::HighlightType
+// ---------------------------------------------------------
+//
+CEikMfneField::THighlightType CLmkMfneFloat::HighlightType() const
+    {
+    if (iFocus)
+        {
+        return iIsBeingEditedWithCursor ? ECursor : EInverseVideo;
+        }
+    else
+        {
+        return EInverseVideo;
+        }
+    }
+
+// ---------------------------------------------------------
+// CLmkMfneFloat::HandleDeHighlight
+// ---------------------------------------------------------
+//
+void CLmkMfneFloat::HandleDeHighlight(
+    const CFont& /*aFont*/,
+    CEikonEnv& /*aEikonEnv*/,
+    TBool& aDataAltered,
+    TBool& /*aError*/)
+    {
+    iIsBeingEditedWithCursor = EFalse;
+    iFocus = EFalse;
+
+    TPtr text(iText->Des());
+    if (Math::IsNaN(ValueFromText(text)))
+        {
+        text.Zero();
+        aDataAltered = ETrue;
+        }
+    }
+
+// ---------------------------------------------------------
+// CLmkMfneFloat::HandleKey
+// ---------------------------------------------------------
+//
+void CLmkMfneFloat::HandleKey(
+    const CFont& /*aFont*/,
+    const TKeyEvent& aKeyEvent,
+    TBool /*aInterpretLeftAndRightAsEarEvents*/,
+    TBool& aDataAltered,
+    TInt& aHighlightIncrement)
+    {
+    TChar ch = aKeyEvent.iCode;
+    TPtr text = iText->Des();
+
+    switch (ch)
+        {
+        case EKeyLeftArrow:
+        case EKeyRightArrow:
+            HandleLeftOrRightArrow(ch, aDataAltered, aHighlightIncrement);
+            break;
+
+        case EKeyBackspace:
+            if (text.Length())
+                {
+                iIsBeingEditedWithCursor = ETrue;
+                TrimRightmostChar(text);
+                if (text == KMinus)
+                    {
+                    text.Zero();
+                    }
+                aDataAltered=ETrue;
+                }
+            break;
+
+        case KEventCodeStarSign:
+        case KEventCodeMinusSign:
+            // if negative values allowed
+            if (Math::IsNaN(iMinimumValue) || iMinimumValue < 0)
+                {
+                if (!iIsBeingEditedWithCursor)
+                    {
+                    iIsBeingEditedWithCursor = ETrue;
+                    text.Zero();
+                    }
+
+                if (text.Length() == 0)
+                    {
+                    text.Append(KMinus);
+                    aDataAltered=ETrue;
+                    }
+                }
+            break;
+
+        default:
+            TLocale locale;
+            TChar point = locale.DecimalSeparator();
+
+            if ((ch == KKeyToMatchPoint || ch == KPointKeyFromQwerty ) && (iIsBeingEditedWithCursor))
+                {
+                if (IsDecimalSeparatorAllowed(text))
+                    {
+                    text.Append(point);
+                    aDataAltered = ETrue;
+                    }
+                }
+
+            if (IsAnyDigit(ch))
+                {
+                if (!iIsBeingEditedWithCursor)
+                    {
+                    iIsBeingEditedWithCursor = ETrue;
+                    text.Zero();
+                    aDataAltered=ETrue;
+                    }
+
+                if (IsMoreDigitsAllowed(text))
+                    {
+                    text.Append(ch);
+                    aDataAltered = ETrue;
+
+                    // check that value is within limits
+                    if (EnsureValueInLimits(ValueFromText(text)))
+                        {
+                        // value is changed, make whole field selected
+                        iIsBeingEditedWithCursor = EFalse;
+                        }
+                    }
+                else
+                    {
+                    aHighlightIncrement = 1;
+                    }
+                }
+            break;
+            }
+    }
+
+// ---------------------------------------------------------
+// CLmkMfneFloat::EnsureValueInLimits
+// ---------------------------------------------------------
+//
+TBool CLmkMfneFloat::EnsureValueInLimits(TReal aValue)
+    {
+    if ( !Math::IsNaN(aValue))
+        {
+        TPtr ptr(iText->Des());
+        if (aValue < iMinimumValue)
+            {
+            TextFromValue(iMinimumValue, ptr);
+            return ETrue;
+            }
+
+        if (aValue > iMaximumValue)
+            {
+            TextFromValue(iMaximumValue, ptr);
+            return ETrue;
+            }
+        }
+    return EFalse;
+    }
+
+// ---------------------------------------------------------
+// CLmkMfneFloat::Text
+// ---------------------------------------------------------
+//
+const TDesC& CLmkMfneFloat::Text() const
+    {
+    TPtr ptr = (iText->Des());
+    AknTextUtils::DisplayTextLanguageSpecificNumberConversion( ptr );
+    return *iText;
+    }
+
+// ---------------------------------------------------------
+// CLmkMfneFloat::MaxNumOfChars
+// ---------------------------------------------------------
+//
+TInt CLmkMfneFloat::MaxNumOfChars() const
+    {
+    return iMaxDigits + KNumOtherSymbols;
+    }
+
+// ---------------------------------------------------------
+// CLmkMfneFloat::TextHasDecimalSeparator
+// ---------------------------------------------------------
+//
+TBool CLmkMfneFloat::IsDecimalSeparatorAllowed(const TDesC& aText) const
+    {
+    if (Math::IsNaN(ValueFromText(aText)))
+        {
+        return EFalse;
+        }
+
+    TLocale locale;
+    TChar point = locale.DecimalSeparator();
+    TInt i = 0;
+    while (i < aText.Length())
+        {
+        if (TChar(aText[i++]) == point)
+            {
+            return EFalse;
+            }
+        }
+
+    return (aText.Length() < MaxNumOfChars());
+    }
+
+// ---------------------------------------------------------
+// CLmkMfneFloat::ValueFromText
+// ---------------------------------------------------------
+//
+TBool CLmkMfneFloat::IsMoreDigitsAllowed(const TDesC& aText) const
+    {
+    // check that number of allowed digits is less then iMaxDigits
+    TInt digits = 0, decimalDigits = 0;
+    TInt isDecimalPart = EFalse;
+    TLocale locale;
+    TChar point = locale.DecimalSeparator();
+
+    // if string starts with 0, then only decimal point is allowed
+    _LIT(KSingleZero, "0");
+    _LIT(KMinusZero, "-0");
+
+    if (aText == KSingleZero || aText == KMinusZero)
+        {
+        return EFalse;
+        }
+
+    // other cases - check total amount of digits
+    // and amount of decimal digits
+    for (TInt i = 0; i < aText.Length(); i++)
+        {
+        if (IsAnyDigit(aText[i]))
+            {
+            digits++;
+            }
+        if (isDecimalPart)
+            {
+            decimalDigits++;
+            }
+        if (aText[i] == point)
+            {
+            isDecimalPart = ETrue;
+            }
+        }
+    return ((digits < iMaxDigits) && (decimalDigits < iMaxDecimalDigits));
+    }
+
+// ---------------------------------------------------------
+// CLmkMfneFloat::ValueFromText
+// ---------------------------------------------------------
+//
+TReal CLmkMfneFloat::ValueFromText(const TDesC& aText) const
+    {
+    if (aText.Length() == 0)
+        {
+        return Nan();
+        }
+
+    TBool isNegative(EFalse);
+    TInt integer(0);
+    TInt integerDigits(0);
+    TBool fractionPart(EFalse);
+    TInt fraction(0);
+    TInt fractionDigits(0);
+    TLocale locale;
+
+    for (TInt i = 0; i < aText.Length(); i++)
+        {
+        TChar ch(aText[i]);
+        if (ch == '-')
+            {
+            __ASSERT_DEBUG(i == 0, Panic(KErrGeneral));
+            isNegative = ETrue;
+            continue;
+            }
+
+        if (ch == locale.DecimalSeparator())
+            {
+            __ASSERT_DEBUG(fractionPart == EFalse, Panic(KErrGeneral));
+            fractionPart = ETrue;
+            continue;
+            }
+
+        TInt val = ch.GetNumericValue();
+        if (val >= 0)
+            {
+            if (!fractionPart)
+                {
+                integer = integer * 10 + val;
+                integerDigits++;
+                }
+            else
+                {
+                fraction = fraction * 10 + val;
+                fractionDigits++;
+                }
+            }
+        }
+
+    // integer part must contain at least "0".
+    if (integerDigits < 1)
+        {
+        return Nan();
+        }
+
+    TReal value(fraction);
+    for (TInt i = 0; i < fractionDigits; i++)
+        {
+        value /= 10;
+        }
+
+    value += TReal(integer);
+    return (isNegative) ? -value : value;
+    }
+
+// ---------------------------------------------------------
+// CLmkMfneFloat::TextFromValue
+// ---------------------------------------------------------
+//
+void CLmkMfneFloat::TextFromValue(TReal aValue, TDes& aText) const
+    {
+    aText.SetLength(0);
+
+    if (Math::IsNaN(aValue))
+        {
+        return;
+        }
+
+    TRealFormat format;
+    format.iType = KRealFormatFixed;
+    format.iTriLen = 0; // no triad separations
+    format.iWidth = MaxNumOfChars();
+    format.iPlaces = (aValue == 0) ? 0 : iMaxDecimalDigits;
+
+    // convert real value to a string
+    aText.Num(aValue, format);
+
+    // cut trailing zeroes from decimal part
+    TLocale locale;
+    TInt pointIndex = aText.Locate(locale.DecimalSeparator());
+    if (pointIndex != KErrNotFound)
+        {
+        TInt newLength = aText.Length();
+        for (TInt i = aText.Length() - 1; i > pointIndex; i--)
+            {
+            if (aText[i] == '0')
+                {
+                newLength--;
+                }
+            else
+                {
+                break;
+                }
+            }
+
+        // if only decimal point left, cut it also
+        if (aText[newLength-1] == locale.DecimalSeparator())
+            {
+            newLength--;
+            }
+
+        aText.SetLength(newLength);
+        }
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/uicontrols/src/CLmkMfneSeparator.cpp	Wed Sep 01 12:31:27 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:    LandmarksUi Content File -
+*
+*/
+
+
+
+
+
+
+
+
+// INCLUDE FILES
+#include <eikenv.h>
+
+#include "CLmkMfneSeparator.h"
+
+CLmkMfneSeparator::CLmkMfneSeparator()
+    {
+    }
+
+CLmkMfneSeparator::~CLmkMfneSeparator()
+    {
+    delete iText;
+    }
+
+CLmkMfneSeparator* CLmkMfneSeparator::NewL(const TDesC& aText)
+    {
+    CLmkMfneSeparator* self = new(ELeave) CLmkMfneSeparator();
+    CleanupStack::PushL(self);
+    self->SetTextL(aText);
+    CleanupStack::Pop(self);
+    return self;
+    }
+
+void CLmkMfneSeparator::SetTextL(const TDesC& aText)
+    {
+    delete iText;
+    iText = NULL;
+    iText = HBufC::NewL(aText.Length());
+    *iText = aText;
+    }
+
+TInt CLmkMfneSeparator::MaximumWidthInPixels(
+    const CFont& aFont,
+    TBool /*aShrinkToMinimumSize*/)
+    {
+    return aFont.TextWidthInPixels(*iText);
+    }
+
+TCoeInputCapabilities CLmkMfneSeparator::InputCapabilities() const
+    {
+    return TCoeInputCapabilities(TCoeInputCapabilities::ENone);
+    }
+
+const TDesC& CLmkMfneSeparator::Text() const
+    {
+    return *iText;
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/uicontrols/src/CLmkMultiSelectionLBModel.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,102 @@
+/*
+* 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:    LandmarksUi Content File -
+*
+*/
+
+
+
+
+
+
+
+
+// INCLUDE FILES
+#include "CLmkMultiSelectionLBModel.h"
+#include "CLmkListProviderBase.h"
+#include "CLmkSelectorCache.h"
+#include "CLmkUiItemBase.h"
+#include <EPos_Landmarks.h>
+#include <e32keys.h>
+// CONSTANTS
+/// Unnamed namespace for local definitions
+namespace {
+const TInt KCheckboxOffIcon = 1;
+}  // namespace
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CLmkMultiSelectionLBModel::CLmkMultiSelectionLBModel
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+CLmkMultiSelectionLBModel::CLmkMultiSelectionLBModel()
+    {
+
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkMultiSelectionLBModel::ConstructL
+// Symbian 2nd phase constructor can leave.
+// -----------------------------------------------------------------------------
+//
+void CLmkMultiSelectionLBModel::ConstructL(
+    CLmkListProviderBase& aListProvider )
+    {
+    BaseConstructL( aListProvider );
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkMultiSelectionLBModel::NewL
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+CLmkMultiSelectionLBModel* CLmkMultiSelectionLBModel::NewL(
+    CLmkListProviderBase& aListProvider )
+    {
+    CLmkMultiSelectionLBModel* self = new( ELeave ) CLmkMultiSelectionLBModel;
+
+    CleanupStack::PushL( self );
+    self->ConstructL( aListProvider );
+    CleanupStack::Pop();
+
+    return self;
+    }
+
+// ----------------------------------------------------
+// CLmkMultiSelectionLBModel::~CLmkMultiSelectionLBModel
+// ----------------------------------------------------
+//
+CLmkMultiSelectionLBModel::~CLmkMultiSelectionLBModel()
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkMultiSelectionLBModel::MdcaPointL
+// ?implementation_description
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+void CLmkMultiSelectionLBModel::MdcaPointL( TInt aIndex ) const
+    {
+    CLmkUiItemBase& item = iCache->ItemAtL( aIndex );
+    TPtr16 modBuffer = iBuffer->Des();
+    modBuffer.Zero();
+    modBuffer.AppendNum( KCheckboxOffIcon );
+    modBuffer.Append( EKeyTab );
+    modBuffer.Append( item.Text() );
+    }
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/uicontrols/src/CLmkMultiSelectorDialog.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,388 @@
+/*
+* 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:    LandmarksUi Content File -
+*
+*/
+
+
+
+// INCLUDE FILES
+#include <featmgr.h>
+#include <sendnorm.rsg> // R_SENDUI_MENU
+#include <aknsfld.h>
+#include <StringLoader.h>
+#include <lmkui.rsg>
+#include <lmkerrors.h>
+
+#include "CLmkMultiSelectorDialog.h"
+#include "MLmkDlgMenuObserver.h"
+#include "MLmkNavigationObserver.h"
+#include "LmkConsts.h"
+#include "landmarks.hrh"
+#include "CLmkSender.h"
+
+
+// CONSTANTS
+/// Unnamed namespace for local definitions
+namespace {
+
+#if defined(_DEBUG)
+
+_LIT( KPanicMsg, "CLmkMultiSelectorDialog" );
+
+void Panic( TPanicCode aReason )
+    {
+    User::Panic( KPanicMsg, aReason );
+    }
+#endif
+}  // namespace
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CLmkMultiSelectorDialog::CLmkMultiSelectorDialog
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+CLmkMultiSelectorDialog::CLmkMultiSelectorDialog(
+    TInt& aOpenedItemIndex,
+    CArrayFix<TInt>* aSelectionIndexArray,
+    MDesCArray* aLbModel,
+    TInt aMenuBarResourceId,
+    TInt aOkOptionsMenuResourceId,
+    MEikCommandObserver* aCmdObserver,
+    MLmkDlgMenuObserver* aMenuObserver,
+    MLmkListMemento* aMemento )
+    : CLmkSelectorDialog( aOpenedItemIndex, aLbModel, aCmdObserver,aMemento ),
+      iMenuBarResourceId( aMenuBarResourceId ),
+      iOkOptionsMenuResourceId( aOkOptionsMenuResourceId ),
+      iSendUiMenuPaneResourceId( KZeroResourceId ),
+      iSelectionIndexArray( aSelectionIndexArray ),
+      iMenuObserver( aMenuObserver )
+    {
+    iExited = EFalse;
+    iIsToClearSelection = EFalse;
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkMultiSelectorDialog::NewL
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+CLmkMultiSelectorDialog* CLmkMultiSelectorDialog::NewL(
+    TInt& aOpenedItemIndex,
+    CArrayFix<TInt>* aSelectionIndexArray,
+    MDesCArray* aLbModel,
+    TInt aMenuBarResourceId,
+    TInt aOkOptionsMenuResourceId,
+    MEikCommandObserver* aCmdObserver,
+    MLmkDlgMenuObserver* aMenuObserver,
+    MLmkListMemento* aMemento )
+    {
+    CLmkMultiSelectorDialog* self =
+        new( ELeave ) CLmkMultiSelectorDialog( aOpenedItemIndex,
+                                               aSelectionIndexArray,
+                                               aLbModel,
+                                               aMenuBarResourceId,
+                                               aOkOptionsMenuResourceId,
+                                               aCmdObserver,
+                                               aMenuObserver,
+                                               aMemento );
+
+    CleanupStack::PushL( self );
+    self->ConstructL( aMenuBarResourceId );
+    CleanupStack::Pop();
+
+    return self;
+    }
+
+// ----------------------------------------------------
+// CLmkMultiSelectorDialog::ConstructL
+// ----------------------------------------------------
+//
+void CLmkMultiSelectorDialog::ConstructL(TInt aMenuBarResourceId)
+	{
+	CAknSelectionListDialog::ConstructL( aMenuBarResourceId );
+	}
+
+// ----------------------------------------------------
+// CLmkMultiSelectorDialog::~CLmkMultiSelectorDialog
+// ----------------------------------------------------
+//
+CLmkMultiSelectorDialog::~CLmkMultiSelectorDialog()
+    {
+    }
+
+// ----------------------------------------------------
+// CLmkMultiSelectorDialog::SetupSendMenu
+// ----------------------------------------------------
+//
+void CLmkMultiSelectorDialog::SetupSendMenu(
+    CLmkSender& aSender,
+    TInt aSendUiMenuPaneResource,
+    TInt aMenuTextResource )
+    {
+    iLmkSender = &aSender;
+    iSendUiMenuPaneResourceId = aSendUiMenuPaneResource;
+    iMenuTextResourceId = aMenuTextResource;
+    }
+
+// ----------------------------------------------------
+// CLmkMultiSelectorDialog::HandleListBoxEventL
+// ----------------------------------------------------
+//
+void CLmkMultiSelectorDialog::HandleListBoxEventL(
+    CEikListBox* /*aListBox*/,
+    TListBoxEvent aEventType )
+    {
+    switch( aEventType )
+        {
+        case EEventEnterKeyPressed:
+        case EEventItemDoubleClicked:
+            {
+	        // Do nothing -- offerkeyevent handles this
+            }
+            break;
+    #ifdef RD_SCALABLE_UI_V2
+        case EEventItemClicked:
+        	{
+        	UpdateMskL();
+        	break;
+        	}
+    #endif//RD_SCALABLE_UI_V2
+        default:
+            {
+            break;
+            }
+        };
+    }
+
+
+// ----------------------------------------------------
+// CLmkMultiSelectorDialog::SelectionListProcessCommandL
+// ----------------------------------------------------
+//
+void CLmkMultiSelectorDialog::SelectionListProcessCommandL( TInt aCommand )
+    {
+    AknSelectionService::HandleMarkableListProcessCommandL( aCommand,
+                                                            ListBox() );
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkMultiSelectorDialog::OfferKeyEventL
+// ?implementation_description
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+TKeyResponse CLmkMultiSelectorDialog::OfferKeyEventL(
+                                     const TKeyEvent& aKeyEvent,
+                                     TEventCode aType )
+	{
+	// Do not process navigation handling till UI gets from engine
+	if (!ListBox())
+		{
+		return EKeyWasConsumed;
+		}
+    if (aType == EEventKey &&
+        	(aKeyEvent.iCode == EKeyOK || aKeyEvent.iCode == EKeyEnter || aKeyEvent.iScanCode == EStdKeyEnter) )
+		{
+		ListBox()->View()->ToggleItemL(ListBox()->CurrentItemIndex());
+		return EKeyWasConsumed;
+		}
+	if (aKeyEvent.iRepeats == 0)
+        {
+        if (KeyEventForNavigationL(aKeyEvent, aType) == EKeyWasConsumed)
+            {
+            iIsToClearSelection = ETrue;
+            TryExitL(EAknSoftkeyOk);
+            return EKeyWasConsumed;
+            }
+        CAknSearchField* findBox = FindBox();
+        if	(findBox && !(findBox->IsVisible()))
+            {
+            return 	EKeyWasConsumed;
+            }
+        }
+
+	TKeyResponse keyResponce;
+	keyResponce = CAknSelectionListDialog::OfferKeyEventL(aKeyEvent, aType);
+	//CEikButtonGroupContainer &buttonContainer = *(CEikButtonGroupContainer::Current());//ButtonGroupContainer();
+	if(!iExited)
+		{
+		UpdateMskL();
+		}
+	return keyResponce;
+	}
+
+// ----------------------------------------------------
+// CLmkMultiSelectorDialog::PreLayoutDynInitL
+// ----------------------------------------------------
+//
+void CLmkMultiSelectorDialog::PreLayoutDynInitL()
+    {
+    CLmkSelectorDialog::PreLayoutDynInitL();
+    __ASSERT_DEBUG( iSelectionIndexArray, Panic( KLmkPanicNullMember ) );
+    ListBox()->SetSelectionIndexesL( iSelectionIndexArray );
+    }
+// ----------------------------------------------------
+// CLmkMultiSelectorDialog::PostLayoutDynInitL
+// ----------------------------------------------------
+
+void CLmkMultiSelectorDialog::PostLayoutDynInitL()
+	{
+	CLmkSelectorDialog::PostLayoutDynInitL();
+	UpdateMskL();
+
+	}
+// -----------------------------------------------------------------------------
+// CLmkMultiSelectorDialog::OkToExitL
+// ?implementation_description
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+TBool CLmkMultiSelectorDialog::OkToExitL( TInt aButtonId )
+    {
+    TBool b = CAknSelectionListDialog::OkToExitL( aButtonId );
+    if ( iSelectionIndexArray )
+	    {
+	    const CArrayFix<TInt>* array = ListBox()->SelectionIndexes();
+	    if ( FindBox() )
+	        {
+            CAknFilteredTextListBoxModel* model =
+	         static_cast<CAknFilteredTextListBoxModel*>( ListBox()->Model() );
+            model->Filter()->UpdateSelectionIndexesL();
+	        array = model->Filter()->SelectionIndexes();
+	        }
+	    TInt numberOfItems( array->Count() );
+	    iSelectionIndexArray->Reset();
+	    for ( TInt i( 0 ); i < numberOfItems; ++i )
+            {
+	        iSelectionIndexArray->AppendL( array->At( i ) );
+            }
+	    }
+    if(iIsToClearSelection && iSelectionIndexArray)
+        {
+        iSelectionIndexArray->Reset();
+        }
+    if ( b && iNavigationObserver )
+        {
+        iNavigationObserver->HandleClosingEventL();
+        }
+
+    iExited = b;
+    return b;
+    }
+
+// ----------------------------------------------------
+// CLmkMultiSelectorDialog::DynInitMenuPaneL
+// ----------------------------------------------------
+//
+void CLmkMultiSelectorDialog::DynInitMenuPaneL(
+    TInt aResourceId,
+    CEikMenuPane* aMenuPane )
+    {
+    AknSelectionService::HandleMarkableListDynInitMenuPane( aResourceId,
+                                                    aMenuPane, ListBox() );
+
+    if ( iMenuObserver )
+        {
+        iMenuObserver->DynInitDlgMenuPaneL( aResourceId, aMenuPane );
+        }
+
+    TInt visibleCount = ListBox()->Model()->NumberOfItems();
+
+    if ( aResourceId == iSendUiMenuPaneResourceId )
+        {
+        if ( iLmkSender )
+            {
+            // Send menu is handled by iLmkSender:
+            if ( FeatureManager::FeatureSupported( KFeatureIdLandmarksConverter ) )
+				{
+				aMenuPane->SetItemDimmed(ELmkCmdSendDummy, EFalse);
+				}
+			else
+				{
+				aMenuPane->SetItemDimmed(ELmkCmdSendDummy, ETrue);
+				}
+            }
+        }
+    else if ( aResourceId == R_SENDUI_MENU )
+        { // Dynamically created send ui menu
+        // Sender always exists if R_SENDUI_MENU exists:
+        __ASSERT_DEBUG( iLmkSender, Panic( KLmkPanicSenderNotExist ) );
+
+        if ( FeatureManager::FeatureSupported( KFeatureIdLandmarksConverter ) )
+	        {
+	        iLmkSender->DisplaySendCascadeMenuL( *aMenuPane );
+	        }
+        }
+
+    CAknSelectionListDialog::DynInitMenuPaneL( aResourceId, aMenuPane );
+    }
+
+
+// ----------------------------------------------------
+// CLmkMultiSelectorDialog::UpdateMskL
+// ----------------------------------------------------
+//
+ void CLmkMultiSelectorDialog::UpdateMskL()
+	 {
+
+ 	CEikButtonGroupContainer* cba = CEikButtonGroupContainer::Current();
+ 	HBufC* mskTxt = NULL;
+ 	if (ListBox()->Model()->NumberOfItems() > 0)
+ 		{
+ 		cba->MakeCommandVisibleByPosition(CEikButtonGroupContainer::EMiddleSoftkeyPosition,ETrue);
+ 		cba->MakeCommandVisible(EAknSoftkeyDone, ETrue);
+		cba->MakeCommandVisible(EAknSoftkeyOk, ETrue);
+ 		if(IsCurrentItemMarked())
+			{
+			mskTxt = StringLoader::LoadLC( R_LM_MSK_UNMARK, iEikonEnv );
+			cba->AddCommandToStackL(KMskCommandPos,EAknSoftkeyUnmark,mskTxt->Des());
+			CleanupStack::PopAndDestroy(mskTxt);
+
+			}
+		else
+			{
+			mskTxt = StringLoader::LoadLC( R_LM_MSK_MARK, iEikonEnv );
+			cba->AddCommandToStackL(KMskCommandPos,EAknSoftkeyMark,mskTxt->Des());
+			CleanupStack::PopAndDestroy(mskTxt);
+			}
+ 		}
+ 	else
+ 		{
+ 		cba->MakeCommandVisible(EAknSoftkeyDone, EFalse);
+		cba->MakeCommandVisible(EAknSoftkeyOk, EFalse);
+ 		cba->MakeCommandVisibleByPosition(CEikButtonGroupContainer::EMiddleSoftkeyPosition,EFalse);
+ 		}
+ 	 cba->DrawDeferred();
+	 }
+
+
+// ----------------------------------------------------
+// CLmkMultiSelectorDialog::IsCurrentItemMarked
+// ----------------------------------------------------
+//
+TBool CLmkMultiSelectorDialog::IsCurrentItemMarked()
+	{
+	TBool ret(EFalse);
+	TInt itemIndex = ListBox()->View()->CurrentItemIndex();
+	if (itemIndex != KErrNotFound)
+		{
+		 ret = ListBox()->View()->ItemIsSelected(itemIndex);
+		}
+	return ret;
+	}
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/uicontrols/src/CLmkPackageEditorImpl.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,450 @@
+/*
+ * Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:     LandmarksUi Package viewer implementation 
+ *                  For Received Landmark
+ *
+ */
+
+// INCLUDE FILES
+#include <featmgr.h>
+#include <aknnotewrappers.h>
+#include <AknWaitDialog.h>
+#include <aknlists.h>
+#include <StringLoader.h>
+#include <AknQueryDialog.h>
+#include <lmkui.rsg>
+#include <eikmenup.h>
+#include <hlplch.h>
+#include <sendnorm.rsg> // R_SENDUI_MENU
+#include <CLmkEditorDlg.h> // from system include!
+#include "CLmkParser.h"
+#include "landmarks.hrh"
+#include "LmkUID.h"
+#include <csxhelp/lmmes.hlp.hrh>
+#include "CLmkUiUtils.h"
+#include "CLmkEditorFieldArray.h"
+#include "MLmkEditorField.h"
+#include "LmkNotes.h"
+#include "LmkConsts.h"
+#include "CLmkDbUtils.h"
+#include "CLmkLocationService.h"
+#include "CLmkDlgCategorySelectorImpl.h"
+#include "CLmkSender.h"
+#include "CLmkLandMarkCategoriesName.h"
+#include "CLmkPackageEditorImpl.h"
+#include "CLmkSaveLandmarkUtils.h"
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CLmkPackageEditorImpl::CLmkPackageEditorImpl
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+CLmkPackageEditorImpl::CLmkPackageEditorImpl(CPosLandmarkDatabase& aDb,
+        CLmkParser& aParser, CLmkSender& aSender, TInt aItemIndex) :
+    CLmkEditorImpl(aDb, aSender, CLmkEditorDlg::ELmkViewer), // viewing only mode!
+            iParser(aParser), iItemIndex(aItemIndex)
+    {
+    TCoeHelpContext
+            help(TUid::Uid(KLmkMsgViewerAppUID3), KLM_HLP_RECEIVED_LM);
+    SetHelpContext(help);
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkPackageEditorImpl::ConstructL
+// Symbian 2nd phase constructor can leave.
+// -----------------------------------------------------------------------------
+//
+void CLmkPackageEditorImpl::ConstructL()
+    {
+    iLandmark = iParser.LandmarkLC(iItemIndex);
+    iCategoryNameArray = iParser.CategoryNameLC(iItemIndex);
+    iCategoryNameArray->GetCategoryNames(iCategoryNames);
+    iCalegorySelectionFlag = ETrue;
+    CleanupStack::Pop(2); //iLandmark ,iCategoryNames
+    TLmkEditorAttributes arguments(CLmkEditorDlg::ELmkAll);
+    iIsLmkReceiveMode = ETrue;
+    CLmkEditorImpl::ConstructL(iLandmark, arguments);
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkPackageEditorImpl::NewL
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CLmkPackageEditorImpl* CLmkPackageEditorImpl::NewL(
+        CPosLandmarkDatabase& aDb, CLmkParser& aParser, CLmkSender& aSender,
+        TInt aItemIndex)
+    {
+    CLmkPackageEditorImpl* self = new (ELeave) CLmkPackageEditorImpl(aDb,
+            aParser, aSender, aItemIndex);
+
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    CleanupStack::Pop(); //self
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkPackageEditorImpl::~CLmkPackageEditorImpl()
+// -----------------------------------------------------------------------------
+//
+CLmkPackageEditorImpl::~CLmkPackageEditorImpl()
+    {
+    if (iWaitNote)
+        {
+        TRAPD(err, iWaitNote->ProcessFinishedL());
+        if (err != KErrNone)
+            {
+            delete iWaitNote;
+            iWaitNote = NULL;
+            }
+        }
+    delete iLandmark;
+    delete iCategoryNameArray;
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkPackageEditorImpl::HandleOperationL
+// -----------------------------------------------------------------------------
+//
+void CLmkPackageEditorImpl::HandleOperationL(TOperationTypes aType,
+        TReal32 /*aProgress*/, TInt aStatus)
+    {
+    if (aType == EImport)
+        {
+        if (aStatus != KPosLmOperationNotComplete && iWaitNote)
+            {
+            iWaitNote->ProcessFinishedL();
+            iWaitNote = NULL;
+            }
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkPackageEditorImpl::DynInitMenuPaneL
+// -----------------------------------------------------------------------------
+//
+void CLmkPackageEditorImpl::DynInitMenuPaneL(TInt aResourceId,
+        CEikMenuPane* aMenuPane)
+    {
+    switch (aResourceId)
+        {
+        case R_AVKON_FORM_MENUPANE:
+            {
+            CAknForm::DynInitMenuPaneL(aResourceId, aMenuPane);
+            TBool hideMN = EFalse;
+            if (iIsHideCoordinate)
+                {
+                if (IsLandmarkDataEmptyL(iLandmark))
+                    {
+                    hideMN = ETrue;
+                    }
+                }
+            else if (ArePositionFieldEmptyL())
+                {
+                hideMN = ETrue;
+                }
+
+            if (hideMN)
+                {
+                // delete the show on map & Navigate To options
+                aMenuPane->DeleteMenuItem(ELmkShowOnMapPlaceHolder);
+                aMenuPane->DeleteMenuItem(ELmkNavigateToPlaceHolder);
+                }
+            iMapNavInterface->AttachMenuPaneL(aMenuPane, R_LMK_EDITOR_MENU,
+                    ELmkCmdMnNav);
+
+            // Send menu is handled by the sender:
+            if ( FeatureManager::FeatureSupported( KFeatureIdLandmarksConverter ) )
+                {
+                aMenuPane->SetItemDimmed(ELmkCmdSendDummy, EFalse);
+
+                // Use default "Send" item text from SendUI
+                iSender.DisplaySendMenuL(*aMenuPane, 1);
+                }
+            else
+                {
+                aMenuPane->SetItemDimmed(ELmkCmdSendDummy, ETrue);
+                }
+
+            if (FeatureManager::FeatureSupported(KFeatureIdHelp)
+                    && !iIsHideHelp)
+                {
+                aMenuPane->SetItemDimmed(EAknCmdHelp, EFalse);
+                }
+            else
+                {
+                aMenuPane->SetItemDimmed(EAknCmdHelp, ETrue);
+                }
+
+            //shown in package editor mode:
+            aMenuPane->SetItemDimmed(ELmkCmdSaveLm, EFalse);
+            DimmMenuItemsL(aMenuPane);
+            //always dimmed
+            aMenuPane->SetItemDimmed(EAknFormCmdEdit, ETrue);
+            aMenuPane->SetItemDimmed(EAknFormCmdSave, ETrue);
+            aMenuPane->SetItemDimmed(EAknFormCmdLabel, ETrue);
+            aMenuPane->SetItemDimmed(EAknFormCmdAdd, ETrue);
+            aMenuPane->SetItemDimmed(EAknFormCmdDelete, ETrue);
+            break;
+            }
+        case R_SENDUI_MENU: // Dynamically created send ui menu
+            {
+            if (FeatureManager::FeatureSupported(KFeatureIdLandmarksConverter))
+                {
+                iSender.DisplaySendCascadeMenuL(*aMenuPane);
+                }
+            break;
+            }
+        case R_LMK_EDITOR_MENU:
+            {
+            TBool hideMN = EFalse;
+            if (iIsHideCoordinate)
+                {
+                if (IsLandmarkDataEmptyL(iLandmark))
+                    {
+                    hideMN = ETrue;
+                    }
+                }
+            else if (ArePositionFieldEmptyL())
+                {
+                hideMN = ETrue;
+                }
+
+            if (hideMN)
+                {
+                // delete the show on map & Navigate To options
+                aMenuPane->DeleteMenuItem(ELmkShowOnMapPlaceHolder);
+                aMenuPane->DeleteMenuItem(ELmkNavigateToPlaceHolder);
+                }
+            iMapNavInterface->AttachMenuPaneL(aMenuPane, R_LMK_EDITOR_MENU,
+                    ELmkCmdMnNav);
+
+            // Send menu is handled by the sender:
+            if (FeatureManager::FeatureSupported(KFeatureIdLandmarksConverter))
+                {
+                aMenuPane->SetItemDimmed(ELmkCmdSendDummy, EFalse);
+
+                // Use default "Send" item text from SendUI
+                iSender.DisplaySendMenuL(*aMenuPane, 1);
+                }
+            DimmMenuItemsL(aMenuPane);
+            break;
+            }
+        default:
+            {
+            break;
+            }
+        }
+    iMapNavInterface->HandleMenuOperationL(aResourceId, aMenuPane,
+            ELmkCmdMnNav);
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkPackageEditorImpl::ProcessCommandL
+// -----------------------------------------------------------------------------
+//
+void CLmkPackageEditorImpl::ProcessCommandL(TInt aCommandId)
+    {
+    CAknDialog::ProcessCommandL(aCommandId);
+    iContextMenuBar->StopDisplayingMenuBar();
+    // Override just a couple of CLmkEditorImpl implementations:
+    switch (aCommandId)
+        {
+        case ELmkCmdSaveLm:
+            {
+            SaveLandmarkCmdL();
+            break;
+            }
+            // fall through all send cmds:
+        case ELmkCmdSendVia1:
+        case ELmkCmdSendVia2:
+        case ELmkCmdSendVia3:
+        case ELmkCmdSendVia4:
+        case ELmkCmdSendVia5:
+        case ELmkCmdSendVia6:
+        case ELmkCmdSendVia7:
+        case ELmkCmdSendVia8:
+        case ELmkCmdSendVia9:
+        case ELmkCmdSendVia10:
+        case ELmkCmdSend:
+            {
+            SendLandmarkCmdL(aCommandId);
+            break;
+            }
+        case EAknSoftkeyContextOptions:
+            {
+            iContextMenuBar->SetContextMenuTitleResourceId(
+                    R_LMK_MSGVIEWER_CONTEXT_MENUBAR);            
+            iContextMenuBar->TryDisplayContextMenuBarL();
+            break;
+            }
+        default:
+            {
+            CLmkEditorImpl::ProcessCommandL(aCommandId);
+            break;
+            }
+        }
+    }
+
+// ----------------------------------------------------
+// CLmkPackageEditorImpl::SaveLandmarkCmdL
+// ----------------------------------------------------
+//
+void CLmkPackageEditorImpl::SaveLandmarkCmdL()
+    {
+    // Only one item is stored but API requires an array:
+    RArray<TUint> importIndexes(1);
+    CleanupClosePushL(importIndexes);
+    User::LeaveIfError(importIndexes.Append(iItemIndex));
+    CLmkSaveLandmarkUtils* saveLmUtils = CLmkSaveLandmarkUtils::NewL(iDb,
+            iParser);
+    CleanupStack::PushL(saveLmUtils);
+    RArray<TCategoryName> newCategories;
+    CleanupClosePushL(newCategories);
+    TCategoryName newCategoryFound;
+    TInt noOfNewCategories = saveLmUtils->CheckForNewCategoriesL(
+            importIndexes, newCategoryFound, newCategories);
+
+    if (saveLmUtils->CategoryAddConfirmationQueryL(noOfNewCategories,
+            newCategoryFound))
+        {
+        iParser.StartImportingL(importIndexes, ETrue);// Save landmarks with new categories
+        }
+    else
+        {
+        iParser.StartImportingL(importIndexes, EFalse); //Save landmarks without new categories
+        }
+    CleanupStack::PopAndDestroy(); // newCategories
+    // wait note
+    iWaitNote = new (ELeave) CAknWaitDialog(NULL, ETrue);
+    if (!iWaitNote->ExecuteLD(R_LMK_IMPORTING_WAIT_NOTE))
+        {
+        //making iWaitNote null, since framework destroys waitnote
+        //dialog on pressing cancel.
+        iWaitNote = NULL;
+        iParser.CancelImporting();
+        CleanupStack::PopAndDestroy(2);// saveLmUtils, importIndexes
+        return;
+        }
+    // Saved confirmation note
+    saveLmUtils->LmsSavedConfirmationNoteL(importIndexes, iItemIndex);
+    CleanupStack::PopAndDestroy(2);// saveLmUtils, importIndexes
+    }
+
+// ----------------------------------------------------
+// CLmkPackageEditorImpl::SendLandmarkCmdL
+// ----------------------------------------------------
+//
+void CLmkPackageEditorImpl::SendLandmarkCmdL(TInt aCommandId)
+    {
+    CLmkLandmark* lmk = iParser.LmkLandmarkLC(iItemIndex);
+    iSender.SendSingleLandmarkL(aCommandId, *lmk);
+    CleanupStack::PopAndDestroy();//lmk
+    }
+
+// ----------------------------------------------------
+// CLmkPackageEditorImpl::UpdateMskOnArrowMoveForViewerL
+// ----------------------------------------------------
+//
+void CLmkPackageEditorImpl::UpdateMskOnArrowMoveForViewerL()
+    {
+    MLmkEditorField* field = iEditorFieldArray->Find(IdOfFocusControl());
+    TUint type = field->LandmarkItemField().FieldType();
+    switch (type)
+        {
+        case ECategories:
+            {
+            CEikButtonGroupContainer* cba =
+                    CEikButtonGroupContainer::Current();
+            cba->RemoveCommandFromStack(KMskCommandPos,
+                    EAknSoftkeyContextOptions);
+            AddMskCommandL(R_LM_MSK_SHOW, ELmkCmdShow);
+            break;
+            }
+        default:
+            {
+            EnableMskMenuL();
+            break;
+            }
+        }
+    }
+
+// ----------------------------------------------------
+// CLmkPackageEditorImpl::EnableMskMenuL
+// ----------------------------------------------------
+//
+void CLmkPackageEditorImpl::EnableMskMenuL()
+    {
+    CEikButtonGroupContainer* cba = CEikButtonGroupContainer::Current();
+    cba->RemoveCommandFromStack(KMskCommandPos, ELmkCmdShow);
+    cba->SetCommandSetL(
+            R_LMK_RECEIVED_VIEWER_SOFTKEYS_OPTIONS_BACK_CONTEXTOPTIONS);
+    cba->MakeCommandVisible(EAknSoftkeyContextOptions, ETrue);
+    iContextMenuBar->SetContextMenuTitleResourceId(
+            R_LMK_MSGVIEWER_CONTEXT_MENUBAR);
+    }
+
+// ----------------------------------------------------
+// CLmkPackageEditorImpl::PostLayoutDynInitL
+// ----------------------------------------------------
+//
+void CLmkPackageEditorImpl::PostLayoutDynInitL()
+    {
+    CLmkEditorImpl::PostLayoutDynInitL();
+    CEikButtonGroupContainer* cba = CEikButtonGroupContainer::Current();
+    EnableMskMenuL();
+    }
+
+// ----------------------------------------------------
+// CLmkPackageEditorImpl::DimmMenuItems
+// ----------------------------------------------------
+//
+void CLmkPackageEditorImpl::DimmMenuItemsL(CEikMenuPane* aMenuPane)
+    {
+    //not shown in package editor mode:
+    aMenuPane->SetItemDimmed(ELmkCmdCategories, ETrue);
+    aMenuPane->SetItemDimmed(ELmkCmdDeleteLm, ETrue);
+    aMenuPane->SetItemDimmed(ELmkCmdSelectCategories, ETrue);
+    aMenuPane->SetItemDimmed(ELmkCmdCurrentLocation, ETrue);
+    aMenuPane->SetItemDimmed(ELmkCmdChangeIcon, ETrue);
+    aMenuPane->SetItemDimmed(ELmkCmdEditTextLm, ETrue);
+    //additional commands always dimmed in this class:
+    aMenuPane->SetItemDimmed(ELmkCmdEditLm, ETrue);
+    aMenuPane->SetItemDimmed(ELmkCmdCall, ETrue);
+    aMenuPane->SetItemDimmed(ELmkCmdGoToUrl, ETrue);
+    aMenuPane->SetItemDimmed(ELmkCmdClearPosInfo, ETrue);
+    }
+
+#ifdef RD_SCALABLE_UI_V2
+// -----------------------------------------------------------------------------
+// CLmkPackageEditorImpl::HandleDialogPageEventL
+// -----------------------------------------------------------------------------
+//
+void CLmkPackageEditorImpl::HandleDialogPageEventL(TInt aEventID)
+    {
+    CAknForm::HandleDialogPageEventL(aEventID);
+    if (aEventID == MEikDialogPageObserver::EDialogPageTapped)
+        {
+        iContextMenuBar->SetContextMenuTitleResourceId(
+                R_LMK_MSGVIEWER_CONTEXT_MENUBAR);    
+        iContextMenuBar->TryDisplayContextMenuBarL();        
+        }
+    }
+#endif//RD_SCALABLE_UI_V2
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/uicontrols/src/CLmkPkgFindNewCatOp.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,129 @@
+/*
+* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:   This class provides functionality of searching new categories
+*                in a landmark package received asynchronously.
+*
+*/
+
+
+
+
+
+
+
+// INCLUDE FILES
+#include "CLmkPkgFindNewCatOp.h"
+#include "CLmkAOOperation.h"
+#include <EPos_CPosLmCategoryManager.h>
+#include <EPos_CPosLmOperation.h>
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CLmkPkgFindNewCatOp::CLmkPkgFindNewCatOp
+// C++ constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+CLmkPkgFindNewCatOp::CLmkPkgFindNewCatOp(
+                                        TInt& aNoOfNewCategories,
+                                        RArray<TCategoryName>& aNewCategories,
+                                        TCategoryName& aNewCategoryFound,
+                                        CLmkSaveLandmarkUtils*aSaveLmUtils )
+                                        :iSaveLmUtils(aSaveLmUtils),
+                                         iIsFirstStep(ETrue),
+                                         iNewCategoryFound(aNewCategoryFound),
+                                         iNewCategories(aNewCategories),
+                                         iNoOfNewCategories(aNoOfNewCategories)
+
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkPkgFindNewCatOp::ConstructL
+// Symbian 2nd phase constructor can leave.
+// -----------------------------------------------------------------------------
+//
+void CLmkPkgFindNewCatOp::ConstructL()
+    {
+    }
+
+
+// -----------------------------------------------------------------------------
+// CLmkPkgFindNewCatOp::NewL
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+CLmkPkgFindNewCatOp* CLmkPkgFindNewCatOp::NewL(
+                                        TInt& aNoOfNewCategories,
+                                        RArray<TCategoryName>& aNewCategories,
+                                        TCategoryName& aNewCategoryFound,
+                                        CLmkSaveLandmarkUtils*aSaveLmUtils)
+    {
+    CLmkPkgFindNewCatOp* self =
+        new ( ELeave ) CLmkPkgFindNewCatOp(aNoOfNewCategories,
+                                           aNewCategories,
+                                           aNewCategoryFound,
+                                           aSaveLmUtils);
+
+    CleanupStack::PushL( self );
+    self->ConstructL( );
+    CleanupStack::Pop();
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkPkgFindNewCatOp::~CLmkPkgFindNewCatOp
+// -----------------------------------------------------------------------------
+//
+CLmkPkgFindNewCatOp::~CLmkPkgFindNewCatOp()
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkPkgFindNewCatOp::NextStep
+// -----------------------------------------------------------------------------
+//
+void CLmkPkgFindNewCatOp::NextStep( TRequestStatus& aStatus,
+                                    TReal32& aProgress )
+    {
+    aStatus = KRequestPending;
+    iStatus = &aStatus;
+    iProgress = &aProgress;
+    TInt err( KErrNone );
+
+    if (iIsFirstStep)
+        {
+        iIsFirstStep = EFalse;
+        *iProgress = 1;
+        err = KPosLmOperationNotComplete;
+        }
+    else
+        {
+        TRAP(err,iNoOfNewCategories = iSaveLmUtils->CheckForNewCategories2L(iNewCategoryFound,iNewCategories));
+        }
+        User::RequestComplete( iStatus,err);
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkPkgFindNewCatOp::ExecuteL
+// -----------------------------------------------------------------------------
+//
+void CLmkPkgFindNewCatOp::ExecuteL()
+    {
+    // We never use asynchronous methods in synchronous way and therefore
+    // don't need to support this method
+    User::Leave( KErrNotSupported );
+    }
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/uicontrols/src/CLmkSaveLandmarkUtils.cpp	Wed Sep 01 12:31:27 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:   This file contains methods for aiding the process of saving
+*              : landmarks which are received via messaging
+*
+*/
+
+
+
+
+
+
+
+// INCLUDE FILES
+#include <e32std.h>
+#include <eikenv.h>
+#include <StringLoader.h>
+#include <AknQueryDialog.h>
+#include <AknWaitDialog.h>
+#include <aknnotewrappers.h>
+#include <EPos_CPosLmCategoryManager.h>
+#include <lmkui.rsg>
+#include "CLmkParser.h"
+#include "CLmkLandMarkCategoriesName.h"
+#include "CLmkSaveLandmarkUtils.h"
+#include "CLmkPkgFindNewCatOp.h"
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CLmkSaveLandmarkUtils::CLmkSaveLandmarkUtils
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+CLmkSaveLandmarkUtils::CLmkSaveLandmarkUtils(
+    CPosLandmarkDatabase& aDb,
+    CLmkParser& aParser)
+    : iDb( aDb ),
+      iParser( aParser )
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkSaveLandmarkUtils::ConstructL
+// Symbian 2nd phase constructor can leave.
+// -----------------------------------------------------------------------------
+//
+void CLmkSaveLandmarkUtils::ConstructL()
+    {
+    iEnv = CEikonEnv::Static();
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkSaveLandmarkUtils::NewL
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CLmkSaveLandmarkUtils* CLmkSaveLandmarkUtils::NewL(
+    CPosLandmarkDatabase& aDb,
+    CLmkParser& aParser)
+    {
+    CLmkSaveLandmarkUtils* self =
+        new( ELeave )CLmkSaveLandmarkUtils( aDb, aParser );
+
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop();
+    return self;
+    }
+
+// ----------------------------------------------------
+// CLmkSaveLandmarkUtils::~CLmkSaveLandmarkUtils
+// ----------------------------------------------------
+//
+CLmkSaveLandmarkUtils::~CLmkSaveLandmarkUtils()
+    {
+    CancelSearchNewCat();
+    }
+
+// ----------------------------------------------------
+// CLmkSaveLandmarkUtils::~CheckForNewCategoriesL
+// ----------------------------------------------------
+//
+TInt CLmkSaveLandmarkUtils::CheckForNewCategoriesL(RArray<TUint> & aSelectedIndices,
+                                                   TDes& aNewFoundCategory,
+                                                   RArray<TCategoryName>& aNewcategories)
+	{
+	TInt TotalCount = aSelectedIndices.Count();
+	RArray<TCategoryName> categories;
+	CleanupClosePushL(categories);
+
+	for(TInt cnt = 0; cnt < TotalCount; cnt++ )
+		{
+		CLmkLandMarkCategoriesName* categoryNames = iParser.CategoryNameLC(aSelectedIndices[cnt]);
+		categories.Reset();
+		categoryNames->GetCategoryNames(categories);
+		TInt totCategories = categories.Count();
+		for(TInt catCount = 0; catCount < totCategories; catCount++ )
+			{
+			CheckCategoryInDatabaseL(aNewcategories,categories[catCount]);
+			}
+
+		CleanupStack::PopAndDestroy(); //categoryNames
+		}
+
+	TInt newCategoriesFound = aNewcategories.Count();
+	if ( newCategoriesFound == 1 )
+		{
+		aNewFoundCategory.Copy(aNewcategories[0]);
+		}
+	CleanupStack::PopAndDestroy(); // categories
+	return newCategoriesFound;
+	}
+
+// ----------------------------------------------------
+// CLmkSaveLandmarkUtils::CheckCategoryInDatabase
+// This routine check wheather category associated with landmark is already exist in database or not.
+// ----------------------------------------------------
+void CLmkSaveLandmarkUtils::CheckCategoryInDatabaseL(RArray<TCategoryName>& aNewcategories,const TDesC& aCategoryTobeAdded)
+	{
+	TInt Total = aNewcategories.Count();
+	for(TInt cnt = 0; cnt < Total; cnt++ )
+		{
+		if (aNewcategories[cnt] == aCategoryTobeAdded)
+		return;
+		}
+
+	CPosLmCategoryManager* categoryManager = CPosLmCategoryManager::NewL( iDb );
+	CleanupStack::PushL( categoryManager );
+
+	if ( categoryManager->GetCategoryL(aCategoryTobeAdded) ==  KPosLmNullItemId)
+		{
+		aNewcategories.Append(aCategoryTobeAdded);
+		}
+	CleanupStack::PopAndDestroy(); //categoryManager
+	}
+
+// ----------------------------------------------------
+// CLmkSaveLandmarkUtils::CategoryAddConfirmationQueryL
+// This routine ask confirmation about adding landmark , with OR without category
+// ----------------------------------------------------
+TInt CLmkSaveLandmarkUtils::CategoryAddConfirmationQueryL( TInt aAmount,const TDesC& aNewCategoryName )
+	{
+	HBufC* noteText = NULL;
+
+	if ( aAmount > 1)
+		{
+		noteText = StringLoader::LoadLC( R_LMK_ADD_CATEGORIES,aAmount, iEnv );
+		}
+	else if ( aAmount == 1)
+		{
+		noteText = StringLoader::LoadLC( R_LMK_ADD_CATEGORY,aNewCategoryName, iEnv );
+		}
+	else
+		{
+		return 1;
+		}
+
+	CAknQueryDialog* query =
+	new( ELeave ) CAknQueryDialog( *noteText );
+	TInt ret = query->ExecuteLD( R_LMK_QUERY );	// noteText
+
+	CleanupStack::PopAndDestroy(noteText); //noteText
+	return ret;
+	}
+
+// ----------------------------------------------------
+// CLmkSaveLandmarkUtils::LmsSavedConfirmationNoteL
+// This method takes care of importing the selected Landmarks
+// ----------------------------------------------------
+void CLmkSaveLandmarkUtils::LmsSavedConfirmationNoteL(RArray<TUint> & aImportIndexes,
+                                           			  TInt aEditedItemIndex)
+
+   	{
+	HBufC* noteText = NULL;
+
+    // Display Landmark numbers in the Note
+	CPosLandmark* landmark = iParser.LandmarkLC(aEditedItemIndex);
+	TPtrC lmName;
+	User::LeaveIfError(landmark->GetLandmarkName(lmName));
+	TUint lmCount = aImportIndexes.Count();
+
+	if (lmCount > 1)
+		{
+		noteText = StringLoader::LoadLC( R_LMK_NOTE_LMS_SAVED,lmCount, iEnv );
+		}
+	else if (lmCount == 1)
+		{
+		noteText = StringLoader::LoadLC( R_LMK_NOTE_LANDMARK_SAVED, lmName, iEnv );
+		}
+	else
+		{
+		return;
+		}
+
+	CAknConfirmationNote* note = new (ELeave) CAknConfirmationNote( ETrue );
+	TInt retVal = note->ExecuteLD( *noteText );
+	CleanupStack::PopAndDestroy(2);//  noteText
+	}
+
+// ----------------------------------------------------
+// CLmkSaveLandmarkUtils::CheckForNewCategories2L
+// ----------------------------------------------------
+//
+TInt CLmkSaveLandmarkUtils::CheckForNewCategories2L(
+                                     TDes& aNewFoundCategory,
+                                     RArray<TCategoryName>& aNewcategories)
+	{
+	TInt TotalCount = iParser.NumOfParsedLandmarks();
+	RArray<TCategoryName> categories;
+	CleanupClosePushL(categories);
+
+	for(TInt cnt = 0; cnt < TotalCount; cnt++ )
+		{
+		CLmkLandMarkCategoriesName* categoryNames = iParser.CategoryNameLC(cnt);
+		categories.Reset();
+		categoryNames->GetCategoryNames(categories);
+		TInt totCategories = categories.Count();
+		for(TInt catCount = 0; catCount < totCategories; catCount++ )
+			{
+			CheckCategoryInDatabaseL(aNewcategories,categories[catCount]);
+			}
+
+		CleanupStack::PopAndDestroy(); //categoryNames
+		}
+
+	TInt newCategoriesFound = aNewcategories.Count();
+	if ( newCategoriesFound == 1 )
+		{
+		aNewFoundCategory.Copy(aNewcategories[0]);
+		}
+	CleanupStack::PopAndDestroy(); // categories
+	return newCategoriesFound;
+	}
+
+// ----------------------------------------------------
+// CLmkSaveLandmarkUtils::StartSearchNewCatL
+// ----------------------------------------------------
+//
+void CLmkSaveLandmarkUtils::StartSearchNewCatL(
+                            TInt& aNoOfNewCategories,
+                            RArray<TCategoryName>& aNewCategories,
+                            TCategoryName& aNewCategoryFound)
+	{
+	CPosLmOperation* operation = CLmkPkgFindNewCatOp::NewL
+	                                (aNoOfNewCategories,
+	                                 aNewCategories,
+	                                 aNewCategoryFound,
+	                                 this);
+    CleanupStack::PushL( operation );
+	iAOOperation =
+	CLmkAOOperation::NewL( operation,
+	               *this,
+	               ENewPkgCategory,
+	               ETrue );
+	CleanupStack::Pop( operation ); // ownership transferred
+
+	iAOOperation->StartOperation();
+	}
+// ----------------------------------------------------
+// CLmkSaveLandmarkUtils::CancelSearchNewCat
+// ----------------------------------------------------
+//
+void CLmkSaveLandmarkUtils::CancelSearchNewCat()
+	{
+	if (iAOOperation)
+    	{
+    	delete iAOOperation;
+        iAOOperation = NULL;
+    	}
+	}
+// ----------------------------------------------------
+// CLmkSaveLandmarkUtils::HandleOperationL
+// ----------------------------------------------------
+//
+void CLmkSaveLandmarkUtils::HandleOperationL(
+                                       TOperationTypes aType,
+                                       TReal32 aProgress,
+                                       TInt aStatus )
+    {
+    if ( iObserver )
+        {
+        iObserver->HandleOperationL(aType,aProgress,aStatus);
+        }
+    }
+// ----------------------------------------------------
+// CLmkSaveLandmarkUtils::SetObserver
+// ----------------------------------------------------
+//
+void CLmkSaveLandmarkUtils::SetObserver(MLmkAOOperationObserver* aObserver)
+    {
+    iObserver = aObserver;
+    }
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/uicontrols/src/CLmkSelectorCache.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,188 @@
+/*
+* 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:    LandmarksUi Content File -
+*
+*/
+
+
+
+
+
+
+
+
+// INCLUDE FILES
+#include "CLmkSelectorCache.h"
+#include "CLmkUiItemBase.h"
+#include "CLmkListProviderBase.h"
+#include <lmkerrors.h>
+
+
+// CONSTANTS
+/// Unnamed namespace for local definitions
+namespace {
+
+const TInt KMaxCacheArraySize( 10 );
+#if defined(_DEBUG)
+_LIT( KPanicMsg, "CLmkSelectorCache" );
+
+void Panic( TPanicCode aReason )
+    {
+    User::Panic( KPanicMsg, aReason );
+    }
+#endif
+}  // namespace
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CLmkSelectorCache::CLmkSelectorCache
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+CLmkSelectorCache::CLmkSelectorCache( CLmkListProviderBase& aListProvider )
+    : iListProvider( aListProvider )
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkSelectorCache::ConstructL
+// Symbian 2nd phase constructor can leave.
+// -----------------------------------------------------------------------------
+//
+void CLmkSelectorCache::ConstructL()
+    {
+    iListProvider.AddObserverL( *this );
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkSelectorCache::NewL
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+CLmkSelectorCache* CLmkSelectorCache::NewL(
+    CLmkListProviderBase& aListProvider )
+    {
+    CLmkSelectorCache* self = new( ELeave ) CLmkSelectorCache( aListProvider );
+
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop();
+
+    return self;
+    }
+
+// ----------------------------------------------------
+// CLmkSelectorCache::~CLmkSelectorCache
+// ----------------------------------------------------
+//
+CLmkSelectorCache::~CLmkSelectorCache()
+    {
+    iListProvider.RemoveObserver(*this);
+    iItemList.ResetAndDestroy();
+    iItemList.Close();
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkSelectorCache::ItemAtL
+// Cache takes the ownership of item, therefore it receives a pointer,
+// but passes a reference to the lb model
+// -----------------------------------------------------------------------------
+//
+CLmkUiItemBase& CLmkSelectorCache::ItemAtL( TInt aIndex )
+    {
+    __ASSERT_DEBUG( aIndex >= 0, Panic( KLmkPanicInvalidIndex ) );
+    TInt count = iItemList.Count();
+    for ( TInt i( 0 ); i < count; ++i )
+        {
+        if ( aIndex == iItemList[i]->iIndex )
+            {
+            CLinkedItem* tmp = iItemList[i];
+            CleanupStack::PushL( tmp );
+            iItemList.Remove( i );
+            User::LeaveIfError( iItemList.Insert( tmp, 0 ) );
+            CleanupStack::Pop( tmp );
+            return *(iItemList[0]->iPtr);
+            }
+        }
+    __ASSERT_DEBUG( iListProvider.ItemCount() > aIndex ,
+                                Panic(KLmkPanicInvalidIndex) );
+    CLinkedItem* tmp = new(ELeave) CLinkedItem();
+    CleanupStack::PushL( tmp );
+    tmp->iIndex = aIndex;
+    tmp->iPtr = iListProvider.ItemAtL( aIndex );
+    User::LeaveIfError( iItemList.Insert( tmp, 0 ) );
+    CleanupStack::Pop(); // tmp
+
+    if ( iItemList.Count() > KMaxCacheArraySize )
+        {
+        delete iItemList[KMaxCacheArraySize];
+        iItemList.Remove( KMaxCacheArraySize );
+        }
+    return *( iItemList[0]->iPtr );
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkSelectorCache::ItemCount
+// ?implementation_description
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+TInt CLmkSelectorCache::ItemCount() const
+    {
+    // dummy implementation:
+    return iListProvider.ItemCount();
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkSelectorCache::HandleListProviderEventL
+// ?implementation_description
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+void CLmkSelectorCache::HandleListProviderEvent(
+    TLmkListProviderEventType /*aEvent*/ )
+    {
+    iItemList.ResetAndDestroy();
+    }
+
+// ----------------------------------------------------
+// CLmkSelectorCache::HandleListProviderError
+// ----------------------------------------------------
+//
+void CLmkSelectorCache::HandleListProviderError( TInt /*aError*/ )
+    {
+    iItemList.ResetAndDestroy();
+    }
+
+// ----------------------------------------------------
+// CLmkSelectorCache::CLinkedItem
+// ----------------------------------------------------
+//
+CLmkSelectorCache::CLinkedItem::CLinkedItem()
+    {
+    }
+
+// ----------------------------------------------------
+// CLmkSelectorCache::~CLinkedItem
+// ----------------------------------------------------
+//
+CLmkSelectorCache::CLinkedItem::~CLinkedItem()
+    {
+    delete this->iPtr;
+    }
+
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/uicontrols/src/CLmkSelectorDialog.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,619 @@
+/*
+ * Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:    LandmarksUi Content File -
+ *
+ */
+// INCLUDE FILES
+#include <StringLoader.h>
+#include <lmkui.rsg>
+#include <aknsfld.h>
+#include <aknlists.h>
+#include "CLmkSelectorDialog.h"
+#include "MLmkNavigationObserver.h"
+#include "CLmkLmItemListMemento.h"
+#include "LmkConsts.h"
+#include "CLmkListProviderBase.h"
+#include <landmarks.rsg>
+#include <eikclbd.h>
+
+_LIT(KWildCard, "*");
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CLmkSelectorDialog::CLmkSelectorDialog
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+CLmkSelectorDialog::CLmkSelectorDialog(
+    TInt& aOpenedItemIndex,
+    MDesCArray* aLbModel,
+    MEikCommandObserver* aCmdObserver,
+    MLmkListMemento* aMemento, CLmkListProviderBase* aListProvider)
+    : CAknSelectionListDialog( aOpenedItemIndex, aLbModel, aCmdObserver )
+    {
+    iMemento = aMemento;
+    iExited = EFalse;
+    iListProvider = aListProvider;
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkSelectorDialog::NewL
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+CLmkSelectorDialog* CLmkSelectorDialog::NewL(
+    TInt& aOpenedItemIndex,
+    MDesCArray* aLbModel,
+    TInt aMenuBarResourceId,
+    MEikCommandObserver* aCmdObserver,
+    MLmkListMemento* aMemento,
+    CLmkListProviderBase* aListProvider)
+    {
+    CLmkSelectorDialog* self =
+        new( ELeave ) CLmkSelectorDialog( aOpenedItemIndex, aLbModel,
+                                          aCmdObserver, aMemento, aListProvider );
+
+    CleanupStack::PushL( self );
+    self->ConstructL( aMenuBarResourceId );
+    CleanupStack::Pop();
+
+    return self;
+    }
+
+// ----------------------------------------------------
+// CLmkSelectorDialog::ConstructL
+// ----------------------------------------------------
+//
+void CLmkSelectorDialog::ConstructL( TInt aMenuBarResourceId )
+    {
+    CAknSelectionListDialog::ConstructL( aMenuBarResourceId );
+    }
+// ----------------------------------------------------
+// CLmkSelectorDialog::~CLmkSelectorDialog
+// ----------------------------------------------------
+//
+CLmkSelectorDialog::~CLmkSelectorDialog()
+    {
+    }
+
+// ----------------------------------------------------
+// CLmkSelectorDialog::HasFindBox
+// ----------------------------------------------------
+//
+TBool CLmkSelectorDialog::HasFindBox() const
+    {
+    if ( FindBox() )
+        {
+        return ETrue;
+        }
+    else
+        {
+        return EFalse;
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkSelectorDialog::NumberOfItems
+// -----------------------------------------------------------------------------
+//
+TInt CLmkSelectorDialog::NumberOfItems() const
+    {
+    return ListBox()->Model()->NumberOfItems();
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkSelectorDialog::CurrentItemIndex
+// -----------------------------------------------------------------------------
+//
+TInt CLmkSelectorDialog::CurrentItemIndex() const
+    {
+    return ListBox()->CurrentItemIndex();
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkSelectorDialog::SelectionIndexes
+// -----------------------------------------------------------------------------
+//
+const CArrayFix<TInt>* CLmkSelectorDialog::SelectionIndexes() const
+    {
+    return ListBox()->SelectionIndexes();
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkSelectorDialog::SetHelpContext
+// -----------------------------------------------------------------------------
+//
+void CLmkSelectorDialog::SetHelpContext( TCoeHelpContext aContext )
+    {
+    iHelpContext = aContext;
+    }
+
+// ----------------------------------------------------
+// CLmkSelectorDialog::ListBox
+// ----------------------------------------------------
+//
+CEikListBox* CLmkSelectorDialog::ListBox() const
+    {
+    return CAknSelectionListDialog::ListBox();
+    }
+
+// ----------------------------------------------------
+// CLmkSelectorDialog::SetNavigationObserver
+// ----------------------------------------------------
+//
+void CLmkSelectorDialog::SetNavigationObserver(
+    MLmkNavigationObserver& aObserver )
+    {
+    iNavigationObserver = &aObserver;
+    }
+
+// ----------------------------------------------------
+// CLmkSelectorDialog::HandleListProviderEvent
+// ----------------------------------------------------
+//
+void CLmkSelectorDialog::HandleListProviderEvent(
+    TLmkListProviderEventType aEvent )
+    {
+    CEikListBox* listbox = ListBox();
+    if ( listbox && ( aEvent == ELmkEventListReady || aEvent == ELmkEventItemAdditionComplete || aEvent == ELmkEventFindListReady ) )
+        {
+        TRAPD( error, listbox->HandleItemAdditionL() );
+        if ( error != KErrNone )
+            {
+            listbox->Reset();
+            listbox->DrawNow();
+            }
+        }
+    if (ListBox()->Model()->NumberOfItems()== 0)
+    	{
+    	if (aEvent == ELmkEventFindListReady)
+	    	{
+	    	TRAP_IGNORE(MakeEmptyTextListBoxL(iDlgEmptyLabelPrimResource,iDlgEmptyLabelSecResource, ETrue));
+	    	}
+	    else
+		    {
+	       	TRAP_IGNORE(MakeEmptyTextListBoxL(iDlgEmptyLabelPrimResource,iDlgEmptyLabelSecResource));
+		    }
+    	}
+    else
+    	{
+    	ShowFindBox(ETrue);
+    	}
+    }
+
+// ----------------------------------------------------
+// CLmkSelectorDialog::HandleListProviderError
+// ----------------------------------------------------
+//
+void CLmkSelectorDialog::HandleListProviderError( TInt /*aError*/ )
+    {
+    CEikListBox* listbox = ListBox();
+    if ( listbox )
+        {
+        listbox->Reset();
+        listbox->DrawNow();
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkSelectorDialog::GetHelpContext
+// -----------------------------------------------------------------------------
+//
+void CLmkSelectorDialog::GetHelpContext( TCoeHelpContext& aContext ) const
+    {
+    aContext.iContext = iHelpContext.iContext;
+    aContext.iMajor = iHelpContext.iMajor;
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkSelectorDialog::OfferKeyEventL
+// -----------------------------------------------------------------------------
+//
+TKeyResponse CLmkSelectorDialog::OfferKeyEventL( const TKeyEvent& aKeyEvent,
+                                     TEventCode aType )
+    {
+    // Do not process navigation handling till UI gets from engine
+	if (!ListBox())
+		{
+		return EKeyWasConsumed;
+		}
+	if (aKeyEvent.iRepeats == 0 || aKeyEvent.iCode == EKeyLeftArrow || aKeyEvent.iCode == EKeyRightArrow )
+    	{
+	    if (KeyEventForNavigationL(aKeyEvent, aType) == EKeyWasConsumed)
+	        {
+	        TryExitL(EAknSoftkeyCancel);
+		    return EKeyWasConsumed;
+	        }
+	    if	(!FindBox()->IsVisible())
+		    {
+		    return 	EKeyWasConsumed;
+		    }
+
+    	}
+    TKeyResponse keyResponce;
+	keyResponce = CAknSelectionListDialog::OfferKeyEventL(aKeyEvent, aType);
+	CEikButtonGroupContainer &buttonContainer = ButtonGroupContainer();
+	if(!iExited)
+		{
+		UpdateMskL();
+		}
+	return keyResponce;
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkSelectorDialog::PreLayoutDynInitL
+// -----------------------------------------------------------------------------
+//
+void CLmkSelectorDialog::PreLayoutDynInitL()
+    {
+    CAknSelectionListDialog::PreLayoutDynInitL();
+    if ( iNavigationObserver )
+        {
+        iNavigationObserver->HandleLaunchingEventL();
+        }
+    ((CEikColumnListBox*)ListBox())->ItemDrawer()->ColumnData()->EnableMarqueeL( ETrue );
+    }
+// -----------------------------------------------------------------------------
+// CLmkSelectorDialog::PostLayoutDynInitL
+// -----------------------------------------------------------------------------
+void CLmkSelectorDialog::PostLayoutDynInitL()
+    {
+    CAknSelectionListDialog::PostLayoutDynInitL();
+    ShowFindBox(EFalse);
+    if (iMemento)
+	   	{
+	   	EnableLeftSoftKey(EFalse);
+	   	CLmkLmItemListMemento* memento =
+							static_cast<CLmkLmItemListMemento*>(iMemento);
+		/*
+		When launching any application which uses selector dialog,
+		initially, the find box is updated from the HandleListProviderEvent
+		of the CLmkDlgSelectorImplBase class,but once the selector's model is updated
+		dialog has to update the findbox by itself.
+		the
+		*/
+		if(memento->IsModelAvailable())
+		  	{
+			iListProvider->StartSearchingLandmarksL(KWildCard,EFalse);
+	    	if(ListBox()->Model()->NumberOfItems()== 0)
+		    	{
+		    	// Disable the find box
+		    	ShowFindBox(EFalse);
+		    	MakeEmptyTextListBoxL(iDlgEmptyLabelPrimResource ,iDlgEmptyLabelSecResource);
+		    	}
+	    	else
+	    		{
+	    		ShowFindBox(ETrue);
+	    		}
+	    	UpdateMskL();
+		  	}
+	   	}
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkSelectorDialog::OkToExitL
+// -----------------------------------------------------------------------------
+//
+TBool CLmkSelectorDialog::OkToExitL( TInt aButtonId )
+    {
+	if (!ListBox())
+		{
+		return EFalse;
+		}
+
+	if (NumberOfItems() <= 0 && aButtonId == EAknSoftkeyOk)
+		{
+		return EFalse;
+		}
+    TBool b = CAknSelectionListDialog::OkToExitL( aButtonId );
+    if ( b && iNavigationObserver )
+        {
+        iNavigationObserver->HandleClosingEventL();
+        }
+    iExited = b;
+    return b;
+    }
+// ----------------------------------------------------
+// CLmkSelectorDialog::KeyEventForNavigationL
+// ----------------------------------------------------
+//
+TKeyResponse CLmkSelectorDialog::KeyEventForNavigationL(
+    const TKeyEvent& aKeyEvent,
+    TEventCode aType )
+    {
+    if ( iNavigationObserver && ( aType == EEventKey ) &&
+         ( aKeyEvent.iCode == EKeyLeftArrow ||
+           aKeyEvent.iCode == EKeyRightArrow ) )
+        {
+        return iNavigationObserver->HandleNavigationEventL( aKeyEvent );
+        }
+    return EKeyWasNotConsumed;
+    }
+
+// ----------------------------------------------------
+// CLmkSelectorDialog::FindBox()
+// ----------------------------------------------------
+//
+CAknSearchField* CLmkSelectorDialog::FindBox() const
+    {
+    return CAknSelectionListDialog::FindBox();
+    }
+
+// ----------------------------------------------------
+// CLmkSelectorDialog::ShowFindBox()
+// ----------------------------------------------------
+//
+void CLmkSelectorDialog::ShowFindBox(TBool aVisible)
+	{
+
+	CEikListBox* iListBox = ListBox();
+	CAknSearchField* iSearchBox =  FindBox();
+	const TRect rect(Rect());
+	if (iSearchBox)
+		{
+		iSearchBox->SetFocus(aVisible);
+		iSearchBox->MakeVisible(aVisible);
+#ifdef RD_SCALABLE_UI_V2
+	CAknFilteredTextListBoxModel* model =
+	static_cast<CAknFilteredTextListBoxModel*> ( iListBox->Model() );
+
+	iFilter = model->Filter();
+	iSearchBox->SetObserver(this);
+#endif// RD_SCALABLE_UI_V2
+		static_cast<CAknColumnListBoxView*>
+		(iListBox->View())->SetFindEmptyListState(aVisible);
+
+		if (iListBox && iSearchBox)
+			{
+			AknLayoutUtils::LayoutControl(iListBox, rect,
+			AKN_LAYOUT_WINDOW_list_gen_pane(1));
+			AknLayoutUtils::LayoutControl(iSearchBox, rect,
+			AKN_LAYOUT_WINDOW_find_pane);
+			if (iSearchBox->IsVisible() && iListBox->IsVisible())
+				{
+				// The correct line position to use is 2, which corresponds
+				// EABColumn in Avkon (not a public enumeration,
+				// hence hard-coding used here)
+				const TInt KSeparatorLinePos = 2;
+				iSearchBox->SetLinePos(KSeparatorLinePos);
+				}
+			}
+		else if (iListBox)
+			{
+			AknLayoutUtils::LayoutControl(iListBox, rect,
+			AKN_LAYOUT_WINDOW_list_gen_pane(0));
+			}
+		}
+
+	if ( !aVisible )
+		{
+		iListBox->SetRect(rect);
+		iListBox->DrawDeferred();
+		}
+	}
+// ----------------------------------------------------
+// CLmkSelectorDialog::MakeEmptyTextListBoxL
+// ----------------------------------------------------
+//
+void CLmkSelectorDialog::MakeEmptyTextListBoxL( TInt aResourcePrimText,TInt aResourceSecText, TBool aRequestFromFindBox ) const
+    {
+        if (aRequestFromFindBox)
+	    {
+	    HBufC* text1 = StringLoader::LoadLC( R_LMK_EMPTY_NO_MATCH, iCoeEnv );
+		TPtr ptr1 = text1->Des();
+		ListBox()->View()->SetListEmptyTextL( ptr1 );
+		CleanupStack::PopAndDestroy(text1);
+	    }
+	else if (aResourcePrimText && aResourceSecText)
+    	{
+    	_LIT(KNChar,"\n");
+    	HBufC* text1 = StringLoader::LoadLC( aResourcePrimText, iCoeEnv );
+    	HBufC* text2 = StringLoader::LoadLC( aResourceSecText, iCoeEnv );
+    	TPtr ptr1 = text1->Des();
+    	TPtr ptr2 = text2->Des();
+
+    	HBufC* buffer = HBufC::NewLC(text1->Length() + text2->Length() + 2);
+    	TPtr textFromResourceFile = buffer->Des();
+    	textFromResourceFile.Copy(ptr1);
+    	textFromResourceFile.Append(KNChar);
+    	textFromResourceFile.Append(ptr2);
+
+    	ListBox()->View()->SetListEmptyTextL( textFromResourceFile );
+    	CleanupStack::PopAndDestroy(3);//buffer,text2,text1
+    	}
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkSelectorDialog::HandleResourceChange()
+// -----------------------------------------------------------------------------
+//
+void CLmkSelectorDialog::HandleResourceChange (TInt aType)
+	{
+	if(aType==KEikDynamicLayoutVariantSwitch)
+		{
+		CAknSelectionListDialog::HandleResourceChange(aType);
+		if (iMemento)
+		   	{
+		   	CLmkLmItemListMemento* memento =
+								static_cast<CLmkLmItemListMemento*>(iMemento);
+			if(memento->IsModelAvailable())
+			  {
+		    	if(ListBox()->Model()->NumberOfItems()== 0 && FindBox()->TextLength() <= 0 )
+		    	{
+	    	    ShowFindBox(EFalse);
+	 	    	}
+			  }
+		   	}
+		}
+	else if (aType == KAknsMessageSkinChange )
+	    {
+        CAknSelectionListDialog::HandleResourceChange(aType);
+	    }
+	}
+
+
+// -----------------------------------------------------------------------------
+// CLmkSelectorDialog::UpdateMskL()
+// -----------------------------------------------------------------------------
+//
+void CLmkSelectorDialog::UpdateMskL()
+	{
+	CEikButtonGroupContainer* cba = CEikButtonGroupContainer::Current();
+	if (ListBox()->Model()->NumberOfItems()== 0)
+		{
+		cba->MakeCommandVisible(EAknSoftkeyOk, EFalse);
+		cba->MakeCommandVisibleByPosition(CEikButtonGroupContainer::EMiddleSoftkeyPosition,EFalse);
+		}
+	else
+		{
+		cba->SetCommandSetL(iCbaResourceId);
+		cba->MakeCommandVisible(EAknSoftkeyOk, ETrue);
+		cba->MakeCommandVisibleByPosition(CEikButtonGroupContainer::EMiddleSoftkeyPosition,ETrue);
+		}
+	cba->DrawDeferred();
+	}
+// -----------------------------------------------------------------------------
+// CLmkSelectorDialog::PrepareLC()
+// -----------------------------------------------------------------------------
+//
+void CLmkSelectorDialog::PrepareLC(TInt aDlgResourceId)
+	{
+	CAknSelectionListDialog::PrepareLC(aDlgResourceId);
+	SetCbaResourceAndCommandId(aDlgResourceId);
+	}
+
+// -----------------------------------------------------------------------------
+// CLmkSelectorDialog::SetCbaResourceAndCommandId()
+// -----------------------------------------------------------------------------
+//
+void CLmkSelectorDialog::SetCbaResourceAndCommandId(TInt aaDlgResourceId)
+    {
+    switch (aaDlgResourceId)
+        {
+        case R_LMK_SELECTOR_OK_BACK_DLG:
+        case R_LMK_SELECTOR_OK_BACK_MULTI_DLG:
+            {
+            iCbaResourceId = R_AVKON_SOFTKEYS_BACK;
+            iMskCmdId = EAknSoftkeyOk;
+            break;
+            }
+        case R_LMK_CATEGORY_SELECTOR_OK_CANCEL_MULTI_DLG:
+            {
+            iCbaResourceId = R_AVKON_SOFTKEYS_CANCEL;
+            iMskCmdId = EAknSoftkeyDone;
+            break;
+            }
+        case R_LMK_SELECTOR_OPEN_CANCEL_DLG:
+            {
+            iCbaResourceId = R_AVKON_SOFTKEYS_CANCEL;
+            iMskCmdId = EAknSoftkeyOk;
+            break;
+            }
+        case R_LMK_SELECTOR_OK_CANCEL_DLG:
+        case R_LMK_SELECTOR_OK_CANCEL_MULTI_DLG:
+            iCbaResourceId = R_AVKON_SOFTKEYS_CANCEL;
+            iMskCmdId = EAknSoftkeyOk;
+        default:
+            break;
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkSelectorDialog::SetDlgEmptyResource()
+// -----------------------------------------------------------------------------
+//
+void CLmkSelectorDialog::SetDlgEmptyResource(TInt aEmptyPrimLabel ,TInt aEmptySecLabel)
+	{
+	iDlgEmptyLabelPrimResource = aEmptyPrimLabel;
+	iDlgEmptyLabelSecResource = aEmptySecLabel;
+	}
+
+// -----------------------------------------------------------------------------
+// CLmkSelectorDialog::EnableLeftSoftKey()
+// -----------------------------------------------------------------------------
+//
+void CLmkSelectorDialog::EnableLeftSoftKey(TBool aEnable)
+	{
+	CEikButtonGroupContainer &pButtonContainer = ButtonGroupContainer();
+	TInt id = pButtonContainer.ButtonGroup()->CommandId(0);
+	pButtonContainer.MakeCommandVisible(id,aEnable);
+	}
+
+#ifdef RD_SCALABLE_UI_V2
+// -----------------------------------------------------------------------------
+// CLmkSelectorDialog::HandleControlEventL()
+// -----------------------------------------------------------------------------
+//
+void CLmkSelectorDialog::HandleControlEventL( CCoeControl* aControl,TCoeEvent aEventType )
+	{
+	//Update the listbox as per the search criteria
+	if (!iListProvider)
+		{
+		if( iFilter )
+			{
+			iFilter->HandleControlEventL(aControl, aEventType);
+			UpdateMskL();
+			}
+		return;
+		}
+
+	CEikButtonGroupContainer &buttonContainer = ButtonGroupContainer();
+	//Update the msk depending upon the search results while using the virtual keyboard.
+	if( aEventType == EEventStateChanged)
+		{
+		if ( aControl == FindBox() )
+			{
+			if(FindBox()->IsVisible())
+				{
+				if( NumberOfItems() == 0 )
+					{
+					buttonContainer.MakeCommandVisible(EAknSoftkeyOk, EFalse);
+					}
+				else
+					{
+					buttonContainer.MakeCommandVisible(EAknSoftkeyOk, ETrue);
+					}
+				UpdateMskL();
+
+				// Fetch filter from search field
+				TInt searchTextLength = FindBox()->TextLength();
+				HBufC* filterBuf = HBufC::NewLC(searchTextLength+1);
+				TPtr filter = filterBuf->Des();
+				FindBox()->GetSearchText(filter);
+
+				// If filter has changed repopulate list box. (It is necessary to check
+				// if filter has changed since each filter change generates several
+				// EEventStateChanged events for find box)
+
+				if (iListProvider)
+					{
+					filter.Append(KWildCard);
+					if ( iListProvider->StartSearchingLandmarksL(filter,EFalse) == EFalse)
+						{
+						//Update the listbox as per the search criteria
+						if( iFilter )
+							{
+							iFilter->HandleControlEventL(aControl, aEventType);
+							}
+						}
+					}
+			  	CleanupStack::PopAndDestroy(filterBuf);
+				}
+			}
+		}
+	}
+#endif //RD_SCALABLE_UI_V2
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/uicontrols/src/CLmkSelectorIconMgr.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,394 @@
+/*
+* 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:    LandmarksUi Content File -
+*
+*/
+
+
+
+
+
+
+
+
+// INCLUDE FILES
+#include "CLmkSelectorIconMgr.h"
+#include "LmkConsts.h"
+#include "CLmkUiUtils.h"
+#include <data_caging_path_literals.hrh>
+#include <gulicon.h>
+#include <AknIconArray.h>
+#include <avkon.mbg>
+#include <AknsConstants.h>
+#include <AknsUtils.h>
+#include <AknIconUtils.h>
+#include <AknUtils.h>
+#include <lmkerrors.h>
+
+
+// CONSTANTS
+/// Unnamed namespace for local definitions
+namespace {
+const TInt KLmkIconCacheGranularity = 30;
+const TInt KLmkIconFilesGranularity = 5;
+#if defined(_DEBUG)
+
+_LIT(KPanicMsg,"CLmkSelectorIconMgr");
+
+void Panic( TPanicCode aReason )
+    {
+    User::Panic( KPanicMsg, aReason );
+    }
+#endif
+}  // namespace
+
+// ----------------------------------------------------
+// CLmkSelectorIconMgr::TIconData
+// ----------------------------------------------------
+//
+CLmkSelectorIconMgr::TIconData::TIconData():
+    iFileIndex( KErrNotFound ),
+    iIconIndexWithinFile( KErrNotFound ),
+    iIconType( EDefinedIcon ),
+    iIconArrayId( KErrNotFound )
+    {
+    }
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CLmkSelectorIconMgr::CLmkSelectorIconMgr
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+CLmkSelectorIconMgr::CLmkSelectorIconMgr( CAknIconArray& aArray )
+    : iArray( &aArray ),
+      iCache( KLmkIconCacheGranularity )
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkSelectorIconMgr::ConstructL
+// Symbian 2nd phase constructor can leave.
+// -----------------------------------------------------------------------------
+//
+void CLmkSelectorIconMgr::ConstructL()
+    {
+    iIconFiles = new( ELeave ) CDesCArrayFlat( KLmkIconFilesGranularity );
+    ResetMgrL();
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkSelectorIconMgr::NewL
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+
+CLmkSelectorIconMgr* CLmkSelectorIconMgr::NewL(
+    CAknIconArray& aArray )
+    {
+    CLmkSelectorIconMgr* self = new( ELeave ) CLmkSelectorIconMgr( aArray );
+
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop();
+
+    return self;
+    }
+
+// ----------------------------------------------------
+// CLmkSelectorIconMgr::~CLmkSelectorIconMgr
+// ----------------------------------------------------
+//
+CLmkSelectorIconMgr::~CLmkSelectorIconMgr()
+    {
+    iCache.Close();
+    delete iIconFiles;
+    }
+
+// ----------------------------------------------------
+// CLmkSelectorIconMgr::GetIconL
+// ----------------------------------------------------
+//
+TInt CLmkSelectorIconMgr::GetIconL(
+    const TDesC& aMbmFileName,
+    TInt aIconIdInFile )
+    {
+    TInt position( 0 );
+    if ( iIconFiles->Find( aMbmFileName, position, ECmpNormal ) == 0 )
+        { // same file has been used already and so it exists in the array
+        TInt count = iCache.Count();
+        for ( TInt i( 0 ); i < count; ++i )
+            {
+            if ( position == iCache[i].iFileIndex  &&
+                aIconIdInFile == iCache[i].iIconIndexWithinFile )
+                { // icon was found in icon manager!
+                // If Array Index was not set properly, then set the index propely
+                if (( iCache[i].iIconArrayId < 0) ||
+                	  (iCache[i].iIconArrayId > KLmkIconCacheGranularity) )
+	                {
+	                break;
+	                }
+                return iCache[i].iIconArrayId;
+                }
+            }
+        }
+
+    // aMbmFileName does not yet exist in the file name array OR it exists but
+    // this specific icon hasn't been requested yet:
+
+    // create icon manager item:
+    TInt iconMgrId = CreateIconMgrItemL( aMbmFileName, aIconIdInFile );
+
+    // try to load new icon:
+    iCache[iconMgrId].iIconArrayId =
+        LoadAndAppendIconL( aMbmFileName, aIconIdInFile );
+
+    return iCache[iconMgrId].iIconArrayId;
+    }
+
+// ----------------------------------------------------
+// CLmkSelectorIconMgr::GetDefaultIconL
+// ----------------------------------------------------
+//
+TInt CLmkSelectorIconMgr::GetDefaultIconL( TIconType aIcon )
+    {
+    TInt count = iCache.Count();
+    for ( TInt i( 0  ); i < count ; ++i )
+        {
+        TIconData tmp = iCache[i];
+        if ( tmp.iIconType == aIcon )
+            { // default icon was found
+            if ( tmp.iIconArrayId < 0 )
+                { // try to load new icon.
+                TPtrC iconFile = ( *iIconFiles )[tmp.iFileIndex];
+                tmp.iIconArrayId =
+                    LoadAndAppendIconL( iconFile, tmp.iIconIndexWithinFile );
+                }
+            return tmp.iIconArrayId;
+            }
+        }
+    return KErrNotFound; // default icon was not found
+    }
+
+// ----------------------------------------------------
+// CLmkSelectorIconMgr::SetDefaultIconL
+// ----------------------------------------------------
+//
+void CLmkSelectorIconMgr::SetDefaultIconL(
+    TIconType aIcon,
+    const TDesC& aMbmFileName,
+    TInt aIconIdInFile )
+    {
+    if ( GetDefaultIconL( aIcon ) >= 0 )
+        { // default icon already set
+        User::Leave( KErrAlreadyExists );
+        }
+
+    TInt iconMgrId = CreateIconMgrItemL( aMbmFileName, aIconIdInFile );
+    iCache[iconMgrId].iIconType = aIcon;
+    // Added for updating Icon index
+    iCache[iconMgrId].iIconArrayId =
+        LoadAndAppendIconL( aMbmFileName, aIconIdInFile );
+    }
+
+// ----------------------------------------------------
+// CLmkSelectorIconMgr::SetIconAtIndexZeroL
+// ----------------------------------------------------
+//
+void CLmkSelectorIconMgr::SetIconAtIndexZeroL(
+    const TDesC& aMbmFileName,
+    TAknsItemID aSkinID,
+    TInt aIconId,
+    TInt aMaskId )
+    {
+    __ASSERT_DEBUG( iArray->Count() >= 2,
+                    Panic( KLmkPanicIndexesZeroOneNotSet ) );
+
+    CGulIcon* icon = LoadIconL( aMbmFileName, aSkinID, aIconId, aMaskId );
+    CleanupStack::PushL( icon );
+
+    CGulIcon* old = iArray->At( 0 );
+    iArray->Delete( 0 );
+    delete old;
+    iArray->InsertL( 0, icon );
+
+    CleanupStack::Pop( icon ); // ownership transferred to icon array
+    }
+
+// ----------------------------------------------------
+// CLmkSelectorIconMgr::SetIconAtIndexOneL
+// ----------------------------------------------------
+//
+void CLmkSelectorIconMgr::SetIconAtIndexOneL(
+    const TDesC& aMbmFileName,
+    TAknsItemID aSkinID,
+    TInt aIconId,
+    TInt aMaskId )
+    {
+    __ASSERT_DEBUG( iArray->Count() >= 2,
+                    Panic( KLmkPanicIndexesZeroOneNotSet ) );
+
+    CGulIcon* icon = LoadIconL( aMbmFileName, aSkinID, aIconId, aMaskId );
+    CleanupStack::PushL( icon );
+
+    CGulIcon* old = iArray->At( 1 );
+    iArray->Delete( 1 );
+    delete old;
+    iArray->InsertL( 1, icon );
+
+    CleanupStack::Pop( icon ); // ownership transferred to icon array
+    }
+
+// ----------------------------------------------------
+// CLmkSelectorIconMgr::ResetMgrL
+// ----------------------------------------------------
+//
+void CLmkSelectorIconMgr::ResetMgrL()
+    {
+    iArray->ResetAndDestroy();
+    iIconFiles->Reset();
+    iCache.Reset();
+
+    // By default set empty icons as selection icons:
+
+    TFileName* iconFile = CLmkUiUtils::AvkonIconFileLC();
+    CGulIcon* icon = LoadIconL( *iconFile,
+                                KAknsIIDQgnPropEmpty,
+                                EMbmAvkonQgn_prop_empty,
+                                EMbmAvkonQgn_prop_empty_mask );
+    CleanupStack::PushL( icon );
+    iArray->AppendL( icon );
+    CleanupStack::Pop( icon ); // ownership transferred to icon array
+    icon = NULL;
+
+    icon = LoadIconL( *iconFile,
+                      KAknsIIDQgnPropEmpty,
+                      EMbmAvkonQgn_prop_empty,
+                      EMbmAvkonQgn_prop_empty_mask );
+    CleanupStack::PushL( icon );
+    iArray->AppendL( icon );
+    CleanupStack::Pop( icon ); // ownership transferred to icon array
+    CleanupStack::PopAndDestroy( ); // iconFile
+    }
+
+// ============================= HELPER METHODS ================================
+
+// ----------------------------------------------------
+// CLmkSelectorIconMgr::LoadIconL
+// ----------------------------------------------------
+//
+CGulIcon* CLmkSelectorIconMgr::LoadIconL(
+    const TDesC& aMbmFileName,
+    TInt aIconIdInFile )
+    {
+    CFbsBitmap* bitmap = NULL;
+    CFbsBitmap* bitmapMask = NULL;
+
+	AknIconUtils::CreateIconLC(bitmap, bitmapMask, aMbmFileName,
+                             aIconIdInFile, aIconIdInFile + 1);
+    CGulIcon* icon = CGulIcon::NewL( bitmap, bitmapMask );
+    CleanupStack::Pop( 2 ); // bitmapMask, bitmap. icon has now ownership
+    return icon;
+    }
+
+// ----------------------------------------------------
+// CLmkSelectorIconMgr::LoadIconL
+// ----------------------------------------------------
+//
+CGulIcon* CLmkSelectorIconMgr::LoadIconL(
+    const TDesC& aMbmFileName,
+    TAknsItemID aSkinID,
+    TInt aIconId,
+    TInt aMaskId )
+    {
+    MAknsSkinInstance* skin = AknsUtils::SkinInstance();
+
+    CFbsBitmap* bitmap = NULL;
+    CFbsBitmap* bitmapMask = NULL;
+    AknsUtils::CreateIconLC( skin, aSkinID, bitmap, bitmapMask, aMbmFileName,
+                             aIconId, aMaskId );
+    CGulIcon* icon = CGulIcon::NewL( bitmap, bitmapMask );
+    CleanupStack::Pop( 2 ); // bitmapMask, bitmap. icon has now ownership
+    return icon;
+    }
+
+// ----------------------------------------------------
+// CLmkSelectorIconMgr::LoadAndAppendIconL
+// ----------------------------------------------------
+//
+TInt CLmkSelectorIconMgr::LoadAndAppendIconL(
+    const TDesC& aMbmFileName,
+    TInt aIconIdInFile )
+    {
+    CGulIcon* icon = LoadIconL( aMbmFileName, aIconIdInFile );
+    CleanupStack::PushL( icon );
+    iArray->AppendL( icon );
+    CleanupStack::Pop( icon );
+    // Added for avoiding returning -1 as bitmap Index
+    if (iArray->Count() > 0)
+	    {
+	    return iArray->Count() - 1;
+	    }
+    else
+	    {
+	    return 0;
+	    }
+    }
+
+// ----------------------------------------------------
+// CLmkSelectorIconMgr::CreateIconMgrItemL
+// ----------------------------------------------------
+//
+TInt CLmkSelectorIconMgr::CreateIconMgrItemL(
+    const TDesC& aMbmFileName,
+    TInt aIconIdInFile )
+    {
+    TIconData tmp;
+
+
+    tmp.iFileIndex = AppendedIconFileIndexL( aMbmFileName );
+    tmp.iIconIndexWithinFile = aIconIdInFile;
+
+    User::LeaveIfError( iCache.Append( tmp ) );
+    if (iCache.Count() > 0)
+	    {
+	    return iCache.Count() - 1;
+	    }
+    else
+	    {
+	    return 0;
+	    }
+    }
+
+// ----------------------------------------------------
+// CLmkSelectorIconMgr::AppendedIconFileIndexL
+// ----------------------------------------------------
+//
+TInt CLmkSelectorIconMgr::AppendedIconFileIndexL( const TDesC& aMbmFileName )
+    {
+    TInt position( 0 );
+    if ( iIconFiles->Find( aMbmFileName, position, ECmpNormal ) != 0 )
+        { // file does not yet exist in the file name array
+        iIconFiles->AppendL( aMbmFileName );
+        return iIconFiles->Count() - 1;
+        }
+    else
+        { // file already exists, just return its position
+        return position;
+        }
+    }
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/uicontrols/src/CLmkSelectorImplBase.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,208 @@
+/*
+* 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:    LandmarksUi Content File -
+*
+*/
+
+
+
+
+
+
+
+
+// INCLUDE FILES
+#include "CLmkSelectorImplBase.h"
+#include "CLmkListProviderBase.h"
+#include "CLmkSelectorIconMgr.h"
+#include "MLmkListMemento.h"
+#include "CLmkUiUtils.h"
+#include "LmkConsts.h"
+#include <avkon.mbg>
+#include <AknIconArray.h>
+#include <eikenv.h>
+#include <lmkerrors.h>
+
+
+// CONSTANTS
+/// Unnamed namespace for local definitions
+namespace {
+const TInt KIconArrayGranularity( 10 );
+#if defined(_DEBUG)
+
+_LIT( KPanicMsg, "CLmkSelectorImplBase" );
+
+void Panic( TPanicCode aReason )
+    {
+    User::Panic( KPanicMsg, aReason );
+    }
+#endif
+}  // namespace
+
+
+// -----------------------------------------------------------------------------
+// CLmkSelectorImplBase::TLmkRestoreData::TLmkRestoreData
+// Constructor of an internal helper class.
+// -----------------------------------------------------------------------------
+//
+CLmkSelectorImplBase::TLmkRestoreData::TLmkRestoreData()
+    : iRestoreRequested( EFalse ),
+      iListBox( NULL ),
+      iProvider( NULL ),
+      iFiltered( EFalse )
+    {
+    }
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CLmkSelectorImplBase::CLmkSelectorImplBase
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+CLmkSelectorImplBase::CLmkSelectorImplBase( CPosLandmarkDatabase& aDb )
+    : iDb( aDb ),
+      iSelectorImplBaseLatestListEvent( ELmkEventNull )
+
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkSelectorImplBase::BaseConstructL
+// Symbian 2nd phase constructor can leave.
+// -----------------------------------------------------------------------------
+//
+void CLmkSelectorImplBase::BaseConstructL()
+    {
+    iEnv = CEikonEnv::Static();
+    iLmkUiUtils = CLmkUiUtils::NewL();
+    iLmkUiUtils->ReadLmkUiResourceFileL();
+    SetupListProviderL();
+    }
+
+// ----------------------------------------------------
+// CLmkSelectorImplBase::~CLmkSelectorImplBase
+// ----------------------------------------------------
+//
+CLmkSelectorImplBase::~CLmkSelectorImplBase()
+    {
+    delete iLmkUiUtils;
+    delete iListProvider;
+    delete iIconMgr;
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkSelectorImplBase::SetMemento
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CLmkSelectorImplBase::SetMemento( MLmkListMemento& aMemento )
+    {
+    iMemento = &aMemento;
+    }
+
+// ----------------------------------------------------
+// CLmkSelectorImplBase::SetupIconMgrLC
+// ----------------------------------------------------
+//
+CAknIconArray* CLmkSelectorImplBase::SetupIconMgrLC()
+    {
+    CAknIconArray* icons =
+        new( ELeave ) CAknIconArray( KIconArrayGranularity );
+    CleanupStack::PushL( icons );
+
+    delete iIconMgr;
+    iIconMgr = NULL;
+    iIconMgr = CLmkSelectorIconMgr::NewL( *icons );
+    TFileName* iconFile = CLmkUiUtils::LmkUiIconFileLC();
+
+    iIconMgr->SetDefaultIconL( CLmkSelectorIconMgr::ELandmarkDefaultIcon,
+                        *iconFile, KLmkDefaultId );
+
+    iIconMgr->SetDefaultIconL( CLmkSelectorIconMgr::ECategoryDefaultIcon,
+                        *iconFile, KCategoryDefaultId );
+
+    __ASSERT_DEBUG( iListProvider, Panic( KLmkPanicNullListProvider ) );
+    iListProvider->SetIconMgrL( *iIconMgr );
+    CleanupStack::PopAndDestroy();//iconFile
+    return icons;
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkSelectorImplBase::Store
+// -----------------------------------------------------------------------------
+//
+void CLmkSelectorImplBase::Store(
+    const CEikListBox& aListBox,
+    const CLmkListProviderBase& aProvider,
+    TBool aFiltered )
+    {
+    if ( iMemento && iSelectorImplBaseLatestListEvent == ELmkEventListReady )
+        {
+        iMemento->Store( aListBox, aProvider, aFiltered );
+        }
+    // If list is not ready then store doesn't make sense and we don't do
+    // anything.
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkSelectorImplBase::Restore
+// -----------------------------------------------------------------------------
+//
+void CLmkSelectorImplBase::Restore(
+    const CEikListBox& aListBox,
+    const CLmkListProviderBase& aProvider,
+    TBool aFiltered )
+    {
+    if ( iMemento )
+        {
+        if ( iSelectorImplBaseLatestListEvent == ELmkEventListReady )
+            {
+            iMemento->Restore( aListBox, aProvider, aFiltered );
+            }
+        else
+            {
+            // restore cannot be done yet, it is postponed:
+            iRestoreData.iRestoreRequested = ETrue;
+            iRestoreData.iListBox = &aListBox;
+            iRestoreData.iProvider = &aProvider;
+            iRestoreData.iFiltered = aFiltered;
+            }
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkSelectorImplBase::HandleListProviderEvent
+// -----------------------------------------------------------------------------
+//
+void CLmkSelectorImplBase::HandleListProviderEvent(
+    TLmkListProviderEventType aEvent )
+    {
+    iSelectorImplBaseLatestListEvent = aEvent;
+
+    if ( ( iSelectorImplBaseLatestListEvent == ELmkEventListReady
+    		|| iSelectorImplBaseLatestListEvent == ELmkEventItemAdditionComplete ) &&
+         iRestoreData.iRestoreRequested )
+        { // Postponed memento restoration
+        __ASSERT_DEBUG( iRestoreData.iListBox && iRestoreData.iProvider,
+                        Panic( KLmkPanicPostponedRestoration ) );
+        iMemento->Restore( *iRestoreData.iListBox,
+                           *iRestoreData.iProvider,
+                           iRestoreData.iFiltered );
+        // It is enough to turn off iRestoreRequested:
+        iRestoreData.iRestoreRequested = EFalse;
+        }
+    }
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/uicontrols/src/CLmkSelectorLBModelBase.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,98 @@
+/*
+* 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:    LandmarksUi Content File -
+*
+*/
+
+
+
+
+
+
+
+
+// INCLUDE FILES
+#include "CLmkSelectorLBModelBase.h"
+#include "CLmkListProviderBase.h"
+#include "CLmkSelectorCache.h"
+#include <EPos_Landmarks.h>
+
+// CONSTANTS
+/// Unnamed namespace for local definitions
+namespace {
+// Enough space for raw text + formatting:
+const TInt KLmkSelectorLbModelLength = KPosLmMaxTextFieldLength+10;
+}  // namespace
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CLmkSelectorLBModelBase::CLmkSelectorLBModelBase
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+CLmkSelectorLBModelBase::CLmkSelectorLBModelBase()
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkSelectorLBModelBase::ConstructL
+// Symbian 2nd phase constructor can leave.
+// -----------------------------------------------------------------------------
+//
+void CLmkSelectorLBModelBase::BaseConstructL(
+                                  CLmkListProviderBase& aListProvider )
+    {
+    iCache = CLmkSelectorCache::NewL( aListProvider );
+    iBuffer = HBufC::NewL( KLmkSelectorLbModelLength );
+    }
+
+// ----------------------------------------------------
+// CLmkSelectorLBModelBase::~CLmkSelectorLBModelBase
+// ----------------------------------------------------
+//
+CLmkSelectorLBModelBase::~CLmkSelectorLBModelBase()
+    {
+    delete iCache;
+    delete iBuffer;
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkSelectorLBModelBase::MdcaCount
+// ?implementation_description
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+TInt CLmkSelectorLBModelBase:: MdcaCount() const
+    {
+    return iCache->ItemCount();
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkSelectorLBModelBase::MdcaPoint
+// ?implementation_description
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+TPtrC16 CLmkSelectorLBModelBase::MdcaPoint( TInt aIndex ) const
+    {
+    TRAPD( err, MdcaPointL( aIndex ) );
+    if ( err != KErrNone && err != KErrLocked)
+        {
+        //*iBuffer = KNullDesC;
+        }
+	return *iBuffer;
+    }
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/uicontrols/src/CLmkSender.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,669 @@
+/*
+ * Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:    LandmarksUi Sender class implementation
+ *
+ */
+
+// INCLUDE FILES
+
+#include <e32std.h>
+#include <StringLoader.h>
+#include <f32file.h>
+
+#include <AknWaitDialog.h>
+#include <coemain.h>
+#include <eikmenup.h>
+#include <AknQueryDialog.h>
+#include <sendui.h>
+#include <SenduiMtmUids.h>
+#include <CMessageData.h>
+#include <EPos_CPosLandmarkDatabase.h>
+#include <EPos_CPosLandmark.h>
+#include <EPos_CPosLmCategoryManager.h>
+#include <lmkui.rsg>
+#include "LmkConsts.h"
+#include "CLmkEncoder.h"
+#include "landmarks.hrh"
+#include "CLmkUiUtils.h"
+#include "LmkFileUtils.h"
+#include "Debug.h"
+#include "CLmkSender.h"
+#include "CLmkFields.h"
+#include "LmkConsts.h"
+#include "CLmkDbUtils.h"
+#include <CSendingServiceInfo.h>
+#include <lmkerrors.h>
+
+// CONSTANTS
+//for the sendui query
+const static TInt KBluetooth = 0x10009ed5;
+const static TInt KInfrared = 0x100053A4;
+const static TInt KEmail = 0x10001028;
+const static TInt KMessaging = 0x102072D6;
+
+const TInt KNumOfReplaceChars(25);
+
+/// Unnamed namespace for local definitions
+namespace
+    {
+    const TInt KLmkMtmFilterGranularity(8);
+#if defined(_DEBUG)
+    _LIT( KPanicMsg, "CLmkSender" );
+
+    void Panic(TPanicCode aReason)
+        {
+        User::Panic(KPanicMsg, aReason);
+        }
+#endif
+    } // namespace
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CLmkSender::CLmkSender
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+CLmkSender::CLmkSender(CPosLandmarkDatabase& aDb) :
+    iLastOperationResult(KErrNone), iDb(aDb)
+    {
+    }
+
+// ----------------------------------------------------
+// CLmkSender::ConstructL
+// ----------------------------------------------------
+//
+void CLmkSender::ConstructL(CPosLandmarkDatabase& aDb)
+    {
+    iSendUi = CSendUi::NewL();
+    iEncoder = CLmkEncoder::NewL(aDb, *this, ETrue);
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkSender::NewL
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CLmkSender* CLmkSender::NewL(CPosLandmarkDatabase& aDb)
+    {
+    CLmkSender* self = new (ELeave) CLmkSender(aDb);
+    CleanupStack::PushL(self);
+    self->ConstructL(aDb);
+    CleanupStack::Pop();
+    return self;
+    }
+
+// ----------------------------------------------------
+// CLmkSender::~CLmkSender
+// ----------------------------------------------------
+//
+CLmkSender::~CLmkSender()
+    {
+    if (iWaitNote)
+        {
+        TRAPD( err, iWaitNote->ProcessFinishedL() );
+        if (err != KErrNone)
+            {
+            delete iWaitNote;
+            iWaitNote = NULL;
+            }
+        }
+    delete iEncoder;
+    delete iSendUi;
+    }
+
+// ---------------------------------------------------------
+// CLmkSender::DisplaySendMenuL
+// ---------------------------------------------------------
+//
+EXPORT_C void CLmkSender::DisplaySendMenuL(CEikMenuPane& aMenuPane,
+        TInt aVisibleCount, TInt aMenuTextResource) const
+    {
+    TInt pos(0);
+    aMenuPane.ItemAndPos(ELmkCmdSendDummy, pos);
+    // Set dummy command dimmed anyway. It was only needed because
+    // SendUI needs to know the right position:
+    aMenuPane.SetItemDimmed(ELmkCmdSendDummy, ETrue);
+
+    // Now if there are items visible then let SendUi check whether
+    // option can be shown:
+    if (aVisibleCount > 0)
+        {
+        TSendingCapabilities capabilities(0, 0,
+                TSendingCapabilities::EAllServices);
+        iSendUi->AddSendMenuItemL(aMenuPane, pos, ELmkCmdSend, capabilities);
+
+        // Set menu item text to desired value since previous operation
+        // overrides it with SendUI default value.
+        if (aMenuTextResource != KZeroResourceId)
+            {
+            aMenuPane.SetItemTextL(ELmkCmdSend, aMenuTextResource);
+            }
+        }
+    }
+
+// ---------------------------------------------------------
+// CLmkSender::DisplaySendCascadeMenuL
+// ---------------------------------------------------------
+//
+EXPORT_C void CLmkSender::DisplaySendCascadeMenuL(CEikMenuPane& /*aMenuPane*/) const
+    {
+    // Construct the MTM filter
+    CArrayFixFlat<TUid>* mtmFilter = new (ELeave) CArrayFixFlat<TUid> (
+            KLmkMtmFilterGranularity);
+    CleanupStack::PushL(mtmFilter);
+    mtmFilter->AppendL(KSenduiMtmSmsUid); // hide SMS
+    mtmFilter->AppendL(KSenduiMtmFaxUid); // hide fax
+    CleanupStack::PopAndDestroy(); // mtmFilter
+    }
+
+// ----------------------------------------------------
+// CLmkSender::CreateAndSendL
+// ----------------------------------------------------
+//
+void CLmkSender::CreateAndSendL(TInt aCommandId,
+        const RArray<TPosLmItemId>& aMarkedIds, TPosLmItemId aSelectedId)
+    {
+    DEBUG( CLmkSender::CreateAndSendL entered );
+    HBufC* filePath;
+    PrepareSendFilePathL(filePath);
+    TPtr ptr = filePath->Des();
+    TInt markedCount = aMarkedIds.Count();
+    if (markedCount == 0 || markedCount == 1)
+        {
+        // One item only marked or unmarked
+        RArray<TPosLmItemId> lmIdArray(1);
+        CleanupClosePushL(lmIdArray);
+        User::LeaveIfError(lmIdArray.Append(aSelectedId));
+        CPosLandmark* landmark = iDb.ReadLandmarkLC(aSelectedId);
+        HBufC* webUrl = HBufC::NewL(KMaxBufferLen);
+        CleanupStack::PushL(webUrl);
+        TPtrC urlDes = webUrl->Des();
+        landmark->GetPositionField(ELmkPositionFieldWebAddress, urlDes);
+        if (urlDes.Length() > KMaxUrlFieldLenWithDefaultProtocol)
+            {
+            TInt pos = urlDes.Find(KProtocol);
+            if (pos == KErrNotFound)
+                {
+                webUrl = webUrl->ReAllocL(KHttp().Length() + urlDes.Length());
+                TPtr url = webUrl->Des();
+                webUrl->Des().Copy(urlDes);
+                webUrl->Des().Insert(0, KHttp);
+                landmark->SetPositionFieldL(ELmkPositionFieldWebAddress,
+                        webUrl->Des());
+                }
+            }
+        CleanupStack::PopAndDestroy();//webUrl
+        TPtrC landmarkName;
+        TInt retVal(0);
+        retVal = landmark->GetLandmarkName(landmarkName);
+        if (retVal == KErrNone)
+            {
+            iEncoder->StartEncodingL(landmarkName, lmIdArray);
+            ptr.Append(landmarkName);
+            }
+        else
+            {
+            iEncoder->StartEncodingL(KLmkEncodedDataFileName, lmIdArray);
+            ptr.Append(KLmkEncodedDataFileName);
+            }
+        SendL(ptr, aCommandId);
+        CleanupStack::PopAndDestroy(2); //landmark, lmIdArray
+        }
+    else
+        {
+        HBufC* pckgName;
+        TPtrC currentPckgName;//not really used, only for passing to the func.
+        if (QueryNewPackageNameLC(currentPckgName, pckgName))
+            {
+            TPtr name = pckgName->Des();
+            iEncoder->StartEncodingL(name, aMarkedIds);
+            ptr.Append(name);
+            SendL(ptr, aCommandId);
+            }
+        CleanupStack::PopAndDestroy();
+        }
+    CleanupStack::PopAndDestroy(filePath); //filePath       
+    }
+// ----------------------------------------------------
+// CLmkSender::HandleOperationL
+// ----------------------------------------------------
+//
+void CLmkSender::HandleOperationL(TOperationTypes /*aType*/,
+        TReal32 /*aProgress*/, TInt aStatus)
+    {
+    if (aStatus != KPosLmOperationNotComplete)
+        {
+        __ASSERT_DEBUG( iWaitNote, Panic( KLmkPanicNullMember ) );
+        iWaitNote->ProcessFinishedL();
+        iWaitNote = NULL;
+        iLastOperationResult = aStatus;
+        }
+    }
+
+// ----------------------------------------------------
+// CLmkSender::SendLandmarksL
+// ----------------------------------------------------
+//
+void CLmkSender::SendLandmarksL(TInt aCommandId, const TDesC& aPackageName,
+        const RPointerArray<CLmkLandmark>& aLandmarks)
+    {
+    DEBUG( CLmkSender::SendMultipleLandmarkL entered );
+    TInt lmkCount = aLandmarks.Count();
+    __ASSERT_DEBUG(lmkCount > 0, Panic( KLmkPanicNullMember ) );
+    if (lmkCount == 1)
+        {
+        SendSingleLandmarkL(aCommandId, aLandmarks);
+        }
+    else
+        {
+        SendLandmarksPackageL(aCommandId, aPackageName, aLandmarks);
+        }
+    }
+	
+// ----------------------------------------------------
+// CLmkSender::SendSingleLandmarkL
+// ----------------------------------------------------
+//
+void CLmkSender::SendSingleLandmarkL(const CPosLandmark& alandmark)
+    {
+    CLmkLandmark* lmkLandmark;
+    LmkLandmarkFromPosLandmarkL(lmkLandmark, alandmark);
+    SendSingleLandmarkL(ELmkCmdSend, *lmkLandmark);
+    CleanupStack::PopAndDestroy();//landMarkLmk
+    }
+	
+// ----------------------------------------------------
+// CLmkSender::SendSingleLandmarkL()
+// ----------------------------------------------------
+//
+void CLmkSender::SendSingleLandmarkL(TInt aCommandId,
+        const CLmkLandmark& alandmark)
+    {
+    TPtrC ptr;
+    RPointerArray<CLmkLandmark> landmark;
+    landmark.Append(&alandmark);
+    SendLandmarksL(aCommandId, ptr, landmark);
+    landmark.Close();
+    }
+	
+// ----------------------------------------------------
+// CLmkSender::SendSingleLandmarkL()
+// ----------------------------------------------------
+//
+void CLmkSender::SendSingleLandmarkL(TInt aCommandId, const RPointerArray<
+        CLmkLandmark>& aLandmarks)
+    {
+    HBufC* filePath;
+    PrepareSendFilePathL(filePath);
+    TPtr ptr = filePath->Des();
+    CLmkLandmark* lmk = aLandmarks[0];
+    CPosLandmark* landmark = lmk->PosLandmark();
+    CLmkDbUtils::AddDefaultProtocolL(landmark);
+    TPtrC landmarkName;
+    TInt retVal(KErrNone);
+    retVal = landmark->GetLandmarkName(landmarkName);
+
+    if (retVal == KErrNone && LmkFileUtils::IsValidPathL(landmarkName))
+        {
+        TRAP(retVal,iEncoder->StartEncodingL(landmarkName,aLandmarks));
+        if (retVal == KErrNone)
+            {
+            ptr.Append(landmarkName);
+            }
+        }
+    else
+        {
+        retVal = KErrBadName;
+        }
+
+    if (retVal != KErrNone)
+        {
+        TPtr lmName = ReplaceSpecialCharactersL(landmarkName);
+        TRAP(retVal,iEncoder->StartEncodingL(lmName,aLandmarks));
+        if (retVal == KErrNone)
+            {
+            ptr.Append(lmName);
+            }
+        else
+            {
+            iEncoder->StartEncodingL(KLmkEncodedDataFileName, aLandmarks);
+            ptr.Append(KLmkEncodedDataFileName);
+            }
+        }
+    SendL(ptr, aCommandId);
+    CleanupStack::PopAndDestroy(filePath); //filePath
+    }
+	
+// ----------------------------------------------------
+// CLmkSender::SendLandmarksPackageL
+// ----------------------------------------------------
+//
+void CLmkSender::SendLandmarksPackageL(TInt aCommandId,
+        const TDesC& aPackageName,
+        const RPointerArray<CLmkLandmark>& aLandmarks)
+    {
+    HBufC* pckgName;
+    HBufC* filePath;
+    PrepareSendFilePathL(filePath);
+    TPtr ptr = filePath->Des();
+    if (QueryNewPackageNameLC(aPackageName, pckgName))
+        {
+        TPtr desName = pckgName->Des();
+        iEncoder->StartEncodingL(desName, aLandmarks);
+        ptr.Append(desName);
+        SendL(ptr, aCommandId);
+        }
+    CleanupStack::PopAndDestroy(2);
+    }
+	
+// ----------------------------------------------------
+// CLmkSender::SendL()
+// ----------------------------------------------------
+//
+void CLmkSender::SendL(TDes& aFilePath, TInt aCommandId)
+    {
+    aFilePath.Append(KLmkEncodedDataFileExtension);
+    iWaitNote = new (ELeave) CAknWaitDialog(NULL, ETrue);
+    if (iWaitNote->ExecuteLD(R_LMK_ENCODING_WAIT_NOTE))
+        {
+        if (iLastOperationResult == KErrNone)
+            {
+            RFs fs;
+            User::LeaveIfError(fs.Connect());
+            CleanupClosePushL(fs);
+            User::LeaveIfError(fs.ShareProtected());
+            RFile fileHandle;
+            User::LeaveIfError(fileHandle.Open(fs, aFilePath, EFileShareAny));
+            CleanupClosePushL(fileHandle);
+            TRAPD( err, SendFileL( aCommandId, fileHandle, ETrue));
+            if (err != KErrNone)
+                {
+                CleanupStack::PopAndDestroy(); // fileHandle
+                LmkFileUtils::DeleteFileL(aFilePath);
+                CleanupStack::PopAndDestroy(); // fs
+                User::LeaveIfError(err);
+                }
+            CleanupStack::PopAndDestroy(); // fileHandle
+            LmkFileUtils::DeleteFileL(aFilePath);
+            CleanupStack::PopAndDestroy(); // fs
+            }
+        else
+            { // error situation
+            CCoeEnv::Static()->HandleError(iLastOperationResult);
+            }
+        }
+    else
+        {
+        //making iWaitNote null, since framework destroys waitnote
+        //dialog on pressing cancel.
+        iWaitNote = NULL;
+        iEncoder->CancelEncodeOperationL();
+        }
+    }
+	
+// ----------------------------------------------------
+// CLmkSender::SendFileL
+// ----------------------------------------------------
+//
+void CLmkSender::SendFileL(TInt /*aCommandId*/, const TDesC& aFile,
+        TBool aDeleteSentFile)
+    {
+    DEBUG( CLmkSender::SendFileL entered );
+
+    // one attachment only:
+    CMessageData * messageData = CMessageData::NewL();
+    CleanupStack::PushL( messageData );
+    messageData->AppendAttachmentL( aFile );
+    DEBUG( CLmkSender::SendFileL: calling SendUI );
+    LoadFilteredSendListQueryL(messageData);
+    DEBUG( CLmkSender::SendFileL: SendUI returned );
+
+    // Delete the file since it is no more needed
+    if( aDeleteSentFile )
+        {
+        LmkFileUtils::DeleteFileL( aFile );
+        }
+    CleanupStack::PopAndDestroy( messageData );
+    }
+
+// ----------------------------------------------------
+// CLmkSender::SendFileL -- FileHandle version
+// ----------------------------------------------------
+//
+void CLmkSender::SendFileL(TInt /*aCommandId*/, RFile& aFile, TBool /*aDeleteSentFile*/)
+    {
+    DEBUG( CLmkSender::SendFileL entered );
+
+    // one attachment only:
+    CMessageData * messageData = CMessageData::NewL();
+    CleanupStack::PushL(messageData);
+    messageData->AppendAttachmentHandleL(aFile);
+    DEBUG( CLmkSender::SendFileL: calling SendUI );
+    LoadFilteredSendListQueryL(messageData);
+    CleanupStack::PopAndDestroy(); //messageData
+    DEBUG( CLmkSender::SendFileL: SendUI returned );
+    }
+	
+// ----------------------------------------------------
+// CLmkSender::QueryPackageName
+// ----------------------------------------------------
+//
+TBool CLmkSender::QueryNewPackageNameLC(const TDesC& aCurrentPckgName,
+        HBufC*& aNewPackageName)
+    {
+    TBool retVal = EFalse;
+    HBufC* pkgName = StringLoader::LoadL(R_LMK_DEFAULT_PACKAGE_NAME,
+            CEikonEnv::Static());
+
+    if (aCurrentPckgName.Length() > pkgName->Des().Length())
+        {
+        delete pkgName;
+        pkgName = NULL;
+        pkgName = HBufC::NewL(aCurrentPckgName.Length());
+        pkgName->Des().Copy(aCurrentPckgName);
+        }
+
+    TPtr desName = pkgName->Des();
+
+    CAknTextQueryDialog* dlg = new (ELeave) CAknTextQueryDialog(desName,
+            CAknQueryDialog::ENoTone);
+    if (dlg->ExecuteLD(R_LMK_PACKAGE_NAME_QUERY))
+        {
+        retVal = ETrue;
+        if (!LmkFileUtils::IsValidPathL(desName))
+            {
+            delete pkgName;
+            pkgName = NULL;
+
+            TInt len = KLmkEncodedDataFileName().Length();
+            aNewPackageName = HBufC::NewLC(len);
+            aNewPackageName->Des().Copy(KLmkEncodedDataFileName);
+            return retVal;
+            }
+        }
+    aNewPackageName = HBufC::NewLC(pkgName->Des().Length());
+    aNewPackageName->Des().Copy(pkgName->Des());
+
+    delete pkgName;
+    pkgName = NULL;
+
+    return retVal;
+    }
+
+// ----------------------------------------------------
+// CLmkSender::LmkLandmarkFromPosLandmarkL()
+// ----------------------------------------------------
+//
+void CLmkSender::LmkLandmarkFromPosLandmarkL(CLmkLandmark*& aLmkLandmark,
+        const CPosLandmark& aPosLandmark)
+    {
+    RArray<TPosLmItemId> categoryIdArray;
+    RPointerArray<CPosLandmarkCategory> categories;
+    aPosLandmark.GetCategoriesL(categoryIdArray);
+
+    CPosLmCategoryManager* categoryMgr = CPosLmCategoryManager::NewL(iDb);
+    CleanupStack::PushL(categoryMgr);
+    TInt catCount = categoryIdArray.Count();
+    for (TInt i = 0; i < catCount; i++)
+        {
+        TPosLmItemId catId = categoryIdArray[i];
+        CPosLandmarkCategory* category = categoryMgr->ReadCategoryLC(catId);
+        categories.Append(category);
+        CleanupStack::Pop();
+        }
+    categoryIdArray.Close();
+    CleanupStack::PopAndDestroy();//categoryMgr
+    aLmkLandmark = CLmkLandmark::NewL(&aPosLandmark, categories);
+    CleanupStack::PushL(aLmkLandmark);
+    categories.ResetAndDestroy();
+    }
+	
+// ----------------------------------------------------
+// CLmkSender::PrepareSendFilePathL()
+// ----------------------------------------------------
+//
+void CLmkSender::PrepareSendFilePathL(HBufC*& aFilePath)
+    {
+    // Full path name (private path c:\\private\\UID3 + pacakge File name + File bname Extension)
+    aFilePath = HBufC::NewLC(2 * KLmkPackageNameMaxLen
+            + KLmkEncodedDataFileExtension().Length());
+    TPtr ptr = aFilePath->Des();
+
+    // Create the private path(c:\\private\\UID3) for Landmarks UI application
+    TFileName fileName;
+    RFs fs;
+    User::LeaveIfError(fs.Connect());
+    CleanupClosePushL(fs);
+    fs.SessionPath(fileName);
+    fs.MkDirAll(fileName);
+    aFilePath->Des().Append(fileName);
+    CleanupStack::PopAndDestroy(); // fs
+    }
+	
+// ----------------------------------------------------
+// CLmkSender::PrepareMultipleLandmarkForSendL()
+// ----------------------------------------------------
+//
+void CLmkSender::PrepareMultipleLandmarkForSendL(
+        RPointerArray<CLmkLandmark>& aLmkLandmark,
+        const RArray<TPosLmItemId>& aMarkedIds)
+    {
+    /*
+     This function prepares an array of CLmkLandmark from given
+     landmark ids.
+     */
+    for (TInt i = 0; i < aMarkedIds.Count(); i++)
+        {
+        CPosLandmark* landmark = iDb.ReadLandmarkLC(aMarkedIds[i]);
+        CLmkLandmark* lmk;
+        LmkLandmarkFromPosLandmarkL(lmk, *landmark);
+        CleanupStack::Pop(lmk);
+        User::LeaveIfError(aLmkLandmark.Append(lmk));
+        CleanupStack::PopAndDestroy();//landmark
+        }
+    }
+
+// ----------------------------------------------------
+// CLmkSender::LoadFilteredSendListQueryL()
+// ----------------------------------------------------
+//
+void CLmkSender::LoadFilteredSendListQueryL(const CMessageData* aMessageData)
+    {
+    /**
+     * Currently we need to show only four services in the sendui query
+     * 1.via messaging
+     * 2.via bluetooth
+     * 3.via infrared
+     * 4.via email
+     */
+    RPointerArray<CSendingServiceInfo> serviceList;
+    CleanupClosePushL(serviceList);
+    //load all the available services
+    iSendUi->AvailableServicesL(serviceList);
+    TInt count = serviceList.Count();
+    CArrayFixFlat<TUid>* serviceFilter = new (ELeave) CArrayFixFlat<TUid> (
+            count);
+    CleanupStack::PushL(serviceFilter);
+    for (TInt i = 0; i < count; i++)
+        {
+        CSendingServiceInfo* info = serviceList[i];
+        TPtrC ptr = info->ServiceName();
+        CleanupStack::PushL(info);
+        TUid id = info->ServiceId();
+        //check if this service is not one of the required list
+        if (id.iUid != KBluetooth && id.iUid != KInfrared && id.iUid
+                != KEmail && id.iUid != KMessaging)
+            {
+            //unwanted serivce list for filtering.
+            serviceFilter->AppendL(info->ServiceId());
+            }
+        CleanupStack::PopAndDestroy();//info
+        }
+    TSendingCapabilities capabilities(0, 0,
+            TSendingCapabilities::ESupportsAttachments);
+    iSendUi->ShowQueryAndSendL(aMessageData, capabilities, serviceFilter);
+    CleanupStack::PopAndDestroy(2);//serviceList,serviceFilter
+    }
+
+// ----------------------------------------------------
+// CLmkSender::ReplaceSpecialCharactersL
+// ----------------------------------------------------
+//
+TPtr CLmkSender::ReplaceSpecialCharactersL(TPtrC aText)
+    {
+    TBuf<KNumOfReplaceChars> replaceChars;
+    replaceChars.Zero();
+
+    // special chars from Unicode/Character reference
+    replaceChars.Append(0x0022); // """
+    replaceChars.Append(0x002A); // "*"
+    replaceChars.Append(0x002F); // "/"
+
+    replaceChars.Append(0x003A); // ":"
+    replaceChars.Append(0x003C); // "<"
+    replaceChars.Append(0x003E); // ">"
+    replaceChars.Append(0x003F); // "?"
+    replaceChars.Append(0x005C); // "\"
+    replaceChars.Append(0x007C); // "|"
+
+    TInt nameLength = KLmkEncodedDataFileName.iTypeLength;
+    if (nameLength < aText.Length())
+        {
+        nameLength = aText.Length();
+        }
+    HBufC* buffer = HBufC::NewLC(nameLength);
+    TPtr des1 = buffer->Des();
+    des1.Copy(aText);
+    AknTextUtils::ReplaceCharacters(des1, replaceChars, TChar(' '));
+
+    TInt spaceCount = 0;
+    for (TInt i = 0; i < des1.Length(); i++)
+        {
+        if (des1[i] == TChar(' '))
+            spaceCount++;
+        }
+
+    if (spaceCount == des1.Length())
+        {
+        des1.Copy(KLmkEncodedDataFileName);
+        }
+
+    CleanupStack::Pop(buffer);
+    return des1;
+    }
+
+//  End of File
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/uicontrols/src/CLmkSingleGraphicLBModel.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,98 @@
+/*
+* 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:    LandmarksUi Content File -
+*
+*/
+
+
+
+
+
+
+
+
+// INCLUDE FILES
+#include "CLmkSingleGraphicLBModel.h"
+#include "CLmkListProviderBase.h"
+#include "CLmkSelectorCache.h"
+#include "CLmkUiItemBase.h"
+#include <EPos_Landmarks.h>
+#include <e32keys.h>
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CLmkSingleGraphicLBModel::CLmkSingleGraphicLBModel
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+CLmkSingleGraphicLBModel::CLmkSingleGraphicLBModel()
+    {
+
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkSingleGraphicLBModel::ConstructL
+// Symbian 2nd phase constructor can leave.
+// -----------------------------------------------------------------------------
+//
+void CLmkSingleGraphicLBModel::ConstructL(
+                               CLmkListProviderBase& aListProvider )
+    {
+    BaseConstructL( aListProvider );
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkSingleGraphicLBModel::NewL
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+CLmkSingleGraphicLBModel* CLmkSingleGraphicLBModel::NewL(
+    CLmkListProviderBase& aListProvider )
+    {
+    CLmkSingleGraphicLBModel* self = new ( ELeave ) CLmkSingleGraphicLBModel;
+
+    CleanupStack::PushL( self );
+    self->ConstructL( aListProvider );
+    CleanupStack::Pop();
+
+    return self;
+    }
+
+// ----------------------------------------------------
+// CLmkSingleGraphicLBModel::~CLmkSingleGraphicLBModel
+// ----------------------------------------------------
+//
+CLmkSingleGraphicLBModel::~CLmkSingleGraphicLBModel()
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkSingleGraphicLBModel::MdcaPointL
+// ?implementation_description
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+void CLmkSingleGraphicLBModel::MdcaPointL( TInt aIndex ) const
+    {
+    CLmkUiItemBase& item = iCache->ItemAtL( aIndex );
+    TPtr16 modBuffer = iBuffer->Des();
+    modBuffer.Zero();
+    modBuffer.AppendNum( item.GetIconId() );
+    modBuffer.Append( EKeyTab );
+    modBuffer.Append( item.Text() );
+    }
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/uicontrols/src/CLmkUiUtils.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,426 @@
+/*
+* 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:    LandmarksUi Content File -
+*
+*/
+
+
+// INCLUDE FILES
+
+// Added for testing
+#include <eikcapc.h>
+#include <eikimage.h>
+#include <data_caging_path_literals.hrh>
+#include <bautils.h>
+#include <akntitle.h>
+#include <StringLoader.h>
+#include <akncontext.h>
+#include <aknappui.h>
+#include <AknIconUtils.h>
+#include <EPos_CPosLandmark.h>
+#include <lmkerrors.h>
+
+#include "CLmkUiUtils.h"
+#include "MLmkEditorUiBuilder.h"
+#include "MLmkFieldData.h"
+#include "CLmkFieldData.h"
+#include "CLmkFields.h"
+#include "LmkConsts.h"
+#include "landmarks.hrh"
+
+// CONSTANTS
+/// Unnamed namespace for local definitions
+namespace {
+    const TInt KPosUrlColon (3);
+ 
+    _LIT( KPanicMsg, "CLmkUiUtils" );
+
+    void Panic( TPanicCode aReason )
+        {
+        User::Panic( KPanicMsg, aReason );
+        } 
+    } // namespace
+
+//============================ MEMBER FUNCTIONS ===============================
+//----------------------------------------------------------------------------
+// CLmkUiUtils::NewL
+// ----------------------------------------------------------------------------
+//
+CLmkUiUtils* CLmkUiUtils::NewL()
+    {
+    CLmkUiUtils* self = new( ELeave ) CLmkUiUtils();
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop(); //self
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkUiUtils::CLmkUiUtils
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+CLmkUiUtils::CLmkUiUtils()
+    {
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkUiUtils::ConstructL
+// ----------------------------------------------------------------------------
+//
+void CLmkUiUtils::ConstructL()
+    {
+    iNaviPane = static_cast<CAknNavigationControlContainer*>(
+            StatusPane()->ControlL( TUid::Uid(EEikStatusPaneUidNavi) ) );
+
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkUiUtils::~CLmkUiUtils()
+// -----------------------------------------------------------------------------
+//
+CLmkUiUtils::~CLmkUiUtils()
+    {
+    CEikonEnv* env = CEikonEnv::Static();
+    env->DeleteResourceFile( iResourceOffset );
+
+    if ( iNaviLabel )
+        {
+        if (iNaviPane)
+	        {
+	        iNaviPane->Pop( iNaviLabel );
+	        }
+        delete iNaviLabel;     
+        iNaviLabel = NULL;
+        } 
+    
+    delete iOldImage;
+    delete iStoredTitlePaneText;
+
+    //If RestoreOldNaviPaneL is not called, it
+    //must do atleast now
+    if ( iStoredDecorator )
+        {
+        TRAPD( error, RestoreOldNaviPaneL() );
+        if ( error != KErrNone )
+            {
+            env->HandleError( error );
+            }
+        }
+    delete iStoredDecorator;
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkUiUtils::StoreTitlePaneL
+// ----------------------------------------------------------------------------
+//
+void CLmkUiUtils::StoreTitlePaneL()
+	{
+    CEikStatusPane* statusPane = StatusPane();
+    if ( statusPane && statusPane->PaneCapabilities(
+        TUid::Uid(EEikStatusPaneUidTitle) ).IsPresent() )
+        {
+        iTitlePane = static_cast<CAknTitlePane*>( statusPane->
+                            ControlL( TUid::Uid( EEikStatusPaneUidTitle ) ) );
+
+        if ( iTitlePane->Text() )
+            {
+            iStoredTitlePaneText = iTitlePane->Text()->AllocL();
+            }
+        }
+	}
+
+// ----------------------------------------------------------------------------
+// CLmkUiUtils::ChangeTitlePaneL
+// ----------------------------------------------------------------------------
+//
+EXPORT_C void CLmkUiUtils::ChangeTitlePaneL( HBufC* aTitle )
+	{
+    CEikStatusPane* statusPane = StatusPane();
+    if ( statusPane && statusPane->PaneCapabilities(
+        TUid::Uid(EEikStatusPaneUidTitle) ).IsPresent() )
+        {
+        CAknTitlePane* titlePane = static_cast<CAknTitlePane*>( statusPane->
+                            ControlL( TUid::Uid( EEikStatusPaneUidTitle ) ) );
+        titlePane->SetText( aTitle ); // Takes ownership of aTitle
+        }
+	}
+
+// ----------------------------------------------------------------------------
+// CLmkUiUtils::ChangeTitlePaneL
+// ----------------------------------------------------------------------------
+//
+EXPORT_C void CLmkUiUtils::ChangeTitlePaneL( TInt aResourceText )
+    {
+    if ( aResourceText != KZeroResourceId )
+        {
+        HBufC* buf = StringLoader::LoadLC( aResourceText );
+        ChangeTitlePaneL( buf );
+        CleanupStack::Pop(); // buf, ownership transferred
+        }
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkUiUtils::GetFileWithCorrectDriveL
+// ----------------------------------------------------------------------------
+//
+EXPORT_C void CLmkUiUtils::GetFileWithCorrectDriveL( TFileName& aFileName )
+    {
+    TFileName* dllDrive = new( ELeave ) TFileName;
+    CleanupStack::PushL( dllDrive );
+    TParse* parse = new( ELeave ) TParse;
+    CleanupStack::PushL( parse );
+
+    Dll::FileName( *dllDrive );
+	User::LeaveIfError( parse->Set( *dllDrive, NULL, NULL ) );
+    *dllDrive = parse->Drive(); // contains drive, e.g. "c:"
+    User::LeaveIfError( parse->Set( *dllDrive, &aFileName, NULL ) );
+	aFileName = parse->FullName();
+
+    CleanupStack::PopAndDestroy( 2 ); // parse, dlldrive
+    }
+
+// ----------------------------------------------------
+// CLmkUiUtils::AvkonIconFileL
+// ----------------------------------------------------
+//
+TFileName* CLmkUiUtils::AvkonIconFileLC()
+    {
+    TFileName* iconFile = new(ELeave) TFileName(AknIconUtils::AvkonIconFileName());
+    CleanupStack::PushL(iconFile);
+    //return AknIconUtils::AvkonIconFileName(); //fix
+    return iconFile;
+    }
+
+// ----------------------------------------------------
+// CLmkUiUtils::LmkUiIconFileL
+// ----------------------------------------------------
+//
+TFileName* CLmkUiUtils::LmkUiIconFileLC()
+    {
+    TFileName* file = new(ELeave) TFileName( KLmkSystemMbmPath );
+    CleanupStack::PushL(file);
+    file->Append( KLmkUiIconFileName ); //always safe
+    GetFileWithCorrectDriveL( *file );
+    return file;
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkUiUtils::RestoreOldTitlePane
+// ----------------------------------------------------------------------------
+//
+void CLmkUiUtils::RestoreOldTitlePane()
+    {
+    if ( iTitlePane && iStoredTitlePaneText )
+        {
+        // iTitlePane takes ownership of iStoredTitlePaneText
+        iTitlePane->SetText( iStoredTitlePaneText );
+        iStoredTitlePaneText = NULL;
+        }
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkUiUtils::ReadLmkUiResourceFileL
+// ----------------------------------------------------------------------------
+//
+void CLmkUiUtils::ReadLmkUiResourceFileL()
+	{
+	CEikonEnv* env = CEikonEnv::Static();
+    TFileName* file = new( ELeave ) TFileName;
+    CleanupStack::PushL( file );
+
+    file->Append( KLmkTmp_RESOURCE_FILES_DIR ); // always safe
+    file->Append( KLmkUiRscFileName ); // always safe
+    GetFileWithCorrectDriveL( *file ) ;
+    BaflUtils::NearestLanguageFile( env->FsSession(), *file );
+    iResourceOffset = env->AddResourceFileL( *file );
+
+    CleanupStack::PopAndDestroy( file );
+	}
+
+// ----------------------------------------------------
+// CLmkUiUtils::CreateDefaultNaviPaneL
+// ----------------------------------------------------
+//
+void CLmkUiUtils::CreateDefaultNaviPaneL()
+    {
+    iNaviPane->PushDefaultL();
+    }
+
+// ----------------------------------------------------
+// CLmkUiUtils::CreateNaviLabelL
+// ----------------------------------------------------
+//
+void CLmkUiUtils::CreateNaviLabelL( const TDesC& aLabel )
+    {
+    __ASSERT_ALWAYS( iNaviPane, Panic( KLmkPanicNullPointer ) );
+    if ( iNaviLabel )
+        {
+        iNaviPane->Pop( iNaviLabel );
+        delete iNaviLabel;
+        iNaviLabel = NULL;
+        }
+
+    iNaviLabel = iNaviPane->CreateNavigationLabelL( aLabel );
+    iNaviPane->PushL( *iNaviLabel ); // activate navi label in navi pane
+    }
+
+// ----------------------------------------------------
+// CLmkUiUtils::StoreNaviPaneL
+// ----------------------------------------------------
+//
+void CLmkUiUtils::StoreNaviPaneL()
+    {
+    iStoredDecorator = iNaviPane->Top();
+    }
+
+// ----------------------------------------------------
+// CLmkUiUtils::RestoreOldNaviPaneL
+// ----------------------------------------------------
+//
+void CLmkUiUtils::RestoreOldNaviPaneL()
+    {
+    if ( iStoredDecorator && iNaviPane )
+        {
+        iNaviPane->PushL( *iStoredDecorator );
+        iStoredDecorator = NULL;
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkUiUtils::SwapNewContextIcon
+// -----------------------------------------------------------------------------
+//
+void CLmkUiUtils::SwapNewContextIconL( CEikImage* aNewImage )
+    {
+    SetContextPaneL();
+    if ( iContextPane )
+        {
+        iOldImage = iContextPane->SwapPicture( aNewImage );
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkUiUtils::SetOldContextIcon
+// -----------------------------------------------------------------------------
+//
+void CLmkUiUtils::SetOldContextIcon()
+    {
+    if ( iContextPane && iOldImage && iOldImage->Bitmap())
+        {
+        iContextPane->SetPicture( iOldImage );
+        iOldImage = NULL;
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkUiUtils::UpdateContextIconL
+// -----------------------------------------------------------------------------
+//
+void CLmkUiUtils::UpdateContextIconL( CEikImage* aNewImage )
+    {
+    SetContextPaneL();
+    if ( iContextPane )
+        {
+        iContextPane->SetPicture( aNewImage );
+        }
+    }
+
+// ----------------------------------------------------------------------------
+// CLmkUiUtils::StatusPane
+// ----------------------------------------------------------------------------
+//
+CEikStatusPane* CLmkUiUtils::StatusPane()
+    {
+    return CEikonEnv::Static()->AppUiFactory()->StatusPane();
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkUiUtils::SetContextPane
+// -----------------------------------------------------------------------------
+//
+void CLmkUiUtils::SetContextPaneL()
+    {
+    iContextPane = static_cast<CAknContextPane*>(
+                StatusPane()->ControlL( TUid::Uid(
+                    EEikStatusPaneUidContext ) ) );
+    }
+
+
+// ----------------------------------------------------------------------------
+// CLmkUiUtils::ChangeLmNameLabelIconL()
+// ----------------------------------------------------------------------------
+//
+EXPORT_C void CLmkUiUtils::ChangeLmNameLabelIconL (
+              MLmkEditorUiBuilder& aUiBuilder,
+              MLmkFieldData& nameField)
+	{
+	if ( nameField.FieldType() == EName )
+		{
+		CEikImage* image = new(ELeave) CEikImage();
+		CleanupStack::PushL( image );
+		//TFileName* defaultIconFile =  CLmkUiUtils::LmkUiIconFileLC();
+		// No need to add iconFile to cleanupstack since it is a member variable from CLmkFieldData class
+		HBufC* iconFile = nameField.IconPath();
+		TInt err = KErrNotFound;
+		CFbsBitmap* bitmap = NULL;
+		CFbsBitmap* mask = NULL;
+
+		if (iconFile) // landmark has a defined icon
+			{
+			if ( nameField.IconId() != KErrNotFound )
+				{
+				TRAP(err,AknIconUtils::CreateIconL( bitmap, mask,
+									   *iconFile, nameField.IconId(),
+									   nameField.IconId()+1 ););
+				}
+
+			image->SetPictureOwnedExternally(EFalse);
+			image->SetPicture(bitmap, mask);
+			image->CopyControlContextFrom(aUiBuilder.LineControl( nameField.UniqueFieldIdentity() ));
+			image->SetContainerWindowL(*aUiBuilder.LineControl( nameField.UniqueFieldIdentity() ));
+			image->SetNonFocusing();
+			image->SetBrushStyle(CGraphicsContext::ENullBrush);
+			delete aUiBuilder.LineControl(nameField.UniqueFieldIdentity())->iBitmap;
+			aUiBuilder.LineControl(nameField.UniqueFieldIdentity())->iBitmap = image;
+			aUiBuilder.LineControl(nameField.UniqueFieldIdentity())->iBitmap = image;
+
+			TRect rect = aUiBuilder.LineControl(nameField.UniqueFieldIdentity())->Rect();
+			rect.Resize(-1, -1);
+			aUiBuilder.LineControl(nameField.UniqueFieldIdentity())->SetRect(rect);
+			rect.Resize(1, 1);
+			aUiBuilder.LineControl(nameField.UniqueFieldIdentity())->SetRect(rect);
+			}
+		CleanupStack::Pop(image);
+		}
+	}
+
+// ----------------------------------------------------------------------------
+// CLmkUiUtils::FindIfWebAddrFieldIsEmpty()
+// ----------------------------------------------------------------------------
+//
+TBool CLmkUiUtils::FindIfWebAddrFieldIsEmpty (const TDes& aUrl)
+	{
+	TBool result = EFalse;
+	TInt totalLength = aUrl.Length();
+	TInt forSlashPos = aUrl.Find(KProtocol);
+	if (((forSlashPos + KPosUrlColon) > 0 &&
+		(forSlashPos + KPosUrlColon) >= totalLength ))
+		{
+		result = ETrue;
+		}
+    return result;
+	}
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/uicontrols/src/Debug.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,95 @@
+/*
+* 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:    LandmarksUi Content File -    Contains debugging functions
+*
+*/
+
+
+
+
+
+
+
+
+// INCLUDE FILES
+#include "Debug.h"
+#include <flogger.h>
+#include <e32svr.h>
+
+#ifdef __LMK_DEBUG_FLAG
+
+// CONSTANTS
+#ifdef _DEBUG
+/// Folder where the log resides
+_LIT( KLogFolder, "Lmk" );
+
+/// The name of the log file
+_LIT( KLogFileName, "Lmk" );
+
+/// The format in which the time is formatted in log
+_LIT( KLogTimeFormat, "%02d.%02d:%02d:%06d ");
+
+/// The length of the string produced by KLocLogTimeFormat
+const TInt KLogTimeFormatLength = 16;
+
+/// How many characters a log line can contain
+const TInt KLogLineLength = 256;
+#endif
+// ========================== OTHER EXPORTED FUNCTIONS =========================
+
+
+// -----------------------------------------------------------------------------
+// Debug
+// Generates a log file if c:\logs\LMK\ folder exists
+// -----------------------------------------------------------------------------
+//
+void Debug( TRefByValue<const TDesC> aText, ... )
+    {
+    #ifdef _DEBUG
+    RDebug::Print(aText);
+
+    VA_LIST args;
+    VA_START( args, aText );
+
+    TBuf<KLogLineLength> buf;
+    buf.FormatList( aText, args );
+
+    RFileLogger logger;
+    TInt ret=logger.Connect();
+    if (ret==KErrNone)
+        {
+        logger.SetDateAndTime( EFalse,EFalse );
+        logger.CreateLog( KLogFolder, KLogFileName, EFileLoggingModeAppend );
+        TBuf<KLogTimeFormatLength> timeStamp;
+        TTime now;
+        now.HomeTime();
+        TDateTime dateTime;
+        dateTime = now.DateTime();
+        timeStamp.Format( KLogTimeFormat,
+            dateTime.Hour(), dateTime.Minute(),
+            dateTime.Second(), dateTime.MicroSecond() );
+        buf.Insert( 0, timeStamp );
+
+        logger.Write(buf);
+        }
+
+    logger.Close();
+
+    VA_END( args );
+    #endif
+    }
+
+#endif // __LMK_DEBUG_FLAG
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/uicontrols/src/DllMain.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,36 @@
+/*
+* 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:    LandmarksUi Content File -    Dll entry point
+*
+*/
+
+
+
+
+
+
+
+// INCLUDE FILES
+#include "DllMain.h"
+
+// ================= MEMBER FUNCTIONS =======================
+
+void LmkEngPanic( TInt aCode ) // panic code
+    {
+    _LIT( KPanicText, "LmkEng" );
+    User::Panic( KPanicText, aCode );
+    }
+
+// ==================== LOCAL FUNCTIONS ====================
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/uicontrols/src/LmkEditorFieldFactory.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,152 @@
+/*
+* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:    Methods for Landmark field factory class.
+*
+*/
+
+
+
+
+
+
+
+// INCLUDE FILES
+#include "LmkEditorFieldFactory.h"  // this class
+#include "CLmkEditorTextField.h"
+#include "CLmkEditorNumberField.h"
+#include "CLmkEditorListField.h"
+#include "CLmkEditorCoordinateField.h"
+#include "MLmkFieldData.h"
+#include "landmarks.hrh"
+#include <e32std.h>
+#include <lmkerrors.h>
+
+
+/// Unnamed namespace for local definitons
+namespace {
+
+// LOCAL CONSTANTS AND MACROS
+
+// ==================== LOCAL FUNCTIONS ====================
+
+#ifdef _DEBUG
+void Panic(TPanicCode aReason)
+    {
+    _LIT(KPanicText, "LmkEditorFieldFactory");
+    User::Panic(KPanicText, aReason);
+    }
+#endif  // _DEBUG
+
+}  // namespace
+
+
+// ================= MEMBER FUNCTIONS =======================
+
+// ----------------------------------------------------
+// LmkEditorFieldFactory::CreateFieldL
+// ----------------------------------------------------
+//
+MLmkEditorField* LmkEditorFieldFactory::CreateFieldL
+        ( MLmkFieldData& aField,
+          MLmkEditorUiBuilder& aUiBuilder )
+    {
+    MLmkEditorField* editorField = NULL;
+    switch( aField.EditorType() )
+        {
+        //case ETextFieldEditor:
+        // Added for rel3.1
+        case ETextGenericFieldEditor:
+        case ETextPhoneNumberFieldEditor:
+       	case ETextUriFieldEditor :
+            {
+            editorField = CLmkEditorTextField::NewL( aField, aUiBuilder );
+            break;
+            }
+        case ENumberFieldEditor:
+            {
+            editorField = CLmkEditorNumberField::NewL( aField, aUiBuilder );
+            break;
+            }
+        case EListFieldEditor:
+            {
+            editorField = CLmkEditorListField::NewL( aField, aUiBuilder );
+            break;
+            }
+        case ECoordinateFieldEditor:
+            {
+            editorField = CLmkEditorCoordinateField::NewL( aField,
+                                                           aUiBuilder );
+            break;
+            }
+        default:
+            {
+            __ASSERT_DEBUG( EFalse, Panic(
+                KLmkPanicUnknownControlType ) );
+            break;
+            }
+        }
+
+    return editorField;
+    }
+
+
+MLmkEditorField* LmkEditorFieldFactory::CreateFieldL
+        ( MLmkFieldData& aField,
+          MLmkEditorUiBuilder& aUiBuilder,const TDesC& aCategoryName )
+    {
+
+    MLmkEditorField* editorField = NULL;
+    switch( aField.EditorType() )
+        {
+        //case ETextFieldEditor:
+        //case ETextFieldEditor:
+        // Added for rel3.1
+        case ETextGenericFieldEditor:
+        case ETextPhoneNumberFieldEditor:
+       	case ETextUriFieldEditor :
+            {
+            editorField = CLmkEditorTextField::NewL( aField, aUiBuilder );
+            break;
+            }
+        case ENumberFieldEditor:
+            {
+            editorField = CLmkEditorNumberField::NewL( aField, aUiBuilder );
+            break;
+            }
+        case EListFieldEditor:
+            {
+            editorField = CLmkEditorListField::NewL( aField, aUiBuilder,aCategoryName );
+            break;
+            }
+        case ECoordinateFieldEditor:
+            {
+            editorField = CLmkEditorCoordinateField::NewL( aField,
+                                                           aUiBuilder );
+            break;
+            }
+        default:
+            {
+            __ASSERT_DEBUG( EFalse, Panic(
+                KLmkPanicUnknownControlType ) );
+            break;
+            }
+        }
+
+    return editorField;
+    }
+
+
+
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/uicontrols/src/LmkNotes.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,312 @@
+/*
+* 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:    LandmarksUi Content File -    Provides landmarks note class methods.
+*
+*/
+
+
+
+
+
+
+
+// INCLUDE FILES
+#include <aknmessagequerydialog.h>
+#include <StringLoader.h>
+#include <aknnotewrappers.h>
+#include <AknQueryDialog.h>
+#include <lmkui.rsg>
+#include <aknconsts.h>
+#include "LmkNotes.h"
+#include "LmkConsts.h"
+
+// ================= MEMBER FUNCTIONS =======================
+//-----------------------------------------------------------------------
+// LmkNotes::CategoryConfirmationQueryL
+// ----------------------------------------------------------------------------
+//
+EXPORT_C TInt LmkNotes::CategoryConfirmationQueryL( CEikonEnv* aEnv, const TInt aAmount )
+    {
+    HBufC* noteText = NULL;
+
+    if ( aAmount > 1)
+        {
+        noteText = StringLoader::LoadLC( R_LMK_DELETE_CATEGORIES,
+                                         aAmount, aEnv );
+        }
+    else
+        {
+        noteText = StringLoader::LoadLC( R_LMK_DELETE_CATEGORY, aEnv );
+        }
+
+    CAknQueryDialog* query =
+        new( ELeave ) CAknQueryDialog( *noteText );
+    TInt ret = query->ExecuteLD( R_LMK_QUERY );//*noteText );
+
+    CleanupStack::PopAndDestroy(noteText); //noteText
+    return ret;
+    }
+
+//-----------------------------------------------------------------------
+// LmkNotes::LandmarkConfirmationQueryL
+// ----------------------------------------------------------------------------
+//
+EXPORT_C TInt LmkNotes::LandmarkConfirmationQueryL( CEikonEnv* aEnv, const TInt aAmount )
+    {
+    HBufC* noteText = NULL;
+
+    if ( aAmount > 1 )
+        {
+        noteText = StringLoader::LoadLC( R_LMK_DELETE_LANDMARKS,
+                                         aAmount, aEnv );
+        }
+    else
+        {
+        noteText = StringLoader::LoadLC( R_LMK_DELETE_LANDMARK, aEnv );
+        }
+
+    CAknQueryDialog* query =
+        new( ELeave ) CAknQueryDialog( *noteText );
+    TInt ret = query->ExecuteLD( R_LMK_QUERY );//*noteText );
+
+    CleanupStack::PopAndDestroy(noteText); //noteText
+    return ret;
+    }
+
+//-----------------------------------------------------------------------
+// LmkNotes::InformationNoteL
+// ----------------------------------------------------------------------------
+//
+EXPORT_C void LmkNotes::InformationNoteL( CEikonEnv* aEnv, const TInt aResourceId )
+    {
+    HBufC* noteText = StringLoader::LoadLC( aResourceId, aEnv );
+
+    CAknInformationNote* dialog =
+        new( ELeave ) CAknInformationNote( R_AKN_INFORMATION_NOTE_WAIT );
+    dialog->ExecuteLD( *noteText );
+
+    CleanupStack::PopAndDestroy(noteText); //noteText
+    }
+
+//-----------------------------------------------------------------------
+// LmkNotes::CategoryNameQueryL
+// ----------------------------------------------------------------------------
+//
+EXPORT_C TInt LmkNotes::CategoryNameQueryL( TDes& aDataText,
+                                             const TInt aResourceId )
+    {
+    CAknTextQueryDialog* dlg = new( ELeave ) CAknTextQueryDialog(aDataText,
+                                                    CAknQueryDialog::ENoTone);
+    return dlg->ExecuteLD(aResourceId);
+    }
+
+//-----------------------------------------------------------------------
+// LmkNotes::InformationNoteL
+// ----------------------------------------------------------------------------
+//
+EXPORT_C void LmkNotes::InformationNotewithTextL( CEikonEnv* aEnv,
+           TInt aResourceId, TPtrC aTextPtr )
+    {
+    HBufC* noteText = StringLoader::LoadLC( aResourceId, aTextPtr, aEnv );
+
+    CAknInformationNote* dialog =
+        new( ELeave ) CAknInformationNote( R_AKN_INFORMATION_NOTE_WAIT );
+    dialog->ExecuteLD( *noteText );
+
+    CleanupStack::PopAndDestroy(noteText); //noteText
+    }
+//-----------------------------------------------------------------------
+// LmkNotes::OutOfMemoryNoteL
+// ----------------------------------------------------------------------------
+//
+EXPORT_C void LmkNotes::OutOfMemoryNoteL( CEikonEnv* aEnv )
+	{
+    HBufC* noteText = StringLoader::LoadL( R_LMK_MEMLO_NOT_ENOUGH_MEMORY, aEnv );
+    CleanupStack::PushL(noteText);
+    CAknErrorNote* dialog =
+        new(ELeave)CAknErrorNote(ETrue);
+    dialog->SetTone(CAknNoteDialog::EErrorTone);
+    dialog->ExecuteLD( *noteText );
+    CleanupStack::PopAndDestroy(noteText); //noteText
+	}
+//-----------------------------------------------------------------------
+// LmkNotes::MessageQueryL()
+// ----------------------------------------------------------------------------
+//
+EXPORT_C void LmkNotes::MessageQueryL( CEikonEnv* aEnv, TDes& aMsg, TInt aCount )
+	{
+	CAknMessageQueryDialog* dialog = new (ELeave) CAknMessageQueryDialog;
+    HBufC* headerText;
+    headerText =  StringLoader::LoadL(R_LMK_CATEGORIES_QUERY_PROMPT,
+                                      aCount,
+                                      aEnv );
+    dialog->SetHeaderTextL(*headerText);
+    delete headerText;
+    dialog->SetMessageTextL( aMsg );
+    dialog->ExecuteLD(R_LMK_MESSAGE_QUERY_DIALOG);
+	}
+//-----------------------------------------------------------------------
+// LmkNotes::AllLandmarksEmptyNoteL
+// ----------------------------------------------------------------------------
+//
+EXPORT_C void LmkNotes::AllLandmarksEmptyNoteL( CEikonEnv* aEnv )
+	{
+    HBufC* noteText = StringLoader::LoadLC( R_LM_SHOW_ERROR_NO_COORDINATES, aEnv );
+
+    CAknInformationNote* dialog =
+        new( ELeave ) CAknInformationNote( R_AKN_ERROR_NOTE_WAIT );
+    dialog->ExecuteLD( *noteText );
+
+    CleanupStack::PopAndDestroy(noteText); //noteText
+	}
+
+//-----------------------------------------------------------------------
+// LmkNotes::LandmarksEmptyNoteL
+// ----------------------------------------------------------------------------
+//
+EXPORT_C void LmkNotes::LandmarksEmptyNoteL( CEikonEnv* aEnv, TPtrC aLandmarkName )
+	{
+    HBufC* noteText = StringLoader::LoadLC( R_LM_SHOW_ERROR_NO_DATA,
+    										aLandmarkName,
+    										aEnv );
+
+    CAknInformationNote* dialog =
+        new( ELeave ) CAknInformationNote( R_AKN_ERROR_NOTE_WAIT );
+    dialog->ExecuteLD( *noteText );
+
+    CleanupStack::PopAndDestroy(noteText); //noteText
+	}
+
+//-----------------------------------------------------------------------
+// LmkNotes::CategoryEmptyNoteL
+// ----------------------------------------------------------------------------
+//
+EXPORT_C void LmkNotes::CategoryEmptyNoteL( CEikonEnv* aEnv, TPtrC aCategoryName )
+	{
+    HBufC* noteText = StringLoader::LoadLC( R_LM_SHOW_ERROR_CATEGORY_NO_COORDINATES,
+    										aCategoryName,
+    										aEnv );
+
+    CAknInformationNote* dialog =
+        new( ELeave ) CAknInformationNote( R_AKN_ERROR_NOTE_WAIT );
+    dialog->ExecuteLD( *noteText );
+
+    CleanupStack::PopAndDestroy(noteText); //noteText
+	}
+
+//-----------------------------------------------------------------------
+// LmkNotes::CategoryEmptyNoteL
+// ----------------------------------------------------------------------------
+//
+EXPORT_C void LmkNotes::LandmarkInCategoryEmptyNoteL( CEikonEnv* aEnv, TPtrC aCategoryName, TPtrC aLandmark)
+	{
+	CPtrC16Array* array = new (ELeave) CPtrC16Array(2);
+	CleanupStack::PushL(array);
+	array->AppendL( aLandmark );
+	array->AppendL( aCategoryName );
+
+    HBufC* noteText = StringLoader::LoadLC( R_LM_SELECT_FROM_MAP,
+											*array,
+    										aEnv );
+
+    CAknInformationNote* dialog =
+        new( ELeave ) CAknInformationNote( R_AKN_ERROR_NOTE_WAIT );
+    dialog->ExecuteLD( *noteText );
+    CleanupStack::PopAndDestroy(2); //noteText, array
+	}
+
+//-----------------------------------------------------------------------
+// LmkNotes::ShowDelayedInfoPopupL
+// ----------------------------------------------------------------------------
+//
+
+EXPORT_C CAknInfoPopupNoteController* LmkNotes::ShowDelayedInfoPopupL( TDesC& aMsg,TPoint& /*aPosition*/ )
+	{
+	CAknInfoPopupNoteController*infopopup  = CAknInfoPopupNoteController::NewL ();
+	infopopup->SetTextL(aMsg);
+	return infopopup;
+
+	}
+
+//-----------------------------------------------------------------------
+// LmkNotes::ShowOwerriteLocationQueryL
+// ----------------------------------------------------------------------------
+//
+EXPORT_C TInt LmkNotes::ShowOwerriteLocationQueryL( CEikonEnv* aEnv )
+	{
+    HBufC* noteText = NULL;
+    noteText = StringLoader::LoadLC( R_LM_QUERY_EDITOR_REPLACE,aEnv);
+    CAknQueryDialog* query =
+        new( ELeave ) CAknQueryDialog( *noteText );
+    TInt ret = query->ExecuteLD( R_LMK_QUERY );
+
+    CleanupStack::PopAndDestroy(noteText); //noteText
+    return ret;
+	}
+
+//-----------------------------------------------------------------------
+// LmkNotes::MessageQueryWithLinkL()
+// ----------------------------------------------------------------------------
+//
+EXPORT_C TInt LmkNotes::MessageQueryWithLinkL( CEikonEnv* aEnv, TInt aHeadingText,
+											   TInt aMsgQueryText, TInt aLinkText,
+											   TCallBack aCallBack)
+	{
+    HBufC* headPaneText = StringLoader::LoadLC(
+                      aHeadingText, ( aEnv ));
+
+    HBufC* msgQueryText = StringLoader::LoadLC(
+          aMsgQueryText, ( aEnv ));
+
+
+    HBufC* linkText = StringLoader::LoadLC(
+          aLinkText, ( aEnv ));
+
+	HBufC* msgQText = HBufC::NewLC ( msgQueryText->Length() +
+				 					 KNewLine().Length() +
+				 					 linkText->Length() ) ;
+
+	msgQText->Des().Copy(*msgQueryText);
+    msgQText->Des().Append(KNewLine);
+    msgQText->Des().Append(*linkText);
+
+    CAknMessageQueryDialog* dlg = CAknMessageQueryDialog::NewL(*msgQText);
+	dlg->PrepareLC(R_LMK_MESSAGE_QUERY_DIALOG2);
+	dlg->Heading()->SetTextL(*headPaneText);
+	dlg->SetLinkTextL(*linkText);
+	dlg->SetLink(aCallBack);
+	TInt result = dlg->RunLD();
+	CleanupStack::PopAndDestroy(4);
+	return result;
+	}
+
+//-----------------------------------------------------------------------
+// LmkNotes::GenericMessageQueryL()
+// ----------------------------------------------------------------------------
+//
+EXPORT_C TInt LmkNotes::GenericMessageQueryL( CEikonEnv* aEnv, TInt aMsgQueryText,
+											  TInt aHeadingText )
+	{
+	HBufC* msgQueryText = StringLoader::LoadLC(
+          aMsgQueryText, ( aEnv ));
+    HBufC* headPaneText = StringLoader::LoadLC(
+                      aHeadingText, ( aEnv ));
+	CAknMessageQueryDialog* dlg = CAknMessageQueryDialog::NewL(*msgQueryText);
+    dlg->PrepareLC(R_LMK_MESSAGE_QUERY_DIALOG3);
+    dlg->Heading()->SetTextL(*headPaneText);
+	TInt result = dlg->RunLD();
+	CleanupStack::PopAndDestroy(2);//msgQueryText,headPaneText
+	return result;
+	}
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/uicontrols/src/TLmkDeletionHelper.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,154 @@
+/*
+* 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:    LandmarksUi Content File -
+*
+*/
+
+
+
+
+
+
+
+
+
+// INCLUDE FILES
+#include "TLmkDeletionHelper.h"
+#include <eiklbx.h>
+#include <aknlists.h>
+#include <lmkerrors.h>
+
+
+#if defined(_DEBUG)
+
+// CONSTANTS
+/// Unnamed namespace for local definitions
+namespace {
+_LIT( KPanicMsg, "TLmkDeletionHelper" );
+
+void Panic( TPanicCode aReason )
+    {
+    User::Panic( KPanicMsg, aReason );
+    }
+}  // namespace
+#endif
+
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// TLmkDeletionHelper::TLmkDeletionHelper
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+TLmkDeletionHelper::TLmkDeletionHelper()
+    : iUserRequestedDelete( EFalse ),
+      iCurrentItemIndexBeforeRemoval( -1 ),
+      iCurrentItemWasRemoved( EFalse ),
+      iIndexesToRemovedItems( NULL ),
+      iListBox( NULL )
+    {
+    }
+
+// ----------------------------------------------------
+// TLmkDeletionHelper::~TLmkDeletionHelper
+// ----------------------------------------------------
+//
+TLmkDeletionHelper::~TLmkDeletionHelper()
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// TLmkDeletionHelper::StoreListInformation
+// -----------------------------------------------------------------------------
+//
+void TLmkDeletionHelper::StoreListInformation(
+    CEikListBox& aListBox,
+    TBool aMultipleItems )
+    {
+    iListBox = &aListBox;
+    iUserRequestedDelete = ETrue;
+    /*
+    * After deletion, the focus must go to the first item,
+    * commenting re-assigning the iCurrentItemIndexBeforeRemoval
+    * with zero.
+    */
+	iCurrentItemIndexBeforeRemoval = iListBox->CurrentItemIndex();
+	//iCurrentItemIndexBeforeRemoval = KTopListIndex;
+    if ( aMultipleItems )
+        {
+        iIndexesToRemovedItems = iListBox->SelectionIndexes();
+        // This parameter is not important in this case:
+        iCurrentItemWasRemoved = EFalse;
+        }
+    else
+        {
+        iCurrentItemWasRemoved = ETrue;
+        // This parameter is not important in this case:
+        iIndexesToRemovedItems = NULL;
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// TLmkDeletionHelper::UpdateListIfDeleteHappenedL
+// -----------------------------------------------------------------------------
+//
+TBool TLmkDeletionHelper::UpdateListIfDeleteHappenedL()
+    {
+    // Avkon's utility seems to work nicely even if operation was cancelled
+    // and some items were not deleted.
+
+    if ( iUserRequestedDelete )
+        {
+        if( iIndexesToRemovedItems )
+            {
+            // We need to make a copy of the index array since AknListBoxUtils
+            // requires a non-const parameter:
+            TInt count = iIndexesToRemovedItems->Count();
+            // If index array exists it always contains some items:
+            __ASSERT_DEBUG( count > 0, Panic( KLmkPanicDeletionInfo ) );
+            CArrayFix<TInt>* removedItems =
+                new( ELeave ) CArrayFixFlat<TInt>( count );
+            CleanupStack::PushL( removedItems );
+            for ( TInt i( 0 ); i < count; ++i )
+                {
+                removedItems->AppendL( iIndexesToRemovedItems->At( i ) );
+                }
+
+            AknListBoxUtils::HandleItemRemovalAndPositionHighlightL(
+                                                iListBox,
+                                                iCurrentItemIndexBeforeRemoval,
+                                                *removedItems );
+            CleanupStack::PopAndDestroy( removedItems );
+            }
+        else
+            {
+            AknListBoxUtils::HandleItemRemovalAndPositionHighlightL(
+                                                iListBox,
+                                                iCurrentItemIndexBeforeRemoval,
+                                                iCurrentItemWasRemoved );
+            }
+        // List update now done, set indicator to EFalse:
+        iUserRequestedDelete = EFalse;
+        return ETrue;
+        }
+    else
+        { // Delete hasn't been performed by the user,
+          // i.e. StoreListInformation() hasn't been called
+        return EFalse;
+        }
+    }
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/uicontrols/src/cLmkcentralrepository.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,203 @@
+/*
+* 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:    LandmarksUi Content File -
+*
+*/
+
+
+
+
+
+
+
+
+// System Include
+#include <centralrepository.h>
+#include <locnotprefplugindomaincrkeys.h>
+#include <lmkerrors.h>
+
+// INCLUDE FILES
+#include "clmkcentralrepository.h"
+
+// CONSTANTS
+const TUint32 KNullKey = 0;
+#if defined(_DEBUG)
+/// Unnamed namespace for local definitions
+namespace {
+
+_LIT( KPanicMsg, "CLmkCentralRepository");
+
+void Panic( TPanicCode aReason )
+    {
+    User::Panic( KPanicMsg, aReason );
+    }
+}  // namespace
+#endif
+
+
+// ============================ MEMBER FUNCTIONS ==============================
+
+// ---------------------------------------------------------------------------
+// CLmkCentralRepository::CLmkCentralRepository()
+// ---------------------------------------------------------------------------
+//
+CLmkCentralRepository::CLmkCentralRepository( TUint32 aKey ,
+        					MLmkCentralRepositoryObserver*	aObserver)
+	:CActive( EPriorityStandard ),
+	iKey( aKey ),
+	iObserver( aObserver )
+	{
+	}
+
+// ---------------------------------------------------------------------------
+// CLmkCentralRepository::~CLmkCentralRepository()
+// ---------------------------------------------------------------------------
+//
+CLmkCentralRepository::~CLmkCentralRepository()
+	{
+	Cancel();
+	delete iRepository;
+	iRepository = NULL;
+	}
+
+// ---------------------------------------------------------------------------
+// CLmkCentralRepository::NewL()
+// ---------------------------------------------------------------------------
+//
+CLmkCentralRepository* CLmkCentralRepository::NewL()
+	{
+    CLmkCentralRepository* self =
+                        CLmkCentralRepository::NewLC();
+	CleanupStack::Pop(self);
+	return self;
+	}
+
+// ---------------------------------------------------------------------------
+// CLmkCentralRepository::NewLC()
+// ---------------------------------------------------------------------------
+//
+CLmkCentralRepository* CLmkCentralRepository::NewLC()
+	{
+    CLmkCentralRepository* self =
+                        new(ELeave) CLmkCentralRepository( KNullKey,NULL );
+	CleanupStack::PushL(self);
+	self->ConstructL();
+	return self;
+	}
+
+// ---------------------------------------------------------------------------
+// CLmkCentralRepository::NewL()
+// ---------------------------------------------------------------------------
+//
+CLmkCentralRepository* CLmkCentralRepository::NewL( TUint32 aKey ,
+        					MLmkCentralRepositoryObserver*	aObserver)
+	{
+    CLmkCentralRepository* self =
+                        CLmkCentralRepository::NewLC( aKey, aObserver);
+	CleanupStack::Pop(self);
+	return self;
+	}
+
+// ---------------------------------------------------------------------------
+// CLmkCentralRepository::NewLC()
+// ---------------------------------------------------------------------------
+//
+CLmkCentralRepository* CLmkCentralRepository::NewLC( TUint32 aKey ,
+        					MLmkCentralRepositoryObserver*	aObserver)
+	{
+    CLmkCentralRepository* self =
+                        new(ELeave) CLmkCentralRepository( aKey,aObserver );
+	CleanupStack::PushL(self);
+	self->Construct2L();
+	return self;
+	}
+
+// ---------------------------------------------------------------------------
+// CLmkCentralRepository::Construct2L()
+// ---------------------------------------------------------------------------
+//
+void CLmkCentralRepository::Construct2L()
+	{
+	ConstructL();
+	StartNotification();
+	}
+// ---------------------------------------------------------------------------
+// CLmkCentralRepository::ConstructL()
+// ---------------------------------------------------------------------------
+//
+void CLmkCentralRepository::ConstructL()
+	{
+	CActiveScheduler::Add( this );
+	//creates central repository
+	iRepository = CRepository::NewL(TUid::Uid( KCRUidLocNotationPref ));
+	}
+
+// --------------------------------------------------------------------------
+// CLmkCentralRepository::RunL()
+// ---------------------------------------------------------------------------
+//
+void CLmkCentralRepository::RunL()
+    {
+    // Issue Notification
+    iObserver->HandleCentralRepositoryChangeL();
+
+    // Schedule for listening to change events again
+    StartNotification();
+    }
+
+// --------------------------------------------------------------------------
+// CLmkCentralRepository::DoCancel()
+// ---------------------------------------------------------------------------
+//
+void CLmkCentralRepository::DoCancel()
+    {
+    if( iKey != KNullKey)
+	    {
+	     // Cancel the outstanding CR notification request
+    	iRepository->NotifyCancel( iKey );
+	    }
+    }
+
+// --------------------------------------------------------------------------
+// CLmkCentralRepository::StartNotification()
+// ---------------------------------------------------------------------------
+//
+TInt CLmkCentralRepository::StartNotification()
+    {
+    __ASSERT_DEBUG( iObserver, Panic( KLmkPanicNullMember ) );
+    __ASSERT_DEBUG( iKey != KNullKey, Panic( KLmkPanicKeyNotSet ) );
+    TInt err = KErrNone;
+    if( !IsActive())
+        {
+        iStatus = KRequestPending;
+        // Request for notification
+        err = iRepository->NotifyRequest( iKey, iStatus);
+        if( KErrNone == err )
+	        {
+	        SetActive();
+	        }
+        }
+    return err;
+    }
+
+// --------------------------------------------------------------------------
+// CLmkCentralRepository::GetKeyValue()
+// ---------------------------------------------------------------------------
+//
+TInt CLmkCentralRepository::GetKeyValue(TUint32 aKey, TInt& aValue)
+	{
+	return iRepository->Get( aKey,aValue );
+	}
+// End of File
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/uicontrols/src/clmkmapnavigationinterface.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,626 @@
+/*
+* Copyright (c) 2006-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:    Applications interface class to map and navigation use cases
+*
+*/
+
+
+// INCLUDE FILES
+#include <AiwGenericParam.h>
+#include <epos_poslandmarkserialization.h>
+#include <lbsposition.h>
+#include <eikenv.h>
+#include <StringLoader.h>
+#include <lmkui.rsg>
+#include <EPos_CPosLandmarkDatabase.h>
+#include <EPos_CPosLmOperation.h>
+#include <EPos_CPosLandmark.h>
+#include <EPos_Landmarks.h>
+#include <e32math.h>
+#include <AiwServiceHandler.h>
+#include <AknQueryDialog.h>
+#include <mnaiwservices.h>
+#include <AknWaitDialog.h>
+#include "clmkdbsearchutils.h"
+#include "CLmkSender.h"
+#include "CLmkEditorImpl.h"
+#include "LmkNotes.h"
+#include "clmkmapnavigationinterface.h"
+
+// ================= LOCAL FUNCTIONS =======================
+static void CleanupArray(TAny* aArray)
+    {
+    ( reinterpret_cast<RPointerArray<CPosLandmark>*>( aArray ) )->ResetAndDestroy();
+    }
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CLmkMapNavigationInterface::CLmkMapNavigationInterface
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+CLmkMapNavigationInterface::CLmkMapNavigationInterface( CPosLandmarkDatabase& aDb )
+	: iDb(aDb)
+	{
+	}
+
+// -----------------------------------------------------------------------------
+// CLmkMapNavigationInterface::ConstructL
+// Symbian 2nd phase constructor can leave.
+// -----------------------------------------------------------------------------
+//
+void CLmkMapNavigationInterface::ConstructL()
+	{
+	iAiwServiceHandler = CAiwServiceHandler::NewL();
+	iInList = CAiwGenericParamList::NewL();
+    iOutList = CAiwGenericParamList::NewL();
+	iSearchUtil = NULL;
+	iCategoryName = NULL;
+	iCategoryId = KPosLmNullItemId;
+	iEnv = CEikonEnv::Static();
+	}
+
+// -----------------------------------------------------------------------------
+// CLmkMapNavigationInterface::NewL
+// Symbian 1st phase constructor can leave.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CLmkMapNavigationInterface* CLmkMapNavigationInterface::NewL( CPosLandmarkDatabase& aDb)
+	{
+	CLmkMapNavigationInterface* self = static_cast<CLmkMapNavigationInterface*>(Dll::Tls());
+	if(!self)
+		{
+		self = new (ELeave) CLmkMapNavigationInterface( aDb );
+		CleanupStack::PushL( self );
+		self->ConstructL();
+		CleanupStack::Pop();//self
+		Dll::SetTls(self);
+		}
+	self->iRefCnt++;
+	return self;
+	}
+
+// -----------------------------------------------------------------------------
+// CLmkMapNavigationInterface::~CLmkMapNavigationInterface
+// C++ Destructor
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CLmkMapNavigationInterface::~CLmkMapNavigationInterface()
+	{
+	Dll::SetTls( NULL );
+	delete iAiwServiceHandler;
+    delete iInList;
+    delete iOutList;
+    delete iCategoryName;
+    delete iSearchUtil;
+    iLandmarkArray.ResetAndDestroy();
+	}
+
+// -----------------------------------------------------------------------------
+// CLmkMapNavigationInterface::HandleNotifyL
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TInt CLmkMapNavigationInterface::HandleNotifyL( TInt /*aCmdId*/,
+														TInt /*aEventId*/,
+													    CAiwGenericParamList& /*aEventParamList*/,
+													   	const CAiwGenericParamList& /*aInParamList*/ )
+	{
+	if ( iOutList->Count() )
+		{
+		const TAiwGenericParam& param = ( *iOutList )[0];
+        if ( EGenericParamLandmark == param.SemanticId() )
+            {
+            TPtrC8 landmarkData( param.Value().AsData() );
+            CPosLandmark* lm = PosLandmarkSerialization::UnpackL( landmarkData );
+            CleanupStack::PushL( lm );
+            SaveLandmarkL( *lm );
+            CleanupStack::PopAndDestroy( lm );
+            }
+        iOutList->Reset();
+		}
+	return KErrNone;
+	}
+
+// -----------------------------------------------------------------------------
+// CLmkMapNavigationInterface::DialogDismissedL
+// -----------------------------------------------------------------------------
+//
+void CLmkMapNavigationInterface::DialogDismissedL( TInt /*aButtonId*/ )
+	{
+	CleanupStack::PushL( TCleanupItem( CleanupArray, &iLandmarkArray ) );
+	ShowLandmarksOnMapL( iLandmarkArray, iCategoryCommand, iViewType );
+	iLandmarkArray.ResetAndDestroy();
+	CleanupStack::PopAndDestroy(); //iLandmarkArray
+	}
+
+// -----------------------------------------------------------------------------
+// CLmkMapNavigationInterface::SaveLandmarkL
+// -----------------------------------------------------------------------------
+//
+void CLmkMapNavigationInterface::SaveLandmarkL(CPosLandmark& aLandmark)
+	{
+	CPosLandmarkDatabase* db = CPosLandmarkDatabase::OpenL();
+	CleanupStack::PushL( db );
+	CLmkSender* sender = CLmkSender::NewL( *db );
+	CleanupStack::PushL( sender );
+	CPosLmOperation* operation = db->InitializeL();
+	CleanupStack::PushL( operation );
+	operation->ExecuteL();
+
+	if( iCategoryId != KPosLmNullItemId )
+		{
+		aLandmark.AddCategoryL( iCategoryId );
+		}
+
+	CLmkEditorImpl *dlg = CLmkEditorImpl::NewL( *db,
+											   *sender,
+											   CLmkEditorDlg::ELmkAll,
+											   CLmkEditorDlg::ELmkEditor,
+                                               &aLandmark );
+	if( dlg->ExecuteLD() )
+	{
+	if ( iObserver )
+    	{
+    	iObserver->HandleLmCreated(aLandmark.LandmarkId());
+    	}
+	}
+	CleanupStack::PopAndDestroy(3);	//sender, operation and db
+	iCategoryId = KPosLmNullItemId;
+	}
+
+// -----------------------------------------------------------------------------
+// CLmkMapNavigationInterface::ShowLandmarksOnMapL
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CLmkMapNavigationInterface::ShowLandmarksOnMapL(RPointerArray<CPosLandmark> &aArray,
+															  TInt aCommand,
+															  EViewType aViewType)
+	{
+	CPosLandmark* lm;
+	HBufC8* lmBuf;
+	iViewType = aViewType;
+	// Error checking
+	if(!CheckAndDisplayIfLandmarksEmptyL(aArray))
+		{
+		return;
+		}
+
+	iInList->Reset();
+	// Pack the landmark into generic parameter
+	for(TInt index = 0; index < aArray.Count(); ++index)
+		{
+		lm = aArray[index];
+		lmBuf =PosLandmarkSerialization::PackL( *lm );
+		CleanupStack::PushL( lmBuf );
+		TAiwGenericParam param( EGenericParamLandmark, TAiwVariant( *lmBuf ) );
+    	iInList->AppendL( param );
+    	TMnAiwCommonOptionsParam options;
+		options.iRunChained = EFalse;
+		TPckg<TMnAiwCommonOptionsParam> optionsPack( options );
+		TAiwGenericParam optParam( EGenericParamMnCommonOptions, TAiwVariant( optionsPack ) );
+		iInList->AppendL( optParam );
+    	CleanupStack::PopAndDestroy( lmBuf );
+		}
+	// Send service command for "Show Landmark on Map"
+	iAiwServiceHandler->ExecuteMenuCmdL( aCommand, *iInList, *iOutList, 0, NULL );
+	}
+
+// -----------------------------------------------------------------------------
+// CLmkMapNavigationInterface::ShowCategoryOnMapL
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CLmkMapNavigationInterface::ShowCategoryOnMapL( TPosLmItemId aCategoryId,
+															  TInt aCommand,
+															  EViewType aViewType )
+	{
+	iViewType = aViewType;
+	iCategoryCommand = aCommand;
+	// This will get deleted in the callback
+	if(iSearchUtil == NULL)
+		{
+		iSearchUtil = CLmkDbSearchUtils::NewL();
+		}
+	if(iCategoryName != NULL)
+		{
+		delete iCategoryName;
+		iCategoryName = NULL;
+		}
+	iSearchUtil->GetLandmarksUnderCategoryL( this, aCategoryId );
+	if( aCategoryId == KPosLmNullItemId )
+		{
+		iCategoryName = StringLoader::LoadL( R_LMK_LM_LIST_UNCATEGORISED, iEnv );
+		}
+	else
+		{
+		iCategoryName = iSearchUtil->GetCategoryNameL( aCategoryId );
+		}
+	iWaitNote = new (ELeave) CAknWaitDialog( NULL, ETrue );
+	iWaitNote->SetCallback( this );
+	iWaitNote->ExecuteLD( R_LMKUI_PROCESSING_WAIT_NOTE );
+	iWaitNote = NULL;
+	}
+
+// -----------------------------------------------------------------------------
+// CLmkMapNavigationInterface::NavigateToLandmarkL
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CLmkMapNavigationInterface::NavigateToLandmarkL( CPosLandmark* aLandmark, TInt aCommand )
+	{
+	HBufC8* lmBuf = PosLandmarkSerialization::PackL( *aLandmark );
+    CleanupStack::PushL( lmBuf );
+    TAiwGenericParam param( EGenericParamLandmark, TAiwVariant( *lmBuf ) );
+    iInList->Reset();
+    iInList->AppendL( param );
+    TMnAiwCommonOptionsParam options;
+	options.iRunChained = EFalse;
+	TPckg<TMnAiwCommonOptionsParam> optionsPack( options );
+	TAiwGenericParam optParam( EGenericParamMnCommonOptions, TAiwVariant( optionsPack ) );
+	iInList->AppendL( optParam );
+    CleanupStack::PopAndDestroy( lmBuf );
+    iAiwServiceHandler->ExecuteMenuCmdL( aCommand, *iInList, *iOutList, 0, NULL );
+	}
+
+// -----------------------------------------------------------------------------
+// CLmkMapNavigationInterface::GetLandmarkFromMapL
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CLmkMapNavigationInterface::GetLandmarkFromMapL( TInt aCommand )
+	{
+	// This string will be sent to the provider to display it in the map view
+    HBufC* buf = StringLoader::LoadLC( R_LM_SELECT_FROM_MAP, iEnv );
+	TAiwGenericParam param( EGenericParamRequestText, TAiwVariant( *buf ) );
+    iInList->Reset();
+    iInList->AppendL( param );
+    iOutList->Reset();
+	iAiwServiceHandler->ExecuteMenuCmdL( aCommand, *iInList, *iOutList, 0, this );
+	CleanupStack::PopAndDestroy(); // buf
+	}
+
+// -----------------------------------------------------------------------------
+// CLmkMapNavigationInterface::GetLandmarkFromMapForCategoryL
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CLmkMapNavigationInterface::GetLandmarkFromMapForCategoryL( TInt aCommand, TPosLmItemId aCategoryId )
+	{
+	iCategoryId = aCategoryId;
+	GetLandmarkFromMapL( aCommand );
+	}
+
+// -----------------------------------------------------------------------------
+// CLmkMapNavigationInterface::GetServiceCmdByMenuCmd
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TInt CLmkMapNavigationInterface::GetServiceCmdByMenuCmd( TInt aCommand )
+	{
+	return iAiwServiceHandler->ServiceCmdByMenuCmd( aCommand );
+	}
+
+// -----------------------------------------------------------------------------
+// CLmkMapNavigationInterface::AttachAIWInterestL
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CLmkMapNavigationInterface::AttachAIWInterestL(TInt aMenuPane, TInt aInterest)
+	{
+	iAiwServiceHandler->AttachMenuL(aMenuPane, aInterest);
+	}
+
+// -----------------------------------------------------------------------------
+// CLmkMapNavigationInterface::AttachAIWInterestL
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TBool CLmkMapNavigationInterface::HandleMenuOperationL( TInt aResourceId,
+															     CEikMenuPane *aMenuPane,
+															     TInt aBaseCommand )
+	{
+	if(iAiwServiceHandler->HandleSubmenuL( *aMenuPane ))
+		{
+		return ETrue;
+		}
+
+	// Checks whether it is aiw menu or not
+	if ( iAiwServiceHandler->IsAiwMenu( aResourceId ) )
+		{
+		CAiwGenericParamList* params = CAiwGenericParamList::NewLC();
+
+		// Adds the aiw plugin menus
+		TInt err;
+		TRAP( err, iAiwServiceHandler->InitializeMenuPaneL(
+              *aMenuPane, aResourceId, aBaseCommand, *params ) );
+        CleanupStack::PopAndDestroy(); // params
+        return ETrue;
+		}
+
+	return EFalse;
+	}
+
+// -----------------------------------------------------------------------------
+// CLmkMapNavigationInterface::AttachMenuPaneL
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CLmkMapNavigationInterface::AttachMenuPaneL( CEikMenuPane *aMenuPane, TInt aResourceId, TInt aBaseCommand )
+	{
+	if(iAiwServiceHandler->IsAiwMenu( aResourceId ))
+		{
+		CAiwGenericParamList* params = CAiwGenericParamList::NewLC();
+		TInt err = KErrNone;
+        TRAP( err, iAiwServiceHandler->InitializeMenuPaneL(
+                   *aMenuPane, aResourceId, aBaseCommand, *params ) );
+        CleanupStack::PopAndDestroy( params );
+		}
+	}
+
+// -----------------------------------------------------------------------------
+// CLmkMapNavigationInterface::DetachInterestL
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CLmkMapNavigationInterface::DetachInterestL( TInt aMenuResourceId, TInt aInterestresourceId )
+	{
+	iAiwServiceHandler->DetachMenu( aMenuResourceId, aInterestresourceId );
+	}
+
+// -----------------------------------------------------------------------------
+// CLmkMapNavigationInterface::HandleCategorySearchNotifyL
+// -----------------------------------------------------------------------------
+//
+void CLmkMapNavigationInterface::HandleCategorySearchNotifyL( RArray<TPosLmItemId> aArray )
+	{
+	iLandmarkArray.ResetAndDestroy();
+	for(TInt i = 0; i < aArray.Count(); ++i)
+		{
+		CPosLandmark* lmk = iSearchUtil->GetLandmarkForIdL( aArray[i] );
+		iLandmarkArray.Append( lmk );
+		}
+	if(iWaitNote)
+		{
+		iWaitNote->ProcessFinishedL();
+		}
+	delete iSearchUtil;
+	iSearchUtil = NULL;
+	}
+// -----------------------------------------------------------------------------
+// CLmkMapNavigationInterface::HandleLmkSearchNotifyL
+// -----------------------------------------------------------------------------
+//
+void CLmkMapNavigationInterface::HandleLmkSearchNotifyL()
+	{
+	// Do nothing
+	}
+
+// -----------------------------------------------------------------------------
+// CLmkMapNavigationInterface::CheckAndDisplayIfLandmarksEmptyL
+// -----------------------------------------------------------------------------
+//
+TBool CLmkMapNavigationInterface::CheckAndDisplayIfLandmarksEmptyL( RPointerArray<CPosLandmark> &aArray )
+	{
+	//Error cases when Landmark(s) is/are empty
+	enum ErrorCases
+		{
+		EErrAllEmpty,        // All selected landmarks are empty
+		EErrSomeEmpty,       // Some selected landmarks are empty
+		EErrOneEmpty,        // Only one of the selected landmark is empty
+		EErrOnlyOneAndEmpty, // Only one landmark is selected and that is empty
+		EErrNone 			 // All landmarks have valid coordinate data
+		};
+
+	TInt count = aArray.Count();
+	TInt err = EErrNone;
+	CPosLandmark* lmk;
+	TInt numberOfEmptyLmk = 0;
+	TInt emptyIndex = 0;
+
+	for(TInt index = 0; index < count; ++index)
+		{
+		lmk = aArray[index];
+		if( IsLandmarkDataEmptyL(*lmk) )
+			{
+			err = EErrSomeEmpty;
+			++numberOfEmptyLmk;
+			emptyIndex = index;
+			}
+		}
+
+	if(numberOfEmptyLmk == count)
+		{
+		/*
+		 * When view type is by lmk view then we make the check for
+		 * only one landmark.
+		 */
+		if( count == 1 && (EByLmkView == iViewType) )
+			{
+			err = EErrOnlyOneAndEmpty;
+			}
+		else
+			{
+			err = EErrAllEmpty;
+			}
+		}
+	else if(err == EErrSomeEmpty && numberOfEmptyLmk == 1)
+		{
+		err = EErrOneEmpty;
+		}
+
+	switch(err)
+		{
+		case EErrAllEmpty:
+			{
+			if(EByLmkView == iViewType)
+				{
+				LmkNotes::AllLandmarksEmptyNoteL( iEnv );
+				}
+			else
+				{
+				LmkNotes::CategoryEmptyNoteL( iEnv, iCategoryName->Des());
+				}
+			return EFalse;
+			}
+		case EErrSomeEmpty:
+			{
+    		HBufC* noteText = NULL;
+
+    		if(EByLmkView == iViewType)
+    			{
+    			noteText = StringLoader::LoadLC( R_LM_SHOW_QUERY_NO_COORDINATES_SEVERAL,
+                                  	         	 numberOfEmptyLmk,
+                                  	         	 iEnv );
+    			}
+    		else
+				{
+				CPtrC16Array* array = new (ELeave) CPtrC16Array(2);
+        		array->Reset();
+    			CleanupStack::PushL( array );
+    			HBufC* ptr = iCategoryName->AllocLC();
+    			array->AppendL( *ptr );
+
+        		CArrayFix<TInt>* arrFix = new( ELeave ) CArrayFixFlat<TInt>(2);
+        		CleanupStack::PushL( arrFix );
+        		arrFix->AppendL(numberOfEmptyLmk);
+				noteText = StringLoader::LoadLC( R_LM_SHOW_QUERY_CATEGORY_NO_COORDINATES_SEVERAL,
+												 *array,
+                                  	         	 *arrFix,
+                                  	         	 iEnv );
+                CleanupStack::Pop();// noteText
+                CleanupStack::PopAndDestroy( 3 ); //ptr, array
+                CleanupStack::PushL( noteText );
+				}
+
+			CAknQueryDialog* dlg = CAknQueryDialog::NewL( CAknQueryDialog::ENoTone );
+			TInt retVal = dlg->ExecuteLD( R_EMPTY_LANDMARKS_DIALOG, *noteText );
+			CleanupStack::PopAndDestroy( noteText );
+			if(!retVal)
+				{
+				return EFalse;
+				}
+			break;
+			}
+		case EErrOneEmpty:
+			{
+    		lmk = aArray[emptyIndex];
+    		TPtrC landmarkname;
+    		lmk->GetLandmarkName( landmarkname );
+    		HBufC* noteText = NULL;
+
+    		if(EByLmkView == iViewType)
+    			{
+    			noteText = StringLoader::LoadLC( R_LM_SHOW_QUERY_NO_COORDINATES_SINGLE,
+                                  	         	 landmarkname,
+                                  	         	 iEnv );
+    			}
+    		else
+				{
+				CPtrC16Array* array = new (ELeave) CPtrC16Array(2);
+				array->Reset();
+				CleanupStack::PushL( array );
+				HBufC* ptr = landmarkname.AllocLC();
+				array->AppendL( *ptr );
+				array->AppendL( *iCategoryName );
+
+			    noteText = StringLoader::LoadLC( R_LM_SHOW_QUERY_CATEGORY_NO_COORDINATES_SINGLE,
+												 *array,
+			    								 iEnv );
+				CleanupStack::Pop();// noteText
+				CleanupStack::PopAndDestroy( 2 ); //ptr, array
+				CleanupStack::PushL( noteText );
+				}
+
+    		CAknQueryDialog* dlg = CAknQueryDialog::NewL( CAknQueryDialog::ENoTone );
+    		TInt retVal = dlg->ExecuteLD( R_EMPTY_LANDMARK_DIALOG, *noteText );
+    		CleanupStack::PopAndDestroy( noteText ); //array, lmk, category and noteText
+			if(!retVal)
+				{
+				return EFalse;
+				}
+			break;
+			}
+		case EErrOnlyOneAndEmpty:
+			{
+			lmk = aArray[emptyIndex];
+    		TPtrC landmarkname;
+    		lmk->GetLandmarkName( landmarkname );
+			if( EByLmkView == iViewType )
+				{
+				// This error case happens only when in by Landmark view.
+				LmkNotes::LandmarksEmptyNoteL( iEnv, landmarkname );
+				}
+			else
+				{
+
+				}
+			return EFalse;
+			}
+		default:
+			{
+			break;
+			}
+		}
+	return ETrue;
+	}
+
+// -----------------------------------------------------------------------------
+// CLmkMapNavigationInterface::IsLandmarkDataEmptyL
+// -----------------------------------------------------------------------------
+//
+TBool CLmkMapNavigationInterface::IsLandmarkDataEmptyL( CPosLandmark& aLandmark )
+	{
+    // verify that destination landmark has coordinates
+    TLocality loc;
+    TBool isValid = (KErrNone == aLandmark.GetPosition( loc ) );
+    isValid &= !Math::IsNaN( loc.Latitude() ) && !Math::IsNaN( loc.Longitude() );
+    return !isValid;
+    
+/*    if ( !isValid )
+        {
+        // verify that destination landmark has address info
+        TPositionFieldId fieldId = aLandmark.FirstPositionFieldId();
+        while ( fieldId != EPositionFieldNone )
+            {
+            if ( fieldId > EPositionFieldAddressCapabilitiesBegin &&
+                 fieldId < EPositionFieldBuildingTelephone )
+                {
+                TPtrC field;
+                aLandmark.GetPositionField( fieldId, field );
+                if ( field.Length() )
+                    {
+                    isValid = ETrue;
+                    break;
+                    }
+                }
+            fieldId = aLandmark.NextPositionFieldId( fieldId );
+            }
+        }
+    return !isValid;*/
+	}
+
+// -----------------------------------------------------------------------------
+// CLmkMapNavigationInterface::SetObserver
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CLmkMapNavigationInterface::SetObserver(MLmkMapAndNavigationObserver* aObserver)
+    {
+    iObserver =   aObserver;
+    }
+// -----------------------------------------------------------------------------
+// CLmkMapNavigationInterface::Release
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CLmkMapNavigationInterface::Release()
+	{
+	iRefCnt--;
+	if( iRefCnt == 0)
+		{
+		delete this;
+		}
+	}
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/uicontrols/src/lmkicondialog.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,324 @@
+/*
+ * Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: Icon Selector Dialog Class Implementation
+ *
+ */
+
+// INCLUDE FILES
+#include <uikon.hrh>
+#include <e32std.h>
+#include <eikcapc.h>
+#include <aknlayoutscalable_avkon.cdl.h>
+#include <layoutmetadata.cdl.h>
+#include <aknborders.h>
+#include <aknconsts.h>
+#include <AknUtils.h>
+#include <aknPopupHeadingPane.h>
+#include <AknSettingCache.h>
+#include <AknLayout.lag>
+#include <e32property.h>
+
+#include <lmkui.rsg>
+
+#include "landmarks.hrh"
+#include "lmkicondialog.h"
+#include "lmkiconmap.h"
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// ----------------------------------------------------------------------------
+// CLmkIconMapDialog class
+// CLmkIconMapDialog() - constructor
+// ----------------------------------------------------------------------------
+//
+CLmkIconMapDialog::CLmkIconMapDialog(TInt& aIconIndex) :
+    iIconIndex(&aIconIndex)
+    {
+    CEikDialog::SetBorder(AknBorderId::EAknBorderNotePopup);
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkIconMapDialog::~CLmkIconMapDialog()
+// -----------------------------------------------------------------------------
+//
+CLmkIconMapDialog::~CLmkIconMapDialog()
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkIconMapDialog::HandleResourceChange()
+// -----------------------------------------------------------------------------
+//
+void CLmkIconMapDialog::HandleResourceChange(TInt aType)
+    {
+    CAknDialog::HandleResourceChange(aType);
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkIconMapDialog::OkToExitL()
+// -----------------------------------------------------------------------------
+//
+TBool CLmkIconMapDialog::OkToExitL(TInt aButtonId)
+    {
+    CLmkIconMap* iconmapControl =
+            STATIC_CAST(CLmkIconMap*, Control(ELmkIconMapContentId));
+    // Selection key / select softkey adds a iconacter only if 5-key was not used
+    // to select multiple icons before.
+    if (aButtonId == EAknSoftkeyOk || aButtonId == EAknSoftkeySelect
+            || aButtonId == EKeyEnter || aButtonId == EStdKeyEnter)
+        {
+        TKeyEvent key;
+        key.iCode = EKeyOK;
+        key.iModifiers = 0;
+        iconmapControl->OfferKeyEventL(key, EEventKey);
+        }
+    return (ETrue);
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkIconMapDialog::PreLayoutDynInitL()
+// -----------------------------------------------------------------------------
+//
+void CLmkIconMapDialog::PreLayoutDynInitL()
+    {
+    CLmkIconMap* iconmapControl =
+            STATIC_CAST(CLmkIconMap*, Control(ELmkIconMapContentId));
+    CAknPopupHeadingPane
+            * headingPane =
+                    STATIC_CAST(CAknPopupHeadingPane*, Control(EAknSCTQueryHeadingId));
+
+    iconmapControl->SetIndex(*iIconIndex);
+
+    SetLineNonFocusing(EAknSCTQueryHeadingId);
+
+    // add title
+
+    HBufC* title = iEikonEnv->AllocReadResourceL(R_LMK_ICON_SELECTOR_TITLE);
+    CleanupStack::PushL(title);
+    headingPane->SetTextL(*title);
+    CleanupStack::PopAndDestroy(title); //title
+    title = NULL;
+#ifdef RD_SCALABLE_UI_V2
+    iconmapControl->SetObserver(this);
+#endif //RD_SCALABLE_UI_V2
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkIconMapDialog::PostLayoutDynInitL()
+// -----------------------------------------------------------------------------
+//
+void CLmkIconMapDialog::PostLayoutDynInitL()
+    {
+    CEikButtonGroupContainer* cba = CEikButtonGroupContainer::Current();
+    cba->SetCommandSetL(R_LMK_ICON_SOFTKEYS_SELECT_CANCEL_SELECT);
+    cba->MakeCommandVisibleByPosition(
+            CEikButtonGroupContainer::ELeftSoftkeyPosition, EFalse);
+    cba->DrawDeferred();
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkIconMapDialog::SetSizeAndPosition()
+// -----------------------------------------------------------------------------
+//
+void CLmkIconMapDialog::SetSizeAndPosition(const TSize& aSize)
+    {
+    SetBorder(TGulBorder::ENone); // No Dialog borders in SCT.
+    CAknDialog::SetSizeAndPosition(aSize);
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkIconMapDialog::OfferKeyEventL()
+// -----------------------------------------------------------------------------
+//
+TKeyResponse CLmkIconMapDialog::OfferKeyEventL(const TKeyEvent& aKeyEvent,
+        TEventCode aModifiers)
+    {
+    if (aModifiers == EEventKey)
+        {
+        TUint code = aKeyEvent.iCode;
+        CLmkIconMap* iconmapControl =
+                STATIC_CAST(CLmkIconMap*, Control(ELmkIconMapContentId));
+
+        switch (code)
+            {
+            case EKeyLeftArrow:
+            case EKeyRightArrow:
+            case EKeyUpArrow:
+            case EKeyDownArrow:
+                {
+                TKeyResponse res(iconmapControl->OfferKeyEventL(aKeyEvent,
+                        aModifiers));
+                return res;
+                }
+            case EKeyEnter:
+                // change fro EKeyEnter to EKeyOK
+                {
+                TKeyEvent keyEvent;
+                keyEvent.iCode = EKeyOK;
+                keyEvent.iScanCode = aKeyEvent.iScanCode;
+                keyEvent.iModifiers = aKeyEvent.iModifiers;
+                keyEvent.iRepeats = aKeyEvent.iRepeats;
+                return CEikDialog::OfferKeyEventL(keyEvent, aModifiers);
+                }
+            default:
+                break;
+            }
+        }
+    return CEikDialog::OfferKeyEventL(aKeyEvent, aModifiers);
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkIconMapDialog::ExecuteLD()
+// -----------------------------------------------------------------------------
+//
+TInt CLmkIconMapDialog::ExecuteLD(TInt aResourceId)
+    {
+    // Prepare real icon map
+    CEikDialog::PrepareLC(aResourceId);
+    return (RunLD());
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkIconMapDialog::CEikDialog_Reserved_1()
+// -----------------------------------------------------------------------------
+//
+void CLmkIconMapDialog::CEikDialog_Reserved_1()
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkIconMapDialog::CEikDialog_Reserved_2()
+// -----------------------------------------------------------------------------
+//
+void CLmkIconMapDialog::CEikDialog_Reserved_2()
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkIconMapDialog::CLmkIconMapDialog_Reserved()
+// -----------------------------------------------------------------------------
+//
+void CLmkIconMapDialog::CAknIconMapDialog_Reserved()
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkIconMapDialog::DoLayout()
+// Doing all the Layout calculations
+// -----------------------------------------------------------------------------
+//
+void CLmkIconMapDialog::DoLayout()
+    {
+    /*
+     TAknLayoutRect dialogLayRect;
+
+     CLmkIconMap* iconmapControl =
+     STATIC_CAST(CLmkIconMap*, Control(ELmkIconMapContentId));
+
+     // Number of icon rows in the icon table
+     TInt rows = iconmapControl->HeightInRows();
+
+     // Main pane without softkeys
+     TRect mainPaneRect;
+     if(!AknLayoutUtils::LayoutMetricsRect(AknLayoutUtils::EMainPane, mainPaneRect))
+     {
+     mainPaneRect = iAvkonAppUi->ClientRect();
+     }
+
+     // Layout the dialog size
+     dialogLayRect.LayoutRect( mainPaneRect,AknLayoutScalable_Avkon::popup_grid_graphic_window(3));
+
+     // Set the retangle for dialog and eventually to CLmkIconMap
+     SetRect(dialogLayRect.Rect());
+
+     // Need to update popup heading's skin IDs to zero to draw background
+
+     // Offscreen background for picto table.
+     iconmapControl->DrawOffscreenBackgroundIfRequired();
+     */
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkIconMapDialog::CreateCustomControlL()
+// Virtual function override from the base class to implement the custom control
+// -----------------------------------------------------------------------------
+//
+SEikControlInfo CLmkIconMapDialog::CreateCustomControlL(TInt aControlType)
+    {
+    CLmkIconMap *control = NULL;
+    if (aControlType == ELmkCtIconMap)
+        {
+        control = CLmkIconMap::NewL();
+        }
+    SEikControlInfo info;
+    info.iControl = control;
+    info.iFlags = 0;
+    info.iTrailerTextId = 0;
+    return info;
+    }
+
+#ifdef RD_SCALABLE_UI_V2
+// -----------------------------------------------------------------------------
+// CLmkIconMapDialog::HandleControlEventL
+// Handles the event.
+// -----------------------------------------------------------------------------
+//
+void CLmkIconMapDialog::HandleControlEventL(CCoeControl* /*aControl*/,
+        TCoeEvent aEventType)
+    {
+    if (aEventType == EEventStateChanged)
+        {
+        iConSelected = ETrue;
+        TryExitL(EAknSoftkeyOk);
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkIconMapDialog::HandleDialogPageEventL
+// Handles the event.
+// -----------------------------------------------------------------------------
+//
+void CLmkIconMapDialog::HandleDialogPageEventL(TInt aEventID)
+    {
+    if (AknLayoutUtils::PenEnabled() && (aEventID
+            == MEikDialogPageObserver::EDialogPageTapped && iConSelected))
+        {
+        TryExitL(EAknSoftkeyOk);
+        }
+    }
+
+//--------------------------------------------------------------------------
+// void CLmkIconMapDialog::HandlePointerEventL()
+//--------------------------------------------------------------------------
+void CLmkIconMapDialog::HandlePointerEventL(
+        const TPointerEvent& aPointerEvent)
+    {
+    if (AknLayoutUtils::PenEnabled())
+        {
+        if (aPointerEvent.iPosition.iY <= 0 && aPointerEvent.iType
+                == TPointerEvent::EButton1Down)
+            {
+            TryExitL(EAknSoftkeyCancel);
+            }
+        else
+            {
+            CLmkIconMap* iconmapControl =
+                    STATIC_CAST(CLmkIconMap*, Control(ELmkIconMapContentId));
+            iconmapControl->HandlePointerEventL(aPointerEvent);
+            }
+        }
+    }
+#endif //RD_SCALABLE_UI_V2
+//  End of File
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/uicontrols/src/lmkiconmap.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,2137 @@
+/*
+ * Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:    LandmarksUi Content File - Landmarks icon selector map
+ *
+ */
+
+// INCLUDE FILES
+#include <eikenv.h>
+#include <eiksbfrm.h>
+#include <eikscrlb.h>
+#include <bidivisual.h>
+#include <avkon.rsg>
+#include <AknPanic.h>
+#include <avkon.hrh>
+#include <AknUtils.h>
+#include <aknlayoutscalable_avkon.cdl.h>
+#include <layoutmetadata.cdl.h>
+#include <AknLayout.lag>
+
+#include <aknappui.h>
+#include <aknconsts.h>
+#include <AknDef.h>
+#include <PUAcodes.hrh>
+#include <s32file.h>
+
+#ifdef RD_TACTILE_FEEDBACK
+#include <touchfeedback.h>
+#endif //RD_TACTILE_FEEDBACK
+// For the TEikScrollBarModelType
+#include <eikscrlb.h>
+
+#include <AknsDrawUtils.h>
+#include <featmgr.h>
+
+#include <AknsFrameBackgroundControlContext.h>
+
+#include <lmkui.mbg>
+
+#include "lmkiconmap.h"
+#include "CLmkUiUtils.h"
+#include <lmkerrors.h>
+
+// The offset because of CEikDialogPage
+const TInt KHorizontalDialogMargin = 0;
+const TInt KVerticalDialogMargin = 0;
+const TInt KAknSctCBaButtonDirections = 3; // bottom, right and left
+
+
+/// Unnamed namespace for local definitions
+namespace
+    {
+    const TInt KNumOfIcons(16);
+    _LIT( KPanicMsg, "CLmkIconMap" );
+
+    void Panic(TPanicCode aReason)
+        {
+        User::Panic(KPanicMsg, aReason);
+        }
+    } // namespace
+
+// ============================ EXTENSION CLASS ===============================
+//Class Declaration
+NONSHARABLE_CLASS(CLmkIconMapExtension) : public CBase,
+public MObjectProvider
+    {
+public:
+    CLmkIconMapExtension();
+    ~CLmkIconMapExtension();
+
+protected:
+    TTypeUid::Ptr MopSupplyObject(TTypeUid aId);
+    MObjectProvider* MopNext();
+
+public:
+    // data
+    MCoeControlObserver *iObserver;
+
+    TUint iFlags;
+    MObjectProvider* iIconMap;
+    TInt iMaxVisibleRows;
+    CAknsFrameBackgroundControlContext* iBgContext;
+    };
+
+// ============================ MEMBER FUNCTIONS OF CLmkIconMapExtension ===============================
+
+// -----------------------------------------------------------------------------
+// CLmkIconMapExtension::CLmkIconMapExtension
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+CLmkIconMapExtension::CLmkIconMapExtension() :
+    iMaxVisibleRows(0)
+    {
+    iObserver = NULL;
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkIconMapExtension::MopSupplyObject()
+// -----------------------------------------------------------------------------
+//
+TTypeUid::Ptr CLmkIconMapExtension::MopSupplyObject(TTypeUid aId)
+    {
+    return MAknsControlContext::SupplyMopObject(aId, iBgContext);
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkIconMapExtension::MopNext()
+// -----------------------------------------------------------------------------
+//
+MObjectProvider* CLmkIconMapExtension::MopNext()
+    {
+    return iIconMap;
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkIconMapExtension::~CLmkIconMapExtension()
+// -----------------------------------------------------------------------------
+//
+CLmkIconMapExtension::~CLmkIconMapExtension()
+    {
+
+    delete iBgContext;
+    }
+
+// ============================ MEMBER FUNCTIONS OF CLmkIconMap ===============================
+
+// -----------------------------------------------------------------------------
+// CLmkIconMap::CLmkIconMap
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+CLmkIconMap::CLmkIconMap() :
+    iCursorPos(TPoint(0, 0)), iOldCursorPos(TPoint(0, 0)), iMaxColumns(-1),
+            iCurrentPage(0), iNumPages(0)
+    {
+    iConsArray = (CArrayPtr<CGulIcon>*) NULL;
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkIconMap::NewL
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+CLmkIconMap* CLmkIconMap::NewL()
+    {
+    CLmkIconMap* self = new (ELeave) CLmkIconMap();
+
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    CleanupStack::Pop(self); //self
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkIconMap::ConstructL
+// Symbian 2nd phase constructor can leave.
+// -----------------------------------------------------------------------------
+//
+void CLmkIconMap::ConstructL()
+    {
+    // Must be created here to get the member variables available
+    iExtension = new (ELeave) CLmkIconMapExtension;
+    iExtension->iIconMap = this;
+
+    iConsArray = new (ELeave) CAknIconArray(KNumOfIcons);
+
+    iExtension->iFlags = 0x00;
+
+    DoLayout();
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkIconMap::~CLmkIconMap()
+// -----------------------------------------------------------------------------
+//
+CLmkIconMap::~CLmkIconMap()
+    {
+    delete iSBFrame;
+    iSBFrame = (CEikScrollBarFrame*) NULL;
+
+    delete iOffscreenBg;
+    delete iBitmapDevice;
+    delete iBitmapGc;
+
+    delete iExtension;
+    iExtension = (CLmkIconMapExtension*) NULL;
+
+    if (iConsArray)
+        {
+        iConsArray->ResetAndDestroy();
+        delete iConsArray;
+        iConsArray = (CArrayPtr<CGulIcon>*) NULL;
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkIconMap::DoLayout()
+// -----------------------------------------------------------------------------
+//
+void CLmkIconMap::DoLayout()
+    {
+    TRAPD(err, LoadIconL());
+    if (err)
+        return;
+
+    iIsMirrored = AknLayoutUtils::LayoutMirrored();
+    iDrawnBefore = EFalse;
+    CountMaxColumnsAndCellSizes();
+    SizeChanged();
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkIconMap::ConstructFromResourceL()
+// -----------------------------------------------------------------------------
+//
+void CLmkIconMap::ConstructFromResourceL(TResourceReader& /*aReader*/)
+    {
+    LoadIconL();
+    CreateScrollBarAndIconRowL();
+
+    Extension()->iBgContext = CAknsFrameBackgroundControlContext::NewL(
+            KAknsIIDQsnFrPopup, TRect(0, 0, 1, 1), TRect(0, 0, 1, 1), EFalse);
+
+    if (DrawableWindow() && AknLayoutUtils::PenEnabled())
+        {
+        EnableDragEvents();
+        SetGloballyCapturing( ETrue);
+        SetPointerCapture(ETrue);
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkIconMap::LoadIcons()
+// This actually load the all icons to be shown on dialog from icon file
+// -----------------------------------------------------------------------------
+//
+void CLmkIconMap::LoadIconL()
+    {
+    if (iConsArray)
+        {
+        iConsArray->ResetAndDestroy();
+        }
+    // Draw all the Icons.
+    TFileName* iconFile = CLmkUiUtils::LmkUiIconFileLC();
+
+    // Create icon bitmap and mask.
+    for (TInt i(0); i < (KNumOfIcons * 2); i++)
+        {
+        CFbsBitmap* bitmap = NULL;
+        CFbsBitmap* bitmapMask = NULL;
+        AknIconUtils::CreateIconLC(bitmap, bitmapMask, *iconFile,
+                EMbmLmkuiQgn_prop_lm_transport + i,
+                EMbmLmkuiQgn_prop_lm_transport + i + 1);
+        i++;
+        AknIconUtils::SetSize(bitmap, TSize(iGridItemWidth, iGridItemHeight)); //fix
+        AknIconUtils::SetSize(bitmapMask, TSize(iGridItemWidth,
+                iGridItemHeight)); //fix
+        CGulIcon* icon = CGulIcon::NewL(bitmap, bitmapMask);
+        CleanupStack::PushL(icon);
+        if (iConsArray)
+            iConsArray->AppendL(icon);
+        CleanupStack::Pop(icon); // icon
+        CleanupStack::Pop(bitmapMask); // mask
+        CleanupStack::Pop(bitmap); // bitmap
+        }
+    CleanupStack::PopAndDestroy();// iconFile
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkIconMap::HeightInRows()
+// This actually returns the no of rows to be shown on a page
+// Depends upon the Layout size
+// -----------------------------------------------------------------------------
+//
+TInt CLmkIconMap::HeightInRows()
+    {
+    return (iRows);
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkIconMap::CreateScrollBarAndIconRowL()
+// This actually creates the scroll bar sets the number of
+// pages and rows on a page to be shown
+// -----------------------------------------------------------------------------
+//
+void CLmkIconMap::CreateScrollBarAndIconRowL()
+    {
+    __ASSERT_DEBUG(iExtension, Panic(KLmkPanicInvalidResourceData));
+
+    __ASSERT_ALWAYS(iConsArray, Panic(KLmkPanicInvalidResourceData));
+
+    iRows = ((iConsArray->Count() - 1) / iMaxColumns) + 1;
+    iFirstVisibleRow = 0;
+    iAnimated = EFalse;
+    iCursorPos = TPoint(0, 0);
+    iNumPages = (iRows / iExtension->iMaxVisibleRows) + (iRows
+            % iExtension->iMaxVisibleRows ? 1 : 0);
+    iCurrentPage = 1;
+
+    // Create and set the scb visible even though there is nothing to scroll
+    delete iSBFrame;
+    iSBFrame = NULL;
+
+    if (AknLayoutUtils::PenEnabled())
+        {
+        iSBFrame = new (ELeave) CEikScrollBarFrame(this, this, ETrue);
+        }
+    else
+        {
+        iSBFrame = new (ELeave) CEikScrollBarFrame(this, NULL, ETrue);
+        }
+    // Decide which type of scrollbar is shown
+    CAknAppUi* appUi = iAvkonAppUi;
+    if (AknLayoutUtils::DefaultScrollBarType(appUi)
+            == CEikScrollBarFrame::EDoubleSpan)
+        {
+        // For EDoubleSpan type scrollbar
+        if (AknLayoutUtils::PenEnabled())
+            {
+            iSBFrame->CreateDoubleSpanScrollBarsL(ETrue, EFalse, ETrue,
+                    EFalse); // window owning scrollbar
+            }
+        else
+            {
+            iSBFrame->CreateDoubleSpanScrollBarsL(EFalse, EFalse, ETrue,
+                    EFalse); // non-window owning scrollbar
+            }
+        iSBFrame->SetTypeOfVScrollBar(CEikScrollBarFrame::EDoubleSpan);
+        }
+    else
+        {
+        // For EArrowHead type scrollbar
+        iSBFrame->SetTypeOfVScrollBar(CEikScrollBarFrame::EArrowHead);
+        }
+
+    iSBFrame->SetScrollBarVisibilityL(CEikScrollBarFrame::EOff,
+            CEikScrollBarFrame::EAuto);
+    iSBFrame->VerticalScrollBar()->SetMopParent(iExtension);
+    UpdateScrollIndicatorL();
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkIconMap::SetIndex
+// set the reference of the selected icon index from the table
+// -----------------------------------------------------------------------------
+//
+void CLmkIconMap::SetIndex(TInt& aIconIndex)
+    {
+    iIconIndex = &aIconIndex;
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkIconMap::MinimumSize
+//
+// -----------------------------------------------------------------------------
+//
+TSize CLmkIconMap::MinimumSize()
+    {
+    iIsMirrored = AknLayoutUtils::LayoutMirrored();
+    CountMaxColumnsAndCellSizes();
+
+    TRect rect;
+    // Used the set rect, but resolution changes cannot be handled when it is used
+
+    TAknLayoutRect dialogLayRect;
+
+    // Main pane without softkeys
+    TRect mainPaneRect;
+    if (!AknLayoutUtils::LayoutMetricsRect(AknLayoutUtils::EMainPane,
+            mainPaneRect))
+        {
+        mainPaneRect = iAvkonAppUi->ClientRect();
+        }
+
+    // Dialog layout, check variety first
+    TAknLayoutScalableParameterLimits iconMapDialogVariety =
+            AknLayoutScalable_Avkon::popup_grid_graphic_window_ParamLimits();
+
+    // Calc the variety
+    TInt maxVariety = iconMapDialogVariety.LastVariety();
+
+    // Check the CBA, if the orientation is not landscape
+    // there is not so much varieties
+    AknLayoutUtils::TAknCbaLocation location = AknLayoutUtils::CbaLocation();
+    TInt maxVarietyOffset = 0; // the offset for the certain cba location variety
+    TInt varietyOffset = maxVariety + 1; // the number of varieties
+
+    // landscape variety number must be calculated offset == number of varieties
+    // same applies to the variety number for the biggest sized layout for the variety
+    if (Layout_Meta_Data::IsLandscapeOrientation())
+        {
+        varietyOffset = (maxVariety + 1) / KAknSctCBaButtonDirections; // the offset for one variety
+        }
+
+    // for right and left cba buttons the max variety is not zero
+    // the varities are ordered by the location of the cba and the descending order
+    // e.g the biggest sized layout first, the smallest last
+    if (location == AknLayoutUtils::EAknCbaLocationRight)
+        {
+        maxVarietyOffset = varietyOffset;
+        }
+    else if (location == AknLayoutUtils::EAknCbaLocationLeft)
+        {
+        maxVarietyOffset = varietyOffset + varietyOffset; // 2*
+        }
+
+    TInt varietyNumber = varietyOffset - iRows - 1;
+
+    // if more lines than possible to show, use the default
+    // (the biggest grid) variety
+    if (varietyNumber < 0)
+        varietyNumber = 0;
+    // if zero rows, use the minimum
+    else if (iRows <= 0)
+        varietyNumber -= 1;
+
+    //add the varietyoffset
+    varietyNumber += maxVarietyOffset;
+
+    if (Layout_Meta_Data::IsLandscapeOrientation() && (location
+            == AknLayoutUtils::EAknCbaLocationRight))
+        {
+        varietyNumber = 10;
+        }
+    else
+        {
+        if (iRows == 0)
+            {
+            varietyNumber = 5;
+            }
+        else
+            {
+            varietyNumber = 3;
+            }
+        }
+    // Layout the dialog size
+    dialogLayRect.LayoutRect(mainPaneRect,
+            AknLayoutScalable_Avkon::popup_grid_graphic_window(varietyNumber));
+
+    // Layout the grid
+    TAknLayoutRect gridWithScrollLayRect;
+    gridWithScrollLayRect.LayoutRect(dialogLayRect.Rect(),
+            AknLayoutScalable_Avkon::listscroll_popup_graphic_pane());
+
+    return TSize(dialogLayRect.Rect().Width(),
+            gridWithScrollLayRect.Rect().Height());
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkIconMap::ActivateL()
+// This method is needed to set correct initial value to scroll indicator.
+// -----------------------------------------------------------------------------
+//
+void CLmkIconMap::ActivateL()
+    {
+    CCoeControl::ActivateL();
+    if (iRows > Extension()->iMaxVisibleRows)
+        {
+        UpdateScrollIndicatorL();
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkIconMap::OfferKeyEventL
+// Handles all the Keypad events
+// -----------------------------------------------------------------------------
+//
+TKeyResponse CLmkIconMap::OfferKeyEventL(const TKeyEvent& aKeyEvent,
+        TEventCode /*aModifiers*/)
+    {
+    TUint code = aKeyEvent.iCode;
+
+    switch (code)
+        {
+        case EKeyLeftArrow:
+        case '4':
+            MoveCursorL(-1, 0);
+            break;
+        case EKeyRightArrow:
+        case '6':
+            MoveCursorL(1, 0);
+            break;
+        case EKeyUpArrow:
+        case '2':
+            MoveCursorL(0, -1);
+            break;
+        case EKeyDownArrow:
+        case '8':
+            MoveCursorL(0, 1);
+            break;
+        case EKeyOK:
+        case '5':
+        case EKeySpace:
+        case EKeyEnter:
+            {
+            if (iConsArray)
+                {
+                TInt ret = iMaxColumns * (iFirstVisibleRow + iCursorPos.iY)
+                        + iCursorPos.iX;
+                if (ret <= iConsArray->Count())
+                    {
+                    *iIconIndex = ret;
+                    }
+                else
+                    {
+                    *iIconIndex = -1;
+                    }
+                }
+
+            }
+            break;
+        default:
+            return EKeyWasNotConsumed;
+
+        }
+    return EKeyWasConsumed;
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkIconMap::InputCapabilities()
+//
+// -----------------------------------------------------------------------------
+//
+TCoeInputCapabilities CLmkIconMap::InputCapabilities() const
+    {
+    return TCoeInputCapabilities(TCoeInputCapabilities::EAllText);
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkIconMap::SizeChanged()
+// Control position of this control is registered for skin library when necessary
+// in CEikDialogPage::SetDataPosition, so we do not do that in this method.
+// -----------------------------------------------------------------------------
+//
+void CLmkIconMap::SizeChanged()
+    {
+    // Get the layout
+
+    // Main pane without softkeys
+    TRect mainPaneRect;
+
+    if (!AknLayoutUtils::LayoutMetricsRect(AknLayoutUtils::EMainPane,
+            mainPaneRect))
+        {
+        mainPaneRect = iAvkonAppUi->ClientRect();
+        }
+
+    // Dialog layout, check variety first
+    TAknLayoutScalableParameterLimits iconMapDialogVariety =
+            AknLayoutScalable_Avkon::popup_grid_graphic_window_ParamLimits();
+
+    TInt maxVariety = iconMapDialogVariety.LastVariety();
+
+    // Check the CBA, if the orientation is not landscape
+    // there is not so much varieties
+    AknLayoutUtils::TAknCbaLocation location = AknLayoutUtils::CbaLocation();
+    TInt maxVarietyOffset = 0; // the offset for the certain cba location variety
+    TInt varietyOffset = maxVariety + 1;
+
+    // landscape variety number must be calculated offset == number of varieties
+    // same applies to the variety number for the biggest sized layout for the variety
+    if (Layout_Meta_Data::IsLandscapeOrientation())
+        {
+        varietyOffset = (maxVariety + 1) / KAknSctCBaButtonDirections; // the offset for one variety
+        }
+
+    // for right and left cba buttons the max variety is not zero
+    // the varities are ordered by the location of the cba and the descending order
+    // e.g the biggest sized layout first, the smallest last
+    if (location == AknLayoutUtils::EAknCbaLocationRight)
+        {
+        maxVarietyOffset = varietyOffset;
+        }
+    else if (location == AknLayoutUtils::EAknCbaLocationLeft)
+        {
+        maxVarietyOffset = varietyOffset + varietyOffset; // 2*
+        }
+
+    TInt varietyNumber = varietyOffset - iRows - 1;
+
+    // if more lines than possible to show, use the default
+    // (the biggest grid) variety
+    if (varietyNumber < 0)
+        varietyNumber = 0;
+    // if zero rows, use the minimum
+    else if (iRows <= 0)
+        varietyNumber -= 1;
+
+    //add the varietyoffset
+    varietyNumber += maxVarietyOffset;
+
+    if (Layout_Meta_Data::IsLandscapeOrientation() && (location
+            == AknLayoutUtils::EAknCbaLocationRight))
+        {
+        varietyNumber = 10;
+        }
+    else
+        {
+        if (iRows == 0)
+            {
+            varietyNumber = 5;
+            }
+        else
+            {
+            varietyNumber = 3;
+            }
+
+        }
+
+    TAknLayoutRect popupGridLayRect;
+    popupGridLayRect.LayoutRect(mainPaneRect,
+            AknLayoutScalable_Avkon::popup_grid_graphic_window(varietyNumber));
+
+    // Calculate the size relatively
+    TRect relativeDialog(TPoint(0, 0), popupGridLayRect.Rect().Size());
+
+    // Get the layout of the actual icon grid with scrollbar
+    TAknLayoutRect gridWithScrollLayRect;
+    gridWithScrollLayRect.LayoutRect(relativeDialog,
+            AknLayoutScalable_Avkon::listscroll_popup_graphic_pane());
+
+    // Then the grid area without scrollbar
+    // NOTE: The grid with scroll bar is used as reference
+    TAknLayoutRect gridLayRect;
+    gridLayRect.LayoutRect(gridWithScrollLayRect.Rect(),
+            AknLayoutScalable_Avkon::grid_graphic_popup_pane(0));
+
+    // Different parent if SCT inside editing menu.
+    TRect contentRect = gridLayRect.Rect();
+
+    // The x coordinate is 3 pixels to right and y coordinate 3 pixels up
+    // so substract from x coordinate and add to y coordinate
+    if (iIsMirrored)
+        {
+        iOffset = TPoint(contentRect.iBr.iX - KHorizontalDialogMargin
+                - iGridItemWidth + 1, contentRect.iTl.iY
+                - KVerticalDialogMargin + 1);
+        iGridTopLeft.iX = contentRect.iBr.iX - KHorizontalDialogMargin
+                - (iMaxColumns * iGridItemWidth);
+        iGridTopLeft.iY = contentRect.iTl.iY - KVerticalDialogMargin;
+        }
+    else // not mirrored
+        {
+        iOffset = TPoint(contentRect.iTl.iX - KHorizontalDialogMargin + 1,
+                contentRect.iTl.iY - KVerticalDialogMargin + 1);
+        iGridTopLeft.iX = contentRect.iTl.iX - KHorizontalDialogMargin;
+        iGridTopLeft.iY = contentRect.iTl.iY - KVerticalDialogMargin;
+        }
+
+    // The last, update background context
+    if (Extension()->iBgContext)
+        {
+        TInt bgVariety = 0;
+        if (Layout_Meta_Data::IsLandscapeOrientation())
+            bgVariety = 1;
+
+        TAknLayoutRect innerRect;
+        innerRect.LayoutRect(relativeDialog,
+                AknLayoutScalable_Avkon::bg_popup_window_pane_g1(bgVariety));
+
+        Extension()->iBgContext->SetFrameRects(relativeDialog,
+                innerRect.Rect());
+        }
+    TRAPD(err, UpdateScrollIndicatorL());
+    if (err)
+        return;
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkIconMap::HandleResourceChange()
+//
+// -----------------------------------------------------------------------------
+//
+void CLmkIconMap::HandleResourceChange(TInt aType)
+    {
+    if (aType == KEikDynamicLayoutVariantSwitch)
+        {
+        // save the old info for the magnitudes of the SCT grid
+        TInt oldMaxColumns = iMaxColumns;
+        //TInt oldMaxRows = 0;
+        //oldMaxRows = iRows;
+        // calculate the new magnitudes
+        DoLayout();
+
+        // then calculate the index position of the cursor in the icon table
+        // and update the x and y positions for the new grid with it
+
+        TInt oldCursorPosition = (iFirstVisibleRow + iOldCursorPos.iY)
+                * oldMaxColumns + iOldCursorPos.iX;
+
+        TInt currentCursorPosition = (iFirstVisibleRow + iCursorPos.iY)
+                * oldMaxColumns + iCursorPos.iX;
+
+        // the new first row is the top row on the page where the new focus is
+        iFirstVisibleRow = Extension()->iMaxVisibleRows
+                * (currentCursorPosition / (iMaxColumns
+                        * Extension()->iMaxVisibleRows));
+
+        // the cursor positions are relative to current page
+        iCursorPos.iY = (currentCursorPosition - (iMaxColumns
+                * iFirstVisibleRow)) / iMaxColumns;
+        iCursorPos.iX = currentCursorPosition - (iMaxColumns
+                * iFirstVisibleRow) - (iMaxColumns * iCursorPos.iY);
+
+        iOldCursorPos.iY = (oldCursorPosition - (iMaxColumns
+                * iFirstVisibleRow)) / iMaxColumns;
+        iOldCursorPos.iX = oldCursorPosition - (iMaxColumns
+                * iFirstVisibleRow) - (iMaxColumns * iOldCursorPos.iY);
+        }
+
+    if (aType == KAknsMessageSkinChange)
+        {
+        iOffscreenBgDrawn = EFalse;
+        }
+    CCoeControl::HandleResourceChange(aType);
+
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkIconMap::Draw()
+//
+// -----------------------------------------------------------------------------
+//
+void CLmkIconMap::Draw(const TRect& /*aRect*/) const
+    {
+
+    TInt cursorPos = 0;
+    CWindowGc& gc = SystemGc();
+
+    MAknsSkinInstance* skin = AknsUtils::SkinInstance();
+    MAknsControlContext* cc = AknsDrawUtils::ControlContext(this);
+
+    TRect rect = Rect();
+
+    // Main pane without softkeys
+    TRect mainPaneRect;
+    if (!AknLayoutUtils::LayoutMetricsRect(AknLayoutUtils::EMainPane,
+            mainPaneRect))
+        {
+        mainPaneRect = iAvkonAppUi->ClientRect();
+        }
+
+    // Dialog layout, check variety first
+    TAknLayoutScalableParameterLimits iconMapDialogVariety =
+            AknLayoutScalable_Avkon::popup_grid_graphic_window_ParamLimits();
+
+    // The variety starts from 0 so add +1
+    TInt maxVariety = iconMapDialogVariety.LastVariety();
+
+    // Check the CBA, if the orientation is not landscape
+    // there is not so much varieties
+    AknLayoutUtils::TAknCbaLocation location = AknLayoutUtils::CbaLocation();
+    TInt maxVarietyOffset = 0; // the offset for the certain cba location variety
+    TInt varietyOffset = maxVariety + 1;
+
+    // landscape variety number must be calculated offset == number of varieties
+    // same applies to the variety number for the biggest sized layout for the variety
+    if (Layout_Meta_Data::IsLandscapeOrientation())
+        {
+        varietyOffset = (maxVariety + 1) / KAknSctCBaButtonDirections; // the offset for one variety
+        }
+
+    // for right and left cba buttons the max variety is not zero
+    // the varities are ordered by the location of the cba and the descending order
+    // e.g the biggest sized layout first, the smallest last
+    if (location == AknLayoutUtils::EAknCbaLocationRight)
+        {
+        maxVarietyOffset = varietyOffset;
+        }
+    else if (location == AknLayoutUtils::EAknCbaLocationLeft)
+        {
+        maxVarietyOffset = varietyOffset + varietyOffset; // 2*
+        }
+
+    TInt varietyNumber = varietyOffset - iRows - 1;
+
+    // if more lines than possible to show, use the default
+    // (the biggest grid) variety
+    if (varietyNumber < 0)
+        varietyNumber = 0;
+    // if zero rows, use the minimum
+    else if (iRows <= 0)
+        varietyNumber -= 1;
+
+    //add the varietyoffset
+    varietyNumber += maxVarietyOffset;
+
+    if (Layout_Meta_Data::IsLandscapeOrientation() && (location
+            == AknLayoutUtils::EAknCbaLocationRight))
+        {
+        varietyNumber = 10;
+        }
+    else
+        {
+        varietyNumber = 3;
+        }
+    // Layout the dialog size
+    TAknLayoutRect dialogLayRect;
+    dialogLayRect.LayoutRect(mainPaneRect,
+            AknLayoutScalable_Avkon::popup_grid_graphic_window(varietyNumber));
+
+    // Get the missing height for the background
+    TInt backgroundHeightOffset = dialogLayRect.Rect().Height() - rect.iBr.iY;
+
+    rect.iBr.iY += backgroundHeightOffset;
+
+    // Check if we got an offscreen bitmap allocated for skin background and
+    // there is bitmap background in the current skin.
+    if (iOffscreenBg && iHasBitmapBackground)
+        {
+        DrawOffscreenBackgroundIfRequired();
+        gc.BitBlt(rect.iTl, iOffscreenBg);
+        }
+    else
+        {
+        AknsDrawUtils::Background(skin, cc, this, gc, rect);
+        }
+
+    TInt numberOfIconsToBeDrawn = iConsArray->Count();
+    numberOfIconsToBeDrawn -= (iFirstVisibleRow * iMaxColumns);
+    if (numberOfIconsToBeDrawn > 0)
+        {
+        if (numberOfIconsToBeDrawn > (Extension()->iMaxVisibleRows
+                * iMaxColumns))
+            {
+            numberOfIconsToBeDrawn = Extension()->iMaxVisibleRows
+                    * iMaxColumns;
+            }
+        __ASSERT_DEBUG( numberOfIconsToBeDrawn >= 1, Panic( KLmkPanicOutOfRange ) );
+
+        gc.SetPenStyle(CGraphicsContext::ESolidPen);
+        gc.SetBrushStyle(CGraphicsContext::ENullBrush);
+        gc.SetPenSize(TSize(1, 1));
+
+        // 2) Draw the grid
+        const TSize gridItemRectSize(iGridItemWidth + 1, iGridItemHeight + 1);
+
+        TInt numberOfGridCellsToBeDrawn = numberOfIconsToBeDrawn;
+
+        TRgb colorLine = AKN_LAF_COLOR(219);
+        AknsUtils::GetCachedColor(skin, colorLine, KAknsIIDQsnLineColors,
+                EAknsCIQsnLineColorsCG5);
+        TRgb colorRecentLine = AKN_LAF_COLOR(215);
+        AknsUtils::GetCachedColor(skin, colorRecentLine,
+                KAknsIIDQsnLineColors, EAknsCIQsnLineColorsCG7);
+
+        // default pen color
+        gc.SetPenColor(colorLine);
+
+        TInt fullRows = numberOfGridCellsToBeDrawn / iMaxColumns;
+
+        // how many left after the full rows
+        numberOfGridCellsToBeDrawn -= fullRows * iMaxColumns;
+
+        TPoint pos = iGridTopLeft;
+
+        TInt endX = pos.iX + iGridItemWidth * iMaxColumns + 1;
+        TInt endY = pos.iY + iGridItemHeight * fullRows;
+
+        TInt ii = 0;
+
+        if (fullRows)
+            {
+            // Draw full vertical lines
+            for (ii = 0; ii <= iMaxColumns; ii++)
+                {
+                gc.SetPenColor(colorLine);
+                gc.SetPenSize(TSize(1, 1));
+                gc.DrawLine(pos, TPoint(pos.iX, endY));
+                pos.iX += iGridItemWidth;
+                }
+
+            pos = iGridTopLeft;
+
+            // Draw full horizontal lines
+            for (ii = 0; ii <= fullRows; ii++)
+                {
+                gc.SetPenSize(TSize(1, 1));
+                gc.SetPenColor(colorLine);
+                gc.DrawLine(pos, TPoint(endX, pos.iY));
+                pos.iY += iGridItemHeight;
+                }
+            gc.SetPenColor(colorLine);
+            gc.SetPenSize(TSize(1, 1));
+            }
+
+        if (numberOfGridCellsToBeDrawn)
+            {
+            // Remaining cells in the last, non-full row
+            pos = iOffset;
+            pos.iX--; // iOffset is cell area topLeft, grid is not included in it
+            pos.iY--;
+
+            pos.iY += iGridItemHeight * fullRows;
+
+            for (ii = 0; ii < numberOfGridCellsToBeDrawn; ii++)
+                {
+                gc.DrawRect(TRect(pos, gridItemRectSize));
+
+                if (iIsMirrored)
+                    pos.iX -= iGridItemWidth;
+                else
+                    // not mirrored
+                    pos.iX += iGridItemWidth;
+                }
+            }
+
+        TInt iconIndex = (iCurrentPage - 1) * (iMaxColumns
+                * Extension()->iMaxVisibleRows);
+        TInt lCnt = iConsArray->Count();
+        cursorPos = iCursorPos.iX + iCursorPos.iY * iMaxColumns;
+        if (lCnt > 0)
+            {
+            TRect cellRect(TPoint(0, 0), TSize(iGridItemWidth - 1,
+                    iGridItemHeight - 1));
+            for (TInt j = iconIndex, i = 0; j < lCnt && (i
+                    < numberOfIconsToBeDrawn); j++, i++)
+                {
+                DrawItem(gc, CursorRect(i), j, (cursorPos == i), EFalse);
+                }
+            }
+
+        }
+    iDrawnBefore = ETrue;
+    gc.DiscardFont();
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkIconMap::DrawItem()
+//
+// -----------------------------------------------------------------------------
+//
+void CLmkIconMap::DrawItem(CWindowGc& aGc, const TRect& aSctPosition,
+        TInt aIconIndex, TBool aHighlighted, TBool aDrawBackground) const
+    {
+    MAknsSkinInstance* skin = AknsUtils::SkinInstance();
+    MAknsControlContext* cc = AknsDrawUtils::ControlContext(this);
+
+    TBool skins = AknsDrawUtils::Background(skin, cc, aGc, aSctPosition);
+    TRgb color;
+    if (!skins)
+        aGc.SetBrushStyle(CGraphicsContext::ESolidBrush);
+    if (aHighlighted)
+        {
+        TRgb colorHightLightRect = AKN_LAF_COLOR(215);
+        AknsUtils::GetCachedColor(skin, colorHightLightRect,
+                KAknsIIDQsnLineColors, EAknsCIQsnLineColorsCG7);
+        aGc.SetPenColor(colorHightLightRect);
+        aGc.DrawRect(aSctPosition);
+
+        // Shrink by one pixel in all directions.
+        TRect innerRect = aSctPosition;
+        innerRect.Shrink(1, 1);
+
+        color = AKN_LAF_COLOR(210);
+        AknsUtils::GetCachedColor(skin, color, KAknsIIDQsnHighlightColors,
+                EAknsCIQsnHighlightColorsCG1);
+        aGc.SetBrushColor(color);
+        aGc.Clear(innerRect);
+        }
+    else if (aDrawBackground)
+        {
+        TRect innerRect = aSctPosition;
+        aGc.SetBrushColor(AKN_LAF_COLOR(0));
+        if (!skins)
+            aGc.Clear(innerRect);
+        else
+            AknsDrawUtils::Background(skin, cc, this, aGc, innerRect);
+        }
+
+    if (iConsArray)
+        {
+        TInt lCnt = iConsArray->Count();
+        if (lCnt > 0 && aIconIndex < lCnt && aIconIndex >= 0)
+            {
+            TRect cellRect(TPoint(0, 0), TSize(iGridItemWidth - 1,
+                    iGridItemHeight - 1));
+
+            CGulIcon* bitmap = NULL;
+            bitmap = iConsArray->At(aIconIndex);
+            TInt numIconsInaPage = Extension()->iMaxVisibleRows * iMaxColumns;
+            TInt cellIndex = aIconIndex;
+            if (aIconIndex >= numIconsInaPage)
+                {
+                cellIndex = aIconIndex % numIconsInaPage;
+                }
+            aGc.BitBltMasked(CursorPoint(cellIndex), bitmap->Bitmap(),
+                    cellRect, bitmap->Mask(), EFalse);
+            }
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkIconMap::DrawCursor()
+// Optimizes drawing. Only cursor is drawn.
+// -----------------------------------------------------------------------------
+void CLmkIconMap::DrawCursor() const
+    {
+    // Whole Icon Map has to be drawn at least once.
+    // If the user presses arrow key before Icon Map has been drawn,
+    // only cursor position is drawn without this check.
+    if (!iDrawnBefore)
+        {
+        DrawNow();
+        }
+    // Only redraw old and new cursor position cells
+    ActivateGc();
+    CWindowGc& gc = SystemGc();
+
+    TInt cursorPos = iOldCursorPos.iX + iOldCursorPos.iY * iMaxColumns;
+    if (cursorPos >= 0)
+        {
+        DrawCell(cursorPos, EFalse);
+
+        cursorPos = iCursorPos.iX + iCursorPos.iY * iMaxColumns;
+        DrawCell(cursorPos, ETrue);
+        }
+
+    gc.DiscardFont();
+    DeactivateGc();
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkIconMap::DrawCell
+// -----------------------------------------------------------------------------
+//
+void CLmkIconMap::DrawCell(TInt aCursorPos, TBool aHighLighted) const
+    {
+    // calculate icon index
+    TInt iconIndex = aCursorPos + iFirstVisibleRow * iMaxColumns;
+
+    // If we are only redrawing for animations, no need to draw non-animated items.
+    TRect rect = CursorRect(aCursorPos);
+
+    Window().Invalidate(rect);
+    Window().BeginRedraw(rect);
+    DrawItem(SystemGc(), rect, iconIndex, aHighLighted, ETrue);
+    Window().EndRedraw();
+    SystemGc().DiscardFont();
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkIconMap::CursorRect
+// -----------------------------------------------------------------------------
+//
+TRect CLmkIconMap::CursorRect(TInt aCursorPos) const
+    {
+    TPoint pos = iOffset;
+
+    if (iIsMirrored)
+        {
+        pos.iX -= (aCursorPos % iMaxColumns) * iGridItemWidth;
+        }
+    else // Not mirrored
+        {
+        pos.iX += (aCursorPos % iMaxColumns) * iGridItemWidth;
+        }
+
+    pos.iY += (aCursorPos / iMaxColumns) * iGridItemHeight;
+    return TRect(pos, TSize(iGridItemWidth - 1, iGridItemHeight - 1));
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkIconMap::CursorPoint
+// -----------------------------------------------------------------------------
+//
+TPoint CLmkIconMap::CursorPoint(TInt aCursorPos) const
+    {
+    TPoint pos = iOffset;
+
+    if (iIsMirrored)
+        {
+        pos.iX -= (aCursorPos % iMaxColumns) * iGridItemWidth;
+        }
+    else // Not mirrored
+        {
+        pos.iX += (aCursorPos % iMaxColumns) * iGridItemWidth;
+        }
+
+    pos.iY += (aCursorPos / iMaxColumns) * iGridItemHeight;
+    return pos;
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkIconMap::MoveCursorL
+// -----------------------------------------------------------------------------
+//
+void CLmkIconMap::MoveCursorL(TInt aDeltaX, TInt aDeltaY)
+    {
+    __ASSERT_DEBUG((aDeltaX <= 1) && (aDeltaX >= -1) && (aDeltaY <= 1)
+            && (aDeltaY >= -1) && ((aDeltaX * aDeltaY) == 0), Panic(
+            KLmkPanicOutOfRange));
+
+    if (iIsMirrored)
+        aDeltaX = -aDeltaX;
+
+    if ((iConsArray->Count() < 8))
+        return;
+
+    iOldCursorPos = iCursorPos;
+    TInt oldFirstVisibleRow = iFirstVisibleRow;
+
+    TInt globalYPos = iCursorPos.iY + iFirstVisibleRow;
+    TInt lastColumnOnLastRow = ((iConsArray->Count() - 1) % iMaxColumns);
+
+    TInt skipicon = aDeltaX != 0 ? 1 : 0;
+
+    if (aDeltaX < 0)
+        {
+        // Cursor was moved to left.
+        if (iCursorPos.iX > skipicon - 1)
+            {
+            iCursorPos.iX -= skipicon;
+            }
+        else
+            {
+            if (skipicon > iMaxColumns)
+                {
+                globalYPos--;
+                iCursorPos.iX = iMaxColumns;
+                }
+            // Go to previous line
+            globalYPos--;
+            if (globalYPos < 0)
+                {
+                // Cursor was on the first line - go to last line.
+                globalYPos = iRows - 1;
+                // x - position to the last item on the last row.
+                iCursorPos.iX = lastColumnOnLastRow;
+                }
+            else
+                {
+                // x - position to last column.
+                iCursorPos.iX = iMaxColumns - skipicon;
+                }
+            }
+        }
+
+    if (aDeltaX > 0)
+        {
+        // Cursor was moved to right.
+        if (globalYPos < iRows - 1)
+            {
+            // Not in the last row.
+            if (iCursorPos.iX < iMaxColumns - skipicon)
+                {
+                // If not on the last columns, move cursor to next column.
+                iCursorPos.iX += skipicon;
+                }
+            else
+                {
+                // Cursor was on last column,
+                // move to first column of the next line.
+                iCursorPos.iX = 0;
+                globalYPos++;
+                }
+            }
+        else
+            {
+            // Currently on the last row.
+            if (iCursorPos.iX < lastColumnOnLastRow)
+                {
+                // If there are more items on this row, move cursor to next item.
+                iCursorPos.iX++;
+                }
+            else
+                {
+                // No more item on the current row.
+                // Move to first item on the first row.
+                iCursorPos.iX = 0;
+                globalYPos = 0;
+                }
+            }
+        }
+
+    if (aDeltaY < 0)
+        {
+        iCursorPos.iX -= skipicon;
+        if (iCursorPos.iX < 0)
+            {
+            iCursorPos.iX += (iMaxColumns - 1);
+            globalYPos--;
+            }
+        // Cursor was moved to up.
+        if (globalYPos > 0)
+            {
+            // Cursor was not on the first line - move it to previous row.
+            globalYPos--;
+            }
+        else
+            {
+            // Move cursot to last to row.
+            globalYPos = iRows - 1;
+            if (iCursorPos.iX > lastColumnOnLastRow)
+                {
+                // No items in the current column on the last row -
+                // move cursor to last item on the row.
+                iCursorPos.iX = lastColumnOnLastRow;
+                }
+            }
+        }
+
+    if (aDeltaY > 0)
+        {
+        iCursorPos.iX = (iCursorPos.iX + skipicon) % iMaxColumns;
+        globalYPos += (iCursorPos.iX + skipicon) / iMaxColumns;
+        // Cursor was moved to down.
+        if (globalYPos < iRows - 1)
+            {
+            // Cursor is not on the last row. Move cursor to next row.
+            globalYPos++;
+            if (globalYPos == iRows - 1 && iCursorPos.iX
+                    > lastColumnOnLastRow)
+                {
+                // No items in the current column on the last row -
+                // move cursor to last item on the row.
+                iCursorPos.iX = lastColumnOnLastRow;
+                }
+            }
+        else
+            {
+            // Cursor was at the last row - move it to the first row.
+            globalYPos = 0;
+            }
+        }
+    iCursorPos.iY = globalYPos - iFirstVisibleRow;
+
+    if (globalYPos < iFirstVisibleRow)
+        {
+        // Cursor was moved from the top row.
+        if (globalYPos <= 0)
+            {
+            iFirstVisibleRow = 0;
+            iCursorPos = TPoint(iCursorPos.iX, 0);
+            }
+        else
+            {
+            // If cursor was moved up out of the visible area - show it again.
+            iFirstVisibleRow -= Extension()->iMaxVisibleRows;
+            iCursorPos = TPoint(iCursorPos.iX, Extension()->iMaxVisibleRows
+                    - 1);
+            }
+        }
+
+    if (globalYPos > iFirstVisibleRow + Extension()->iMaxVisibleRows - 1)
+        {
+        if (globalYPos == iRows - 1)
+            {
+            // When cursor has moved from the top line,
+            // it is adjusted to a page boundary.
+            iCursorPos = TPoint(iCursorPos.iX, (iRows - 1)
+                    % Extension()->iMaxVisibleRows);
+            iFirstVisibleRow = ((iRows - 1) / Extension()->iMaxVisibleRows)
+                    * Extension()->iMaxVisibleRows;
+            }
+        else
+            {
+            // If cursor was moved down out of the visible area - show it again.
+            iFirstVisibleRow += Extension()->iMaxVisibleRows;
+            iCursorPos = TPoint(iCursorPos.iX, 0);
+            }
+        }
+
+    //TInt increment(1);
+    //if (aDeltaY < 0 || aDeltaX < 0)
+    //    {
+    ////    increment = -1;
+    //    }
+    if ((iRows > Extension()->iMaxVisibleRows) && (iOldCursorPos.iY
+            + oldFirstVisibleRow != iCursorPos.iY + iFirstVisibleRow))
+        {
+        UpdateScrollIndicatorL();
+        }
+
+    if (oldFirstVisibleRow == iFirstVisibleRow)
+        {
+        // Draw only cursor if the view to the content was not scrolled.
+        DrawCursor();
+        }
+    else
+        {
+        DrawNow();
+        }
+
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkIconMap::UpdateScrollIndicatorL()
+//
+// -----------------------------------------------------------------------------
+//
+void CLmkIconMap::UpdateScrollIndicatorL()
+    {
+    if (!iSBFrame)
+        {
+        return;
+        }
+    TEikScrollBarModel hSbarModel;
+    TEikScrollBarModel vSbarModel;
+
+    TEikScrollBarFrameLayout layout;
+
+    // Main pane without softkeys
+    TRect mainPaneRect;
+    if (!AknLayoutUtils::LayoutMetricsRect(AknLayoutUtils::EMainPane,
+            mainPaneRect))
+        {
+        mainPaneRect = iAvkonAppUi->ClientRect();
+        }
+
+    // Dialog layout, check variety first
+    TAknLayoutScalableParameterLimits iconMapDialogVariety =
+            AknLayoutScalable_Avkon::popup_grid_graphic_window_ParamLimits();
+
+    TInt maxVariety = iconMapDialogVariety.LastVariety();
+
+    // Check the CBA, if the orientation is not landscape
+    // there is not so much varieties
+    AknLayoutUtils::TAknCbaLocation location = AknLayoutUtils::CbaLocation();
+    TInt maxVarietyOffset = 0; // the offset for the certain cba location variety
+    TInt varietyOffset = maxVariety + 1;
+
+    // landscape variety number must be calculated offset == number of varieties
+    // same applies to the variety number for the biggest sized layout for the variety
+    if (Layout_Meta_Data::IsLandscapeOrientation())
+        {
+        varietyOffset = (maxVariety + 1) / KAknSctCBaButtonDirections; // the offset for one variety
+        }
+
+    // for right and left cba buttons the max variety is not zero
+    // the varities are ordered by the location of the cba and the descending order
+    // e.g the biggest sized layout first, the smallest last
+    if (location == AknLayoutUtils::EAknCbaLocationRight)
+        {
+        maxVarietyOffset = varietyOffset;
+        }
+    else if (location == AknLayoutUtils::EAknCbaLocationLeft)
+        {
+        maxVarietyOffset = varietyOffset + varietyOffset; // 2*
+        }
+
+    TInt varietyNumber = varietyOffset - iRows - 1;
+
+    // if more lines than possible to show, use the default
+    // (the biggest grid) variety
+    if (varietyNumber < 0)
+        varietyNumber = 0;
+    // if zero rows, use the minimum
+    else if (iRows <= 0)
+        varietyNumber -= 1;
+
+    //add the varietyoffset
+    varietyNumber += maxVarietyOffset;
+
+    if (Layout_Meta_Data::IsLandscapeOrientation() && (location
+            == AknLayoutUtils::EAknCbaLocationRight))
+        {
+        varietyNumber = 10;
+        }
+    else
+        {
+        varietyNumber = 3;
+        }
+    // Layout the dialog size
+    TAknLayoutRect dialogLayRect;
+    dialogLayRect.LayoutRect(mainPaneRect,
+            AknLayoutScalable_Avkon::popup_grid_graphic_window(varietyNumber));
+
+    TRect dialogRect = dialogLayRect.Rect();
+
+    // Get the layout of the actual icon grid with scrollbar
+    TAknLayoutRect gridWithScrollLayRect;
+
+    gridWithScrollLayRect.LayoutRect(TRect(TPoint(0, 0), TSize(
+            dialogRect.Size())),
+            AknLayoutScalable_Avkon::listscroll_popup_graphic_pane());
+
+    // Calculate the relative rect for the grid
+    TRect parent = gridWithScrollLayRect.Rect();
+
+    TAknWindowComponentLayout scrollbarLayout =
+            AknLayoutScalable_Avkon::scroll_pane_cp5();
+
+    iCurrentPage = (iFirstVisibleRow / Extension()->iMaxVisibleRows) + 1;
+
+    vSbarModel.iScrollSpan = iNumPages * Extension()->iMaxVisibleRows;
+    vSbarModel.iThumbSpan = Extension()->iMaxVisibleRows;
+
+    if (iSBFrame && iSBFrame->TypeOfVScrollBar()
+            == CEikScrollBarFrame::EDoubleSpan)
+        {
+        // For EDoubleSpan type scrollbar
+        vSbarModel.iThumbPosition = (iCurrentPage - 1)
+                * Extension()->iMaxVisibleRows;
+        TAknDoubleSpanScrollBarModel hDsSbarModel(hSbarModel);
+        TAknDoubleSpanScrollBarModel vDsSbarModel(vSbarModel);
+
+        // The y coordinate must be sifted 3 pixels up and x 3 to left
+        parent.iTl.iY -= KVerticalDialogMargin;
+        parent.iBr.iY -= KVerticalDialogMargin;
+        parent.iTl.iX -= KHorizontalDialogMargin;
+        parent.iBr.iX -= KHorizontalDialogMargin;
+
+        layout.iTilingMode = TEikScrollBarFrameLayout::EInclusiveRectConstant;
+        iSBFrame->Tile(&vDsSbarModel);
+        AknLayoutUtils::LayoutVerticalScrollBar(iSBFrame, parent,
+                scrollbarLayout);
+        iSBFrame->SetVFocusPosToThumbPos(vDsSbarModel.FocusPosition());
+        }
+    else
+        {
+        // For EArrowHead type scrollbar
+        vSbarModel.iThumbPosition = iCursorPos.iY + iFirstVisibleRow;
+        iSBFrame->TileL(&hSbarModel, &vSbarModel, parent, parent, layout);
+        iSBFrame->SetVFocusPosToThumbPos(vSbarModel.iThumbPosition);
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkIconMap::Reserved_1()
+//
+// -----------------------------------------------------------------------------
+//
+void CLmkIconMap::Reserved_1()
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkIconMap::Reserved_2()
+//
+// -----------------------------------------------------------------------------
+//
+void CLmkIconMap::Reserved_2()
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkIconMap::DrawOffscreenBackgroundIfRequired
+//
+// -----------------------------------------------------------------------------
+//
+void CLmkIconMap::DrawOffscreenBackgroundIfRequired() const
+    {
+    if (iOffscreenBg && iHasBitmapBackground)
+        {
+        if (!iOffscreenBgDrawn)
+            {
+            TRect mainPaneRect;
+            if (!AknLayoutUtils::LayoutMetricsRect(AknLayoutUtils::EMainPane,
+                    mainPaneRect))
+                {
+                mainPaneRect = iAvkonAppUi->ClientRect();
+                }
+
+            // Dialog layout, check variety first
+            TAknLayoutScalableParameterLimits
+                    iconMapDialogVariety =
+                            AknLayoutScalable_Avkon::popup_grid_graphic_window_ParamLimits();
+
+            TInt maxVariety = iconMapDialogVariety.LastVariety();
+
+            // Check the CBA, if the orientation is not landscape
+            // there is not so much varieties
+            AknLayoutUtils::TAknCbaLocation location =
+                    AknLayoutUtils::CbaLocation();
+            TInt maxVarietyOffset = 0; // the offset for the certain cba location variety
+            TInt varietyOffset = maxVariety + 1;
+
+            // landscape variety number must be calculated offset == number of varieties
+            // same applies to the variety number for the biggest sized layout for the variety
+            if (Layout_Meta_Data::IsLandscapeOrientation())
+                {
+                varietyOffset = (maxVariety + 1) / KAknSctCBaButtonDirections; // the offset for one variety
+                }
+
+            // for right and left cba buttons the max variety is not zero
+            // the varities are ordered by the location of the cba and the descending order
+            // e.g the biggest sized layout first, the smallest last
+            if (location == AknLayoutUtils::EAknCbaLocationRight)
+                {
+                maxVarietyOffset = varietyOffset;
+                }
+            else if (location == AknLayoutUtils::EAknCbaLocationLeft)
+                {
+                maxVarietyOffset = varietyOffset + varietyOffset; // 2*
+                }
+            TInt varietyNumber = varietyOffset - iRows - 1;
+
+            // if more lines than possible to show, use the default
+            // (the biggest grid) variety
+            if (varietyNumber < 0)
+                varietyNumber = 0;
+            // if zero rows, use the minimum
+            else if (iRows <= 0)
+                varietyNumber -= 1;
+
+            //add the varietyoffset
+            varietyNumber += maxVarietyOffset;
+
+            TAknLayoutRect popupGridLayRect;
+            popupGridLayRect.LayoutRect(mainPaneRect,
+                    AknLayoutScalable_Avkon::popup_grid_graphic_window(5));
+
+            TRect popupGridRect = popupGridLayRect.Rect();
+
+            // set the top left height as the control starting point
+            popupGridRect.iTl.iY = Rect().iTl.iY;
+
+            //if(popupGridRect.iBr.iY < mainPaneRect.iBr.iY)
+            //	popupGridRect.iBr.iY = mainPaneRect.iBr.iY
+            MAknsSkinInstance* skin = AknsUtils::SkinInstance();
+            MAknsControlContext* cc = AknsDrawUtils::ControlContext(this);
+
+            // draw to upper left corner, and normalize the retangle to
+            // fact that the dialog starts from coordinates (0,0),
+            // so the y-coordinate is correct (heading pane)
+            // but x must be set to zero
+            TPoint point = TPoint(0, 0);
+            popupGridRect.Move(-popupGridRect.iTl.iX, 0);
+
+            AknsDrawUtils::DrawBackground(skin, cc, this, *iBitmapGc, point,
+                    popupGridRect, KAknsDrawParamDefault);
+
+            iOffscreenBgDrawn = ETrue;
+            }
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkIconMap::ComponentControl(TInt aIndex) const
+// Return the controll pointer
+// -----------------------------------------------------------------------------
+//
+CCoeControl* CLmkIconMap::ComponentControl(TInt aIndex) const
+    {
+    if (aIndex == 0 && iSBFrame && iSBFrame->TypeOfVScrollBar()
+            == CEikScrollBarFrame::EDoubleSpan)
+        {
+        return iSBFrame->VerticalScrollBar();
+        }
+    else
+        {
+        return NULL;
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkIconMap::CountComponentControls()
+// Return no of controll to be placed on the container control
+// -----------------------------------------------------------------------------
+//
+TInt CLmkIconMap::CountComponentControls() const
+    {
+    if (iSBFrame && iSBFrame->TypeOfVScrollBar()
+            == CEikScrollBarFrame::EDoubleSpan)
+        {
+        return 1;
+        }
+    else
+        {
+        return 0;
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkIconMap::CountMaxColumnsAndCellSizes
+// Counts no of columns and the cell size will be displayed in the icon table
+// -----------------------------------------------------------------------------
+//
+void CLmkIconMap::CountMaxColumnsAndCellSizes()
+    {
+
+    TRect cellRect; // retangle of one item in grid
+    TRect gridRect; // retangle of the grid contaning the items
+
+    // 1. Get the layout
+
+    // Get the parent rect
+    TRect mainPaneRect;
+    if (!AknLayoutUtils::LayoutMetricsRect(AknLayoutUtils::EMainPane,
+            mainPaneRect))
+        {
+        mainPaneRect = iAvkonAppUi->ClientRect();
+        }
+
+    // Calculate the layout of the whole popup with the biggest possible -> 0
+    // Dialog layout, check variety first
+
+    // Get the layout rect of the dialog
+
+    // Check variety first
+    TAknLayoutScalableParameterLimits iconMapDialogVariety =
+            AknLayoutScalable_Avkon::popup_grid_graphic_window_ParamLimits();
+
+    TInt maxVariety = iconMapDialogVariety.LastVariety();
+
+    // Check the CBA, if the orientation is not landscape
+    // there is not so much varieties
+    AknLayoutUtils::TAknCbaLocation location = AknLayoutUtils::CbaLocation();
+    TInt maxVarietyOffset = 0; // the offset for the certain cba location variety
+    TInt varietyOffset = maxVariety + 1; // the number of varieties
+
+    // landscape variety number must be calculated offset == number of varieties
+    // same applies to the variety number for the biggest sized layout for the variety
+    if (Layout_Meta_Data::IsLandscapeOrientation())
+        {
+        varietyOffset = (maxVariety + 1) / KAknSctCBaButtonDirections; // the offset for one variety
+        }
+
+    if (location == AknLayoutUtils::EAknCbaLocationRight)
+        {
+        maxVarietyOffset = varietyOffset;
+        }
+    else if (location == AknLayoutUtils::EAknCbaLocationLeft)
+        {
+        maxVarietyOffset = varietyOffset + varietyOffset; // 2*
+        }
+
+    TAknLayoutRect popupGridLayRect;
+    popupGridLayRect.LayoutRect(mainPaneRect,
+            AknLayoutScalable_Avkon::popup_grid_graphic_window(
+                    maxVarietyOffset));
+
+    // Get the layout of the actual icon grid with scrollbar
+    TAknLayoutRect gridWithScrollLayRect;
+    gridWithScrollLayRect.LayoutRect(popupGridLayRect.Rect(),
+            AknLayoutScalable_Avkon::listscroll_popup_graphic_pane());
+
+    // Then the grid area without scrollbar
+    // NOTE: The grid with scroll bar is used as reference
+    TAknLayoutRect gridLayRect;
+    gridLayRect.LayoutRect(gridWithScrollLayRect.Rect(),
+            AknLayoutScalable_Avkon::grid_graphic_popup_pane(0));
+
+    // Different parent if SCT inside editing menu.
+    TRect rect = Rect();
+    gridRect = gridLayRect.Rect();
+    // cell size, AGAIN 7 item
+    TAknLayoutRect cellLayRect;
+    cellLayRect.LayoutRect(gridRect,
+            AknLayoutScalable_Avkon::cell_graphic_popup_pane(0, 0, 0));
+
+    cellRect = cellLayRect.Rect();
+
+    // 2. Calculate width related
+    // - item width
+    // - max number of columns
+
+    // Width of the items area
+    TInt gridWidth = gridRect.Width();
+
+    // Width of one item
+    TInt cellWidth = cellRect.Width();
+
+    // ensure the item width and store it
+    TAknLayoutRect secondCellLayRect;
+    secondCellLayRect.LayoutRect(gridRect,
+            AknLayoutScalable_Avkon::cell_graphic_popup_pane(0, 1, 0));
+
+    iGridItemWidth = secondCellLayRect.Rect().iTl.iX
+            - cellLayRect.Rect().iTl.iX;
+
+    if (iGridItemWidth < 0)
+        {
+        // The result is negative with lay file data if the layout is mirrored.
+        iGridItemWidth = -iGridItemWidth;
+        }
+
+    // Calculate the amount of columns
+    iMaxColumns = gridWidth / cellWidth;
+
+    // 2. Calculate height related
+    // - item height
+    // - max number of rows
+
+    // Get the grid height
+    // NOTE: in landscape the LAF is wrong so use the main panes height
+    TInt gridHeight = gridRect.Height();
+
+    // get the item height
+    TInt cellHeight = cellRect.Height();
+
+    // calculate the number of items fitting to grid
+    Extension()->iMaxVisibleRows = 3;//gridHeight / cellHeight;
+
+
+    // Store the item height
+    TAknLayoutRect secondRowLayRect;
+    secondRowLayRect.LayoutRect(gridLayRect.Rect(),
+            AknLayoutScalable_Avkon::cell_graphic_popup_pane(0, 0, 1));
+
+    iGridItemHeight = secondRowLayRect.Rect().iTl.iY
+            - cellLayRect.Rect().iTl.iY;
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkIconMap::HandleScrollEventL
+// Handles the different scroll events so that the map reacts accordingly.
+// -----------------------------------------------------------------------------
+//
+void CLmkIconMap::HandleScrollEventL(CEikScrollBar* aScrollBar,
+        TEikScrollEvent aEventType)
+    {
+    TBool update = EFalse;
+
+    switch (aEventType)
+        {
+        case EEikScrollUp:
+        case EEikScrollPageUp:
+            {
+            // nothing done if we are already on the first page.
+            if (iFirstVisibleRow != 0)
+                {
+                iFirstVisibleRow -= Extension()->iMaxVisibleRows;
+                update = ETrue;
+                }
+            UpdateScrollIndicatorL();
+            }
+            break;
+        case EEikScrollDown:
+        case EEikScrollPageDown:
+            {
+            // nothing done if we are already on the last page.
+            if (iFirstVisibleRow != (iRows / Extension()->iMaxVisibleRows)
+                    * Extension()->iMaxVisibleRows)
+                {
+                iFirstVisibleRow += Extension()->iMaxVisibleRows;
+                update = ETrue;
+                }
+            UpdateScrollIndicatorL();
+            }
+            break;
+        case EEikScrollThumbDragVert:
+            {
+            TInt thumbPosition;
+            TInt halfPage = Extension()->iMaxVisibleRows / 2;
+            // Ask which type of scrollbar is shown
+            //CAknAppUi* appUi = iAvkonAppUi;
+            TBool isDoubleSpan = CEikScrollBarFrame::EDoubleSpan
+                    == iSBFrame->TypeOfVScrollBar();
+            if (isDoubleSpan)
+                {
+                thumbPosition
+                        = static_cast<const TAknDoubleSpanScrollBarModel*> (aScrollBar->Model())->FocusPosition();
+                }
+            else
+                {
+                thumbPosition = aScrollBar->Model()->iThumbPosition;
+                }
+
+            // If the slider is in the range of less then a half page from a possible correct thumb position.
+            // thus 0 <= iFirstVisibleRow - thumbPosition < halfPage. Or in the other direction:
+            // 0 <= thumbPosition - iFirstVisibleRow < halfPage
+            if (!((0 <= iFirstVisibleRow - thumbPosition && iFirstVisibleRow
+                    - thumbPosition < halfPage) || (0 <= thumbPosition
+                    - iFirstVisibleRow && thumbPosition - iFirstVisibleRow
+                    < halfPage)))
+                {
+                TReal toRound = thumbPosition
+                        / (TReal) Extension()->iMaxVisibleRows;
+                if (toRound * 2 > (TInt) toRound * 2 + 1)
+                    {
+                    toRound++;
+                    }
+                iFirstVisibleRow = (TInt) toRound
+                        * Extension()->iMaxVisibleRows;
+                iCurrentPage = (iFirstVisibleRow
+                        / Extension()->iMaxVisibleRows) + 1;
+                update = ETrue;
+                }
+            }
+            break;
+        case EEikScrollThumbReleaseVert:
+            {
+            UpdateScrollIndicatorL();
+            }
+            break;
+        case EEikScrollLeft: // flow through
+        case EEikScrollRight: // flow through
+        case EEikScrollPageLeft: // flow through
+        case EEikScrollPageRight: // flow through
+        case EEikScrollThumbDragHoriz: // flow through
+        case EEikScrollThumbReleaseHoriz: // flow through
+            // do nothing
+            break;
+        default:
+            // do nothing
+            break;
+        }
+
+    // If we have moved down to the last page we check that the cursor is in a place where it can be
+    // drawn.
+    if (iFirstVisibleRow == (iRows / Extension()->iMaxVisibleRows)
+            * Extension()->iMaxVisibleRows)
+        {
+        // the old cursor is set to a "safe" position where it at least can be.
+        iOldCursorPos.iX = 0;
+        iOldCursorPos.iY = 0;
+        // if the last page has only one line which isn't filled complitely.
+        if (iConsArray->Count() % iMaxColumns - 1 < iCursorPos.iX && iRows
+                % Extension()->iMaxVisibleRows == 1)
+            {
+            TInt xVal = iConsArray->Count() % iMaxColumns - 1;
+            if (xVal >= 0)
+                iCursorPos.iX = xVal;
+            }
+        // If the cursor is in a position where it would go unto a spot with out
+        // a icon when scrolled.
+        if (iCursorPos.iY + iFirstVisibleRow >= iRows)
+            {
+            if (iConsArray->Count() % iMaxColumns > iCursorPos.iX)
+                {
+                TInt yVal = iRows - 1 - iFirstVisibleRow;
+                if (yVal >= 0)
+                    iCursorPos.iY = yVal;
+                }
+            else
+                {
+                TInt yVal = iRows - 2 - iFirstVisibleRow;
+                if (yVal >= 0)
+                    iCursorPos.iY = yVal;
+                }
+            }
+        // If the cursor is actually on the last row, but is still in the
+        // area where there is now icons. (the rest of the last row)
+        if (iConsArray->Count() <= (iFirstVisibleRow + iCursorPos.iY)
+                * iMaxColumns + iCursorPos.iX && iCursorPos.iY
+                + iFirstVisibleRow + 1 == iRows)
+            {
+            iCursorPos.iY--;
+            }
+        // if the corrections did not help and the cursor is in the area
+        // where there is a valid row, but no icons anymore
+        }
+
+    // to avoid flicker we draw only if there really was something new to draw.
+    if (update)
+        {
+        if (Extension()->iObserver)
+            {
+            Extension()->iObserver->HandleControlEventL(this,
+                    MCoeControlObserver::EEventRequestFocus);
+            }
+        DrawDeferred();
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkIconMap::Extension
+// Asserts that extension object has been created.
+// -----------------------------------------------------------------------------
+//
+CLmkIconMapExtension* CLmkIconMap::Extension() const
+    {
+    __ASSERT_ALWAYS(iExtension, Panic(KLmkPanicNullPointer));
+    return iExtension;
+    }
+
+#ifdef RD_SCALABLE_UI_V2
+//--------------------------------------------------------------------------
+// void CLmkIconMap::HandlePointerEventL()
+//--------------------------------------------------------------------------
+void CLmkIconMap::HandlePointerEventL(const TPointerEvent& aPointerEvent)
+    {
+    if (AknLayoutUtils::PenEnabled())
+        {
+        TInt newGridX; // For the whole
+        TInt newGridY; // For the whole grid.
+        TInt yInPixels = aPointerEvent.iPosition.iY - iGridTopLeft.iY;
+        newGridY = yInPixels / iGridItemHeight;
+        if ((aPointerEvent.iPosition.iX - iGridTopLeft.iX) < 0)
+            {
+            newGridX = -1;
+            }
+        else
+            {
+            newGridX = (aPointerEvent.iPosition.iX - iGridTopLeft.iX)
+                    / iGridItemWidth;
+            }
+        TInt previousRows = (iRows / iExtension->iMaxVisibleRows)
+                * iExtension->iMaxVisibleRows;
+        TUint lastRowsLength = iConsArray->Count() % iMaxColumns;
+
+        // The pointer has been set down or dragged into the area of the grid. (it might be in
+        // the "white space" at the end of the grid)
+        if ((yInPixels >= 0 && yInPixels < iGridItemHeight
+                * iExtension->iMaxVisibleRows) &&
+        // When the pointer is in rows except the recent icon row
+                ((((newGridY + iFirstVisibleRow) != 0) && newGridX
+                        < iMaxColumns && newGridX >= 0) ||
+                // When the pointer is in the recent icon row
+                        ((newGridY + iFirstVisibleRow == 0) && (newGridX
+                                < iMaxColumns))))
+            {
+            // For any action to be taken, the pointer event must either be a Button1Down or a drag event
+            // which has originated from a Button1Down in to the grid.
+            if (aPointerEvent.iType == TPointerEvent::EButton1Down)
+                {
+                TUint globalY = newGridY + iFirstVisibleRow;
+                // The user tapps a cell which has no icon. it is ignored.
+                if (iConsArray->Count() > globalY * iMaxColumns + newGridX)
+                    {
+                    //If icon is already selected then on single tap it should change the icon.
+                    if (iCursorPos.iY == newGridY && iCursorPos.iX
+                            == newGridX)
+                        {
+#ifdef RD_TACTILE_FEEDBACK
+                        // The user tapps a cell which has icon, selection has been accepted
+                        MTouchFeedback* feedback = MTouchFeedback::Instance();
+                        if (feedback)
+                            {
+                            feedback->InstantFeedback(this,
+                                    ETouchFeedbackBasic);
+                            }
+#endif //RD_TACTILE_FEEDBACK
+                        //iIsChangeIcon = ETrue;
+                        }
+                    else if (iCursorPos.iX + (iCursorPos.iY
+                                    + iFirstVisibleRow) * iMaxColumns
+                            < iConsArray->Count())
+                        {
+#ifdef RD_TACTILE_FEEDBACK
+                        // The user tapps a cell which has icon, send feedback if position has changed
+                        MTouchFeedback* feedback = MTouchFeedback::Instance();
+                        const TBool feedbackNeeded = (iCursorPos.iY
+                                != newGridY) || (iCursorPos.iX != newGridX);
+                        if (feedback && feedbackNeeded)
+                            {
+                            feedback->InstantFeedback(this,
+                                    ETouchFeedbackBasic);
+                            }
+#endif //RD_TACTILE_FEEDBACK
+                        iOldCursorPos = iCursorPos;
+                        iCursorPos.iY = newGridY;
+                        iCursorPos.iX = newGridX;
+                        DrawCursor();
+                        }
+                    else
+                        {
+                        iOldCursorPos = iCursorPos;
+                        iCursorPos.iY = newGridY;
+                        iCursorPos.iX = newGridX;
+                        DrawCursor();
+                        }
+                    }
+                }
+            else if (aPointerEvent.iType == TPointerEvent::EDrag)
+                {
+                //Handle drag event only if the icon is not already selected, if already selected then do nothing for EDrag event
+                if (iCursorPos.iY != newGridY || iCursorPos.iX != newGridX)
+                    {
+                    //iIsChangeIcon = EFalse;
+                    TUint globalY = newGridY + iFirstVisibleRow;
+                    // The user tapps a cell which has no icon. it is ignored.
+                    if (iConsArray->Count() > globalY * iMaxColumns
+                            + newGridX)
+                        {
+                        if (iCursorPos.iX
+                                + (iCursorPos.iY + iFirstVisibleRow)
+                                * iMaxColumns < iConsArray->Count())
+                            {
+#ifdef RD_TACTILE_FEEDBACK
+                            // While dragging cell is changed, give sensitive feedback
+                            MTouchFeedback* feedback =
+                            MTouchFeedback::Instance();
+                            const TBool feedbackNeeded = (iCursorPos.iY
+                                    != newGridY) || (iCursorPos.iX
+                                    != newGridX);
+                            if (feedback && feedbackNeeded)
+                                {
+                                feedback->InstantFeedback(this,
+                                        ETouchFeedbackSensitive);
+                                }
+#endif //RD_TACTILE_FEEDBACK
+                            iOldCursorPos = iCursorPos;
+                            iCursorPos.iY = newGridY;
+                            iCursorPos.iX = newGridX;
+                            DrawCursor();
+                            }
+                        else
+                            {
+                            iOldCursorPos.iX = 0;
+                            iOldCursorPos.iY = 0;
+                            }
+                        }
+                    }
+
+                }
+            else if (aPointerEvent.iType == TPointerEvent::EButton1Up)
+                {
+                //if (iIsChangeIcon)
+
+                    {
+                    iExtension->iObserver->HandleControlEventL(this,
+                            MCoeControlObserver::EEventStateChanged);
+                    //iIsChangeIcon = EFalse;
+                    }
+                }
+            }
+        // Events: Drag and repeat pointer events which are not on the scrollbar are handled here.
+
+        else if (iConsArray->Count() > iMaxColumns
+                * iExtension->iMaxVisibleRows && newGridX < iMaxColumns
+                && newGridX >= 0 && newGridY < iExtension->iMaxVisibleRows
+                && newGridY >= 0)
+            {
+            TRect ignoreUpRect(TPoint(KMinTInt, KMinTInt), TPoint(KMaxTInt,
+                            iGridTopLeft.iY));
+            TRect ignoreDownRect(TPoint(KMinTInt, (iGridTopLeft.iY
+                                    + iGridItemHeight * iExtension->iMaxVisibleRows)),
+                    TPoint(KMaxTInt, KMaxTInt));
+            // Drag events
+            if (aPointerEvent.iType == TPointerEvent::EDrag
+                    || aPointerEvent.iType == TPointerEvent::EButtonRepeat)
+                {
+                // The pointer is dragged upwards from map
+                if (aPointerEvent.iPosition.iY < iGridTopLeft.iY
+                        && aPointerEvent.iPosition.iX < iGridTopLeft.iX) //scroll up
+                    {
+                    // focus on first page
+                    if (iFirstVisibleRow == 0)
+                        {
+                        iFirstVisibleRow = previousRows;
+                        // if the last page contains only one partial row.
+                        if (lastRowsLength - 1 < iCursorPos.iX && iRows
+                                % iExtension->iMaxVisibleRows == 1)
+                            {
+                            iCursorPos.iX = lastRowsLength - 1;
+                            }
+                        }
+                    // focus on some other page than first
+                    else
+                        {
+                        iFirstVisibleRow -= iExtension->iMaxVisibleRows;
+                        }
+                    // For odd reason the user has been able to induce upward dragging with out moving
+                    // up through the grid.
+                    if (iCursorPos.iY + iExtension->iMaxVisibleRows
+                            != iFirstVisibleRow)
+                        {
+                        iCursorPos.iY = 0;
+                        }
+                    UpdateScrollIndicatorL();
+                    if (iExtension->iObserver)
+                        {
+                        iExtension->iObserver->HandleControlEventL(this,
+                                MCoeControlObserver::EEventRequestFocus);
+                        }
+                    DrawDeferred();
+                    }
+                // the pointer is dragged downwards from the map.
+                else if (yInPixels >= iGridItemHeight
+                        * iExtension->iMaxVisibleRows) //scroll down
+                    {
+                    // The focus is on the last page
+                    if (iFirstVisibleRow == previousRows)
+                        {
+                        iFirstVisibleRow = 0;
+                        iCursorPos.iY = iExtension->iMaxVisibleRows - 1;
+                        }
+                    // The focus is on some other page than the last one.
+                    else
+                        {
+                        iFirstVisibleRow += iExtension->iMaxVisibleRows;
+                        // if the next page is the last page
+                        if (iFirstVisibleRow == previousRows)
+                            {
+                            // the old cursor is set to a "safe" position where it at least can be.
+                            iOldCursorPos.iX = 0;
+                            iOldCursorPos.iY = 0;
+
+                            // if the last page has only one line which isn't filled complitely.
+                            if (lastRowsLength - 1 < iCursorPos.iX && iRows
+                                    % iExtension->iMaxVisibleRows == 1)
+                                {
+                                iCursorPos.iX = lastRowsLength - 1;
+                                }
+                            // If the cursor is in a position where it would go unto a spot with out
+                            // a icon when scrolled.
+                            if (lastRowsLength > iCursorPos.iX)
+                                {
+                                //
+                                iCursorPos.iY = iRows - 1 - iFirstVisibleRow;
+                                }
+                            else
+                                {
+                                //
+                                iCursorPos.iY = iRows - 2 - iFirstVisibleRow;
+                                }
+                            }
+                        }
+                    UpdateScrollIndicatorL();
+                    if (iExtension->iObserver)
+                        {
+                        iExtension->iObserver->HandleControlEventL(this,
+                                MCoeControlObserver::EEventRequestFocus);
+                        }
+                    DrawDeferred();
+                    }
+                }
+            }
+
+        else // For a non window owning scrollbar.
+            {
+            CCoeControl::HandlePointerEventL(aPointerEvent);
+            }
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkIconMap::SetObserver
+// Sets the observer.
+// -----------------------------------------------------------------------------
+//
+void CLmkIconMap::SetObserver( MCoeControlObserver* aObserver )
+    {
+    if (iExtension)
+        {
+        iExtension->iObserver = aObserver;
+        }
+    }
+
+#endif //RD_SCALABLE_UI_V2
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landmarksui/uicontrols/src/lmkwaitdlglauncher.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,194 @@
+/*
+* 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:    LandmarksUi Content File -    Encapuslates the Wait dialog in an Active Object interface
+*
+*/
+
+
+
+
+
+
+
+// System Includes
+#include <lmkui.rsg>
+
+// User Includes
+#include "lmkwaitdlglauncher.h"
+
+// -----------------------------------------------------------------------------
+// CLmkWaitDialogLauncher::CLmkWaitDialogLauncher
+// C++ Overloaded constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+CLmkWaitDialogLauncher::CLmkWaitDialogLauncher()
+    :CActive( EPriorityStandard )
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkWaitDialogLauncher::~CLmkWaitDialogLauncher
+// C++ destructor
+// -----------------------------------------------------------------------------
+//
+CLmkWaitDialogLauncher::~CLmkWaitDialogLauncher()
+    {
+    Cancel();
+
+    if ( iSchedWait->IsStarted() )
+        {
+        iSchedWait->AsyncStop();
+        }
+
+    delete iSchedWait;
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkWaitDialogLauncher* CLmkWaitDialogLauncher::NewL
+// Two phase constructor
+// -----------------------------------------------------------------------------
+//
+CLmkWaitDialogLauncher* CLmkWaitDialogLauncher::NewL()
+    {
+    CLmkWaitDialogLauncher* self =
+                new ( ELeave ) CLmkWaitDialogLauncher();
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// void CLmkWaitDialogLauncher::ConstructL
+// Second phase constructor
+// -----------------------------------------------------------------------------
+//
+void CLmkWaitDialogLauncher::ConstructL()
+    {
+    iSchedWait = new ( ELeave )CActiveSchedulerWait;
+    CActiveScheduler::Add( this);
+    }
+
+// -----------------------------------------------------------------------------
+// void CLmkWaitDialogLauncher::StartWaitDialogL
+// Starts the wait dialog
+// -----------------------------------------------------------------------------
+//
+void CLmkWaitDialogLauncher::StartWaitDialogL()
+    {
+    if( IsActive())
+        {
+        User::Leave( KErrInUse );
+        }
+
+    // Issue a request for Wait dialog launching
+
+    TRequestStatus* status = &iStatus;
+    User::RequestComplete( status, KErrNone );
+    SetActive();
+    }
+
+// -----------------------------------------------------------------------------
+// void CLmkWaitDialogLauncher::StartWaitDialogL
+// Stops the wait dialog
+// -----------------------------------------------------------------------------
+//
+TInt CLmkWaitDialogLauncher::StopWaitDialogL()
+    {
+    if ( iWaitNote )
+        {
+        TRAPD( err, iWaitNote->ProcessFinishedL() );
+        if (err != KErrNone)
+    		{
+		    delete iWaitNote;
+            iWaitNote = NULL;
+            return KErrNone;
+	    	}
+        }
+
+    // Rechecking the Wait note is required since, the value might get modified
+    // in DialogDismissedL call
+
+    if( iWaitNote )
+        {
+        iSchedWait->Start();
+        }
+
+    // Return the Button ID with which the dialog was dismissed
+    return iButtonId;
+    }
+
+// -----------------------------------------------------------------------------
+// void CLmkWaitDialogLauncher::DialogDismissedL
+// Inherited from MProgressDialogCallback
+// -----------------------------------------------------------------------------
+//
+void CLmkWaitDialogLauncher::DialogDismissedL( TInt aButtonId )
+    {
+    // Store the Button ID for later retrival
+    iButtonId = aButtonId;
+
+    if ( iSchedWait->IsStarted() )
+        {
+        iSchedWait->AsyncStop();
+        }
+    iWaitNote = NULL;
+    if(iObserver)
+    	{
+    	iObserver->HandleDialogDismissed( iButtonId );
+    	}
+    }
+
+// -----------------------------------------------------------------------------
+// void CLmkWaitDialogLauncher::RunL
+// Inherited from CActive
+// -----------------------------------------------------------------------------
+//
+void CLmkWaitDialogLauncher::RunL()
+    {
+    if( iStatus.Int() == KErrNone )
+        {
+        // Launch the Wait dialog
+        iWaitNote = new (ELeave) CAknWaitDialog
+                      ((REINTERPRET_CAST(CEikDialog**,&iWaitNote)), ETrue );
+        iWaitNote->SetCallback( this );
+        if ( !iWaitNote->ExecuteLD( R_LMK_REQUEST_LOCATION ) )
+            {
+            //making iWaitNote null, since framework destroys waitnote
+            //dialog on pressing cancel.
+            iWaitNote = NULL;
+            }
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// void CLmkWaitDialogLauncher::DoCancel
+// Inherited from CActive
+// -----------------------------------------------------------------------------
+//
+void CLmkWaitDialogLauncher::DoCancel()
+    {
+    TRAP_IGNORE( iButtonId = StopWaitDialogL() );
+    }
+    
+// -----------------------------------------------------------------------------
+// void CLmkWaitDialogLauncher::SetObserver
+// -----------------------------------------------------------------------------
+void CLmkWaitDialogLauncher::SetObserver( MLmkWaitDialogLauncherObserver* aObserver)
+	{
+	iObserver = aObserver;
+	}
+
+// End of File
--- a/layers.sysdef.xml	Tue Aug 31 15:09:25 2010 +0300
+++ b/layers.sysdef.xml	Wed Sep 01 12:31:27 2010 +0100
@@ -1,12 +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/location" >
 ]>
-<SystemDefinition name="location" schema="1.5.1">
+
+<SystemDefinition name="location" schema="1.4.0">
   <systemModel>
     <layer name="app_layer">
-    	<module name="location">
-		<unit unitID="lodo.location.pro" mrp="" bldFile="&layer_real_source_path;" name="location_pro" proFile="location.pro"/>
+      <module name="location">
+        <unit unitID="lodo.location" mrp="" bldFile="&layer_real_source_path;/group" name="location" />
       </module>
     </layer>
   </systemModel>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/loc_plat/group/bld.inf	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,17 @@
+/*
+* 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:  Includes all the Domain API specific bld.inf files, which 
+*                export files.
+*
+*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/loc_pub/group/bld.inf	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,26 @@
+/*
+* 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:    LandmarksUi Content File -    Includes all the SDK API specific bld.inf files, which 
+*                export files.
+*
+*/
+
+
+
+
+
+
+
+#include "../landmarks_ui_selector_api/group/bld.inf"
+#include "../landmarks_ui_addedit_api/group/bld.inf"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/loc_pub/landmarks_ui_addedit_api/group/bld.inf	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,31 @@
+/*
+* 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:    LandmarksUi Content File -    File that exports the files belonging to 
+*                Landmarks UI Add/Edit API
+*
+*/
+
+
+
+
+
+
+#include <platform_paths.hrh>
+
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_EXPORTS
+
+../inc/CLmkEditorDlg.h     APP_LAYER_PUBLIC_EXPORT_PATH(CLmkEditorDlg.h)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/loc_pub/landmarks_ui_addedit_api/inc/CLmkEditorDlg.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,282 @@
+/*
+* 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:    LandmarksUi Content File -    This class provides functionality for viewing and editing
+*                landmark data.
+*
+*/
+
+
+
+
+
+
+#ifndef CLMKEDITORDLG_H
+#define CLMKEDITORDLG_H
+
+//  INCLUDES
+#include "EPos_CPosLandmark.h"
+#include <EPos_Landmarks.h> // Lm typedefs, constants etc.
+#include <e32base.h>        // CBase
+
+// FORWARD DECLARATIONS
+class CPosLandmarkDatabase;
+class CPosLandmark;
+class CLmkEditorImpl;
+class MObjectProvider;
+class TCoeHelpContext;
+class CLmkSender;
+
+// TYPE DEFINITIONS
+typedef TUint32 TLmkEditorAttributes;
+typedef TInt TLmkEditorMode;
+
+// CLASS DECLARATION
+/**
+*  This is a dialog class, which is used to launch landmark viewer/editor.
+*  It provides functionality for viewing and editing landmark data.
+*  By default all the fields are shown, but user can customize the total number of
+*  displayable fields. It also supports mechanism to disable map and navigation
+*  related menu option.
+*/
+class CLmkEditorDlg : public CBase
+    {
+    public: // Types
+
+	      /*!
+	      @enum _TLmkEditorAttributes
+	      @discussion Defines the flag for displaying landmark fields on the viewer/editor dialog.
+          Any combination of these flags,will display those fields,when viewer/editor is launched.
+          By default the flag is set as ELmkAll.This flag is set in class TLmkEditorParams.
+       */
+
+        enum _TLmkEditorAttributes
+            {
+            /**This flag allows Name field of the landmark, to be shown.*/
+            ELmkOnlyName            = 0x0000,
+            /**This flag allows the Category/Categories field of the landmark , to be shown*/
+            ELmkCategory            = 0x0001,
+            /**This flag allows the Street name field of the landmark,to be shown.*/
+            ELmkStreet              = 0x0002,
+            /**This flag allows the City name field to be shown, where the landmark belongs.*/
+            ELmkCity                = 0x0004,
+            /**This flag allows the State name field to be shown,where the landmark belongs.*/
+            ELmkStateProvince       = 0x0008,
+            /**This flag allows the Country name field to be shown, where landmark belongs.*/
+            ELmkCountry             = 0x0010,
+            /**This flag allows the Postal Zip field of the landmark, to be shown.*/
+            ELmkPostalZIP           = 0x0020,
+            /**This flag allows the Latitude field of the landmark, to be shown.*/
+            ELmkLatitude            = 0x0040,
+            /**This flag allows the Longitude field of the landmark, to be shown.*/
+            ELmkLongitude           = 0x0080,
+            /**This flag allows the Position accuracy field of the landmark, to be shown.It specifies the
+               horizontal accuracy of the landmark related to Longitude and Latitude values.
+            */
+            ELmkPositionAccuracy    = 0x0100,
+            /**This flag allows the Altitude field of the landmark, to be shown. It specifies the vertical
+               position of the landmark.*/
+            ELmkAltitude            = 0x0200,
+            /**This flag allows the Altitude accuracy field of the landmark, to be shown.It specifies the
+               vertical accuracy of the landmark related to Landmark's Altitude value.*/
+            ELmkAltitudeAccuracy    = 0x0400,
+            /**This flag allows All fields of the landmark, to be shown.*/
+            ELmkAll                 = 0xFFFF,
+            /**This flag allows the Description field of the landmark, to be shown.*/
+            ELmkDescription         = 0x0800,
+            /**This flag allows the Phone number field of the landmark, to be shown.*/
+            ELmkPhoneNumber         = 0x1000,
+            /**This flag allows the Web address field of the landmark, to be shown.*/
+            ELmkWebAddress          = 0x2000
+            };
+
+        /*!
+         @enum _TLmkEditorMode
+         @discussion Defines flag, that decides the mode in which the landmark
+         dialog is launched(viewer or editor).
+         By default, the flag is set as ELmkEditor.This flag is set in class
+         TLmkEditorParams.
+        */
+	    enum _TLmkEditorMode
+            {
+            /**Landmark will be launched in editor mode. */
+            ELmkEditor,
+            /**Landmark will be launched in viewer mode. */
+            ELmkViewer  // only viewing allowed
+            };
+
+        /**
+        * This class is a wrapper, around the flags @ref _TLmkEditorAttributes and @ref _TLmkEditorMode.
+        * It is used to set these flags to CLmkEditorDlg before launching the dialog.
+        * It encapsualtes _TLmkEditorAttributes & _TLmkEditorMode.
+        * It is used by class CLmkEditorDlg.
+        */
+        class TLmkEditorParams
+            {
+            public:  // Constructors and destructor
+                /**
+                * C++ Constructor.
+                * @return newly instantiated object
+                */
+                IMPORT_C TLmkEditorParams();
+
+                // Compiler-generated destructor is ok for this class;
+
+            private:  // Unimplemented functions
+                // Unimplemented copy constructor
+                TLmkEditorParams( const TLmkEditorParams& );
+
+                // Unimplemented assignment operator
+                TLmkEditorParams& operator = ( const TLmkEditorParams& );
+
+            public:  // Input parameters
+
+                /**
+                * This member,specifies what all landmark attributes to be shown in editor/viewer dialog.
+                * It can have a combination of values from enum @ref _TLmkEditorAttributes.
+                * By default ELmkAll attribute is used if no value is specified.
+                */
+                TLmkEditorAttributes iAttributes;
+
+                /**
+                * This member,specifies the mode (Viewer or Editor) in which the landmark dialog will be launched.
+                * It holds a value from enum @ref _TLmkEditorMode, by default ELmkEditor is used if no value is specified.
+                */
+                TLmkEditorMode iEditorMode;
+            };
+
+    public:  // Constructors and destructor
+        /**
+        * This is a static function, which creates and returns an instance of this class,
+        * based on landmark id, which exists in landmark database.
+        * @param[in] aDb Reference to landmark database that includes this landmark.
+        * @param[in] aLandmark Landmark id, which exists in Landmarks database.
+        * @param[in] aParams Attribute, holds values for launching the landmark dialog
+        *			 in viewer or editor mode, and number of landmark fields to be
+        *            displayed.
+        * @panic Panics with system-wide panic codes.
+        * @leave Leaves with KErrNotFound,If the landmark does not exist in the database
+        *        Leaves with KErrNotSupported if framework functionality is not available.
+        * @return new instance of this class
+        */
+        IMPORT_C static CLmkEditorDlg* NewL( CPosLandmarkDatabase& aDb,
+                                             TPosLmItemId aLandmarkId,
+                                             TLmkEditorParams& aParams );
+
+        /**
+        * This is a static function, which creates and returns an instance of this class,
+        * based on landmark object, which does not exist in landmark database.
+        * @param[in] aDb reference to landmark database, where new landmark will be created,
+        *            if launched in edit mode.
+        * @param [in\out] aLandmark  pre-filled landmarks object. In case of edit mode,
+        *  				 the passed aLandmark is updated with the information entered
+        *                by the user along with the landmark id, which can be obtained
+        *                by calling LandmarkId() method of CPosLandmark.
+        * @param[in] aParams aParams attributes whether to launch landmark in viewer mode
+        *            or editor mode.
+        * @panic Panics with system-wide panic codes.
+        * @leave Leaves with KErrNotSupported if framework functionality is not available.
+        * @return new instance of this class
+        */
+        IMPORT_C static CLmkEditorDlg* NewL( CPosLandmarkDatabase& aDb,
+                                             CPosLandmark& aLandmark,
+                                             TLmkEditorParams& aParams );
+
+        /**
+        * Destructor.
+        */
+        IMPORT_C ~CLmkEditorDlg();
+
+    public: // New functions
+        /**
+        * This method sets the context - that is, the enclosing parent control - for this control.
+        * @param[in] aParent The parent object which is the context for the control.
+        */
+        IMPORT_C void SetMopParent( MObjectProvider* aParent );
+
+        /**
+        * This method sets help context. There are many applications using landmark editor
+        * and they may have an own help topic to be shown, when editor's help
+        * is launched. With this command it is possible to define the used
+        * help content. Landmark's own help context is used as default.
+        * @param[in] aContext help context to use
+        */
+        IMPORT_C void SetHelpContext( TCoeHelpContext aContext );
+
+        /**
+        * This function launches the landmark dialog.It launches the dialog either in viewer
+        * or editor mode , depending upon the flag set.
+        *
+        * Editor mode:
+        * 	When the dialog is launched in edit mode, the user can edit the landmark fields (some or all)
+        * 	and can save the Landmark.
+        * 	On closing the dialog, the landmark is saved to the landmark database. If saving a
+        * 	landmark fails due to less memory, the user is notified with an information note. If any
+        * 	of the landmark fields are filled and landmark name is not provided, user is asked to
+        * 	provide the landmark name, else if nothing is entered the dialog will close without saving
+        *   the landmark.
+        *   In case of new landmark creation, once the dialog is closed and the application returns
+        *   from ExecuteLD() method, client applications can obtain the landmark id of the newly
+        *   created landmark by calling LandmarkId() method from CPosLandmark class.
+        *
+        * Viewer mode:
+        * The user can view the Landmark contents by accepting the dialog
+        *                      Canelling the dialog will close the dialog
+        * @panic Panics with system-wide, panic codes.
+        * @leave  Leaves with KErrNotSupported if framework functionality is not available.
+        * @return Returns non-zero if accepted & saved in edit mode.
+        		  Returns zero if fails due to less memory or any other error
+        		  in edit mode.It always returns zero in view mode.
+        */
+        IMPORT_C TInt ExecuteLD();
+        /**
+        * This function, when invoked, disables the Map and Navigation related Menu Options
+        * This needs to be invoked before ExecuteLD(). By default, the Map and Navigation
+        * menu options are enabled and are shown.
+        *
+        */
+        IMPORT_C void DisableMapAndNavigationMenuOptions();
+
+    private:
+        /**
+        * C++ default constructor.
+        * @return newly instantiated object
+        */
+        CLmkEditorDlg();
+
+        /**
+        * By default Symbian 2nd phase constructor is private.
+        * @param aDb
+        * @param aParams
+        * @param aLandmarkId
+        * @param aLandmark
+        */
+        void ConstructL( CPosLandmarkDatabase& aDb,
+                         TLmkEditorParams& aParams,
+                         TPosLmItemId aLandmarkId,
+                         CPosLandmark* aLandmark );
+
+    private:    // Data
+        /// Own: Search implementor object
+        CLmkEditorImpl* iEditorImpl;
+
+        /// Own: A pointer to TBool
+        TBool* iDestroyedPtr;
+
+        /// Own: Landmark sender object
+        CLmkSender* iSender;
+    };
+
+#endif      // CLMKEDITORDLG_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/loc_pub/landmarks_ui_addedit_api/landmarks_ui_addedit_api.metaxml	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,18 @@
+<?xml version="1.0" ?>
+<api id="da13f555b4b1eb74824cc82c413a30cf" dataversion="2.0">
+  <name>Landmarks UI Add/Edit API</name>
+  <description>This API provides UI components for creating and manipulating Landmarks.</description>
+  <type>c++</type>
+  <collection>landmarksui</collection>
+  <libs>
+    <lib name="LmkCommonUi.lib" />
+  </libs>
+  <release category="public" sinceversion="0"/>
+  <attributes>
+     <!-- This indicates wether the api provedes separate html documentation -->
+     <!-- or is the additional documentation generated from headers. -->
+     <!-- If you are unsuere then the value is "no" -->
+     <htmldocprovided>no</htmldocprovided>
+     <adaptation>no</adaptation>
+  </attributes>
+</api>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/loc_pub/landmarks_ui_addedit_api/tsrc/bc/bcapplmkeditor/bmarm/bcapplmkaddeditu.def	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,3 @@
+EXPORTS
+	LibEntryL__FR13CTestModuleIf @ 1 NONAME R3UNUSED ; LibEntryL(CTestModuleIf &)
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/loc_pub/landmarks_ui_addedit_api/tsrc/bc/bcapplmkeditor/bwins/bcapplmkaddeditu.def	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,3 @@
+EXPORTS
+	?LibEntryL@@YAPAVCScriptBase@@AAVCTestModuleIf@@@Z @ 1 NONAME ; class CScriptBase * LibEntryL(class CTestModuleIf &)
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/loc_pub/landmarks_ui_addedit_api/tsrc/bc/bcapplmkeditor/bwins/bcapplmkeddeditu.def	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,3 @@
+EXPORTS
+	?LibEntryL@@YAPAVCScriptBase@@AAVCTestModuleIf@@@Z @ 1 NONAME ; class CScriptBase * __cdecl LibEntryL(class CTestModuleIf &)
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/loc_pub/landmarks_ui_addedit_api/tsrc/bc/bcapplmkeditor/data/bcapplmkeditor.rss	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,425 @@
+/*
+* 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:    LandmarksUi Content File -     
+*
+*/
+
+
+
+
+
+
+
+NAME BCAP
+
+#include <eikon.rh>
+#include "BCAppLmkEditor.hrh"
+#include <avkon.rsg>
+#include <avkon.rh>
+#include <avkon.mbg>
+
+// for Text Setting Page
+#define TEXT_SETTING_PAGE_NUMBER 1
+#define TEXT_SETTING_PAGE_WIDTH 9
+#define TEXT_SETTING_PAGE_LINES 5
+#define TEXT_SETTING_PAGE_MAXLENGTH20 20
+
+// for Alpha Password Setting Page
+#define ALPHA_PASSWORD_SETTING_PAGE_NUMBER 1
+#define ALPHA_PASSWORD_LENGTH_OF_STRING 8
+
+// for Time Setting Page
+#define TIME_SETTING_PAGE_NUMBER 1
+#define TIME_EDITOR_MIN_SECOND 0
+#define TIME_EDITOR_MIN_MINUTE 0
+#define TIME_EDITOR_MIN_HOUR 0
+#define TIME_EDITOR_MAX_SECOND 59
+#define TIME_EDITOR_MAX_MINUTE 59
+#define TIME_EDITOR_MAX_HOUR 23
+
+//For Ip address editor
+#define IPADDRESS_MIN_FIRST_FIELD_VALUE     0
+#define IPADDRESS_MIN_SECOND_FIELD_VALUE    0
+#define IPADDRESS_MIN_THIRD_FIELD_VALUE     0
+#define IPADDRESS_MIN_FOURTH_FIELD_VALUE    0
+#define IPADDRESS_MAX_FIRST_FIELD_VALUE     255
+#define IPADDRESS_MAX_SECOND_FIELD_VALUE    255
+#define IPADDRESS_MAX_THIRD_FIELD_VALUE     255
+#define IPADDRESS_MAX_FOURTH_FIELD_VALUE    255
+
+// for Slider Setting Page
+#define SLIDER_SETTING_PAGE_NUMBER 1
+#define SLIDER_SETTING_PAGE_MINVALUE 0
+#define SLIDER_SETTING_PAGE_MAXVALUE 100
+#define SLIDER_SETTING_PAGE_STEP 1
+
+// for Time Offset Setting Page
+#define TIME_OFFSET_SETTING_PAGE_NUMBER 1
+
+RESOURCE RSS_SIGNATURE { }
+
+RESOURCE TBUF r_default_document_name { buf=""; }
+
+RESOURCE EIK_APP_INFO
+    {
+    menubar=r_bcappaknstngitm_menubar;
+    hotkeys=r_bcappaknstngitm_hotkeys;
+    cba=R_AVKON_SOFTKEYS_OPTIONS_EXIT;     
+    }
+
+//----------------------------------------------------
+//   
+//    r_bcappaknstngitm_hotkeys
+//
+//----------------------------------------------------
+//
+RESOURCE HOTKEYS r_bcappaknstngitm_hotkeys
+    {
+    control=
+        {
+        HOTKEY { command=EAknCmdExit; key='e'; }
+        };
+    }
+
+
+//----------------------------------------------------
+//   
+//    r_bcappaknstngitm_menubar
+//
+//----------------------------------------------------
+//
+RESOURCE MENU_BAR r_bcappaknstngitm_menubar
+    {
+    titles =
+        {
+        MENU_TITLE {menu_pane = r_bcappaknstngitm_menu;}
+        };
+    }
+
+//----------------------------------------------------
+//   
+//    r_bcappaknstngitm_menu
+//
+//----------------------------------------------------
+//
+RESOURCE MENU_PANE r_bcappaknstngitm_menu
+    {
+    items=
+        {
+        MENU_ITEM { command=EAknSoftkeyExit; txt="Exit"; }
+        };
+    }
+
+
+
+
+
+
+
+//----------------------------------------------------
+//   
+//    r_my_setting_resource
+//
+//----------------------------------------------------
+//
+RESOURCE AVKON_SETTING_ITEM_LIST r_my_setting_resource
+  {
+  flags = 0;
+  title = "";
+  initial_number = 1;
+  } 
+
+//----------------------------------------------------
+//   
+//    r_my_text_setting_page
+//
+//----------------------------------------------------
+//
+RESOURCE AVKON_SETTING_PAGE r_my_text_setting_page
+  {
+  number = TEXT_SETTING_PAGE_NUMBER;
+  label = "My Text Label";
+  type = EEikCtEdwin;
+  editor_resource_id = r_my_text;
+  }
+
+RESOURCE EDWIN r_my_text
+  {
+  width = TEXT_SETTING_PAGE_WIDTH;
+  lines = TEXT_SETTING_PAGE_LINES;
+  maxlength = TEXT_SETTING_PAGE_MAXLENGTH20;
+  }
+
+//----------------------------------------------------
+//   
+//    r_my_password_setting_page
+//
+//----------------------------------------------------
+//
+RESOURCE AVKON_SETTING_PAGE r_my_password_setting_page
+    {
+    number = ALPHA_PASSWORD_SETTING_PAGE_NUMBER;
+    label = "My Password Label";
+    type = EEikCtSecretEd;
+    editor_resource_id = r_my_password;
+    }
+
+RESOURCE SECRETED r_my_password
+    {
+    num_letters = ALPHA_PASSWORD_LENGTH_OF_STRING;
+    }
+
+//----------------------------------------------------
+//   
+//    r_my_time_setting_page
+//
+//----------------------------------------------------
+//
+RESOURCE AVKON_SETTING_PAGE r_my_time_setting_page
+    {
+    number = TIME_SETTING_PAGE_NUMBER;
+    label = "My Time Label";
+    type = EEikCtTimeEditor;
+    editor_resource_id = r_my_time;
+    }
+
+RESOURCE TIME_EDITOR r_my_time
+    {
+    minTime = TIME
+        {
+        second = TIME_EDITOR_MIN_SECOND;
+        minute = TIME_EDITOR_MIN_MINUTE;
+        hour = TIME_EDITOR_MIN_HOUR;
+        };
+    maxTime = TIME
+        {
+        second = TIME_EDITOR_MAX_SECOND;
+        minute = TIME_EDITOR_MAX_MINUTE;
+        hour = TIME_EDITOR_MAX_HOUR;
+        };
+    flags=EEikTimeWithoutSecondsField;
+    }
+
+//----------------------------------------------------
+//   
+//    r_my_ip_setting_page
+//
+//----------------------------------------------------
+//
+RESOURCE AVKON_SETTING_PAGE r_my_ip_setting_page
+    {   
+    label = "My Ip Label";
+    type = EAknCtIpFieldEditor;
+    editor_resource_id = r_my_ip;
+    }
+
+
+RESOURCE IP_FIELD_EDITOR r_my_ip
+    {
+    min_field_values = IP_FIELD
+        { 
+        first_field = IPADDRESS_MIN_FIRST_FIELD_VALUE;
+        second_field = IPADDRESS_MIN_SECOND_FIELD_VALUE;
+        third_field = IPADDRESS_MIN_THIRD_FIELD_VALUE;
+        fourth_field = IPADDRESS_MIN_FOURTH_FIELD_VALUE;
+        };
+    max_field_values = IP_FIELD
+        {
+        first_field = IPADDRESS_MAX_FIRST_FIELD_VALUE;
+        second_field = IPADDRESS_MAX_SECOND_FIELD_VALUE;
+        third_field = IPADDRESS_MAX_THIRD_FIELD_VALUE;
+        fourth_field = IPADDRESS_MAX_FOURTH_FIELD_VALUE;
+        };
+    flags = 0;
+    }
+
+//----------------------------------------------------------------------------
+//
+//    r_my_enum_text_setting_item_list
+//
+//----------------------------------------------------------------------------
+//
+RESOURCE AVKON_SETTING_ITEM_LIST r_my_enum_text_setting_item_list
+    {
+    flags= EAknSettingItemNumberedStyle;
+    title = "My Enum Text Setting Item List";
+    initial_number = 1;
+    items =
+        {
+        AVKON_SETTING_ITEM
+            {
+            identifier = 1;
+            setting_page_resource = r_my_enum_text_setting_page;
+            associated_resource = r_my_enum_text_popup_setting_texts;
+            name = "My Enum Text Title";
+            }
+        };
+    }
+
+RESOURCE AVKON_POPUP_SETTING_TEXTS r_my_enum_text_popup_setting_texts
+    {
+    flags = 0;
+    setting_texts_resource = r_my_on_off_texts;
+    popped_up_texts_resource = r_my_poped_up_on_off_texts;
+    }
+
+RESOURCE ARRAY r_my_on_off_texts
+    {
+    items =
+        {
+        AVKON_ENUMERATED_TEXT 
+            {
+            value = 0; 
+            text = "On"; 
+            },
+        AVKON_ENUMERATED_TEXT 
+            { 
+            value = 1; 
+            text = "Off"; 
+            }
+        };
+    }
+
+RESOURCE ARRAY r_my_poped_up_on_off_texts
+    {
+    items =
+        {
+        LBUF 
+            { 
+            txt = "On"; 
+            },
+        LBUF 
+            { 
+            txt = "Off"; 
+            }
+        };
+    }
+
+RESOURCE AVKON_SETTING_PAGE r_my_enum_text_setting_page
+    {   
+    number= 0;
+    label= "My Enum Text Title";
+    type = EAknCtPopupSettingList;    
+    editor_resource_id = r_my_enum_popup;
+    }
+
+RESOURCE POPUP_SETTING_LIST r_my_enum_popup
+	{
+	flags = 0;
+	width = 0; // in characters.
+	other="Other...";
+	empty_text="No options";
+	new_item_setting_page_resource = 0;
+	type = EAknCtPopupSettingList;				
+	new_item_setting_editor_resource = 0;
+	}
+
+//----------------------------------------------------
+//   
+//    r_my_slider_setting_page
+//
+//----------------------------------------------------
+//
+RESOURCE AVKON_SETTING_PAGE r_my_slider_setting_page
+  {
+  number = SLIDER_SETTING_PAGE_NUMBER;
+  label = "My Slider Label";
+  type = EAknCtSlider;
+  editor_resource_id = r_my_slider;
+  }
+
+RESOURCE SLIDER r_my_slider
+  {
+  layout = EAknSettingsItemSliderLayout;
+  minvalue = SLIDER_SETTING_PAGE_MINVALUE;
+  maxvalue = SLIDER_SETTING_PAGE_MAXVALUE;
+  step = SLIDER_SETTING_PAGE_STEP;
+  valuetype = EAknSliderValuePercentage;
+  minlabel = "My Slider Min Label";
+  maxlabel = "My Slider Max Label";
+  }
+
+//----------------------------------------------------
+//   
+//    r_my_volume_setting_page
+//
+//----------------------------------------------------
+//
+RESOURCE AVKON_SETTING_PAGE r_my_volume_setting_page
+  {
+  type = EAknCtVolumeControl;
+  editor_resource_id = r_my_volume;
+  }
+
+RESOURCE VOLUME r_my_volume
+  {
+  flags = ESettingsVolumeControl;
+  value = 1;
+  }
+
+//-----------------------------------------------------------------------------
+//
+//    r_my_empty_item_list
+//
+//-----------------------------------------------------------------------------
+//
+RESOURCE AVKON_SETTING_ITEM_LIST r_my_empty_item_list
+    {
+    flags= EAknSettingItemNumberedStyle;
+    title = "My Empty Item List Title";
+    initial_number = 1;
+    items =     
+        {
+        AVKON_SETTING_ITEM
+            {
+            identifier = 1;
+            name = "My Empty Item Name";
+            setting_page_resource = r_my_volume_setting_page;            
+            type = EAknCtVolumeControl;
+            setting_editor_resource = r_my_volume;
+            associated_resource = 0;            
+            empty_item_text =  "";
+            compulsory_ind_string = "";
+            }
+        };
+    }
+
+//----------------------------------------------------
+//   
+//    r_my_time_offset_setting_page
+//
+//----------------------------------------------------
+//
+RESOURCE AVKON_SETTING_PAGE r_my_time_offset_setting_page
+    {
+    number = TIME_OFFSET_SETTING_PAGE_NUMBER;
+    label = "My Time Label";
+    type = EEikCtTimeOffsetEditor;
+    editor_resource_id = r_my_time_offset;
+    }
+
+RESOURCE TIME_OFFSET_EDITOR r_my_time_offset
+    {
+    minTimeOffset = TIME_OFFSET
+        {
+        seconds = 0;
+        };
+    maxTimeOffset = TIME_OFFSET 
+        {
+        seconds = 0;
+        };
+    flags=EEikTimeWithoutSecondsField;
+    }
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/loc_pub/landmarks_ui_addedit_api/tsrc/bc/bcapplmkeditor/data/bcapplmkeditor_loc.rss	Wed Sep 01 12:31:27 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:    LandmarksUi Content File -   
+*
+*/
+
+
+
+
+
+
+#include <appinfo.rh>
+
+RESOURCE LOCALISABLE_APP_INFO
+	{
+	short_caption="Landmarks";
+	group_name="BCApps";
+	caption_and_icon=
+		{
+		CAPTION_AND_ICON_INFO
+			{
+			caption="BcAppLandmark";
+			number_of_icons=2;
+			icon_file="\\resource\\apps\\BcAppLandmark.mbm";
+			}
+		};
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/loc_pub/landmarks_ui_addedit_api/tsrc/bc/bcapplmkeditor/data/bcapplmkeditor_reg.rss	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,34 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:    LandmarksUi Content File -   
+*
+*/
+
+
+
+
+
+//Registration resource file BcAppLmkEditor
+
+#include <appinfo.rh>
+UID2 KUidAppRegistrationResourceFile
+UID3 0x101F4FF6
+RESOURCE APP_REGISTRATION_INFO
+	{
+	app_file="BcAppLmkEditor";
+	localisable_resource_file="\\resource\\apps\\bcapplmkeditor_loc";
+	hidden=KAppNotHidden;
+	embeddability=KAppNotEmbeddable;
+	newfile=KAppDoesNotSupportNewFile;
+	}
Binary file loc_pub/landmarks_ui_addedit_api/tsrc/bc/bcapplmkeditor/data/context_pane_icon.bmp has changed
Binary file loc_pub/landmarks_ui_addedit_api/tsrc/bc/bcapplmkeditor/data/context_pane_icon_mask.bmp has changed
Binary file loc_pub/landmarks_ui_addedit_api/tsrc/bc/bcapplmkeditor/data/list_icon.bmp has changed
Binary file loc_pub/landmarks_ui_addedit_api/tsrc/bc/bcapplmkeditor/data/list_icon_mask.bmp has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/loc_pub/landmarks_ui_addedit_api/tsrc/bc/bcapplmkeditor/eabi/bcapplmkaddeditu.def	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,5 @@
+EXPORTS
+	_Z9LibEntryLR13CTestModuleIf @ 1 NONAME
+	_ZTI17CLmkAddEditEngine @ 2 NONAME ; #<TI>#
+	_ZTV17CLmkAddEditEngine @ 3 NONAME ; #<VT>#
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/loc_pub/landmarks_ui_addedit_api/tsrc/bc/bcapplmkeditor/group/bcapplmkaddedit.mmp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,113 @@
+/*
+* Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:    LandmarksUi Content File -  
+*
+*/
+
+
+
+
+/*TYPE TESTCLASS*/
+
+
+#if defined(__S60_)
+        // To get the APP_LAYER_SYSTEMINCLUDE-definition
+        #include <platform_paths.hrh>
+#endif
+
+TARGET          bcapplmkaddedit.dll
+TARGETTYPE      dll
+UID             0x1000008D 0x101FB3E3
+
+CAPABILITY      ALL -TCB
+
+//TARGETPATH      ?target_path
+DEFFILE         bcapplmkaddedit.def
+
+#ifdef SBSv2
+	USERINCLUDE     ../inc 
+
+	#if defined(__S60_)
+	    APP_LAYER_SYSTEMINCLUDE
+	#else // __S60_ not defined
+	    SYSTEMINCLUDE   /epoc32/include 
+	    SYSTEMINCLUDE   /epoc32/include/internal
+	#endif // __S60_
+
+	SOURCEPATH      ../src
+#else // SBSv2 not defined
+	USERINCLUDE     ../inc 
+
+	#if defined(__S60_)
+	    APP_LAYER_SYSTEMINCLUDE
+	#else // __S60_ not defined
+	    SYSTEMINCLUDE   /epoc32/include 
+	    SYSTEMINCLUDE   /epoc32/include/internal
+	#endif // __S60_
+
+SYSTEMINCLUDE   /epoc32/include		
+SYSTEMINCLUDE	/epoc32/include/middleware 	
+SYSTEMINCLUDE	/epoc32/include/domain/middleware 	
+SYSTEMINCLUDE	/epoc32/include/osextensions 	
+SYSTEMINCLUDE	/epoc32/include/domain/osextensions 	
+SYSTEMINCLUDE	/epoc32/include/applications
+SYSTEMINCLUDE   /epoc32/include/internal
+
+	SOURCEPATH      ../src
+#endif // SBSv2
+
+SOURCE          bcapplmkaddedit.cpp
+SOURCE          bcapplmkaddeditblocks.cpp
+SOURCE			bcapplmkeditorengine.cpp
+
+
+
+START BITMAP bcapplmkeditor.mbm
+SOURCEPATH ../data
+TARGETPATH /resource/apps
+SOURCE	c12 context_pane_icon.bmp context_pane_icon_mask.bmp \
+			list_icon.bmp list_icon_mask.bmp 
+END
+
+
+
+LIBRARY         euser.lib
+LIBRARY         stiftestinterface.lib
+LIBRARY         stiftestengine.lib
+LIBRARY  apgrfx.lib 
+LIBRARY  avkon.lib
+LIBRARY  euser.lib
+LIBRARY  apparc.lib
+LIBRARY  cone.lib
+LIBRARY  eikcore.lib 
+LIBRARY  eikcoctl.lib
+LIBRARY  eikctl.lib
+LIBRARY  etext.lib 
+LIBRARY  egul.lib
+LIBRARY  ws32.lib
+LIBRARY  bafl.lib
+LIBRARY  insock.lib
+LIBRARY  fbscli.lib
+LIBRARY  gdi.lib
+LIBRARY	 LmkCommonUi.lib
+LIBRARY  eposlandmarks.lib
+LIBRARY	 lbs.lib
+LIBRARY	 satinfo.lib
+LIBRARY					LmkCommonUi.lib
+
+
+LANG            SC
+
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/loc_pub/landmarks_ui_addedit_api/tsrc/bc/bcapplmkeditor/group/bld.inf	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,73 @@
+/*
+* 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:    LandmarkUi Content File
+*
+*/
+
+
+
+
+
+
+
+
+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
+*/
+
+lmae_c.bat /epoc32/winscw/c/lmae_c.bat
+lmae_z.bat /epoc32/winscw/c/lmae_z.bat
+testframework.ini		/epoc32/winscw/c/testframework/testframework_locaddedit.ini
+ui_lmkaddedit.cfg		/epoc32/winscw/c/testframework/ui_lmkaddedit.cfg
+tclmkaddedit.cfg		/epoc32/winscw/c/testframework/tclmkaddedit.cfg
+
+
+
+
+PRJ_TESTMMPFILES
+// NOTE: If using ARS requirements .mmp file operation should be done under this.
+// 'abld test build'
+
+PRJ_MMPFILES
+// Specify the .mmp files required for building the important component
+// releasables.
+//
+// Specify "tidy" if the component you need to build doesn't need to be
+// released. Specify "ignore" if the MMP file exists but should be
+// ignored.
+// Example:
+/*
+/agnmodel/group/agnmodel.mmp
+#if defined(MARM)
+/agnmodel/group/agsvexe.mmp
+#endif
+*/
+BCAppLmkAddEdit.mmp
+
+//  End of File
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/loc_pub/landmarks_ui_addedit_api/tsrc/bc/bcapplmkeditor/group/lmae_c.bat	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,23 @@
+rem
+rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+rem All rights reserved.
+rem This component and the accompanying materials are made available
+rem under the terms of "Eclipse Public License v1.0"
+rem which accompanies this distribution, and is available
+rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
+rem
+rem Initial Contributors:
+rem Nokia Corporation - initial contribution.
+rem
+rem Contributors:
+rem
+rem Description:   LandmarksUi BC-Driver Content File -    
+rem
+
+copy C:\TestFramework\TestFramework_locaddedit.ini C:\TestFramework\TestFramework.ini
+md e:\BCTest
+md e:\BCTest\Results
+
+ATSINTERFACE.EXE -testmodule testcombiner -config C:\TestFramework\tcLmkAddEdit.cfg
+copy c:\Logs\TestFramework\TestReport.txt e:\BCTest\results\Location_LmkAddEdit.txt
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/loc_pub/landmarks_ui_addedit_api/tsrc/bc/bcapplmkeditor/group/lmae_z.bat	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,23 @@
+rem
+rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+rem All rights reserved.
+rem This component and the accompanying materials are made available
+rem under the terms of "Eclipse Public License v1.0"
+rem which accompanies this distribution, and is available
+rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
+rem
+rem Initial Contributors:
+rem Nokia Corporation - initial contribution.
+rem
+rem Contributors:
+rem
+rem Description:   LandmarksUi BC-Driver Content File -    
+rem
+
+copy z:\TestFramework\TestFramework_locaddedit.ini C:\TestFramework\TestFramework.ini
+md e:\BCTest
+md e:\BCTest\Results
+
+ATSINTERFACE.EXE -testmodule testcombiner -config C:\TestFramework\tcLmkAddEdit.cfg
+copy c:\Logs\TestFramework\TestReport.txt e:\BCTest\results\Location_LmkAddEdit.txt
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/loc_pub/landmarks_ui_addedit_api/tsrc/bc/bcapplmkeditor/group/tclmkaddedit.cfg	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,31 @@
+[Test]
+title TestNewL
+run testscripter c:\testframework\UI_LmkAddEdit.cfg 1
+[Endtest]
+
+[Test]
+title TestNew2L
+run testscripter c:\testframework\UI_LmkAddEdit.cfg 2
+[Endtest]
+
+[Test]
+title TestExecuteLD
+run testscripter c:\testframework\UI_LmkAddEdit.cfg 3
+run testscripter c:\testframework\UI_LmkAddEdit.cfg 7
+[Endtest]
+
+[Test]
+title TestSetMopParent
+run testscripter c:\testframework\UI_LmkAddEdit.cfg 4
+[Endtest]
+
+[Test]
+title TestSetHelpContext
+run testscripter c:\testframework\UI_LmkAddEdit.cfg 5
+[Endtest]
+
+[Test]
+title TestDisableMapAndNaviOptions
+run testscripter c:\testframework\UI_LmkAddEdit.cfg 6
+[Endtest]
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/loc_pub/landmarks_ui_addedit_api/tsrc/bc/bcapplmkeditor/group/testframework.ini	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,200 @@
+#
+# This is STIF initialization file
+# Comment lines start with '#'-character.
+# See STIF TestFramework users guide.doc for instructions
+
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+# Set following test engine settings:
+#	- Set Test Reporting mode. TestReportMode's possible values are:
+#		+ 'Summary': Summary of the tested test cases.
+#		+ 'Environment': Hardware and software info.
+#		+ 'TestCases': Test case report.
+#		+ 'FullReport': Set of all above ones.
+#		+ Example 'TestReportMode= Summary TestCases'
+#
+# 	- CreateTestReport setting controls report creation mode
+#		+ YES, Test report will created.
+#		+ NO, No Test report.
+#
+# 	- File path indicates the base path of the test report.
+# 	- File name indicates the name of the test report.
+#
+# 	- File format indicates the type of the test report.
+#		+ TXT, Test report file will be txt type, for example 'TestReport.txt'.
+#		+ HTML, Test report will be html type, for example 'TestReport.html'.
+#   + XML, Test report will be xml type, for example 'TestReport.xml'.
+#          Note, that xml format is available only when output is set to FILE.
+#
+# 	- File output indicates output source of the test report.
+#		+ FILE, Test report logging to file.
+#		+ RDEBUG, Test report logging to using rdebug.
+#
+# 	- File Creation Mode indicates test report overwriting if file exist.
+#		+ OVERWRITE, Overwrites if the Test report file exist.
+#		+ APPEND, Continue logging after the old Test report information if
+#                 report exist.
+# 	- Sets a device reset module's dll name(Reboot).
+#		+ If Nokia specific reset module is not available or it is not correct one
+#		  StifHWResetStub module may use as a template for user specific reset
+#		  module.
+# 	- Sets STIF test measurement disable options. e.g. pluging1 and pluging2 disablation
+#		DisableMeasurement= stifmeasurementplugin01 stifmeasurementplugin02
+#
+
+[Engine_Defaults]
+
+TestReportMode= FullReport    # Possible values are: 'Empty', 'Summary', 'Environment',
+                                                     'TestCases' or 'FullReport'
+
+CreateTestReport= YES         # Possible values: YES or NO
+
+TestReportFilePath= C:\LOGS\TestFramework\
+TestReportFileName= TestReport
+
+TestReportFormat= TXT         # Possible values: TXT, HTML or XML
+TestReportOutput= FILE        # Possible values: FILE or RDEBUG
+TestReportFileCreationMode= OVERWRITE # Possible values: OVERWRITE or APPEND
+
+DeviceResetDllName= StifResetForNokia.dll # e.g. 'StifHWResetStub.dll' for user specific reseting
+
+DisableMeasurement= stifmeasurementdisablenone  # Possible values are:
+              # 'stifmeasurementdisablenone', 'stifmeasurementdisableall'
+              # 'stifmeasurementplugin01', 'stifmeasurementplugin02',
+              # 'stifmeasurementplugin03', 'stifmeasurementplugin04',
+              # 'stifmeasurementplugin05' or 'stifbappeaprofiler'
+
+Timeout= 0                    # Default timeout value for each test case. In milliseconds
+UITestingSupport= YES        # Possible values: YES or NO
+SeparateProcesses= YES       # Possible values: YES or NO (default: NO)
+[End_Defaults]
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+
+
+
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+# Module configurations start
+# Modules are added between module tags
+# tags. Module name is specified after ModuleName= tag, like
+# ModuleName= XXXXXXXXX
+# Modules might have initialisation file, specified as
+# IniFile= c:\testframework\YYYYYY
+# Modules might have several configuration files, like
+# TestCaseFile= c:\testframework\NormalCases.txt
+# TestCaseFile= c:\testframework\SmokeCases.txt
+# TestCaseFile= c:\testframework\ManualCases.txt
+
+# (TestCaseFile is synonym for old term ConfigFile)
+
+# Following case specifies demo module settings. Demo module
+# does not read any settings from file, so tags 
+# IniFile and TestCaseFile are not used.
+# In the simplest case it is enough to specify only the
+# name of the test module when adding new test module
+
+[New_Module]
+ModuleName= testcombiner
+TestCaseFile= c:\testframework\tcLmkAddEdit.cfg
+[End_Module]
+
+
+# Load testmoduleXXX, optionally with initialization file and/or test case files
+#[New_Module]
+#ModuleName= testmodulexxx
+
+#TestModuleXXX used initialization file
+#IniFile= c:\testframework\init.txt
+
+#TestModuleXXX used configuration file(s)
+#TestCaseFile= c:\testframework\testcases1.cfg
+#TestCaseFile= c:\testframework\testcases2.cfg
+#TestCaseFile= c:\testframework\manualtestcases.cfg
+
+#[End_Module]
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+
+
+
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+# Set STIF logging overwrite parameters for Logger.
+# 	Hardware and emulator environment logging path and styles can
+# 	be configured from here to overwrite the Logger's implemented values.
+#	
+#	Settings description:
+#	- Indicates option for creation log directory/directories. If log directory/directories
+#         is/are not created by user they will make by software.
+#		+ YES, Create log directory/directories if not allready exist.
+#		+ NO, Log directory/directories not created. Only created one is used.
+#
+#	- Overwrite emulator path setting.
+#		+ Example: If 'EmulatorBasePath= C:\LOGS\TestFramework\' and in code is defined 
+#		           Logger's path 'D:\\LOGS\\Module\\' with those definition the path
+#		           will be 'C:\LOGS\TestFramework\LOGS\Module\'
+#
+#	- Overwrite emulator's logging format.
+#		+ TXT, Log file(s) will be txt type(s), for example 'Module.txt'.
+#		+ HTML, Log file(s) will be html type(s), for example 'Module.html'.
+#
+#	- Overwrited emulator logging output source.
+#		+ FILE, Logging to file(s).
+#		+ RDEBUG, Logging to using rdebug(s).
+#
+#	- Overwrite hardware path setting (Same description as above in emulator path).
+#	- Overwrite hardware's logging format(Same description as above in emulator format).
+#	- Overwrite hardware's logging output source(Same description as above in emulator output).
+#
+#	- File Creation Mode indicates file overwriting if file exist.
+#		+ OVERWRITE, Overwrites if file(s) exist.
+#		+ APPEND, Continue logging after the old logging information if file(s) exist.
+#
+#	- Will thread id include to the log filename.
+#		+ YES, Thread id to log file(s) name, Example filename 'Module_b9.txt'.
+#		+ NO, No thread id to log file(s), Example filename 'Module.txt'.
+#
+#	- Will time stamps include the to log file.
+#		+ YES, Time stamp added to each line in log file(s). Time stamp is 
+#                 for example'12.Nov.2003 115958    LOGGING INFO'
+#		+ NO, No time stamp(s).
+#
+#	- Will line breaks include to the log file.
+#		+ YES, Each logging event includes line break and next log event is in own line.
+#		+ NO, No line break(s).
+#
+#	- Will event ranking include to the log file.
+#		+ YES, Event ranking number added to each line in log file(s). Ranking number
+#                 depends on environment's tics, for example(includes time stamp also)
+#                 '012   12.Nov.2003 115958    LOGGING INFO'
+#		+ NO, No event ranking.
+#
+#	- Will write log file in unicode format.
+#		+ YES, Log file will be written in unicode format
+#		+ NO, Log will be written as normal, not unicode, file.
+#
+
+[Logger_Defaults]
+
+#NOTE: If you want to set Logger using next setting(s) remove comment(s)'#'
+#NOTE: TestEngine and TestServer logging settings cannot change here
+
+#CreateLogDirectories= YES    # Possible values: YES or NO
+
+#EmulatorBasePath= C:\LOGS\TestFramework\
+#EmulatorFormat= HTML         # Possible values: TXT or HTML
+#EmulatorOutput= FILE         # Possible values: FILE or RDEBUG
+
+#HardwareBasePath= D:\LOGS\TestFramework\
+#HardwareFormat= HTML         # Possible values: TXT or HTML
+#HardwareOutput= FILE         # Possible values: FILE or RDEBUG
+
+#FileCreationMode= OVERWRITE  # Possible values: OVERWRITE or APPEND
+
+#ThreadIdToLogFile= YES       # Possible values: YES or NO
+#WithTimeStamp= YES           # Possible values: YES or NO
+#WithLineBreak= YES           # Possible values: YES or NO
+#WithEventRanking= YES        # Possible values: YES or NO
+
+#FileUnicode= YES             # Possible values: YES or NO
+#AddTestCaseTitle= YES        # Possible values: YES or NO
+[End_Logger_Defaults]
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+
+# End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/loc_pub/landmarks_ui_addedit_api/tsrc/bc/bcapplmkeditor/group/ui_lmkaddedit.cfg	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,49 @@
+[Test]
+title TestNewL
+create BCAppLmkAddEdit foobar
+foobar TestNewL pa ra me ters
+delete foobar
+[Endtest] 
+
+[Test]
+title TestNew2L
+create BCAppLmkAddEdit foobar
+foobar TestNew2L pa ra me ters
+delete foobar
+[Endtest] 
+
+[Test]
+title TestExecuteLD
+create BCAppLmkAddEdit foobar
+bringtoforeground
+foobar TestExecuteLD pa ra me ters
+delete foobar
+[Endtest] 
+
+[Test]
+title TestSetMopParent
+create BCAppLmkAddEdit foobar
+foobar TestSetMopParent pa ra me ters
+delete foobar
+[Endtest] 
+
+[Test]
+title TestSetHelpContext
+create BCAppLmkAddEdit foobar
+foobar TestSetHelpContext pa ra me ters
+delete foobar
+[Endtest] 
+
+[Test]
+title TestDisableMapAndNaviOptions
+create BCAppLmkAddEdit foobar
+bringtoforeground
+foobar TestDisableMapAndNaviOptions pa ra me ters
+delete foobar
+[Endtest] 
+
+[Test]
+title PressKey
+pause 3000
+presskey global EKeyDevice1
+[Endtest]
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/loc_pub/landmarks_ui_addedit_api/tsrc/bc/bcapplmkeditor/inc/bcapplmkaddedit.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,200 @@
+/*
+* 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:    LandmarkUi Content File
+*
+*/
+
+
+
+
+
+
+
+
+#ifndef BCAPPLMKADDEDIT_H
+#define BCAPPLMKADDEDIT_H
+
+//  INCLUDES
+#include <StifLogger.h>
+#include <TestScripterInternal.h>
+#include <StifTestModule.h>
+
+#include "BCAppLmkEditorEngine.h"
+
+
+// CONSTANTS
+//const ?type ?constant_var = ?constant;
+
+// MACROS
+//#define ?macro ?macro_def
+#define TEST_CLASS_VERSION_MAJOR 30
+#define TEST_CLASS_VERSION_MINOR 9
+#define TEST_CLASS_VERSION_BUILD 6
+
+// Logging path
+_LIT( KBCAppLmkAddEditLogPath, "\\logs\\testframework\\BCAppLmkAddEdit\\" );
+// Log file
+_LIT( KBCAppLmkAddEditLogFile, "BCAppLmkAddEdit.txt" );
+_LIT( KBCAppLmkAddEditLogFileWithTitle, "BCAppLmkAddEdit_[%S].txt" );
+
+// FUNCTION PROTOTYPES
+//?type ?function_name(?arg_list);
+
+// FORWARD DECLARATIONS
+//class ?FORWARD_CLASSNAME;
+class CBCAppLmkAddEdit;
+
+// DATA TYPES
+//enum ?declaration
+//typedef ?declaration
+//extern ?data_type;
+
+// CLASS DECLARATION
+
+/**
+*  CBCAppLmkAddEdit test class for STIF Test Framework TestScripter.
+*  ?other_description_lines
+*
+*  @lib ?library
+*  @since ?Series60_version
+*/
+NONSHARABLE_CLASS(CBCAppLmkAddEdit) : public CScriptBase
+    {
+    public:  // Constructors and destructor
+
+        /**
+        * Two-phased constructor.
+        */
+        static CBCAppLmkAddEdit* NewL( CTestModuleIf& aTestModuleIf );
+
+        /**
+        * Destructor.
+        */
+        virtual ~CBCAppLmkAddEdit();
+
+    public: // New functions
+
+        /**
+        * ?member_description.
+        * @since ?Series60_version
+        * @param ?arg1 ?description
+        * @return ?description
+        */
+        //?type ?member_function( ?type ?arg1 );
+
+    public: // Functions from base classes
+
+        /**
+        * From CScriptBase Runs a script line.
+        * @since ?Series60_version
+        * @param aItem Script line containing method name and parameters
+        * @return Symbian OS error code
+        */
+        virtual TInt RunMethodL( CStifItemParser& aItem );
+
+    protected:  // New functions
+
+        /**
+        * ?member_description.
+        * @since ?Series60_version
+        * @param ?arg1 ?description
+        * @return ?description
+        */
+        //?type ?member_function( ?type ?arg1 );
+
+    protected:  // Functions from base classes
+
+        /**
+        * From ?base_class ?member_description
+        */
+        //?type ?member_function();
+
+    private:
+
+        /**
+        * C++ default constructor.
+        */
+        CBCAppLmkAddEdit( 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 );
+        virtual TInt TestNewL( CStifItemParser& aItem );
+        virtual TInt TestNew2L( CStifItemParser& aItem );
+        virtual TInt TestExecuteLD( CStifItemParser& aItem );
+        virtual TInt TestSetMopParent( CStifItemParser& aItem );
+        virtual TInt TestSetHelpContext( CStifItemParser& aItem );
+        virtual TInt TestDisableMapAndNaviOptions( CStifItemParser& aItem );
+
+        //virtual TInt TestSetMoParent( 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
+    CLmkAddEditEngine* engine;
+        // ?one_line_short_description_of_data
+        //?data_declaration;
+
+        // Reserved pointer for future extension
+        //TAny* iReserved;
+
+    public:     // Friend classes
+        //?friend_class_declaration;
+    protected:  // Friend classes
+        //?friend_class_declaration;
+    private:    // Friend classes
+        //?friend_class_declaration;
+
+    };
+
+#endif      // BCAPPLMKADDEDIT_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/loc_pub/landmarks_ui_addedit_api/tsrc/bc/bcapplmkeditor/inc/bcapplmkeditorcontainer.h	Wed Sep 01 12:31:27 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:    LandmarksUi Content File -
+*
+*/
+
+
+
+
+
+
+/*
+Change History
+22-05-2007	To resolve tool IDO warnings	Komala Nagaraju
+*/
+
+#ifndef BCAPPLMKEDITORCONTAINER_H
+#define BCAPPLMKEDITORCONTAINER_H
+
+// INCLUDES
+#include <coecntrl.h>
+
+// FORWARD DECLARATIONS
+class CRichText;
+class CParaFormatLayer;
+class CCharFormatLayer;
+class CEikRichTextEditor;
+
+
+// CLASS DECLARATION
+
+/**
+*  CBCAppLmkEditorContainer  container control class.
+*
+*/
+class CBCAppLmkEditorContainer : public CCoeControl, MCoeControlObserver
+    {
+    public: // Constructors and destructor
+
+        /**
+        * default constructor.
+        * @param aRect Frame rectangle for container.
+        */
+        void ConstructL(const TRect& aRect);
+
+        /**
+        * Destructor.
+        */
+        ~CBCAppLmkEditorContainer();
+
+public: // New functions
+
+    /**
+    * Clear the output window.
+    */
+    void ClearOutputWindow();
+
+public: // Functions from base classes
+
+    // From MUINotify
+
+    /**
+    * Display text on output window
+    * @param aDes text to display
+    * @param aFontStyle style (italic/bold/etc) for this text
+    */
+    void PrintNotify(const TDesC& aDes, TUint aFontStyle = 0);
+    void PrintNotify(const TDesC8& aDes, TUint aFontStyle = 0);
+
+    /**
+    * Display integer as text on output window
+    * @param aInt integer to display
+    */
+    void PrintNotify(TInt aInt);
+
+private: // Functions from base classes
+
+    /**
+    * From CoeControl. Calls SizeChangedL with TRAP.
+    */
+    void SizeChanged();
+
+    /**
+    * Handle change of control size
+    */
+    void SizeChangedL();
+
+    /**
+    * From CoeControl.
+    */
+    TInt CountComponentControls() const;
+
+    /**
+    * From CCoeControl.
+    */
+    CCoeControl* ComponentControl(TInt aIndex) const;
+
+    /**
+    * Event handling section, e.g Listbox events.
+    */
+    void HandleControlEventL(CCoeControl* aControl,TCoeEvent aEventType);
+
+    /**
+    * From CCoeControl,Draw.
+    */
+    void Draw(const TRect& aRect) const;
+
+    /**
+    * Key event handler. Handles up and down arrow keys, so that
+    * output window can be scrolled.
+    */
+    TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType);
+
+    /**
+    * Change font style for subsequent text
+    * @param aFontStyle new font style
+    */
+    void SetFontStyle(TUint aFontStyle);
+
+    /**
+    * Set or clear an individual font attribute if necessary,
+    * so that it matches the required style
+    * @param aFontStyle required font style
+    * @param aAttribute the individual attribute to correct
+    */
+    void UpdateFontAttribute(TUint aFontStyle, TInt aAttribute);
+
+
+private: //data
+    CParaFormatLayer*   iParaFormat;   // Used by CEikRichTextEditor
+    CCharFormatLayer*   iCharFormat;   // Used by CEikRichTextEditor
+    CRichText*          iRichText;     // Used by CEikRichTextEditor
+    CEikRichTextEditor* iOutputWindow; // CRichText object for use as our output window
+    TUint               iFontStyle;    // Current style in use by output window
+    };
+
+
+#endif
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/loc_pub/landmarks_ui_addedit_api/tsrc/bc/bcapplmkeditor/inc/bcapplmkeditorengine.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,41 @@
+/*
+* 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:    LandmarkUi Content File
+*
+*/
+
+
+
+
+
+
+
+
+#ifndef BCAPPLMKEDITORENGINE_H
+#define BCAPPLMKEDITORENGINE_H
+
+#include <coemop.h>
+#include <e32base.h>
+class CLmkAddEditEngine : public CBase, public MObjectProvider
+{
+		public:
+
+		protected:
+			TTypeUid::Ptr MopSupplyObject(TTypeUid aId);
+    	MObjectProvider* MopNext();
+};
+
+#endif      // BCAPPLMKEDITORENGINE_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/loc_pub/landmarks_ui_addedit_api/tsrc/bc/bcapplmkeditor/sis/50_loc_addedit.pkg	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,36 @@
+;
+; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of "Eclipse Public License v1.0"
+; which accompanies this distribution, and is available
+; at the URL "http://www.eclipse.org/legal/epl-v10.html".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description:    LandmarkUi Content File   
+;
+&EN
+
+; Installation header
+; Only one component name as we only support English
+; UID is the main app's UID
+
+#{"loc_addedit"},(0x20015B16),1,0,0,TYPE=SA
+[0x101F7961],3,*,*,{"Series60ProductID"}
+
+; Non-localised vendor name
+:"Nokia Corporation"
+
+; Localised vendor names
+%{"Nokia Corporation"}
+
+; Files to install and to where
+"\epoc32\release\armv5\urel\bcapplmkaddedit.dll"-"c:\sys\bin\bcapplmkaddedit.dll"
+"\epoc32\winscw\c\testframework\testframework_locaddedit.ini"-"c:\testframework\testframework_locaddedit.ini"
+"\epoc32\winscw\c\testframework\tclmkaddedit.cfg"-"c:\testframework\tclmkaddedit.cfg"
+"\epoc32\winscw\c\testframework\ui_lmkaddedit.cfg"-"c:\festframework\ui_lmkaddedit.cfg"
+"\epoc32\winscw\c\lmae_c.bat"-"c:\lmae.bat"
\ No newline at end of file
Binary file loc_pub/landmarks_ui_addedit_api/tsrc/bc/bcapplmkeditor/sis/50_loc_addedit.sis has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/loc_pub/landmarks_ui_addedit_api/tsrc/bc/bcapplmkeditor/src/bcapplmkaddedit.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,206 @@
+/*
+* 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:    LandmarkUi Content File
+*
+*/
+
+
+
+
+
+
+
+
+// INCLUDE FILES
+#include <Stiftestinterface.h>
+#include "BCAppLmkAddEdit.h"
+#include <SettingServerClient.h>
+
+// EXTERNAL DATA STRUCTURES
+//extern  ?external_data;
+
+// EXTERNAL FUNCTION PROTOTYPES
+//extern ?external_function( ?arg_type,?arg_type );
+
+// CONSTANTS
+//const ?type ?constant_var = ?constant;
+
+// MACROS
+//#define ?macro ?macro_def
+
+// LOCAL CONSTANTS AND MACROS
+//const ?type ?constant_var = ?constant;
+//#define ?macro_name ?macro_def
+
+// MODULE DATA STRUCTURES
+//enum ?declaration
+//typedef ?declaration
+
+// LOCAL FUNCTION PROTOTYPES
+//?type ?function_name( ?arg_type, ?arg_type );
+
+// FORWARD DECLARATIONS
+//class ?FORWARD_CLASSNAME;
+
+// ============================= LOCAL FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// ?function_name ?description.
+// ?description
+// Returns: ?value_1: ?description
+//          ?value_n: ?description_line1
+//                    ?description_line2
+// -----------------------------------------------------------------------------
+//
+/*
+?type ?function_name(
+    ?arg_type arg,  // ?description
+    ?arg_type arg)  // ?description
+    {
+
+    ?code  // ?comment
+
+    // ?comment
+    ?code
+    }
+*/
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CBCAppLmkAddEdit::CBCAppLmkAddEdit
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+CBCAppLmkAddEdit::CBCAppLmkAddEdit(
+    CTestModuleIf& aTestModuleIf ):
+        CScriptBase( aTestModuleIf )
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CBCAppLmkAddEdit::ConstructL
+// Symbian 2nd phase constructor can leave.
+// -----------------------------------------------------------------------------
+//
+void CBCAppLmkAddEdit::ConstructL()
+    {
+    //Read logger settings to check whether test case name is to be
+    //appended to log file name.
+    RSettingServer settingServer;
+    TInt ret = settingServer.Connect();
+    if(ret != KErrNone)
+        {
+        User::Leave(ret);
+        }
+    // Struct to StifLogger settigs.
+    TLoggerSettings loggerSettings;
+    // Parse StifLogger defaults from STIF initialization file.
+    ret = settingServer.GetLoggerSettings(loggerSettings);
+    if(ret != KErrNone)
+        {
+        User::Leave(ret);
+        }
+    // Close Setting server session
+    settingServer.Close();
+
+    TFileName logFileName;
+
+    if(loggerSettings.iAddTestCaseTitle)
+        {
+        TName title;
+        TestModuleIf().GetTestCaseTitleL(title);
+        logFileName.Format(KBCAppLmkAddEditLogFileWithTitle, &title);
+        }
+    else
+        {
+        logFileName.Copy(KBCAppLmkAddEditLogFile);
+        }
+
+    iLog = CStifLogger::NewL( KBCAppLmkAddEditLogPath,
+                          logFileName,
+                          CStifLogger::ETxt,
+                          CStifLogger::EFile,
+                          EFalse );
+
+    SendTestClassVersion();
+    }
+
+// -----------------------------------------------------------------------------
+// CBCAppLmkAddEdit::NewL
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+CBCAppLmkAddEdit* CBCAppLmkAddEdit::NewL(
+    CTestModuleIf& aTestModuleIf )
+    {
+    CBCAppLmkAddEdit* self = new (ELeave) CBCAppLmkAddEdit( aTestModuleIf );
+
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop();
+
+    return self;
+
+    }
+
+// Destructor
+CBCAppLmkAddEdit::~CBCAppLmkAddEdit()
+    {
+
+    // Delete resources allocated from test methods
+    Delete();
+
+    // Delete logger
+    delete iLog;
+
+    }
+
+//-----------------------------------------------------------------------------
+// CBCAppLmkAddEdit::SendTestClassVersion
+// Method used to send version of test class
+//-----------------------------------------------------------------------------
+//
+void CBCAppLmkAddEdit::SendTestClassVersion()
+	{
+	TVersion moduleVersion;
+	moduleVersion.iMajor = TEST_CLASS_VERSION_MAJOR;
+	moduleVersion.iMinor = TEST_CLASS_VERSION_MINOR;
+	moduleVersion.iBuild = TEST_CLASS_VERSION_BUILD;
+
+	TFileName moduleName;
+	moduleName = _L("BCAppLmkAddEdit.dll");
+
+	TBool newVersionOfMethod = ETrue;
+	TestModuleIf().SendTestModuleVersion(moduleVersion, moduleName, newVersionOfMethod);
+	}
+
+// ========================== OTHER EXPORTED FUNCTIONS =========================
+
+// -----------------------------------------------------------------------------
+// LibEntryL is a polymorphic Dll entry point.
+// Returns: CScriptBase: New CScriptBase derived object
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CScriptBase* LibEntryL(
+    CTestModuleIf& aTestModuleIf ) // Backpointer to STIF Test Framework
+    {
+
+    return ( CScriptBase* ) CBCAppLmkAddEdit::NewL( aTestModuleIf );
+
+    }
+
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/loc_pub/landmarks_ui_addedit_api/tsrc/bc/bcapplmkeditor/src/bcapplmkaddeditblocks.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,381 @@
+/*
+* 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:    LandmarkUi Content File
+*
+*/
+
+
+
+
+
+
+
+
+// [INCLUDE FILES] - do not remove
+#include <e32svr.h>
+#include <StifParser.h>
+#include <Stiftestinterface.h>
+#include "BCAppLmkAddEdit.h"
+
+#include <CLmkEditorDlg.h>
+#include <Epos_CPosLandmarkDatabase.h>
+#include <Epos_Landmarks.h>
+#include <coecntrl.h>
+#include <lbsposition.h>
+#include "BCAppLmkEditorEngine.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 ===============================
+
+// -----------------------------------------------------------------------------
+// CBCAppLmkAddEdit::Delete
+// Delete here all resources allocated and opened from test methods.
+// Called from destructor.
+// -----------------------------------------------------------------------------
+//
+void CBCAppLmkAddEdit::Delete()
+    {
+
+    }
+
+// -----------------------------------------------------------------------------
+// CBCAppLmkAddEdit::RunMethodL
+// Run specified method. Contains also table of test mothods and their names.
+// -----------------------------------------------------------------------------
+//
+TInt CBCAppLmkAddEdit::RunMethodL(
+    CStifItemParser& aItem )
+    {
+
+    static TStifFunctionInfo const KFunctions[] =
+        {
+        // Copy this line for every implemented function.
+        // First string is the function name used in TestScripter script file.
+        // Second is the actual implementation member function.
+        ENTRY( "Example", CBCAppLmkAddEdit::ExampleL ),
+        ENTRY( "TestNewL", CBCAppLmkAddEdit::TestNewL ),
+        ENTRY( "TestNew2L", CBCAppLmkAddEdit::TestNew2L ),
+        ENTRY( "TestExecuteLD", CBCAppLmkAddEdit::TestExecuteLD ),
+         ENTRY( "TestSetMopParent", CBCAppLmkAddEdit::TestSetMopParent ),
+          ENTRY( "TestSetHelpContext", CBCAppLmkAddEdit::TestSetHelpContext ),
+          ENTRY( "TestDisableMapAndNaviOptions", CBCAppLmkAddEdit::TestDisableMapAndNaviOptions ),
+        //ADD NEW ENTRY HERE
+        // [test cases entries] - Do not remove
+
+        };
+
+    const TInt count = sizeof( KFunctions ) /
+                        sizeof( TStifFunctionInfo );
+
+    return RunInternalL( KFunctions, count, aItem );
+
+    }
+
+// -----------------------------------------------------------------------------
+// CBCAppLmkAddEdit::ExampleL
+// Example test method function.
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+TInt CBCAppLmkAddEdit::ExampleL( CStifItemParser& aItem )
+    {
+
+    // Print to UI
+    _LIT( KBCAppLmkAddEdit, "BCAppLmkAddEdit" );
+    _LIT( KExample, "In Example" );
+    TestModuleIf().Printf( 0, KBCAppLmkAddEdit, 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, KBCAppLmkAddEdit,
+                                KParam, i, &string );
+        i++;
+        }
+
+    return KErrNone;
+
+    }
+
+TInt CBCAppLmkAddEdit::TestNewL( CStifItemParser& /*aItem*/ )
+{
+			CPosLandmarkDatabase* ilDb = CPosLandmarkDatabase::OpenL();
+			CPosLmOperation* operation = NULL;
+
+		    if( ilDb->IsInitializingNeeded() )
+		        {
+		        operation = ilDb->InitializeL();
+		        operation->ExecuteL();
+		        }
+
+			CLmkEditorDlg::TLmkEditorParams editParams;
+			editParams.iAttributes = CLmkEditorDlg::ELmkAll;
+			editParams.iEditorMode = CLmkEditorDlg::ELmkEditor;
+
+			CPosLandmark* LmkEditor = CPosLandmark::NewL();
+			CleanupStack::PushL( LmkEditor );
+
+			CLmkEditorDlg* editDlg = CLmkEditorDlg::NewL(*ilDb,*LmkEditor,editParams);
+			CleanupStack::PushL( editDlg );
+			//ReleaseLandmarkResources();
+			CleanupStack::PopAndDestroy(2);
+			delete ilDb; ilDb=NULL;
+			delete operation; operation=NULL;
+			return KErrNone;
+}
+
+TInt CBCAppLmkAddEdit::TestNew2L( CStifItemParser& /*aItem*/ )
+{
+			//Create an empty landmark object
+  CPosLandmark* lmk = CPosLandmark::NewL();
+  CleanupStack::PushL(lmk);
+  //Specify the various fields for landmark
+  TLocality locality;
+  locality.SetAccuracy(32.2,32.4);
+  locality.SetCoordinate(56,25);
+  locality.SetHorizontalAccuracy(33.1);
+  locality.SetVerticalAccuracy(24.2);
+  lmk->SetLandmarkNameL(_L("Forum Mall"));
+  lmk->SetLandmarkDescriptionL(_L("Shopping Complex"));
+  //Populate the landmark with the specified field information
+  lmk->SetPositionL(locality);
+  //lmk->SetLandmarkIdL( 1 );
+
+			CPosLandmarkDatabase* ilDb = CPosLandmarkDatabase::OpenL();
+			//CleanupStack::PushL(ilDb);
+ 			 ilDb->AddLandmarkL(*lmk);
+			CPosLmOperation* operation = NULL;
+		    if ( ilDb->IsInitializingNeeded() )
+		        {
+		        operation = ilDb->InitializeL();
+		        operation->ExecuteL();
+		        }
+
+			CLmkEditorDlg::TLmkEditorParams editParams;
+			editParams.iAttributes = CLmkEditorDlg::ELmkAll;
+			editParams.iEditorMode = CLmkEditorDlg::ELmkEditor;
+			TPosLmItemId lmItem = lmk->LandmarkId();
+			CLmkEditorDlg* editDlg = CLmkEditorDlg::NewL(*ilDb,lmItem,editParams);
+			CleanupStack::PushL( editDlg );
+
+			//ReleaseLandmarkResources();
+			CleanupStack::PopAndDestroy(2); //ilDb, lmk
+			//delete ilDb; ilDb=NULL;
+			delete operation; operation=NULL;
+			return KErrNone;
+		}
+
+TInt CBCAppLmkAddEdit::TestExecuteLD( CStifItemParser& /*aItem*/ )
+	{
+			TPosLmItemId lmItem = 0;
+
+			CPosLandmarkDatabase* ilDb = CPosLandmarkDatabase::OpenL();
+			CPosLmOperation* operation = NULL;
+
+		  if ( ilDb->IsInitializingNeeded() )
+		     {
+		        operation = ilDb->InitializeL();
+		        operation->ExecuteL();
+		     }
+
+			CLmkEditorDlg::TLmkEditorParams editParams;
+			editParams.iAttributes = CLmkEditorDlg::ELmkAll;
+			editParams.iEditorMode = CLmkEditorDlg::ELmkEditor;
+
+			CPosLandmark* landmark = CPosLandmark::NewL();
+			CleanupStack::PushL( landmark );
+
+			CLmkEditorDlg* editDlg = CLmkEditorDlg::NewL(*ilDb,*landmark,editParams);
+			CleanupStack::PushL( editDlg );
+        TRAPD(result,editDlg->ExecuteLD());
+
+           	//ReleaseLandmarkResources();
+           	CleanupStack::Pop(2);
+           	delete ilDb; ilDb=NULL;
+						delete operation; operation=NULL;
+			return KErrNone;
+
+  }
+
+ TInt CBCAppLmkAddEdit::TestSetMopParent( CStifItemParser& /*aItem*/ )
+  {
+  	CPosLandmarkDatabase* ilDb = CPosLandmarkDatabase::OpenL();
+			CPosLmOperation* operation = NULL;
+		    if ( ilDb->IsInitializingNeeded() )
+		        {
+		        operation = ilDb->InitializeL();
+		        operation->ExecuteL();
+		        }
+
+			CPosLandmark* landmark = CPosLandmark::NewL();
+			CleanupStack::PushL( landmark );
+
+			CLmkEditorDlg::TLmkEditorParams editParams;
+			editParams.iAttributes = CLmkEditorDlg::ELmkAll;
+			editParams.iEditorMode = CLmkEditorDlg::ELmkEditor;
+
+			engine = new (ELeave) CLmkAddEditEngine;
+
+			CLmkEditorDlg* editDlg = CLmkEditorDlg::NewL(*ilDb,*landmark,editParams);
+			CleanupStack::PushL( editDlg );
+
+
+
+
+			TRAPD(result,editDlg->SetMopParent(engine));
+
+			//ReleaseLandmarkResources();
+			CleanupStack::Pop(2);
+
+			delete ilDb; ilDb=NULL;
+			delete operation; operation=NULL;
+
+
+			return KErrNone;
+ }
+
+ TInt CBCAppLmkAddEdit::TestSetHelpContext( CStifItemParser& /*aItem*/ )
+ {
+ 	CPosLandmarkDatabase* ilDb = CPosLandmarkDatabase::OpenL();
+			CPosLmOperation* operation = NULL;
+		    if ( ilDb->IsInitializingNeeded() )
+		        {
+		        operation = ilDb->InitializeL();
+		        operation->ExecuteL();
+		        }
+
+			CPosLandmark* landmark = CPosLandmark::NewL();
+			CleanupStack::PushL( landmark );
+
+			CLmkEditorDlg::TLmkEditorParams editParams;
+			editParams.iAttributes = CLmkEditorDlg::ELmkAll;
+			editParams.iEditorMode = CLmkEditorDlg::ELmkEditor;
+
+				TCoeHelpContext aContext;
+	    	CLmkEditorDlg* editDlg = CLmkEditorDlg::NewL(*ilDb,*landmark,editParams);
+	    	CleanupStack::PushL( editDlg );
+
+	       	editDlg->SetHelpContext(aContext);
+
+			//ReleaseLandmarkResources();
+			CleanupStack::PopAndDestroy(2);
+
+			delete ilDb; ilDb=NULL;
+			delete operation; operation=NULL;
+			return KErrNone;
+ }
+
+
+ TInt CBCAppLmkAddEdit::TestDisableMapAndNaviOptions( CStifItemParser& /*aItem*/ )
+ {
+      #ifdef __SERIES60_31__
+			CPosLandmarkDatabase* ilDb = CPosLandmarkDatabase::OpenL();
+			CPosLmOperation* operation = NULL;
+		    if ( ilDb->IsInitializingNeeded() )
+		        {
+		        operation = ilDb->InitializeL();
+		        operation->ExecuteL();
+		        }
+
+			CPosLandmark* landmark = CPosLandmark::NewL();
+			CleanupStack::PushL( landmark );
+
+			CLmkEditorDlg::TLmkEditorParams editParams;
+			editParams.iAttributes = CLmkEditorDlg::ELmkAll;
+			editParams.iEditorMode = CLmkEditorDlg::ELmkEditor;
+
+			CLmkEditorDlg* editDlg = CLmkEditorDlg::NewL(*ilDb,*landmark,editParams);
+        	editDlg->DisableMapAndNavigationMenuOptions();
+        	TRAP_IGNORE(editDlg->ExecuteLD());
+           	CleanupStack::PopAndDestroy();
+           	//ReleaseLandmarkResources();
+           	delete ilDb;
+			delete operation;
+			#endif
+			return KErrNone;
+            }
+
+
+// -----------------------------------------------------------------------------
+// CBCAppLmkAddEdit::?member_function
+// ?implementation_description
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+/*
+TInt CBCAppLmkAddEdit::?member_function(
+   CItemParser& aItem )
+   {
+
+   ?code
+
+   }
+*/
+
+// ========================== OTHER EXPORTED FUNCTIONS =========================
+// None
+
+//  [End of File] - Do not remove
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/loc_pub/landmarks_ui_addedit_api/tsrc/bc/bcapplmkeditor/src/bcapplmkeditorcontainer.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,299 @@
+/*
+* 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:    LandmarksUi Content File -
+*
+*/
+
+
+
+
+
+
+/*
+Change History
+22-05-2007	To resolve tool IDO warnings	Komala Nagaraju
+*/
+
+// INCLUDE FILES
+#include "BCAppLmkEditorContainer.h"
+
+#include <eikrted.h>
+#include <barsread.h>
+#include <txtrich.h>
+#include <aknutils.h>
+#include <BCAppLmkEditor.rsg>
+#include <fontids.hrh>
+#include <gulfont.h>
+#include <aknnotewrappers.h>
+
+
+// ================= MEMBER FUNCTIONS =======================
+
+// ---------------------------------------------------------
+// CBCAppLmkEditorContainer::ConstructL(const TRect& aRect)
+// EPOC two phased constructor
+// ---------------------------------------------------------
+//
+void CBCAppLmkEditorContainer::ConstructL(const TRect& aRect)
+    {
+    CreateWindowL();
+    Window().SetShadowDisabled(EFalse);
+
+    SetBlank();
+
+    // construct main text display window
+    TFontSpec fontspec = AknLayoutUtils::FontFromId(EAknLogicalFontSecondaryFont)->FontSpecInTwips();
+
+    TCharFormat defaultCharFormat( fontspec.iTypeface.iName, fontspec.iHeight );
+    TCharFormatMask defaultCharFormatMask;
+
+    defaultCharFormatMask.SetAttrib(EAttFontTypeface);
+    defaultCharFormatMask.SetAttrib(EAttFontHeight);
+
+    iParaFormat = CParaFormatLayer::NewL();
+    iCharFormat = CCharFormatLayer::NewL(defaultCharFormat,defaultCharFormatMask);
+
+    iRichText = CRichText::NewL(iParaFormat, iCharFormat);
+
+    iOutputWindow = new (ELeave) CEikRichTextEditor(TGulBorder(TGulBorder::ENone));
+    iOutputWindow->ConstructL(this,0,0,EEikEdwinOwnsWindow|EEikEdwinInclusiveSizeFixed|
+        EEikEdwinKeepDocument|EEikEdwinUserSuppliedText|
+        EEikEdwinLineCursor|EEikEdwinAlwaysShowSelection);
+
+    SetRect(aRect);
+    ActivateL();
+    }
+
+// Destructor
+CBCAppLmkEditorContainer::~CBCAppLmkEditorContainer()
+    {
+    delete iParaFormat;
+    iParaFormat = NULL;
+
+    delete iCharFormat;
+    iCharFormat = NULL;
+
+    delete iOutputWindow;
+    iOutputWindow = NULL;
+
+    delete iRichText;
+    iRichText = NULL;
+    }
+
+// ---------------------------------------------------------
+// CBCAppLmkEditorContainer::SizeChanged()
+// Called by framework when the view size is changed
+// ---------------------------------------------------------
+//
+void CBCAppLmkEditorContainer::SizeChanged()
+{
+    TRAP_IGNORE(SizeChangedL());
+}
+
+// ---------------------------------------------------------
+// CBCAppLmkEditorContainer::SizeChangedL()
+// Methods that can leave and are needed by SizeChanged
+// are collected into this method.
+// ---------------------------------------------------------
+//
+void CBCAppLmkEditorContainer::SizeChangedL()
+{
+    TSize outputRect;
+	AknLayoutUtils::LayoutMetricsSize(AknLayoutUtils::EMainPane, outputRect);
+
+    iOutputWindow->SetAknEditorFlags(EAknEditorFlagEnableScrollBars);
+    iOutputWindow->CreateScrollBarFrameL();
+    iOutputWindow->ScrollBarFrame()->SetScrollBarVisibilityL(CEikScrollBarFrame::EOff,CEikScrollBarFrame::EAuto);
+
+    iOutputWindow->SetDocumentContentL(*iRichText,CEikEdwin::EUseText);
+    iOutputWindow->SetRect(outputRect);
+    iOutputWindow->ActivateL();
+    iOutputWindow->SetFocus(ETrue);
+}
+
+// ---------------------------------------------------------
+// CBCAppLmkEditorContainer::CountComponentControls() const
+// ---------------------------------------------------------
+//
+TInt CBCAppLmkEditorContainer::CountComponentControls() const
+    {
+    return 0; // return nbr of controls inside this container
+    }
+
+// ---------------------------------------------------------
+// CBCAppLmkEditorContainer::ComponentControl(TInt aIndex) const
+// ---------------------------------------------------------
+//
+CCoeControl* CBCAppLmkEditorContainer::ComponentControl(TInt /*aIndex*/) const
+    {
+    return NULL;
+    }
+
+// ---------------------------------------------------------
+// CBCAppLmkEditorContainer::Draw(const TRect& aRect) const
+// ---------------------------------------------------------
+//
+void CBCAppLmkEditorContainer::Draw(const TRect& aRect) const
+    {
+    CWindowGc& gc = SystemGc();
+    gc.Clear(aRect);    }
+
+// ---------------------------------------------------------
+// CBCAppLmkEditorContainer::HandleControlEventL(
+//     CCoeControl* aControl,TCoeEvent aEventType)
+// ---------------------------------------------------------
+//
+void CBCAppLmkEditorContainer::HandleControlEventL(
+    CCoeControl* /*aControl*/,TCoeEvent /*aEventType*/)
+    {
+    }
+
+
+// ---------------------------------------------------------
+// CBCAppLmkEditorContainer::SetFontStyle(TUint aFontStyle)
+// Set font style for output window.
+// ---------------------------------------------------------
+//
+void CBCAppLmkEditorContainer::SetFontStyle(TUint aFontStyle)
+{
+    // Set current main window style to match that requested
+    UpdateFontAttribute(aFontStyle, CEikGlobalTextEditor::EBold);
+    UpdateFontAttribute(aFontStyle, CEikGlobalTextEditor::EItalic);
+    UpdateFontAttribute(aFontStyle, CEikGlobalTextEditor::EUnderline);
+}
+
+
+// ---------------------------------------------------------
+// CBCAppLmkEditorContainer::UpdateFontAttribute(TUint aFontStyle,
+//                                         TInt aAttribute)
+// Do the real work of setting the font style.
+// ---------------------------------------------------------
+//
+void CBCAppLmkEditorContainer::UpdateFontAttribute(TUint aFontStyle,
+                                             TInt aAttribute)
+{
+    // Ensure an individual attribute is on or off as requested
+    if ((aFontStyle & aAttribute) != (iFontStyle & aAttribute))
+    {
+        TRAP_IGNORE(iOutputWindow->BoldItalicUnderlineEventL(aAttribute));
+        iFontStyle ^= aAttribute;
+    }
+}
+
+
+// ---------------------------------------------------------
+// CBCAppLmkEditorContainer::PrintNotify(const TDesC& aDes, TUint aFontStyle)
+// Print text into output window.
+// ---------------------------------------------------------
+//
+void CBCAppLmkEditorContainer::PrintNotify(const TDesC& aDes, TUint aFontStyle)
+{
+    SetFontStyle(aFontStyle);
+    TChar ch;
+
+    for (TInt i = 0; i < aDes.Length(); i++)
+    {
+        RDebug::Print(_L("aDes[i]=%d"), aDes[i]);
+
+        // Add linebreak if character is '\n', otherwise
+        // add character as it is.
+        ch = aDes[i] != 10 ? (TChar)aDes[i] : (TChar)CEditableText::ELineBreak;
+        TRAP_IGNORE(iRichText->InsertL(iOutputWindow->TextLength(), ch));
+    }
+
+    TRAP_IGNORE(iOutputWindow->NotifyNewDocumentL());
+
+    TRAP_IGNORE(iOutputWindow->SetCursorPosL(iOutputWindow->TextLength(), EFalse));
+}
+
+
+// ---------------------------------------------------------
+// CBCAppLmkEditorContainer::PrintNotify(const TDesC8& aDes, TUint aFontStyle)
+// Print text into output window.
+// ---------------------------------------------------------
+//
+void CBCAppLmkEditorContainer::PrintNotify(const TDesC8& aDes, TUint aFontStyle)
+{
+    SetFontStyle(aFontStyle);
+    TChar ch;
+
+    for (TInt i = 0; i < aDes.Length(); i++)
+    {
+        RDebug::Print(_L("aDes[i]=%d"), aDes[i]);
+
+        // Add linebreak if character is '\n', otherwise
+        // add character as it is.
+        ch = aDes[i] != 10 ? (TChar)aDes[i] : (TChar)CEditableText::ELineBreak;
+        TRAP_IGNORE(iRichText->InsertL(iOutputWindow->TextLength(), ch));
+    }
+
+    TRAP_IGNORE(iOutputWindow->NotifyNewDocumentL());
+
+    TRAP_IGNORE(iOutputWindow->SetCursorPosL(iOutputWindow->TextLength(), EFalse));
+}
+
+
+// ---------------------------------------------------------
+// CBCAppLmkEditorContainer::PrintNotify(TInt aIn)
+// Print integer into output window.
+// ---------------------------------------------------------
+//
+void CBCAppLmkEditorContainer::PrintNotify(TInt aInt)
+{
+    // Display number in ascii decimal
+    TBuf<50> buf;
+    buf.Num(aInt);
+    PrintNotify(buf);
+}
+
+// ---------------------------------------------------------
+// CBCAppLmkEditorContainer::OfferKeyEventL(const TKeyEvent& aKeyEvent,
+//                                    TEventCode aType)
+// Handle key event. Only up and down key arrow events are
+// consumed in order to enable scrolling in output window.
+// ---------------------------------------------------------
+//
+TKeyResponse CBCAppLmkEditorContainer::OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType)
+{
+    if(aType != EEventKey)
+        return EKeyWasNotConsumed;
+
+    if(aKeyEvent.iCode == EKeyUpArrow)
+    {
+        iOutputWindow->MoveCursorL(TCursorPosition::EFLineUp,EFalse);
+        return EKeyWasConsumed;
+    }
+
+    if(aKeyEvent.iCode == EKeyDownArrow)
+    {
+        iOutputWindow->MoveCursorL(TCursorPosition::EFLineDown,EFalse);
+        return EKeyWasConsumed;
+    }
+
+    return EKeyWasNotConsumed;
+}
+
+
+// ---------------------------------------------------------
+// CBCAppLmkEditorContainer::ClearOutputWindow()
+// Clear the output window.
+// ---------------------------------------------------------
+//
+void CBCAppLmkEditorContainer::ClearOutputWindow()
+{
+    iRichText->Reset();
+    TRAP_IGNORE(iOutputWindow->NotifyNewDocumentL());
+}
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/loc_pub/landmarks_ui_addedit_api/tsrc/bc/bcapplmkeditor/src/bcapplmkeditorengine.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,89 @@
+/*
+* 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:    LandmarkUi Content File
+*
+*/
+
+
+
+
+
+
+
+
+// INCLUDE FILES
+
+#include "BCAppLmkEditorEngine.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
+    }
+*/
+
+TTypeUid::Ptr CLmkAddEditEngine::MopSupplyObject(TTypeUid /*aId*/)
+{
+
+}
+
+MObjectProvider* CLmkAddEditEngine::MopNext()
+{
+	return NULL;
+}
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/loc_pub/landmarks_ui_addedit_api/tsrc/bc/group/bld.inf	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,39 @@
+/*
+* 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:    LandmarksUi Content File -  Build information file for bc-test code of Landmark Add/Edit API
+*
+*/
+
+
+
+
+
+
+
+
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_TESTEXPORTS
+
+PRJ_EXPORTS
+
+PRJ_TESTMMPFILES
+
+#include "../bcapplmkeditor/group/bld.inf"
+
+PRJ_MMPFILES
+
+
+//  End of File
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/loc_pub/landmarks_ui_addedit_api/tsrc/bmarm/UTapplmkaddeditu.def	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,3 @@
+EXPORTS
+	LibEntryL__FR13CTestModuleIf @ 1 NONAME R3UNUSED ; LibEntryL(CTestModuleIf &)
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/loc_pub/landmarks_ui_addedit_api/tsrc/bwins/UTapplmkaddeditu.def	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,3 @@
+EXPORTS
+	?LibEntryL@@YAPAVCScriptBase@@AAVCTestModuleIf@@@Z @ 1 NONAME ; class CScriptBase * LibEntryL(class CTestModuleIf &)
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/loc_pub/landmarks_ui_addedit_api/tsrc/bwins/UTapplmkeddeditu.def	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,3 @@
+EXPORTS
+	?LibEntryL@@YAPAVCScriptBase@@AAVCTestModuleIf@@@Z @ 1 NONAME ; class CScriptBase * __cdecl LibEntryL(class CTestModuleIf &)
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/loc_pub/landmarks_ui_addedit_api/tsrc/conf/UTlmkaddedit.cfg	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,50 @@
+[Test]
+title TestNewL
+run testscripter c:\testframework\UI_LmkAddEdit.cfg 1
+[Endtest]
+
+[Test]
+title TestNewL_Nulldb
+run testscripter c:\testframework\UI_LmkAddEdit.cfg 2
+[Endtest]
+
+[Test]
+title TestNewL_InvalidLMId
+run testscripter c:\testframework\UI_LmkAddEdit.cfg 3
+[Endtest]
+[Test]
+
+[Test]
+title TestNew2L
+run testscripter c:\testframework\UI_LmkAddEdit.cfg 4
+[Endtest]
+
+[Test]
+title TestExecUIeLD_Editmode
+run testscripter c:\testframework\UI_LmkAddEdit.cfg 5
+run testscripter c:\testframework\UI_LmkAddEdit.cfg 10
+[Endtest]
+
+[Test]
+title TestExecUIeLD_ViewMode
+run testscripter c:\testframework\UI_LmkAddEdit.cfg 6
+run testscripter c:\testframework\UI_LmkAddEdit.cfg 10
+[Endtest]
+
+
+[Test]
+title TestSetMopParent
+run testscripter c:\testframework\UI_LmkAddEdit.cfg 7
+[Endtest]
+
+[Test]
+title TestSetHelpContext
+run testscripter c:\testframework\UI_LmkAddEdit.cfg 8
+[Endtest]
+
+[Test]
+title TestDisableMapAndNaviOptions
+run testscripter c:\testframework\UI_LmkAddEdit.cfg 9
+run testscripter c:\testframework\UI_LmkAddEdit.cfg 10
+[Endtest]
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/loc_pub/landmarks_ui_addedit_api/tsrc/conf/ui_lmkaddedit.cfg	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,71 @@
+[Test]
+title TestNewL
+create UTAppLmkAddEdit foobar
+foobar TestNewL
+delete foobar
+[Endtest] 
+
+[Test]
+title TestNewL_Nulldb
+create UTAppLmkAddEdit foobar
+foobar TestNewL 1
+delete foobar
+[Endtest]
+
+[Test]
+title TestNewL_InvalidLMItem
+create UTAppLmkAddEdit foobar
+foobar TestNewL 2
+delete foobar
+[Endtest]  
+
+[Test]
+title TestNew2L
+create UTAppLmkAddEdit foobar
+foobar TestNew2L pa ra me ters
+delete foobar
+[Endtest] 
+
+[Test]
+title TestExecuteLD_EditMode
+create UTAppLmkAddEdit foobar
+bringtoforeground
+foobar TestExecuteLD
+delete foobar
+[Endtest]
+ 
+[Test]
+title TestExecuteLD_ViewMode
+create UTAppLmkAddEdit foobar
+bringtoforeground
+foobar TestExecuteLD 1 1
+delete foobar
+[Endtest] 
+
+[Test]
+title TestSetMopParent
+create UTAppLmkAddEdit foobar
+foobar TestSetMopParent pa ra me ters
+delete foobar
+[Endtest] 
+
+[Test]
+title TestSetHelpContext
+create UTAppLmkAddEdit foobar
+foobar TestSetHelpContext pa ra me ters
+delete foobar
+[Endtest] 
+
+[Test]
+title TestDisableMapAndNaviOptions
+create UTAppLmkAddEdit foobar
+bringtoforeground
+foobar TestDisableMapAndNaviOptions pa ra me ters
+delete foobar
+[Endtest] 
+
+[Test]
+title PressKey
+pause 3000
+presskey global EKeyDevice1
+[Endtest]
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/loc_pub/landmarks_ui_addedit_api/tsrc/data/UTapplmkeditor.rss	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,425 @@
+/*
+* 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:    LandmarksUi Content File -     
+*
+*/
+
+
+
+
+
+
+
+NAME BCAP
+
+#include <eikon.rh>
+#include "BCAppLmkEditor.hrh"
+#include <avkon.rsg>
+#include <avkon.rh>
+#include <avkon.mbg>
+
+// for Text Setting Page
+#define TEXT_SETTING_PAGE_NUMBER 1
+#define TEXT_SETTING_PAGE_WIDTH 9
+#define TEXT_SETTING_PAGE_LINES 5
+#define TEXT_SETTING_PAGE_MAXLENGTH20 20
+
+// for Alpha Password Setting Page
+#define ALPHA_PASSWORD_SETTING_PAGE_NUMBER 1
+#define ALPHA_PASSWORD_LENGTH_OF_STRING 8
+
+// for Time Setting Page
+#define TIME_SETTING_PAGE_NUMBER 1
+#define TIME_EDITOR_MIN_SECOND 0
+#define TIME_EDITOR_MIN_MINUTE 0
+#define TIME_EDITOR_MIN_HOUR 0
+#define TIME_EDITOR_MAX_SECOND 59
+#define TIME_EDITOR_MAX_MINUTE 59
+#define TIME_EDITOR_MAX_HOUR 23
+
+//For Ip address editor
+#define IPADDRESS_MIN_FIRST_FIELD_VALUE     0
+#define IPADDRESS_MIN_SECOND_FIELD_VALUE    0
+#define IPADDRESS_MIN_THIRD_FIELD_VALUE     0
+#define IPADDRESS_MIN_FOURTH_FIELD_VALUE    0
+#define IPADDRESS_MAX_FIRST_FIELD_VALUE     255
+#define IPADDRESS_MAX_SECOND_FIELD_VALUE    255
+#define IPADDRESS_MAX_THIRD_FIELD_VALUE     255
+#define IPADDRESS_MAX_FOURTH_FIELD_VALUE    255
+
+// for Slider Setting Page
+#define SLIDER_SETTING_PAGE_NUMBER 1
+#define SLIDER_SETTING_PAGE_MINVALUE 0
+#define SLIDER_SETTING_PAGE_MAXVALUE 100
+#define SLIDER_SETTING_PAGE_STEP 1
+
+// for Time Offset Setting Page
+#define TIME_OFFSET_SETTING_PAGE_NUMBER 1
+
+RESOURCE RSS_SIGNATURE { }
+
+RESOURCE TBUF r_default_document_name { buf=""; }
+
+RESOURCE EIK_APP_INFO
+    {
+    menubar=r_bcappaknstngitm_menubar;
+    hotkeys=r_bcappaknstngitm_hotkeys;
+    cba=R_AVKON_SOFTKEYS_OPTIONS_EXIT;     
+    }
+
+//----------------------------------------------------
+//   
+//    r_bcappaknstngitm_hotkeys
+//
+//----------------------------------------------------
+//
+RESOURCE HOTKEYS r_bcappaknstngitm_hotkeys
+    {
+    control=
+        {
+        HOTKEY { command=EAknCmdExit; key='e'; }
+        };
+    }
+
+
+//----------------------------------------------------
+//   
+//    r_bcappaknstngitm_menubar
+//
+//----------------------------------------------------
+//
+RESOURCE MENU_BAR r_bcappaknstngitm_menubar
+    {
+    titles =
+        {
+        MENU_TITLE {menu_pane = r_bcappaknstngitm_menu;}
+        };
+    }
+
+//----------------------------------------------------
+//   
+//    r_bcappaknstngitm_menu
+//
+//----------------------------------------------------
+//
+RESOURCE MENU_PANE r_bcappaknstngitm_menu
+    {
+    items=
+        {
+        MENU_ITEM { command=EAknSoftkeyExit; txt="Exit"; }
+        };
+    }
+
+
+
+
+
+
+
+//----------------------------------------------------
+//   
+//    r_my_setting_resource
+//
+//----------------------------------------------------
+//
+RESOURCE AVKON_SETTING_ITEM_LIST r_my_setting_resource
+  {
+  flags = 0;
+  title = "";
+  initial_number = 1;
+  } 
+
+//----------------------------------------------------
+//   
+//    r_my_text_setting_page
+//
+//----------------------------------------------------
+//
+RESOURCE AVKON_SETTING_PAGE r_my_text_setting_page
+  {
+  number = TEXT_SETTING_PAGE_NUMBER;
+  label = "My Text Label";
+  type = EEikCtEdwin;
+  editor_resource_id = r_my_text;
+  }
+
+RESOURCE EDWIN r_my_text
+  {
+  width = TEXT_SETTING_PAGE_WIDTH;
+  lines = TEXT_SETTING_PAGE_LINES;
+  maxlength = TEXT_SETTING_PAGE_MAXLENGTH20;
+  }
+
+//----------------------------------------------------
+//   
+//    r_my_password_setting_page
+//
+//----------------------------------------------------
+//
+RESOURCE AVKON_SETTING_PAGE r_my_password_setting_page
+    {
+    number = ALPHA_PASSWORD_SETTING_PAGE_NUMBER;
+    label = "My Password Label";
+    type = EEikCtSecretEd;
+    editor_resource_id = r_my_password;
+    }
+
+RESOURCE SECRETED r_my_password
+    {
+    num_letters = ALPHA_PASSWORD_LENGTH_OF_STRING;
+    }
+
+//----------------------------------------------------
+//   
+//    r_my_time_setting_page
+//
+//----------------------------------------------------
+//
+RESOURCE AVKON_SETTING_PAGE r_my_time_setting_page
+    {
+    number = TIME_SETTING_PAGE_NUMBER;
+    label = "My Time Label";
+    type = EEikCtTimeEditor;
+    editor_resource_id = r_my_time;
+    }
+
+RESOURCE TIME_EDITOR r_my_time
+    {
+    minTime = TIME
+        {
+        second = TIME_EDITOR_MIN_SECOND;
+        minute = TIME_EDITOR_MIN_MINUTE;
+        hour = TIME_EDITOR_MIN_HOUR;
+        };
+    maxTime = TIME
+        {
+        second = TIME_EDITOR_MAX_SECOND;
+        minute = TIME_EDITOR_MAX_MINUTE;
+        hour = TIME_EDITOR_MAX_HOUR;
+        };
+    flags=EEikTimeWithoutSecondsField;
+    }
+
+//----------------------------------------------------
+//   
+//    r_my_ip_setting_page
+//
+//----------------------------------------------------
+//
+RESOURCE AVKON_SETTING_PAGE r_my_ip_setting_page
+    {   
+    label = "My Ip Label";
+    type = EAknCtIpFieldEditor;
+    editor_resource_id = r_my_ip;
+    }
+
+
+RESOURCE IP_FIELD_EDITOR r_my_ip
+    {
+    min_field_values = IP_FIELD
+        { 
+        first_field = IPADDRESS_MIN_FIRST_FIELD_VALUE;
+        second_field = IPADDRESS_MIN_SECOND_FIELD_VALUE;
+        third_field = IPADDRESS_MIN_THIRD_FIELD_VALUE;
+        fourth_field = IPADDRESS_MIN_FOURTH_FIELD_VALUE;
+        };
+    max_field_values = IP_FIELD
+        {
+        first_field = IPADDRESS_MAX_FIRST_FIELD_VALUE;
+        second_field = IPADDRESS_MAX_SECOND_FIELD_VALUE;
+        third_field = IPADDRESS_MAX_THIRD_FIELD_VALUE;
+        fourth_field = IPADDRESS_MAX_FOURTH_FIELD_VALUE;
+        };
+    flags = 0;
+    }
+
+//----------------------------------------------------------------------------
+//
+//    r_my_enum_text_setting_item_list
+//
+//----------------------------------------------------------------------------
+//
+RESOURCE AVKON_SETTING_ITEM_LIST r_my_enum_text_setting_item_list
+    {
+    flags= EAknSettingItemNumberedStyle;
+    title = "My Enum Text Setting Item List";
+    initial_number = 1;
+    items =
+        {
+        AVKON_SETTING_ITEM
+            {
+            identifier = 1;
+            setting_page_resource = r_my_enum_text_setting_page;
+            associated_resource = r_my_enum_text_popup_setting_texts;
+            name = "My Enum Text Title";
+            }
+        };
+    }
+
+RESOURCE AVKON_POPUP_SETTING_TEXTS r_my_enum_text_popup_setting_texts
+    {
+    flags = 0;
+    setting_texts_resource = r_my_on_off_texts;
+    popped_up_texts_resource = r_my_poped_up_on_off_texts;
+    }
+
+RESOURCE ARRAY r_my_on_off_texts
+    {
+    items =
+        {
+        AVKON_ENUMERATED_TEXT 
+            {
+            value = 0; 
+            text = "On"; 
+            },
+        AVKON_ENUMERATED_TEXT 
+            { 
+            value = 1; 
+            text = "Off"; 
+            }
+        };
+    }
+
+RESOURCE ARRAY r_my_poped_up_on_off_texts
+    {
+    items =
+        {
+        LBUF 
+            { 
+            txt = "On"; 
+            },
+        LBUF 
+            { 
+            txt = "Off"; 
+            }
+        };
+    }
+
+RESOURCE AVKON_SETTING_PAGE r_my_enum_text_setting_page
+    {   
+    number= 0;
+    label= "My Enum Text Title";
+    type = EAknCtPopupSettingList;    
+    editor_resource_id = r_my_enum_popup;
+    }
+
+RESOURCE POPUP_SETTING_LIST r_my_enum_popup
+	{
+	flags = 0;
+	width = 0; // in characters.
+	other="Other...";
+	empty_text="No options";
+	new_item_setting_page_resource = 0;
+	type = EAknCtPopupSettingList;				
+	new_item_setting_editor_resource = 0;
+	}
+
+//----------------------------------------------------
+//   
+//    r_my_slider_setting_page
+//
+//----------------------------------------------------
+//
+RESOURCE AVKON_SETTING_PAGE r_my_slider_setting_page
+  {
+  number = SLIDER_SETTING_PAGE_NUMBER;
+  label = "My Slider Label";
+  type = EAknCtSlider;
+  editor_resource_id = r_my_slider;
+  }
+
+RESOURCE SLIDER r_my_slider
+  {
+  layout = EAknSettingsItemSliderLayout;
+  minvalue = SLIDER_SETTING_PAGE_MINVALUE;
+  maxvalue = SLIDER_SETTING_PAGE_MAXVALUE;
+  step = SLIDER_SETTING_PAGE_STEP;
+  valuetype = EAknSliderValuePercentage;
+  minlabel = "My Slider Min Label";
+  maxlabel = "My Slider Max Label";
+  }
+
+//----------------------------------------------------
+//   
+//    r_my_volume_setting_page
+//
+//----------------------------------------------------
+//
+RESOURCE AVKON_SETTING_PAGE r_my_volume_setting_page
+  {
+  type = EAknCtVolumeControl;
+  editor_resource_id = r_my_volume;
+  }
+
+RESOURCE VOLUME r_my_volume
+  {
+  flags = ESettingsVolumeControl;
+  value = 1;
+  }
+
+//-----------------------------------------------------------------------------
+//
+//    r_my_empty_item_list
+//
+//-----------------------------------------------------------------------------
+//
+RESOURCE AVKON_SETTING_ITEM_LIST r_my_empty_item_list
+    {
+    flags= EAknSettingItemNumberedStyle;
+    title = "My Empty Item List Title";
+    initial_number = 1;
+    items =     
+        {
+        AVKON_SETTING_ITEM
+            {
+            identifier = 1;
+            name = "My Empty Item Name";
+            setting_page_resource = r_my_volume_setting_page;            
+            type = EAknCtVolumeControl;
+            setting_editor_resource = r_my_volume;
+            associated_resource = 0;            
+            empty_item_text =  "";
+            compulsory_ind_string = "";
+            }
+        };
+    }
+
+//----------------------------------------------------
+//   
+//    r_my_time_offset_setting_page
+//
+//----------------------------------------------------
+//
+RESOURCE AVKON_SETTING_PAGE r_my_time_offset_setting_page
+    {
+    number = TIME_OFFSET_SETTING_PAGE_NUMBER;
+    label = "My Time Label";
+    type = EEikCtTimeOffsetEditor;
+    editor_resource_id = r_my_time_offset;
+    }
+
+RESOURCE TIME_OFFSET_EDITOR r_my_time_offset
+    {
+    minTimeOffset = TIME_OFFSET
+        {
+        seconds = 0;
+        };
+    maxTimeOffset = TIME_OFFSET 
+        {
+        seconds = 0;
+        };
+    flags=EEikTimeWithoutSecondsField;
+    }
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/loc_pub/landmarks_ui_addedit_api/tsrc/data/UTapplmkeditor_loc.rss	Wed Sep 01 12:31:27 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:    LandmarksUi Content File -   
+*
+*/
+
+
+
+
+
+
+#include <appinfo.rh>
+
+RESOURCE LOCALISABLE_APP_INFO
+	{
+	short_caption="Landmarks";
+	group_name="BCApps";
+	caption_and_icon=
+		{
+		CAPTION_AND_ICON_INFO
+			{
+			caption="BcAppLandmark";
+			number_of_icons=2;
+			icon_file="\\resource\\apps\\BcAppLandmark.mbm";
+			}
+		};
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/loc_pub/landmarks_ui_addedit_api/tsrc/data/UTapplmkeditor_reg.rss	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,34 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:    LandmarksUi Content File -   
+*
+*/
+
+
+
+
+
+//Registration resource file BcAppLmkEditor
+
+#include <appinfo.rh>
+UID2 KUidAppRegistrationResourceFile
+UID3 0x101F4FF6
+RESOURCE APP_REGISTRATION_INFO
+	{
+	app_file="BcAppLmkEditor";
+	localisable_resource_file="\\resource\\apps\\bcapplmkeditor_loc";
+	hidden=KAppNotHidden;
+	embeddability=KAppNotEmbeddable;
+	newfile=KAppDoesNotSupportNewFile;
+	}
Binary file loc_pub/landmarks_ui_addedit_api/tsrc/data/context_pane_icon.bmp has changed
Binary file loc_pub/landmarks_ui_addedit_api/tsrc/data/context_pane_icon_mask.bmp has changed
Binary file loc_pub/landmarks_ui_addedit_api/tsrc/data/list_icon.bmp has changed
Binary file loc_pub/landmarks_ui_addedit_api/tsrc/data/list_icon_mask.bmp has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/loc_pub/landmarks_ui_addedit_api/tsrc/eabi/UTapplmkaddeditu.def	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,5 @@
+EXPORTS
+	_Z9LibEntryLR13CTestModuleIf @ 1 NONAME
+	_ZTI17CLmkAddEditEngine @ 2 NONAME ; #<TI>#
+	_ZTV17CLmkAddEditEngine @ 3 NONAME ; #<VT>#
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/loc_pub/landmarks_ui_addedit_api/tsrc/group/UTapplmkaddedit.mmp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,112 @@
+/*
+* Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:    LandmarksUi Content File -  
+*
+*/
+
+
+
+
+/*TYPE TESTCLASS*/
+
+
+#if defined(__S60_)
+        // To get the OS_LAYER_SYSTEMINCLUDE-definition
+        #include <platform_paths.hrh>
+#endif
+
+TARGET          UTapplmkaddedit.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         UTapplmkaddedit.def
+
+APP_LAYER_SYSTEMINCLUDE
+MW_LAYER_SYSTEMINCLUDE
+USERINCLUDE     ../inc 
+SOURCEPATH      ../src
+
+SOURCE          UTapplmkaddedit.cpp
+SOURCE          UTapplmkaddeditblocks.cpp
+SOURCE			UTapplmkeditorengine.cpp
+
+
+
+START BITMAP UTapplmkeditor.mbm
+SOURCEPATH ../data
+TARGETPATH /resource/apps
+SOURCE	c12 context_pane_icon.bmp context_pane_icon_mask.bmp \
+			list_icon.bmp list_icon_mask.bmp 
+END
+
+//RESOURCE        resource_file
+//RESOURCE        resource_file2
+
+LIBRARY         euser.lib
+LIBRARY         stiftestinterface.lib
+LIBRARY         stiftestengine.lib
+LIBRARY  apgrfx.lib 
+LIBRARY  avkon.lib
+LIBRARY  euser.lib
+LIBRARY  apparc.lib
+LIBRARY  cone.lib
+LIBRARY  eikcore.lib 
+LIBRARY  eikcoctl.lib
+LIBRARY  eikctl.lib
+LIBRARY  etext.lib 
+LIBRARY  egul.lib
+LIBRARY  ws32.lib
+LIBRARY  bafl.lib
+LIBRARY  insock.lib
+LIBRARY  fbscli.lib
+LIBRARY  gdi.lib
+LIBRARY	 LmkCommonUi.lib
+LIBRARY  eposlandmarks.lib
+LIBRARY	 lbs.lib
+LIBRARY	 satinfo.lib
+LIBRARY					LmkCommonUi.lib
+//LIBRARY					eposlmdbmanlib.lib
+
+LANG            SC
+
+/*
+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
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/loc_pub/landmarks_ui_addedit_api/tsrc/group/bld.inf	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,37 @@
+/*
+* 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:    LandmarkUi Content File
+*
+*/
+
+
+
+
+
+
+
+
+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_TESTMMPFILES
+// NOTE: If using ARS requirements .mmp file operation should be done under this.
+// 'abld test build'
+UTAppLmkAddEdit.mmp
+
+
+
+//  End of File
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/loc_pub/landmarks_ui_addedit_api/tsrc/group/test_addedit.pkg	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,35 @@
+;
+; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of "Eclipse Public License v1.0"
+; which accompanies this distribution, and is available
+; at the URL "http://www.eclipse.org/legal/epl-v10.html".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description:    LandmarkUi Content File   
+;
+&EN
+
+; Installation header
+; Only one component name as we only support English
+; UID is the main app's UID
+
+#{"loc_addedit"},(0x20015B16),1,0,0,TYPE=SA
+[0x101F7961],3,*,*,{"Series60ProductID"}
+
+; Non-localised vendor name
+:"Nokia Corporation"
+
+; Localised vendor names
+%{"Nokia Corporation"}
+
+; Files to install and to where
+"\epoc32\release\armv5\urel\UTapplmkaddedit.dll"-"c:\sys\bin\UTapplmkaddedit.dll"
+"..\conf\ui_lmkaddedit.cfg"-"C:\testframework\ui_lmkaddedit.cfg"
+"..\conf\UTlmkaddedit.cfg"-"C:\testframework\UTlmkaddedit.cfg"
+"..\init\testframework.ini"-"C:\testframework\testframework.ini"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/loc_pub/landmarks_ui_addedit_api/tsrc/inc/UTapplmkaddedit.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,213 @@
+/*
+* 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:    LandmarkUi Content File
+*
+*/
+
+
+
+
+
+
+
+
+#ifndef UTAPPLMKADDEDIT_H
+#define UTAPPLMKADDEDIT_H
+
+//  INCLUDES
+#include <StifLogger.h>
+#include <TestScripterInternal.h>
+#include <StifTestModule.h>
+
+#include "UTAppLmkEditorEngine.h"
+
+
+// CONSTANTS
+//const ?type ?constant_var = ?constant;
+const TInt32 MAX_EXPONENT1 = 256;
+const TInt32 DEFAULT = 0;
+const TInt32 NULL_DB = 1;
+const TInt32 NON_EXISTING_LM = 2;
+const TInt32 EDIT_MODE = 0;
+const TInt32 VIEW_MODE = 1;
+
+
+// MACROS
+//#define ?macro ?macro_def
+#define TEST_CLASS_VERSION_MAJOR 30
+#define TEST_CLASS_VERSION_MINOR 9
+#define TEST_CLASS_VERSION_BUILD 6
+
+// Logging path
+_LIT( KUTAppLmkAddEditLogPath, "\\logs\\testframework\\UTAppLmkAddEdit\\" );
+// Log file
+_LIT( KUTAppLmkAddEditLogFile, "UTAppLmkAddEdit.txt" );
+_LIT( KUTAppLmkAddEditLogFileWithTitle, "UTAppLmkAddEdit_[%S].txt" );
+
+// FUNCTION PROTOTYPES
+//?type ?function_name(?arg_list);
+
+// FORWARD DECLARATIONS
+//class ?FORWARD_CLASSNAME;
+class CUTAppLmkAddEdit;
+
+// DATA TYPES
+//enum ?declaration
+//typedef ?declaration
+//extern ?data_type;
+
+// CLASS DECLARATION
+
+/**
+*  CUTAppLmkAddEdit test class for STIF Test Framework TestScripter.
+*  ?other_description_lines
+*
+*  @lib ?library
+*  @since ?Series60_version
+*/
+NONSHARABLE_CLASS(CUTAppLmkAddEdit) : public CScriptBase
+    {
+    public:  // Constructors and destructor
+
+        /**
+        * Two-phased constructor.
+        */
+        static CUTAppLmkAddEdit* NewL( CTestModuleIf& aTestModuleIf );
+
+        /**
+        * Destructor.
+        */
+        virtual ~CUTAppLmkAddEdit();
+
+    public: // New functions
+
+        /**
+        * ?member_description.
+        * @since ?Series60_version
+        * @param ?arg1 ?description
+        * @return ?description
+        */
+        //?type ?member_function( ?type ?arg1 );
+
+    public: // Functions from base classes
+
+        /**
+        * From CScriptBase Runs a script line.
+        * @since ?Series60_version
+        * @param aItem Script line containing method name and parameters
+        * @return Symbian OS error code
+        */
+        virtual TInt RunMethodL( CStifItemParser& aItem );
+
+    protected:  // New functions
+
+        /**
+        * ?member_description.
+        * @since ?Series60_version
+        * @param ?arg1 ?description
+        * @return ?description
+        */
+        //?type ?member_function( ?type ?arg1 );
+
+    protected:  // Functions from base classes
+
+        /**
+        * From ?base_class ?member_description
+        */
+        //?type ?member_function();
+
+    private:
+
+        /**
+        * C++ default constructor.
+        */
+        CUTAppLmkAddEdit( 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 );
+        virtual TInt TestNewL( CStifItemParser& aItem );
+        virtual TInt TestNew2L( CStifItemParser& aItem );
+        virtual TInt TestExecuteLD( CStifItemParser& aItem );
+        virtual TInt TestSetMopParentL( CStifItemParser& aItem );
+        virtual TInt TestSetHelpContextL( CStifItemParser& aItem );
+        virtual TInt TestDisableMapAndNaviOptionsL( CStifItemParser& aItem );
+        
+        void DrainMemory();
+        void RestoreMemory();
+
+        //virtual TInt TestSetMoParent( 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
+    CLmkAddEditEngine* engine;
+    TAny* cells[MAX_EXPONENT1];
+        // ?one_line_short_description_of_data
+        //?data_declaration;
+
+        // Reserved pointer for future extension
+        //TAny* iReserved;
+
+    public:     // Friend classes
+        //?friend_class_declaration;
+    protected:  // Friend classes
+        //?friend_class_declaration;
+    private:    // Friend classes
+        //?friend_class_declaration;
+    	
+
+    };
+
+#endif      // UTAPPLMKADDEDIT_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/loc_pub/landmarks_ui_addedit_api/tsrc/inc/UTapplmkeditorcontainer.h	Wed Sep 01 12:31:27 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:    LandmarksUi Content File -
+*
+*/
+
+
+
+
+
+
+/*
+Change History
+22-05-2007	To resolve tool IDO warnings	Komala Nagaraju
+*/
+
+#ifndef UTAPPLMKEDITORCONTAINER_H
+#define UTAPPLMKEDITORCONTAINER_H
+
+// INCLUDES
+#include <coecntrl.h>
+
+// FORWARD DECLARATIONS
+class CRichText;
+class CParaFormatLayer;
+class CCharFormatLayer;
+class CEikRichTextEditor;
+
+
+// CLASS DECLARATION
+
+/**
+*  CUTAppLmkEditorContainer  container control class.
+*
+*/
+class CUTAppLmkEditorContainer : public CCoeControl, MCoeControlObserver
+    {
+    public: // Constructors and destructor
+
+        /**
+        * default constructor.
+        * @param aRect Frame rectangle for container.
+        */
+        void ConstructL(const TRect& aRect);
+
+        /**
+        * Destructor.
+        */
+        ~CUTAppLmkEditorContainer();
+
+public: // New functions
+
+    /**
+    * Clear the output window.
+    */
+    void ClearOutputWindow();
+
+public: // Functions from base classes
+
+    // From MUINotify
+
+    /**
+    * Display text on output window
+    * @param aDes text to display
+    * @param aFontStyle style (italic/bold/etc) for this text
+    */
+    void PrintNotify(const TDesC& aDes, TUint aFontStyle = 0);
+    void PrintNotify(const TDesC8& aDes, TUint aFontStyle = 0);
+
+    /**
+    * Display integer as text on output window
+    * @param aInt integer to display
+    */
+    void PrintNotify(TInt aInt);
+
+private: // Functions from base classes
+
+    /**
+    * From CoeControl. Calls SizeChangedL with TRAP.
+    */
+    void SizeChanged();
+
+    /**
+    * Handle change of control size
+    */
+    void SizeChangedL();
+
+    /**
+    * From CoeControl.
+    */
+    TInt CountComponentControls() const;
+
+    /**
+    * From CCoeControl.
+    */
+    CCoeControl* ComponentControl(TInt aIndex) const;
+
+    /**
+    * Event handling section, e.g Listbox events.
+    */
+    void HandleControlEventL(CCoeControl* aControl,TCoeEvent aEventType);
+
+    /**
+    * From CCoeControl,Draw.
+    */
+    void Draw(const TRect& aRect) const;
+
+    /**
+    * Key event handler. Handles up and down arrow keys, so that
+    * output window can be scrolled.
+    */
+    TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType);
+
+    /**
+    * Change font style for subsequent text
+    * @param aFontStyle new font style
+    */
+    void SetFontStyle(TUint aFontStyle);
+
+    /**
+    * Set or clear an individual font attribute if necessary,
+    * so that it matches the required style
+    * @param aFontStyle required font style
+    * @param aAttribute the individual attribute to correct
+    */
+    void UpdateFontAttribute(TUint aFontStyle, TInt aAttribute);
+
+
+private: //data
+    CParaFormatLayer*   iParaFormat;   // Used by CEikRichTextEditor
+    CCharFormatLayer*   iCharFormat;   // Used by CEikRichTextEditor
+    CRichText*          iRichText;     // Used by CEikRichTextEditor
+    CEikRichTextEditor* iOutputWindow; // CRichText object for use as our output window
+    TUint               iFontStyle;    // Current style in use by output window
+    };
+
+
+#endif
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/loc_pub/landmarks_ui_addedit_api/tsrc/inc/UTapplmkeditorengine.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,41 @@
+/*
+* 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:    LandmarkUi Content File
+*
+*/
+
+
+
+
+
+
+
+
+#ifndef UTAPPLMKEDITORENGINE_H
+#define UTAPPLMKEDITORENGINE_H
+
+#include <coemop.h>
+#include <e32base.h>
+class CLmkAddEditEngine : public CBase, public MObjectProvider
+{
+		public:
+
+		protected:
+			TTypeUid::Ptr MopSupplyObject(TTypeUid aId);
+    	MObjectProvider* MopNext();
+};
+
+#endif      // UTAPPLMKEDITORENGINE_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/loc_pub/landmarks_ui_addedit_api/tsrc/init/testframework.ini	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,200 @@
+#
+# This is STIF initialization file
+# Comment lines start with '#'-character.
+# See STIF TestFramework users guide.doc for instructions
+
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+# Set following test engine settings:
+#	- Set Test Reporting mode. TestReportMode's possible values are:
+#		+ 'Summary': Summary of the tested test cases.
+#		+ 'Environment': Hardware and software info.
+#		+ 'TestCases': Test case report.
+#		+ 'FullReport': Set of all above ones.
+#		+ Example 'TestReportMode= Summary TestCases'
+#
+# 	- CreateTestReport setting controls report creation mode
+#		+ YES, Test report will created.
+#		+ NO, No Test report.
+#
+# 	- File path indicates the base path of the test report.
+# 	- File name indicates the name of the test report.
+#
+# 	- File format indicates the type of the test report.
+#		+ TXT, Test report file will be txt type, for example 'TestReport.txt'.
+#		+ HTML, Test report will be html type, for example 'TestReport.html'.
+#   + XML, Test report will be xml type, for example 'TestReport.xml'.
+#          Note, that xml format is available only when output is set to FILE.
+#
+# 	- File output indicates output source of the test report.
+#		+ FILE, Test report logging to file.
+#		+ RDEBUG, Test report logging to using rdebug.
+#
+# 	- File Creation Mode indicates test report overwriting if file exist.
+#		+ OVERWRITE, Overwrites if the Test report file exist.
+#		+ APPEND, Continue logging after the old Test report information if
+#                 report exist.
+# 	- Sets a device reset module's dll name(Reboot).
+#		+ If Nokia specific reset module is not available or it is not correct one
+#		  StifHWResetStub module may use as a template for user specific reset
+#		  module.
+# 	- Sets STIF test measurement disable options. e.g. pluging1 and pluging2 disablation
+#		DisableMeasurement= stifmeasurementplugin01 stifmeasurementplugin02
+#
+
+[Engine_Defaults]
+
+TestReportMode= FullReport    # Possible values are: 'Empty', 'Summary', 'Environment',
+                                                     'TestCases' or 'FullReport'
+
+CreateTestReport= YES         # Possible values: YES or NO
+
+TestReportFilePath= C:\LOGS\TestFramework\
+TestReportFileName= TestReport
+
+TestReportFormat= TXT         # Possible values: TXT, HTML or XML
+TestReportOutput= FILE        # Possible values: FILE or RDEBUG
+TestReportFileCreationMode= OVERWRITE # Possible values: OVERWRITE or APPEND
+
+DeviceResetDllName= StifResetForNokia.dll # e.g. 'StifHWResetStub.dll' for user specific reseting
+
+DisableMeasurement= stifmeasurementdisablenone  # Possible values are:
+              # 'stifmeasurementdisablenone', 'stifmeasurementdisableall'
+              # 'stifmeasurementplugin01', 'stifmeasurementplugin02',
+              # 'stifmeasurementplugin03', 'stifmeasurementplugin04',
+              # 'stifmeasurementplugin05' or 'stifbappeaprofiler'
+
+Timeout= 0                    # Default timeout value for each test case. In milliseconds
+UITestingSupport= YES        # Possible values: YES or NO
+SeparateProcesses= YES       # Possible values: YES or NO (default: NO)
+[End_Defaults]
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+
+
+
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+# Module configurations start
+# Modules are added between module tags
+# tags. Module name is specified after ModuleName= tag, like
+# ModuleName= XXXXXXXXX
+# Modules might have initialisation file, specified as
+# IniFile= c:\testframework\YYYYYY
+# Modules might have several configuration files, like
+# TestCaseFile= c:\testframework\NormalCases.txt
+# TestCaseFile= c:\testframework\SmokeCases.txt
+# TestCaseFile= c:\testframework\ManualCases.txt
+
+# (TestCaseFile is synonym for old term ConfigFile)
+
+# Following case specifies demo module settings. Demo module
+# does not read any settings from file, so tags 
+# IniFile and TestCaseFile are not used.
+# In the simplest case it is enough to specify only the
+# name of the test module when adding new test module
+
+[New_Module]
+ModuleName= testcombiner
+TestCaseFile= c:\testframework\UTLmkAddEdit.cfg
+[End_Module]
+
+
+# Load testmoduleXXX, optionally with initialization file and/or test case files
+#[New_Module]
+#ModuleName= testmodulexxx
+
+#TestModuleXXX used initialization file
+#IniFile= c:\testframework\init.txt
+
+#TestModuleXXX used configuration file(s)
+#TestCaseFile= c:\testframework\testcases1.cfg
+#TestCaseFile= c:\testframework\testcases2.cfg
+#TestCaseFile= c:\testframework\manualtestcases.cfg
+
+#[End_Module]
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+
+
+
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+# Set STIF logging overwrite parameters for Logger.
+# 	Hardware and emulator environment logging path and styles can
+# 	be configured from here to overwrite the Logger's implemented values.
+#	
+#	Settings description:
+#	- Indicates option for creation log directory/directories. If log directory/directories
+#         is/are not created by user they will make by software.
+#		+ YES, Create log directory/directories if not allready exist.
+#		+ NO, Log directory/directories not created. Only created one is used.
+#
+#	- Overwrite emulator path setting.
+#		+ Example: If 'EmulatorBasePath= C:\LOGS\TestFramework\' and in code is defined 
+#		           Logger's path 'D:\\LOGS\\Module\\' with those definition the path
+#		           will be 'C:\LOGS\TestFramework\LOGS\Module\'
+#
+#	- Overwrite emulator's logging format.
+#		+ TXT, Log file(s) will be txt type(s), for example 'Module.txt'.
+#		+ HTML, Log file(s) will be html type(s), for example 'Module.html'.
+#
+#	- Overwrited emulator logging output source.
+#		+ FILE, Logging to file(s).
+#		+ RDEBUG, Logging to using rdebug(s).
+#
+#	- Overwrite hardware path setting (Same description as above in emulator path).
+#	- Overwrite hardware's logging format(Same description as above in emulator format).
+#	- Overwrite hardware's logging output source(Same description as above in emulator output).
+#
+#	- File Creation Mode indicates file overwriting if file exist.
+#		+ OVERWRITE, Overwrites if file(s) exist.
+#		+ APPEND, Continue logging after the old logging information if file(s) exist.
+#
+#	- Will thread id include to the log filename.
+#		+ YES, Thread id to log file(s) name, Example filename 'Module_b9.txt'.
+#		+ NO, No thread id to log file(s), Example filename 'Module.txt'.
+#
+#	- Will time stamps include the to log file.
+#		+ YES, Time stamp added to each line in log file(s). Time stamp is 
+#                 for example'12.Nov.2003 115958    LOGGING INFO'
+#		+ NO, No time stamp(s).
+#
+#	- Will line breaks include to the log file.
+#		+ YES, Each logging event includes line break and next log event is in own line.
+#		+ NO, No line break(s).
+#
+#	- Will event ranking include to the log file.
+#		+ YES, Event ranking number added to each line in log file(s). Ranking number
+#                 depends on environment's tics, for example(includes time stamp also)
+#                 '012   12.Nov.2003 115958    LOGGING INFO'
+#		+ NO, No event ranking.
+#
+#	- Will write log file in unicode format.
+#		+ YES, Log file will be written in unicode format
+#		+ NO, Log will be written as normal, not unicode, file.
+#
+
+[Logger_Defaults]
+
+#NOTE: If you want to set Logger using next setting(s) remove comment(s)'#'
+#NOTE: TestEngine and TestServer logging settings cannot change here
+
+#CreateLogDirectories= YES    # Possible values: YES or NO
+
+#EmulatorBasePath= C:\LOGS\TestFramework\
+#EmulatorFormat= HTML         # Possible values: TXT or HTML
+#EmulatorOutput= FILE         # Possible values: FILE or RDEBUG
+
+#HardwareBasePath= D:\LOGS\TestFramework\
+#HardwareFormat= HTML         # Possible values: TXT or HTML
+#HardwareOutput= FILE         # Possible values: FILE or RDEBUG
+
+#FileCreationMode= OVERWRITE  # Possible values: OVERWRITE or APPEND
+
+#ThreadIdToLogFile= YES       # Possible values: YES or NO
+#WithTimeStamp= YES           # Possible values: YES or NO
+#WithLineBreak= YES           # Possible values: YES or NO
+#WithEventRanking= YES        # Possible values: YES or NO
+
+#FileUnicode= YES             # Possible values: YES or NO
+#AddTestCaseTitle= YES        # Possible values: YES or NO
+[End_Logger_Defaults]
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+
+# End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/loc_pub/landmarks_ui_addedit_api/tsrc/sis/test_addedit.pkg	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,35 @@
+;
+; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of "Eclipse Public License v1.0"
+; which accompanies this distribution, and is available
+; at the URL "http://www.eclipse.org/legal/epl-v10.html".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description:    LandmarkUi Content File   
+;
+&EN
+
+; Installation header
+; Only one component name as we only support English
+; UID is the main app's UID
+
+#{"loc_addedit"},(0x20015B16),1,0,0,TYPE=SA
+[0x101F7961],3,*,*,{"Series60ProductID"}
+
+; Non-localised vendor name
+:"Nokia Corporation"
+
+; Localised vendor names
+%{"Nokia Corporation"}
+
+; Files to install and to where
+"\epoc32\release\armv5\urel\UTapplmkaddedit.dll"-"c:\sys\bin\UTapplmkaddedit.dll"
+"..\conf\ui_lmkaddedit.cfg"-"C:\testframework\ui_lmkaddedit.cfg"
+"..\conf\UTlmkaddedit.cfg"-"C:\testframework\UTlmkaddedit.cfg"
+"..\init\testframework.ini"-"C:\testframework\testframework.ini"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/loc_pub/landmarks_ui_addedit_api/tsrc/src/UTapplmkaddedit.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,206 @@
+/*
+* 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:    LandmarkUi Content File
+*
+*/
+
+
+
+
+
+
+
+
+// INCLUDE FILES
+#include <Stiftestinterface.h>
+#include "UTAppLmkAddEdit.h"
+#include <SettingServerClient.h>
+
+// EXTERNAL DATA STRUCTURES
+//extern  ?external_data;
+
+// EXTERNAL FUNCTION PROTOTYPES
+//extern ?external_function( ?arg_type,?arg_type );
+
+// CONSTANTS
+//const ?type ?constant_var = ?constant;
+
+// MACROS
+//#define ?macro ?macro_def
+
+// LOCAL CONSTANTS AND MACROS
+//const ?type ?constant_var = ?constant;
+//#define ?macro_name ?macro_def
+
+// MODULE DATA STRUCTURES
+//enum ?declaration
+//typedef ?declaration
+
+// LOCAL FUNCTION PROTOTYPES
+//?type ?function_name( ?arg_type, ?arg_type );
+
+// FORWARD DECLARATIONS
+//class ?FORWARD_CLASSNAME;
+
+// ============================= LOCAL FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// ?function_name ?description.
+// ?description
+// Returns: ?value_1: ?description
+//          ?value_n: ?description_line1
+//                    ?description_line2
+// -----------------------------------------------------------------------------
+//
+/*
+?type ?function_name(
+    ?arg_type arg,  // ?description
+    ?arg_type arg)  // ?description
+    {
+
+    ?code  // ?comment
+
+    // ?comment
+    ?code
+    }
+*/
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CUTAppLmkAddEdit::CUTAppLmkAddEdit
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+CUTAppLmkAddEdit::CUTAppLmkAddEdit(
+    CTestModuleIf& aTestModuleIf ):
+        CScriptBase( aTestModuleIf )
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CUTAppLmkAddEdit::ConstructL
+// Symbian 2nd phase constructor can leave.
+// -----------------------------------------------------------------------------
+//
+void CUTAppLmkAddEdit::ConstructL()
+    {
+    //Read logger settings to check whether test case name is to be
+    //appended to log file name.
+    RSettingServer settingServer;
+    TInt ret = settingServer.Connect();
+    if(ret != KErrNone)
+        {
+        User::Leave(ret);
+        }
+    // Struct to StifLogger settigs.
+    TLoggerSettings loggerSettings;
+    // Parse StifLogger defaults from STIF initialization file.
+    ret = settingServer.GetLoggerSettings(loggerSettings);
+    if(ret != KErrNone)
+        {
+        User::Leave(ret);
+        }
+    // Close Setting server session
+    settingServer.Close();
+
+    TFileName logFileName;
+
+    if(loggerSettings.iAddTestCaseTitle)
+        {
+        TName title;
+        TestModuleIf().GetTestCaseTitleL(title);
+        logFileName.Format(KUTAppLmkAddEditLogFileWithTitle, &title);
+        }
+    else
+        {
+        logFileName.Copy(KUTAppLmkAddEditLogFile);
+        }
+
+    iLog = CStifLogger::NewL( KUTAppLmkAddEditLogPath,
+                          logFileName,
+                          CStifLogger::ETxt,
+                          CStifLogger::EFile,
+                          EFalse );
+
+    SendTestClassVersion();
+    }
+
+// -----------------------------------------------------------------------------
+// CUTAppLmkAddEdit::NewL
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+CUTAppLmkAddEdit* CUTAppLmkAddEdit::NewL(
+    CTestModuleIf& aTestModuleIf )
+    {
+    CUTAppLmkAddEdit* self = new (ELeave) CUTAppLmkAddEdit( aTestModuleIf );
+
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop();
+
+    return self;
+
+    }
+
+// Destructor
+CUTAppLmkAddEdit::~CUTAppLmkAddEdit()
+    {
+
+    // Delete resources allocated from test methods
+    Delete();
+
+    // Delete logger
+    delete iLog;
+
+    }
+
+//-----------------------------------------------------------------------------
+// CUTAppLmkAddEdit::SendTestClassVersion
+// Method used to send version of test class
+//-----------------------------------------------------------------------------
+//
+void CUTAppLmkAddEdit::SendTestClassVersion()
+	{
+	TVersion moduleVersion;
+	moduleVersion.iMajor = TEST_CLASS_VERSION_MAJOR;
+	moduleVersion.iMinor = TEST_CLASS_VERSION_MINOR;
+	moduleVersion.iBuild = TEST_CLASS_VERSION_BUILD;
+
+	TFileName moduleName;
+	moduleName = _L("UTAppLmkAddEdit.dll");
+
+	TBool newVersionOfMethod = ETrue;
+	TestModuleIf().SendTestModuleVersion(moduleVersion, moduleName, newVersionOfMethod);
+	}
+
+// ========================== OTHER EXPORTED FUNCTIONS =========================
+
+// -----------------------------------------------------------------------------
+// LibEntryL is a polymorphic Dll entry point.
+// Returns: CScriptBase: New CScriptBase derived object
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CScriptBase* LibEntryL(
+    CTestModuleIf& aTestModuleIf ) // Backpointer to STIF Test Framework
+    {
+
+    return ( CScriptBase* ) CUTAppLmkAddEdit::NewL( aTestModuleIf );
+
+    }
+
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/loc_pub/landmarks_ui_addedit_api/tsrc/src/UTapplmkaddeditblocks.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,575 @@
+/*
+* 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:    LandmarkUi Content File
+*
+*/
+
+
+
+
+
+
+
+
+// [INCLUDE FILES] - do not remove
+#include <e32svr.h>
+#include <StifParser.h>
+#include <Stiftestinterface.h>
+#include "UTAppLmkAddEdit.h"
+
+#include <CLmkEditorDlg.h>
+#include <Epos_CPosLandmarkDatabase.h>
+#include <Epos_Landmarks.h>
+#include <coecntrl.h>
+#include <lbsposition.h>
+#include "UTAppLmkEditorEngine.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 ===============================
+
+// -----------------------------------------------------------------------------
+// CUTAppLmkAddEdit::Delete
+// Delete here all resources allocated and opened from test methods.
+// Called from destructor.
+// -----------------------------------------------------------------------------
+//
+void CUTAppLmkAddEdit::Delete()
+    {
+
+    }
+
+// -----------------------------------------------------------------------------
+// CUTAppLmkAddEdit::RunMethodL
+// Run specified method. Contains also table of test mothods and their names.
+// -----------------------------------------------------------------------------
+//
+TInt CUTAppLmkAddEdit::RunMethodL(
+    CStifItemParser& aItem )
+    {
+
+    static TStifFunctionInfo const KFunctions[] =
+        {
+        // Copy this line for every implemented function.
+        // First string is the function name used in TestScripter script file.
+        // Second is the actual implementation member function.
+		ENTRY( "Example", CUTAppLmkAddEdit::ExampleL ),
+		ENTRY( "TestNewL", CUTAppLmkAddEdit::TestNewL ),
+		ENTRY( "TestNew2L", CUTAppLmkAddEdit::TestNew2L ),
+		ENTRY( "TestExecuteLD", CUTAppLmkAddEdit::TestExecuteLD ),
+		ENTRY( "TestSetMopParent", CUTAppLmkAddEdit::TestSetMopParentL ),
+		ENTRY( "TestSetHelpContext", CUTAppLmkAddEdit::TestSetHelpContextL ),
+		ENTRY( "TestDisableMapAndNaviOptions", CUTAppLmkAddEdit::TestDisableMapAndNaviOptionsL ),
+        //ADD NEW ENTRY HERE
+        // [test cases entries] - Do not remove
+
+        };
+
+    const TInt count = sizeof( KFunctions ) /
+                        sizeof( TStifFunctionInfo );
+
+    return RunInternalL( KFunctions, count, aItem );
+
+    }
+
+// -----------------------------------------------------------------------------
+// CUTAppLmkAddEdit::ExampleL
+// Example test method function.
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+TInt CUTAppLmkAddEdit::ExampleL( CStifItemParser& aItem )
+    {
+
+    // Print to UI
+    _LIT( KUTAppLmkAddEdit, "UTAppLmkAddEdit" );
+    _LIT( KExample, "In Example" );
+    TestModuleIf().Printf( 0, KUTAppLmkAddEdit, 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, KUTAppLmkAddEdit,
+                                KParam, i, &string );
+        i++;
+        }
+
+    return KErrNone;
+
+    }
+
+// -----------------------------------------------------------------------------
+// CUTAppLmkAddEdit::TestNewL
+// This function tests NewL based on landmark id, which exist in the database
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+TInt CUTAppLmkAddEdit::TestNewL( CStifItemParser& aItem )
+	{
+	TInt result = KErrNone;
+
+	CPosLandmarkDatabase* ilDb = CPosLandmarkDatabase::OpenL();
+	CPosLmOperation* operation = NULL;
+	
+	if( ilDb->IsInitializingNeeded() )
+		{
+		operation = ilDb->InitializeL();
+		operation->ExecuteL();
+		}
+	
+	CLmkEditorDlg::TLmkEditorParams editParams;
+	editParams.iAttributes = CLmkEditorDlg::ELmkAll;
+	editParams.iEditorMode = CLmkEditorDlg::ELmkEditor;
+	
+	CPosLandmark* LmkEditor = CPosLandmark::NewL();
+	CleanupStack::PushL( LmkEditor );
+	TInt aCase = 0;
+	CLmkEditorDlg* editDlg= NULL;	
+	aItem.GetNextInt(aCase);
+	
+	switch(aCase)
+		{
+		default:
+		case DEFAULT:
+			TRAPD(error, editDlg = CLmkEditorDlg::NewL(*ilDb,*LmkEditor,editParams));
+			if(error != KErrNone||!(editDlg))
+				{
+				result = KErrGeneral;
+				iLog->Log(_L("FAILED: NewL returns %d"), error);
+				}
+			else
+				{
+				iLog->Log(_L("PASSED: NewL returns expected results"));
+				}
+			CleanupStack::PushL( editDlg );
+			CleanupStack::PopAndDestroy(2);
+			break;
+			
+		case NULL_DB:
+			delete ilDb;
+			ilDb = NULL;
+			TRAPD(error1, editDlg = CLmkEditorDlg::NewL(*ilDb,*LmkEditor,editParams));
+			if(error1 != KErrNone||!(editDlg))
+				{
+				result = KErrGeneral;
+				iLog->Log(_L("FAILED: NewL returns %d"), error1);
+				}
+			else
+				{
+				iLog->Log(_L("PASSED: NewL returns expected results"));
+				}
+			CleanupStack::PushL( editDlg );
+			CleanupStack::PopAndDestroy(2);
+			break;
+		
+		case NON_EXISTING_LM:
+			TRAPD(error2, editDlg = CLmkEditorDlg::NewL(*ilDb,NULL,editParams));
+			if(error2 != KErrNotFound)
+				{
+				result = KErrGeneral;
+				iLog->Log(_L("FAILED: NewL returns %d"), error2);
+				}
+			else
+				{
+				iLog->Log(_L("PASSED: NewL returns expected results"));
+				}					
+			CleanupStack::PopAndDestroy();
+			break;
+		}
+
+	//ReleaseLandmarkResources();
+	
+	if(ilDb)
+		{
+		delete ilDb; 
+		ilDb=NULL;
+		}
+	if(operation)
+		{
+		delete operation;
+		operation=NULL;
+		}
+	return result;
+	}
+// -----------------------------------------------------------------------------
+// CUTAppLmkAddEdit::TestNew2L
+// This function tests NewL based on the landmark object which does not exist
+// the database
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+TInt CUTAppLmkAddEdit::TestNew2L( CStifItemParser& /*aItem*/ )
+	{
+	//Create an empty landmark object
+	CPosLandmark* lmk = CPosLandmark::NewL();
+	CleanupStack::PushL(lmk);
+	//Specify the various fields for landmark
+	TLocality locality;
+	locality.SetAccuracy(32.2,32.4);
+	locality.SetCoordinate(56,25);
+	locality.SetHorizontalAccuracy(33.1);
+	locality.SetVerticalAccuracy(24.2);
+	lmk->SetLandmarkNameL(_L("Forum Mall"));
+	lmk->SetLandmarkDescriptionL(_L("Shopping Complex"));
+	//Populate the landmark with the specified field information
+	lmk->SetPositionL(locality);
+	//lmk->SetLandmarkIdL( 1 );
+	
+	CPosLandmarkDatabase* ilDb = CPosLandmarkDatabase::OpenL();
+	//CleanupStack::PushL(ilDb);
+	 ilDb->AddLandmarkL(*lmk);
+	CPosLmOperation* operation = NULL;
+	if ( ilDb->IsInitializingNeeded() )
+		{
+		operation = ilDb->InitializeL();
+		operation->ExecuteL();
+		}
+	
+	CLmkEditorDlg::TLmkEditorParams editParams;
+	editParams.iAttributes = CLmkEditorDlg::ELmkOnlyName;
+	editParams.iEditorMode = CLmkEditorDlg::ELmkViewer;
+	TPosLmItemId lmItem = lmk->LandmarkId();
+	CLmkEditorDlg* editDlg = CLmkEditorDlg::NewL(*ilDb,lmItem,editParams);
+	CleanupStack::PushL( editDlg );
+	
+	//ReleaseLandmarkResources();
+	CleanupStack::PopAndDestroy(2); //ilDb, lmk
+	//delete ilDb; ilDb=NULL;
+	delete operation; operation=NULL;
+	return KErrNone;
+	}
+
+// -----------------------------------------------------------------------------
+// CUTAppLmkAddEdit::TestExecuteLD
+// This function tests the launching of the dialog
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+TInt CUTAppLmkAddEdit::TestExecuteLD( CStifItemParser& aItem )
+	{
+	TInt result = KErrNone;
+	TPosLmItemId lmItem = 0;
+	TInt aCase = 0;
+
+	CPosLandmarkDatabase* ilDb = CPosLandmarkDatabase::OpenL();
+	CPosLmOperation* operation = NULL;
+
+	if ( ilDb->IsInitializingNeeded() )
+	{
+		operation = ilDb->InitializeL();
+		operation->ExecuteL();
+	}
+
+
+	CPosLandmark* landmark = CPosLandmark::NewL();
+	CleanupStack::PushL( landmark );
+	
+	CLmkEditorDlg::TLmkEditorParams editParams;	
+	aItem.GetNextInt(aCase);
+	switch(aCase)
+		{
+		default:
+		case 0:
+			editParams.iAttributes = CLmkEditorDlg::ELmkAll;
+			editParams.iEditorMode = CLmkEditorDlg::ELmkEditor;
+			break;
+			
+		case 1:
+			editParams.iAttributes = CLmkEditorDlg::ELmkAll;
+			editParams.iEditorMode = CLmkEditorDlg::ELmkViewer;
+			break;	
+		}
+	CLmkEditorDlg* editDlg = CLmkEditorDlg::NewL(*ilDb,*landmark,editParams);
+	CleanupStack::PushL( editDlg );
+
+	aItem.GetNextInt(aCase);
+
+	switch(aCase)
+		{
+		default:
+		case EDIT_MODE://Edit mode
+			TRAPD(error, result=editDlg->ExecuteLD());
+			if(error != 0 )
+				{
+				iLog->Log(_L("FAILED: ExecuteLD returns %d in Edit mode"), error);
+				result = KErrGeneral;
+				}
+			else
+				{
+				iLog->Log(_L("PASSED: ExecuteLD returns %d in Edit mode"), result);
+				result = KErrNone;
+				}
+			break;
+			
+		case VIEW_MODE: //ViewMode
+			TRAPD(error1, result=editDlg->ExecuteLD());
+			if(error1 != 0)
+				{
+				iLog->Log(_L("FAILED: ExecuteLD returns %d in View mode"), error1);	
+				result = KErrGeneral;
+				}
+			else
+				result = KErrNone;				
+			break;
+			
+		case 2:
+//			TestModuleIf().SetExitReason(CTestModuleIf::EPanic ,47);
+//			DrainMemory();
+//			TRAPD(error2, result=editDlg->ExecuteLD());
+//			RestoreMemory();
+//			if(result != 0)
+//				iLog->Log(_L("FAILED: ExecuteLD returns %d in Edit mode under low memory condition"), result);
+			break;				
+		}
+	
+	//ReleaseLandmarkResources();
+	CleanupStack::Pop(2);
+		
+	if(ilDb)
+		{ 
+		delete ilDb; 
+		ilDb=NULL;
+		}
+	if(operation)
+		{
+		delete operation;
+		operation=NULL;
+		}
+	return result;
+	}
+// -----------------------------------------------------------------------------
+// CUTAppLmkAddEdit::TestSetMopParent
+// This function tests setting up of the context
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+
+ TInt CUTAppLmkAddEdit::TestSetMopParentL( CStifItemParser& /*aItem*/ )
+  {
+  	CPosLandmarkDatabase* ilDb = CPosLandmarkDatabase::OpenL();
+	CPosLmOperation* operation = NULL;
+	if ( ilDb->IsInitializingNeeded() )
+		{
+		operation = ilDb->InitializeL();
+		operation->ExecuteL();
+		}
+
+	CPosLandmark* landmark = CPosLandmark::NewL();
+	CleanupStack::PushL( landmark );
+
+	CLmkEditorDlg::TLmkEditorParams editParams;
+	editParams.iAttributes = CLmkEditorDlg::ELmkAll;
+	editParams.iEditorMode = CLmkEditorDlg::ELmkEditor;
+
+	engine = new (ELeave) CLmkAddEditEngine;
+
+	CLmkEditorDlg* editDlg = CLmkEditorDlg::NewL(*ilDb,*landmark,editParams);
+	CleanupStack::PushL( editDlg );
+	
+	TRAPD(result,editDlg->SetMopParent(engine));
+
+	//ReleaseLandmarkResources();
+	CleanupStack::Pop(2);
+
+	delete ilDb; ilDb=NULL;
+	delete operation; 
+	operation=NULL;
+	
+	return KErrNone;
+  }
+ // -----------------------------------------------------------------------------
+ // CUTAppLmkAddEdit::TestSetHelpContext
+ // This function tests setting up of the help context
+ // (other items were commented in a header).
+ // -----------------------------------------------------------------------------
+ //
+ TInt CUTAppLmkAddEdit::TestSetHelpContextL( CStifItemParser& /*aItem*/ )
+ {
+	CPosLandmarkDatabase* ilDb = CPosLandmarkDatabase::OpenL();
+	CPosLmOperation* operation = NULL;
+	if ( ilDb->IsInitializingNeeded() )
+		{
+		operation = ilDb->InitializeL();
+		operation->ExecuteL();
+		}
+	
+	CPosLandmark* landmark = CPosLandmark::NewL();
+	CleanupStack::PushL( landmark );
+	
+	CLmkEditorDlg::TLmkEditorParams editParams;
+	editParams.iAttributes = CLmkEditorDlg::ELmkAll;
+	editParams.iEditorMode = CLmkEditorDlg::ELmkEditor;
+	
+	TCoeHelpContext aContext;
+	CLmkEditorDlg* editDlg = CLmkEditorDlg::NewL(*ilDb,*landmark,editParams);
+	CleanupStack::PushL( editDlg );
+	
+	editDlg->SetHelpContext(aContext);
+	
+	//ReleaseLandmarkResources();
+	CleanupStack::PopAndDestroy(2);
+	
+	delete ilDb; ilDb=NULL;
+	delete operation; operation=NULL;
+	return KErrNone;
+ }
+ // -----------------------------------------------------------------------------
+ // CUTAppLmkAddEdit::TestDisableMapAndNaviOptions
+ // This function tests disabling the Map and Navigation related Menu Options
+ // (other items were commented in a header).
+ // -----------------------------------------------------------------------------
+ //
+ TInt CUTAppLmkAddEdit::TestDisableMapAndNaviOptionsL( CStifItemParser& /*aItem*/ )
+ {
+	// #ifdef __SERIES60_31__
+	CPosLandmarkDatabase* ilDb = CPosLandmarkDatabase::OpenL();
+	CPosLmOperation* operation = NULL;
+	if ( ilDb->IsInitializingNeeded() )
+		{
+		operation = ilDb->InitializeL();
+		operation->ExecuteL();
+		}
+	
+	CPosLandmark* landmark = CPosLandmark::NewL();
+	CleanupStack::PushL( landmark );
+	
+	CLmkEditorDlg::TLmkEditorParams editParams;
+	editParams.iAttributes = CLmkEditorDlg::ELmkAll;
+	editParams.iEditorMode = CLmkEditorDlg::ELmkEditor;
+	
+	CLmkEditorDlg* editDlg = CLmkEditorDlg::NewL(*ilDb,*landmark,editParams);
+	editDlg->DisableMapAndNavigationMenuOptions();
+	TRAP_IGNORE(editDlg->ExecuteLD());
+	CleanupStack::PopAndDestroy();
+	//ReleaseLandmarkResources();
+	delete ilDb;
+	delete operation;
+	//	#endif
+	return KErrNone;
+ }
+
+
+// -----------------------------------------------------------------------------
+// CUTAppLmkAddEdit::?member_function
+// ?implementation_description
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+/*
+TInt CUTAppLmkAddEdit::?member_function(
+   CItemParser& aItem )
+   {
+
+   ?code
+
+   }
+*/
+ // -----------------------------------------------------------------------------
+ // CCSatelliteUITest::DrainMemory
+ // Eats the memory
+ // -----------------------------------------------------------------------------
+ //
+ void CUTAppLmkAddEdit::DrainMemory()
+ 	{
+     for( TInt i = 0; i < MAX_EXPONENT1; i++ )
+     {
+         cells[i] = NULL;
+     }
+     // consume all available heap memory
+     TInt j=0;
+    	for (TInt i = KMaxTInt/2-1; i > 0; )
+ 	{
+ 		cells[j] = User::Alloc(i);
+ 		if( !( cells[j] ) )
+ 		{
+ 		    i/=2;
+ 		}
+ 		else
+ 		{
+ 		    j++;
+ 		}
+ 	}
+ 	}
+ // -----------------------------------------------------------------------------
+ // CCSatelliteUITest::RestoreMemory
+ // Restores the memory
+ // -----------------------------------------------------------------------------
+ //
+ void CUTAppLmkAddEdit::RestoreMemory()
+ 	{
+  	for ( TInt cellIndex = 0; cellIndex < MAX_EXPONENT1; cellIndex++ )
+ 		{
+ 			 if ( cells[cellIndex] )
+ 				{
+ 				   User::Free( cells[cellIndex] );
+ 			   }
+ 		 }
+ 	}
+ // -----------------------------------------------------------------------------
+
+// ========================== OTHER EXPORTED FUNCTIONS =========================
+// None
+
+//  [End of File] - Do not remove
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/loc_pub/landmarks_ui_addedit_api/tsrc/src/UTapplmkeditorcontainer.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,299 @@
+/*
+* 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:    LandmarksUi Content File -
+*
+*/
+
+
+
+
+
+
+/*
+Change History
+22-05-2007	To resolve tool IDO warnings	Komala Nagaraju
+*/
+
+// INCLUDE FILES
+#include "UTAppLmkEditorContainer.h"
+
+#include <eikrted.h>
+#include <barsread.h>
+#include <txtrich.h>
+#include <aknutils.h>
+#include <UTAppLmkEditor.rsg>
+#include <fontids.hrh>
+#include <gulfont.h>
+#include <aknnotewrappers.h>
+
+
+// ================= MEMBER FUNCTIONS =======================
+
+// ---------------------------------------------------------
+// CUTAppLmkEditorContainer::ConstructL(const TRect& aRect)
+// EPOC two phased constructor
+// ---------------------------------------------------------
+//
+void CUTAppLmkEditorContainer::ConstructL(const TRect& aRect)
+    {
+    CreateWindowL();
+    Window().SetShadowDisabled(EFalse);
+
+    SetBlank();
+
+    // construct main text display window
+    TFontSpec fontspec = AknLayoutUtils::FontFromId(EAknLogicalFontSecondaryFont)->FontSpecInTwips();
+
+    TCharFormat defaultCharFormat( fontspec.iTypeface.iName, fontspec.iHeight );
+    TCharFormatMask defaultCharFormatMask;
+
+    defaultCharFormatMask.SetAttrib(EAttFontTypeface);
+    defaultCharFormatMask.SetAttrib(EAttFontHeight);
+
+    iParaFormat = CParaFormatLayer::NewL();
+    iCharFormat = CCharFormatLayer::NewL(defaultCharFormat,defaultCharFormatMask);
+
+    iRichText = CRichText::NewL(iParaFormat, iCharFormat);
+
+    iOutputWindow = new (ELeave) CEikRichTextEditor(TGulBorder(TGulBorder::ENone));
+    iOutputWindow->ConstructL(this,0,0,EEikEdwinOwnsWindow|EEikEdwinInclusiveSizeFixed|
+        EEikEdwinKeepDocument|EEikEdwinUserSuppliedText|
+        EEikEdwinLineCursor|EEikEdwinAlwaysShowSelection);
+
+    SetRect(aRect);
+    ActivateL();
+    }
+
+// Destructor
+CUTAppLmkEditorContainer::~CUTAppLmkEditorContainer()
+    {
+    delete iParaFormat;
+    iParaFormat = NULL;
+
+    delete iCharFormat;
+    iCharFormat = NULL;
+
+    delete iOutputWindow;
+    iOutputWindow = NULL;
+
+    delete iRichText;
+    iRichText = NULL;
+    }
+
+// ---------------------------------------------------------
+// CUTAppLmkEditorContainer::SizeChanged()
+// Called by framework when the view size is changed
+// ---------------------------------------------------------
+//
+void CUTAppLmkEditorContainer::SizeChanged()
+{
+    TRAP_IGNORE(SizeChangedL());
+}
+
+// ---------------------------------------------------------
+// CUTAppLmkEditorContainer::SizeChangedL()
+// Methods that can leave and are needed by SizeChanged
+// are collected into this method.
+// ---------------------------------------------------------
+//
+void CUTAppLmkEditorContainer::SizeChangedL()
+{
+    TSize outputRect;
+	AknLayoutUtils::LayoutMetricsSize(AknLayoutUtils::EMainPane, outputRect);
+
+    iOutputWindow->SetAknEditorFlags(EAknEditorFlagEnableScrollBars);
+    iOutputWindow->CreateScrollBarFrameL();
+    iOutputWindow->ScrollBarFrame()->SetScrollBarVisibilityL(CEikScrollBarFrame::EOff,CEikScrollBarFrame::EAuto);
+
+    iOutputWindow->SetDocumentContentL(*iRichText,CEikEdwin::EUseText);
+    iOutputWindow->SetRect(outputRect);
+    iOutputWindow->ActivateL();
+    iOutputWindow->SetFocus(ETrue);
+}
+
+// ---------------------------------------------------------
+// CUTAppLmkEditorContainer::CountComponentControls() const
+// ---------------------------------------------------------
+//
+TInt CUTAppLmkEditorContainer::CountComponentControls() const
+    {
+    return 0; // return nbr of controls inside this container
+    }
+
+// ---------------------------------------------------------
+// CUTAppLmkEditorContainer::ComponentControl(TInt aIndex) const
+// ---------------------------------------------------------
+//
+CCoeControl* CUTAppLmkEditorContainer::ComponentControl(TInt /*aIndex*/) const
+    {
+    return NULL;
+    }
+
+// ---------------------------------------------------------
+// CUTAppLmkEditorContainer::Draw(const TRect& aRect) const
+// ---------------------------------------------------------
+//
+void CUTAppLmkEditorContainer::Draw(const TRect& aRect) const
+    {
+    CWindowGc& gc = SystemGc();
+    gc.Clear(aRect);    }
+
+// ---------------------------------------------------------
+// CUTAppLmkEditorContainer::HandleControlEventL(
+//     CCoeControl* aControl,TCoeEvent aEventType)
+// ---------------------------------------------------------
+//
+void CUTAppLmkEditorContainer::HandleControlEventL(
+    CCoeControl* /*aControl*/,TCoeEvent /*aEventType*/)
+    {
+    }
+
+
+// ---------------------------------------------------------
+// CUTAppLmkEditorContainer::SetFontStyle(TUint aFontStyle)
+// Set font style for output window.
+// ---------------------------------------------------------
+//
+void CUTAppLmkEditorContainer::SetFontStyle(TUint aFontStyle)
+{
+    // Set current main window style to match that requested
+    UpdateFontAttribute(aFontStyle, CEikGlobalTextEditor::EBold);
+    UpdateFontAttribute(aFontStyle, CEikGlobalTextEditor::EItalic);
+    UpdateFontAttribute(aFontStyle, CEikGlobalTextEditor::EUnderline);
+}
+
+
+// ---------------------------------------------------------
+// CUTAppLmkEditorContainer::UpdateFontAttribute(TUint aFontStyle,
+//                                         TInt aAttribute)
+// Do the real work of setting the font style.
+// ---------------------------------------------------------
+//
+void CUTAppLmkEditorContainer::UpdateFontAttribute(TUint aFontStyle,
+                                             TInt aAttribute)
+{
+    // Ensure an individual attribute is on or off as requested
+    if ((aFontStyle & aAttribute) != (iFontStyle & aAttribute))
+    {
+        TRAP_IGNORE(iOutputWindow->BoldItalicUnderlineEventL(aAttribute));
+        iFontStyle ^= aAttribute;
+    }
+}
+
+
+// ---------------------------------------------------------
+// CUTAppLmkEditorContainer::PrintNotify(const TDesC& aDes, TUint aFontStyle)
+// Print text into output window.
+// ---------------------------------------------------------
+//
+void CUTAppLmkEditorContainer::PrintNotify(const TDesC& aDes, TUint aFontStyle)
+{
+    SetFontStyle(aFontStyle);
+    TChar ch;
+
+    for (TInt i = 0; i < aDes.Length(); i++)
+    {
+        RDebug::Print(_L("aDes[i]=%d"), aDes[i]);
+
+        // Add linebreak if character is '\n', otherwise
+        // add character as it is.
+        ch = aDes[i] != 10 ? (TChar)aDes[i] : (TChar)CEditableText::ELineBreak;
+        TRAP_IGNORE(iRichText->InsertL(iOutputWindow->TextLength(), ch));
+    }
+
+    TRAP_IGNORE(iOutputWindow->NotifyNewDocumentL());
+
+    TRAP_IGNORE(iOutputWindow->SetCursorPosL(iOutputWindow->TextLength(), EFalse));
+}
+
+
+// ---------------------------------------------------------
+// CUTAppLmkEditorContainer::PrintNotify(const TDesC8& aDes, TUint aFontStyle)
+// Print text into output window.
+// ---------------------------------------------------------
+//
+void CUTAppLmkEditorContainer::PrintNotify(const TDesC8& aDes, TUint aFontStyle)
+{
+    SetFontStyle(aFontStyle);
+    TChar ch;
+
+    for (TInt i = 0; i < aDes.Length(); i++)
+    {
+        RDebug::Print(_L("aDes[i]=%d"), aDes[i]);
+
+        // Add linebreak if character is '\n', otherwise
+        // add character as it is.
+        ch = aDes[i] != 10 ? (TChar)aDes[i] : (TChar)CEditableText::ELineBreak;
+        TRAP_IGNORE(iRichText->InsertL(iOutputWindow->TextLength(), ch));
+    }
+
+    TRAP_IGNORE(iOutputWindow->NotifyNewDocumentL());
+
+    TRAP_IGNORE(iOutputWindow->SetCursorPosL(iOutputWindow->TextLength(), EFalse));
+}
+
+
+// ---------------------------------------------------------
+// CUTAppLmkEditorContainer::PrintNotify(TInt aIn)
+// Print integer into output window.
+// ---------------------------------------------------------
+//
+void CUTAppLmkEditorContainer::PrintNotify(TInt aInt)
+{
+    // Display number in ascii decimal
+    TBuf<50> buf;
+    buf.Num(aInt);
+    PrintNotify(buf);
+}
+
+// ---------------------------------------------------------
+// CUTAppLmkEditorContainer::OfferKeyEventL(const TKeyEvent& aKeyEvent,
+//                                    TEventCode aType)
+// Handle key event. Only up and down key arrow events are
+// consumed in order to enable scrolling in output window.
+// ---------------------------------------------------------
+//
+TKeyResponse CUTAppLmkEditorContainer::OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType)
+{
+    if(aType != EEventKey)
+        return EKeyWasNotConsumed;
+
+    if(aKeyEvent.iCode == EKeyUpArrow)
+    {
+        iOutputWindow->MoveCursorL(TCursorPosition::EFLineUp,EFalse);
+        return EKeyWasConsumed;
+    }
+
+    if(aKeyEvent.iCode == EKeyDownArrow)
+    {
+        iOutputWindow->MoveCursorL(TCursorPosition::EFLineDown,EFalse);
+        return EKeyWasConsumed;
+    }
+
+    return EKeyWasNotConsumed;
+}
+
+
+// ---------------------------------------------------------
+// CUTAppLmkEditorContainer::ClearOutputWindow()
+// Clear the output window.
+// ---------------------------------------------------------
+//
+void CUTAppLmkEditorContainer::ClearOutputWindow()
+{
+    iRichText->Reset();
+    TRAP_IGNORE(iOutputWindow->NotifyNewDocumentL());
+}
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/loc_pub/landmarks_ui_addedit_api/tsrc/src/UTapplmkeditorengine.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,89 @@
+/*
+* 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:    LandmarkUi Content File
+*
+*/
+
+
+
+
+
+
+
+
+// INCLUDE FILES
+
+#include "UTAppLmkEditorEngine.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
+    }
+*/
+
+TTypeUid::Ptr CLmkAddEditEngine::MopSupplyObject(TTypeUid /*aId*/)
+{
+
+}
+
+MObjectProvider* CLmkAddEditEngine::MopNext()
+{
+	return NULL;
+}
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/loc_pub/landmarks_ui_selector_api/group/bld.inf	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,37 @@
+/*
+* 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:    LandmarksUi Content File -    File that exports the files belonging to 
+:                Landmarks UI Selector API
+*
+*/
+
+
+
+
+
+
+#include <platform_paths.hrh>
+
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_EXPORTS
+
+// Export Errors and Panic Code for LandmarksUi APIs and Application
+../inc/lmkerrors.h     			APP_LAYER_PUBLIC_EXPORT_PATH(lmkerrors.h)
+
+// Export Headers for LandmarksUi Selector APIs
+../inc/CLmkCategorySelectorDlg.h     	APP_LAYER_PUBLIC_EXPORT_PATH(CLmkCategorySelectorDlg.h)
+../inc/CLmkLandmarkSelectorDlg.h     	APP_LAYER_PUBLIC_EXPORT_PATH(CLmkLandmarkSelectorDlg.h)
+../inc/TLmkItemIdDbCombiInfo.h     	APP_LAYER_PUBLIC_EXPORT_PATH(TLmkItemIdDbCombiInfo.h)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/loc_pub/landmarks_ui_selector_api/inc/CLmkCategorySelectorDlg.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,140 @@
+/*
+* 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:    LandmarksUi Content File -    This class provides functionality for selecting either one or
+*                multiple categories.
+*
+*/
+
+
+
+
+
+
+
+#ifndef CLMKCATEGORYSELECTORDLG_H
+#define CLMKCATEGORYSELECTORDLG_H
+
+//  INCLUDES
+#include <e32base.h>                    // CBase
+#include <e32std.h>			//RArray and RPointerArray
+#include <EPos_Landmarks.h>             // Lm typedefs, constants etc.
+#include <EPos_CPosLandmarkDatabase.h>
+// FORWARD DECLARATIONS
+//class CPosLandmarkDatabase;
+class CLmkDlgSelectorImplBase;
+class MObjectProvider;
+
+// For multiple database support
+class TLmkItemIdDbCombiInfo;
+
+// CLASS DECLARATION
+
+/**
+*  This is a dialog class, which is used to launch category selector dialog and
+*  to get the selected category ids.It displays the categories present in landmarks
+*  database,as a list.The dialog can be a single selector or multiple selector dialog,
+*  depending upon argument passed by the client (in ExecuteLD function) at the time
+*  when it is launched.Based on whether it is a single selector or multiple selector
+*  dialog, user can select single category or multiple categories.
+*/
+class CLmkCategorySelectorDlg : public CBase
+    {
+    public:  // Constructors and destructor
+        /**
+        * This is a static function, which create and return an instance of this class.
+        * Categories present in the landmark database, are shown in selector.
+        *
+        * @param [in] aShowEmptyCategories specifies whether categories without
+        *            landmarks are shown or not
+        * @leave Leaves with KErrNotSupported if framework functionality is not available.
+        * @panic Panics with system-wide panic codes.
+        * @return new instance of this class
+        */
+        IMPORT_C static CLmkCategorySelectorDlg* NewL(TBool aShowEmptyCategories = EFalse );
+
+        /**
+        * Destructor.
+        */
+        IMPORT_C ~CLmkCategorySelectorDlg();
+
+    public: // New functions
+        /**
+        * This function sets the context - that is, the enclosing parent control - for this control.
+        *
+        * @param [in] aParent The parent object which is the context for the control.
+        * @panic Panics with KLmkPanicNullMember, if the selector is not
+        *        constructed properly.
+        */
+        IMPORT_C void SetMopParent( MObjectProvider* aParent );
+
+        /**
+        * This function launches the category selector dialog.Client use this function
+        * to launch single category selector dialog.
+        * This object is destroyed when this function returns or leaves.
+        * @param [in/out] aSelected Passed as reference and when the function returns,
+        *                contains the selected category id.
+        * @leave Leaves with system-wide leave codes.
+        * @panic Panics with KLmkPanicNullMember, if the selector is not constructed properly.
+        * @return Returns non-zero if accepted, else zero.
+        */
+        IMPORT_C TInt ExecuteLD( TLmkItemIdDbCombiInfo& aSelected );
+
+        /**
+        * This function launches the category selector dialog.Client use this function
+        * to launch multiple category selector dialog.
+        * This object is destroyed when this function returns or leaves.
+        * If the array(aSelectedItems) is passed with already filled cateogry ids, then
+        * such categories will be shown as selected when the dialog is launched,but if
+        * any of these ids do not exist in landmarks database,will be ignored.
+        *
+        * @param [in/out] aSelectedItems Passed as reference,either filled with category
+        *                ids for pre-selection or an empty array.On return of the function
+        *                contains the selected category ids.
+        * @leave Leaves with system-wide leave codes.
+        * @panic Panics with KLmkPanicNullMember, if the selector is not constructed properly.
+        * @return Returns non-zero if accepted, else zero.
+        */
+        IMPORT_C TInt ExecuteLD( RArray<TLmkItemIdDbCombiInfo>& aSelectedItems );
+
+    private:
+        /**
+        * C++ default constructor.
+        * @return newly instantiated object
+        */
+        CLmkCategorySelectorDlg();
+
+        /**
+        * By default Symbian 2nd phase constructor is private.
+        * @param aShowEmptyCategories
+        */
+        void ConstructL( TBool aShowEmptyCategories );
+
+    private:    // Data
+        // ETrue if executed in multiple item selector mode
+        TBool iIsMultiSelector;
+
+        ///Own: Search implementor object
+        CLmkDlgSelectorImplBase* iSelector;
+
+        //Own: Set to ETrue in destructor
+        TBool* iDestroyedPtr;
+
+        // Multiple database support
+        RPointerArray <CPosLandmarkDatabase> iDbs;
+
+    };
+
+#endif      // CLMKCATEGORYSELECTORDLG_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/loc_pub/landmarks_ui_selector_api/inc/CLmkLandmarkSelectorDlg.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,169 @@
+/*
+* 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:    LandmarksUi Content File -    This class provides functionality for selecting either one or
+*                multiple landmarks.
+*
+*/
+
+
+
+
+
+
+
+#ifndef CLMKLANDMARKSELECTORDLG_H
+#define CLMKLANDMARKSELECTORDLG_H
+
+//  INCLUDES
+#include <e32base.h>            // CBase
+#include <e32std.h>			//RArray and RPointerArray
+#include <EPos_Landmarks.h>     // Lm typedefs, constants etc.
+#include <EPos_CPosLandmarkDatabase.h>
+
+// FORWARD DECLARATIONS
+//class CPosLandmarkDatabase;
+class CLmkDlgSelectorImplBase;
+class MObjectProvider;
+
+// For multiple database support
+class TLmkItemIdDbCombiInfo;
+
+// CLASS DECLARATION
+
+/**
+*  This is a dialog class, which is used to launch landmark selector dialog and
+*  to get the selected landmark ids.It displays the landmarks present in landmarks
+*  database,as a list.The dialog can be a single selector or multiple selector dialog,
+*  depending upon argument passed by the client (in ExecuteLD function)  at the time
+*  when it is launched.Based on whether it is a single selector or multiple selector
+*  dialog, user can select single landmark or multiple landmarks.
+*/
+class CLmkLandmarkSelectorDlg : public CBase
+    {
+    public:  // Constructors and destructor
+        /**
+        * This is a static function, which creates and returns an instance of this class.
+        * All the landmarks present in the landmark database are shown in the selector.
+    	*
+        * @leave  Leaves with KErrNotSupported if framework functionality is not available.
+        * @panic  Panics with system-wide panic codes.
+        * @return new instance of this class
+        */
+        IMPORT_C static CLmkLandmarkSelectorDlg* NewL();
+        
+        /**
+        * This is a static function, which creates and returns an instance of this class.
+        * All the landmarks present in the user specified landmark database are shown in the selector.
+        * @param[in] aDatabaseUri The URI of the databases to open.
+    		*
+        * @leave  Leaves with KErrNotSupported if framework functionality is not available or
+        *					the protocol specified in URI is not supported.
+        * @leave  Leaves with KErrArgument if an empty string is passed as argument or
+        *					extension of the local database name is not "ldb".
+        * @panic  Panics with system-wide panic codes.
+        * @return new instance of this class
+        */
+        IMPORT_C static CLmkLandmarkSelectorDlg* NewL( const TDesC&  aDatabaseUri );
+
+        /**
+        * Destructor.
+        */
+        IMPORT_C ~CLmkLandmarkSelectorDlg();
+
+    public: // New functions
+        /**
+        * This function sets the context - that is, the enclosing parent control - for this control.
+        *
+        * @param [in] aParent The parent object which is the context for the control.
+        * @panic Panics with KLmkPanicNullMember, if the selector is not
+        *        constructed properly.
+        */
+        IMPORT_C void SetMopParent( MObjectProvider* aParent );
+
+        /**
+        * This function launches the landmark selector dialog. Client uses this function
+        * to launch single landmark selector dialog.
+        * This object is destroyed when this function returns or leaves.
+        * @param [in/out] aSelected Passed as reference and when the function returns,
+        *                contains the selected landmark id.
+        * @leave Leaves with system-wide leave codes.
+        * @panic Panics with KLmkPanicNullMember, if the selector is not constructed properly.
+        * @return Returns non-zero if accepted, else zero.
+        */
+        IMPORT_C TInt ExecuteLD( TLmkItemIdDbCombiInfo& aSelected );
+
+        /**
+        * This function launches the landmark selector dialog. Client uses this function
+        * to launch multiple landmark selector dialog.
+        * This object is destroyed when this function returns or leaves.
+        * If the array(aSelectedItems) is passed with already filled landmark ids, then
+        * such landmarks will be shown as selected when the dialog is launched, but if
+        * any of these ids do not exist in landmarks database, it will be ignored.
+        *
+        * @param [in/out] aSelectedItems Passed as reference, either filled with landmark
+        *                ids for pre-selection or an empty array. On return of the function
+        *                contains the selected landmark ids.
+	    * @leave Leaves with system-wide leave codes.
+	    * @panic Panics with KLmkPanicNullMember, if the selector is not constructed properly.
+        * @return Returns non-zero if accepted, else zero.
+        */
+        IMPORT_C TInt ExecuteLD( RArray<TLmkItemIdDbCombiInfo>& aSelectedItems );
+
+        /**
+        * This function sets the title string of the landmark selector dialog.
+        * This function has to be called before ExecuteLD() to make the set title appear on ui. 
+        * Calling this api after ExecuteLD() will not have any impact.
+        *
+        * @param [in] aTitle The title string of the selector dialog. 
+        * @panic Panics with KLmkPanicNullMember, if the selector is not
+        *        constructed properly.
+        */
+        IMPORT_C void SetDialogTitleL(const TDesC& aTitle );
+
+    private:
+        /**
+        * C++ default constructor.
+        * @return newly instantiated object
+        */
+        CLmkLandmarkSelectorDlg();
+
+        /**
+        * By default Symbian 2nd phase constructor is private.
+        */
+
+        void ConstructL( );
+
+
+    private:    // Data
+        // ETrue if executed in multiple item selector mode
+        TBool iIsMultiSelector;
+
+        // User defined database set to be viewed in selector
+        HBufC* iDatabaseUri;
+
+        /// Own: Search implementor object
+        CLmkDlgSelectorImplBase* iSelector;
+
+        // Set to ETrue in destructor
+        TBool* iDestroyedPtr;
+
+        // For multiple database support
+        RPointerArray <CPosLandmarkDatabase> iDbs; //
+
+
+    };
+
+#endif      // CLMKLANDMARKSELECTORDLG_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/loc_pub/landmarks_ui_selector_api/inc/TLmkItemIdDbCombiInfo.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,101 @@
+/*
+* 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:    LandmarksUi Content File -    This class provides methods for fetching the ID of selected
+*			   : landmark or category and the handle to database to which either
+*			   : landmark or category belongs.
+*
+*/
+
+
+
+
+
+
+
+#ifndef TLMKITEMIDDBCOMBIINFO_H
+#define TLMKITEMIDDBCOMBIINFO_H
+
+//  INCLUDES
+#include <e32base.h>            // CBase
+#include <EPos_Landmarks.h>     // Lm typedefs, constants etc.
+
+class CPosLandmarkDatabase;
+
+
+/**
+*
+*This class provides methods for fetching the ID of selected landmark or category
+*and the handle to database to which either landmark or category belongs.
+*
+*/
+class TLmkItemIdDbCombiInfo
+{
+
+   public:  // Constructors and destructor
+        /**
+        * C++ default constructor.
+        * @return newly instantiated object
+        */
+
+        IMPORT_C TLmkItemIdDbCombiInfo();
+
+        /**
+        * Destructor.
+        */
+        IMPORT_C ~TLmkItemIdDbCombiInfo();
+
+   public: // Functions for getting/setting the info
+
+        /**
+        *The client application executes this method to get the ID of a landmark or category
+        *@return id of the landmark or category
+        */
+        IMPORT_C TPosLmItemId GetItemId() const;
+
+        /**
+        *The client application executes this method to get the handle to a landmark database.
+        *The client takes the ownership of database handle.
+		*The database pointer is the same for all landmarks from the same database.
+		*It is the responsibilty of the API client to manage these database pointers
+		*and delete those pointers.
+        *
+        *@return handle to database to which the landmark or category belongs
+        */
+
+        IMPORT_C CPosLandmarkDatabase* GetLmDb() const;
+
+        /**
+        * This function is used to set the landmark or category id to the object of this class.
+        * Basically this function is used by the API implementation logic.
+        *@param [in] aLmItemId will contain reference to id of landmark or category
+        */
+
+        IMPORT_C void SetItemId( TPosLmItemId &aLmItemId);
+
+        /**
+        * This function is used to set the landmark database handle to the object of this class.
+        * Objects of this class owns the database handle.Basically this function is used by the
+        * API implementation logic.
+        *@param [in] aDb contains the pointer to database handle
+        */
+
+        IMPORT_C void SetLmDb ( CPosLandmarkDatabase* aDb);
+
+private: // own data
+	CPosLandmarkDatabase* iLmDb;
+	TPosLmItemId iLmItemId;
+};
+
+
+#endif // TLmkItemIdDbCombiInfo_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/loc_pub/landmarks_ui_selector_api/inc/lmkerrors.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,54 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:    LandmarksUi Error & Panic Codes      
+*
+*/
+
+#ifndef LMKERRORS_H
+#define LMKERRORS_H
+
+// landmarksui panic code
+enum TPanicCode
+    {
+    KLmkPanicNullMember = 1,
+    KLmkPanicIllegalMethodCall,
+    KLmkPanicInvalidResourceData,
+    KLmkPanicNullPointer,
+    KLmkPanicOutOfRange,    
+    KLmkPanicIllegalConstruction,    
+    KLmkPanicMathError,    
+    KLmkPanicUnexpectedEvent,    
+    KLmkPanicUnknownOperation,    
+    KLmkPanicUnknownControlType,    
+    KLmkPanicUnknownItemType,    
+    KLmkPanicIllegalMementoAccess, 
+    KLmkPanicWrongSelector,
+    KLmkPanicInvalidIndex,    
+    KLmkPanicIndexesZeroOneNotSet,    
+    KLmkPanicSelectorArrayIndex,
+    KLmkPanicNullListBox,
+    KLmkPanicNullListProvider,
+    KLmkPanicPostponedRestoration,
+    KLmkPanicDeletionInfo,
+	KLmkPanicNoLbModel,        
+    KLmkPanicNullNaviPane,
+    KLmkPanicSenderNotExist,
+	KLmkPanicKeyNotSet,
+    KLmkPanicAlreadyActive,
+    KLmkPanicIntermediateCallback        
+    };
+	
+#endif	// LMKERRORS_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/loc_pub/landmarks_ui_selector_api/landmarks_ui_selector_api.metaxml	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,18 @@
+<?xml version="1.0" ?>
+<api id="0d58fc24766256ca71644735b4fc78f0" dataversion="2.0">
+  <name>Landmarks UI Selector API</name>
+  <description>This API provides UI components for selecting Landmark and Category items.</description>
+  <type>c++</type>
+  <collection>landmarksui</collection>
+  <libs>
+    <lib name="LmkCommonUi.lib" />
+  </libs>
+  <release category="public" sinceversion="0"/>
+  <attributes>
+     <!-- This indicates wether the api provedes separate html documentation -->
+     <!-- or is the additional documentation generated from headers. -->
+     <!-- If you are unsuere then the value is "no" -->
+     <htmldocprovided>no</htmldocprovided>
+     <adaptation>no</adaptation>
+  </attributes>
+</api>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/loc_pub/landmarks_ui_selector_api/tsrc/bc/bcapplmkitemiddbcombiinfo/bmarm/landmarksitemiddbcombiinfou.def	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,3 @@
+EXPORTS
+	LibEntryL__FR13CTestModuleIf @ 1 NONAME R3UNUSED ; LibEntryL(CTestModuleIf &)
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/loc_pub/landmarks_ui_selector_api/tsrc/bc/bcapplmkitemiddbcombiinfo/bwins/landmarksitemiddbcombiinfou.def	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,3 @@
+EXPORTS
+	?LibEntryL@@YAPAVCScriptBase@@AAVCTestModuleIf@@@Z @ 1 NONAME ; class CScriptBase * __cdecl LibEntryL(class CTestModuleIf &)
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/loc_pub/landmarks_ui_selector_api/tsrc/bc/bcapplmkitemiddbcombiinfo/eabi/landmarksitemiddbcombiinfou.def	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,3 @@
+EXPORTS
+	_Z9LibEntryLR13CTestModuleIf @ 1 NONAME
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/loc_pub/landmarks_ui_selector_api/tsrc/bc/bcapplmkitemiddbcombiinfo/group/bld.inf	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,70 @@
+/*
+* 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:    LandmarkUi Content File
+*
+*/
+
+
+
+
+
+
+
+
+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
+*/
+lmdb_c.bat /epoc32/winscw/c/lmdb_c.bat
+lmdb_z.bat /epoc32/winscw/c/lmdb_z.bat
+testframework.ini		/epoc32/winscw/c/testframework/TestFramework_locdbci.ini
+UI_LmkItemIdDbCombiInfo.cfg		/epoc32/winscw/c/testframework/UI_LmkItemIdDbCombiInfo.cfg
+tcLmkItemIdDbCombiInfo.cfg		/epoc32/winscw/c/testframework/tcLmkItemIdDbCombiInfo.cfg
+
+
+PRJ_TESTMMPFILES
+// NOTE: If using ARS requirements .mmp file operation should be done under this.
+// 'abld test build'
+
+PRJ_MMPFILES
+// Specify the .mmp files required for building the important component
+// releasables.
+//
+// Specify "tidy" if the component you need to build doesn't need to be
+// released. Specify "ignore" if the MMP file exists but should be
+// ignored.
+// Example:
+/*
+/agnmodel/group/agnmodel.mmp
+#if defined(MARM)
+/agnmodel/group/agsvexe.mmp
+#endif
+*/
+LandmarksItemIdDbCombiInfo.mmp
+
+//  End of File
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/loc_pub/landmarks_ui_selector_api/tsrc/bc/bcapplmkitemiddbcombiinfo/group/landmarksitemiddbcombiinfo.mmp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,94 @@
+/*
+* Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:    LandmarksUi Content File -  
+*
+*/
+
+
+
+
+/*TYPE TESTCLASS*/
+
+#if defined(__S60_)
+        // To get the APP_LAYER_SYSTEMINCLUDE-definition
+        #include <platform_paths.hrh>
+#endif
+
+TARGET          landmarksitemiddbcombiinfo.dll
+TARGETTYPE      dll
+UID             0x1000008D 0x101FB3E3
+
+CAPABILITY      ALL -TCB
+
+DEFFILE         landmarksitemiddbcombiinfo.def
+
+#ifdef SBSv2
+	USERINCLUDE     ../inc 
+
+	#if defined(__S60_)
+	    APP_LAYER_SYSTEMINCLUDE
+	#else // __S60_ not defined
+	    SYSTEMINCLUDE   /epoc32/include 
+	    SYSTEMINCLUDE   /epoc32/include/internal
+	#endif // __S60_
+
+SOURCEPATH      ../src
+#else // SBSv2 not defined
+	USERINCLUDE     ../inc 
+
+	#if defined(__S60_)
+	    APP_LAYER_SYSTEMINCLUDE
+	#else // __S60_ not defined
+	    SYSTEMINCLUDE   /epoc32/include 
+	    SYSTEMINCLUDE   /epoc32/include/internal
+	#endif // __S60_
+
+	SOURCEPATH      ../src
+#endif // SBSv2
+
+SYSTEMINCLUDE	/epoc32/include/middleware 	
+SYSTEMINCLUDE	/epoc32/include/domain/middleware 	
+SYSTEMINCLUDE	/epoc32/include/osextensions 	
+SYSTEMINCLUDE	/epoc32/include/domain/osextensions 	
+SYSTEMINCLUDE	/epoc32/include/applications
+SYSTEMINCLUDE   /epoc32/include/internal
+
+SOURCE          landmarksitemiddbcombiinfo.cpp
+SOURCE          landmarksitemiddbcombiinfoblocks.cpp
+
+LIBRARY         euser.lib
+LIBRARY         stiftestinterface.lib
+LIBRARY         stiftestengine.lib
+LIBRARY  apgrfx.lib 
+LIBRARY  avkon.lib
+LIBRARY  euser.lib
+LIBRARY  apparc.lib
+LIBRARY  cone.lib
+LIBRARY  eikcore.lib 
+LIBRARY  eikcoctl.lib
+LIBRARY  eikctl.lib
+LIBRARY  etext.lib 
+LIBRARY  egul.lib
+LIBRARY  ws32.lib
+LIBRARY  bafl.lib
+LIBRARY  insock.lib
+LIBRARY  fbscli.lib
+LIBRARY  gdi.lib
+LIBRARY	 LmkCommonUi.lib
+LIBRARY  eposlandmarks.lib
+LIBRARY	 lbs.lib
+LIBRARY	 satinfo.lib
+
+LANG            SC
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/loc_pub/landmarks_ui_selector_api/tsrc/bc/bcapplmkitemiddbcombiinfo/group/lmdb_c.bat	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,23 @@
+rem
+rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+rem All rights reserved.
+rem This component and the accompanying materials are made available
+rem under the terms of "Eclipse Public License v1.0"
+rem which accompanies this distribution, and is available
+rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
+rem
+rem Initial Contributors:
+rem Nokia Corporation - initial contribution.
+rem
+rem Contributors:
+rem
+rem Description:   LandmarksUi BC-Driver Content File -    
+rem
+
+copy C:\TestFramework\TestFramework_locdbci.ini C:\TestFramework\TestFramework.ini
+md e:\BCTest
+md e:\BCTest\Results
+
+ATSINTERFACE.EXE -testmodule testcombiner -config C:\TestFramework\tcLmkItemIdDbCombiInfo.cfg
+copy c:\Logs\TestFramework\TestReport.txt e:\BCTest\results\Location_LmkItemIdDbCombiInfo.txt
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/loc_pub/landmarks_ui_selector_api/tsrc/bc/bcapplmkitemiddbcombiinfo/group/lmdb_z.bat	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,23 @@
+rem
+rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+rem All rights reserved.
+rem This component and the accompanying materials are made available
+rem under the terms of "Eclipse Public License v1.0"
+rem which accompanies this distribution, and is available
+rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
+rem
+rem Initial Contributors:
+rem Nokia Corporation - initial contribution.
+rem
+rem Contributors:
+rem
+rem Description:   LandmarksUi BC-Driver Content File -    
+rem
+
+copy z:\TestFramework\TestFramework_locdbci.ini C:\TestFramework\TestFramework.ini
+md e:\BCTest
+md e:\BCTest\Results
+
+ATSINTERFACE.EXE -testmodule testcombiner -config C:\TestFramework\tcLmkItemIdDbCombiInfo.cfg
+copy c:\Logs\TestFramework\TestReport.txt e:\BCTest\results\Location_LmkItemIdDbCombiInfo.txt
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/loc_pub/landmarks_ui_selector_api/tsrc/bc/bcapplmkitemiddbcombiinfo/group/tclmkitemiddbcombiinfo.cfg	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,20 @@
+[Test]
+title TestItemIdDbCombiInfo
+run testscripter c:\testframework\UI_LmkItemIdDbCombiInfo.cfg 1
+[Endtest]
+
+[Test]
+title TestGetItemId
+run testscripter c:\testframework\UI_LmkItemIdDbCombiInfo.cfg 2
+run testscripter c:\testframework\UI_LmkItemIdDbCombiInfo.cfg 4
+[Endtest]
+
+[Test]
+title TestGetLmDb
+run testscripter c:\testframework\UI_LmkItemIdDbCombiInfo.cfg 3
+run testscripter c:\testframework\UI_LmkItemIdDbCombiInfo.cfg 4
+[Endtest]
+
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/loc_pub/landmarks_ui_selector_api/tsrc/bc/bcapplmkitemiddbcombiinfo/group/testframework.ini	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,200 @@
+#
+# This is STIF initialization file
+# Comment lines start with '#'-character.
+# See STIF TestFramework users guide.doc for instructions
+
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+# Set following test engine settings:
+#	- Set Test Reporting mode. TestReportMode's possible values are:
+#		+ 'Summary': Summary of the tested test cases.
+#		+ 'Environment': Hardware and software info.
+#		+ 'TestCases': Test case report.
+#		+ 'FullReport': Set of all above ones.
+#		+ Example 'TestReportMode= Summary TestCases'
+#
+# 	- CreateTestReport setting controls report creation mode
+#		+ YES, Test report will created.
+#		+ NO, No Test report.
+#
+# 	- File path indicates the base path of the test report.
+# 	- File name indicates the name of the test report.
+#
+# 	- File format indicates the type of the test report.
+#		+ TXT, Test report file will be txt type, for example 'TestReport.txt'.
+#		+ HTML, Test report will be html type, for example 'TestReport.html'.
+#   + XML, Test report will be xml type, for example 'TestReport.xml'.
+#          Note, that xml format is available only when output is set to FILE.
+#
+# 	- File output indicates output source of the test report.
+#		+ FILE, Test report logging to file.
+#		+ RDEBUG, Test report logging to using rdebug.
+#
+# 	- File Creation Mode indicates test report overwriting if file exist.
+#		+ OVERWRITE, Overwrites if the Test report file exist.
+#		+ APPEND, Continue logging after the old Test report information if
+#                 report exist.
+# 	- Sets a device reset module's dll name(Reboot).
+#		+ If Nokia specific reset module is not available or it is not correct one
+#		  StifHWResetStub module may use as a template for user specific reset
+#		  module.
+# 	- Sets STIF test measurement disable options. e.g. pluging1 and pluging2 disablation
+#		DisableMeasurement= stifmeasurementplugin01 stifmeasurementplugin02
+#
+
+[Engine_Defaults]
+
+TestReportMode= FullReport    # Possible values are: 'Empty', 'Summary', 'Environment',
+                                                     'TestCases' or 'FullReport'
+
+CreateTestReport= YES         # Possible values: YES or NO
+
+TestReportFilePath= C:\LOGS\TestFramework\
+TestReportFileName= TestReport
+
+TestReportFormat= TXT         # Possible values: TXT, HTML or XML
+TestReportOutput= FILE        # Possible values: FILE or RDEBUG
+TestReportFileCreationMode= OVERWRITE # Possible values: OVERWRITE or APPEND
+
+DeviceResetDllName= StifResetForNokia.dll # e.g. 'StifHWResetStub.dll' for user specific reseting
+
+DisableMeasurement= stifmeasurementdisablenone  # Possible values are:
+              # 'stifmeasurementdisablenone', 'stifmeasurementdisableall'
+              # 'stifmeasurementplugin01', 'stifmeasurementplugin02',
+              # 'stifmeasurementplugin03', 'stifmeasurementplugin04',
+              # 'stifmeasurementplugin05' or 'stifbappeaprofiler'
+
+Timeout= 0                    # Default timeout value for each test case. In milliseconds
+UITestingSupport= YES        # Possible values: YES or NO
+SeparateProcesses= YES       # Possible values: YES or NO (default: NO)
+[End_Defaults]
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+
+
+
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+# Module configurations start
+# Modules are added between module tags
+# tags. Module name is specified after ModuleName= tag, like
+# ModuleName= XXXXXXXXX
+# Modules might have initialisation file, specified as
+# IniFile= c:\testframework\YYYYYY
+# Modules might have several configuration files, like
+# TestCaseFile= c:\testframework\NormalCases.txt
+# TestCaseFile= c:\testframework\SmokeCases.txt
+# TestCaseFile= c:\testframework\ManualCases.txt
+
+# (TestCaseFile is synonym for old term ConfigFile)
+
+# Following case specifies demo module settings. Demo module
+# does not read any settings from file, so tags 
+# IniFile and TestCaseFile are not used.
+# In the simplest case it is enough to specify only the
+# name of the test module when adding new test module
+
+[New_Module]
+ModuleName= testcombiner
+TestCaseFile= c:\testframework\tcLmkItemIdDbCombiInfo.cfg
+[End_Module]
+
+
+# Load testmoduleXXX, optionally with initialization file and/or test case files
+#[New_Module]
+#ModuleName= testmodulexxx
+
+#TestModuleXXX used initialization file
+#IniFile= c:\testframework\init.txt
+
+#TestModuleXXX used configuration file(s)
+#TestCaseFile= c:\testframework\testcases1.cfg
+#TestCaseFile= c:\testframework\testcases2.cfg
+#TestCaseFile= c:\testframework\manualtestcases.cfg
+
+#[End_Module]
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+
+
+
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+# Set STIF logging overwrite parameters for Logger.
+# 	Hardware and emulator environment logging path and styles can
+# 	be configured from here to overwrite the Logger's implemented values.
+#	
+#	Settings description:
+#	- Indicates option for creation log directory/directories. If log directory/directories
+#         is/are not created by user they will make by software.
+#		+ YES, Create log directory/directories if not allready exist.
+#		+ NO, Log directory/directories not created. Only created one is used.
+#
+#	- Overwrite emulator path setting.
+#		+ Example: If 'EmulatorBasePath= C:\LOGS\TestFramework\' and in code is defined 
+#		           Logger's path 'D:\\LOGS\\Module\\' with those definition the path
+#		           will be 'C:\LOGS\TestFramework\LOGS\Module\'
+#
+#	- Overwrite emulator's logging format.
+#		+ TXT, Log file(s) will be txt type(s), for example 'Module.txt'.
+#		+ HTML, Log file(s) will be html type(s), for example 'Module.html'.
+#
+#	- Overwrited emulator logging output source.
+#		+ FILE, Logging to file(s).
+#		+ RDEBUG, Logging to using rdebug(s).
+#
+#	- Overwrite hardware path setting (Same description as above in emulator path).
+#	- Overwrite hardware's logging format(Same description as above in emulator format).
+#	- Overwrite hardware's logging output source(Same description as above in emulator output).
+#
+#	- File Creation Mode indicates file overwriting if file exist.
+#		+ OVERWRITE, Overwrites if file(s) exist.
+#		+ APPEND, Continue logging after the old logging information if file(s) exist.
+#
+#	- Will thread id include to the log filename.
+#		+ YES, Thread id to log file(s) name, Example filename 'Module_b9.txt'.
+#		+ NO, No thread id to log file(s), Example filename 'Module.txt'.
+#
+#	- Will time stamps include the to log file.
+#		+ YES, Time stamp added to each line in log file(s). Time stamp is 
+#                 for example'12.Nov.2003 115958    LOGGING INFO'
+#		+ NO, No time stamp(s).
+#
+#	- Will line breaks include to the log file.
+#		+ YES, Each logging event includes line break and next log event is in own line.
+#		+ NO, No line break(s).
+#
+#	- Will event ranking include to the log file.
+#		+ YES, Event ranking number added to each line in log file(s). Ranking number
+#                 depends on environment's tics, for example(includes time stamp also)
+#                 '012   12.Nov.2003 115958    LOGGING INFO'
+#		+ NO, No event ranking.
+#
+#	- Will write log file in unicode format.
+#		+ YES, Log file will be written in unicode format
+#		+ NO, Log will be written as normal, not unicode, file.
+#
+
+[Logger_Defaults]
+
+#NOTE: If you want to set Logger using next setting(s) remove comment(s)'#'
+#NOTE: TestEngine and TestServer logging settings cannot change here
+
+#CreateLogDirectories= YES    # Possible values: YES or NO
+
+#EmulatorBasePath= C:\LOGS\TestFramework\
+#EmulatorFormat= HTML         # Possible values: TXT or HTML
+#EmulatorOutput= FILE         # Possible values: FILE or RDEBUG
+
+#HardwareBasePath= D:\LOGS\TestFramework\
+#HardwareFormat= HTML         # Possible values: TXT or HTML
+#HardwareOutput= FILE         # Possible values: FILE or RDEBUG
+
+#FileCreationMode= OVERWRITE  # Possible values: OVERWRITE or APPEND
+
+#ThreadIdToLogFile= YES       # Possible values: YES or NO
+#WithTimeStamp= YES           # Possible values: YES or NO
+#WithLineBreak= YES           # Possible values: YES or NO
+#WithEventRanking= YES        # Possible values: YES or NO
+
+#FileUnicode= YES             # Possible values: YES or NO
+#AddTestCaseTitle= YES        # Possible values: YES or NO
+[End_Logger_Defaults]
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+
+# End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/loc_pub/landmarks_ui_selector_api/tsrc/bc/bcapplmkitemiddbcombiinfo/group/ui_lmkitemiddbcombiinfo.cfg	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,28 @@
+[Test]
+title TestItemIdDbCombiInfo
+create LandmarksItemIdDbCombiInfo foobar
+foobar TestItemIdDbCombiInfo pa ra me ters
+delete foobar
+[Endtest] 
+
+[Test]
+title TestGetItemId
+create LandmarksItemIdDbCombiInfo foobar
+bringtoforeground
+foobar TestGetItemId pa ra me ters
+delete foobar
+[Endtest]
+
+[Test]
+title TestGetLmDb
+create LandmarksItemIdDbCombiInfo foobar
+bringtoforeground
+foobar TestGetLmDb pa ra me ters
+delete foobar
+[Endtest]  
+
+[Test]
+title PressKey
+pause 3000
+presskey global EKeyDevice0
+[Endtest]
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/loc_pub/landmarks_ui_selector_api/tsrc/bc/bcapplmkitemiddbcombiinfo/inc/landmarksitemiddbcombiinfo.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,193 @@
+/*
+* 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:    LandmarkUi Content File
+*
+*/
+
+
+
+
+
+
+
+
+#ifndef LANDMARKSITEMIDDBCOMBIINFO_H
+#define LANDMARKSITEMIDDBCOMBIINFO_H
+
+//  INCLUDES
+#include <StifLogger.h>
+#include <TestScripterInternal.h>
+#include <StifTestModule.h>
+
+
+// CONSTANTS
+//const ?type ?constant_var = ?constant;
+
+// MACROS
+//#define ?macro ?macro_def
+#define TEST_CLASS_VERSION_MAJOR 30
+#define TEST_CLASS_VERSION_MINOR 9
+#define TEST_CLASS_VERSION_BUILD 6
+
+// Logging path
+_LIT( KLandmarksItemIdDbCombiInfoLogPath, "\\logs\\testframework\\LandmarksItemIdDbCombiInfo\\" );
+// Log file
+_LIT( KLandmarksItemIdDbCombiInfoLogFile, "LandmarksItemIdDbCombiInfo.txt" );
+_LIT( KLandmarksItemIdDbCombiInfoLogFileWithTitle, "LandmarksItemIdDbCombiInfo_[%S].txt" );
+
+// FUNCTION PROTOTYPES
+//?type ?function_name(?arg_list);
+
+// FORWARD DECLARATIONS
+//class ?FORWARD_CLASSNAME;
+class CLandmarksItemIdDbCombiInfo;
+
+// DATA TYPES
+//enum ?declaration
+//typedef ?declaration
+//extern ?data_type;
+
+// CLASS DECLARATION
+
+/**
+*  CLandmarksItemIdDbCombiInfo test class for STIF Test Framework TestScripter.
+*  ?other_description_lines
+*
+*  @lib ?library
+*  @since ?Series60_version
+*/
+NONSHARABLE_CLASS(CLandmarksItemIdDbCombiInfo) : public CScriptBase
+    {
+    public:  // Constructors and destructor
+
+        /**
+        * Two-phased constructor.
+        */
+        static CLandmarksItemIdDbCombiInfo* NewL( CTestModuleIf& aTestModuleIf );
+
+        /**
+        * Destructor.
+        */
+        virtual ~CLandmarksItemIdDbCombiInfo();
+
+    public: // New functions
+
+        /**
+        * ?member_description.
+        * @since ?Series60_version
+        * @param ?arg1 ?description
+        * @return ?description
+        */
+        //?type ?member_function( ?type ?arg1 );
+
+    public: // Functions from base classes
+
+        /**
+        * From CScriptBase Runs a script line.
+        * @since ?Series60_version
+        * @param aItem Script line containing method name and parameters
+        * @return Symbian OS error code
+        */
+        virtual TInt RunMethodL( CStifItemParser& aItem );
+
+    protected:  // New functions
+
+        /**
+        * ?member_description.
+        * @since ?Series60_version
+        * @param ?arg1 ?description
+        * @return ?description
+        */
+        //?type ?member_function( ?type ?arg1 );
+
+    protected:  // Functions from base classes
+
+        /**
+        * From ?base_class ?member_description
+        */
+        //?type ?member_function();
+
+    private:
+
+        /**
+        * C++ default constructor.
+        */
+        CLandmarksItemIdDbCombiInfo( 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 );
+        virtual TInt TestItemIdDbCombiInfo( CStifItemParser& aItem );
+        virtual TInt TestGetItemId( CStifItemParser& aItem );
+        virtual TInt TestGetLmDb( 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;
+
+    public:     // Friend classes
+        //?friend_class_declaration;
+    protected:  // Friend classes
+        //?friend_class_declaration;
+    private:    // Friend classes
+        //?friend_class_declaration;
+
+    };
+
+#endif      // LANDMARKSITEMIDDBCOMBIINFO_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/loc_pub/landmarks_ui_selector_api/tsrc/bc/bcapplmkitemiddbcombiinfo/sis/50_loc_itemdbci.pkg	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,36 @@
+;
+; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of "Eclipse Public License v1.0"
+; which accompanies this distribution, and is available
+; at the URL "http://www.eclipse.org/legal/epl-v10.html".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description:    LandmarkUi Content File   LmkItemIdDbComiInfo API BC test project
+;
+&EN
+
+; Installation header
+; Only one component name as we only support English
+; UID is the main app's UID
+
+#{"loc_itemdbci"},(0x20015B17),1,0,0,TYPE=SA
+[0x101F7961],3,*,*,{"Series60ProductID"}
+
+; Non-localised vendor name
+:"Nokia Corporation"
+
+; Localised vendor names
+%{"Nokia Corporation"}
+
+; Files to install and to where
+"\epoc32\release\armv5\urel\landmarksitemiddbcombiinfo.dll"-"c:\sys\bin\landmarksitemiddbcombiinfo.dll"
+"\epoc32\winscw\c\testframework\testframework_locdbci.ini"-"c:\testframework\testframework_locdbci.ini"
+"\epoc32\winscw\c\testframework\tclmkitemiddbcombiinfo.cfg"-"c:\testframework\tclmkitemiddbcombiinfo.cfg"
+"\epoc32\winscw\c\testframework\ui_lmkitemiddbcombiinfo.cfg"-"c:\testframework\ui_lmkitemiddbcombiinfo.cfg"
+"\epoc32\winscw\c\lmdb_c.bat"-"c:\lmitemdb.bat"
\ No newline at end of file
Binary file loc_pub/landmarks_ui_selector_api/tsrc/bc/bcapplmkitemiddbcombiinfo/sis/50_loc_itemdbci.sis has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/loc_pub/landmarks_ui_selector_api/tsrc/bc/bcapplmkitemiddbcombiinfo/src/landmarksitemiddbcombiinfo.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,206 @@
+/*
+* 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:    LandmarkUi Content File
+*
+*/
+
+
+
+
+
+
+
+
+// INCLUDE FILES
+#include <Stiftestinterface.h>
+#include "LandmarksItemIdDbCombiInfo.h"
+#include <SettingServerClient.h>
+
+// EXTERNAL DATA STRUCTURES
+//extern  ?external_data;
+
+// EXTERNAL FUNCTION PROTOTYPES
+//extern ?external_function( ?arg_type,?arg_type );
+
+// CONSTANTS
+//const ?type ?constant_var = ?constant;
+
+// MACROS
+//#define ?macro ?macro_def
+
+// LOCAL CONSTANTS AND MACROS
+//const ?type ?constant_var = ?constant;
+//#define ?macro_name ?macro_def
+
+// MODULE DATA STRUCTURES
+//enum ?declaration
+//typedef ?declaration
+
+// LOCAL FUNCTION PROTOTYPES
+//?type ?function_name( ?arg_type, ?arg_type );
+
+// FORWARD DECLARATIONS
+//class ?FORWARD_CLASSNAME;
+
+// ============================= LOCAL FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// ?function_name ?description.
+// ?description
+// Returns: ?value_1: ?description
+//          ?value_n: ?description_line1
+//                    ?description_line2
+// -----------------------------------------------------------------------------
+//
+/*
+?type ?function_name(
+    ?arg_type arg,  // ?description
+    ?arg_type arg)  // ?description
+    {
+
+    ?code  // ?comment
+
+    // ?comment
+    ?code
+    }
+*/
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CLandmarksItemIdDbCombiInfo::CLandmarksItemIdDbCombiInfo
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+CLandmarksItemIdDbCombiInfo::CLandmarksItemIdDbCombiInfo(
+    CTestModuleIf& aTestModuleIf ):
+        CScriptBase( aTestModuleIf )
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CLandmarksItemIdDbCombiInfo::ConstructL
+// Symbian 2nd phase constructor can leave.
+// -----------------------------------------------------------------------------
+//
+void CLandmarksItemIdDbCombiInfo::ConstructL()
+    {
+    //Read logger settings to check whether test case name is to be
+    //appended to log file name.
+    RSettingServer settingServer;
+    TInt ret = settingServer.Connect();
+    if(ret != KErrNone)
+        {
+        User::Leave(ret);
+        }
+    // Struct to StifLogger settigs.
+    TLoggerSettings loggerSettings;
+    // Parse StifLogger defaults from STIF initialization file.
+    ret = settingServer.GetLoggerSettings(loggerSettings);
+    if(ret != KErrNone)
+        {
+        User::Leave(ret);
+        }
+    // Close Setting server session
+    settingServer.Close();
+
+    TFileName logFileName;
+
+    if(loggerSettings.iAddTestCaseTitle)
+        {
+        TName title;
+        TestModuleIf().GetTestCaseTitleL(title);
+        logFileName.Format(KLandmarksItemIdDbCombiInfoLogFileWithTitle, &title);
+        }
+    else
+        {
+        logFileName.Copy(KLandmarksItemIdDbCombiInfoLogFile);
+        }
+
+    iLog = CStifLogger::NewL( KLandmarksItemIdDbCombiInfoLogPath,
+                          logFileName,
+                          CStifLogger::ETxt,
+                          CStifLogger::EFile,
+                          EFalse );
+
+    SendTestClassVersion();
+    }
+
+// -----------------------------------------------------------------------------
+// CLandmarksItemIdDbCombiInfo::NewL
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+CLandmarksItemIdDbCombiInfo* CLandmarksItemIdDbCombiInfo::NewL(
+    CTestModuleIf& aTestModuleIf )
+    {
+    CLandmarksItemIdDbCombiInfo* self = new (ELeave) CLandmarksItemIdDbCombiInfo( aTestModuleIf );
+
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop();
+
+    return self;
+
+    }
+
+// Destructor
+CLandmarksItemIdDbCombiInfo::~CLandmarksItemIdDbCombiInfo()
+    {
+
+    // Delete resources allocated from test methods
+    Delete();
+
+    // Delete logger
+    delete iLog;
+
+    }
+
+//-----------------------------------------------------------------------------
+// CLandmarksItemIdDbCombiInfo::SendTestClassVersion
+// Method used to send version of test class
+//-----------------------------------------------------------------------------
+//
+void CLandmarksItemIdDbCombiInfo::SendTestClassVersion()
+	{
+	TVersion moduleVersion;
+	moduleVersion.iMajor = TEST_CLASS_VERSION_MAJOR;
+	moduleVersion.iMinor = TEST_CLASS_VERSION_MINOR;
+	moduleVersion.iBuild = TEST_CLASS_VERSION_BUILD;
+
+	TFileName moduleName;
+	moduleName = _L("LandmarksItemIdDbCombiInfo.dll");
+
+	TBool newVersionOfMethod = ETrue;
+	TestModuleIf().SendTestModuleVersion(moduleVersion, moduleName, newVersionOfMethod);
+	}
+
+// ========================== OTHER EXPORTED FUNCTIONS =========================
+
+// -----------------------------------------------------------------------------
+// LibEntryL is a polymorphic Dll entry point.
+// Returns: CScriptBase: New CScriptBase derived object
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CScriptBase* LibEntryL(
+    CTestModuleIf& aTestModuleIf ) // Backpointer to STIF Test Framework
+    {
+
+    return ( CScriptBase* ) CLandmarksItemIdDbCombiInfo::NewL( aTestModuleIf );
+
+    }
+
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/loc_pub/landmarks_ui_selector_api/tsrc/bc/bcapplmkitemiddbcombiinfo/src/landmarksitemiddbcombiinfoblocks.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,203 @@
+/*
+* 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:    LandmarkUi Content File
+*
+*/
+
+
+
+
+
+
+
+
+// [INCLUDE FILES] - do not remove
+#include <e32svr.h>
+#include <StifParser.h>
+#include <Stiftestinterface.h>
+#include "LandmarksItemIdDbCombiInfo.h"
+
+#include <tlmkitemiddbcombiinfo.h>
+#include <CLmkLandmarkSelectorDlg.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 ===============================
+
+// -----------------------------------------------------------------------------
+// CLandmarksItemIdDbCombiInfo::Delete
+// Delete here all resources allocated and opened from test methods.
+// Called from destructor.
+// -----------------------------------------------------------------------------
+//
+void CLandmarksItemIdDbCombiInfo::Delete()
+    {
+
+    }
+
+// -----------------------------------------------------------------------------
+// CLandmarksItemIdDbCombiInfo::RunMethodL
+// Run specified method. Contains also table of test mothods and their names.
+// -----------------------------------------------------------------------------
+//
+TInt CLandmarksItemIdDbCombiInfo::RunMethodL(
+    CStifItemParser& aItem )
+    {
+
+    static TStifFunctionInfo const KFunctions[] =
+        {
+        // Copy this line for every implemented function.
+        // First string is the function name used in TestScripter script file.
+        // Second is the actual implementation member function.
+        ENTRY( "Example", CLandmarksItemIdDbCombiInfo::ExampleL ),
+        ENTRY( "TestItemIdDbCombiInfo", CLandmarksItemIdDbCombiInfo::TestItemIdDbCombiInfo ),
+        ENTRY( "TestGetItemId", CLandmarksItemIdDbCombiInfo::TestGetItemId ),
+        ENTRY( "TestGetLmDb", CLandmarksItemIdDbCombiInfo::TestGetLmDb ),
+        //ADD NEW ENTRY HERE
+        // [test cases entries] - Do not remove
+
+        };
+
+    const TInt count = sizeof( KFunctions ) /
+                        sizeof( TStifFunctionInfo );
+
+    return RunInternalL( KFunctions, count, aItem );
+
+    }
+
+// -----------------------------------------------------------------------------
+// CLandmarksItemIdDbCombiInfo::ExampleL
+// Example test method function.
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+TInt CLandmarksItemIdDbCombiInfo::ExampleL( CStifItemParser& aItem )
+    {
+
+    // Print to UI
+    _LIT( KLandmarksItemIdDbCombiInfo, "LandmarksItemIdDbCombiInfo" );
+    _LIT( KExample, "In Example" );
+    TestModuleIf().Printf( 0, KLandmarksItemIdDbCombiInfo, 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, KLandmarksItemIdDbCombiInfo,
+                                KParam, i, &string );
+        i++;
+        }
+
+    return KErrNone;
+
+    }
+
+TInt CLandmarksItemIdDbCombiInfo::TestItemIdDbCombiInfo( CStifItemParser& aItem )
+{
+	 	TLmkItemIdDbCombiInfo selItem = TLmkItemIdDbCombiInfo();
+	 	return KErrNone;
+}
+
+TInt CLandmarksItemIdDbCombiInfo::TestGetItemId( CStifItemParser& aItem )
+{
+			TLmkItemIdDbCombiInfo selItem;
+			TPosLmItemId lmItem;
+
+			CLmkLandmarkSelectorDlg* iLmkSelectDlg = CLmkLandmarkSelectorDlg::NewL();
+    		TRAPD( result, iLmkSelectDlg->ExecuteLD(selItem));
+
+      	    lmItem = selItem.GetItemId();
+      	    return KErrNone;
+ }
+
+ TInt CLandmarksItemIdDbCombiInfo::TestGetLmDb( CStifItemParser& aItem )
+ {
+
+			TLmkItemIdDbCombiInfo selItem;
+
+			CLmkLandmarkSelectorDlg* iLmkSelectDlg = CLmkLandmarkSelectorDlg::NewL();
+    		TRAPD( result, iLmkSelectDlg->ExecuteLD(selItem));
+
+    	    CPosLandmarkDatabase* ilDb = selItem.GetLmDb();
+    	    return KErrNone;
+    	    }
+// -----------------------------------------------------------------------------
+// CLandmarksItemIdDbCombiInfo::?member_function
+// ?implementation_description
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+/*
+TInt CLandmarksItemIdDbCombiInfo::?member_function(
+   CItemParser& aItem )
+   {
+
+   ?code
+
+   }
+*/
+
+// ========================== OTHER EXPORTED FUNCTIONS =========================
+// None
+
+//  [End of File] - Do not remove
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/loc_pub/landmarks_ui_selector_api/tsrc/bc/bcapplmkselector/bmarm/lmkselectoru.def	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,3 @@
+EXPORTS
+	LibEntryL__FR13CTestModuleIf @ 1 NONAME R3UNUSED ; LibEntryL(CTestModuleIf &)
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/loc_pub/landmarks_ui_selector_api/tsrc/bc/bcapplmkselector/bwins/lmkselectoru.def	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,3 @@
+EXPORTS
+	?LibEntryL@@YAPAVCScriptBase@@AAVCTestModuleIf@@@Z @ 1 NONAME ; class CScriptBase * __cdecl LibEntryL(class CTestModuleIf &)
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/loc_pub/landmarks_ui_selector_api/tsrc/bc/bcapplmkselector/eabi/lmkselectoru.def	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,5 @@
+EXPORTS
+	_Z9LibEntryLR13CTestModuleIf @ 1 NONAME
+	_ZTI10CLmkEngine @ 2 NONAME ; #<TI>#
+	_ZTV10CLmkEngine @ 3 NONAME ; #<VT>#
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/loc_pub/landmarks_ui_selector_api/tsrc/bc/bcapplmkselector/group/bld.inf	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,70 @@
+/*
+* 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:    LandmarkUi Content File
+*
+*/
+
+
+
+
+
+
+
+
+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
+*/
+Lmsl_c.bat /epoc32/winscw/c/Lmsl_c.bat
+Lmsl_z.bat /epoc32/winscw/c/Lmsl_z.bat
+testframework.ini		/epoc32/winscw/c/testframework/TestFramework_locsel.ini
+UI_LmkSelector.cfg		/epoc32/winscw/c/testframework/UI_LmkSelector.cfg
+tcLmkSelector.cfg		/epoc32/winscw/c/testframework/tcLmkSelector.cfg
+
+
+PRJ_TESTMMPFILES
+// NOTE: If using ARS requirements .mmp file operation should be done under this.
+// 'abld test build'
+
+PRJ_MMPFILES
+// Specify the .mmp files required for building the important component
+// releasables.
+//
+// Specify "tidy" if the component you need to build doesn't need to be
+// released. Specify "ignore" if the MMP file exists but should be
+// ignored.
+// Example:
+/*
+/agnmodel/group/agnmodel.mmp
+#if defined(MARM)
+/agnmodel/group/agsvexe.mmp
+#endif
+*/
+LmkSelector.mmp
+
+//  End of File
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/loc_pub/landmarks_ui_selector_api/tsrc/bc/bcapplmkselector/group/lmkselector.mmp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,99 @@
+/*
+* Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:    LandmarksUi Content File -  
+*
+*/
+
+
+
+
+/*TYPE TESTCLASS*/
+
+#if defined(__S60_)
+        // To get the APP_LAYER_SYSTEMINCLUDE-definition
+        #include <platform_paths.hrh>
+#endif
+
+TARGET          lmkselector.dll
+TARGETTYPE      dll
+UID             0x1000008D 0x101FB3E3
+
+CAPABILITY      ALL -TCB
+
+DEFFILE         LmkSelector.def
+
+#ifdef SBSv2
+	USERINCLUDE     ../inc 
+
+	#if defined(__S60_)
+	    APP_LAYER_SYSTEMINCLUDE
+	#else // __S60_ not defined
+	    SYSTEMINCLUDE   /epoc32/include 
+	    SYSTEMINCLUDE   /epoc32/include/internal
+	#endif // __S60_
+
+	SOURCEPATH      ../src
+#else // SBSv2 not defined
+	USERINCLUDE     ../inc 
+
+	#if defined(__S60_)
+	    APP_LAYER_SYSTEMINCLUDE
+	#else // __S60_ not defined
+	    SYSTEMINCLUDE   /epoc32/include 
+	    SYSTEMINCLUDE   /epoc32/include/internal
+	#endif // __S60_
+
+	SOURCEPATH      ../src
+#endif // SBSv2
+
+	
+SYSTEMINCLUDE	/epoc32/include/middleware 	
+SYSTEMINCLUDE	/epoc32/include/domain/middleware 	
+SYSTEMINCLUDE	/epoc32/include/osextensions 	
+SYSTEMINCLUDE	/epoc32/include/domain/osextensions 	
+SYSTEMINCLUDE	/epoc32/include/applications
+
+
+SOURCE          lmkselector.cpp
+SOURCE          lmkselectorblocks.cpp
+SOURCE			lmkengine.cpp
+
+
+
+LIBRARY         euser.lib
+LIBRARY         stiftestinterface.lib
+LIBRARY         stiftestengine.lib
+LIBRARY  apgrfx.lib 
+LIBRARY  avkon.lib
+LIBRARY  euser.lib
+LIBRARY  apparc.lib
+LIBRARY  cone.lib
+LIBRARY  eikcore.lib 
+LIBRARY  eikcoctl.lib
+LIBRARY  eikctl.lib
+LIBRARY  etext.lib 
+LIBRARY  egul.lib
+LIBRARY  ws32.lib
+LIBRARY  bafl.lib
+LIBRARY  insock.lib
+LIBRARY  fbscli.lib
+LIBRARY  gdi.lib
+LIBRARY	 LmkCommonUi.lib
+LIBRARY  eposLandmarks.lib
+LIBRARY	 lbs.lib
+LIBRARY	 satinfo.lib
+
+LANG            SC
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/loc_pub/landmarks_ui_selector_api/tsrc/bc/bcapplmkselector/group/lmsl_c.bat	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,23 @@
+rem
+rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+rem All rights reserved.
+rem This component and the accompanying materials are made available
+rem under the terms of "Eclipse Public License v1.0"
+rem which accompanies this distribution, and is available
+rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
+rem
+rem Initial Contributors:
+rem Nokia Corporation - initial contribution.
+rem
+rem Contributors:
+rem
+rem Description:   LandmarksUi BC-Driver Content File -    
+rem
+
+copy C:\TestFramework\TestFramework_locsel.ini C:\TestFramework\TestFramework.ini
+md e:\BCTest
+md e:\BCTest\Results
+
+ATSINTERFACE.EXE -testmodule testcombiner -config C:\TestFramework\tcLmkSelector.cfg
+copy c:\Logs\TestFramework\TestReport.txt e:\BCTest\results\Location_LmkSelector.txt
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/loc_pub/landmarks_ui_selector_api/tsrc/bc/bcapplmkselector/group/lmsl_z.bat	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,23 @@
+rem
+rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+rem All rights reserved.
+rem This component and the accompanying materials are made available
+rem under the terms of "Eclipse Public License v1.0"
+rem which accompanies this distribution, and is available
+rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
+rem
+rem Initial Contributors:
+rem Nokia Corporation - initial contribution.
+rem
+rem Contributors:
+rem
+rem Description:   LandmarksUi BC-Driver Content File -    
+rem
+
+copy z:\TestFramework\TestFramework_locsel.ini C:\TestFramework\TestFramework.ini
+md e:\BCTest
+md e:\BCTest\Results
+
+ATSINTERFACE.EXE -testmodule testcombiner -config C:\TestFramework\tcLmkSelector.cfg
+copy c:\Logs\TestFramework\TestReport.txt e:\BCTest\results\Location_LmkSelector.txt
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/loc_pub/landmarks_ui_selector_api/tsrc/bc/bcapplmkselector/group/tclmkselector.cfg	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,52 @@
+//TestLmkNewL
+[Test]
+title TestLmkNewL
+run testscripter c:\testframework\UI_LmkSelector.cfg 1
+[Endtest]
+
+//TestLmkSetMopParent
+[Test]
+title TestLmkSetMopParent
+run testscripter c:\testframework\UI_LmkSelector.cfg 2
+[Endtest]
+
+//TestLmkExecuteLD
+[Test]
+title TestLmkExecuteLD
+run testscripter c:\testframework\UI_LmkSelector.cfg 3
+run testscripter c:\testframework\UI_LmkSelector.cfg 9
+[Endtest]
+
+//TestLmkExecuteLD2
+[Test]
+title TestLmkExecuteLD2
+run testscripter c:\testframework\UI_LmkSelector.cfg 4
+run testscripter c:\testframework\UI_LmkSelector.cfg 9
+[Endtest]
+
+//TestCatNewL
+[Test]
+title TestCatNewL
+run testscripter c:\testframework\UI_LmkSelector.cfg 5
+[Endtest]
+
+//TestCatSetMopParent
+[Test]
+title TestCatSetMopParent
+run testscripter c:\testframework\UI_LmkSelector.cfg 6
+[Endtest]
+
+//TestCatExecuteLD
+[Test]
+title TestCatExecuteLD
+run testscripter c:\testframework\UI_LmkSelector.cfg 7
+run testscripter c:\testframework\UI_LmkSelector.cfg 9
+[Endtest]
+
+//TestCatExecuteLD2
+[Test]
+title TestCatExecuteLD2
+run testscripter c:\testframework\UI_LmkSelector.cfg 8
+run testscripter c:\testframework\UI_LmkSelector.cfg 9
+[Endtest]
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/loc_pub/landmarks_ui_selector_api/tsrc/bc/bcapplmkselector/group/testframework.ini	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,200 @@
+#
+# This is STIF initialization file
+# Comment lines start with '#'-character.
+# See STIF TestFramework users guide.doc for instructions
+
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+# Set following test engine settings:
+#	- Set Test Reporting mode. TestReportMode's possible values are:
+#		+ 'Summary': Summary of the tested test cases.
+#		+ 'Environment': Hardware and software info.
+#		+ 'TestCases': Test case report.
+#		+ 'FullReport': Set of all above ones.
+#		+ Example 'TestReportMode= Summary TestCases'
+#
+# 	- CreateTestReport setting controls report creation mode
+#		+ YES, Test report will created.
+#		+ NO, No Test report.
+#
+# 	- File path indicates the base path of the test report.
+# 	- File name indicates the name of the test report.
+#
+# 	- File format indicates the type of the test report.
+#		+ TXT, Test report file will be txt type, for example 'TestReport.txt'.
+#		+ HTML, Test report will be html type, for example 'TestReport.html'.
+#   + XML, Test report will be xml type, for example 'TestReport.xml'.
+#          Note, that xml format is available only when output is set to FILE.
+#
+# 	- File output indicates output source of the test report.
+#		+ FILE, Test report logging to file.
+#		+ RDEBUG, Test report logging to using rdebug.
+#
+# 	- File Creation Mode indicates test report overwriting if file exist.
+#		+ OVERWRITE, Overwrites if the Test report file exist.
+#		+ APPEND, Continue logging after the old Test report information if
+#                 report exist.
+# 	- Sets a device reset module's dll name(Reboot).
+#		+ If Nokia specific reset module is not available or it is not correct one
+#		  StifHWResetStub module may use as a template for user specific reset
+#		  module.
+# 	- Sets STIF test measurement disable options. e.g. pluging1 and pluging2 disablation
+#		DisableMeasurement= stifmeasurementplugin01 stifmeasurementplugin02
+#
+
+[Engine_Defaults]
+
+TestReportMode= FullReport    # Possible values are: 'Empty', 'Summary', 'Environment',
+                                                     'TestCases' or 'FullReport'
+
+CreateTestReport= YES         # Possible values: YES or NO
+
+TestReportFilePath= C:\LOGS\TestFramework\
+TestReportFileName= TestReport
+
+TestReportFormat= TXT         # Possible values: TXT, HTML or XML
+TestReportOutput= FILE        # Possible values: FILE or RDEBUG
+TestReportFileCreationMode= OVERWRITE # Possible values: OVERWRITE or APPEND
+
+DeviceResetDllName= StifResetForNokia.dll # e.g. 'StifHWResetStub.dll' for user specific reseting
+
+DisableMeasurement= stifmeasurementdisablenone  # Possible values are:
+              # 'stifmeasurementdisablenone', 'stifmeasurementdisableall'
+              # 'stifmeasurementplugin01', 'stifmeasurementplugin02',
+              # 'stifmeasurementplugin03', 'stifmeasurementplugin04',
+              # 'stifmeasurementplugin05' or 'stifbappeaprofiler'
+
+Timeout= 0                    # Default timeout value for each test case. In milliseconds
+UITestingSupport= YES        # Possible values: YES or NO
+SeparateProcesses= YES       # Possible values: YES or NO (default: NO)
+[End_Defaults]
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+
+
+
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+# Module configurations start
+# Modules are added between module tags
+# tags. Module name is specified after ModuleName= tag, like
+# ModuleName= XXXXXXXXX
+# Modules might have initialisation file, specified as
+# IniFile= c:\testframework\YYYYYY
+# Modules might have several configuration files, like
+# TestCaseFile= c:\testframework\NormalCases.txt
+# TestCaseFile= c:\testframework\SmokeCases.txt
+# TestCaseFile= c:\testframework\ManualCases.txt
+
+# (TestCaseFile is synonym for old term ConfigFile)
+
+# Following case specifies demo module settings. Demo module
+# does not read any settings from file, so tags 
+# IniFile and TestCaseFile are not used.
+# In the simplest case it is enough to specify only the
+# name of the test module when adding new test module
+
+[New_Module]
+ModuleName= testcombiner
+TestCaseFile= c:\testframework\tcLmkSelector.cfg
+[End_Module]
+
+
+# Load testmoduleXXX, optionally with initialization file and/or test case files
+#[New_Module]
+#ModuleName= testmodulexxx
+
+#TestModuleXXX used initialization file
+#IniFile= c:\testframework\init.txt
+
+#TestModuleXXX used configuration file(s)
+#TestCaseFile= c:\testframework\testcases1.cfg
+#TestCaseFile= c:\testframework\testcases2.cfg
+#TestCaseFile= c:\testframework\manualtestcases.cfg
+
+#[End_Module]
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+
+
+
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+# Set STIF logging overwrite parameters for Logger.
+# 	Hardware and emulator environment logging path and styles can
+# 	be configured from here to overwrite the Logger's implemented values.
+#	
+#	Settings description:
+#	- Indicates option for creation log directory/directories. If log directory/directories
+#         is/are not created by user they will make by software.
+#		+ YES, Create log directory/directories if not allready exist.
+#		+ NO, Log directory/directories not created. Only created one is used.
+#
+#	- Overwrite emulator path setting.
+#		+ Example: If 'EmulatorBasePath= C:\LOGS\TestFramework\' and in code is defined 
+#		           Logger's path 'D:\\LOGS\\Module\\' with those definition the path
+#		           will be 'C:\LOGS\TestFramework\LOGS\Module\'
+#
+#	- Overwrite emulator's logging format.
+#		+ TXT, Log file(s) will be txt type(s), for example 'Module.txt'.
+#		+ HTML, Log file(s) will be html type(s), for example 'Module.html'.
+#
+#	- Overwrited emulator logging output source.
+#		+ FILE, Logging to file(s).
+#		+ RDEBUG, Logging to using rdebug(s).
+#
+#	- Overwrite hardware path setting (Same description as above in emulator path).
+#	- Overwrite hardware's logging format(Same description as above in emulator format).
+#	- Overwrite hardware's logging output source(Same description as above in emulator output).
+#
+#	- File Creation Mode indicates file overwriting if file exist.
+#		+ OVERWRITE, Overwrites if file(s) exist.
+#		+ APPEND, Continue logging after the old logging information if file(s) exist.
+#
+#	- Will thread id include to the log filename.
+#		+ YES, Thread id to log file(s) name, Example filename 'Module_b9.txt'.
+#		+ NO, No thread id to log file(s), Example filename 'Module.txt'.
+#
+#	- Will time stamps include the to log file.
+#		+ YES, Time stamp added to each line in log file(s). Time stamp is 
+#                 for example'12.Nov.2003 115958    LOGGING INFO'
+#		+ NO, No time stamp(s).
+#
+#	- Will line breaks include to the log file.
+#		+ YES, Each logging event includes line break and next log event is in own line.
+#		+ NO, No line break(s).
+#
+#	- Will event ranking include to the log file.
+#		+ YES, Event ranking number added to each line in log file(s). Ranking number
+#                 depends on environment's tics, for example(includes time stamp also)
+#                 '012   12.Nov.2003 115958    LOGGING INFO'
+#		+ NO, No event ranking.
+#
+#	- Will write log file in unicode format.
+#		+ YES, Log file will be written in unicode format
+#		+ NO, Log will be written as normal, not unicode, file.
+#
+
+[Logger_Defaults]
+
+#NOTE: If you want to set Logger using next setting(s) remove comment(s)'#'
+#NOTE: TestEngine and TestServer logging settings cannot change here
+
+#CreateLogDirectories= YES    # Possible values: YES or NO
+
+#EmulatorBasePath= C:\LOGS\TestFramework\
+#EmulatorFormat= HTML         # Possible values: TXT or HTML
+#EmulatorOutput= FILE         # Possible values: FILE or RDEBUG
+
+#HardwareBasePath= D:\LOGS\TestFramework\
+#HardwareFormat= HTML         # Possible values: TXT or HTML
+#HardwareOutput= FILE         # Possible values: FILE or RDEBUG
+
+#FileCreationMode= OVERWRITE  # Possible values: OVERWRITE or APPEND
+
+#ThreadIdToLogFile= YES       # Possible values: YES or NO
+#WithTimeStamp= YES           # Possible values: YES or NO
+#WithLineBreak= YES           # Possible values: YES or NO
+#WithEventRanking= YES        # Possible values: YES or NO
+
+#FileUnicode= YES             # Possible values: YES or NO
+#AddTestCaseTitle= YES        # Possible values: YES or NO
+[End_Logger_Defaults]
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+
+# End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/loc_pub/landmarks_ui_selector_api/tsrc/bc/bcapplmkselector/group/ui_lmkselector.cfg	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,65 @@
+[Test]
+title TestLmkNewL
+create LmkSelector foobar
+foobar TestLmkNewL pa ra me ters
+delete foobar
+[Endtest] 
+
+[Test]
+title TestLmkSetMopParent
+create LmkSelector foobar
+foobar TestLmkSetMopParent pa ra me ters
+delete foobar
+[Endtest]
+
+[Test]
+title TestLmkExecuteLD
+create LmkSelector foobar
+bringtoforeground
+foobar TestLmkExecuteLD pa ra me ters
+delete foobar
+[Endtest]
+
+[Test]
+title TestLmkExecuteLD2
+create LmkSelector foobar
+bringtoforeground
+foobar TestLmkExecuteLD2 pa ra me ters
+delete foobar
+[Endtest]
+
+[Test]
+title TestCatNewL
+create LmkSelector foobar
+foobar TestCatNewL pa ra me ters
+delete foobar
+[Endtest] 
+
+[Test]
+title TestCatSetMopParent
+create LmkSelector foobar
+foobar TestCatSetMopParent pa ra me ters
+delete foobar
+[Endtest]
+
+[Test]
+title TestCatExecuteLD
+create LmkSelector foobar
+bringtoforeground
+foobar TestCatExecuteLD pa ra me ters
+delete foobar
+[Endtest]
+
+[Test]
+title TestCatExecuteLD2
+create LmkSelector foobar
+bringtoforeground
+foobar TestCatExecuteLD2 pa ra me ters
+delete foobar
+[Endtest]
+
+[Test]
+title PressKey
+pause 3000
+presskey global EKeyDevice0
+[Endtest]
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/loc_pub/landmarks_ui_selector_api/tsrc/bc/bcapplmkselector/inc/bcapplmkselectorengine.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,101 @@
+/*
+* 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:    LandmarksUi Content File -
+*
+*/
+
+
+
+
+
+
+
+#ifndef BCAPPLMKSELECTORENGINE_H
+#define BCAPPLMKSELECTORENGINE_H
+
+// INCLUDES
+//#include "BCAppLmkSelectorContainer.h"
+#include <coecntrl.h>
+#include <coeccntx.h>
+#include <eikenv.h>
+#include <CSatelliteInfoUi.h>
+#include <EPos_CPosLandmarkDatabase.h>
+#include <CLmkEditorDlg.h>
+#include <coemop.h>
+#include <CLmkLandmarkSelectorDlg.h>
+#include <CLmkCategorySelectorDlg.h>
+#include <TLmkItemIdDbCombiInfo.h>
+
+// FORWARD DECLARATIONS
+
+
+
+// CLASS DECLARATION
+
+/*
+CBCAppLmkSelectorEngine
+*/
+
+class CBCAppLmkSelectorEngine : public CBase, public MObjectProvider
+	{
+public:
+    static CBCAppLmkSelectorEngine* NewL();
+    /*~CBCAppLmkSelectorEngine();
+    void RunL();
+    void DoCancel();
+
+    void Init();
+    void IssueTest();
+
+	void ExecuteTestCase();
+    void SetTestCaseNumber(const TDesC8 &aNumber);
+public:
+	TBuf<15> iText;*/
+
+protected:
+	TTypeUid::Ptr MopSupplyObject(TTypeUid aId);
+    MObjectProvider* MopNext();
+
+private:
+    CBCAppLmkSelectorEngine();
+   /* void ConstructL(CBCAppLmkSelectorContainer* aContainer);
+
+    void ExecuteTestL();
+
+    void SetTestCase(const TDesC& aHeaderName, const TDesC& aFunctionName);
+    void Print(const TDesC& aDes);
+    void Print(const TDesC8& aDes);
+    void Print(TInt aInt);
+	void CreateNewLandmark();
+private:
+    RTimer iTimer;
+
+    CEikonEnv* iEnv;
+    CBCAppLmkSelectorContainer* iContainer;
+
+    TInt iCurrentTest;
+    TBool iWarningIssued;
+    TBool iExecuteAllTests;
+    TBool iAllTestsDone;
+
+    TBuf<64> iCurrentHeaderName;
+    TBuf<128> iCurrentFunctionName;
+
+	RWsSession iWs;
+	CActiveSchedulerWait iWait;*/
+	};
+
+#endif
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/loc_pub/landmarks_ui_selector_api/tsrc/bc/bcapplmkselector/inc/lmkengine.h	Wed Sep 01 12:31:27 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:    LandmarkUi Content File
+*
+*/
+
+
+
+
+
+
+
+
+#ifndef LMKENGINE_H
+#define LMKENGINE_H
+
+#include <coemop.h>
+#include <e32base.h>
+
+class CLmkEngine : public CBase, public MObjectProvider
+{
+		public:
+
+		protected:
+			TTypeUid::Ptr MopSupplyObject(TTypeUid aId);
+    	MObjectProvider* MopNext();
+};
+
+#endif      // LMKENGINE_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/loc_pub/landmarks_ui_selector_api/tsrc/bc/bcapplmkselector/inc/lmkselector.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,207 @@
+/*
+* 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:    LandmarkUi Content File
+*
+*/
+
+
+
+
+
+
+
+
+#ifndef LMKSELECTOR_H
+#define LMKSELECTOR_H
+
+//  INCLUDES
+#include <StifLogger.h>
+#include <TestScripterInternal.h>
+#include <StifTestModule.h>
+
+#include <clmklandmarkselectordlg.h>
+#include <clmkcategoryselectordlg.h>
+#include <tlmkitemiddbcombiinfo.h>
+
+#include "LmkEngine.h"
+
+// CONSTANTS
+//const ?type ?constant_var = ?constant;
+
+// MACROS
+//#define ?macro ?macro_def
+#define TEST_CLASS_VERSION_MAJOR 30
+#define TEST_CLASS_VERSION_MINOR 9
+#define TEST_CLASS_VERSION_BUILD 6
+
+// Logging path
+_LIT( KLmkSelectorLogPath, "\\logs\\testframework\\LmkSelector\\" );
+// Log file
+_LIT( KLmkSelectorLogFile, "LmkSelector.txt" );
+_LIT( KLmkSelectorLogFileWithTitle, "LmkSelector_[%S].txt" );
+
+// FUNCTION PROTOTYPES
+//?type ?function_name(?arg_list);
+
+// FORWARD DECLARATIONS
+//class ?FORWARD_CLASSNAME;
+class CLmkSelector;
+
+// DATA TYPES
+//enum ?declaration
+//typedef ?declaration
+//extern ?data_type;
+
+// CLASS DECLARATION
+
+/**
+*  CLmkSelector test class for STIF Test Framework TestScripter.
+*  ?other_description_lines
+*
+*  @lib ?library
+*  @since ?Series60_version
+*/
+NONSHARABLE_CLASS(CLmkSelector) : public CScriptBase
+    {
+    public:  // Constructors and destructor
+
+        /**
+        * Two-phased constructor.
+        */
+        static CLmkSelector* NewL( CTestModuleIf& aTestModuleIf );
+
+        /**
+        * Destructor.
+        */
+        virtual ~CLmkSelector();
+
+    public: // New functions
+
+        /**
+        * ?member_description.
+        * @since ?Series60_version
+        * @param ?arg1 ?description
+        * @return ?description
+        */
+        //?type ?member_function( ?type ?arg1 );
+
+    public: // Functions from base classes
+
+        /**
+        * From CScriptBase Runs a script line.
+        * @since ?Series60_version
+        * @param aItem Script line containing method name and parameters
+        * @return Symbian OS error code
+        */
+        virtual TInt RunMethodL( CStifItemParser& aItem );
+
+    protected:  // New functions
+
+        /**
+        * ?member_description.
+        * @since ?Series60_version
+        * @param ?arg1 ?description
+        * @return ?description
+        */
+        //?type ?member_function( ?type ?arg1 );
+
+    protected:  // Functions from base classes
+
+        /**
+        * From ?base_class ?member_description
+        */
+        //?type ?member_function();
+
+    private:
+
+        /**
+        * C++ default constructor.
+        */
+        CLmkSelector( 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 );
+        virtual TInt TestLmkNewL( CStifItemParser& aItem );
+        virtual TInt TestLmkSetMopParent( CStifItemParser& aItem );
+        virtual TInt TestLmkExecuteLD( CStifItemParser& aItem );
+        virtual TInt TestLmkExecuteLD2( CStifItemParser& aItem );
+        virtual TInt TestCatNewL( CStifItemParser& aItem );
+        virtual TInt TestCatSetMopParent( CStifItemParser& aItem );
+        virtual TInt TestCatExecuteLD( CStifItemParser& aItem );
+        virtual TInt TestCatExecuteLD2( CStifItemParser& aItem );
+
+        void CreateNewLandmark();
+
+        /**
+         * 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
+    		CLmkEngine* engine;
+
+        // ?one_line_short_description_of_data
+        //?data_declaration;
+
+        // Reserved pointer for future extension
+        //TAny* iReserved;
+
+    public:     // Friend classes
+        //?friend_class_declaration;
+    protected:  // Friend classes
+        //?friend_class_declaration;
+    private:    // Friend classes
+        //?friend_class_declaration;
+
+    };
+
+#endif      // LMKSELECTOR_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/loc_pub/landmarks_ui_selector_api/tsrc/bc/bcapplmkselector/sis/50_loc_selector.pkg	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,36 @@
+;
+; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of "Eclipse Public License v1.0"
+; which accompanies this distribution, and is available
+; at the URL "http://www.eclipse.org/legal/epl-v10.html".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description:    LandmarkUi Content File  LmkSelector API BC test project 
+;
+&EN
+
+; Installation header
+; Only one component name as we only support English
+; UID is the main app's UID
+
+#{"loc_selector"},(0x20015B18),1,0,0,TYPE=SA
+[0x101F7961],3,*,*,{"Series60ProductID"}
+
+; Non-localised vendor name
+:"Nokia Corporation"
+
+; Localised vendor names
+%{"Nokia Corporation"}
+
+; Files to install and to where
+"\epoc32\release\armv5\urel\lmkselector.dll"-"c:\sys\bin\lmkselector.dll"
+"\epoc32\winscw\c\testframework\testframework_locsel.ini"-"c:\testframework\testframework_locsel.ini"
+"\epoc32\winscw\c\testframework\tclmkselector.cfg"-"c:\testframework\tclmkselector.cfg"
+"\epoc32\winscw\c\testframework\ui_lmkselector.cfg"-"c:\testframework\ui_lmkselector.cfg"
+"\epoc32\winscw\c\lmsl_c.bat"-"c:\lmsl.bat"
\ No newline at end of file
Binary file loc_pub/landmarks_ui_selector_api/tsrc/bc/bcapplmkselector/sis/50_loc_selector.sis has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/loc_pub/landmarks_ui_selector_api/tsrc/bc/bcapplmkselector/src/bcapplmkselectorengine.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,394 @@
+/*
+* 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:    LandmarksUi Content File -
+*
+*/
+
+
+
+
+
+
+/*
+Change History
+22-05-2007	To resolve tool IDO warnings	Komala Nagaraju
+*/
+#define PRINTTOSCREEN
+#define WRITETOLOG
+
+
+// INCLUDE FILES
+//#include "BCAppLmkSelectorContainer.h"
+#include "BCAppLmkSelectorEngine.h"
+#include <BCAppLmkSelector.rsg>
+#include <apgtask.h>
+#include <bacline.h>
+#include <in_sock.h>
+#include <coecntrl.h>
+#include <gulicon.h>
+#include <eikfrlb.h>
+#include <AknIconArray.h>
+#include <in_sock.h>
+#include <barsread.h>
+
+_LIT(KAppName, "BCAppLmkSelector");
+
+
+// ================= MEMBER FUNCTIONS =======================
+
+/*void CBCAppLmkSelectorEngine::ExecuteTestL()
+    {
+
+    switch (iCurrentTest)
+        {
+		case 0:
+            {
+            SetTestCase(_L("CLmkLandmarkSelectorDlg"), _L("CLmkLandmarkSelectorDlg::NewL"));
+
+			CLmkLandmarkSelectorDlg* iLmkSelectDlg = CLmkLandmarkSelectorDlg::NewL();
+			delete iLmkSelectDlg;
+			iLmkSelectDlg = NULL;
+			}
+            break;
+
+        case 1:
+            {
+            SetTestCase(_L("CLmkLandmarkSelectorDlg"), _L("CLmkLandmarkSelectorDlg::SetMopParent"));
+
+			CLmkLandmarkSelectorDlg* iLmkSelectDlg = CLmkLandmarkSelectorDlg::NewL();
+			iLmkSelectDlg->SetMopParent(this);
+			delete iLmkSelectDlg;
+			iLmkSelectDlg = NULL;
+			}
+            break;
+
+        case 2:
+            {
+            SetTestCase(_L("CLmkLandmarkSelectorDlg"), _L("CLmkLandmarkSelectorDlg::ExecuteLD"));
+
+			TLmkItemIdDbCombiInfo selItem;
+			CLmkLandmarkSelectorDlg* iLmkSelectDlg = CLmkLandmarkSelectorDlg::NewL();
+        	TRAPD( result, iLmkSelectDlg->ExecuteLD(selItem));
+        	}
+            break;
+
+        case 3:
+            {
+            SetTestCase(_L("CLmkLandmarkSelectorDlg"), _L("CLmkLandmarkSelectorDlg::ExecuteLD#1"));
+
+			RArray<TLmkItemIdDbCombiInfo> selItems;
+
+			CLmkLandmarkSelectorDlg* iLmkSelectDlg = CLmkLandmarkSelectorDlg::NewL();
+        	TRAPD( result, iLmkSelectDlg->ExecuteLD(selItems));
+        	selItems.Close();
+        	}
+            break;
+
+        case 4:
+            {
+            SetTestCase(_L("CLmkCategorySelectorDlg"), _L("CLmkCategorySelectorDlg::NewL"));
+
+			CLmkCategorySelectorDlg* iLmkCategoryDlg = CLmkCategorySelectorDlg::NewL();
+			delete iLmkCategoryDlg;
+			iLmkCategoryDlg = NULL;
+            }
+            break;
+
+        case 5:
+            {
+            SetTestCase(_L("CLmkCategorySelectorDlg"), _L("CLmkCategorySelectorDlg::SetMopParent"));
+
+			CLmkCategorySelectorDlg* iLmkCategoryDlg = CLmkCategorySelectorDlg::NewL();
+			iLmkCategoryDlg->SetMopParent(this);
+			delete iLmkCategoryDlg;
+			iLmkCategoryDlg = NULL;
+            }
+            break;
+
+        case 6:
+            {
+            SetTestCase(_L("CLmkCategorySelectorDlg"), _L("CLmkCategorySelectorDlg::ExecuteLD"));
+
+			TLmkItemIdDbCombiInfo selItem;
+			CLmkCategorySelectorDlg* iLmkCategoryDlg = CLmkCategorySelectorDlg::NewL();
+        	TRAPD( result, iLmkCategoryDlg->ExecuteLD(selItem));
+            }
+            break;
+
+        case 7:
+            {
+            SetTestCase(_L("CLmkCategorySelectorDlg"), _L("CLmkCategorySelectorDlg::ExecuteLD#1"));
+
+			RArray<TLmkItemIdDbCombiInfo> selItems;
+            CLmkCategorySelectorDlg* iLmkCategoryDlg = CLmkCategorySelectorDlg::NewL();
+        	TRAPD( result, iLmkCategoryDlg->ExecuteLD(selItems));
+        	selItems.Close();
+            }
+            break;
+
+		default:
+            {
+            iAllTestsDone = ETrue;
+            }
+        }
+    }
+*/
+TTypeUid::Ptr CBCAppLmkSelectorEngine::MopSupplyObject(TTypeUid /*aId*/)
+{
+}
+
+MObjectProvider* CBCAppLmkSelectorEngine:: MopNext()
+{
+}
+
+// ---------------------------------------------------------
+
+CBCAppLmkSelectorEngine* CBCAppLmkSelectorEngine::NewL(/*CBCAppLmkSelectorContainer* aContainer*/)
+    {
+    CBCAppLmkSelectorEngine* self = new(ELeave) CBCAppLmkSelectorEngine;
+    CleanupStack::PushL(self);
+    //self->ConstructL(/*aContainer*/);
+    //self->CreateNewLandmark();
+    CleanupStack::Pop();
+    return self;
+    }
+
+// ---------------------------------------------------------
+
+/*CBCAppLmkSelectorEngine::CBCAppLmkSelectorEngine() : CActive(0)
+    {
+    }
+
+// ---------------------------------------------------------
+
+void CBCAppLmkSelectorEngine::IssueTest()
+    {
+    __ASSERT_ALWAYS(!IsActive(), User::Panic(_L("active"), 1));
+
+    iTimer.After(iStatus, 50000);
+    SetActive();
+    }
+
+// ---------------------------------------------------------
+
+void CBCAppLmkSelectorEngine::RunL()
+    {
+
+    // Execute the test case
+    TRAPD(err, ExecuteTestL());
+
+    if (iExecuteAllTests)
+        {
+        if (iAllTestsDone)
+            {
+            // All tests are done  (don't have to exit the program, just print a text)
+            Print(_L("All tests done.\n"));
+            }
+        else
+            {
+            // We have more tests to be run, move to the next one
+            Print(iCurrentFunctionName);
+            Print(_L("\n"));
+            iCurrentTest++;
+            IssueTest();
+            }
+        }
+    else
+        {
+        if (iAllTestsDone)
+            {
+            // Signal the main application that there are no more tests to be run
+            Print(_L("All tests done.\n"));
+            User::Exit(7777);
+            }
+        else
+            {
+            // Only one test case executed, exit normally
+            Print(iCurrentFunctionName);
+            Print(_L("\n"));
+            User::Exit(0);
+            }
+        }
+
+    }
+
+// ---------------------------------------------------------
+
+void CBCAppLmkSelectorEngine::DoCancel()
+    {
+    iTimer.Cancel();
+    }
+
+// ---------------------------------------------------------
+
+void CBCAppLmkSelectorEngine::Init()
+    {
+    iCurrentTest = 0;
+    iWarningIssued = EFalse;
+    iExecuteAllTests = EFalse;
+    iAllTestsDone = EFalse;
+	iText.Append(_L("Setting Title"));
+    }
+
+// ---------------------------------------------------------
+
+void CBCAppLmkSelectorEngine::Print(const TDesC& aDes)
+    {
+    #ifdef PRINTTOSCREEN
+	iContainer->PrintNotify(aDes, 0);
+    #endif
+    }
+
+// ---------------------------------------------------------
+
+void CBCAppLmkSelectorEngine::Print(const TDesC8& aDes)
+    {
+    #ifdef PRINTTOSCREEN
+	iContainer->PrintNotify(aDes, 0);
+    #endif
+    }
+
+// ---------------------------------------------------------
+
+void CBCAppLmkSelectorEngine::Print(TInt aInt)
+    {
+    #ifdef PRINTTOSCREEN
+	iContainer->PrintNotify(aInt);
+    #endif
+    }
+
+// ---------------------------------------------------------
+// ---------------------------------------------------------
+*/
+/*void CBCAppLmkSelectorEngine::ConstructL(CBCAppLmkSelectorContainer* aContainer)
+    {
+    iEnv = CEikonEnv::Static();
+    TInt err = iWs.Connect();
+    err = err;
+    User::LeaveIfError(iTimer.CreateLocal());
+    //iContainer = aContainer;
+
+    Init();
+    CActiveScheduler::Add(this);
+
+
+    // check if BCAppMain is running
+    TApaTaskList taskList(iWs);
+    TApaTask thisTask = taskList.FindApp(TUid::Uid(0x101FD6FF));
+
+    if (thisTask.Exists())
+        {
+    	// ask the BCAppMain to send the test case number
+    	thisTask.SendMessage(TUid::Uid( KUidApaMessageSwitchOpenFileValue ), _L8("SendNewTestCaseNumber"));
+        iExecuteAllTests = EFalse;
+        }
+    else
+        {
+        // BCAppMain not running, execute all cases immediately
+        iExecuteAllTests = ETrue;
+        IssueTest();
+        }
+    }
+*/
+// ---------------------------------------------------------
+
+/*CBCAppLmkSelectorEngine::~CBCAppLmkSelectorEngine()
+    {
+    Cancel();
+    iWs.Close();
+    iTimer.Close();
+    }
+
+// ---------------------------------------------------------
+
+void CBCAppLmkSelectorEngine::SetTestCase(const TDesC& aHeaderName, const TDesC& aFunctionName)
+    {
+    // copy names to our variables
+    iCurrentHeaderName.Copy(aHeaderName);
+    iCurrentFunctionName.Copy(aFunctionName);
+
+    // send this information to BCAppMain
+    TApaTaskList taskList(iWs);
+    TApaTask thisTask = taskList.FindApp(TUid::Uid(0x101FD6FF));
+
+    if (thisTask.Exists())
+        {
+        TBuf8<400> msg;
+        msg.Copy(iCurrentHeaderName);
+        msg.Append(_L8("@"));
+        msg.Append(iCurrentFunctionName);
+        thisTask.SendMessage(TUid::Uid( KUidApaMessageSwitchOpenFileValue ), msg);
+
+        // now start waiting till BCAppMain has acknowledged our message
+        iWait.Start();
+        }
+
+    }
+
+// ---------------------------------------------------------
+
+void CBCAppLmkSelectorEngine::ExecuteTestCase()
+    {
+    // stop waiting
+    iWait.AsyncStop();
+    }
+
+// ---------------------------------------------------------
+
+void CBCAppLmkSelectorEngine::SetTestCaseNumber(const TDesC8 &aNumber)
+    {
+    // set the test case number
+    TLex8 msgConv(aNumber);
+    msgConv.Val(iCurrentTest);
+
+    // start the active object
+    IssueTest();
+    }
+
+// ---------------------------------------------------------
+
+// ---------------------------------------------------------
+
+void CBCAppLmkSelectorEngine::CreateNewLandmark()
+    {
+
+  TRAP_IGNORE(
+	CPosLandmarkDatabase* dBase = CPosLandmarkDatabase::OpenL();
+	CleanupStack::PushL( dBase );
+	if (dBase->IsInitializingNeeded())
+		{
+	ExecuteAndDeleteLD(dBase->InitializeL()); // Synchronous since no argument
+		}
+
+	CPosLmItemIterator*  iterator = dBase->LandmarkIteratorL();
+    CleanupStack::PushL(iterator);
+
+
+    if( iterator->NumOfItemsL() == 0 )
+	    {
+	    CPosLandmark* landmark = CPosLandmark::NewL();
+		CleanupStack::PushL( landmark );
+
+		landmark->SetLandmarkNameL(_L("Nokia"));
+
+		dBase->AddLandmarkL(*landmark);
+		CleanupStack::PopAndDestroy();//landmark
+	    }
+
+ 	CleanupStack::PopAndDestroy(2);	//iterator,dBase
+ 	)
+	}
+*/
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/loc_pub/landmarks_ui_selector_api/tsrc/bc/bcapplmkselector/src/lmkengine.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,88 @@
+/*
+* 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:    LandmarkUi Content File
+*
+*/
+
+
+
+
+
+
+
+
+// INCLUDE FILES
+
+#include "LmkEngine.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
+    }
+*/
+
+TTypeUid::Ptr CLmkEngine::MopSupplyObject(TTypeUid /*aId*/)
+{
+}
+
+MObjectProvider* CLmkEngine::MopNext()
+{
+	return NULL;
+}
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/loc_pub/landmarks_ui_selector_api/tsrc/bc/bcapplmkselector/src/lmkselector.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,206 @@
+/*
+* 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:    LandmarkUi Content File
+*
+*/
+
+
+
+
+
+
+
+
+// INCLUDE FILES
+#include <Stiftestinterface.h>
+#include "LmkSelector.h"
+#include <SettingServerClient.h>
+
+// EXTERNAL DATA STRUCTURES
+//extern  ?external_data;
+
+// EXTERNAL FUNCTION PROTOTYPES
+//extern ?external_function( ?arg_type,?arg_type );
+
+// CONSTANTS
+//const ?type ?constant_var = ?constant;
+
+// MACROS
+//#define ?macro ?macro_def
+
+// LOCAL CONSTANTS AND MACROS
+//const ?type ?constant_var = ?constant;
+//#define ?macro_name ?macro_def
+
+// MODULE DATA STRUCTURES
+//enum ?declaration
+//typedef ?declaration
+
+// LOCAL FUNCTION PROTOTYPES
+//?type ?function_name( ?arg_type, ?arg_type );
+
+// FORWARD DECLARATIONS
+//class ?FORWARD_CLASSNAME;
+
+// ============================= LOCAL FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// ?function_name ?description.
+// ?description
+// Returns: ?value_1: ?description
+//          ?value_n: ?description_line1
+//                    ?description_line2
+// -----------------------------------------------------------------------------
+//
+/*
+?type ?function_name(
+    ?arg_type arg,  // ?description
+    ?arg_type arg)  // ?description
+    {
+
+    ?code  // ?comment
+
+    // ?comment
+    ?code
+    }
+*/
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CLmkSelector::CLmkSelector
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+CLmkSelector::CLmkSelector(
+    CTestModuleIf& aTestModuleIf ):
+        CScriptBase( aTestModuleIf )
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkSelector::ConstructL
+// Symbian 2nd phase constructor can leave.
+// -----------------------------------------------------------------------------
+//
+void CLmkSelector::ConstructL()
+    {
+    //Read logger settings to check whether test case name is to be
+    //appended to log file name.
+    RSettingServer settingServer;
+    TInt ret = settingServer.Connect();
+    if(ret != KErrNone)
+        {
+        User::Leave(ret);
+        }
+    // Struct to StifLogger settigs.
+    TLoggerSettings loggerSettings;
+    // Parse StifLogger defaults from STIF initialization file.
+    ret = settingServer.GetLoggerSettings(loggerSettings);
+    if(ret != KErrNone)
+        {
+        User::Leave(ret);
+        }
+    // Close Setting server session
+    settingServer.Close();
+
+    TFileName logFileName;
+
+    if(loggerSettings.iAddTestCaseTitle)
+        {
+        TName title;
+        TestModuleIf().GetTestCaseTitleL(title);
+        logFileName.Format(KLmkSelectorLogFileWithTitle, &title);
+        }
+    else
+        {
+        logFileName.Copy(KLmkSelectorLogFile);
+        }
+
+    iLog = CStifLogger::NewL( KLmkSelectorLogPath,
+                          logFileName,
+                          CStifLogger::ETxt,
+                          CStifLogger::EFile,
+                          EFalse );
+
+    SendTestClassVersion();
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkSelector::NewL
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+CLmkSelector* CLmkSelector::NewL(
+    CTestModuleIf& aTestModuleIf )
+    {
+    CLmkSelector* self = new (ELeave) CLmkSelector( aTestModuleIf );
+    CleanupStack::PushL( self );
+
+    self->ConstructL();
+    CleanupStack::Pop();
+
+    return self;
+
+    }
+
+// Destructor
+CLmkSelector::~CLmkSelector()
+    {
+
+    // Delete resources allocated from test methods
+    Delete();
+
+    // Delete logger
+    delete iLog;
+
+    }
+
+//-----------------------------------------------------------------------------
+// CLmkSelector::SendTestClassVersion
+// Method used to send version of test class
+//-----------------------------------------------------------------------------
+//
+void CLmkSelector::SendTestClassVersion()
+	{
+	TVersion moduleVersion;
+	moduleVersion.iMajor = TEST_CLASS_VERSION_MAJOR;
+	moduleVersion.iMinor = TEST_CLASS_VERSION_MINOR;
+	moduleVersion.iBuild = TEST_CLASS_VERSION_BUILD;
+
+	TFileName moduleName;
+	moduleName = _L("LmkSelector.dll");
+
+	TBool newVersionOfMethod = ETrue;
+	TestModuleIf().SendTestModuleVersion(moduleVersion, moduleName, newVersionOfMethod);
+	}
+
+// ========================== OTHER EXPORTED FUNCTIONS =========================
+
+// -----------------------------------------------------------------------------
+// LibEntryL is a polymorphic Dll entry point.
+// Returns: CScriptBase: New CScriptBase derived object
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CScriptBase* LibEntryL(
+    CTestModuleIf& aTestModuleIf ) // Backpointer to STIF Test Framework
+    {
+
+    return ( CScriptBase* ) CLmkSelector::NewL( aTestModuleIf );
+
+    }
+
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/loc_pub/landmarks_ui_selector_api/tsrc/bc/bcapplmkselector/src/lmkselectorblocks.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,296 @@
+/*
+* 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:    LandmarkUi Content File
+*
+*/
+
+
+
+
+
+
+
+
+// [INCLUDE FILES] - do not remove
+#include <e32svr.h>
+#include <StifParser.h>
+#include <Stiftestinterface.h>
+#include "LmkSelector.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 ===============================
+
+// -----------------------------------------------------------------------------
+// CLmkSelector::Delete
+// Delete here all resources allocated and opened from test methods.
+// Called from destructor.
+// -----------------------------------------------------------------------------
+//
+void CLmkSelector::Delete()
+    {
+
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkSelector::RunMethodL
+// Run specified method. Contains also table of test mothods and their names.
+// -----------------------------------------------------------------------------
+//
+TInt CLmkSelector::RunMethodL(
+    CStifItemParser& aItem )
+    {
+
+    static TStifFunctionInfo const KFunctions[] =
+        {
+        // Copy this line for every implemented function.
+        // First string is the function name used in TestScripter script file.
+        // Second is the actual implementation member function.
+        ENTRY( "Example", CLmkSelector::ExampleL ),
+        ENTRY( "TestLmkNewL", CLmkSelector::TestLmkNewL ),
+        ENTRY( "TestLmkSetMopParent", CLmkSelector::TestLmkSetMopParent ),
+        ENTRY( "TestLmkExecuteLD", CLmkSelector::TestLmkExecuteLD ),
+        ENTRY( "TestLmkExecuteLD2", CLmkSelector::TestLmkExecuteLD2 ),
+        ENTRY( "TestCatNewL", CLmkSelector::TestCatNewL ),
+        ENTRY( "TestCatSetMopParent", CLmkSelector::TestCatSetMopParent ),
+        ENTRY( "TestCatExecuteLD", CLmkSelector::TestCatExecuteLD ),
+        ENTRY( "TestCatExecuteLD2", CLmkSelector::TestCatExecuteLD2 ),
+        //ADD NEW ENTRY HERE
+        // [test cases entries] - Do not remove
+
+        };
+
+    const TInt count = sizeof( KFunctions ) /
+                        sizeof( TStifFunctionInfo );
+
+    return RunInternalL( KFunctions, count, aItem );
+
+    }
+
+// -----------------------------------------------------------------------------
+// CLmkSelector::ExampleL
+// Example test method function.
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+TInt CLmkSelector::ExampleL( CStifItemParser& aItem )
+    {
+
+    // Print to UI
+    _LIT( KLmkSelector, "LmkSelector" );
+    _LIT( KExample, "In Example" );
+    TestModuleIf().Printf( 0, KLmkSelector, 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, KLmkSelector,
+                                KParam, i, &string );
+        i++;
+        }
+
+    return KErrNone;
+
+    }
+
+
+
+ void CLmkSelector::CreateNewLandmark()
+    {
+
+  TRAP_IGNORE(
+	CPosLandmarkDatabase* dBase = CPosLandmarkDatabase::OpenL();
+	CleanupStack::PushL( dBase );
+	if (dBase->IsInitializingNeeded())
+		{
+	ExecuteAndDeleteLD(dBase->InitializeL()); // Synchronous since no argument
+		}
+
+	CPosLmItemIterator*  iterator = dBase->LandmarkIteratorL();
+    CleanupStack::PushL(iterator);
+
+
+    if( iterator->NumOfItemsL() == 0 )
+	    {
+	    CPosLandmark* landmark = CPosLandmark::NewL();
+		CleanupStack::PushL( landmark );
+
+		landmark->SetLandmarkNameL(_L("Nokia"));
+
+		dBase->AddLandmarkL(*landmark);
+		CleanupStack::PopAndDestroy();//landmark
+	    }
+
+ 	CleanupStack::PopAndDestroy(2);	//iterator,dBase
+ 	)
+	}
+
+
+
+
+TInt CLmkSelector::TestLmkNewL( CStifItemParser& aItem )
+{
+			CLmkLandmarkSelectorDlg* aLmkSelectDlg = CLmkLandmarkSelectorDlg::NewL();
+			CleanupStack::PushL( aLmkSelectDlg );
+			CleanupStack::PopAndDestroy();
+			//delete aLmkSelectDlg;
+			//aLmkSelectDlg = NULL;
+
+			return KErrNone;
+}
+
+TInt CLmkSelector::TestLmkSetMopParent( CStifItemParser& aItem )
+{
+      CLmkLandmarkSelectorDlg* iLmkSelectDlg = CLmkLandmarkSelectorDlg::NewL();
+			//iLmkSelectDlg->SetMopParent(this);
+			delete iLmkSelectDlg;
+			iLmkSelectDlg = NULL;
+	//		CleanupStack::Pop();
+			return KErrNone;
+}
+
+TInt CLmkSelector::TestLmkExecuteLD( CStifItemParser& aItem )
+{
+
+CreateNewLandmark();
+
+			TLmkItemIdDbCombiInfo selItem;
+			CLmkLandmarkSelectorDlg* iLmkSelectDlg = CLmkLandmarkSelectorDlg::NewL();
+        	TRAPD( result, iLmkSelectDlg->ExecuteLD(selItem));
+        	return KErrNone;
+}
+
+TInt CLmkSelector::TestLmkExecuteLD2( CStifItemParser& aItem )
+{
+      RArray<TLmkItemIdDbCombiInfo> selItems;
+			CreateNewLandmark();
+			CLmkLandmarkSelectorDlg* iLmkSelectDlg = CLmkLandmarkSelectorDlg::NewL();
+        	TRAPD( result, iLmkSelectDlg->ExecuteLD(selItems));
+        	selItems.Close();
+        	return KErrNone;
+}
+
+TInt CLmkSelector::TestCatNewL( CStifItemParser& aItem )
+{
+      CLmkCategorySelectorDlg* iLmkCategoryDlg = CLmkCategorySelectorDlg::NewL();
+			delete iLmkCategoryDlg;
+			iLmkCategoryDlg = NULL;
+			return KErrNone;
+}
+
+TInt CLmkSelector::TestCatSetMopParent( CStifItemParser& aItem )
+{
+
+			engine = new (ELeave) CLmkEngine;
+			CLmkCategorySelectorDlg* iLmkCategoryDlg = CLmkCategorySelectorDlg::NewL();
+			iLmkCategoryDlg->SetMopParent(engine);
+			delete iLmkCategoryDlg;
+			iLmkCategoryDlg = NULL;
+			return KErrNone;
+}
+
+TInt CLmkSelector::TestCatExecuteLD( CStifItemParser& aItem )
+{
+			TLmkItemIdDbCombiInfo selItem;
+			//CreateNewLandmark();
+			CLmkCategorySelectorDlg* iLmkCategoryDlg = CLmkCategorySelectorDlg::NewL();
+        	TRAPD( result, iLmkCategoryDlg->ExecuteLD(selItem));
+			//delete iLmkCategoryDlg;
+			//iLmkCategoryDlg = NULL;
+			return KErrNone;
+}
+
+TInt CLmkSelector::TestCatExecuteLD2( CStifItemParser& aItem )
+{
+					RArray<TLmkItemIdDbCombiInfo> selItems;
+					//CreateNewLandmark();
+            CLmkCategorySelectorDlg* iLmkCategoryDlg = CLmkCategorySelectorDlg::NewL();
+        	TRAPD( result, iLmkCategoryDlg->ExecuteLD(selItems));
+        	//delete iLmkCategoryDlg;
+			//iLmkCategoryDlg = NULL;
+        	selItems.Close();
+        	return KErrNone;
+}
+// -----------------------------------------------------------------------------
+// CLmkSelector::?member_function
+// ?implementation_description
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+/*
+TInt CLmkSelector::?member_function(
+   CItemParser& aItem )
+   {
+
+   ?code
+
+   }
+*/
+
+// ========================== OTHER EXPORTED FUNCTIONS =========================
+// None
+
+//  [End of File] - Do not remove
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/loc_pub/landmarks_ui_selector_api/tsrc/bc/group/bld.inf	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,40 @@
+/*
+* 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:    LandmarksUi Content File -  Build information file for bc-test code of Landmark Add/Edit API
+*
+*/
+
+
+
+
+
+
+
+
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_TESTEXPORTS
+
+PRJ_EXPORTS
+
+PRJ_TESTMMPFILES
+
+#include "../bcapplmkitemiddbcombiinfo/group/bld.inf"
+#include "../bcapplmkselector/group/bld.inf"
+
+PRJ_MMPFILES
+
+
+//  End of File
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/loc_pub/landmarks_ui_selector_api/tsrc/bmarm/testlmuiselectoru.def	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,3 @@
+EXPORTS
+	LibEntryL__FR13CTestModuleIf @ 1 NONAME R3UNUSED ; LibEntryL(CTestModuleIf &)
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/loc_pub/landmarks_ui_selector_api/tsrc/bwins/testlmuiselectoru.def	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,3 @@
+EXPORTS
+	?LibEntryL@@YAPAVCScriptBase@@AAVCTestModuleIf@@@Z @ 1 NONAME ; class CScriptBase * __cdecl LibEntryL(class CTestModuleIf &)
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/loc_pub/landmarks_ui_selector_api/tsrc/conf/UTlmkselector.cfg	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,87 @@
+//TestLmkNewL
+[Test]
+title TestLmkNewL
+run testscripter c:\testframework\UI_LmkSelector.cfg 1
+[Endtest]
+
+//TestLmkSetMopParent
+[Test]
+title TestLmkSetMopParent
+run testscripter c:\testframework\UI_LmkSelector.cfg 2
+[Endtest]
+
+//TestLmkExecuteLD
+[Test]
+title TestLmkExecuteLD
+run testscripter c:\testframework\UI_LmkSelector.cfg 3
+run testscripter c:\testframework\UI_LmkSelector.cfg 9
+[Endtest]
+
+//TestLmkExecuteLD2
+[Test]
+title TestLmkExecuteLD2
+run testscripter c:\testframework\UI_LmkSelector.cfg 4
+run testscripter c:\testframework\UI_LmkSelector.cfg 9
+[Endtest]
+
+//TestCatNewL
+[Test]
+title TestCatNewL
+run testscripter c:\testframework\UI_LmkSelector.cfg 5
+[Endtest]
+
+//TestCatSetMopParent
+[Test]
+title TestCatSetMopParent
+run testscripter c:\testframework\UI_LmkSelector.cfg 6
+[Endtest]
+
+//TestCatExecuteLD
+[Test]
+title TestCatExecuteLD
+run testscripter c:\testframework\UI_LmkSelector.cfg 7
+run testscripter c:\testframework\UI_LmkSelector.cfg 9
+[Endtest]
+
+//TestCatExecuteLD2
+[Test]
+title TestCatExecuteLD2
+run testscripter c:\testframework\UI_LmkSelector.cfg 8
+run testscripter c:\testframework\UI_LmkSelector.cfg 9
+[Endtest]
+
+[Test]
+title GetItemId
+run testscripter c:\testframework\UI_LmkSelector.cfg 10
+[Endtest]
+
+[Test]
+title GetLmDb
+run testscripter c:\testframework\UI_LmkSelector.cfg 11
+[Endtest]
+
+[Test]
+title SetGetItemId
+run testscripter c:\testframework\UI_LmkSelector.cfg 12
+[Endtest]
+
+[Test]
+title SetGetLmDb
+run testscripter c:\testframework\UI_LmkSelector.cfg 13
+[Endtest]
+
+
+[Test]
+title TestSetDialogTitle
+run testscripter c:\testframework\UI_LmkSelector.cfg 14
+[Endtest]
+
+[Test]
+title TestSetDialogTitle1
+run testscripter c:\testframework\UI_LmkSelector.cfg 15
+[Endtest]
+
+[Test]
+title TestLmkNewLWithUserDatabase
+run testscripter c:\testframework\UI_LmkSelector.cfg 16
+[Endtest]
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/loc_pub/landmarks_ui_selector_api/tsrc/conf/ui_lmkselector.cfg	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,123 @@
+[Test]
+title TestLmkNewL
+create testlmuiselector foobar
+foobar TestLmkNewL pa ra me ters
+delete foobar
+[Endtest] 
+
+[Test]
+title TestLmkSetMopParent
+create testlmuiselector foobar
+foobar TestLmkSetMopParent pa ra me ters
+delete foobar
+[Endtest]
+
+[Test]
+title TestLmkExecuteLD
+create testlmuiselector foobar
+bringtoforeground
+foobar TestLmkExecuteLD pa ra me ters
+delete foobar
+[Endtest]
+
+[Test]
+title TestLmkExecuteLD2
+create testlmuiselector foobar
+bringtoforeground
+foobar TestLmkExecuteLD2 pa ra me ters
+delete foobar
+[Endtest]
+
+[Test]
+title TestCatNewL
+create testlmuiselector foobar
+foobar TestCatNewL pa ra me ters
+delete foobar
+[Endtest] 
+
+[Test]
+title TestCatSetMopParent
+create testlmuiselector foobar
+foobar TestCatSetMopParent pa ra me ters
+delete foobar
+[Endtest]
+
+[Test]
+title TestCatExecuteLD
+create testlmuiselector foobar
+bringtoforeground
+foobar TestCatExecuteLD pa ra me ters
+delete foobar
+[Endtest]
+
+[Test]
+title TestCatExecuteLD2
+create testlmuiselector foobar
+bringtoforeground
+foobar TestCatExecuteLD2 pa ra me ters
+delete foobar
+[Endtest]
+
+[Test]
+title PressKey
+pause 3000
+presskey global EKeyDevice0
+[Endtest]
+
+[Test]
+id 0
+title GetItemId
+create testlmuiselector foobar
+foobar GetItemId
+delete foobar
+[Endtest] 
+
+[Test]
+id 1
+title GetLmDb
+create testlmuiselector foobar
+foobar GetLmDb
+delete foobar
+[Endtest] 
+
+[Test]
+id 2
+title SetGetItemId
+create testlmuiselector foobar
+foobar SetGetItemId
+delete foobar
+[Endtest] 
+
+[Test]
+id 3
+title SetGetLmDb
+create testlmuiselector foobar
+foobar SetGetLmDb
+delete foobar
+[Endtest] 
+
+[Test]
+title TestSetDialogTitle
+create testlmuiselector foobar
+bringtoforeground
+foobar TestSetDialogTitle pa ra me ters
+delete foobar
+[Endtest]
+
+
+[Test]
+title TestSetDialogTitle1
+create testlmuiselector foobar
+bringtoforeground
+foobar TestSetDialogTitle1 pa ra me ters
+delete foobar
+[Endtest]
+
+
+[Test]
+title TestLmkNewLWithUserDatabase
+create testlmuiselector foobar
+bringtoforeground
+foobar TestLmkNewLWithUserDatabase pa ra me ters
+delete foobar
+[Endtest]
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/loc_pub/landmarks_ui_selector_api/tsrc/eabi/testlmuiselectoru.def	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,3 @@
+EXPORTS
+	_Z9LibEntryLR13CTestModuleIf @ 1 NONAME
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/loc_pub/landmarks_ui_selector_api/tsrc/group/bld.inf	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,64 @@
+/*
+* 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:    LandmarksUi Content File -  Build information file for test code of Landmark Selector API
+*
+*/
+
+
+
+
+
+
+
+
+PRJ_PLATFORMS
+// specify the platforms your component needs to be built for here
+// defaults to WINS MARM so you can ignore this if you just build these
+DEFAULT
+
+PRJ_TESTEXPORTS
+// NOTE: If using ARS requirements all export operations should be done under this.
+// 'abld test export'
+
+PRJ_EXPORTS
+// Specify the source file followed by its destination here
+// copy will be used to copy the source file to its destination
+// If there's no destination then the source file will be copied
+// to the same name in /epoc32/include
+// Example: 
+/*
+/agnmodel/inc/AGMCOMON.H
+*/
+
+PRJ_TESTMMPFILES
+// NOTE: If using ARS requirements .mmp file operation should be done under this.
+// 'abld test build'
+testlmuiselector.mmp
+
+PRJ_MMPFILES
+// Specify the .mmp files required for building the important component
+// releasables.
+//
+// Specify "tidy" if the component you need to build doesn't need to be
+// released. Specify "ignore" if the MMP file exists but should be
+// ignored.
+// Example:
+/*
+/agnmodel/group/agnmodel.mmp
+#if defined(MARM)
+/agnmodel/group/agsvexe.mmp
+#endif
+*/
+
+//  End of File
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/loc_pub/landmarks_ui_selector_api/tsrc/group/landmarks_ui_selector_api_test.pkg	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,44 @@
+;
+; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of "Eclipse Public License v1.0"
+; which accompanies this distribution, and is available
+; at the URL "http://www.eclipse.org/legal/epl-v10.html".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description:    LandmarkUi Content File  Package file for test code of Landmark Selector API
+;
+&EN
+;
+; UID is the app's UID
+;
+#{"landmarks_ui_selector_api_test"},(0x101FB3E3),3,0,0,TYPE=SA
+;
+; Localised Vendor name
+%{"Nokia-EN"}
+
+; Unique Vendor name
+:"Nokia"
+
+;Supports Series 60 v 3.0
+;This line indicates that this installation is for the Series 60 platform v3.0
+;This line must appear _exactly_ as shown below in the sis file
+;If this line is missing or incorrect, the sis file will not be able
+;to be installed on Series 60 v3.0 platforms
+[0x101F6F88], 0, 0, 0, {"Series60ProductID"}
+;
+;
+
+; File to install
+
+
+"\epoc32\release\armv5\urel\testlmuiselector.dll"-"C:\sys\bin\testlmuiselector.dll"
+"..\conf\ui_lmkselector.cfg"-"C:\testframework\ui_lmkselector.cfg"
+"..\conf\UTlmkselector.cfg"-"C:\testframework\UTlmkselector.cfg"
+"..\init\testframework.ini"-"C:\testframework\testframework.ini"
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/loc_pub/landmarks_ui_selector_api/tsrc/group/testlmuiselector.mmp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,89 @@
+/*
+* 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:    LandmarksUi Content File -  Project definition file for test code of Landmark Selector API
+*
+*/
+
+
+
+
+
+
+
+        // To get the APP_LAYER_SYSTEMINCLUDE-definition
+#include <platform_paths.hrh>
+
+TARGET          testlmuiselector.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         testlmuiselector.def
+
+SOURCEPATH      ../src
+SOURCE          testlmuiselector.cpp
+SOURCE          testlmuiselectorblocks.cpp
+SOURCE          testlmkitemiddbcombiinf.cpp
+SOURCE          testlmkengine.cpp
+//RESOURCE        resource_file
+//RESOURCE        resource_file2
+
+USERINCLUDE     ../inc 
+
+APP_LAYER_SYSTEMINCLUDE
+
+
+
+LIBRARY         euser.lib
+LIBRARY         stiftestinterface.lib
+LIBRARY         eposlandmarks.lib 
+LIBRARY         LmkCommonUI.lib
+LIBRARY  		eposLandmarks.lib
+LIBRARY	 		lbs.lib
+LIBRARY	 		satinfo.lib
+LIBRARY         eposlmdbmanlib.lib
+
+LANG            SC
+
+
+/*
+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
+SOURCE testlmkengine.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/loc_pub/landmarks_ui_selector_api/tsrc/inc/testlmkengine.h	Wed Sep 01 12:31:27 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:    LandmarkUi Content File
+*
+*/
+
+
+
+
+
+
+//
+//
+#ifndef TLMKENGINE_H
+#define TLMKENGINE_H
+
+#include <coemop.h>
+#include <e32base.h>
+
+class CTestLmkEngine : public CBase, public MObjectProvider
+{
+		public:
+
+		protected:
+//			TTypeUid::Ptr MopSupplyObject(TTypeUid aId);
+//    	MObjectProvider* MopNext();
+};
+
+#endif      // TLMKENGINE_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/loc_pub/landmarks_ui_selector_api/tsrc/inc/testlmkitemiddbcombiinf.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,80 @@
+/*
+* 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:    LandmarksUi Content File -  Class used for testing TLmkItemIdDbCombiInfo class
+*
+*/
+
+
+
+
+
+
+
+#ifndef TLMKITEMIDDBCOMBIINF_H
+#define TLMKITEMIDDBCOMBIINF_H
+
+//  INCLUDES
+#include <e32base.h>            // CBase
+
+/**
+* Class used for testing TLmkItemIdDbCombiInfo class.
+*
+*/
+class TLmkItemIdDbCombiInf
+{
+
+   public:  // Constructors and destructor
+        /**
+        * C++ default constructor.
+        * @return newly instantiated object
+        */
+
+        TLmkItemIdDbCombiInf();
+
+        /**
+        * Destructor.
+        */
+        ~TLmkItemIdDbCombiInf();
+
+   public: // Functions for getting/setting the info
+
+        /**
+        * Set & get the item id.
+        */
+        void GetItemIdL();
+
+        /**
+        * Set & get the Landmarks Db handle.
+        */
+
+        void GetLmDbL();
+
+        /**
+        * Set & get the item id.
+        */
+        void SetGetItemIdL();
+
+        /**
+        * Set & get the Landmarks Db handle.
+        */
+
+        void SetGetLmDbL();
+
+
+private: // own data
+
+};
+
+
+#endif // TLmkItemIdDbCombiInf_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/loc_pub/landmarks_ui_selector_api/tsrc/inc/testlmuiselector.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,217 @@
+/*
+* 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:    LandmarksUi Content File -  LandmarkUi selector Test class for STIF Test Framework TestScripter
+*
+*/
+
+
+
+
+
+
+
+
+#ifndef CTESTLMUISELECTOR_H
+#define CTESTLMUISELECTOR_H
+
+//  INCLUDES
+#include <StifLogger.h>
+#include <TestScripterInternal.h>
+#include <StifTestModule.h>
+#include <clmklandmarkselectordlg.h>
+#include <clmkcategoryselectordlg.h>
+#include <tlmkitemiddbcombiinfo.h>
+
+#include "testLmkEngine.h"
+
+
+// CONSTANTS
+_LIT( KUserDatabaseUri, "file://c:StifTestDbLoc.ldb" );
+
+//const ?type ?constant_var = ?constant;
+
+// MACROS
+//#define ?macro ?macro_def
+// Logging path
+_LIT( KTestLmUiSelectorLogPath, "\\logs\\testframework\\testlmuiselector\\" );
+// Log file
+_LIT( KTestLmUiSelectorLogFile, "testlmuiselector.txt" );
+
+// FUNCTION PROTOTYPES
+//?type ?function_name(?arg_list);
+
+// FORWARD DECLARATIONS
+//class ?FORWARD_CLASSNAME;
+class CTestLmUiSelector;
+
+// DATA TYPES
+//enum ?declaration
+//typedef ?declaration
+//extern ?data_type;
+
+// CLASS DECLARATION
+
+/**
+*  CTestLmUiSelector test class for STIF Test Framework TestScripter.
+*  ?other_description_lines
+*
+*  @lib ?library
+*  @since ?Series60_version
+*/
+NONSHARABLE_CLASS(CTestLmUiSelector) : public CScriptBase
+    {
+    public:  // Constructors and destructor
+
+        /**
+        * Two-phased constructor.
+        */
+        static CTestLmUiSelector* NewL( CTestModuleIf& aTestModuleIf );
+
+        /**
+        * Destructor.
+        */
+        virtual ~CTestLmUiSelector();
+
+    public: // New functions
+
+        /**
+        * ?member_description.
+        * @since ?Series60_version
+        * @param ?arg1 ?description
+        * @return ?description
+        */
+        //?type ?member_function( ?type ?arg1 );
+
+    public: // Functions from base classes
+
+        /**
+        * From CScriptBase Runs a script line.
+        * @since ?Series60_version
+        * @param aItem Script line containing method name and parameters
+        * @return Symbian OS error code
+        */
+        virtual TInt RunMethodL( CStifItemParser& aItem );
+
+    protected:  // New functions
+
+        /**
+        * ?member_description.
+        * @since ?Series60_version
+        * @param ?arg1 ?description
+        * @return ?description
+        */
+        //?type ?member_function( ?type ?arg1 );
+
+    protected:  // Functions from base classes
+
+        /**
+        * From ?base_class ?member_description
+        */
+        //?type ?member_function();
+
+    private:
+
+        /**
+        * C++ default constructor.
+        */
+        CTestLmUiSelector( 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.
+        */
+
+        //ADD NEW METHOD DEC HERE
+
+        /**
+        * Set & get the item id.
+        */
+        virtual TInt GetItemIdL( CStifItemParser& aItem );
+
+        /**
+        * Set & get the Landmarks Db handle.
+        */
+
+        virtual TInt GetLmDbL( CStifItemParser& aItem );
+
+        /**
+        * Set & get the item id.
+        */
+        virtual TInt SetGetItemIdL( CStifItemParser& aItem );
+
+        /**
+        * Set & get the Landmarks Db handle.
+        */
+
+        virtual TInt SetGetLmDbL( CStifItemParser& aItem );
+        
+        virtual TInt TestLmkNewL( CStifItemParser& aItem );
+        virtual TInt TestLmkSetMopParent( CStifItemParser& aItem );
+        virtual TInt TestLmkExecuteLD( CStifItemParser& aItem );
+        virtual TInt TestLmkExecuteLD2( CStifItemParser& aItem );
+        virtual TInt TestCatNewL( CStifItemParser& aItem );
+        virtual TInt TestCatSetMopParent( CStifItemParser& aItem );
+        virtual TInt TestCatExecuteLD( CStifItemParser& aItem );
+        virtual TInt TestCatExecuteLD2( CStifItemParser& aItem );
+        virtual TInt TestLmkNewLWithUserDatabase( CStifItemParser& aItem );
+        virtual TInt TestSetDialogTitle( CStifItemParser& aItem );
+        virtual TInt TestSetDialogTitle1( CStifItemParser& aItem );
+       
+        void CreateNewLandmark();
+        void CreateOwnLandMarks();
+
+
+    public:     // Data
+        // ?one_line_short_description_of_data
+        //?data_declaration;
+
+    protected:  // Data
+        // ?one_line_short_description_of_data
+        //?data_declaration;
+
+    private:    // Data
+    	CTestLmkEngine* engine;
+
+        // ?one_line_short_description_of_data
+        //?data_declaration;
+
+        // Reserved pointer for future extension
+        //TAny* iReserved;
+    public:     // Friend classes
+        //?friend_class_declaration;
+    protected:  // Friend classes
+        //?friend_class_declaration;
+    private:    // Friend classes
+        //?friend_class_declaration;
+
+    };
+
+#endif      // CTESTLMUISELECTOR_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/loc_pub/landmarks_ui_selector_api/tsrc/init/testframework.ini	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,200 @@
+#
+# This is STIF initialization file
+# Comment lines start with '#'-character.
+# See STIF TestFramework users guide.doc for instructions
+
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+# Set following test engine settings:
+#	- Set Test Reporting mode. TestReportMode's possible values are:
+#		+ 'Summary': Summary of the tested test cases.
+#		+ 'Environment': Hardware and software info.
+#		+ 'TestCases': Test case report.
+#		+ 'FullReport': Set of all above ones.
+#		+ Example 'TestReportMode= Summary TestCases'
+#
+# 	- CreateTestReport setting controls report creation mode
+#		+ YES, Test report will created.
+#		+ NO, No Test report.
+#
+# 	- File path indicates the base path of the test report.
+# 	- File name indicates the name of the test report.
+#
+# 	- File format indicates the type of the test report.
+#		+ TXT, Test report file will be txt type, for example 'TestReport.txt'.
+#		+ HTML, Test report will be html type, for example 'TestReport.html'.
+#   + XML, Test report will be xml type, for example 'TestReport.xml'.
+#          Note, that xml format is available only when output is set to FILE.
+#
+# 	- File output indicates output source of the test report.
+#		+ FILE, Test report logging to file.
+#		+ RDEBUG, Test report logging to using rdebug.
+#
+# 	- File Creation Mode indicates test report overwriting if file exist.
+#		+ OVERWRITE, Overwrites if the Test report file exist.
+#		+ APPEND, Continue logging after the old Test report information if
+#                 report exist.
+# 	- Sets a device reset module's dll name(Reboot).
+#		+ If Nokia specific reset module is not available or it is not correct one
+#		  StifHWResetStub module may use as a template for user specific reset
+#		  module.
+# 	- Sets STIF test measurement disable options. e.g. pluging1 and pluging2 disablation
+#		DisableMeasurement= stifmeasurementplugin01 stifmeasurementplugin02
+#
+
+[Engine_Defaults]
+
+TestReportMode= FullReport    # Possible values are: 'Empty', 'Summary', 'Environment',
+                                                     'TestCases' or 'FullReport'
+
+CreateTestReport= YES         # Possible values: YES or NO
+
+TestReportFilePath= C:\LOGS\TestFramework\
+TestReportFileName= TestReport
+
+TestReportFormat= TXT         # Possible values: TXT, HTML or XML
+TestReportOutput= FILE        # Possible values: FILE or RDEBUG
+TestReportFileCreationMode= OVERWRITE # Possible values: OVERWRITE or APPEND
+
+DeviceResetDllName= StifResetForNokia.dll # e.g. 'StifHWResetStub.dll' for user specific reseting
+
+DisableMeasurement= stifmeasurementdisablenone  # Possible values are:
+              # 'stifmeasurementdisablenone', 'stifmeasurementdisableall'
+              # 'stifmeasurementplugin01', 'stifmeasurementplugin02',
+              # 'stifmeasurementplugin03', 'stifmeasurementplugin04',
+              # 'stifmeasurementplugin05' or 'stifbappeaprofiler'
+
+Timeout= 0                    # Default timeout value for each test case. In milliseconds
+UITestingSupport= YES        # Possible values: YES or NO
+SeparateProcesses= YES       # Possible values: YES or NO (default: NO)
+[End_Defaults]
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+
+
+
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+# Module configurations start
+# Modules are added between module tags
+# tags. Module name is specified after ModuleName= tag, like
+# ModuleName= XXXXXXXXX
+# Modules might have initialisation file, specified as
+# IniFile= c:\testframework\YYYYYY
+# Modules might have several configuration files, like
+# TestCaseFile= c:\testframework\NormalCases.txt
+# TestCaseFile= c:\testframework\SmokeCases.txt
+# TestCaseFile= c:\testframework\ManualCases.txt
+
+# (TestCaseFile is synonym for old term ConfigFile)
+
+# Following case specifies demo module settings. Demo module
+# does not read any settings from file, so tags 
+# IniFile and TestCaseFile are not used.
+# In the simplest case it is enough to specify only the
+# name of the test module when adding new test module
+
+[New_Module]
+ModuleName= testcombiner
+TestCaseFile= c:\testframework\UTlmkselector.cfg
+[End_Module]
+
+
+# Load testmoduleXXX, optionally with initialization file and/or test case files
+#[New_Module]
+#ModuleName= testmodulexxx
+
+#TestModuleXXX used initialization file
+#IniFile= c:\testframework\init.txt
+
+#TestModuleXXX used configuration file(s)
+#TestCaseFile= c:\testframework\testcases1.cfg
+#TestCaseFile= c:\testframework\testcases2.cfg
+#TestCaseFile= c:\testframework\manualtestcases.cfg
+
+#[End_Module]
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+
+
+
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+# Set STIF logging overwrite parameters for Logger.
+# 	Hardware and emulator environment logging path and styles can
+# 	be configured from here to overwrite the Logger's implemented values.
+#	
+#	Settings description:
+#	- Indicates option for creation log directory/directories. If log directory/directories
+#         is/are not created by user they will make by software.
+#		+ YES, Create log directory/directories if not allready exist.
+#		+ NO, Log directory/directories not created. Only created one is used.
+#
+#	- Overwrite emulator path setting.
+#		+ Example: If 'EmulatorBasePath= C:\LOGS\TestFramework\' and in code is defined 
+#		           Logger's path 'D:\\LOGS\\Module\\' with those definition the path
+#		           will be 'C:\LOGS\TestFramework\LOGS\Module\'
+#
+#	- Overwrite emulator's logging format.
+#		+ TXT, Log file(s) will be txt type(s), for example 'Module.txt'.
+#		+ HTML, Log file(s) will be html type(s), for example 'Module.html'.
+#
+#	- Overwrited emulator logging output source.
+#		+ FILE, Logging to file(s).
+#		+ RDEBUG, Logging to using rdebug(s).
+#
+#	- Overwrite hardware path setting (Same description as above in emulator path).
+#	- Overwrite hardware's logging format(Same description as above in emulator format).
+#	- Overwrite hardware's logging output source(Same description as above in emulator output).
+#
+#	- File Creation Mode indicates file overwriting if file exist.
+#		+ OVERWRITE, Overwrites if file(s) exist.
+#		+ APPEND, Continue logging after the old logging information if file(s) exist.
+#
+#	- Will thread id include to the log filename.
+#		+ YES, Thread id to log file(s) name, Example filename 'Module_b9.txt'.
+#		+ NO, No thread id to log file(s), Example filename 'Module.txt'.
+#
+#	- Will time stamps include the to log file.
+#		+ YES, Time stamp added to each line in log file(s). Time stamp is 
+#                 for example'12.Nov.2003 115958    LOGGING INFO'
+#		+ NO, No time stamp(s).
+#
+#	- Will line breaks include to the log file.
+#		+ YES, Each logging event includes line break and next log event is in own line.
+#		+ NO, No line break(s).
+#
+#	- Will event ranking include to the log file.
+#		+ YES, Event ranking number added to each line in log file(s). Ranking number
+#                 depends on environment's tics, for example(includes time stamp also)
+#                 '012   12.Nov.2003 115958    LOGGING INFO'
+#		+ NO, No event ranking.
+#
+#	- Will write log file in unicode format.
+#		+ YES, Log file will be written in unicode format
+#		+ NO, Log will be written as normal, not unicode, file.
+#
+
+[Logger_Defaults]
+
+#NOTE: If you want to set Logger using next setting(s) remove comment(s)'#'
+#NOTE: TestEngine and TestServer logging settings cannot change here
+
+#CreateLogDirectories= YES    # Possible values: YES or NO
+
+#EmulatorBasePath= C:\LOGS\TestFramework\
+#EmulatorFormat= HTML         # Possible values: TXT or HTML
+#EmulatorOutput= FILE         # Possible values: FILE or RDEBUG
+
+#HardwareBasePath= D:\LOGS\TestFramework\
+#HardwareFormat= HTML         # Possible values: TXT or HTML
+#HardwareOutput= FILE         # Possible values: FILE or RDEBUG
+
+#FileCreationMode= OVERWRITE  # Possible values: OVERWRITE or APPEND
+
+#ThreadIdToLogFile= YES       # Possible values: YES or NO
+#WithTimeStamp= YES           # Possible values: YES or NO
+#WithLineBreak= YES           # Possible values: YES or NO
+#WithEventRanking= YES        # Possible values: YES or NO
+
+#FileUnicode= YES             # Possible values: YES or NO
+#AddTestCaseTitle= YES        # Possible values: YES or NO
+[End_Logger_Defaults]
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+
+# End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/loc_pub/landmarks_ui_selector_api/tsrc/src/testlmkengine.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,88 @@
+/*
+* 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:    LandmarkUi Content File
+*
+*/
+
+
+
+
+
+
+
+
+// INCLUDE FILES
+
+#include "TestLmkEngine.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
+    }
+*/
+
+//TTypeUid::Ptr CTestLmkEngine::MopSupplyObject(TTypeUid /*aId*/)
+//{
+//}
+//
+//MObjectProvider* CTestLmkEngine::MopNext()
+//{
+//	return NULL;
+//}
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/loc_pub/landmarks_ui_selector_api/tsrc/src/testlmkitemiddbcombiinf.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,125 @@
+/*
+* 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:    LandmarksUi Content File -  Implementation for testing TLmkItemIdDbCombiInfo class
+*
+*/
+
+
+
+
+
+
+
+// INCLUDE FILES
+#include <epos_landmarks.h>     // Lm typedefs, constants etc.
+#include <TLmkItemIdDbCombiInfo.h>
+#include <epos_cposlandmarkdatabase.h>
+
+#include "testlmkitemiddbcombiinf.h"
+
+// ============================ MEMBER FUNCTIONS ===============================
+// -----------------------------------------------------------------------------
+// TLmkItemIdDbCombiInf::TLmkItemIdDbCombiInf()
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+TLmkItemIdDbCombiInf::TLmkItemIdDbCombiInf()
+	{
+	}
+
+// -----------------------------------------------------------------------------
+// TLmkItemIdDbCombiInf::~TLmkItemIdDbCombiInf()
+// -----------------------------------------------------------------------------
+//
+TLmkItemIdDbCombiInf::~TLmkItemIdDbCombiInf()
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// TLmkItemIdDbCombiInf::GetItemIdL()
+//
+// -----------------------------------------------------------------------------
+//
+ void TLmkItemIdDbCombiInf::GetItemIdL()
+	 {
+	 TLmkItemIdDbCombiInfo info;
+	 TPosLmItemId id = info.GetItemId();
+	 if( id != 0 )
+		 {
+		 User::Leave(KErrGeneral);
+		 }
+
+	 }
+
+// -----------------------------------------------------------------------------
+// TLmkItemIdDbCombiInf::GetLmDbL()
+//
+// -----------------------------------------------------------------------------
+//
+ void TLmkItemIdDbCombiInf::GetLmDbL()
+	{
+	TLmkItemIdDbCombiInfo info;
+	CPosLandmarkDatabase* db = info.GetLmDb();
+	 if( db )
+		 {
+		 User::Leave(KErrGeneral);
+		 }
+	}
+
+// -----------------------------------------------------------------------------
+// TLmkItemIdDbCombiInf::SetGetItemIdL()
+//
+// -----------------------------------------------------------------------------
+//
+ void TLmkItemIdDbCombiInf::SetGetItemIdL()
+	 {
+	 TLmkItemIdDbCombiInfo info;
+	 TPosLmItemId id = 5;
+	 info.SetItemId(id);
+	 if( id != info.GetItemId() )
+		 {
+		 User::Leave(KErrGeneral);
+		 }
+
+	 }
+
+// -----------------------------------------------------------------------------
+// TLmkItemIdDbCombiInf::SetGetLmDbL()
+//
+// -----------------------------------------------------------------------------
+//
+ void TLmkItemIdDbCombiInf::SetGetLmDbL()
+	{
+	TLmkItemIdDbCombiInfo info;
+	CPosLandmarkDatabase* db1 = CPosLandmarkDatabase::OpenL();
+	info.SetLmDb(db1);
+
+	CPosLandmarkDatabase* db2 = info.GetLmDb();
+
+	if( !db2 )
+		 {
+		 User::Leave(KErrGeneral);
+		 }
+
+    delete db1;
+	ReleaseLandmarkResources();
+	}
+
+ // End of file
+
+
+
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/loc_pub/landmarks_ui_selector_api/tsrc/src/testlmuiselector.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,153 @@
+/*
+* 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:    LandmarksUi Content File -  Implementation of test class for Landmark Selector API
+*
+*/
+
+
+
+
+
+
+
+
+// INCLUDE FILES
+#include <Stiftestinterface.h>
+#include "testlmuiselector.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 ===============================
+
+// -----------------------------------------------------------------------------
+// CTestLmUiSelector::CTestLmUiSelector
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+CTestLmUiSelector::CTestLmUiSelector(
+    CTestModuleIf& aTestModuleIf ):
+        CScriptBase( aTestModuleIf )
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CTestLmUiSelector::ConstructL
+// Symbian 2nd phase constructor can leave.
+// -----------------------------------------------------------------------------
+//
+void CTestLmUiSelector::ConstructL()
+    {
+    iLog = CStifLogger::NewL( KTestLmUiSelectorLogPath,
+                          KTestLmUiSelectorLogFile,
+                          CStifLogger::ETxt,
+                          CStifLogger::EFile,
+                          EFalse );
+
+    }
+
+// -----------------------------------------------------------------------------
+// CTestLmUiSelector::NewL
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+CTestLmUiSelector* CTestLmUiSelector::NewL(
+    CTestModuleIf& aTestModuleIf )
+    {
+    CTestLmUiSelector* self = new (ELeave) CTestLmUiSelector( aTestModuleIf );
+
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop();
+
+    return self;
+
+    }
+
+// Destructor
+CTestLmUiSelector::~CTestLmUiSelector()
+    {
+
+    // Delete resources allocated from test methods
+    Delete();
+
+    // Delete logger
+    delete iLog;
+
+    }
+
+// ========================== OTHER EXPORTED FUNCTIONS =========================
+
+// -----------------------------------------------------------------------------
+// LibEntryL is a polymorphic Dll entry point.
+// Returns: CScriptBase: New CScriptBase derived object
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CScriptBase* LibEntryL(
+    CTestModuleIf& aTestModuleIf ) // Backpointer to STIF Test Framework
+    {
+
+    return ( CScriptBase* ) CTestLmUiSelector::NewL( aTestModuleIf );
+
+    }
+
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/loc_pub/landmarks_ui_selector_api/tsrc/src/testlmuiselectorblocks.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,645 @@
+/*
+* 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:    LandmarksUi Content File -  Entry point for test cases in stif module
+*
+*/
+
+
+
+
+
+
+
+
+// INCLUDE FILES
+#include <e32svr.h>
+#include <StifParser.h>
+#include <Stiftestinterface.h>
+#include <EPos_CPosLmDatabaseManager.h>
+#include "testlmuiselector.h"
+#include "testlmkitemiddbcombiinf.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 ===============================
+
+// -----------------------------------------------------------------------------
+// CTestLmUiSelector::Delete
+// Delete here all resources allocated and opened from test methods.
+// Called from destructor.
+// -----------------------------------------------------------------------------
+//
+void CTestLmUiSelector::Delete()
+    {
+
+    }
+
+// -----------------------------------------------------------------------------
+// CTestLmUiSelector::RunMethodL
+// Run specified method. Contains also table of test mothods and their names.
+// -----------------------------------------------------------------------------
+//
+TInt CTestLmUiSelector::RunMethodL(
+    CStifItemParser& aItem )
+    {
+
+    static TStifFunctionInfo const KFunctions[] =
+    {
+            // Copy this line for every implemented function.
+            // First string is the function name used in TestScripter script file.
+            // Second is the actual implementation member function.
+            ENTRY( "GetItemId", CTestLmUiSelector::GetItemIdL ),
+            ENTRY( "GetLmDb", CTestLmUiSelector::GetLmDbL ),
+            ENTRY( "SetGetItemId", CTestLmUiSelector::SetGetItemIdL ),
+            ENTRY( "SetGetLmDb", CTestLmUiSelector::SetGetLmDbL ),
+            ENTRY( "TestLmkNewL", CTestLmUiSelector::TestLmkNewL ),
+            ENTRY( "TestLmkSetMopParent", CTestLmUiSelector::TestLmkSetMopParent ),
+            ENTRY( "TestLmkExecuteLD", CTestLmUiSelector::TestLmkExecuteLD ),
+            ENTRY( "TestLmkExecuteLD2", CTestLmUiSelector::TestLmkExecuteLD2 ),
+            ENTRY( "TestCatNewL", CTestLmUiSelector::TestCatNewL ),
+            ENTRY( "TestCatSetMopParent", CTestLmUiSelector::TestCatSetMopParent ),
+            ENTRY( "TestCatExecuteLD", CTestLmUiSelector::TestCatExecuteLD ),
+            ENTRY( "TestCatExecuteLD2", CTestLmUiSelector::TestCatExecuteLD2 ),
+            ENTRY( "TestSetDialogTitle", CTestLmUiSelector::TestSetDialogTitle ),
+            ENTRY( "TestSetDialogTitle1", CTestLmUiSelector::TestSetDialogTitle1 ),
+            ENTRY("TestLmkNewLWithUserDatabase",CTestLmUiSelector::TestLmkNewLWithUserDatabase)
+            
+    };
+
+    const TInt count = sizeof( KFunctions ) /
+                        sizeof( TStifFunctionInfo );
+
+    return RunInternalL( KFunctions, count, aItem );
+
+    }
+
+//------------------------------------------------------------------------------
+//------------------Test Code for TLmkItemIdDbCombiInfo.h-----------------------
+//------------------------------------------------------------------------------
+
+// -----------------------------------------------------------------------------
+// CTestLmUiSelector::GetItemIdL
+// Get item id.
+// -----------------------------------------------------------------------------
+//
+TInt CTestLmUiSelector::GetItemIdL( CStifItemParser& /* aItem */ )
+	{
+	TLmkItemIdDbCombiInf info;
+	info.GetItemIdL();
+
+	return KErrNone;
+	}
+
+// -----------------------------------------------------------------------------
+// CTestLmUiSelector::GetLmDbL
+// Get Lm db handle.
+// -----------------------------------------------------------------------------
+//
+TInt CTestLmUiSelector::GetLmDbL( CStifItemParser& /* aItem */ )
+	{
+	TLmkItemIdDbCombiInf info;
+	info.GetLmDbL();
+
+	return KErrNone;
+	}
+
+// -----------------------------------------------------------------------------
+// CTestLmUiSelector::SetGetItemIdL
+// Set & get item id.
+// -----------------------------------------------------------------------------
+//
+TInt CTestLmUiSelector::SetGetItemIdL( CStifItemParser& /* aItem */ )
+	{
+	TLmkItemIdDbCombiInf info;
+	info.SetGetItemIdL();
+
+	return KErrNone;
+	}
+
+// -----------------------------------------------------------------------------
+// CTestLmUiSelector::SetGetLmDbL
+// Set & get Lm db handle.
+// -----------------------------------------------------------------------------
+//
+TInt CTestLmUiSelector::SetGetLmDbL( CStifItemParser& /* aItem */ )
+	{
+	TLmkItemIdDbCombiInf info;
+	info.SetGetLmDbL();
+
+	return KErrNone;
+	}
+
+//------------------------------------------------------------------------------
+//------------------End of Test Code for TLmkItemIdDbCombiInfo.h----------------
+//------------------------------------------------------------------------------
+
+
+//------------------------------------------------------------------------------
+//------------------Test Code for CLmkLandmarkSelectorDlg.h---------------------
+//------------------------------------------------------------------------------
+
+// -----------------------------------------------------------------------------
+// CTestLmUiSelector::TestLmkNewL
+// To test the creation of instance for CLmkLandmarkSelectorDlg.
+// -----------------------------------------------------------------------------
+//
+
+TInt CTestLmUiSelector::TestLmkNewL( CStifItemParser& aItem )
+{
+	TInt result = KErrNone;
+	CLmkLandmarkSelectorDlg* iLmkSelectDlg = NULL;
+	TRAPD(error, iLmkSelectDlg = CLmkLandmarkSelectorDlg::NewL());
+	if(error!= KErrNone ||!iLmkSelectDlg)
+		{
+		iLog->Log(_L("FAILED:Creating instance for CLmkLandmarkSelectorDlg failed, result %d"), error);
+		result = KErrGeneral;
+		}
+	else
+		{
+		delete iLmkSelectDlg;
+		iLmkSelectDlg = NULL;
+		iLog->Log(_L("PASSED: Creating instance for CLmkLandmarkSelectorDlg passed"));
+		}
+	return result;
+}
+
+// -----------------------------------------------------------------------------
+// CTestLmUiSelector::TestLmkSetMopParent
+// To test setting the context for this control
+// -----------------------------------------------------------------------------
+//
+TInt CTestLmUiSelector::TestLmkSetMopParent( CStifItemParser& aItem )
+{
+	TInt result = KErrNone;
+	CLmkLandmarkSelectorDlg* iLmkSelectDlg = NULL;
+	TRAPD(error, iLmkSelectDlg = CLmkLandmarkSelectorDlg::NewL());
+	if(error!= KErrNone ||!iLmkSelectDlg)
+		{
+		iLog->Log(_L("FAILED:Creating instance for CLmkLandmarkSelectorDlg failed, result %d"), error);
+		result = KErrGeneral;
+		}
+	else
+		{
+		iLmkSelectDlg->SetMopParent(engine);
+		delete iLmkSelectDlg;
+		iLmkSelectDlg = NULL;
+		iLog->Log(_L("PASSED: Testing Setting context passed"));
+		}
+	return result;
+}
+
+// -----------------------------------------------------------------------------
+// CTestLmUiSelector::TestLmkExecuteLD2
+// Test test the launch single category selector dialog.
+// -----------------------------------------------------------------------------
+//
+TInt CTestLmUiSelector::TestLmkExecuteLD( CStifItemParser& aItem )
+{
+	
+	CreateNewLandmark();	
+	TLmkItemIdDbCombiInfo selItem;
+	TInt result = KErrNone;
+	CLmkLandmarkSelectorDlg* iLmkSelectDlg = NULL;
+	TRAPD(error, iLmkSelectDlg = CLmkLandmarkSelectorDlg::NewL());
+	if(error!= KErrNone ||!iLmkSelectDlg)
+		{
+		iLog->Log(_L("FAILED:Creating instance for CLmkLandmarkSelectorDlg failed, result %d"), error);
+		result = KErrGeneral;
+		}
+	else
+		{
+		TRAP(error, result = iLmkSelectDlg->ExecuteLD(selItem));
+		if(error != KErrNone)
+			{
+			iLog->Log(_L("FAILED: ExecuteLD fails. Result = %d"), result);
+			result = KErrGeneral;
+			}
+		else
+		    {
+			iLog->Log(_L("PASSED:launching single landmark dialog passes"));
+			result = KErrNone;
+		    }
+//		delete iLmkSelectDlg;
+//		iLmkSelectDlg = NULL;
+		}
+	return result;
+}
+
+// -----------------------------------------------------------------------------
+// CTestLmUiSelector::TestLmkExecuteLD2
+// To test the launch multiple landmark selector dialog
+// -----------------------------------------------------------------------------
+//
+TInt CTestLmUiSelector::TestLmkExecuteLD2( CStifItemParser& aItem )
+{
+	RArray<TLmkItemIdDbCombiInfo> selItems;
+	CreateNewLandmark();
+	TInt result = KErrNone;
+	CLmkLandmarkSelectorDlg* iLmkSelectDlg = NULL;
+	TRAPD(error, iLmkSelectDlg = CLmkLandmarkSelectorDlg::NewL());
+	if(error!= KErrNone ||!iLmkSelectDlg)
+		{
+		iLog->Log(_L("FAILED:Creating instance for CLmkLandmarkSelectorDlg failed, result %d"), error);
+		result = KErrGeneral;
+		}     
+	else
+		{
+		TRAP( error, result = iLmkSelectDlg->ExecuteLD(selItems));
+		if(error != KErrNone)
+			{
+			iLog->Log(_L("FAILED: ExecuteLD fails. Error = %d"),error);
+			result = KErrGeneral;
+			}
+		else
+		    {
+			iLog->Log(_L("PASSED:launching multiple landmark dialog passes"));
+			result = KErrNone;
+		    }
+//
+//		delete iLmkSelectDlg;
+//		iLmkSelectDlg = NULL;
+		}
+	selItems.Close();
+	return result;
+}
+// -----------------------------------------------------------------------------
+// CTestLmUiSelector::NewL
+// To test the SetDialog Title of landmark selector dialog
+// -----------------------------------------------------------------------------
+//
+TInt CTestLmUiSelector::TestLmkNewLWithUserDatabase( CStifItemParser& aItem )
+    {
+    CreateOwnLandMarks();    
+    TLmkItemIdDbCombiInfo selItem;
+    TInt result = KErrNone;
+    CLmkLandmarkSelectorDlg* iLmkSelectDlg = NULL;
+    TRAPD(error, iLmkSelectDlg = CLmkLandmarkSelectorDlg::NewL(KUserDatabaseUri));
+    if(result!= KErrNone ||!iLmkSelectDlg)
+        {
+        iLog->Log(_L("FAILED:Creating instance for CLmkLandmarkSelectorDlg failed, result %d"), error);
+        result = KErrGeneral;
+        }
+    else
+        {
+        TRAPD(error1, result = iLmkSelectDlg->ExecuteLD(selItem));
+        if(error1 != KErrNone || result != KErrNone)
+            {
+            iLog->Log(_L("FAILED: ExecuteLD fails. Error = %d, Result = %d"), error1, result);
+            result = KErrGeneral;
+            }
+        else
+            iLog->Log(_L("PASSED:launching single landmark dialog passes"));
+        }
+    return KErrNone;
+    }
+
+
+
+// -----------------------------------------------------------------------------
+// CTestLmUiSelector::TestSetDialogTitle
+// To test the SetDialog Title of landmark selector dialog
+// -----------------------------------------------------------------------------
+//
+TInt CTestLmUiSelector::TestSetDialogTitle( CStifItemParser& aItem )
+    {
+    TInt result = KErrNone;
+    CreateNewLandmark(); 
+    TLmkItemIdDbCombiInfo selItem;
+    CLmkLandmarkSelectorDlg* iLmkSelectDlg = NULL;
+    TRAPD(error, iLmkSelectDlg = CLmkLandmarkSelectorDlg::NewL());
+    if(result!= KErrNone ||!iLmkSelectDlg)
+        {
+        iLog->Log(_L("FAILED:Creating instance for CLmkLandmarkSelectorDlg failed, result %d"), error);
+        result = KErrGeneral;
+        }
+    else
+        {
+        _LIT(Kdes,"Test Title");
+        TBuf<20> buf;
+        buf=Kdes;
+        TRAPD(error1,iLmkSelectDlg->SetDialogTitleL(buf));
+        if(error1 != KErrNone || result != KErrNone)
+            {
+            iLog->Log(_L("FAILED: SetDialogTitleL fails. Error = %d, Result = %d"), error1, result);
+            result = KErrGeneral;
+            }
+        else
+            {
+            iLog->Log(_L("PASSED: SetDialogTitleL for CLmkLandmarkSelectorDlg passed"));
+            TRAPD(error2,iLmkSelectDlg->ExecuteLD(selItem));
+            if(error2!=KErrNone ||  result!=KErrNone)
+                {
+                iLog->Log(_L("FAILED: ExecuteLD fails. Error = %d, Result = %d"), error2, result);
+                result = KErrGeneral;
+                }
+            else
+                iLog->Log(_L("PASSED: Test of Set Dialog Title Passed"));
+            }
+        }
+    return result;
+    }
+
+
+
+// -----------------------------------------------------------------------------
+// CTestLmUiSelector::TestSetDialogTitle1
+// To test the SetDialog Title of landmark selector dialog(Null Value : Landmarks)
+// -----------------------------------------------------------------------------
+//
+TInt CTestLmUiSelector::TestSetDialogTitle1( CStifItemParser& aItem )
+    {
+    TInt result = KErrNone;
+    CreateNewLandmark(); 
+    TBuf<50> buf;
+    buf=KNullDesC;
+    TLmkItemIdDbCombiInfo selItem;
+    CLmkLandmarkSelectorDlg* iLmkSelectDlg = NULL;
+    TRAPD(error, iLmkSelectDlg = CLmkLandmarkSelectorDlg::NewL());
+    if(result!= KErrNone ||!iLmkSelectDlg)
+        {
+        iLog->Log(_L("FAILED:Creating instance for CLmkLandmarkSelectorDlg failed, result %d"), error);
+        result = KErrGeneral;
+        }
+    else
+        {
+        TRAPD(error1,iLmkSelectDlg->SetDialogTitleL(buf));
+        if(error1 != KErrNone || result != KErrNone)
+            {
+            iLog->Log(_L("FAILED: SetDialogTitleL fails. Error = %d, Result = %d"), error1, result);
+            result = KErrGeneral;
+            }
+        else
+            {
+            iLog->Log(_L("PASSED: SetDialogTitleL for CLmkLandmarkSelectorDlg passed"));
+            TRAPD(error2,iLmkSelectDlg->ExecuteLD(selItem));
+            if(error2!=KErrNone ||  result!=KErrNone)
+                {
+                iLog->Log(_L("FAILED: ExecuteLD fails. Error = %d, Result = %d"), error2, result);
+                result = KErrGeneral;
+                }
+            else
+                iLog->Log(_L("PASSED: Test of Set Dialog Title with NULL value Passed"));
+            }
+        }
+    return result;
+    }
+
+
+//------------------------------------------------------------------------------
+//------------------End of Test Code for CLmkLandmarkSelectorDlg.h--------------
+//------------------------------------------------------------------------------
+
+//------------------------------------------------------------------------------
+//------------------Test Code for CLmkCategorySelectorDlg.h---------------------
+//------------------------------------------------------------------------------
+
+// -----------------------------------------------------------------------------
+// CTestLmUiSelector::TestCatNewL
+// To test the creation of instance for CLmkCategorySelectorDlg.
+// -----------------------------------------------------------------------------
+//
+TInt CTestLmUiSelector::TestCatNewL( CStifItemParser& aItem )
+{
+	TInt result = KErrNone;
+	CLmkCategorySelectorDlg* iLmkCategoryDlg = NULL;
+	TRAPD(error, iLmkCategoryDlg = CLmkCategorySelectorDlg::NewL());
+	if(error!= KErrNone || !iLmkCategoryDlg)
+		{
+		iLog->Log(_L("FAILED:Creating instance for CLmkCategorySelectorDlg failed, result %d"), error);
+		result = KErrGeneral;
+		}
+	
+	if(iLmkCategoryDlg)
+		{
+		delete iLmkCategoryDlg;
+		iLmkCategoryDlg = NULL;
+		iLog->Log(_L("PASSED:Creating instance for CLmkCategorySelectorDlg passes"));
+		}	
+	return result;
+}
+
+// -----------------------------------------------------------------------------
+// CTestLmUiSelector::TestCatSetMopParent
+// To test setting the context for this control
+// -----------------------------------------------------------------------------
+//
+TInt CTestLmUiSelector::TestCatSetMopParent( CStifItemParser& aItem )
+{
+	TInt result = KErrNone;
+	CLmkCategorySelectorDlg* iLmkCategoryDlg = NULL;
+	TRAPD(error, iLmkCategoryDlg = CLmkCategorySelectorDlg::NewL());
+	if(error!= KErrNone || !iLmkCategoryDlg)
+	{
+	iLog->Log(_L("FAILED:Creating instance for CLmkCategorySelectorDlg failed, result %d"), error);
+	result = KErrGeneral;
+	}	
+	else
+		iLmkCategoryDlg->SetMopParent(engine);
+	if(iLmkCategoryDlg)
+		{
+		delete iLmkCategoryDlg;
+		iLmkCategoryDlg = NULL;
+		iLog->Log(_L("PASSED:setting context passes"));
+		}
+	return result;
+}
+
+// -----------------------------------------------------------------------------
+// CTestLmUiSelector::TestCatExecuteLD
+// Test test the launch single category selector dialog.
+// -----------------------------------------------------------------------------
+//
+TInt CTestLmUiSelector::TestCatExecuteLD( CStifItemParser& aItem )
+{
+	TLmkItemIdDbCombiInfo selItem;
+	TInt result = KErrNone;
+	CLmkCategorySelectorDlg* iLmkCategoryDlg = NULL;
+	TRAPD(error, iLmkCategoryDlg = CLmkCategorySelectorDlg::NewL());
+	if(error!= KErrNone || !iLmkCategoryDlg)
+		{
+		iLog->Log(_L("FAILED:Creating instance for CLmkCategorySelectorDlg failed, result %d"), error);
+		result = KErrGeneral;
+		} 	
+	else
+		{
+		TRAP( error, result = iLmkCategoryDlg->ExecuteLD(selItem));
+		if(error != KErrNone)
+			{
+			iLog->Log(_L("FAILED: Testing ExeculteLD fails. Error = %d"), error);
+			result = KErrGeneral;
+			}
+		else
+		    {
+			iLog->Log(_L("PASSED:launching single category dialog passes"));
+			result = KErrNone;
+		    }
+		}
+	return result;
+}
+
+// -----------------------------------------------------------------------------
+// CTestLmUiSelector::TestCatExecuteLD2
+// To test the launch multiple category selector dialog
+// -----------------------------------------------------------------------------
+//
+TInt CTestLmUiSelector::TestCatExecuteLD2( CStifItemParser& aItem )
+{
+	RArray<TLmkItemIdDbCombiInfo> selItems;
+	TInt result = KErrNone;
+	CLmkCategorySelectorDlg* iLmkCategoryDlg = NULL;
+	TRAPD(error, iLmkCategoryDlg = CLmkCategorySelectorDlg::NewL());
+	if(error!= KErrNone || !iLmkCategoryDlg)
+		{
+		iLog->Log(_L("FAILED:Creating instance for CLmkCategorySelectorDlg failed, result %d"), error);
+		result = KErrGeneral;
+		} 	
+	else
+		{
+		TRAP( error, result = iLmkCategoryDlg->ExecuteLD(selItems));
+		if(error != KErrNone)
+			{
+			iLog->Log(_L("FAILED: Testing ExeculteLD fails. Error = %d"), error);
+			error = KErrGeneral;
+			}
+		else
+		    {
+			iLog->Log(_L("PASSED:launching multiple category dialog passes"));
+			result = KErrNone;
+		    }
+		}
+	selItems.Close();
+	return result;
+}
+//------------------------------------------------------------------------------
+//------------------End of Test Code for CLmkCategorySelectorDlg.h--------------
+//------------------------------------------------------------------------------
+
+// -----------------------------------------------------------------------------
+// CTestLmUiSelector::CreateNewLandmark
+// Creates Landmarks
+// -----------------------------------------------------------------------------
+//
+void CTestLmUiSelector::CreateNewLandmark()
+   {
+
+ TRAP_IGNORE(
+	CPosLandmarkDatabase* dBase = CPosLandmarkDatabase::OpenL();
+	CleanupStack::PushL( dBase );
+	if (dBase->IsInitializingNeeded())
+		{
+	ExecuteAndDeleteLD(dBase->InitializeL()); // Synchronous since no argument
+		}
+
+	CPosLmItemIterator*  iterator = dBase->LandmarkIteratorL();
+   CleanupStack::PushL(iterator);
+
+
+   if( iterator->NumOfItemsL() == 0 )
+	    {
+	    CPosLandmark* landmark = CPosLandmark::NewL();
+		CleanupStack::PushL( landmark );
+
+		landmark->SetLandmarkNameL(_L("Nokia"));
+
+		dBase->AddLandmarkL(*landmark);
+		CleanupStack::PopAndDestroy();//landmark
+	    }
+
+	CleanupStack::PopAndDestroy(2);	//iterator,dBase
+	)
+	}
+// -----------------------------------------------------------------------------
+// CTestLmUiSelector::CreateNewLandmark
+// Creates Landmarks
+// -----------------------------------------------------------------------------
+//
+void CTestLmUiSelector::CreateOwnLandMarks()
+    {
+    TRAP_IGNORE(
+    CPosLmDatabaseManager* dbManager = CPosLmDatabaseManager::NewL();
+    CleanupStack::PushL( dbManager); 
+    if ( !dbManager->DatabaseExistsL( KUserDatabaseUri ) )
+        {
+        HPosLmDatabaseInfo* dbInfo = HPosLmDatabaseInfo::NewLC( KUserDatabaseUri );
+        dbManager->CreateDatabaseL( *dbInfo );
+        CleanupStack::PopAndDestroy( dbInfo );
+        }
+    CleanupStack::Pop(dbManager);
+    CPosLandmarkDatabase *iUserLandmarksDb;
+    //Open and initialize the custom landmark database
+    TRAPD( err, ( iUserLandmarksDb = CPosLandmarkDatabase::OpenL( KUserDatabaseUri ) ) );
+    if( iUserLandmarksDb->IsInitializingNeeded() )
+        {
+        ExecuteAndDeleteLD( iUserLandmarksDb->InitializeL() ); 
+        }
+    ExecuteAndDeleteLD( iUserLandmarksDb->RemoveAllLandmarksL() ); 
+    CPosLandmark* landmark = CPosLandmark::NewL();
+    CleanupStack::PushL( landmark );
+    TRAP_IGNORE(landmark->SetLandmarkNameL( _L("Testlandmark")));
+    TPosLmItemId landmarkId = iUserLandmarksDb->AddLandmarkL( *landmark );
+    CleanupStack::PopAndDestroy( landmark );
+    )
+   
+    }
+
+
+//  End of File
--- a/location.pro	Tue Aug 31 15:09:25 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,22 +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:  Location project file
-#
-TEMPLATE = subdirs
-
-SUBDIRS  = location_plat \
-	   locationpickerservice \
-	   locationdataharvester
-
-CONFIG += ordered
--- a/location_plat/location_data_harvester_api/inc/locationdatalookupdb.h	Tue Aug 31 15:09:25 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,244 +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: defines api for lookup database.
-*
-*/
-
-
-#ifndef LOCATIONDATA_LOOKUPDB_H
-#define LOCATIONDATA_LOOKUPDB_H
-
-// DLL_EXPORT macro definition
-#ifdef BUILD_DLL
-#define DLL_EXPORT Q_DECL_EXPORT
-#else
-#define DLL_EXPORT Q_DECL_IMPORT
-#endif
-
-
-
-// INCLUDES
-#include <QObject>
-#include <locationservicedefines.h>
-
-class QSqlDatabase;
-class QSqlQuery;
-
-class QLookupItem
-{
-    
-public:
-    
-    enum IconType
-    {
-        /** Icon type default */
-        EIconTypeDefault,
-        /** Icon type from gallery */
-        EIconTypeGallery,
-        /** Icon type from flicker */
-        EIconTypeFlicker,
-        /** Icon type from contact thumbnail */
-        EIconTypeContactThumbnail,
-        /** Icon type maptile */
-        EIconTypeMapTile
-    };
-    
-public:
-    // unique id of the entry
-    quint32 mId;
-
-    // flag to identify if the entry is a duplicate
-    quint32 mIsDuplicate;
-
-    // Uid of the source entry
-    quint32 mSourceUid;
-
-    // Source type
-    quint32 mSourceType;
-
-    // Dest uid in the landmarks database
-    quint32 mDestId;
-   
-    // name
-    QString mName;
-
-    // Street
-    QString mStreet;
-
-    // Postal code
-    QString mPostalCode;
-
-    // City
-    QString mCity;
-
-    // State
-    QString mState;
-
-    // Country
-    QString mCountry;
-    
-    // latitude
-    double mLatitude;
-    
-    // longitude
-    double mLongitude;
-    
-    // icon type
-    quint32 mIconType;
-    
-    // icon path
-    QString mIconPath;
-
-    // map tile path
-    QString mMapTilePath;
-    
-    //One line address
-    QString mSingleLineAddress;
-};
-
-/**
-* Location data lookup database class.
-*/
-class DLL_EXPORT LocationDataLookupDb : public QObject
-{
-	
-public: // Constructor
-
-    /**
-    * Constructor
-    */
-    LocationDataLookupDb( QObject *parent = 0 );	
-
-    /**
-    * Destructor
-    */
-    ~LocationDataLookupDb();  
-
-    /**
-    * Opens the lookup database.
-    */
-    bool open();
-
-    /**
-    * Closes the lookup database.
-    */
-    void close();
-
-    /**
-    * Creates an entry in the lookup table.
-    * @param[in] aLookupItem The lookup item to be created in the database.
-    */
-    void createEntry( QLookupItem& aLookupItem );
-
-    /**
-    * Updates an entry in the lookup table.
-    * The source id and type is used to find the entry in db
-    * @param[in] aLookupItem The lookup item to be updated in the database.
-    */
-    void updateEntryBySourceIdAndType( const QLookupItem& aLookupItem );
-
-    /**
-    * Updates an entry in the lookup table.
-    * The source id and type is used to find the entry in db
-    * @param[in] aLookupItem The lookup item to be updated in the database.
-    */
-    void updateMaptileBySourceIdAndType( quint32 aSourceId, quint32 aSourceType, QString aImagePath );
-
-    /**
-    * Updates an entry in the lookup table.
-    * The id is used to find the entry in db
-    * @param[in] aLookupItem The lookup item to be updated in the database.
-    */
-    void updateEntryById( const QLookupItem& aLookupItem );
-
-    /**
-    * Deletes an entry from the lookup table.
-    * The source id and type is used to find the entry in db
-    * @param[in] aLookupItem The lookup item to be deleted from the database.
-    */
-    void deleteEntryBySourceIdAndType( const QLookupItem& aLookupItem );
-
-    /**
-    * Finds an entry in the lookup table.
-    * @param[in/out] aLookupItem The lookup item to be found in the database. The source id and source type 
-    * is passed in the lookup item. If the entry is found, all other fields are updated in the lookup item.
-    * @return true if found, else false
-    */
-    bool findEntryBySourceIdAndType( QLookupItem& aLookupItem );
-
-    /**
-    * Finds an entry in the lookup table.
-    * @param[in/out] aLookupItem The lookup item to be found in the database. The id is passed 
-    * in the lookup item. If the entry is found, all other fields are updated in the lookup item.
-    * @return true if found, else false
-    */
-    bool findEntryById( QLookupItem& aLookupItem );
-
-    /**
-    * Finds list of lookup items given a landmark id.
-    * @param[in] aLandmarkId The landmark id to be found in the lookup database.  
-    * @param[out] aLookupItemArray List of lookup entries found.  
-    */
-    void findEntriesByLandmarkId( const quint32 aLandmarkId, 
-            QList<QLookupItem>& aLookupItemArray );
-
-   /**
-    * Gets list of lookup items.
-    * @param[in] aCollectionId The collection id, whose whose corresponding entries needs to be fetched.
-    *            By default all the entries in the lookup db are fetched.  
-    * @param[out] aLookupItemArray List of lookup entries found.  
-    */
-    void getEntries( QList<QLookupItem>& aLookupItemArray, const quint32 aCollectionId = ESourceInvalid );
-    
-   /**
-    * Gets count  of lookup items.
-	* @param[in/out] aCount  The number of items in lookup table for the collection id
-    * @param[in] aCollectionId The collection id, whose whose corresponding entries needs to be fetched.
-    *            By default all the entries in the lookup db are fetched.  
-    */
-    void getCount( QList<int>& aCount,const quint32 aCollectionId = ESourceInvalid );
-
-   /**
-    * Gets single line address
-    * @param mId , id of the entry
-    * @param mSourceType , type of entry
-    * @return QString , address associated with cuurent id and type  
-    */
-    QString getAddressDetails( quint32 mId , quint32 mSourceType );
-    
-    /**
-    * Gets single line address
-    * @param id , id of the entry
-    * @param sourceType , type of entry
-    * @param name , name of entry
-    */
-    void updateEntryNameByIdAndType(quint32 id, quint32 sourceType , QString name);
-    
-private:
-	
-    // fills the lookup entry
-    void fillLookupEntry( QSqlQuery &aRecord, QLookupItem &aLookupItem );    
-    
-    // Handle to the items database
-    QSqlDatabase *mDb;
-
-    // Flag to indicate if db is open
-    bool mDbOpen;
-};
-#endif  // LOCATIONDATA_LOOKUPDB_H
-
-// End of file
-    
-
-
--- a/location_plat/location_data_harvester_api/inc/locationservicedefines.h	Tue Aug 31 15:09:25 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,67 +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: defines constants and types.
-*
-*/
-
-
-#ifndef LOCATIONSERVICEDEFINES_H
-#define LOCATIONSERVICEDEFINES_H
-
-/** Defines uid source type
- */
-enum TUidSourceType
-{
-    /** Uid Source type calendar */
-    ESourceCalendar,
-    /** Uid Source type landmarks */
-    ESourceLandmarks,
-    /** Uid Source type maps history */
-    ESourceMapsHistory,
-    /** Uid Source type contacts default/prefered address */
-    ESourceContactsPref,
-    /** Uid Source type contacts home address */
-    ESourceContactsHome,
-    /** Uid Source type contacts work address */
-    ESourceContactsWork,
-    /** Uid Source type landmarks category */
-    ESourceLandmarksCategory,
-    /** Uid Source type landmarks user created category */
-    ESourceLandmarksUserCat,
-    /** Uid Source type landmarks 'contacts' category */
-    ESourceLandmarksContactsCat,
-    /** Uid Source type landmarks 'calendar' category */
-    ESourceLandmarksCalendarCat,
-    /** Uid Source type maps history' category */
-    ESourceLandmarksHistoryCat,
-    /** Source type invalid */
-    ESourceInvalid
-};
-
-/** Defines entry change type
-*/
-enum TEntryChangeType
-    {
-    /** Entry added */
-    EEntryAdded,
-    /** Entry modified */
-    EEntryModified,
-    /** Entry deleted */
-    EEntryDeleted,
-    /** Entry change unknown */
-    EEntryUnknown
-    };
-
-
-#endif // QLOCATIONPICKERITEM_H
--- a/location_plat/location_data_harvester_api/inc/maptilegeocoderplugin.h	Tue Aug 31 15:09:25 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,310 +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:	The header file for MaptileGeocoderPlugin that provides the Geocoding
-*               and Maptile  interfaces.
-*
-*/
-
-
-#ifndef __MAPTILEGEOCODERPLUGIN_H__
-#define __MAPTILEGEOCODERPLUGIN_H__
-
-// INCLUDES
-#include <e32base.h>
-#include <lbsposition.h> 
-#include <EPos_CPosLandmark.h>
-
-//Maptile geocoder plugin uid
-const TUid KMaptileGeoCoderPluginUid = { 0x2002E6BE };
-
-
-/**
- * Data class to get the address details. An handle to this type will be given to the
- * user through MMaptileGeocoderObserver::GeocodingCompleted callback, through which
- * user can retrieve the address details using the following interfaces.
- *
- */
-class MAddressInfo
-{
-public:
-	
-    /**
-     * Gets the latitude information.
-     * 
-     * @return aLatitude latitude value. 
-     */
-    virtual const TReal& GetLatitude( ) = 0;
-    
-    
-    /**
-	 * Gets the longitude information.
-	 * 
-	 * @return aLongitude longitude value. 
-	 */
-    virtual const TReal& GetLongitude( ) = 0;
-    
-    /*
-     * Gets the reference to the country name. Scope of this returned reference is limited to
-     * this perticular call. User has to store it for their further processing.
-     * 
-     *  @return reference to the String which holds the Country Name. 
-     */
-    virtual const TDesC& GetCountryName()= 0;
-    
-    /*
-     * Gets the reference to the State. Scope of this returned reference is limited to
-     * this perticular call. User has to store it for their further processing.
-     * 
-     *  @return reference to the String which holds the State name. 
-     */
-    virtual const TDesC& GetState()= 0;
-    
-    /*
-     * Gets the reference to the City. Scope of this returned reference is limited to
-     * this perticular call. User has to store it for their further processing.
-     * 
-     *  @return reference to the String which holds the City Name. 
-     */
-    virtual const TDesC& GetCity()= 0;
-    
-    /*
-     * Gets the reference to the District name. Scope of this returned reference is limited to
-     * this perticular call. User has to store it for their further processing.
-     * 
-     *  @return reference to the String which holds the District Name. 
-     */
-    virtual const TDesC& GetDistrict()= 0;
-    
-    /*
-     * Gets the reference to the postal code. Scope of this returned reference is limited to
-     * this perticular call. User has to store it for their further processing.
-     * 
-     *  @return reference to the String which holds the postal code. 
-     */
-    virtual  const TDesC& GetPincode()= 0;
-    
-    /*
-     * Gets the reference to the thoroughfare name. Scope of this returned reference is limited to
-     * this perticular call. User has to store it for their further processing.
-     * 
-     *  @return reference to the String which holds the thoroughfare name. 
-     */
-    virtual const TDesC& GetThoroughfareName()= 0;
-    
-    /*
-     * Gets the reference to the thoroughfare number. Scope of this returned reference is limited to
-     * this perticular call. User has to store it for their further processing.
-     * 
-     *  @return reference to the String which holds the thoroughfare number. 
-     */
-    virtual const TDesC& GetThoroughfareNumber() = 0;
-         
-};
-
-
-
-/**
- * TMapTileParam
- * Data class containing the information required for  fetching the map tile. 
- *
- */
-class TMapTileParam
-{
-
-public:
-
-    /**
-     * Parameterized constructor.
-     *
-     * @param aLatitude latitude value
-     * @param aLongitude longitude value
-     * @param aZoom  maptile zoom level
-     * @param aSize requested maptile size
-     *
-     */
-    TMapTileParam( const TReal aLatitude, const TReal aLongitude, 
-            const TInt aZoom, const TInt aWidth, const TInt aHeight ): iLattitude( aLatitude ),
-            iLongitude( aLongitude ), iZoomLevel( aZoom ), iWidth( aWidth ), iHeight( aHeight )
-    {
-    }
-		
-    
-    /**
-     * Default constructor
-     */
-    TMapTileParam()
-    {
-    }
-	
-
-public:
-
-    // Latitude
-    TReal iLattitude;
-    //Longitude
-    TReal iLongitude;
-    //Zoom level
-    TInt iZoomLevel;
-    //Required image width
-    TInt iWidth;
-    //Required image height
-    TInt iHeight;
-};
-
-
-/**
- * TConnectionOption
- * Data class containing the connection options.
- *
- */
-enum TConnectionOption
-{
-    //Interactive connection
-    EInteractive = 0,
-    //Silent connection
-    ESilent
-};
-
-
-/**
- * Observer class which exposes callbacks to notify the completion of geocoding 
- * and maptile fetching events.
- *
- */
-class MMaptileGeocoderObserver
-{
-public:
-
-    /**
-     * Callback function which notifys the completion of geocoding service. 
-     * This signals the completion of the asynchronous function 
-     * CMaptileGeocoderPlugin::GetCoordinateByAddressL.
-     * 
-     *  @param aErrorcode Error status KErrNone in case of success or other system 
-     *                    specific errorcodes in case of failures.
-     *                       
-     *  @param aAddressInfo refrence to the address stucture, through which user can 
-     *                      access the coordinate information. 
-     */
-    virtual void GeocodingCompleted( TInt aErrorcode, MAddressInfo& aAddressInfo ) = 0;
-
-
-	
-    /**
-     * Callback function which notifys the completion of Maptile fetching event. 
-     * This signals the completion of the asynchronous function 
-     * CMaptileGeocoderPlugin::GetMapTileByGeoCode.
-     * 
-     * @param aErrorcode Error status KErrNone in case of success or other system 
-     *                   specific errorcodes in case of failures.
-     *						
-     * @param aMapImagePath Maptile image path
-     *					   
-     */
-    virtual void MapTileFetchingCompleted( TInt aErrorcode, const TDesC& aMapImagePath ) = 0;
-	
-};
-
-
-
-
-
-/**
- * CMaptileGeocoderPlugin
- *
- * An interface of the CMaptileGeocoderPlugin encapsulates the goecoding  and 
- * maptile fetching functionality. It acts as a base, for a concrete implementation 
- * class to provide all the functionality that a client requires from a 
- * CMaptileGeocoderPlugin implementation.
- *
- */
- 
-class CMaptileGeocoderPlugin : public CBase
-{
-public:
-	
-    /**
-	 * Create instance of CMaptileGeocoderPlugin concrete implementation. 
-	 * @return: Instance of this class.
-	 */
-    static CMaptileGeocoderPlugin* NewL();
-
-    /**
-	 * Destructor.
-  	 */
-    virtual ~CMaptileGeocoderPlugin();
-
-
-public:
-	
-    /**
-	 * Initializes the ReverseGeoCodeObserver
-	 * @param: aObserver The observer class instance that is to be notified when 
-	 *         geocoding and maptile fetching service completes.
-	 * 
-	 */
-    virtual void SetMaptileGeocoderObserver( MMaptileGeocoderObserver& aObserver ) = 0;
-	
-    /**
-     * Gets the geo-coordinate information for the given address. This is an 
-     * asynchronous function whose completion will be notified by the 
-     * MMaptileGeocoderObserver::GeocodingCompleted callback.
-     * 
-     * @param aLandmark Landmark containing the address informations.
-     * @param aOption  OCC setting option
-     *
-     */
-	virtual void GetCoordinateByAddressL( const CPosLandmark& aLandmark,  
-                       const TConnectionOption aOption = EInteractive ) = 0;
-         
-    /**
-     * Gets the geo-coordinate information for the given address. This is an 
-     * asynchronous function whose completion will be notified by the 
-     * MMaptileGeocoderObserver::GeocodingCompleted callback.
-     * 
-     * @param aAddressDetails , containing the address informations.
-     * @param aOption  OCC setting option
-     *
-     */                   
-    virtual void GetCoordinateByAddressL( const TDesC& aAddressDetails,  
-	                       const TConnectionOption aOption = EInteractive ) = 0;
-	
-    /**
-     * Gets the maptile image path for the given geocordinates. This is an 
-     * asynchronous function whose completion will be notified by the 
-     * MMaptileGeocoderObserver::MapTileFetchingCompleted callback.
-     * 
-     * @param aMapTileParam Object containing the geocoordinate, zoom level 
-     *        informations.
-     * @param aFilePath  Path where the maptile image should  be stored.
-     *
-     */
-    virtual void GetMapTileByGeoCodeL( TMapTileParam& aMapTileParam,
-                                       const TDesC& aFilePath ) = 0;
-
-private:
-	
-    /**
-	 * iDtorKey
-	 * Identification of the plugin on cleanup
- 	 */
-    TUid iDtorKey;
-};
-
-#include "maptilegeocoderplugin.inl"
-
-#endif //__MAPTILEGEOCODERPLUGIN_H__
-
-//End of file
-
--- a/location_plat/location_data_harvester_api/inc/maptilegeocoderplugin.inl	Tue Aug 31 15:09:25 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: This is partial interface implementation which is 
-*              used by plugins. 
-* 
-*/
-
-
-
-// INCLUDE FILES
-
-#include <ecom/ecom.h>       // declares E-com framework classes
-
-
-// -----------------------------------------------------------------------------
-// CMaptileGeocoderPlugin::~CMaptileGeocoderPlugin()
-// Destroys the plugin implementation
-// -----------------------------------------------------------------------------
-//
-inline CMaptileGeocoderPlugin::~CMaptileGeocoderPlugin()
-{
-    REComSession::DestroyedImplementation( iDtorKey );
-}
-
-
-// -----------------------------------------------------------------------------
-// CMaptileGeocoderPlugin::NewL()
-// Creates the instance of CMaptileGeocoderPlugin concrete implementation.
-// -----------------------------------------------------------------------------
-//
-inline CMaptileGeocoderPlugin* CMaptileGeocoderPlugin::NewL()
-{
-    CMaptileGeocoderPlugin* self = reinterpret_cast<CMaptileGeocoderPlugin*>(
-        REComSession::CreateImplementationL(
-            KMaptileGeoCoderPluginUid, _FOFF( CMaptileGeocoderPlugin,iDtorKey ) ) );
-
-    return self;
-}
-
-// End of file
--- a/location_plat/location_data_harvester_api/location_data_harvester_api.pri	Tue Aug 31 15:09:25 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,20 +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: Location data harvester api project file
-#
-
-PLATFORM_HEADERS += location_data_harvester_api\inc\maptilegeocoderplugin.h \
-                    location_data_harvester_api\inc\maptilegeocoderplugin.inl \
-                    location_data_harvester_api\inc\locationdatalookupdb.h \
-                    location_data_harvester_api\inc\locationservicedefines.h
\ No newline at end of file
--- a/location_plat/location_picker_service_api/inc/qlocationpickeritem.h	Tue Aug 31 15:09:25 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,109 +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: QLocationPickerItem class
-*
-*/
-
-
-#ifndef QLOCATIONPICKERITEM_H
-#define QLOCATIONPICKERITEM_H
-
-#include <QString>
-#include <xqserviceipcmarshal.h>
-
-/** class defines location type
-  */
-class QLocationPickerItem
-{
-public:
-    QLocationPickerItem():mIsValid(false),
-    	                  mLatitude(200.0),
-    	                  mLongitude(200.0)
-     {};
-    ~QLocationPickerItem() {};
-
-    // copy contructor
-    inline QLocationPickerItem(const QLocationPickerItem &l)
-    {
-        mIsValid = l.mIsValid;
-        mName = l.mName;
-        mStreet = l.mStreet;
-        mPostalCode = l.mPostalCode;
-        mCity = l.mCity;
-        mState = l.mState;
-        mCountry = l.mCountry;
-        mLatitude = l.mLatitude;
-        mLongitude = l.mLongitude;
-    };
-
-    // assignment operator
-    inline QLocationPickerItem &operator=(const QLocationPickerItem &l)
-    {
-        mIsValid = l.mIsValid;
-        mName = l.mName;
-        mStreet = l.mStreet;
-        mPostalCode = l.mPostalCode;
-        mCity = l.mCity;
-        mState = l.mState;
-        mCountry = l.mCountry;
-        mLatitude = l.mLatitude;
-        mLongitude = l.mLongitude;
-        return *this;
-    };
-
-    bool mIsValid; // if the current object is valid
-    QString mName; // location name
-    QString mStreet; // location street
-    QString mPostalCode; // location postal code
-    QString mCity; // location city
-    QString mState; // location state/region
-    QString mCountry; // location country
-    double mLatitude; // latitude
-    double mLongitude; // longitude
-
-    // functions to pass data between application
-    template <typename Stream> void serialize(Stream &stream) const;
-    template <typename Stream> void deserialize(Stream &stream);
-};
-
-template <typename Stream> inline void QLocationPickerItem::serialize(Stream &s) const
-{
-    s << mIsValid;
-    s << mName;
-    s << mStreet;
-    s << mPostalCode;
-    s << mCity;
-    s << mState;
-    s << mCountry;
-    s << mLatitude;
-    s << mLongitude;
-}
-
-template <typename Stream> inline void QLocationPickerItem::deserialize(Stream &s)
-{
-    s >> mIsValid;
-    s >> mName;
-    s >> mStreet;
-    s >> mPostalCode;
-    s >> mCity;
-    s >> mState;
-    s >> mCountry;
-    s >> mLatitude;
-    s >> mLongitude;
-}
-
-
-Q_DECLARE_USER_METATYPE(QLocationPickerItem)
-
-#endif // QLOCATIONPICKERITEM_H
--- a/location_plat/location_picker_service_api/location_picker_service_api.pri	Tue Aug 31 15:09:25 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,17 +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: Location picker service api project file
-#
-
-PLATFORM_HEADERS += location_picker_service_api/inc/qlocationpickeritem.h
--- a/location_plat/location_plat.pro	Tue Aug 31 15:09:25 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,29 +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 = subdirs
-BLD_INF_RULES.prj_exports += "$${LITERAL_HASH}include <platform_paths.hrh>"
-
-include(location_picker_service_api/location_picker_service_api.pri)
-include(location_data_harvester_api/location_data_harvester_api.pri)
-
-
-for(filename,PLATFORM_HEADERS){
-    BLD_INF_RULES.prj_exports *= "$$filename APP_LAYER_PLATFORM_EXPORT_PATH($$basename(filename))"
-  }
-
-
-#BLD_INF_RULES.prj_exports += "$${LITERAL_HASH}include \"group/bld.inf\""
--- a/locationdataharvester/bwins/geocodeupdateu.def	Tue Aug 31 15:09:25 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,20 +0,0 @@
-EXPORTS
-	?createContactdb@GeocodeUpdate@@QAEXXZ @ 1 NONAME ; void GeocodeUpdate::createContactdb(void)
-	?trUtf8@GeocodeUpdate@@SA?AVQString@@PBD0@Z @ 2 NONAME ; class QString GeocodeUpdate::trUtf8(char const *, char const *)
-	?tr@GeocodeUpdate@@SA?AVQString@@PBD0H@Z @ 3 NONAME ; class QString GeocodeUpdate::tr(char const *, char const *, int)
-	?tr@GeocodeUpdate@@SA?AVQString@@PBD0@Z @ 4 NONAME ; class QString GeocodeUpdate::tr(char const *, char const *)
-	??1GeocodeUpdate@@UAE@XZ @ 5 NONAME ; GeocodeUpdate::~GeocodeUpdate(void)
-	?getStaticMetaObject@GeocodeUpdate@@SAABUQMetaObject@@XZ @ 6 NONAME ; struct QMetaObject const & GeocodeUpdate::getStaticMetaObject(void)
-	?updateGeocodeToContactDB@GeocodeUpdate@@QAE_NIHNN@Z @ 7 NONAME ; bool GeocodeUpdate::updateGeocodeToContactDB(unsigned int, int, double, double)
-	?updateGeocodeToCalenderDB@GeocodeUpdate@@QAE_NABKABN1@Z @ 8 NONAME ; bool GeocodeUpdate::updateGeocodeToCalenderDB(unsigned long const &, double const &, double const &)
-	??0GeocodeUpdate@@QAE@XZ @ 9 NONAME ; GeocodeUpdate::GeocodeUpdate(void)
-	?qt_metacall@GeocodeUpdate@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 10 NONAME ; int GeocodeUpdate::qt_metacall(enum QMetaObject::Call, int, void * *)
-	?eventCompleted@GeocodeUpdate@@IAEXXZ @ 11 NONAME ; void GeocodeUpdate::eventCompleted(void)
-	??_EGeocodeUpdate@@UAE@I@Z @ 12 NONAME ; GeocodeUpdate::~GeocodeUpdate(unsigned int)
-	?trUtf8@GeocodeUpdate@@SA?AVQString@@PBD0H@Z @ 13 NONAME ; class QString GeocodeUpdate::trUtf8(char const *, char const *, int)
-	?staticMetaObject@GeocodeUpdate@@2UQMetaObject@@B @ 14 NONAME ; struct QMetaObject const GeocodeUpdate::staticMetaObject
-	?metaObject@GeocodeUpdate@@UBEPBUQMetaObject@@XZ @ 15 NONAME ; struct QMetaObject const * GeocodeUpdate::metaObject(void) const
-	?agendautilInstanceCreated@GeocodeUpdate@@AAEXH@Z @ 16 NONAME ; void GeocodeUpdate::agendautilInstanceCreated(int)
-	?qt_metacast@GeocodeUpdate@@UAEPAXPBD@Z @ 17 NONAME ; void * GeocodeUpdate::qt_metacast(char const *)
-	?isGeocodeNotAvailable@GeocodeUpdate@@QAE_NABK@Z @ 18 NONAME ; bool GeocodeUpdate::isGeocodeNotAvailable(unsigned long const &)
-
--- a/locationdataharvester/bwins/locationdatalookupdbu.def	Tue Aug 31 15:09:25 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,20 +0,0 @@
-EXPORTS
-	?updateMaptileBySourceIdAndType@LocationDataLookupDb@@QAEXIIVQString@@@Z @ 1 NONAME ; void LocationDataLookupDb::updateMaptileBySourceIdAndType(unsigned int, unsigned int, class QString)
-	?getAddressDetails@LocationDataLookupDb@@QAE?AVQString@@II@Z @ 2 NONAME ; class QString LocationDataLookupDb::getAddressDetails(unsigned int, unsigned int)
-	?deleteEntryBySourceIdAndType@LocationDataLookupDb@@QAEXABVQLookupItem@@@Z @ 3 NONAME ; void LocationDataLookupDb::deleteEntryBySourceIdAndType(class QLookupItem const &)
-	?updateEntryBySourceIdAndType@LocationDataLookupDb@@QAEXABVQLookupItem@@@Z @ 4 NONAME ; void LocationDataLookupDb::updateEntryBySourceIdAndType(class QLookupItem const &)
-	?getEntries@LocationDataLookupDb@@QAEXAAV?$QList@VQLookupItem@@@@I@Z @ 5 NONAME ; void LocationDataLookupDb::getEntries(class QList<class QLookupItem> &, unsigned int)
-	?updateEntryById@LocationDataLookupDb@@QAEXABVQLookupItem@@@Z @ 6 NONAME ; void LocationDataLookupDb::updateEntryById(class QLookupItem const &)
-	??0LocationDataLookupDb@@QAE@PAVQObject@@@Z @ 7 NONAME ; LocationDataLookupDb::LocationDataLookupDb(class QObject *)
-	?getCount@LocationDataLookupDb@@QAEXAAV?$QList@H@@I@Z @ 8 NONAME ; void LocationDataLookupDb::getCount(class QList<int> &, unsigned int)
-	?findEntryBySourceIdAndType@LocationDataLookupDb@@QAE_NAAVQLookupItem@@@Z @ 9 NONAME ; bool LocationDataLookupDb::findEntryBySourceIdAndType(class QLookupItem &)
-	??1LocationDataLookupDb@@UAE@XZ @ 10 NONAME ; LocationDataLookupDb::~LocationDataLookupDb(void)
-	?findEntriesByLandmarkId@LocationDataLookupDb@@QAEXIAAV?$QList@VQLookupItem@@@@@Z @ 11 NONAME ; void LocationDataLookupDb::findEntriesByLandmarkId(unsigned int, class QList<class QLookupItem> &)
-	?close@LocationDataLookupDb@@QAEXXZ @ 12 NONAME ; void LocationDataLookupDb::close(void)
-	?createEntry@LocationDataLookupDb@@QAEXAAVQLookupItem@@@Z @ 13 NONAME ; void LocationDataLookupDb::createEntry(class QLookupItem &)
-	?findEntryById@LocationDataLookupDb@@QAE_NAAVQLookupItem@@@Z @ 14 NONAME ; bool LocationDataLookupDb::findEntryById(class QLookupItem &)
-	?fillLookupEntry@LocationDataLookupDb@@AAEXAAVQSqlQuery@@AAVQLookupItem@@@Z @ 15 NONAME ; void LocationDataLookupDb::fillLookupEntry(class QSqlQuery &, class QLookupItem &)
-	?open@LocationDataLookupDb@@QAE_NXZ @ 16 NONAME ; bool LocationDataLookupDb::open(void)
-	??_ELocationDataLookupDb@@UAE@I@Z @ 17 NONAME ; LocationDataLookupDb::~LocationDataLookupDb(unsigned int)
-	?updateEntryNameByIdAndType@LocationDataLookupDb@@QAEXIIVQString@@@Z @ 18 NONAME ; void LocationDataLookupDb::updateEntryNameByIdAndType(unsigned int, unsigned int, class QString)
-
--- a/locationdataharvester/bwins/maptileserviceu.def	Tue Aug 31 15:09:25 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,21 +0,0 @@
-EXPORTS
-	?qt_metacast@MapTileService@@UAEPAXPBD@Z @ 1 NONAME ; void * MapTileService::qt_metacast(char const *)
-	?publishCalEntry@MapTileService@@AAEXH@Z @ 2 NONAME ; void MapTileService::publishCalEntry(int)
-	?isLocationFeatureEnabled@MapTileService@@QAE_NW4AppType@1@@Z @ 3 NONAME ; bool MapTileService::isLocationFeatureEnabled(enum MapTileService::AppType)
-	??_EMapTileService@@UAE@I@Z @ 4 NONAME ; MapTileService::~MapTileService(unsigned int)
-	?tr@MapTileService@@SA?AVQString@@PBD0@Z @ 5 NONAME ; class QString MapTileService::tr(char const *, char const *)
-	?getStaticMetaObject@MapTileService@@SAABUQMetaObject@@XZ @ 6 NONAME ; struct QMetaObject const & MapTileService::getStaticMetaObject(void)
-	?trUtf8@MapTileService@@SA?AVQString@@PBD0H@Z @ 7 NONAME ; class QString MapTileService::trUtf8(char const *, char const *, int)
-	??1MapTileService@@UAE@XZ @ 8 NONAME ; MapTileService::~MapTileService(void)
-	??0MapTileService@@QAE@XZ @ 9 NONAME ; MapTileService::MapTileService(void)
-	?getMapTileImage@MapTileService@@QAEHHW4AddressType@1@AAVQString@@V?$QFlags@W4Orientation@Qt@@@@@Z @ 10 NONAME ; int MapTileService::getMapTileImage(int, enum MapTileService::AddressType, class QString &, class QFlags<enum Qt::Orientation>)
-	?metaObject@MapTileService@@UBEPBUQMetaObject@@XZ @ 11 NONAME ; struct QMetaObject const * MapTileService::metaObject(void) const
-	?setMaptileStatus@MapTileService@@QAEXXZ @ 12 NONAME ; void MapTileService::setMaptileStatus(void)
-	?tr@MapTileService@@SA?AVQString@@PBD0H@Z @ 13 NONAME ; class QString MapTileService::tr(char const *, char const *, int)
-	?qt_metacall@MapTileService@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 14 NONAME ; int MapTileService::qt_metacall(enum QMetaObject::Call, int, void * *)
-	?readEntryFromMaptileDataBase@MapTileService@@AAEHHW4AddressType@1@AAVTLookupItem@@AAH@Z @ 15 NONAME ; int MapTileService::readEntryFromMaptileDataBase(int, enum MapTileService::AddressType, class TLookupItem &, int &)
-	?trUtf8@MapTileService@@SA?AVQString@@PBD0@Z @ 16 NONAME ; class QString MapTileService::trUtf8(char const *, char const *)
-	?staticMetaObject@MapTileService@@2UQMetaObject@@B @ 17 NONAME ; struct QMetaObject const MapTileService::staticMetaObject
-	?maptileFetchingStatusUpdate@MapTileService@@IAEXHHH@Z @ 18 NONAME ; void MapTileService::maptileFetchingStatusUpdate(int, int, int)
-	?publishValue@MapTileService@@AAEXHW4AddressType@1@H@Z @ 19 NONAME ; void MapTileService::publishValue(int, enum MapTileService::AddressType, int)
-
--- a/locationdataharvester/bwins/mylocationsdatabasemanageru.def	Tue Aug 31 15:09:25 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,10 +0,0 @@
-EXPORTS
-	?UpdateMapTilePath@CMyLocationsDatabaseManager@@QAEXKKAAV?$TBuf@$0BAA@@@@Z @ 1 NONAME ; void CMyLocationsDatabaseManager::UpdateMapTilePath(unsigned long, unsigned long, class TBuf<256> &)
-	?UpdateEntryName@CMyLocationsDatabaseManager@@QAEXKW4TUidSourceType@@ABVTDesC16@@@Z @ 2 NONAME ; void CMyLocationsDatabaseManager::UpdateEntryName(unsigned long, enum TUidSourceType, class TDesC16 const &)
-	?GetLandmarkFullAddress@CMyLocationsDatabaseManager@@QAEXAAV?$TBuf@$0PP@@@PBVCPosLandmark@@@Z @ 3 NONAME ; void CMyLocationsDatabaseManager::GetLandmarkFullAddress(class TBuf<255> &, class CPosLandmark const *)
-	?ConstructL@CMyLocationsDatabaseManager@@QAEXXZ @ 4 NONAME ; void CMyLocationsDatabaseManager::ConstructL(void)
-	?CheckIfAddressChanged@CMyLocationsDatabaseManager@@QAEHABVTDesC16@@KW4TUidSourceType@@@Z @ 5 NONAME ; int CMyLocationsDatabaseManager::CheckIfAddressChanged(class TDesC16 const &, unsigned long, enum TUidSourceType)
-	?UpdateDatabaseL@CMyLocationsDatabaseManager@@QAEXPAVCPosLandmark@@KKK@Z @ 6 NONAME ; void CMyLocationsDatabaseManager::UpdateDatabaseL(class CPosLandmark *, unsigned long, unsigned long, unsigned long)
-	??0CMyLocationsDatabaseManager@@QAE@XZ @ 7 NONAME ; CMyLocationsDatabaseManager::CMyLocationsDatabaseManager(void)
-	?CheckIfAddressChanged@CMyLocationsDatabaseManager@@QAEHABVCPosLandmark@@KW4TUidSourceType@@@Z @ 8 NONAME ; int CMyLocationsDatabaseManager::CheckIfAddressChanged(class CPosLandmark const &, unsigned long, enum TUidSourceType)
-
--- a/locationdataharvester/eabi/geocodeupdateu.def	Tue Aug 31 15:09:25 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,20 +0,0 @@
-EXPORTS
-	_ZN13GeocodeUpdate11qt_metacallEN11QMetaObject4CallEiPPv @ 1 NONAME
-	_ZN13GeocodeUpdate11qt_metacastEPKc @ 2 NONAME
-	_ZN13GeocodeUpdate14eventCompletedEv @ 3 NONAME
-	_ZN13GeocodeUpdate15createContactdbEv @ 4 NONAME
-	_ZN13GeocodeUpdate16staticMetaObjectE @ 5 NONAME DATA 16
-	_ZN13GeocodeUpdate19getStaticMetaObjectEv @ 6 NONAME
-	_ZN13GeocodeUpdate21isGeocodeNotAvailableERKm @ 7 NONAME
-	_ZN13GeocodeUpdate24updateGeocodeToContactDBEjidd @ 8 NONAME
-	_ZN13GeocodeUpdate25agendautilInstanceCreatedEi @ 9 NONAME
-	_ZN13GeocodeUpdate25updateGeocodeToCalenderDBERKmRKdS3_ @ 10 NONAME
-	_ZN13GeocodeUpdateC1Ev @ 11 NONAME
-	_ZN13GeocodeUpdateC2Ev @ 12 NONAME
-	_ZN13GeocodeUpdateD0Ev @ 13 NONAME
-	_ZN13GeocodeUpdateD1Ev @ 14 NONAME
-	_ZN13GeocodeUpdateD2Ev @ 15 NONAME
-	_ZNK13GeocodeUpdate10metaObjectEv @ 16 NONAME
-	_ZTI13GeocodeUpdate @ 17 NONAME
-	_ZTV13GeocodeUpdate @ 18 NONAME
-
--- a/locationdataharvester/eabi/locationdatalookupdbu.def	Tue Aug 31 15:09:25 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,24 +0,0 @@
-EXPORTS
-	_ZN20LocationDataLookupDb10getEntriesER5QListI11QLookupItemEj @ 1 NONAME
-	_ZN20LocationDataLookupDb11createEntryER11QLookupItem @ 2 NONAME
-	_ZN20LocationDataLookupDb13findEntryByIdER11QLookupItem @ 3 NONAME
-	_ZN20LocationDataLookupDb15fillLookupEntryER9QSqlQueryR11QLookupItem @ 4 NONAME
-	_ZN20LocationDataLookupDb15updateEntryByIdERK11QLookupItem @ 5 NONAME
-	_ZN20LocationDataLookupDb17getAddressDetailsEjj @ 6 NONAME
-	_ZN20LocationDataLookupDb23findEntriesByLandmarkIdEjR5QListI11QLookupItemE @ 7 NONAME
-	_ZN20LocationDataLookupDb26findEntryBySourceIdAndTypeER11QLookupItem @ 8 NONAME
-	_ZN20LocationDataLookupDb28deleteEntryBySourceIdAndTypeERK11QLookupItem @ 9 NONAME
-	_ZN20LocationDataLookupDb28updateEntryBySourceIdAndTypeERK11QLookupItem @ 10 NONAME
-	_ZN20LocationDataLookupDb30updateMaptileBySourceIdAndTypeEjj7QString @ 11 NONAME
-	_ZN20LocationDataLookupDb4openEv @ 12 NONAME
-	_ZN20LocationDataLookupDb5closeEv @ 13 NONAME
-	_ZN20LocationDataLookupDb8getCountER5QListIiEj @ 14 NONAME
-	_ZN20LocationDataLookupDbC1EP7QObject @ 15 NONAME
-	_ZN20LocationDataLookupDbC2EP7QObject @ 16 NONAME
-	_ZN20LocationDataLookupDbD0Ev @ 17 NONAME
-	_ZN20LocationDataLookupDbD1Ev @ 18 NONAME
-	_ZN20LocationDataLookupDbD2Ev @ 19 NONAME
-	_ZTI20LocationDataLookupDb @ 20 NONAME
-	_ZTV20LocationDataLookupDb @ 21 NONAME
-	_ZN20LocationDataLookupDb26updateEntryNameByIdAndTypeEjj7QString @ 22 NONAME
-
--- a/locationdataharvester/eabi/maptileserviceu.def	Tue Aug 31 15:09:25 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,21 +0,0 @@
-EXPORTS
-	_ZN14MapTileService11qt_metacallEN11QMetaObject4CallEiPPv @ 1 NONAME
-	_ZN14MapTileService11qt_metacastEPKc @ 2 NONAME
-	_ZN14MapTileService12publishValueEiNS_11AddressTypeEi @ 3 NONAME
-	_ZN14MapTileService15getMapTileImageEiNS_11AddressTypeER7QString6QFlagsIN2Qt11OrientationEE @ 4 NONAME
-	_ZN14MapTileService15publishCalEntryEi @ 5 NONAME
-	_ZN14MapTileService16setMaptileStatusEv @ 6 NONAME
-	_ZN14MapTileService16staticMetaObjectE @ 7 NONAME DATA 16
-	_ZN14MapTileService19getStaticMetaObjectEv @ 8 NONAME
-	_ZN14MapTileService24isLocationFeatureEnabledENS_7AppTypeE @ 9 NONAME
-	_ZN14MapTileService27maptileFetchingStatusUpdateEiii @ 10 NONAME
-	_ZN14MapTileService28readEntryFromMaptileDataBaseEiNS_11AddressTypeER11TLookupItemRi @ 11 NONAME
-	_ZN14MapTileServiceC1Ev @ 12 NONAME
-	_ZN14MapTileServiceC2Ev @ 13 NONAME
-	_ZN14MapTileServiceD0Ev @ 14 NONAME
-	_ZN14MapTileServiceD1Ev @ 15 NONAME
-	_ZN14MapTileServiceD2Ev @ 16 NONAME
-	_ZNK14MapTileService10metaObjectEv @ 17 NONAME
-	_ZTI14MapTileService @ 18 NONAME
-	_ZTV14MapTileService @ 19 NONAME
-
--- a/locationdataharvester/eabi/mylocationsdatabasemanageru.def	Tue Aug 31 15:09:25 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,11 +0,0 @@
-EXPORTS
-	_ZN27CMyLocationsDatabaseManager10ConstructLEv @ 1 NONAME
-	_ZN27CMyLocationsDatabaseManager15UpdateDatabaseLEP12CPosLandmarkmmm @ 2 NONAME
-	_ZN27CMyLocationsDatabaseManager15UpdateEntryNameEm14TUidSourceTypeRK7TDesC16 @ 3 NONAME
-	_ZN27CMyLocationsDatabaseManager17UpdateMapTilePathEmmR4TBufILi256EE @ 4 NONAME
-	_ZN27CMyLocationsDatabaseManager21CheckIfAddressChangedERK12CPosLandmarkm14TUidSourceType @ 5 NONAME
-	_ZN27CMyLocationsDatabaseManager21CheckIfAddressChangedERK7TDesC16m14TUidSourceType @ 6 NONAME
-	_ZN27CMyLocationsDatabaseManager22GetLandmarkFullAddressER4TBufILi255EEPK12CPosLandmark @ 7 NONAME
-	_ZN27CMyLocationsDatabaseManagerC1Ev @ 8 NONAME
-	_ZN27CMyLocationsDatabaseManagerC2Ev @ 9 NONAME
-
--- a/locationdataharvester/geocodeupdate/geocodeupdate.pro	Tue Aug 31 15:09:25 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,70 +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 = lib
-TARGET = geocodeupdate   
-
-CONFIG += dll
-CONFIG += Qt
-
-DEPENDPATH += .
-
-
-# Input
-# Input
-HEADERS += ./inc/geocodeupdate.h \
-           ../mylocationlogger/inc \
-           ../inc   
-SOURCES +=./src/geocodeupdate.cpp 
-
-MOC_DIR = moc
-
-DEFINES += GEOCODEUPDATEDLL
-
-symbian: 
-{ 
-    TARGET.EPOCALLOWDLLDATA = 1
-    TARGET.CAPABILITY = All -Tcb
-    TARGET.UID3 = 0x2002C3A9
-    INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE
-    deploy.path = $$EPOCROOT
-    exportheaders.sources = $$PUBLIC_HEADERS
-    exportheaders.path = epoc32/include
-    DEPLOYMENT += exportheaders
-    
-    qtAddLibrary(QtContacts)
-	LIBS += -lcntmodel \
-	        -lagendainterface \
-		    -leuser  \
-		    -lestor \
-		    -lflogger
-   
-
-}  
-
-defBlock = \      
-	"$${LITERAL_HASH}if defined(EABI)" \
-		"DEFFILE  ../eabi/geocodeupdate.def" \
-    "$${LITERAL_HASH}else" \
-        "DEFFILE  ../bwins/geocodeupdate.def" \
-	"$${LITERAL_HASH}endif"
-MMP_RULES += defBlock
-
-# End of file	--Don't remove this.
\ No newline at end of file
--- a/locationdataharvester/geocodeupdate/inc/geocodeupdate.h	Tue Aug 31 15:09:25 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,94 +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 __GEOCODEUPDATE_H__
-#define __GEOCODEUPDATE_H__
-
-#include <e32def.h> 
-#include <QtCore/qglobal.h>
-#include <QObject>
-
-#ifdef  GEOCODEUPDATEDLL
-#define GEOCODEUPDATE_EXPORT Q_DECL_EXPORT
-#else
-#define GEOCODEUPDATE_EXPORT Q_DECL_IMPORT
-#endif
-
-class AgendaUtil;
-// CLASS DECLARATION
-
-/**
- * GeocodeUpdate, a class to update latitude and longtude into contact and calender database
- */
-class GEOCODEUPDATE_EXPORT GeocodeUpdate: public QObject
-{
-    Q_OBJECT
-public:    
-    
-    GeocodeUpdate();
-       
-    ~GeocodeUpdate();
-       
-    /**
-     Create contact database   
-     */
-     void createContactdb();
-    
-    /**
-     * Request to update latitude and longitude into contact db. 
-     * @param contactId contact unique id.
-     * @param addressType contact address type.
-     * @param latitude Latitude to be updated.
-     * @param longitude longitude to be updated.
-	 * 
-	 * @return Returns true if successfule otherwise false.
-     */
-
-    bool updateGeocodeToContactDB(const quint32 contactId, const int addressType,
-        const double latitude, const double longitude);
-    /**
-     * Request to update latitude and longitude into calender db.    
-     * @param calEntryId calender entry unique id
-     * @param latitude Latitude to be updated.
-     * @param longitude longitude to be updated.
-	 * 
-	 * @return Returns true if successfule otherwise false.
-     */
-
-    bool updateGeocodeToCalenderDB(const ulong& calEntryId, const double& latitude,
-        const double& longitude);
-
-    /**
-     * Request to check if geo-cordinate available or not.  
-     * @param calEntryId calender entry unique id
-     * @return true, if available otherwise false.
-     */
-    bool isGeocodeNotAvailable(const ulong& calEntryId);
-
-private slots:
-    void agendautilInstanceCreated(int);
-	
-signals:
-    void eventCompleted();
-	
-private:
-
-    AgendaUtil *mAgendaUtil;
-    bool mUtilInstanceCreated;
-};
-
-#endif // __GEOCODEUPDATE_H__ 
--- a/locationdataharvester/geocodeupdate/src/geocodeupdate.cpp	Tue Aug 31 15:09:25 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,167 +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 <qcontactgeolocation.h>
-#include <qcontactmanager.h>
-#include <qtcontacts.h>
-#include <cntdef.h>
-#include <agendautil.h>
-#include <agendaentry.h>
-#include <QString>
-#include <QEventLoop>
-#include <locationservicedefines.h>
-#include "geocodeupdate.h"
-#include "mylocationsdefines.h"
-#include "mylocationlogger.h"
-
-using namespace QTM_NAMESPACE;
-
-
-// ----------------------------------------------------------------------------
-// GeocodeUpdate::GeocodeUpdate()
-// ----------------------------------------------------------------------------
-GeocodeUpdate::GeocodeUpdate() :
-    mAgendaUtil(NULL), mUtilInstanceCreated(false)
-{
-    mAgendaUtil = new AgendaUtil();
-    connect(mAgendaUtil, SIGNAL(instanceViewCreationCompleted(int)), this,
-        SLOT(agendautilInstanceCreated(int)));
-}
-
-// ----------------------------------------------------------------------------
-// GeocodeUpdate::~GeocodeUpdate()
-// ----------------------------------------------------------------------------
-GeocodeUpdate::~GeocodeUpdate()
-{
-    __TRACE_CALLSTACK;
-    if (mUtilInstanceCreated) {
-        delete mAgendaUtil;
-    }
-}
-
-// ----------------------------------------------------------------------------
-// GeocodeUpdate::createContactdb()
-// ----------------------------------------------------------------------------
-void GeocodeUpdate::createContactdb()
-{
-    QContactManager* contactManger = NULL;
-    MYLOCLOGSTRING("call to create contactManger object and contactdb as well.");
-    contactManger = new QContactManager("symbian");
-    delete contactManger;
-}
-
-// ----------------------------------------------------------------------------
-// CGeocodeUpdate::updateGeocodeToContactDB()
-// Geo-cordinate updation to contact db  
-// ----------------------------------------------------------------------------
-bool GeocodeUpdate::updateGeocodeToContactDB(const quint32 contactId, const int addressType,
-    const double latitude, const double longitude)
-
-{
-    __TRACE_CALLSTACK;
-    QContactManager* contactManger = NULL;
-    MYLOCLOGSTRING("call to create contactManger object .");
-    contactManger = new QContactManager("symbian");
-    MYLOCLOGSTRING("contactManger object created .");
-
-    MYLOCLOGSTRING("contactManger object is not null .");
-    QContact contact = contactManger->contact(contactId);
-    QContactGeoLocation location;
-
-    switch (addressType) {
-        case ESourceContactsPref:
-        {
-            break;
-        }
-        case ESourceContactsWork:
-        {
-            location.setContexts(QContactDetail::ContextWork);
-            break;
-        }
-        case ESourceContactsHome:
-        {
-            location.setContexts(QContactDetail::ContextHome);
-            break;
-        }
-        default:
-        {
-            return false;
-        }
-    }
-    location.setLongitude(longitude);
-    location.setLatitude(latitude);
-    contact.saveDetail(&location);
-    bool ret = false;
-    ret = contactManger->saveContact(&contact);
-    delete contactManger;
-    return ret;
-}
-
-// ----------------------------------------------------------------------------
-// CGeocodeUpdate::updateGeocodeToCalenderDB()
-// Geo-cordinate updation to contact db  
-// ----------------------------------------------------------------------------
-bool GeocodeUpdate::updateGeocodeToCalenderDB(const ulong& calEntryId, const double& latitude,
-    const double& longitude)
-
-{
-    __TRACE_CALLSTACK;
-    bool ret = false;
-    if (mUtilInstanceCreated) {
-        AgendaEntry agendaEntry(mAgendaUtil->fetchById(calEntryId));
-        MYLOCLOGSTRING("agenda entry created from calender id .");
-        AgendaGeoValue geoValue;
-        geoValue.setLatLong(latitude, longitude);
-        MYLOCLOGSTRING("latitude and longitude set to  AgendaGeoValue object.");
-        if( !agendaEntry.isNull() )
-        {
-            agendaEntry.setGeoValue(geoValue);
-            ret = mAgendaUtil->store(agendaEntry);
-        }
-    }    
-    return ret;
-}
-
-// ----------------------------------------------------------------------------
-// CGeocodeUpdate::isGeocodeNotAvailable()
-// check if geo-cordinate are available for this specific entry id.
-// return true , for available otherwise false.
-// ----------------------------------------------------------------------------
-bool GeocodeUpdate::isGeocodeNotAvailable(const ulong& calEntryId)
-{
-    __TRACE_CALLSTACK;
-    bool ret = false;
-    if (mUtilInstanceCreated) {
-        AgendaEntry agendaEntry(mAgendaUtil->fetchById(calEntryId));
-        const AgendaGeoValue &geoValue = agendaEntry.geoValue();
-        ret = geoValue.isNull();
-    }
-    return ret;
-}
-
-// ----------------------------------------------------------------------------
-// CGeocodeUpdate::agendautilInstanceCreated()
-// call back on agendautil instance creation  
-// ----------------------------------------------------------------------------
-void GeocodeUpdate::agendautilInstanceCreated(int status)
-{
-    if (AgendaUtil::NoError == status) {
-        mUtilInstanceCreated = true;
-        emit eventCompleted();
-    }
-}
-//end of line
--- a/locationdataharvester/inc/mylocationsdefines.h	Tue Aug 31 15:09:25 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,145 +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 __MYLOCATIONSDEFINES_H__
-#define __MYLOCATIONSDEFINES_H__
-
-/**
- * TLookupItem struct.
- * This structure defines a single lookup item.
- */
-
-class TLookupItem
-{
-public:
-    // Uid of the source entry
-    TUint32 iUid;
-
-    // Source type
-    TUint32 iSource;
-
-    // Landmark uid in the landmarks database
-    TUint32 iLmId;
-   
-    // File Path
-    TFileName iFilePath;
-    
-    //MK  map tile fetching status
-    TUint32 iFetchingStatus;
-};
-
-/** Defines map tile fetching states.
- */
-
-enum TMapTileFetchingState
-    {
-    /** Map tile fetching completed */
-    EMapTileFectchingCompleted,
-    /** Map tile fetching in progress */
-    EMapTileFetchingInProgress,
-    /** Map  tile fetching n/w error */
-    EMapTileFetchingNetworkError,
-    /** Map tile fetching invalid address */
-    EMapTileFetchingInvalidAddress,
-    /** Map tile fetching unknown erro */
-    EMapTileFetchingUnknownError
-    };
-// contacts category in landmarks db
-_LIT( KContactsCategory, "Contacts" );
-
-// calendar category in landmarks db
-_LIT( KCalendarCategory, "Calendar" );
-
-// lookup database folder path
-_LIT( KLookupDbPath, "c:\\mylocations\\" );
-
-//Mylocations resource file
-_LIT(KMyLocationsResourceFile, "z:\\resource\\apps\\mylocations.rsc");
-
-// My locations landmarks database uri.
-_LIT( KMylocationsDatabaseUri, "file://c:MyLocationsLandmarks.ldb" );
-
-// maptile database uri.
-_LIT( KMaptileDatabaseUri, "file://c:MyLocationsMaptile.ldb" );
-
-// History landmarks database uri.
-_LIT( KMapsHistoryUri, "file://c:MapsHistoryLandmarks.ldb" );
-
-// mylocations lookup database name
-_LIT( KMylocationsLookupDatabaseName, "mylocationslookup.db" );
-
-// maptile lookup database name
-_LIT( KMapTileLookupDatabaseName, "mylocationsmaptilelookup.db" );
-
-// landmarks lookup database name
-_LIT( KLandmarksLookupDatabaseName, "landmarkslookup.db" );
-
-// database column names
-_LIT( NColUid, "uid" );
-_LIT( NColSource, "source" );
-_LIT( NColLmUid, "lmuid" );
-
-// maptile database column names
-_LIT( NCntColUid, "cntuid" );
-_LIT( NCntColFilePath, "filepath" );
-_LIT( MapTileFetchingStatus, "fetchingstatus" );
-
-// database table name
-_LIT( KLookupTable, "lookuptable" );
-
-// maptile database table name
-_LIT( KMapTileLookupTable, "cntmaptilelookuptable" );
-
-// uid column number
-const TInt KColumnUid = 1;
-// source type column number
-const TInt KColumnSource = 2;
-// landmark uid column number
-const TInt KColumnLmkUid = 3;
-
-// uid column number
-const TInt KColumncntUid = 1;
-// source type column number
-const TInt KColumnFilePath = 3;
-// fetching state  column number
-const TInt KColumnMapTileFetchingStatus = 4;
-
-const TInt KBufSize=256;
-
-//Different Maptile sizes for different applications
-const int MapTileWidth = 614;
-const int MapTileHeight = 250;
-const int MaptilePortraitWidth = 334;
-const int MaptilePortraitHeight = 250;
-const int MaptileContactLandscapeWidth =  409;
-const int MaptileContactLandscapeHeight = 128;
-const int MaptileCalendarLandscapeWidth = 614;
-const int MaptileCalendarLandscapeHeight = 202;    
-const int MaptileHurriganesWidth = 228;    
-const int MaptileHurriganesHeight = 170;
-
-static const char*  MAPTILE_IMAGE_PORTRAIT = "_Vertical";
-static const char*  MAPTILE_IMAGE_LANDSCAPE = "_Horizontal";
-static const char*  MAPTILE_IMAGE_CALENDAR = "_Calendar";
-static const char*  MAPTILE_IMAGE_CONTACT  = "_Contact"; 
-static const char*  MAPTILE_IMAGE_HURRIGANES = "_Hurriganes";
-static const char*  MAPTILE_IMAGE_TYPE = "PNG";
-       
-#endif  // __MYLOCATIONSDEFINES_H__
-// End of file
-
--- a/locationdataharvester/inc/notification.h	Tue Aug 31 15:09:25 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,42 +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 __NOTIFICATION_H__
-#define __NOTIFICATION_H__
-
-/**  
- * The observer class gives notification to derive class .
- * When calender db creates in specific path.
- */
-class MNotifyChange
-{
-public:
-    //Notification from Calender
-    virtual void NotifyChangeL(TInt &aStatus)=0;
-    
-    //Subscribe the value from publisher
-    virtual void GetChangeNotificationL(TInt &aId, TInt &addressType, TInt &addressCount )=0;
-        
-    virtual void SubscribeFromCalendarL(TInt aId) =0;
-    
-};
-
-
-#endif  // __NOTIFICATION_H__
-// End of file
-
--- a/locationdataharvester/locationdataharvester.pro	Tue Aug 31 15:09:25 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,35 +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 = subdirs
-SUBDIRS = locationdatalookupdb maptileservice geocodeupdate mylocationsdatabasemanager mylocationsengine
-
-
-# Exports
-deploy.path = /
-
-# IBY files
-iby.path = epoc32/rom/include/core/app
-iby.sources = mylocations.iby
-
-for(iby, iby.sources):BLD_INF_RULES.prj_exports += "./rom/$$iby $$deploy.path$$iby.path/$$iby"
-
-
--- a/locationdataharvester/locationdatalookupdb/locationdatalookupdb.cpp	Tue Aug 31 15:09:25 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,695 +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: Location data lookup db implementation
-*
-*/
-
-// INCLUDE FILES
-#include "locationdatalookupdb.h"
-#include <QSqlDatabase>
-#include <QSqlError>
-#include <QSqlQuery>
-#include <QSqlRecord>
-#include <QVariant>
-#include<locationservicedefines.h>
-
-// database name
-#ifdef LOCPICKER_UNIT_TEST
-const QString KLocationDataLookupDbName = "c:\\locationdatalookuptestdb.db"; 
-#else    
-const QString KLocationDataLookupDbName = "c:\\locationdatalookupdb.db"; 
-#endif
-
-
-// ================= MEMBER FUNCTIONS =======================
-//
-// ---------------------------------------------------------
-// LocationDataLookupDb::LocationDataLookupDb()
-// Constructor
-// ---------------------------------------------------------
-//
-LocationDataLookupDb::LocationDataLookupDb( QObject *parent) : 
-        QObject( parent ),
-        mDb( NULL ),
-        mDbOpen( false )
-{
-    mDb = new QSqlDatabase();
-    *mDb = QSqlDatabase::addDatabase( "QSQLITE" );
-    mDb->setDatabaseName( KLocationDataLookupDbName );
-    if (!mDb->open())
-    {
-        delete mDb;
-        mDb = NULL;
-        return;
-    }
-
-    // create lookup table if doesnot exist
-    QSqlQuery query(*mDb);
-    query.exec("create table if not exists lplookup (id INTEGER PRIMARY KEY AUTOINCREMENT,"
-                                             "duplicate int,"
-                                             "sourceid int,"
-                                             "sourcetype int,"
-                                             "destid int,"
-                                             "name varchar(255),"
-                                             "street varchar(255),"
-                                             "postal varchar(50),"
-                                             "city varchar(50),"
-                                             "state varchar(50),"
-                                             "country varchar(50),"
-                                             "latitude double,"
-                                             "longitude double,"
-                                             "icontype int,"
-                                             "iconpath varchar(255),"
-                                             "maptile varchar(255))");
-    
-    
-    query.exec("create table if not exists lplookupaddress ("
-                                             "sourceid int,"
-                                             "address varchar(255))");
-    mDb->close();
-}
-
-// ---------------------------------------------------------
-// LocationDataLookupDb::~LocationDataLookupDb()
-// destructor
-// ---------------------------------------------------------
-LocationDataLookupDb::~LocationDataLookupDb()
-{
-    if( mDb )
-        delete mDb;
-}
-
-// ---------------------------------------------------------
-// LocationDataLookupDb::open()
-// ---------------------------------------------------------
-bool LocationDataLookupDb::open()
-{
-    if( !mDbOpen )
-    {
-        mDbOpen = mDb->open();
-    }
-    return mDbOpen;
-}
-
-// ---------------------------------------------------------
-// LocationDataLookupDb::close()
-// ---------------------------------------------------------
-void LocationDataLookupDb::close()
-{
-    if( mDbOpen )
-        mDb->close();
-    mDbOpen = false;
-}
-
-// ---------------------------------------------------------
-// LocationDataLookupDb::createEntry()
-// ---------------------------------------------------------
-void LocationDataLookupDb::createEntry( QLookupItem& aLookupItem )
-{
-    if( mDbOpen )
-    {
-        QSqlQuery query(*mDb);
-        query.prepare("INSERT INTO lplookup ("
-                              "id, "
-                              "duplicate, "
-                              "sourceid, "
-                              "sourcetype, "
-                              "destid, "
-                              "name, "
-                              "street, "
-                              "postal, "
-                              "city, "
-                              "state, "
-                              "country, "
-                              "latitude, "
-                              "longitude, "
-                              "icontype, "
-                              "iconpath, "
-                              "maptile) "
-                      "VALUES ("
-                              "NULL, "
-                              ":duplicate, "
-                              ":sourceid, "
-                              ":sourcetype, "
-                              ":destid, "
-                              ":name, "
-                              ":street, "
-                              ":postal, "
-                              ":city, "
-                              ":state, "
-                              ":country, "
-                              ":latitude, "
-                              ":longitude, "
-                              ":icontype, "
-                              ":iconpath, "
-                              ":maptile)" );
-        query.bindValue(":duplicate", aLookupItem.mIsDuplicate);
-        query.bindValue(":sourceid", aLookupItem.mSourceUid);
-        query.bindValue(":sourcetype", aLookupItem.mSourceType);
-        query.bindValue(":destid", aLookupItem.mDestId);
-        query.bindValue(":name", aLookupItem.mName);
-        query.bindValue(":street", aLookupItem.mStreet);
-        query.bindValue(":postal", aLookupItem.mPostalCode);
-        query.bindValue(":city", aLookupItem.mCity);
-        query.bindValue(":state", aLookupItem.mState);
-        query.bindValue(":country", aLookupItem.mCountry);
-        query.bindValue(":latitude", aLookupItem.mLatitude);
-        query.bindValue(":longitude", aLookupItem.mLongitude);
-        query.bindValue(":icontype", aLookupItem.mIconType);
-        query.bindValue(":iconpath", aLookupItem.mIconPath);
-        query.bindValue(":maptile", aLookupItem.mMapTilePath);
-        query.exec();
-        
-        QVariant var = query.lastInsertId();
-        aLookupItem.mId = var.toInt();
-        
-        if(aLookupItem.mSourceType==ESourceCalendar)
-        {
-            query.prepare("INSERT INTO lplookupaddress ("
-                    "sourceid ,"
-                    "address )"
-                    "VALUES ("
-                    ":sourceid, "
-                    ":address) " );
-            
-            query.bindValue(":sourceid", aLookupItem.mSourceUid);
-            query.bindValue(":address", aLookupItem.mSingleLineAddress);
-            query.exec();       
-                    
-        }
-        
-    }
-}
-
-// ---------------------------------------------------------
-// LocationDataLookupDb::updateEntryBySourceIdAndType()
-// ---------------------------------------------------------
-void LocationDataLookupDb::updateEntryBySourceIdAndType( const QLookupItem& aLookupItem )
-{
-    if( mDbOpen )
-    {
-        QSqlQuery query(*mDb);
-        query.prepare("UPDATE lplookup SET "
-                        "id = ?, "
-                        "duplicate = ?, "
-                        "sourceid = ?, "
-                        "sourcetype = ?, "
-                        "destid = ?, "
-                        "name = ?, "
-                        "street = ?, "
-                        "postal = ?, "
-                        "city = ?, "
-                        "state = ?, "
-                        "country = ?, "
-                        "latitude = ?, "
-                        "longitude = ?, "
-                        "icontype = ?, "
-                        "iconpath = ?, "
-                        "maptile = ? "
-                      "WHERE sourceid = ? AND sourcetype = ?");
-    
-        query.addBindValue( aLookupItem.mId );
-        query.addBindValue( aLookupItem.mIsDuplicate );
-        query.addBindValue( aLookupItem.mSourceUid );
-        query.addBindValue( aLookupItem.mSourceType );
-        query.addBindValue( aLookupItem.mDestId );
-        query.addBindValue( aLookupItem.mName );
-        query.addBindValue( aLookupItem.mStreet );
-        query.addBindValue( aLookupItem.mPostalCode );
-        query.addBindValue( aLookupItem.mCity );
-        query.addBindValue( aLookupItem.mState );
-        query.addBindValue( aLookupItem.mCountry );
-        query.addBindValue( aLookupItem.mLatitude );
-        query.addBindValue( aLookupItem.mLongitude );
-        query.addBindValue( aLookupItem.mIconType );
-        query.addBindValue( aLookupItem.mIconPath );
-        query.addBindValue( aLookupItem.mMapTilePath );
-    
-        query.addBindValue( aLookupItem.mSourceUid );
-        query.addBindValue( aLookupItem.mSourceType );
-    
-        query.exec();
-        
-        if(aLookupItem.mSourceType==ESourceCalendar)
-        {
-            query.prepare("UPDATE lplookupaddress SET "
-                        "address = ? "
-                        "WHERE sourceid = ? ");
-            
-           
-            query.addBindValue( aLookupItem.mSingleLineAddress);
-            query.addBindValue( aLookupItem.mSourceUid);
-            query.exec();       
-                    
-        }
-    }
-    
-}
-
-// ---------------------------------------------------------
-// LocationDataLookupDb::updateMaptileBySourceIdAndType()
-// ---------------------------------------------------------
-void LocationDataLookupDb::updateMaptileBySourceIdAndType( quint32 aSourceId, 
-        quint32 aSourceType, QString aImagePath )
-{
-    if( mDbOpen )
-    {
-        QSqlQuery query(*mDb);
-        query.prepare("UPDATE lplookup SET "
-                        "maptile = ? "
-                      "WHERE sourceid = ? AND sourcetype = ?");
-    
-        query.addBindValue( aImagePath );
-        query.addBindValue( aSourceId );
-        query.addBindValue( aSourceType );
-    
-        query.exec();
-    }
-}
-
-// ---------------------------------------------------------
-// LocationDataLookupDb::updateEntryById()
-// ---------------------------------------------------------
-void LocationDataLookupDb::updateEntryById( const QLookupItem& aLookupItem )
-{
-    if( mDbOpen )
-    {
-        QSqlQuery query(*mDb);
-        query.prepare("UPDATE lplookup SET "
-                        "id = ?, "
-                        "duplicate = ?, "
-                        "sourceid = ?, "
-                        "sourcetype = ?, "
-                        "destid = ?, "
-                        "name = ?, "
-                        "street = ?, "
-                        "postal = ?, "
-                        "city = ?, "
-                        "state = ?, "
-                        "country = ?, "
-                        "latitude = ?, "
-                        "longitude = ?, "
-                        "icontype = ?, "
-                        "iconpath = ?, "
-                        "maptile = ? "
-                      "WHERE id = ?");
-    
-        query.addBindValue( aLookupItem.mId );
-        query.addBindValue( aLookupItem.mIsDuplicate );
-        query.addBindValue( aLookupItem.mSourceUid );
-        query.addBindValue( aLookupItem.mSourceType );
-        query.addBindValue( aLookupItem.mDestId );
-        query.addBindValue( aLookupItem.mName );
-        query.addBindValue( aLookupItem.mStreet );
-        query.addBindValue( aLookupItem.mPostalCode );
-        query.addBindValue( aLookupItem.mCity );
-        query.addBindValue( aLookupItem.mState );
-        query.addBindValue( aLookupItem.mCountry );
-        query.addBindValue( aLookupItem.mLatitude );
-        query.addBindValue( aLookupItem.mLongitude );
-        query.addBindValue( aLookupItem.mIconType );
-        query.addBindValue( aLookupItem.mIconPath );
-        query.addBindValue( aLookupItem.mMapTilePath );
-    
-        query.addBindValue( aLookupItem.mId );
-    
-        query.exec();
-        
-        if(aLookupItem.mSourceType==ESourceCalendar)
-        {
-            query.prepare("UPDATE lplookupaddress SET "
-                          "address = ? " 
-                        "WHERE sourceid = ?");
-                     
-            query.addBindValue( aLookupItem.mSingleLineAddress);
-            query.addBindValue( aLookupItem.mSourceUid );
-            query.exec();     
-        }
-    }
-}
-
-
-// ---------------------------------------------------------
-// LocationDataLookupDb::updateEntryNameById()
-// ---------------------------------------------------------
-void LocationDataLookupDb::updateEntryNameByIdAndType(quint32 aSourceId, quint32 aSourceType , QString aName)
-{
-	if( mDbOpen )
-		{
-			QSqlQuery query(*mDb);
-			query.prepare("UPDATE lplookup SET "							
-							"name = ? "							
-						    "WHERE sourceid = ? AND sourcetype = ?");
-		
-			query.addBindValue( aName );
-			
-			query.addBindValue( aSourceId );
-			query.addBindValue( aSourceType );				
-			
-			query.exec();
-		}
-}
-
-// ---------------------------------------------------------
-// LocationDataLookupDb::deleteEntryBySourceIdAndType()
-// ---------------------------------------------------------
-void LocationDataLookupDb::deleteEntryBySourceIdAndType( const QLookupItem& aLookupItem )
-{
-    if( mDbOpen )
-    {
-        QSqlQuery query(*mDb);
-        query.prepare( "DELETE FROM lplookup "
-                       "WHERE sourceid = ? AND sourcetype = ?" );
-    
-        query.addBindValue( aLookupItem.mSourceUid );
-        query.addBindValue( aLookupItem.mSourceType );
-    
-        query.exec();
-        
-        if(aLookupItem.mSourceType==ESourceCalendar)
-        {
-            query.prepare( "DELETE FROM lplookupaddress "
-                                   "WHERE sourceid = ? " );                
-            query.addBindValue( aLookupItem.mSourceUid );
-            query.exec();
-        }
-        
-    }
-}
-
-// ---------------------------------------------------------
-// LocationDataLookupDb::findEntryBySourceIdAndType()
-// ---------------------------------------------------------
-bool LocationDataLookupDb::findEntryBySourceIdAndType( QLookupItem& aLookupItem )
-{
-    if( mDbOpen )
-    {
-        QSqlQuery query(*mDb);
-        query.prepare( "SELECT * FROM lplookup "    
-                    "WHERE sourceid = ? AND sourcetype = ?" );
-        query.addBindValue( aLookupItem.mSourceUid );
-        query.addBindValue( aLookupItem.mSourceType );
-    
-        query.exec();
-        
-        if( !query.first() )
-        {
-            return false;
-        }
-    
-        fillLookupEntry( query, aLookupItem );
-        return true;
-    }
-    return false;
-}
-
-// ---------------------------------------------------------
-// LocationDataLookupDb::findEntryById()
-// ---------------------------------------------------------
-bool LocationDataLookupDb::findEntryById( QLookupItem& aLookupItem )
-{
-    if( mDbOpen )
-    {
-        QSqlQuery query(*mDb);
-        query.prepare( "SELECT * FROM lplookup "    
-                    "WHERE id = ?" );
-        query.addBindValue( aLookupItem.mId );
-    
-        query.exec();
-        
-        if( !query.first() )
-        {
-            return false;
-        }
-    
-        fillLookupEntry( query, aLookupItem );    
-        return true;
-    }
-    
-    return false;
-}
-
-
-// ---------------------------------------------------------
-// LocationDataLookupDb::findEntriesByLandmarkId()
-// ---------------------------------------------------------
-void LocationDataLookupDb::findEntriesByLandmarkId( const quint32 aLandmarkId, 
-        QList<QLookupItem>& aLookupItemArray )
-{
-    if( mDbOpen )
-    {
-
-        QSqlQuery query(*mDb);
-        query.prepare( "SELECT * FROM lplookup "    
-                       "WHERE destid = ?" );
-    
-        query.addBindValue( aLandmarkId );
-        query.exec();
-        
-        while( query.next() )
-        {    
-            QLookupItem lookupItem;
-            fillLookupEntry( query, lookupItem );        
-            aLookupItemArray.append( lookupItem );
-        } 
-    }   
-}
-// ---------------------------------------------------------
-// LocationDataLookupDb::getEntries()
-// ---------------------------------------------------------
-void LocationDataLookupDb::getEntries( QList<QLookupItem>& aLookupItemArray, const quint32 aCollectionId )
-{
-    if( mDbOpen )
-    {
-        QSqlQuery query(*mDb);
-        if( aCollectionId == ESourceLandmarksContactsCat )
-        {
-            query.prepare( "SELECT * FROM lplookup " 
-                    "WHERE sourcetype = ? OR sourcetype = ? OR sourcetype = ?" );
-            query.addBindValue( ESourceContactsPref );
-            query.addBindValue( ESourceContactsWork );
-            query.addBindValue( ESourceContactsHome );
-            query.exec();
-        }
-        else if( aCollectionId == ESourceLandmarksCalendarCat )
-        {
-            query.prepare( "SELECT * FROM lplookup " 
-                    "WHERE sourcetype = ?" );
-            query.addBindValue( ESourceCalendar );
-            query.exec();
-           
-        }
-        else if(  aCollectionId == ESourceLandmarks )
-        {
-            query.prepare( "SELECT * FROM lplookup " 
-                    "WHERE sourcetype = ?" );
-            query.addBindValue( ESourceLandmarks );
-            query.exec();
-           
-        }
-        else // all contents
-        {
-            query.prepare( "SELECT * FROM lplookup" );
-            query.exec();
-        }
-        while( query.next() )
-        {    
-            QLookupItem lookupItem;            
-            fillLookupEntry( query, lookupItem );
-            aLookupItemArray.append( lookupItem );
-        }    
-    }
-}
-
-// ---------------------------------------------------------
-// LocationDataLookupDb::getEntfillLookupEntryries()
-// ---------------------------------------------------------
-void LocationDataLookupDb::fillLookupEntry( QSqlQuery &aQuery, QLookupItem &aLookupItem )
-{
-    QSqlRecord rec = aQuery.record();
-    aLookupItem.mId = aQuery.value( rec.indexOf("id") ).toUInt();
-    aLookupItem.mIsDuplicate = aQuery.value( rec.indexOf("duplicate") ).toUInt();
-    aLookupItem.mSourceUid = aQuery.value( rec.indexOf("sourceid") ).toUInt();
-    aLookupItem.mSourceType = aQuery.value( rec.indexOf("sourcetype") ).toUInt();
-    aLookupItem.mDestId = aQuery.value( rec.indexOf("destid") ).toUInt();
-    aLookupItem.mName = aQuery.value( rec.indexOf("name") ).toString();
-    aLookupItem.mStreet = aQuery.value( rec.indexOf("street") ).toString();
-    aLookupItem.mPostalCode = aQuery.value( rec.indexOf("postal") ).toString();
-    aLookupItem.mCity = aQuery.value( rec.indexOf("city") ).toString();
-    aLookupItem.mState = aQuery.value( rec.indexOf("state") ).toString();
-    aLookupItem.mCountry = aQuery.value( rec.indexOf("country") ).toString();
-    aLookupItem.mLatitude = aQuery.value( rec.indexOf("latitude") ).toDouble();
-    aLookupItem.mLongitude = aQuery.value( rec.indexOf("longitude") ).toDouble();
-    aLookupItem.mIconType = aQuery.value( rec.indexOf("icontype") ).toUInt();
-    aLookupItem.mIconPath = aQuery.value( rec.indexOf("iconpath") ).toString();
-    aLookupItem.mMapTilePath = aQuery.value( rec.indexOf("maptile") ).toString();
-
-}
-
-// ---------------------------------------------------------
-// LocationDataLookupDb::getAddressDetails()
-// ---------------------------------------------------------
-QString LocationDataLookupDb::getAddressDetails( quint32 aId , quint32 aSourceType )
-{
-    QString addressDetails;
-    if (mDbOpen)
-    {
-        QSqlQuery query(*mDb);
-        if ( aSourceType == ESourceContactsPref || aSourceType
-                == ESourceContactsWork || aSourceType == ESourceContactsHome)
-        {
-            query.prepare("SELECT * FROM lplookup "
-                "WHERE sourceid = ? AND sourcetype = ?");
-            query.addBindValue( aId );
-            query.addBindValue( aSourceType );
-            query.exec();
-            if (query.first()) {
-                QSqlRecord rec = query.record();
-                QString temp;
-                temp.clear();
-                temp = query.value(rec.indexOf("street")).toString();
-                if (!temp.isEmpty()) 
-                {
-                    addressDetails.append(temp);
-                }
-                temp.clear();
-
-                temp = query.value(rec.indexOf("city")).toString();
-                if (!temp.isEmpty()) {
-                    if (!addressDetails.isEmpty()) 
-                    {
-                        addressDetails.append(QChar(','));
-                        addressDetails.append(QChar(' '));
-                    }
-                    addressDetails.append(temp);
-
-                }
-                temp.clear();
-                temp = query.value(rec.indexOf("state")).toString();
-                if (!temp.isEmpty()) {
-                    if (!addressDetails.isEmpty()) 
-                    {
-                        addressDetails.append(QChar(','));
-                        addressDetails.append(QChar(' '));
-                    }
-                    addressDetails.append(temp);
-
-                }
-                temp.clear();
-                temp = query.value(rec.indexOf("country")).toString();
-                if (!temp.isEmpty()) {
-                    if (!addressDetails.isEmpty()) 
-                    {
-                        addressDetails.append(QChar(','));
-                        addressDetails.append(QChar(' '));
-                    }
-                    addressDetails.append(temp);
-
-                }
-
-            }
-
-        }
-        else if (aSourceType == ESourceCalendar)
-        {
-            query.prepare("SELECT * FROM lplookupaddress "
-                "WHERE sourceid = ? ");
-            query.addBindValue( aId );
-            query.exec();
-            if ( query.first() )
-            {
-                QSqlRecord rec = query.record();
-                addressDetails.append(
-                        query.value(rec.indexOf("address")).toString());
-            }
-        }
-    }
-    return addressDetails;
-}
-
-// ---------------------------------------------------------
-// LocationDataLookupDb::getCount()
-// ---------------------------------------------------------
-void LocationDataLookupDb::getCount( QList<int>& aCount, const quint32 /*aCollectionId*/ )
-{
-    if( mDb )
-     {
-         //   ESourceLandmarksContactsCat 
-         {
-             QSqlQuery query(*mDb);
-             query.prepare( "SELECT * FROM lplookup " 
-                     "WHERE sourcetype = ? OR sourcetype = ? OR sourcetype = ?" );
-             query.addBindValue( ESourceContactsPref );
-             query.addBindValue( ESourceContactsWork );
-             query.addBindValue( ESourceContactsHome );
-             query.exec();
-             
-             
-             qDebug("size %d",query.size());         
-             int count=0;
-             while( query.next() )  count++;
-             aCount.append(count);
-         }
-             
-
-         
-      //   ESourceLandmarksCalendarCat
-         {
-             QSqlQuery query(*mDb);
-             query.prepare( "SELECT * FROM lplookup " 
-                     "WHERE sourcetype = ? AND duplicate = ?" );
-             query.addBindValue( ESourceCalendar );
-             query.addBindValue( 0 );
-             query.exec();
-             
-             qDebug("size %d",query.size());             
-             int count=0;
-             while( query.next() )  count++;
-             aCount.append(count);
-         }
-         
-         
-         
-     //    ESourceLandmarks
-         {
-             QSqlQuery query(*mDb);
-             query.prepare( "SELECT * FROM lplookup " 
-                     "WHERE sourcetype = ?" );
-             query.addBindValue( ESourceLandmarks );
-             query.exec();
-             
-             qDebug("size %d",query.size());
-             int count=0;
-             while( query.next() )  count++;
-             aCount.append(count);
-         }
-             
-         
-    //     else // all contents
-         {
-             QSqlQuery query(*mDb);
-             query.prepare( "SELECT * FROM lplookup"
-                     "WHERE duplicate = ?" );
-             query.addBindValue( 0 );
-             query.exec();
-             int count=0;
-             while( query.next() )  count++;
-             aCount.append(count);
-         }
-         
-    
-    }
-}
-
-// End of file
--- a/locationdataharvester/locationdatalookupdb/locationdatalookupdb.pro	Tue Aug 31 15:09:25 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,47 +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: Location data lookup db project file
-
-TEMPLATE = lib
-DEPENDPATH += .
-INCLUDEPATH += .
-
-
-# By default Qt adds dependencies to QtCore and QtGui, 
-# QtCore is enough for this example 
-#QT = core
-QT           += sql
-
-#BUILD_DLL macro is used to define export macro
-DEFINES += BUILD_DLL           
-
-           
-SOURCES += locationdatalookupdb.cpp
-
-symbian: {
-    TARGET.UID3 = 0x2002E714
-    TARGET.EPOCALLOWDLLDATA = 1
-TARGET.CAPABILITY = ALL \
-        -TCB
-    INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE
-}    
-
-defBlock = \      
-	"$${LITERAL_HASH}if defined(EABI)" \
-		"DEFFILE  ../eabi/locationdatalookupdb.def" \
-    "$${LITERAL_HASH}else" \
-        "DEFFILE  ../bwins/locationdatalookupdb.def" \
-	"$${LITERAL_HASH}endif"
-MMP_RULES += defBlock
-
Binary file locationdataharvester/maptileservice/conf/2002E6E8.txt has changed
--- a/locationdataharvester/maptileservice/conf/maptilecalpublisher.qcrml	Tue Aug 31 15:09:25 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<repository target="RProperty" version="" uidName="repo" uidValue="0x10005901">
-<key ref="/maptilecalpublisher/name" int="0x1"/>
-</repository>
\ No newline at end of file
--- a/locationdataharvester/maptileservice/conf/maptilecontactpublisher.qcrml	Tue Aug 31 15:09:25 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<repository target="RProperty" version="" uidName="repo" uidValue="0x20022EF9">
-<key ref="/maptilecontactpublisher/name" int="0x1"/>
-</repository>
\ No newline at end of file
Binary file locationdataharvester/maptileservice/conf/maptileservice.confml has changed
Binary file locationdataharvester/maptileservice/conf/maptileservice_2002E6E8.crml has changed
--- a/locationdataharvester/maptileservice/inc/maptiledblookuptable.h	Tue Aug 31 15:09:25 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,96 +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: 
-*     Retrieving maptile path from lookup db
-*
-*/
-
-#ifndef __MAPTILEDBLOOKUPTABLE_H__
-#define __MAPTILEDBLOOKUPTABLE_H__
-
-//Headers needed
-#include <f32file.h> //RFs
-#include <d32dbms.h>  //RDbNamedDatabase,RDbView 
-
-#include "mylocationsdefines.h"
-/**
- * CLookupMapTileDatabase class.
- * This class handles all the operations related to maptile lookup database.
- *
- */
-class CLookupMapTileDatabase : public CBase
-{
-public:
- 
-    /**
-    * This is a static function, which creates and returns an instance of this class.
-    */
-    static CLookupMapTileDatabase* NewL( const TDesC& aLookupTableName );
-
-    /**
-    * This is a static function, which creates and returns an instance of this class. 
-    * Pushes the created object to the cleanup stack.
-    */
-    static CLookupMapTileDatabase* NewLC( const TDesC& aLookupTableName );
-
-    /**
-    * Destructor
-    */
-    ~CLookupMapTileDatabase();
-
-public:
-  
-   /**
-    * Finds an entry in the lookup table.
-    * @param[in/out] aLookupItem The lookup item to be found in the database.
-    * The source iUid is passed in the lookup item
-    */
-    void FindEntryL( TLookupItem& aLookupItem );
-    
-    /**
-     * Finds the number of address present in db associated with the aId. 
-     * @param id, entry (calendar/contact) uid.
-     * @return Number of address a contact has.
-     */
-    int FindNumberOfAddressL( int& aId );
-
-private:
-    
-    // default constructor
-    CLookupMapTileDatabase();
-    
-    // Second phase constructor
-    void ConstructL( const TDesC& aLookupTableName );
-
-private:
-    
-    // Handle to the items database
-    RDbNamedDatabase iItemsDatabase;
-    
-    // handle to the file session
-    RFs iFsSession;
-        
-    // holds the database file name
-    TFileName iDbFileName;
-    
-    // holds the info about database existence.
-    TBool iDatabaseExists;
-
-};
-
-
-#endif  // __MAPTILEDBLOOKUPTABLE_H__`
-
-// End of file
-
--- a/locationdataharvester/maptileservice/inc/maptileservice.h	Tue Aug 31 15:09:25 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,184 +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: 
-*     maptile service interface
-*
-*/
-
-#ifndef _MAPTILESERVICE_H_
-#define _MAPTILESERVICE_H_
-
-
-#include <QString>
-#include <QtGlobal>
-#include <QObject>
-#include <qmobilityglobal.h>
-
-QTM_BEGIN_NAMESPACE
-class QValueSpacePublisher;
-class QValueSpaceSubscriber;
-QTM_END_NAMESPACE
-
-QTM_USE_NAMESPACE
-
-#ifdef  MAPTILESERVICEDLL
-#define MAPTILESERVICE_EXPORT Q_DECL_EXPORT
-#else
-#define MAPTILESERVICE_EXPORT Q_DECL_IMPORT
-#endif
-
-class TLookupItem;
-
-// CLASS DECLARATION
-
-/**
-*  Maptile service class,  provides interface to get map tile image associated with 
-*  contact. Also provides interface to check whether location feature is enabled or disabled.
-*
-*  Note: Location feature can be enabled or disabled by modifying conf\cntmaptileservice.confml file.
-*/
-class MAPTILESERVICE_EXPORT MapTileService : public QObject
-{
-    Q_OBJECT
-public:
-
-    /** 
-     * Maptile fetching status
-     */
-    enum MapTileStatus
-    {
-        /** Map tile fetching completed */
-        MapTileFetchingCompleted = 0,
-        /** Map tile fetching in progress */
-        MapTileFetchingInProgress,
-        /** Map  tile fetching n/w error */
-        MapTileFetchingNetworkError,
-        /** Map tile fetching invalid address */
-        MapTileFetchingInvalidAddress,
-        /** Map tile fetching unknown erro */
-        MapTileFetchingUnknownError
-    };
-
-    /**
-     * Application types      
-     */
-    enum AppType
-    {
-        /** Contacts application */
-        AppTypeContacts,
-        /** Calendar application */
-        AppTypeCalendar
-    };
-	
-    /** 
-     * Address types
-     */
-    enum AddressType      
-    {
-        /** Plain Address Type */
-        AddressPlain,
-        /** Address Type Pref */
-        AddressPreference,
-        /** Address type Work */
-        AddressWork,
-        /** Address type Home */
-        AddressHome,
-        /** Address type Unknown */
-        AddressUnknown
-    };
-        
-    MapTileService();
-    
-    ~MapTileService();
-    
-   /**
-    * Checks whether location feature enabled or disabled for specific application.
-    * 
-    * @return Returns true or false based on location feature setting.
-    */
-    bool isLocationFeatureEnabled(AppType appType);
-            
-   /**
-    * Gets a maptile image associated with a id(contact id/calendar id). 
-    * Returns a maptile image path if it is available otherwise returns NULL.
-    * 
-    * @param contactId  app id     
-    * @param sourceType Source address type( Preferred, Home , Work address )
-    * @param imagePath  Maptile image path associated with the app id
-    * @param orientation Application current orientation.   
-    *      
-    * @return Returns the maptile fetching status.
-    */
-    int getMapTileImage( int Id, AddressType sourceType, 
-             QString& imagePath, Qt::Orientations orientation = Qt::Vertical  );  
-    
-public slots: 
-    /**
-     * Receives maptile status information and emits the maptilFetchingStatusUpdate
-     * signal.
-     */
-    void setMaptileStatus();
-
-signals:
-    /**
-     * Signal to update the maptile fetchings status to contact/calendar application.
-     * @param id  app id     
-     * @param addressType Source address type( Preferred, Home , Work address )
-     * @param status Maptile status for the associated address
-     */
-     void maptileFetchingStatusUpdate( int id, int addressType, int status );
-    
-
-private:
-
-    /**
-     * Publish the contact entry id , AddressType and number of address
-     * @param id, Contact id .
-     * @param sourceType, address type( Preferred, Home , Work address )
-     * @param addressCount ,number of address to be published. 
-     */
-    void publishValue(int id, AddressType sourceType, int addressCount );
-    /**
-    * Publish the calendar entry id , AddressType and number of address
-    * @param id, calendar entry id .
-    * @param sourceType, address type( plain) 
-    * @param addressCount ,number of address to be published. 
-    */
-    void publishCalEntry(int id);
-    
-    /**
-    * Read entry from database
-    * @param id, Contact/calendar id .
-    * @param sourceType, address type( plain ,Preferred, Home , Work address )
-    * @param aLookupItem ,entry information
-    * @param aNoOfAddress ,number of address read from databse 
-    */
-    int readEntryFromMaptileDataBase( int id, AddressType sourceType,
-                TLookupItem& aLookupItem, int& aNoOfAddress  );
-
-private:
-    
-    //The contact/calendar id for which maptile requested
-    int mLastViewedEntryId;
-	
-    //Maptile request publisher
-    QValueSpacePublisher *mPublisher;
-    //Maptile status request subscriber
-    QValueSpaceSubscriber *mSubscriber;
-	//Calendar Maptile request publisher
-    QValueSpacePublisher *mCalPublisher;
-};
-
-#endif //MAPTILESERVICE_H_
-
--- a/locationdataharvester/maptileservice/maptileservice.pro	Tue Aug 31 15:09:25 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,94 +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 = lib
-TARGET = maptileservice   
-
-CONFIG += dll
-CONFIG += hb
-CONFIG += mobility
-MOBILITY = publishsubscribe
-
-DEPENDPATH += .
-INCLUDEPATH += .
-INCLUDEPATH += ../inc
-INCLUDEPATH += ../mylocationlogger/inc
-
-MOC_DIR = moc
-
-DEFINES += MAPTILESERVICEDLL
-
-INTERNAL_PUBLIC_HEADERS +=  inc/maptileservice.h        
-
-# Input
-HEADERS +=  $$INTERNAL_PUBLIC_HEADERS \
-           ./inc/maptiledblookuptable.h  
-           
-               
-    
-SOURCES += ./src/maptileservice.cpp ./src/maptiledblookuptable.cpp
-
-symbian: 
-{
-
-    :BLD_INF_RULES.prj_exports += "conf/maptileservice.confml APP_LAYER_CONFML(maptileservice.confml)"
-    :BLD_INF_RULES.prj_exports += "conf/maptileservice_2002E6E8.crml APP_LAYER_CRML(maptileservice_2002E6E8.crml)"
-    :BLD_INF_RULES.prj_exports += "conf/2002E6E8.txt /epoc32/winscw/c/private/10202be9/2002E6E8.txt"
-    
-    TARGET.EPOCALLOWDLLDATA = 1
-    TARGET.CAPABILITY = All -Tcb
-    TARGET.UID3 = 0x2002E6E8
-    INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE
-
-    
-   LIBS += -ledbms  \
-           -lbafl \
-           -lcentralrepository \
-           -leuser \
-           -lflogger \
-           -lefsrv
-   
-        myCrml.sources = ./conf/maptilecontactpublisher.qcrml
-        myCrml.path = c:/resource/qt/crml
-        DEPLOYMENT += myCrml
-        
-        myCrml1.sources = ./conf/maptilecalpublisher.qcrml
-        myCrml1.path = c:/resource/qt/crml
-        DEPLOYMENT += myCrml1
-
-}  
-
-deploy.path = /
-headers.sources = $$INTERNAL_PUBLIC_HEADERS
-headers.path = epoc32/include/app
-DEPLOYMENT += exportheaders
-
-# This is for new exporting system coming in garden
-for(header, headers.sources):BLD_INF_RULES.prj_exports += "$$header $$deploy.path$$headers.path/$$basename(header)"
-
-defBlock = \      
-	"$${LITERAL_HASH}if defined(EABI)" \
-		"DEFFILE  ../eabi/maptileservice.def" \
-    "$${LITERAL_HASH}else" \
-        "DEFFILE  ../bwins/maptileservice.def" \
-	"$${LITERAL_HASH}endif"
-MMP_RULES += defBlock
-
--- a/locationdataharvester/maptileservice/src/maptiledblookuptable.cpp	Tue Aug 31 15:09:25 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,228 +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: 
-*     Retrieving maptile path from lookup db implementation
-*
-*/
-
-#include <bautils.h>
-#include <maptileservice.h>
-#include "maptiledblookuptable.h"
-
-// select all from
-_LIT( KSelectAllFrom, "SELECT * FROM " );
-
-// string 'where'
-_LIT( KStringWhere, " WHERE " );
-
-// string ' = '
-_LIT( KStringEqual, " = " );
-
-// string 'And'
-_LIT( KStringAnd, " AND " );
-
-
-_LIT(KQueryByMaptileState,"SELECT * FROM cntmaptilelookuptable WHERE cntuid = %d AND ( fetchingstatus = %d OR fetchingstatus = %d )");
-
-// -----------------------------------------------------------------------------
-// CLookupMapTileDatabase::CLookupMapTileDatabase()
-// Default constructor.
-// -----------------------------------------------------------------------------
-//
-CLookupMapTileDatabase::CLookupMapTileDatabase()
-{
-}
-
-// -----------------------------------------------------------------------------
-// CLookupMapTileDatabase::~CLookupMapTileDatabase()
-// Destructor.
-// -----------------------------------------------------------------------------
-//
-CLookupMapTileDatabase::~CLookupMapTileDatabase()
-{
-
-    // close the database
-	iItemsDatabase.Close();
-	
-	// close the file session
-	iFsSession.Close();
-}
- 
-// -----------------------------------------------------------------------------
-// CLookupMapTileDatabase::~CLookupMapTileDatabase()
-// Creates an object of this class and pushes to cleanup stack.
-// -----------------------------------------------------------------------------
-//
-CLookupMapTileDatabase* CLookupMapTileDatabase::NewLC( const TDesC& aLookupTableName )
-{
-    
-    CLookupMapTileDatabase* self = new (ELeave) CLookupMapTileDatabase;
-    CleanupStack::PushL(self);
-    self->ConstructL( aLookupTableName );
-    return self;
-}
-
-
-// -----------------------------------------------------------------------------
-// CLookupMapTileDatabase::NewL()
-// Creates an object of this class.
-// -----------------------------------------------------------------------------
-//
-CLookupMapTileDatabase* CLookupMapTileDatabase::NewL( const TDesC& aLookupTableName )
-{
-    CLookupMapTileDatabase* self = CLookupMapTileDatabase::NewLC( aLookupTableName );
-    CleanupStack::Pop( self );
-    return self;
-}
- 
-
-// -----------------------------------------------------------------------------
-// CLookupMapTileDatabase::ConstructL()
-// 2nd phase contructor.
-// -----------------------------------------------------------------------------
-//
-void CLookupMapTileDatabase::ConstructL( const TDesC& aLookupTableName )
-{
-   
-    User::LeaveIfError( iFsSession.Connect() );
-    
-    iDbFileName.Copy( KLookupDbPath );
-    iDbFileName.Append( aLookupTableName );
-    
-    iDatabaseExists = EFalse; 
-
-    if( BaflUtils::FileExists( iFsSession, iDbFileName ) )
-    {	
-        // database exists 
-        iDatabaseExists = ETrue; 
-    }
-}
-
-// -----------------------------------------------------------------------------
-// CLookupMapTileDatabase::FindNumberOfAddressL()
-// find the number of address associated with the aId.
-// -----------------------------------------------------------------------------
-//
-int CLookupMapTileDatabase::FindNumberOfAddressL( int& aId )
-{
-    int count = 0;
-    
-    // Create a query to find the item.
-    TFileName queryBuffer;
-    queryBuffer.Format( KQueryByMaptileState,aId,
-             MapTileService::MapTileFetchingInProgress,
-             MapTileService::MapTileFetchingNetworkError );
-  
-    TInt ret = iItemsDatabase.Open( iFsSession, iDbFileName );
-    
-    if( ret != KErrNone )
-    {          
-        //if already opened , close and open again
-        iItemsDatabase.Close();          
-        User::LeaveIfError( iItemsDatabase.Open( iFsSession, iDbFileName ) );
-    }
-    
-    User::LeaveIfError( iItemsDatabase.Begin() );       
-    // Create a view of the table with the above query.
-    RDbView myView;
-    myView.Prepare( iItemsDatabase, TDbQuery( queryBuffer ) );
-    CleanupClosePushL( myView );
-    myView.EvaluateAll();
-    myView.FirstL();
-    
-    
-    while (myView.AtRow())
-    {
-        count++;
-        myView.NextL();
-    }
-    
-    CleanupStack::PopAndDestroy( &myView ); // myView
-         
-    //Close the database
-    iItemsDatabase.Close();
-
-    return count;
-}
-
-// -----------------------------------------------------------------------------
-// CLookupMapTileDatabase::FindEntryL()
-// Finds an entry in the lookup table.
-// -----------------------------------------------------------------------------
-//
-void CLookupMapTileDatabase::FindEntryL( TLookupItem& aLookupItem )
-{ 
-   
-    // used to check whether entry available or not
-    TBool entryAvailable = EFalse;
-  
-    if ( iDatabaseExists )
-    {
-
-        // Create a query to find the item.
-        TFileName queryBuffer;
-        queryBuffer.Copy( KSelectAllFrom );
-        queryBuffer.Append( KMapTileLookupTable );
-        queryBuffer.Append( KStringWhere );
-        queryBuffer.Append( NCntColUid );
-        queryBuffer.Append( KStringEqual );
-        queryBuffer.AppendNum( aLookupItem.iUid );
-        queryBuffer.Append( KStringAnd );
-        queryBuffer.Append( NColSource );
-        queryBuffer.Append( KStringEqual );
-        queryBuffer.AppendNum( aLookupItem.iSource );
-        
-        TInt ret = iItemsDatabase.Open( iFsSession, iDbFileName );
-        
-        if( ret != KErrNone )
-        {          
-            //if already opened , close and open again
-            iItemsDatabase.Close();          
-            User::LeaveIfError( iItemsDatabase.Open( iFsSession, iDbFileName ) );
-        }
-        User::LeaveIfError( iItemsDatabase.Begin() );       
-        // Create a view of the table with the above query.
-        RDbView myView;
-        myView.Prepare( iItemsDatabase, TDbQuery( queryBuffer ) );
-        CleanupClosePushL( myView );
-        myView.EvaluateAll();
-        myView.FirstL();
-    
-        if( myView.AtRow() ) 
-        {  
-            // Item found. get the details.
-            myView.GetL();      
-            if( aLookupItem.iUid == myView.ColUint( KColumnUid ) )
-            {               
-                aLookupItem.iFilePath.Copy( myView.ColDes16( KColumnFilePath ) );
-                aLookupItem.iFetchingStatus = myView.ColUint( KColumnMapTileFetchingStatus );
-                entryAvailable = ETrue;
-            }      
-        } 
-    
-        CleanupStack::PopAndDestroy( &myView ); // myView
-        
-        //Close the database
-        iItemsDatabase.Close();
-    }
-   
-    //No entry found 
-    if( !entryAvailable )
-    {
-        User::Leave( KErrNotFound );
-    }
-}
-
-// End of file
-
--- a/locationdataharvester/maptileservice/src/maptileservice.cpp	Tue Aug 31 15:09:25 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,394 +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: 
-*     Maptile service implementation
-*
-*/
-
-
-#include <centralrepository.h> 
-#include <locationservicedefines.h>
-#include <qvaluespacepublisher.h>
-#include <qvaluespacesubscriber.h>
-#include <qfile.h>
-#include "mylocationlogger.h"
-
-#include "maptileservice.h"
-#include "maptiledblookuptable.h"
-#include <QVariant>
-// CONSTANTS
-// Maptile interface uid
-const TUid KUidMapTileInterface = { 0x2002E6E8 };
-
-// Central Repository Key IDs
-const TInt KEnableLocationFeature  = 0x1;
-
-const char *MAPTILE_STATUS_RECEIVER = "/maptilestatuspublisher/name";
-const char *MAPTILE_STATUS_PUBLISHER = "/maptilecontactpublisher";
-const char *MAPTILE_STATUS_CALENDAR_PUBLISHER = "/maptilecalpublisher";
-
-
-// -----------------------------------------------------------------------------
-// MapTileService::MapTileService()
-// Default constructor
-// -----------------------------------------------------------------------------
-//
-MapTileService::MapTileService():mCalPublisher(0)
-{
-   /* Constructs a QValueSpacePublisher that publishes values under path /mypublisher*/
-    mPublisher = NULL;    
-    mSubscriber = new QValueSpaceSubscriber( MAPTILE_STATUS_RECEIVER );
-    //Connect for maptile status change key
-    QObject::connect(mSubscriber, SIGNAL(contentsChanged()), this, SLOT(setMaptileStatus()));
-    
-}
-
-// -----------------------------------------------------------------------------
-// MapTileService::~MapTileService()
-// Destructor
-// -----------------------------------------------------------------------------
-//
-MapTileService::~MapTileService()
-{
-    if( mSubscriber )
-    {
-        delete mSubscriber;
-        mSubscriber = NULL;
-    }
-    
-    if( mPublisher )
-    {
-        delete mPublisher;
-        mPublisher = NULL;
-    }
-	if( mCalPublisher )
-	{
-	    delete mCalPublisher;
-		mCalPublisher = NULL;
-	}
-}
-// -----------------------------------------------------------------------------
-// MapTileService::isLocationFeatureEnabled()
-// Checks whether location feature is enabled or disabled
-// -----------------------------------------------------------------------------
-//
-bool MapTileService::isLocationFeatureEnabled(AppType appType)
-{    
-    //Create the centrep with uid 0x2002C3A8
-    bool enableLocationFeature = false;
-    
-    CRepository* centralRepository = NULL;  
-     
-    TRAPD( err, centralRepository = CRepository::NewL( KUidMapTileInterface ) );
-    if ( KErrNone == err )
-    {
-        TInt repValue;
-      
-        //Get the Location feature flag
-        int ret=0;
-        if ( appType == AppTypeContacts )
-        {
-            ret = centralRepository->Get( KEnableLocationFeature , repValue );
-        }
-        else if ( appType == AppTypeCalendar )
-        {
-             ret = centralRepository->Get( KEnableLocationFeature , repValue );
-        }
-      
-        if ( ret == KErrNone && repValue == 1 )
-        {
-            enableLocationFeature  = true;
-        }
-           
-         delete centralRepository;
-    }
-           
-    return   enableLocationFeature;
-    
-}
-
-
-// -----------------------------------------------------------------------------
-// MapTileService::getMapTileImage()
-// Gets the maptile image path associated with a contact.
-// -----------------------------------------------------------------------------
-//
-int MapTileService::getMapTileImage( int id, AddressType sourceType, 
-             QString& imagePath, Qt::Orientations orientation )    
-{
-    __TRACE_CALLSTACK;
-    
-    TLookupItem lookupItem;
-    
-    int addressCount = 0;  
-    int maptileStatus = MapTileFetchingUnknownError;
-
-    int error = readEntryFromMaptileDataBase( id, sourceType, lookupItem, addressCount );
-        
-    //if entry available returns the file path otherwise NULL. 
-    if ( KErrNone == error  )
-    {
-     
-        maptileStatus = lookupItem.iFetchingStatus;
-        MYLOCLOGSTRING1("getMapTileImage maptileStatus  - %d ", maptileStatus );
-        
-        if( maptileStatus == MapTileFetchingCompleted )
-        {
-            //Get the image path
-	          QString imageFile((QChar*)lookupItem.iFilePath.Ptr(),
-	                    lookupItem.iFilePath.Length());
-	          imagePath = imageFile;
-	        
-	          if( orientation == Qt::Vertical )
-	          {
-	              imagePath.append( MAPTILE_IMAGE_PORTRAIT ); 
-	          }
-	          else
-	          {
-	              if( sourceType == AddressPlain )
-	              {
-	                  imagePath.append( MAPTILE_IMAGE_CALENDAR );
-	              }
-	              else if ( sourceType == AddressHome || 
-	                   sourceType == AddressPreference || sourceType == AddressWork )
-	              {
-	                  imagePath.append( MAPTILE_IMAGE_CONTACT );
-	              }
-	              imagePath.append( MAPTILE_IMAGE_LANDSCAPE );
-	          }
-	          
-	          //Check if file exist
-	          if( !QFile::exists( imagePath ) )
-	          {
-	              imagePath.clear();
-	           		maptileStatus = MapTileFetchingUnknownError;
-	          }
-	      }
-        else if( maptileStatus == MapTileFetchingNetworkError ||
-                    maptileStatus == MapTileFetchingInProgress )
-        {
-            switch(sourceType)
-            {           
-                case AddressHome:            
-                case AddressPreference:           
-                case AddressWork:
-                {
-                    publishValue( id, sourceType, addressCount );
-                    break;
-                }
-                
-                case AddressPlain:
-                {
-                    publishCalEntry( id );
-                    break;
-                }
-                default:
-                    break;
-            };
-           		  
-        }
-                    
-
-    }
-    else if ( KErrNotFound == error )
-    {
-        MYLOCLOGSTRING("getMapTileImage entry not found, return MapTileFetchingInProgress" );
-        //If entry is not found , it will be a newly added entry.       
-        switch (sourceType) {
-            case AddressHome:
-            case AddressPreference:
-            case AddressWork:
-            {
-                publishValue(id, sourceType, addressCount);
-                break;
-            }
-    
-            case AddressPlain:
-            {
-                publishCalEntry(id);
-                break;
-            }
-            default:
-                break;
-        };
-        maptileStatus = MapTileFetchingInProgress;
-    }
- 
-    //Return the maptile status
-    MYLOCLOGSTRING("getMapTileImage  returns MapTileFetchingUnknownError" );
-    return maptileStatus;
-
-}
-
-// -----------------------------------------------------------------------------
-// MapTileService::setMaptileStatus()
-// Gets call back from location engine , after maptile fetching done ,
-// to set status and emit signal . 
-// -----------------------------------------------------------------------------
-//
-void MapTileService::setMaptileStatus()
-{
-    __TRACE_CALLSTACK;
-    QString imagePath;
-    AddressType addressType = AddressUnknown;   
-    QStringList subPath = mSubscriber->subPaths();
-    QVariant value = mSubscriber->value(subPath.at(0));
-      
-    //Subscriber Protocol : [appid-addresstype-maptilestatus]
-    QStringList text = value.toString().split("-");
-    
-    int id = text.at(0).toInt();
-    int status = text.at(2).toInt();
-    
-    switch( text.at(1).toInt() )
-    {
-        case ESourceContactsPref:
-            addressType = AddressPreference;
-            break;
-        case ESourceContactsWork:
-            addressType = AddressWork;
-            break;        
-        case ESourceContactsHome:
-            addressType = AddressHome;
-            break;
-        case ESourceCalendar:           
-            addressType = AddressPlain;
-            break;
-        default:
-            break;
-    }
-            
-    //Emit the maptile status signal 
-    int type = addressType;
-    MYLOCLOGSTRING1("setMaptileStatus() status  - %d ", addressType );
-    if( mLastViewedEntryId == id )
-    {
-        emit maptileFetchingStatusUpdate( mLastViewedEntryId, type , status );
-	}
-  
-}
-
-// -----------------------------------------------------------------------------
-// MapTileService::publishValue()
-// publish the contact entry 
-// -----------------------------------------------------------------------------
-//
-void MapTileService::publishValue( int id, AddressType sourceType, int addressCount )
-{
-    __TRACE_CALLSTACK;
-    mLastViewedEntryId = id;
-    
-	int addressType = ESourceInvalid;    
-    switch( sourceType )
-    {
-        case AddressPreference:
-            addressType = ESourceContactsPref;
-            break;
-        case AddressWork:
-            addressType = ESourceContactsWork;
-            break;
-        case AddressHome:
-            addressType = ESourceContactsHome;
-            break;
-    }
-    
-    if ( !mPublisher )
-    {
-        /* Constructs a QValueSpacePublisher that publishes values under path /mypublisher*/
-        mPublisher = new QValueSpacePublisher( MAPTILE_STATUS_PUBLISHER, this);
-    }
-   
-    
-    /* Publisher protocol [appid-addresstype-count] */
-    QString addressId;
-    addressId.append( QVariant(id).toString());
-    addressId.append( QChar('-') );
-    addressId.append( QVariant(addressType).toString());
-    addressId.append( QChar('-') );
-    addressId.append( QVariant(addressCount).toString() );
-    mPublisher->setValue("name", addressId.toAscii() );
-    mPublisher->sync();
-    
-}
-
-// -----------------------------------------------------------------------------
-// MapTileService::publishValue()
-// publish the calendar entry 
-// -----------------------------------------------------------------------------
-//
-void MapTileService::publishCalEntry( int id)
-{
-    __TRACE_CALLSTACK;
-    mLastViewedEntryId = id;       
-    if ( NULL ==mCalPublisher )
-    {
-        /* Constructs a QValueSpacePublisher that publishes values under path /mypublisher*/
-        mCalPublisher = new QValueSpacePublisher( MAPTILE_STATUS_CALENDAR_PUBLISHER, this);
-    }    
-    mCalPublisher->setValue("name", id);
-    mCalPublisher->sync();
-}
-
-// -----------------------------------------------------------------------------
-// MapTileService::readEntryFromMaptileDataBase()
-// Read all entries from database
-// -----------------------------------------------------------------------------
-//
-int MapTileService::readEntryFromMaptileDataBase( 
-            int id, AddressType sourceType, TLookupItem& aLookupItem, int& aNoOfAddress )
-{
-    
-    //Maptile database  instance
-    CLookupMapTileDatabase* mapTileDatabase = NULL;
-   
-    TRAPD( err, mapTileDatabase = CLookupMapTileDatabase::NewL(
-            KMapTileLookupDatabaseName ) );
-    
-    if ( KErrNone == err )
-    {     
-        TRAP( err,aNoOfAddress = mapTileDatabase->FindNumberOfAddressL(id) );
-        MYLOCLOGSTRING1("no of address  FindNumberOfAddressL returns - %d ", err );     
-       if ( KErrNone == err )
-       {
-            aLookupItem.iUid = id;
-            switch (sourceType)
-            {
-                case AddressPlain:
-                    aLookupItem.iSource = ESourceCalendar;
-                    break;
-                case AddressPreference:
-                    aLookupItem.iSource = ESourceContactsPref;
-                    break;
-                case AddressWork:
-                    aLookupItem.iSource = ESourceContactsWork;
-                    break;
-                case AddressHome:
-                    aLookupItem.iSource = ESourceContactsHome;
-                    break;
-                default:
-                    break;
-            }
-
-            TRAP( err , mapTileDatabase->FindEntryL( aLookupItem ) );
-
-            MYLOCLOGSTRING1("getMapTileImage FindEntryL returns - %d ", err );
-        }
-        //delet the database instance
-        delete mapTileDatabase;
-           
-    }
-    
-    return err;
-}
-// End of file
--- a/locationdataharvester/mylocationlogger/inc/mylocationlogger.h	Tue Aug 31 15:09:25 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,143 +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 MYLOCATIONLOGGER_H
-#define MYLOCATIONLOGGER_H
-#include <e32base.h> 
-#include <e32std.h> 
-#include <e32des8.h>
-#include <e32svr.h>
-#include "mylocloggingconfiguration.h"
-_LIT( KLogsDir, "Mylocation");
-_LIT( KLogFileName, "Mylocation.log");
-
-/*
- We have 3 possible logging methods:
-
- set MYLOC_LOGGING_METHOD to 0 to get no logging at all
- set MYLOC_LOGGING_METHOD to 1 to get logging via RDebug::Print
- set MYLOC_LOGGING_METHOD to 2 to get logging to log file
-
- Switching on/off is done in the Configuration file (MyLocLoggingConfiguration.h)
- */
-
-#if ( defined (_MYLOCLOGGING) )
-#if ( defined (_MYLOC_LOGGING_TO_FILE))
-#define MYLOC_LOGGING_METHOD 2
-#else
-#define MYLOC_LOGGING_METHOD 1
-#endif
-#else
-#define MYLOC_LOGGING_METHOD 0
-#endif
-
-#if (MYLOC_LOGGING_METHOD==0)
-#define MYLOCLOGSTRING(C)
-#define MYLOCLOGSTRING1(C, X)
-#define MYLOCLOGSTRING2(C, X, Y)
-#define MYLOCLOGSTRING3(C, X, Y, Z)
-#define MYLOCLOGSTRING4(C, X, Y, Z, A)
-#endif
-#if (MYLOC_LOGGING_METHOD==1)
-#define MYLOCLOGSTRING(C)                RDebug::Print(_L(C));
-#define MYLOCLOGSTRING1(C, X)            RDebug::Print(_L(C),X);
-#define MYLOCLOGSTRING2(C, X, Y)         RDebug::Print(_L(C),X, Y);
-#define MYLOCLOGSTRING3(C, X, Y, Z)      RDebug::Print(_L(C),X, Y, Z);
-#define MYLOCLOGSTRING4(C, X, Y, Z, A)   RDebug::Print(_L(C),X, Y, Z, A);
-#endif
-#if (MYLOC_LOGGING_METHOD==2)
-#ifndef __COMMSDEBUGUTILITY_H__
-#define __COMMSDEBUGUTILITY_H__
-#include <flogger.h>
-#endif
-
-
-#define MYLOCLOGSTRING(C)                {_LIT(tempLogDes,C);RFileLogger::WriteFormat(KLogsDir(),KLogFileName(), EFileLoggingModeAppend, tempLogDes());}
-#define MYLOCLOGSTRING1(C, X)            {_LIT(tempLogDes,C);RFileLogger::WriteFormat(KLogsDir(),KLogFileName(), EFileLoggingModeAppend, TRefByValue<const TDesC>(tempLogDes()),X);}
-#define MYLOCLOGSTRING2(C, X, Y)         {_LIT(tempLogDes,C);RFileLogger::WriteFormat(KLogsDir(),KLogFileName(), EFileLoggingModeAppend, TRefByValue<const TDesC>(tempLogDes()),X,Y);}
-#define MYLOCLOGSTRING3(C, X, Y, Z)      {_LIT(tempLogDes,C);RFileLogger::WriteFormat(KLogsDir(),KLogFileName(), EFileLoggingModeAppend, TRefByValue<const TDesC>(tempLogDes()),X,Y,Z);}
-#define MYLOCLOGSTRING4(C, X, Y, Z, A)   {_LIT(tempLogDes,C);RFileLogger::WriteFormat(KLogsDir(),KLogFileName(), EFileLoggingModeAppend, TRefByValue<const TDesC>(tempLogDes()),X,Y,Z,A);}
-#endif
-
-/*
- *Trace implementation
- * Description:
- * Macro definition file for logging.
- */
-
-#if !(MYLOC_LOGGING_METHOD == 0)
-#ifdef __cplusplus
-
-// define the following macro to enable call stack trace.
-#define FUNCTION_ETRY_EXIT
-
-const TInt KMaxLogLength = 256;
-class CLogFunctionEntryExit : public CBase
-{
-public:
-    CLogFunctionEntryExit(const char* aFunctionName, const TInt aLineNo) :
-        iFunctionName(aFunctionName)
-    {
-    #if (MYLOC_LOGGING_METHOD == 2)
-            iBuffer = HBufC8::New(KMaxLogLength);
-            if (iBuffer != NULL)
-            {
-                TPtr8 buf = iBuffer->Des();
-                buf.Copy((const TUint8 *) aFunctionName);
-                _LIT8(KFormat,"=> %S [%02d])");
-                RFileLogger::WriteFormat(KLogsDir(), KLogFileName(),
-                        EFileLoggingModeAppend, TRefByValue<const TDesC8> (
-                                KFormat()), &buf, aLineNo);
-            }
-    #else                
-            RDebug::Printf("=> %s [%02d])", iFunctionName, aLineNo);
-    #endif                
-        }
-        ~CLogFunctionEntryExit()
-        {
-    #if (MYLOC_LOGGING_METHOD == 2)
-            TPtr8 buf = iBuffer->Des();
-            _LIT8(KFormat,"<= %S");
-            RFileLogger::WriteFormat(KLogsDir(), KLogFileName(),
-                    EFileLoggingModeAppend, TRefByValue<const TDesC8> (KFormat()),
-                    &buf);
-            delete iBuffer;
-    #else            
-            RDebug::Printf("<= %s", iFunctionName);
-    #endif            
-        }
-private:
-        const char* iFunctionName;
-    #if (MYLOC_LOGGING_METHOD == 2)
-        HBufC8* iBuffer;
-    #endif
-};
-
-#ifdef FUNCTION_ETRY_EXIT
-// track
-#pragma message ("MyLocation Call stack trace - ENABLE")
-#define __TRACE_CALLSTACK CLogFunctionEntryExit functionEtryExit(__PRETTY_FUNCTION__,__LINE__)
-#endif
-#endif // __cplusplus
-#endif //
-#ifndef __TRACE_CALLSTACK
-// don't track function enter and exit
-#pragma message ("MyLocation Call stack trace - DISABLE")
-#define __TRACE_CALLSTACK
-#endif
-
-#endif //MYLOCATIONLOGGER_H
--- a/locationdataharvester/mylocationlogger/inc/mylocloggingconfiguration.h	Tue Aug 31 15:09:25 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: 
-*
-*/
-
-
-#ifndef MYLOCCONFIGURATION_H
-#define MYLOCCONFIGURATION_H
-
-//#ifdef _DEBUG // logging to file in debug only
-
-/**
-* Have this line active if you want to have logging for this component.
-* Comment this line out if you don't want any logging for this component.
-*/
-//#define _MYLOCLOGGING
-
-/**
-* Have this line active if you want to have logging to file.
-* Comment this line out if you want to have logging via RDebug::Print.
-*/
-#define _MYLOC_LOGGING_TO_FILE
-
-/**
-* Have this line active in case you want to have plugin loading performance
-* measurements activated.
-*/
-//#define _MYLOC_PERFORMANCE_TRACES
-
-//#endif // _DEBUG
-
-#endif // MYLOCCONFIGURATION_H
--- a/locationdataharvester/mylocationsdatabasemanager/inc/mylocationsdatabasemanager.h	Tue Aug 31 15:09:25 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,260 +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: Database manager implementation 
-*
-*/
-
-#ifndef __MYLOCATIONSDATABASEMANAGER_H__
-#define __MYLOCATIONSDATABASEMANAGER_H__
-
-
-#include <EPos_CPosLandmark.h>
-
-#include <locationservicedefines.h>
-// lookup database
-#include <locationdatalookupdb.h>
-
-
-class CPosLandmarkDatabase;
-class CPosLmCategoryManager;
-
-
-/**
- * CMyLocationsDatabaseManager class.
- *  This class handles all the operations related to mylocations landmark database.
- *
- */
-class  CMyLocationsDatabaseManager : public CBase
-    {
-    public:
-
-        // Constructors and destructor
-    
-        /**
-         * CMyLocationsDatabaseManager.
-         * C++ default constructor. 
-         */
-        IMPORT_C CMyLocationsDatabaseManager();
-
-        /**
-         * ConstructL.
-         * 2nd phase constructor.
-         */
-        IMPORT_C void ConstructL();
-        
-        /**
-         * ~CMyLocationsDatabaseManager.
-         * Virtual Destructor.
-         */
-        virtual ~CMyLocationsDatabaseManager();
-        
-    public:
-        /**
-         * UpdateDatabaseL.
-         * Updates the location into the landmark database and lookup table. 
-         * Based on the entry source type and the entry change type the updation can be 
-         * addition/modification/deletion.
-         * 
-         * @param[in] aLandmark Landmark object to be updated in the database.
-         * @param[in] aUid Uid of the changed source entry.
-         * @param[in] aSourceType Source type of the aUid.
-         * @param[in] aChangeType Type of change to the entry ( added/modified/deleted )
-         */
-        IMPORT_C void UpdateDatabaseL( CPosLandmark* aLandmark, const TUint32 aUid, 
-                              const TUint32 aSourceType, const TUint32 aChangeType );
-        
-        /** Gets the full address from a given landmark object
-         *
-         * @param[out] aLandmarkAddress comma separated landmark's full address
-         * @param[in] aLandmark landmark object whose address needs to be found.
-         */      
-        IMPORT_C void GetLandmarkFullAddress( TBuf<255>& aLandmarkAddress, 
-                                     const CPosLandmark* aLandmark );
-       
-	    /** Update the maptile path to mylocation lookup table
-         *
-         * @param[in] aSourceId Uid of the changed source entry.
-		 * @param[in] aSourceType Source type of the aSourceId.
-         * @param[in] aFilePath Maptile file path.
-         */                               
-        IMPORT_C void UpdateMapTilePath( TUint32 aSourceId, TUint32 aSourceType, 
-                                            TFileName& aFilePath );
-
-		/** Update the maptile path to mylocation lookup table
-		 *
-		 * @param[in] aSourceId Uid of the changed source entry.
-		 * @param[in] aSourceType Source type of the aSourceId.
-		 * @param[in] aName entry name.
-		 */ 				 
-
-		IMPORT_C void UpdateEntryName( TUint32 aSourceId, TUidSourceType aSourceType, 
-                                            const TDesC& aName );
-		
-        /** Compare the address details to lplookupaddres  table
-         *
-         * @param aLandmarks , address formed as landmark object
-         * @parama Id , id of entry to be checked in db table
-         * @param aAddressType , type of entry.
-         * @return , true for match case .
-         */  
-        IMPORT_C TBool CheckIfAddressChanged(const CPosLandmark& aLandmarks,
-                const TUint32 aId, const TUidSourceType aAddressType);
-        
-        /** Compare the address details to lplookupaddres  table
-         *
-         * @param aAddress , one line address .
-         * @parama Id , id of entry to be checked in db table
-         * @param aAddressType , type of entry.
-         * @return , true for match case .
-         */
-        IMPORT_C TBool CheckIfAddressChanged(const TDesC& aAddress,
-                const TUint32 aId, const TUidSourceType aAddressType);
-        
-
-#ifdef LOCATION_DATA_HARVESTER_UNIT_TEST
-public:
-#else
-private:
-#endif
-        
-        /**
-         * AddMylocationsCategory.
-         * Adds the category to landmarks database. 
-         * Used to add location picker specific categories.
-         * @param[in] aCategoryName defines the category name to be added.
-         * @returns The category id. 
-         */
-        TUint32 AddMylocationsCategoryL(  const TDesC&  aCategoryName  );
-
-        /**
-         * CheckIfDuplicateExistsL.
-         * Checks if this landmark is already present in database. 
-         * If present returns the landmark id, else 0.
-         * @param[in] aLandmark A landmark object to be checked for.
-         * @returns If no duplicate is found in database returns 0 
-         * else returns the id of the found landmark.
-         */
-        TPosLmItemId CheckIfDuplicateExistsL( const CPosLandmark* aLandmark );
-        
-        /**
-         * CompareLandmarks.
-         * Compares two landmarks. Only the text fields, landmark name, 
-         * street, city, state country and postal code are compared. 
-         * @param[in] aLandmark1 First landmark object to be compared.
-         * @param[in] aLandmark2 Second landmark object to be compared.
-         * @returns ETrue if the landmarks are same, else returns EFalse.
-         */
-       TBool CompareLandmarks( const CPosLandmark* alandmark1, 
-                               const CPosLandmark* alandmark2 );
-        
-       /**
-         * HandleEntryAdditionL.
-         * Handles the entry addition in lookup table and landmarks db
-         * @param[in] aLandmark Landmark object added.
-         * @param[in] aUid Uid of the source entry corresponding to aLandmark..
-         * @param[in] aSourceType source type of the aUid passed.
-        */
-       void HandleEntryAdditionL( CPosLandmark*  aLandmark, const TUint32 aUid,
-                                  const TUint32 aSourceType );
-
-       /**
-         * HandleEntryModificationL.
-         * Handles the entry modification in lookup table and landmarks db
-         * @param[in] aLandmark Landmark object modified.
-         * @param[in] aUid Uid of the source entry corresponding to aLandmark..
-         * @param[in] aSourceType source type of the aUid passed.
-        */
-       void HandleEntryModificationL( CPosLandmark*  aLandmark, const TUint32 aUid,
-                                      const TUint32 aSourceType );
-
-       /**
-         * HandleEntryDeletionL.
-         * Handles the entry deletion in lookup table and landmarks db
-         * @param[in] aUid Uid of the source entry corresponding to aLandmark..
-         * @param[in] aSourceType source type of the aUid passed.
-        */
-       void HandleEntryDeletionL( const TUint32 aUid, const TUint32 aSourceType );
-
-       /**
-         * HandleLandmarkModificationL.
-         * Handles a landmark modification
-         * @param[in] aLandmark Landmark object modified.
-         * @param[in] aUid Uid of the source entry corresponding to aLandmark..
-        */
-       void HandleLandmarkModificationL( CPosLandmark* aLandmark, const TUint32 aUid );
-       /**
-          * CheckAndReadLandmarkL.
-          * Checks whether a category is available in database pointed by category manager.
-          * @param[in] CPosLandmarkDatabase handle to the database manager
-          * @param[in] aLmId Id of the landmark
-          * @returns landmark object if found else NULL
-         */
-       CPosLandmark* CheckAndReadLandmarkL( 
-                       CPosLandmarkDatabase* aDb, const TUint32 aLmId );
-        /**
-          * FillLookupItemAddressDetails.
-          * Fills address details into QLookupItem from CPosLandmark.
-          * @param[in] aLandmark a landmark object
-          * @param[out] aLookupItem, a lookup item in which the address details are filled
-         */
-       void FillLookupItemAddressDetails( CPosLandmark* aLandmark, QLookupItem &aLookupItem );
-
-        /**
-          * UnsetDuplicateNextCalEntry.
-          * Finds next calendar lookup entry whose detination id  is aLandmarkId
-		  * and unsets it duplcate flag.
-          * @param[in] aCurrentCalUid current calendar entry id.
-          * @param[in] aLandmarkId a landmark id.
-         */
-       void UnsetDuplicateNextCalEntry( quint32 aCurrentCalUid, quint32 aLandmarkId );
-
-        /**
-          * IsDuplicateCalEntry.
-          * Checks if there is a duplicate entry present whose destination id 
-		  * is aLandmarkId
-          * @param[in] aLandmarkId a landmark id.
-         */
-       bool IsDuplicateEntry( quint32 aLandmarkId );
-
-        /**
-          * CreateLandmarkItemLC.
-          * Creates a landmark from a QLookupItem
-          * @param[in] aLookupItem a lookup item.
-          * @returns CPosLandmark a newly created landmark.
-         */
-       CPosLandmark* CreateLandmarkItemLC( const QLookupItem &aLookupItem );
-       
-#ifdef LOCATION_DATA_HARVESTER_UNIT_TEST
-public:
-#else
-private:
-#endif
-        // Handle to the landmark database
-        CPosLandmarkDatabase* iLandmarkDb;
-
-        // Calendar category to be created for calendar related location entries in landmark database
-        TPosLmItemId iLmCalendarCatId;  
-        // Contacts category to be created for contacts related location entries in landmark database
-        TPosLmItemId iLmContactsCatId;  
-       
-        // handle to the location app lookup database.
-        LocationDataLookupDb*  iLocationAppLookupDb;
-
-        // handle to landmarks category manager
-        CPosLmCategoryManager* iLandmarksCatManager;
-
-        // handle to the file session
-        RFs iFsSession;
-    };
-#endif  // __MYLOCATIONSDATABASEMANAGER_H__
--- a/locationdataharvester/mylocationsdatabasemanager/mylocationsdatabasemanager.pro	Tue Aug 31 15:09:25 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,70 +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 = lib
-TARGET = mylocationsdatabasemanager   
-
-CONFIG += dll
-CONFIG += Qt
-
-DEPENDPATH += .
-INCLUDEPATH += .
-INCLUDEPATH += ../inc
-INCLUDEPATH += ../mylocationlogger/inc
-
-
-defines += EPOCALLOWDLLDATA
-
-symbian: { 
-
-    TARGET.EPOCALLOWDLLDATA = 1
-    TARGET.CAPABILITY = All -Tcb
-    TARGET.UID3 = 0x2002FF5C
-    INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE
-
-    LIBS += -llbs \
-        -leposlandmarks \
-        -leposlmsearchlib \
-        -leuser \
-        -leposlmdbmanlib \
-        -lcntmodel \
-        -lefsrv \
-        -lflogger \
-        -ledbms \
-        -lbafl \
-        -lcalinterimapi \
-        -llocationdatalookupdb
-
-}
-
-SOURCES += src/mylocationsdatabasemanager.cpp 
-
-HEADERS += inc/mylocationsdatabasemanager.h 
-
-defBlock = \      
-	"$${LITERAL_HASH}if defined(EABI)" \
-		"DEFFILE  ../eabi/mylocationsdatabasemanager.def" \
-    "$${LITERAL_HASH}else" \
-        "DEFFILE  ../bwins/mylocationsdatabasemanager.def" \
-	"$${LITERAL_HASH}endif"
-MMP_RULES += defBlock
-
-
-
--- a/locationdataharvester/mylocationsdatabasemanager/src/mylocationsdatabasemanager.cpp	Tue Aug 31 15:09:25 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1152 +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: Database manager implementation 
-*
-*/
-
-#include <EPos_CPosLandmarkCategory.h>
-#include <EPos_CPosLmTextCriteria.h>
-#include <EPos_CPosLandmarkSearch.h>
-#include <EPos_CPosLmDatabaseManager.h>
-#include <EPos_CPosLmNearestCriteria.h>
-#include <EPos_CPosLandmarkDatabase.h>
-#include <EPos_CPosLmCategoryManager.h>
-
-#include <lbsposition.h>
-#include <barsread.h>
-#include <barsc.h>
-#include <locationservicedefines.h>
-#include "mylocationsdatabasemanager.h"
-#include "mylocationlogger.h"
-#include "mylocationsdefines.h"
-
-#include <locationdatalookupdb.h>
-#include <QString>
-// separator
-_LIT( KSeparator, ",");
-// space
-_LIT( KSpace, " ");
-
-// QString separator
-const QString KQStringSeparator = ",";
-// QString space
-const QString KQStringSpace = " ";
-
-// Used to set nearest landmarks search distance criteria
-const TUint32 KSearchCriteriaDistance = 100; 
-
-// Maximum string length of landmark address.
-const TUint32 KMaxAddressLength = 255; 
-
-// -----------------------------------------------------------------------------
-// CMyLocationsDatabaseManager::ConstructL()
-// 2nd phase constructor.
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CMyLocationsDatabaseManager::ConstructL()
-{
-    __TRACE_CALLSTACK;//Open and intialize Landmark DB
-    iLandmarkDb = CPosLandmarkDatabase::OpenL();
-    ExecuteAndDeleteLD(iLandmarkDb->InitializeL());
- 
-    iLocationAppLookupDb = new LocationDataLookupDb();
-    if( !iLocationAppLookupDb->open() )
-    {
-        User::Leave( KErrUnknown );
-    }
-    
-    // Create category manager for landmarks
-    iLandmarksCatManager = CPosLmCategoryManager::NewL(*iLandmarkDb);
-
-    // open file session
-    User::LeaveIfError(iFsSession.Connect());
-
-    // Add contacts and calendar  categories
-    iLmContactsCatId = AddMylocationsCategoryL(KContactsCategory);
-    iLmCalendarCatId = AddMylocationsCategoryL( KCalendarCategory );
-
-}
-
-// -----------------------------------------------------------------------------
-// CMyLocationsDatabaseManager::CMyLocationsDatabaseManager()
-// Default constructor.
-// -----------------------------------------------------------------------------
-//
-EXPORT_C  CMyLocationsDatabaseManager::CMyLocationsDatabaseManager() : iLandmarkDb( NULL ),
-                iLmContactsCatId( 0 ), //iLandmarksLookupDb( NULL ), 
-                iLocationAppLookupDb( NULL ),
-                iLandmarksCatManager( NULL )
-{
-}
-
-// -----------------------------------------------------------------------------
-// CMyLocationsDatabaseManager::_CMyLocationsDatabaseManager()
-// Destructor.
-// -----------------------------------------------------------------------------
-//
-CMyLocationsDatabaseManager::~CMyLocationsDatabaseManager()
-{
-    __TRACE_CALLSTACK;// delete member variables.
-
-    if (iLocationAppLookupDb)
-    {
-        iLocationAppLookupDb->close();
-        delete iLocationAppLookupDb;
-    }
-
-    delete iLandmarksCatManager;
-
-    delete iLandmarkDb;
-
-    // close the file session
-    iFsSession.Close();
-
-}
-
-// -----------------------------------------------------------------------------
-// CMyLocationsDatabaseManager::AddMylocationsCategoryL()
-// Adds the category to the mylocations and landmarks database..
-// -----------------------------------------------------------------------------
-//
-TUint32 CMyLocationsDatabaseManager::AddMylocationsCategoryL( const TDesC&  aCategoryName )
-{
-    __TRACE_CALLSTACK;//Open the resource file
-    
-    TPosLmItemId catId = 0;
-    
-    //create category
-    CPosLandmarkCategory *category = CPosLandmarkCategory::NewL();
-    CleanupStack::PushL(category);
-    category->SetCategoryNameL( aCategoryName );
-    
-    // Add category to landmarks database
-    TRAPD ( error, ( catId = iLandmarksCatManager->AddCategoryL( *category ) ) );
-    if (error == KErrNone || error == KErrAlreadyExists)
-    {
-        catId = iLandmarksCatManager->GetCategoryL( aCategoryName );
-    }
-
-    CleanupStack::PopAndDestroy(category);
-
-    return catId;
-}
-
-// -----------------------------------------------------------------------------
-// CMyLocationsDatabaseManager::UpdateDatabaseL()
-// Updates the location into the landmark database and lookup table. Based on 
-// the entry source type and the entry change type the updation can be 
-// addition/modification/deletion.
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CMyLocationsDatabaseManager::UpdateDatabaseL(CPosLandmark* aLandmark,
-        const TUint32 aUid, const TUint32 aSourceType, const TUint32 aChangeType)
-{
-    __TRACE_CALLSTACK;//open the lookup database
-    switch (aChangeType)
-    {
-    // if the entry is added
-    case EEntryAdded:
-    {
-        // Handle this entry in the lookup table and update landmarks db.
-        HandleEntryAdditionL(aLandmark, aUid, aSourceType);
-        break;
-    }
-        // if the entry is modified
-    case EEntryModified:
-    {
-        // Handle this entry in the lookup table and update landmarks db.
-        HandleEntryModificationL(aLandmark, aUid, aSourceType);
-        break;
-    }
-        // if the entry is deleted
-    case EEntryDeleted:
-    {
-        // Handle this entry in the lookup table and update landmarks db.
-        HandleEntryDeletionL(aUid, aSourceType);
-        break;
-    }
-    }
-
-}
-
-// -----------------------------------------------------------------------------
-// CMyLocationsDatabaseManager::CheckIfDuplicateExistsL()
-// Checks if this landmark is already present in database. If present returns the landmark id, else 0
-// -----------------------------------------------------------------------------
-//
-TPosLmItemId CMyLocationsDatabaseManager::CheckIfDuplicateExistsL(
-                                    const CPosLandmark* aLandmark)
-{
-    __TRACE_CALLSTACK;// Stores the found duplicate landmark's id. 
-    TPosLmItemId retId = 0;
-
-    // Initially filter only the landmarks which are nearer to the current landmark.
-    // Then we can make a duplicate check on each of the found landmarks.
-
-    // create a search object.
-    CPosLandmarkSearch* search = CPosLandmarkSearch::NewL(
-            *iLandmarkDb);
-    CleanupStack::PushL(search);
-
-    TBuf<KMaxAddressLength> lmAddress1;
-    GetLandmarkFullAddress( lmAddress1, aLandmark );
-    QString str1 = QString( (QChar*)lmAddress1.Ptr(), lmAddress1.Length());
-
-    // create nearest search criteria object
-    TLocality position( TCoordinate( 0, 0), 0 );
-    aLandmark->GetPosition( position );
-    CPosLmNearestCriteria* nearestCriteria = 
-                CPosLmNearestCriteria::NewLC( 
-                        TCoordinate( position.Latitude(), position.Longitude() ) );
-    nearestCriteria->SetMaxDistance( KSearchCriteriaDistance );
-    
-    // Start the search and execute it at once.
-    ExecuteAndDeleteLD( search->StartLandmarkSearchL( *nearestCriteria ) );
-    CleanupStack::PopAndDestroy( nearestCriteria );
-
-    // Retrieve an iterator to access the matching landmarks.
-    CPosLmItemIterator* iter = search->MatchIteratorL();
-    CleanupStack::PushL(iter);
-
-    // Iterate the search matches.
-    TPosLmItemId lmId;
-
-    while( ( lmId = iter->NextL() ) != KPosLmNullItemId )
-    {
-        CPosLandmark* lm = iLandmarkDb->ReadLandmarkLC( lmId );
-        TBuf<KMaxAddressLength> lmAddress2;
-        GetLandmarkFullAddress( lmAddress2, lm );
-        QString str2 = QString( (QChar*)lmAddress2.Ptr(), lmAddress2.Length());
-        CleanupStack::PopAndDestroy( lm );
-        
-        if( str1 == str2 )
-        {
-            retId = lmId;
-            break;
-        }
-    }
-
-    CleanupStack::PopAndDestroy(iter);
-    CleanupStack::PopAndDestroy(search);
-
-    return retId;
-}
-
-// -----------------------------------------------------------------------------
-// CMyLocationsDatabaseManager::CompareLandmarks()
-// Compares two landmarks. Only the text fields, landmark name, street, city, state country and 
-// postal code are compared.
-// -----------------------------------------------------------------------------
-//
-TBool CMyLocationsDatabaseManager::CompareLandmarks(
-        const CPosLandmark* aLandmark1, const CPosLandmark* aLandmark2 )
-{
-    __TRACE_CALLSTACK;
-
-    TBuf<KMaxAddressLength> lmAddress1;
-    GetLandmarkFullAddress( lmAddress1, aLandmark1 );
-    QString str1 = QString( (QChar*)lmAddress1.Ptr(), lmAddress1.Length());
-
-    TBuf<KMaxAddressLength> lmAddress2;
-    GetLandmarkFullAddress( lmAddress2, aLandmark2 );
-    QString str2 = QString( (QChar*)lmAddress2.Ptr(), lmAddress2.Length());
-
-    if( str1 == str2 )
-        return ETrue;
-    else
-        return EFalse;
-    
-    
-}
-
-// -----------------------------------------------------------------------------
-// CMyLocationsDatabaseManager::HandleEntryAdditionL()
-// Handles the entry addition in lookup table and landmarks db
-// -----------------------------------------------------------------------------
-//
-void CMyLocationsDatabaseManager::HandleEntryAdditionL(CPosLandmark* aLandmark,
-        const TUint32 aUid, const TUint32 aSourceType)
-{
-    __TRACE_CALLSTACK;
-    // Create a lookup item
-    QLookupItem lookupItem;
-    lookupItem.mSourceUid = aUid;
-    lookupItem.mSourceType = aSourceType;
-    lookupItem.mDestId = 0;
-    lookupItem.mIconType = QLookupItem::EIconTypeDefault;
-    lookupItem.mIsDuplicate = 0;
-    lookupItem.mIconPath = "";
-    lookupItem.mMapTilePath = "";
-    lookupItem.mSingleLineAddress="";
-    TPtrC16 dataPtr;
-    aLandmark->GetPositionField(EPositionFieldComment ,dataPtr);
-    lookupItem.mSingleLineAddress=QString::fromUtf16(dataPtr.Ptr(),
-            dataPtr.Length());
-    //fill address into lookup item.
-    FillLookupItemAddressDetails( aLandmark, lookupItem );
-
-    if ( aSourceType == ESourceLandmarks )
-    {
-        // Logic: check if the entry is already present in lookupdb. 
-        // If present, it means the landmark corresponds to a contact/calendar. So ignore it.
-        // If not present, it means the landmark is created directly into the landmarks db. So add
-        // it in lookupdb as well.
-        
-        // check if the entry is already present in lookup db.
-        QList<QLookupItem> itemArray;
-        iLocationAppLookupDb->findEntriesByLandmarkId( aUid, itemArray );
-        if( itemArray.count() )
-        {
-            return;
-        }
-        else
-        {
-            lookupItem.mDestId = aUid;
-            iLocationAppLookupDb->createEntry( lookupItem );
-            return;
-        }
-    }
-
-    TPosLmItemId catId;
-    if( aSourceType == ESourceCalendar )
-    {
-        // category id to calendar
-        catId = iLmCalendarCatId;
-    }
-    else 
-    {
-        // remove landmark name, which is basically contact's name.
-        aLandmark->SetLandmarkNameL( KNullDesC );
-        // category id to contacts
-        catId = iLmContactsCatId;
-    }
-    // check if this landmark is already present in database
-    TPosLmItemId dupLmId = CheckIfDuplicateExistsL( aLandmark );
-    if ( dupLmId )
-    {
-        // landmark already present in db. get the details
-        CPosLandmark* dupLandmark = iLandmarkDb->ReadLandmarkLC(dupLmId);
-        if( dupLandmark )
-        {
-            // add category.
-            dupLandmark->AddCategoryL( catId );
-            // update the landmark object in the db
-            iLandmarkDb->UpdateLandmarkL( *dupLandmark );
-            CleanupStack::PopAndDestroy( dupLandmark );
-        }
-
-        // point the lookup item's landmark uid to the existing landmark.
-        lookupItem.mDestId = dupLmId;
-        if( aSourceType == ESourceCalendar )
-        {
-            // set duplicate flag to true. only if it is calendar entry.
-            // for contacts duplicate doesnot hold good as the location name is the contact name.
-        
-            // set duplicate only if there are calendar entries already pointing to this landmark. 
-            if( IsDuplicateEntry( dupLmId ) )
-            {
-                lookupItem.mIsDuplicate = 1;
-            }
-        }
-    }
-    else // it is a new entry, so add into the database
-    {
-        // add category.
-        aLandmark->AddCategoryL( catId );
-        // add the landmark into the db. 
-        // point the lookup item's landmark uid to the newly created landmark in the db.
-        lookupItem.mDestId = iLandmarkDb->AddLandmarkL( *aLandmark );
-    }
-
-    // create the entry in the lookup table.
-    iLocationAppLookupDb->createEntry( lookupItem );
-}
-
-// -----------------------------------------------------------------------------
-// CMyLocationsDatabaseManager::HandleEntryModificationL()
-// Handles the entry modification in the lookup table and landmarks db.
-// -----------------------------------------------------------------------------
-//
-void CMyLocationsDatabaseManager::HandleEntryModificationL(
-        CPosLandmark* aLandmark, const TUint32 aUid, const TUint32 aSourceType )
-{
-    __TRACE_CALLSTACK;
-    if ( aSourceType == ESourceLandmarks )
-    {
-        HandleLandmarkModificationL( aLandmark, aUid );
-        return;
-    }
-
-    QLookupItem lookupItem;
-    lookupItem.mSourceUid = aUid;
-    lookupItem.mSourceType = aSourceType;
-    lookupItem.mIconType = QLookupItem::EIconTypeDefault;
-    TPtrC16 dataPtr;
-    aLandmark->GetPositionField(EPositionFieldComment ,dataPtr);
-    lookupItem.mSingleLineAddress=QString::fromUtf16(dataPtr.Ptr(),
-            dataPtr.Length());
-
-    // Behavior: If an entry is modified, 
-    // If this entry is not present in lookup table. add the entry and update the landmarks db.
-    // If this entry is already present in lookup table, check if the location info is modified or not.
-    // If the location info is modified, delete the landmark from db and add the new landmark
-    // into the db. 
-    // Before deletion make sure that the landmark is not being refered by other lookup entries.
-
-    // find the entry in the lookup table.
-    if ( iLocationAppLookupDb->findEntryBySourceIdAndType( lookupItem ) )
-    {
-        //fill address into lookup item.
-        FillLookupItemAddressDetails( aLandmark, lookupItem );
-        
-        QString locationName = lookupItem.mName;
-    
-        TPosLmItemId catId;
-        
-        if( aSourceType == ESourceCalendar )
-        {
-            catId = iLmCalendarCatId;
-        }
-        else
-        {
-            // remove landmark name, which is basically contact's name.
-            aLandmark->SetLandmarkNameL( KNullDesC );
-            
-            // category id to contacts
-            catId = iLmContactsCatId;
-        }
-
-        
-        // check if the location info is modified by comparing the new landmark with the existing landmark
-        CPosLandmark* existingLandmark = NULL;
-        TRAPD( error, ( existingLandmark = 
-               CheckAndReadLandmarkL( iLandmarkDb, lookupItem.mDestId ) ) );
-        CleanupStack::PushL( existingLandmark );
-        if ( error == KErrNotFound )
-        {
-            // Landmarks item deleted. So delete corresponding lookup entries.
-            QList<QLookupItem> itemArray;
-            iLocationAppLookupDb->findEntriesByLandmarkId( lookupItem.mDestId, itemArray );
-            for ( int i = 0; i < itemArray.count(); i++)
-            {
-                iLocationAppLookupDb->deleteEntryBySourceIdAndType( itemArray[i] );
-            }
-
-            // Add the entry into the lookup table and update landmarks db.
-            HandleEntryAdditionL( aLandmark, aUid, aSourceType );
-            
-            CleanupStack::PopAndDestroy( existingLandmark );
-            return;
-        }
-
-        if ( !CompareLandmarks( existingLandmark, aLandmark ) )
-        {
-            // landmarks are not same, means location information is modified.
-
-            // Check if the new landmark is already in db.
-            TPosLmItemId dupLmId = CheckIfDuplicateExistsL( aLandmark );
-            if ( dupLmId )
-            {
-                // landmark already present in db. get the details
-                CPosLandmark* dupLandmark = iLandmarkDb->ReadLandmarkLC( dupLmId );
-                if ( dupLandmark )
-                {
-                    // add category.
-                    dupLandmark->AddCategoryL( catId );
-
-                    // update the landmark object in the db
-                    iLandmarkDb->UpdateLandmarkL( *dupLandmark );
-                }
-                CleanupStack::PopAndDestroy( dupLandmark );
-
-                // update the lookup item to refer to the newly created landmark.
-                lookupItem.mDestId = dupLmId;
-                if( aSourceType == ESourceCalendar )
-                {
-                    // for contacts duplicate doesnot hold good as the location name is the contact name.
-                    if( !lookupItem.mIsDuplicate )
-                    {
-                        // if current lookup item duplicate property is 0, then remove next corresponding
-                        // calendar lookup entry duplicate property.
-                        // this is required because the current entry will be pointing to a new landmark.
-                        UnsetDuplicateNextCalEntry( aUid, existingLandmark->LandmarkId() );
-                    } 
-
-                    // set duplicate only if there are calendar entries already pointing to this landmark. 
-                    if( IsDuplicateEntry( dupLmId ) )
-                    {
-                        lookupItem.mIsDuplicate = 1;
-                    }
-
-                }
-                
-                iLocationAppLookupDb->updateEntryBySourceIdAndType( lookupItem );
-            }
-            else
-            {
-                // landmark not already present in db.
-                // Create a new entry in the db
-                aLandmark->AddCategoryL( catId );
-                lookupItem.mDestId = iLandmarkDb->AddLandmarkL( *aLandmark );
-                if( aSourceType == ESourceCalendar )
-                {
-                    // for contacts duplicate doesnot hold good as the location name is the contact name.
-                    if( !lookupItem.mIsDuplicate )
-                    {
-                        // if current lookup item duplicate property is 0, then remove next corresponding
-                        // calendar lookup entry duplicate property.
-                        // this is required because the current entry will be pointing to a new landmark.
-                        UnsetDuplicateNextCalEntry( aUid, existingLandmark->LandmarkId() );
-                    } 
-                }
-                
-                lookupItem.mIsDuplicate = 0;
-                // update the lookup table
-                iLocationAppLookupDb->updateEntryBySourceIdAndType( lookupItem );
-            }
-        }
-        else
-        {
-            // landmarks are same, means location not modified. So return.
-            if( aSourceType == ESourceContactsPref
-                                    || aSourceType == ESourceContactsWork
-                                    || aSourceType == ESourceContactsHome
-                                    )
-            {
-                // in case of contacts, there is a chance that contact name is modified. 
-                // so update the lookup database entry with that name.
-                lookupItem.mName = locationName;
-                iLocationAppLookupDb->updateEntryBySourceIdAndType( lookupItem );
-            }
-
-            CleanupStack::PopAndDestroy( existingLandmark );
-            return;
-        }
-
-        // delete the existing landmark only if it not being refered by other lookup entries.
-
-        // Check if any other entries are refering this landmark.
-        QList<QLookupItem> itemArray;
-        iLocationAppLookupDb->findEntriesByLandmarkId(
-                existingLandmark->LandmarkId(), itemArray );
-
-        if ( itemArray.count() )
-        {
-            // There are other lookup entries refering this landmark. So do not delete the landmark
-
-            // If none of these lookup item's source type is current source type, disassociate 'catId' category
-            // from this landmark.
-            TInt i = 0;
-            while ( i < itemArray.count() )
-            {
-                if( aSourceType == ESourceCalendar )
-                {
-                    if ( itemArray[i].mSourceType == aSourceType )
-                    {
-                        // a lookup item exists which is from calendar, so 'catId' is still valid.
-                        break;
-                    }
-                 }
-                else 
-                {
-                    // a lookup item exists which is from contacts, so 'catId' is still valid.
-                    break;
-                }
-                i++;
-            }
-            if ( i == itemArray.count() )
-            {
-                // no lookup items from current source type exists refering this landmark.
-                // so disassociate 'catId' from this landmark
-
-                existingLandmark->RemoveCategory( catId );
-                iLandmarkDb->UpdateLandmarkL( *existingLandmark );
-            }
-        }
-        else
-        {
-            // no other lookup entry is refering this landmark. 
-            // delete the landmark.
-            iLandmarkDb->RemoveLandmarkL( existingLandmark->LandmarkId() );
-        }
-        CleanupStack::PopAndDestroy( existingLandmark );
-
-    }
-    else // entry not present in lookup table
-    {
-        // Add the entry into the lookup table and update landmarks db.
-        HandleEntryAdditionL( aLandmark, aUid, aSourceType );
-    }
-}
-
-// -----------------------------------------------------------------------------
-// CMyLocationsDatabaseManager::HandleEntryDeletionL()
-// Handles the entry deletion in lookup table and landmarks db.
-// -----------------------------------------------------------------------------
-//
-void CMyLocationsDatabaseManager::HandleEntryDeletionL(const TUint32 aUid,
-                                                const TUint32 aSourceType)
-{
-    __TRACE_CALLSTACK;
-    QLookupItem lookupItem;
-    lookupItem.mSourceUid = aUid;
-    lookupItem.mSourceType = aSourceType;
-
-    // Behavior: if an entry is deleted, delete the corresponding entries from 
-    // both lookup table and iLandmarkDb.  
-    // Before deleting the entry from iLandmarkDb, make sure that this entry is not being refered by
-    // other entries of the lookup table. If it is being refered by other entries in lookup table, then
-    // do not delete the landmark.
- 
-    if ( !iLocationAppLookupDb->findEntryBySourceIdAndType( lookupItem ) )
-    {
-        if( aSourceType == ESourceLandmarks )
-        {
-            lookupItem.mDestId = aUid;
-        }
-        else
-        {
-            return;
-        }
-    }
-    
-    // Find the corresponding landmark uid
-    
-
-    // delete the lookup entry.
-    iLocationAppLookupDb->deleteEntryBySourceIdAndType( lookupItem );
-
-    // Check if any other entries are refering this landmark.
-    QList<QLookupItem> itemArray;
-    iLocationAppLookupDb->findEntriesByLandmarkId( lookupItem.mDestId, itemArray );
-
-    if ( itemArray.count() )
-    {
-    
-        if( aSourceType == ESourceLandmarks )
-        {
-            CPosLandmark* lm = NULL;
-        
-            for( int i = 0; i < itemArray.count(); i++ )
-            {
-                if( itemArray[i].mSourceType == ESourceCalendar )
-                {
-                    // add landmark entry since a calendar item is present with this location.
-                   if( !lm )
-                   {
-                       lm = CreateLandmarkItemLC( itemArray[i] );
-                   }
-                   lm->AddCategoryL( iLmCalendarCatId );
-                }
-                else
-                {
-                   // add landmark entry since a contact item is present with this location.
-                   if( !lm )
-                   {
-                       QString tempStr = itemArray[i].mName;
-                       itemArray[i].mName = "";
-                       lm = CreateLandmarkItemLC( itemArray[i] );
-                       itemArray[i].mName = tempStr;
-                   }
-                   lm->AddCategoryL( iLmCalendarCatId );
-                }    
-            }
-
-            lookupItem.mDestId = iLandmarkDb->AddLandmarkL( *lm );
-            CleanupStack::PopAndDestroy( lm );
-
-            bool dupUnset = false;
-            for( int i=0; i<itemArray.count(); i++ )
-            {
-                itemArray[i].mDestId = lookupItem.mDestId;
-                if( itemArray[i].mSourceType == ESourceCalendar && dupUnset == false )
-                {
-                    dupUnset = true;
-                    itemArray[i].mIsDuplicate = 0;
-                }
-                iLocationAppLookupDb->updateEntryById( itemArray[i] );
-            }   
-            
-            return;
-        }
-
-        // There are other lookup entries refering this landmark. So do not delete the landmark
-
-        // If none of these lookup item's source type is current source type, disassociate current source category
-        // from this landmark.
-        TInt i = 0;
-        while ( i < itemArray.count() )
-        {
-            if( aSourceType == ESourceCalendar )
-            {
-                if( itemArray[i].mSourceType == aSourceType )
-                {
-                    if( lookupItem.mIsDuplicate == 0 )
-                    {
-                        itemArray[i].mIsDuplicate = 0;
-                        iLocationAppLookupDb->updateEntryById( itemArray[i] );
-                    }
-                    // a lookup item exists which is from calendar, so 'iLmCalendarCatId' is still valid.
-                    break;
-                }
-        
-            }
-            else if ( itemArray[i].mSourceType == ESourceContactsPref
-                    || itemArray[i].mSourceType == ESourceContactsWork
-                    || itemArray[i].mSourceType == ESourceContactsHome)
-            {
-                // a lookup item exists which is from contacts, so 'iLmContactsCatId' is still valid.
-                break;
-            }
-            i++;
-        }
-        if ( i == itemArray.count() )
-        {
-            // no lookup items from current source type exists refering this landmark.
-            // so disassociate current source category from this landmark
-
-            CPosLandmark* landmark = iLandmarkDb->ReadLandmarkLC( lookupItem.mDestId );
-            if( aSourceType == ESourceCalendar )
-            {
-                landmark->RemoveCategory( iLmCalendarCatId );
-            }
-            else
-            {
-                landmark->RemoveCategory( iLmContactsCatId );
-            }
-            
-            iLandmarkDb->UpdateLandmarkL( *landmark );
-            CleanupStack::PopAndDestroy( landmark );
-        }
-    }
-    else
-    {
-        // no other lookup entry is refering this landmark. 
-        // delete the landmark.
-        if ( aSourceType != ESourceLandmarks )
-        {
-            iLandmarkDb->RemoveLandmarkL( lookupItem.mDestId );
-        }
-    }
-}
-
-// -----------------------------------------------------------------------------
-// CMyLocationsDatabaseManager::HandleLandmarkModificationL()
-// -----------------------------------------------------------------------------
-//
-void CMyLocationsDatabaseManager::HandleLandmarkModificationL(
-        CPosLandmark* aLandmark, const TUint32 aUid )
-{
-    __TRACE_CALLSTACK;
-    // logic: if a landmark is modified, 
-    // first update the corresponding landmark lookup entry if present, else create a new entry.
-    // Check for any contact/calendar entries refering this landmark entry,
-    // if exists, create a new landmark entry with that location details and update all those 
-    // lookup entry's destid with the newly created landmark id.
-    
-    QLookupItem lookupItem;
-    lookupItem.mSourceUid = aUid;
-    lookupItem.mSourceType = ESourceLandmarks;
-    lookupItem.mIconType = QLookupItem::EIconTypeDefault;
-
-    bool found = iLocationAppLookupDb->findEntryBySourceIdAndType( lookupItem );
-    //fill address into lookup item.
-    FillLookupItemAddressDetails( aLandmark, lookupItem );
-    lookupItem.mDestId = aUid;
-    lookupItem.mIsDuplicate = 0;
-    lookupItem.mIconType = QLookupItem::EIconTypeDefault;
-    lookupItem.mIconPath = "";
-    lookupItem.mMapTilePath = "";
-
-    // update entry in lookup table.
-    if ( found )
-    {
-        iLocationAppLookupDb->updateEntryById( lookupItem );
-    }
-    else
-    {
-        iLocationAppLookupDb->createEntry( lookupItem );
-    }
-    
-    QList<QLookupItem> itemArray;
-    iLocationAppLookupDb->findEntriesByLandmarkId( lookupItem.mDestId, itemArray );
-    
-    if( itemArray.count() == 1 )
-    {
-        //only one entry ie the entry corresponding to landmark db is present.
-        return;
-    }
-    
-    CPosLandmark* lm = NULL;
-    
-    for( int i = 0; i < itemArray.count(); i++ )
-    {
-        if( itemArray[i].mSourceType != ESourceLandmarks )
-        {
-            if( itemArray[i].mSourceType == ESourceCalendar )
-            {
-                // add landmark entry since a calendar item is present with this location.
-               if( !lm )
-               {
-                   lm = CreateLandmarkItemLC( itemArray[i] );
-               }
-               lm->AddCategoryL( iLmCalendarCatId );
-            }
-            else
-            {
-               // add landmark entry since a calendar item is present with this location.
-               if( !lm )
-               {
-                   QString tempStr = itemArray[i].mName;
-                   itemArray[i].mName = "";
-                   lm = CreateLandmarkItemLC( itemArray[i] );
-                   itemArray[i].mName = tempStr;
-               }
-               lm->AddCategoryL( iLmCalendarCatId );
-            }    
-        }
-    }
-    
-    // add the entry to landmarks db
-    quint32 newDestId = iLandmarkDb->AddLandmarkL( *lm );
-    CleanupStack::PopAndDestroy( lm );
-
-    bool calDuplicateUnset = false;
-    // update all the lookup entries with new landmark id
-    for( int i = 0; i < itemArray.count(); i++ )
-    {
-        if( itemArray[i].mSourceType != ESourceLandmarks )
-        {
-            itemArray[i].mDestId = newDestId;
-            
-            if( itemArray[i].mSourceType == ESourceCalendar )
-            {
-                if( !calDuplicateUnset )
-                {
-                    itemArray[i].mIsDuplicate = 0;
-                    calDuplicateUnset = true;
-                }
-                else
-                {
-                    itemArray[i].mIsDuplicate = 1;
-                }
-            }
-            iLocationAppLookupDb->updateEntryById( itemArray[i] );
-        }
-    }
-}
-// -----------------------------------------------------------------------------
-// CMyLocationsDatabaseManager::GetLandmarkFullAddress()
-// Gets the comma separated full address of the given landmark.
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CMyLocationsDatabaseManager::GetLandmarkFullAddress(
-        TBuf<KMaxAddressLength>& aLandmarkAddress,
-        const CPosLandmark* aLandmark)
-{
-    __TRACE_CALLSTACK;
-    TPtrC tempStr;
-    TInt retStatus;
-    TBool addressEmtpy = ETrue;
-    aLandmarkAddress.Copy( KNullDesC );
-    retStatus = aLandmark->GetPositionField(EPositionFieldStreet, tempStr);
-    if (retStatus == KErrNone && tempStr.Length())
-    {
-        {
-            aLandmarkAddress.Copy(tempStr);
-            addressEmtpy = EFalse;
-        }
-    }
-
-    retStatus = aLandmark->GetPositionField(EPositionFieldCity, tempStr);
-    if (retStatus == KErrNone && tempStr.Length())
-    {
-        if (!addressEmtpy)
-        {
-            aLandmarkAddress.Append(KSeparator);
-            aLandmarkAddress.Append(KSpace);
-            aLandmarkAddress.Append(tempStr);
-        }
-        else
-        {
-            aLandmarkAddress.Copy(tempStr);
-            addressEmtpy = EFalse;
-        }
-    }
-
-    retStatus = aLandmark->GetPositionField(EPositionFieldState, tempStr);
-    if (retStatus == KErrNone && tempStr.Length())
-    {
-        if (!addressEmtpy)
-        {
-            aLandmarkAddress.Append(KSeparator);
-            aLandmarkAddress.Append(KSpace);
-            aLandmarkAddress.Append(tempStr);
-        }
-        else
-        {
-            aLandmarkAddress.Copy(tempStr);
-            addressEmtpy = EFalse;
-        }
-    }
-
-    retStatus = aLandmark->GetPositionField(EPositionFieldCountry, tempStr);
-    if (retStatus == KErrNone && tempStr.Length())
-    {
-        if (!addressEmtpy)
-        {
-            aLandmarkAddress.Append(KSeparator);
-            aLandmarkAddress.Append(KSpace);
-            aLandmarkAddress.Append(tempStr);
-        }
-        else
-        {
-            aLandmarkAddress.Copy(tempStr);
-            addressEmtpy = EFalse;
-        }
-    }
-}
-
-// -----------------------------------------------------------------------------
-// CMyLocationsDatabaseManager::CheckAndReadLandmarkL()
-// Checks if given landmark id is found in the database and returns the read landmark.
-// -----------------------------------------------------------------------------
-//
-CPosLandmark* CMyLocationsDatabaseManager::CheckAndReadLandmarkL(
-        CPosLandmarkDatabase* aDb, const TUint32 aLmId)
-{
-    __TRACE_CALLSTACK;
-    CPosLandmark* lm = aDb->ReadLandmarkLC(aLmId);
-    CleanupStack::Pop(lm);    
-    return lm;
-}
-
-// -----------------------------------------------------------------------------
-// CMyLocationsDatabaseManager::FillLookupItemAddressDetails()
-// Creates a new category in Mylocations Db and adds a corresponding entry in 
-// mylocations lookup table.
-// -----------------------------------------------------------------------------
-//
-void CMyLocationsDatabaseManager::FillLookupItemAddressDetails( CPosLandmark* aLandmark, QLookupItem& aLookupItem )
-{
-    __TRACE_CALLSTACK;// Read the category.
-
-    // fill geo-coordinates
-    TLocality position;
-    aLandmark->GetPosition( position );
-    aLookupItem.mLatitude = position.Latitude();
-    aLookupItem.mLongitude = position.Longitude();
-
-    TPtrC tempStr;
-    TInt retStatus;
-
-    // Copy landmark name in address 1
-    retStatus = aLandmark->GetLandmarkName( tempStr );
-    aLookupItem.mName = "";
-    if( retStatus == KErrNone && tempStr.Length() > 0 )
-    {
-        aLookupItem.mName = QString( (QChar*)tempStr.Ptr(), tempStr.Length() );
-    }
-
-    // get street
-    aLookupItem.mStreet = "";
-    retStatus = aLandmark->GetPositionField( EPositionFieldStreet, tempStr );
-    if( retStatus == KErrNone && tempStr.Length() )
-    {
-        aLookupItem.mStreet = QString( (QChar*)tempStr.Ptr(), tempStr.Length());
-    }
-
-    // get postal code
-    aLookupItem.mPostalCode = "";
-    retStatus = aLandmark->GetPositionField( EPositionFieldPostalCode, tempStr );
-    if( retStatus == KErrNone && tempStr.Length() )
-    {
-        aLookupItem.mPostalCode = QString( (QChar*)tempStr.Ptr(), tempStr.Length());
-    }
-
-    // get city
-    aLookupItem.mCity = "";
-    retStatus = aLandmark->GetPositionField( EPositionFieldCity, tempStr );
-    if( retStatus == KErrNone && tempStr.Length() )
-    {
-        aLookupItem.mCity = QString( (QChar*)tempStr.Ptr(), tempStr.Length());
-    }
-
-    // get State
-    aLookupItem.mState = "";
-    retStatus = aLandmark->GetPositionField( EPositionFieldState, tempStr );
-    if( retStatus == KErrNone && tempStr.Length() )
-    {
-        aLookupItem.mState = QString( (QChar*)tempStr.Ptr(), tempStr.Length());
-    }
-
-    // get country
-    aLookupItem.mCountry = "";
-    retStatus = aLandmark->GetPositionField( EPositionFieldCountry, tempStr );
-    if( retStatus == KErrNone && tempStr.Length() )
-    {
-        aLookupItem.mCountry = QString( (QChar*)tempStr.Ptr(), tempStr.Length());
-    }
-}
-
-// -----------------------------------------------------------------------------
-// CMyLocationsDatabaseManager::UnsetDuplicateNextCalEntry()
-// -----------------------------------------------------------------------------
-//
-void CMyLocationsDatabaseManager::UnsetDuplicateNextCalEntry( quint32 aUid, quint32 aLandmarkId )
-{
-    __TRACE_CALLSTACK;
-    // get next duplicate item
-    QList<QLookupItem> itemArray;
-    iLocationAppLookupDb->findEntriesByLandmarkId( aLandmarkId, itemArray );
-    for ( int i = 0; i < itemArray.count(); i++)
-    {
-        if( itemArray[i].mSourceType == ESourceCalendar && itemArray[i].mSourceUid != aUid )
-        {
-            itemArray[i].mIsDuplicate = 0;
-            iLocationAppLookupDb->updateEntryById( itemArray[i] );
-            break;
-        }
-    }
-
-}
-// -----------------------------------------------------------------------------
-// CMyLocationsDatabaseManager::IsDuplicateEntry()
-// -----------------------------------------------------------------------------
-//
-bool CMyLocationsDatabaseManager::IsDuplicateEntry( quint32 aLandmarkId )
-{
-    __TRACE_CALLSTACK;
-    // get next duplicate item
-    QList<QLookupItem> itemArray;
-    iLocationAppLookupDb->findEntriesByLandmarkId( aLandmarkId, itemArray );
-    for ( int i = 0; i < itemArray.count(); i++)
-    {
-        if( itemArray[i].mSourceType == ESourceCalendar ||
-            itemArray[i].mSourceType == ESourceLandmarks )
-        {
-            return true;
-        }
-    }
-    
-    return false;
-}
-
-// -----------------------------------------------------------------------------
-// CMyLocationsDatabaseManager::CreateLandmarkItemLC()
-// -----------------------------------------------------------------------------
-//
-CPosLandmark* CMyLocationsDatabaseManager::CreateLandmarkItemLC( const QLookupItem &aLookupItem )
-{
-    __TRACE_CALLSTACK;//return value
-    CPosLandmark *landmark = NULL;
-    TLocality loc( TCoordinate( aLookupItem.mLatitude, aLookupItem.mLongitude ), 0 );
-
-    landmark = CPosLandmark::NewL();
-    CleanupStack::PushL( landmark );
-
-    // Fill the location details into the landmark object
-    landmark->SetPositionL( loc );
-
-    // Set the landmark name as contact name
-    TBuf<KBufSize> text( aLookupItem.mName.utf16() );
-    TRAP_IGNORE( landmark->SetLandmarkNameL( text ) );
-
-    text.Copy( aLookupItem.mStreet.utf16() );
-    landmark->SetPositionFieldL( EPositionFieldStreet, text );
-    
-    // Set the City
-    text.Copy( aLookupItem.mCity.utf16() );
-    landmark->SetPositionFieldL( EPositionFieldCity, text );
-
-    // Set the state/region
-    text.Copy( aLookupItem.mState.utf16() );
-    landmark->SetPositionFieldL( EPositionFieldState, text );
-
-    // Set the Postal code
-    text.Copy( aLookupItem.mPostalCode.utf16() );
-    landmark->SetPositionFieldL( EPositionFieldPostalCode, text );
-
-    // Set the country
-    text.Copy( aLookupItem.mCountry.utf16() );
-    landmark->SetPositionFieldL( EPositionFieldCountry, text );
-
-    return landmark;
-}
-
-// -----------------------------------------------------------------------------
-// CMyLocationsDatabaseManager::UpdateMapTilePath()
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CMyLocationsDatabaseManager::UpdateMapTilePath( TUint32 aSourceId, TUint32 aSourceType, 
-                                            TFileName& aFilePath )
-{
-    __TRACE_CALLSTACK;
-    QString filePath = QString( (QChar*)aFilePath.Ptr(), aFilePath.Length() );
-    iLocationAppLookupDb->updateMaptileBySourceIdAndType( aSourceId, aSourceType, filePath );
-}
-
-// -----------------------------------------------------------------------------
-// CMyLocationsDatabaseManager::UpdateEntryName()
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void CMyLocationsDatabaseManager::UpdateEntryName( TUint32 aSourceId, TUidSourceType aSourceType, 
-                                            const TDesC& aName )
-{
-    __TRACE_CALLSTACK;
-    QString name = QString( (QChar*)aName.Ptr(), aName.Length() );
-    iLocationAppLookupDb->updateEntryNameByIdAndType( aSourceId, aSourceType, name );
-	
-}
-
-
-// -----------------------------------------------------------------------------
-// CMyLocationsDatabaseManager::CheckIfAddressChanged()
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TBool CMyLocationsDatabaseManager::CheckIfAddressChanged(const CPosLandmark& aLandmarks,
-        const TUint32 aId, const TUidSourceType aAddressType)
-{
-    __TRACE_CALLSTACK;
-    QString target = iLocationAppLookupDb->getAddressDetails(aId, aAddressType);
-    TBuf<KMaxAddressLength> lmAddress;
-    GetLandmarkFullAddress(lmAddress, &aLandmarks);
-    QString source = QString((QChar*) lmAddress.Ptr(), lmAddress.Length());
-    if (source == target)
-    {
-        return EFalse;
-    }
-    return ETrue;
-
-}
-
-// -----------------------------------------------------------------------------
-// CMyLocationsDatabaseManager::CheckIfAddressChanged()
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TBool CMyLocationsDatabaseManager::CheckIfAddressChanged(const TDesC& aAddress,
-        const TUint32 aId, const TUidSourceType aAddressType)
-{   
-    __TRACE_CALLSTACK;
-    TBool compareStatus = ETrue;
-    QString target=iLocationAppLookupDb->getAddressDetails( aId , aAddressType );
-    QString source = QString( (QChar*)aAddress.Ptr(), aAddress.Length());
-    if( source == target )
-    {
-        compareStatus= EFalse;
-    }
-    return compareStatus;
-}
-
-// End of file
--- a/locationdataharvester/mylocationsengine/conf/maptilestatuspublisher.qcrml	Tue Aug 31 15:09:25 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<repository target="RProperty" version="" uidName="repo" uidValue="0x2002680A">
-<key ref="/maptilestatuspublisher/name" int="0x1"/>
-</repository>
\ No newline at end of file
--- a/locationdataharvester/mylocationsengine/inc/appmain.h	Tue Aug 31 15:09:25 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,30 +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: Application main header.
-*
-*/
-
-#ifndef __APPMAIN_H__
-#define __APPMAIN_H__
-
-//  Include Files
-
-#include <e32base.h>
-
-//  Function Prototypes
-
-GLDEF_C TInt E32Main();
-
-#endif  // __APPMAIN_H__
-
--- a/locationdataharvester/mylocationsengine/inc/calendarsubscriber.h	Tue Aug 31 15:09:25 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,79 +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: Subscribe notification .
- *
- */
-#ifndef CALENDARSUBSCRIBER_H
-#define CALENDARSUBSCRIBER_H
-
-// INCLUDES
-
-#include <e32base.h>
-#include <e32property.h>
-#include "notification.h" 
-class CCalendarSubscriber : public CActive
-{
-public:
-    /** 
-     * CCalendarSubscriber::NewL()
-     */
-    static CCalendarSubscriber* NewL(MNotifyChange* aNotifyChange);
-
-    /** 
-     * CCalendarSubscriber::NewL()
-     */
-    static CCalendarSubscriber* NewLC(MNotifyChange* aNotifyChange);
-    /**
-     * ~CCalendarSubscriber.
-     * Virtual Destructor.
-     */
-    virtual ~ CCalendarSubscriber();
-
-private:
-    /**
-     * ConstructL.
-     * 2nd phase constructor.
-     */
-    void ConstructL();
-    /**
-     * CMyLocationsEngine.
-     * C++ default constructor. 
-     */
-    CCalendarSubscriber(MNotifyChange* aNotifyChange);
-    
-#ifdef MYLOCATIONENGINE_UNIT_TEST
-public:
-#else
-private:
-#endif
-    
-    /**
-     * start subscribe for calendar entry
-     */
-    void SubscribeChangeNotiFication();
-
-    /**
-     *  Handles active object's request completion event. 
-     */
-    void RunL();
-    /** 
-     * Implements cancellation of an outstanding request. 
-     */
-    void DoCancel();
-private:   
-    //observer to provide notification on completion of event
-    MNotifyChange& iNotifyChange;
-    RProperty iProperty;
-};
-#endif // CALENDARSUBSCRIBER_H
--- a/locationdataharvester/mylocationsengine/inc/calendernotification.h	Tue Aug 31 15:09:25 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,85 +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: calender db create notification .
- *
- */
-
-#ifndef CALENDERNOTIFICATION_H_
-#define CALENDERNOTIFICATION_H_
-
-// INCLUDES
-
-#include <e32base.h>
-#include <f32file.h>
-#include "notification.h" 
-/**  
- * The observer class gives notification to derive class .
- * When calender db creates in specific path.
- */
-
-class CCalenderNotification : public CActive
-{
-public:
-    /** 
-     * CCalenderNotification::NewL()
-     */
-    static CCalenderNotification* NewL(MNotifyChange* aNotifyChange);
-
-    /** 
-     * CCalenderNotification::NewL()
-     */
-    static CCalenderNotification* NewLC(MNotifyChange* aNotifyChange);
-    /**
-     * ~CCalenderNotification.
-     * Virtual Destructor.
-     */
-    virtual ~ CCalenderNotification();
-
-private:
-    /**
-     * ConstructL.
-     * 2nd phase constructor.
-     */
-    void ConstructL();
-    /**
-     * CMyLocationsEngine.
-     * C++ default constructor. 
-     */
-    CCalenderNotification(MNotifyChange* aNotifyChange);
-    
-public:
-    
-    /**
-     * CheckCalenderDbFileStructure.
-     * Observes the calendar db file structure changes. 
-     */
-    void CheckCalenderDbFileStructure( TChar aDrive );
-
-    /**
-     *  Handles active object's request completion event. 
-     */
-    void RunL();
-    /** 
-     * Implements cancellation of an outstanding request. 
-     */
-    void DoCancel();
-private:
-    //data member
-    //file server 
-    RFs iFsession;
-    //observer to provide notification on completion of event
-    MNotifyChange& iNotifyChange;
-};
-#endif /* CALENDERNOTIFICATION_H_ */
-//End of file
--- a/locationdataharvester/mylocationsengine/inc/contactsubscriber.h	Tue Aug 31 15:09:25 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,78 +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: Subscribe notification .
- *
- */
-#ifndef CONTACTSUBSCRIBER_H
-#define CONTACTSUBSCRIBER_H
-
-// INCLUDES
-
-#include <e32base.h>
-#include <e32property.h>
-#include "notification.h" 
-class CContactSubscriber : public CActive
-{
-public:
-    /** 
-     * CContactSubscriber::NewL()
-     */
-    static CContactSubscriber* NewL(MNotifyChange* aNotifyChange);
-
-    /** 
-     * CContactSubscriber::NewL()
-     */
-    static CContactSubscriber* NewLC(MNotifyChange* aNotifyChange);
-    /**
-     * ~CContactSubscriber.
-     * Virtual Destructor.
-     */
-    virtual ~ CContactSubscriber();
-
-private:
-    /**
-     * ConstructL.
-     * 2nd phase constructor.
-     */
-    void ConstructL();
-    /**
-     * CMyLocationsEngine.
-     * C++ default constructor. 
-     */
-    CContactSubscriber(MNotifyChange* aNotifyChange);
-#ifdef MYLOCATIONENGINE_UNIT_TEST
-public:
-#else
-private:
-#endif
-    
-    /**
-     start subscribe for contact entry
-     */
-    void SubscribeChangeNotiFication();
-
-    /**
-     *  Handles active object's request completion event. 
-     */
-    void RunL();
-    /** 
-     * Implements cancellation of an outstanding request. 
-     */
-    void DoCancel();
-private:   
-    //observer to provide notification on completion of event
-    MNotifyChange& iNotifyChange;
-    RProperty iProperty;
-};
-#endif // CONTACTSUBSCRIBER_H
--- a/locationdataharvester/mylocationsengine/inc/lookupmaptiledb.h	Tue Aug 31 15:09:25 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,148 +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: Maptile database lookup table header.
-*
-*/
-
-#ifndef __LOOKUPMAPTILEDB_H__
-#define __LOOKUPMAPTILEDB_H__
-
-//Headers needed
-#include <f32file.h> //RFs
-#include <d32dbms.h>  //RDbNamedDatabase,RDbView 
-
-#include "mylocationsdefines.h"
- 
-/**
- * CLookupMapTileDatabase class.
- * This class handles all the operations related to maptile lookup database.
- *
- */
- 
-class CLookupMapTileDatabase : public CBase
-{
-public:
-    // Two phase constructors
- 
-    /**
-    * This is a static function, which creates and returns an instance of this class.
-    */
-    static CLookupMapTileDatabase* NewL( const TDesC& aLookupTableName );
-
-    /**
-    * This is a static function, which creates and returns an instance of this class. Pushes the created object 
-    * to the cleanup stack.
-    */
-    static CLookupMapTileDatabase* NewLC( const TDesC& aLookupTableName );
-
-    /**
-    * Destructor
-    */
-    ~CLookupMapTileDatabase();
-
-public:
-    
-    /**
-    * Opens the lookup database.
-    */
-    TInt Open();
-
-    /**
-    * Closes the lookup database.
-    */
-    void Close();
-
-    /**
-    * Creates an entry in the lookup table.
-    * @param[in] aLookupItem The lookup item to be created in the database.
-    */
-    void CreateEntryL( const TLookupItem& aLookupItem );
-
-    /**
-    * Updates an entry in the lookup table.
-    * @param[in] aLookupItem The lookup item to be updated in the database.
-    */
-    void UpdateEntryL( const TLookupItem& aLookupItem );
-
-    /**
-    * Deletes an entry from the lookup table.
-    * @param[in] aLookupItem The lookup item to be deleted from the database.
-    */
-    void DeleteEntryL( TLookupItem& aLookupItem );
-    
-    /**
-    * Deletes maptile from the repository if the ref to that maptile in the db reaches one
-    * @param[in] aLookupItem The lookup item containing the path to the maptile
-    */
-    void DeleteMapTileL( const TLookupItem& aLookupItem );
-
-    /**
-    * Finds an entry in the lookup table.
-    * @param[in/out] aLookupItem The lookup item to be found in the database. The source iUid is passed
-    * in the lookup item
-    * @return ETrue if found, else EFalse
-    */
-    TBool FindEntryL( TLookupItem& aLookupItem);
-    
-    /**
-    * Finds an entry in the lookup table for the given maptile name.
-    * @param[in] aFilePath The lookup item to be found in the database. maptile file path is passed
-    * @return ETrue if found, else EFalse
-    */
-    TBool FindEntryByFilePathL(const TDesC& aFilePath);
-
-    void FindEntriesByMapTileFetchingStateL(const TUint32 aFetchingState,
-            RArray<TLookupItem>& aLookupItemArray);
-
-    /**
-    * Gets the list of calendar ids.
-    * @param[out] aIdArray Calendar id list
-    */
-    void GetAllCalendarIdsL( RArray<TUint32>& aIdArray );
-    
-    /**
-    * ReSet the entry in the lookup table , with null value 
-    * @param aLookupItem The lookup item entry to be reseted in the database,
-    * get the used maptile path as part of lookupItem filepath , to free the resource 
-    */
-    void ReSetEntryL( TLookupItem &aLookupItem );
-private:
-    
-    // default constructor
-    CLookupMapTileDatabase();
-    
-    // Second phase constructor
-    void ConstructL( const TDesC& aLookupTableName );
-    
-    // Creates a lookup table in the lookup database.
-    void CreateTableL(RDbDatabase& aDatabase);
-          
-private:
-    
-    // Handle to the items database
-    RDbNamedDatabase iItemsDatabase;
-    
-    // handle to the file session
-    RFs iFsSession;
-        
-    // holds the database file name
-    TFileName iDbFileName;
-
-};
-
-
-#endif  // __LOOKUPMAPTILEDB_H__
-
-// End of file
-
--- a/locationdataharvester/mylocationsengine/inc/maptileinterface.h	Tue Aug 31 15:09:25 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,182 +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: Maptile interface header implementation.
-*
-*/
-
-#ifndef __MAPTILEINTERFACE_H__
-#define __MAPTIlEINTERFACE_H__
-
-#include <e32std.h> 
-#include <e32base.h>
-// Header for landmarks db
-#include<EPos_CPosLandmarkDatabase.h>
-#include <maptilegeocoderplugin.h>
-
-
- 
-/**
- * MMapTileObserver class.
- * Observer class for notifying the maptile related events 
- *
- */
-class MMapTileObserver
-    {
-public:   
-    
-   /** Informs once maptile is retrived from the REST server
-    * 
-    * @param[in] aErrCode Error code
-    * @param[in] aMapTilePath Path where the maptile image staroed
-    * 
-    */    
-    virtual void MapTilefetchingCompleted( TInt aErrCode,const TDesC& aMapTilePath ) = 0;
-    
-    /** Informs once geo coordinates  retrived from the REST server
-    * 
-    * @param[in] aErrCode Error code
-    * @param[in] aMapTilePath Path where the maptile image staroed
-    * 
-    */    
-    virtual void GeoCodefetchingCompleted( TInt aErrCode, const TReal& aLatitude,
-	                const TReal& aLongitude, const TDesC& aMapTilePath ) = 0;
-    
-  
-    
-    };
-
-
-
-/** 
- * Class used for interacting with maptile and geocoder components .
- * This class raises the request for geocoding service and maptile
- * fetching service.
- */
-class CMapTileInterface : public CBase, MMaptileGeocoderObserver
-{
-public:
-
-   /**
-    * Factory method
-    */
-    static CMapTileInterface* NewL(); 
-    
-    /**
-     * Interface for requesting GEO fields a landmark object containing address
-     * 
-     * @param[in] aLandmark Landmark containing address details
-     * @param[in] aFilePath Path where the maptile image to be stored
-     * @param[in] aObserver Observer for callback notification
-     * 
-     */
-    void GetGeoCodeFromAddressL(  CPosLandmark*  aLandmark , 
-            const TDesC& aFilePath, MMapTileObserver* aObserver  );
-    
-    /**
-     * Interface for requesting GEO fields for the address
-     * 
-     * @param[in] aAddressDetails containing address details
-     * @param[in] aFilePath Path where the maptile image to be stored
-     * @param[in] aObserver Observer for callback notification
-     */
-    void GetGeoCodeFromAddressL(const TDesC& aAddressDetails,
-            const TDesC& aFilePath, MMapTileObserver* aObserver);
-    
-    /**
-     * Interface for requesting  for a landmark object.
-     * @return CPosLandmark object.
-     */
-    CPosLandmark* GetLandMarkDetails();
-        
-    
-    /**
-     * Constructor
-     */
-    CMapTileInterface();
-    
-    /**
-     * Destructor
-     */
-    ~CMapTileInterface();
-    
-    /**
-     * Function for Retrieving maptile     
-     */
-    void GetMapTileL( const TReal& aLatitude, const TReal& aLongitude );    
-
-#ifdef MYLOCATIONENGINE_UNIT_TEST
-public:
-#else
-private:
-#endif
-	
-	/**
-	 * Converts geocoordinates to maptile pixel coordinate and update the 
-	 * image saving file path to MaptileFolder\RowCol.png
-	 */	
-	void UpdateFilePathL( const TReal& aLatitude, const TReal& aLongitude );
-	
-    /**
-     * Interface for requesting  for a landmark object.
-     * @param[in] aAddressInfo , geo-code address details
-     */
-    void SetLandMarkDetailsL(MAddressInfo& aAddressInfo);
-    
-#ifdef MYLOCATIONENGINE_UNIT_TEST
-public:
-#else
-protected:
-#endif
-	
-    /**
-     * Derived from MMaptileGeocoderObserver
-     */
-    void GeocodingCompleted( TInt aErrorcode, MAddressInfo& aAddressInfo );
-    
-    /**
-     * Derived from MMaptileGeocoderObserver
-     */
-    void MapTileFetchingCompleted( TInt aErrorcode, const TDesC& aMapImagePath );
-    
-#ifdef MYLOCATIONENGINE_UNIT_TEST
-public:
-#else
-private:
-#endif
-    
-    /**
-     * Two phase construction
-     */
-    void ConstructL();
-    
-#ifdef MYLOCATIONENGINE_UNIT_TEST
-public:
-#else
-private:
-#endif
-	
-    //MaptileGeocode plugin interface instance
-    CMaptileGeocoderPlugin* iMaptileGeocoder;
-    //Flag to check street availability
-    TBool iStreetAvailable;
-    //Maptile image path
-	HBufC* iFilePath;
-	//Maptile observer
-	MMapTileObserver* iObserver ;
-	//pointer to landmark  from address information.
-	CPosLandmark  *iLandmark;
-
-    };
-#endif // MAPTILEINTERFACE_H
-
--- a/locationdataharvester/mylocationsengine/inc/mylocationgeotagtimerao.h	Tue Aug 31 15:09:25 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,91 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  3AM geo tagger handler
-*
-*/
-
-#ifndef __MYLOCATIONGEOTAGTIMERAO_H__
-#define __MYLOCATIONGEOTAGTIMERAO_H__
-
-
-// INCLUDES
-#include <e32std.h>
-#include <e32base.h>
-
-/*
- * MyLocationTimerObserver class
- * observer class to notify the mylocation engine about the 3AM timer expiry.
- */
-class MyLocationTimerObserver
-{
-public:
-   virtual void MyLocationThreeAMTimerExpiredL() = 0; 
-};
-
-/*
- * CLocationGeoTagTimerAO class
- * Class to handle 3AM timer expiry.
- */
-class CLocationGeoTagTimerAO : public CTimer
-{
-    
-public:
-     /**
-      * 1st phase constructor.
-      * @param aObserver, 3AM timer observer
-      */
-     static CLocationGeoTagTimerAO* NewL(
-             MyLocationTimerObserver& aObserver ); 
-
-     /**
-      * Destructor
-      */
-     ~CLocationGeoTagTimerAO();
-
-     /**
-      * Start 3AM timer
-      */
-     void StartTimer();
-
-     
-#ifdef MYLOCATIONENGINE_UNIT_TEST
-public:
-#else
-protected:
-#endif
-     /*
-      * @see CActive::RunL()
-      */
-     void RunL();
-    
-     /**
-      * 2nd Phase constructor
-      */
-     void ConstructL();
-    
-     /**
-	  * CLocationGeoTagTimerAO
-	  * Constructor
-	  * @param aObserver, 3AM timer observer
-	  */
-     CLocationGeoTagTimerAO( MyLocationTimerObserver& aObserver );
-      
-private:      
-      MyLocationTimerObserver* iTimerObserver;
-};
-
-
-#endif /*__MYLOCATIONGEOTAGTIMERAO_H__*/
-
-// End of file
--- a/locationdataharvester/mylocationsengine/inc/mylocationsengine.h	Tue Aug 31 15:09:25 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,412 +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: Mylocation engine header implementation.
-*
-*/
-
-
-#ifndef __MYLOCATIONSENGINE_H__
-#define __MYLOCATIONSENGINE_H__
-
-// INCLUDES
-// calendar related headers
-#include <calsession.h>
-#include <calentryview.h>
-
-// Header for contact DB
-#include <cntdb.h>
-
-//Qt contacts mobility apis
-#include <qtcontacts.h>
-#include <qcontactmanager.h>
-
-// Header for landmarks db
-#include<EPos_CPosLandmarkDatabase.h>
-
-// mylocations database manager
-#include "maptileinterface.h"
-#include "mylocationsdatabasemanager.h"
-#include "lookupmaptiledb.h"
-#include "calendernotification.h"
-#include "mylocationgeotagtimerao.h"
-class GeocodeUpdate;
-class CContactSubscriber;
-class CCalendarSubscriber;
-using namespace QTM_NAMESPACE;
-
-/**  
- * This class contains the required data  for maptile image  processing.
- * Each  address added/modified in contact database will be added as queue
- * using this class for maptile processing.
- */
-class CMapTileRequest: public CBase
-{
-public:
-    //Consturctor
-    CMapTileRequest():iLandmarkInfo(NULL),iAddressDetails(NULL){};
-    //Destrucotr
-    ~CMapTileRequest(){delete iLandmarkInfo;delete iAddressDetails;};
-public:
-    //Landmark contains address details
-    CPosLandmark* iLandmarkInfo;
-    //single row address.
-    HBufC* iAddressDetails;
-    //entry id
-    TInt32 iUId;
-    //Address type 
-    TInt32 iAddressType;
-    //Image path 
-    TFileName iImagePath;
-    //Event type    
-    TInt iEventType;
-};
-
-/**  
- * This class stores the information required for  maptile
- * processing when it is triggered from the application(contact)
- * viewer.
- */
-class TAppAddressInfo
-{
-public:    
-  TInt iUid;
-  TInt iAddressType;
-};
-
-// CLASS DECLARATION
-/**  Class used to listen on various database change events from applications like calendar, 
- * contacts, landmarks
- * 
- * This class listens on database change events from applications like contacts, calendar, landmarks
- * and triggers updating the Mylocations database accordingly. 
- * This process starts on phone bootup and always runs in the background.
- */
-class CMyLocationsEngine : public CActive, public MCalChangeCallBack2,
-				 public MContactDbObserver, public MMapTileObserver,public MNotifyChange,
-				 public MyLocationTimerObserver
-			
-{
-    
-public:
-    
-    /** 
-     * Contact address types
-     */
-    enum TContactAddressType
-        {
-        /** Address Type Pref */
-        EAddressPref,
-        /** Address type Work */
-        EAddressWork,
-        /** Address type Home */
-        EAddressHome,
-        };
-
-public:
-
-    /** 
-     * CMyLocationsEngine::NewL()
-     */
-    static CMyLocationsEngine* CMyLocationsEngine::NewL();
-    
-    /**
-     * ~CMyLocationsEngine.
-     * Virtual Destructor.
-     */
-    virtual ~CMyLocationsEngine();
-    
-    /** Starts calender change notification method to get callbacks when entries are added/modified/deleted in calender
-     *
-     */      
-    void StartCalenderChangeNotifierL();
-
-    /** Starts contacts change notification method to get callbacks when entries are added/modified/deleted in contacts
-     *
-     */      
-    void StartContactsChangeNotifierL();
-
-    /** Starts landmarks change notification method to get callbacks when entries are added/modified/deleted in landmarks
-     *
-     */      
-    void StartLandmarksChangeNotifier();
-
-
-    
-    /** Maps the source type change type to Mylocations entry change type
-    * @param[in] aSrcType Source type of the change
-    * @param[in] aChangeType Type of change ( added/modified/deleted ).
-    * @return The mylocations entry change type value.
-     */      
-    TEntryChangeType MapChangeType( TUidSourceType aSrcType, TUint32 aChangeType );    
- 
-#ifdef MYLOCATIONENGINE_UNIT_TEST
-public:
-#else
-private:
-#endif
-    
-    /**
-     * ConstructL.
-     * 2nd phase constructor.
-     */
-    void ConstructL();
-    
-    /**
-     * CMyLocationsEngine.
-     * C++ default constructor. 
-     */
-    CMyLocationsEngine();
-    
-    /** Creates a landmark object from contact item's location details and checks whether address available.
-     * @param[in] aContactAddress A contact address whose location details needs to be used to create landmark object.
-     * @returns A valid landmark object if location in the contact item is validated, NULL otherwise.
-     */      
-    CPosLandmark* GetContactAddressDetailsLC( QContactAddress& aContactAddress );
-            
-    /**
-     *  A call back function for calendar change notification
-	 *	@param aChangeItems  List of changes since the last notification.	
-	 */      
-    virtual void CalChangeNotification( RArray<TCalChangeEntry>& aChangeItems );
-    
-    /** Tests the contact database observer event type and handles it. The ID of a 
-    * contact affected by the change event, if relevant, can be retrieved via TContactDbObserverEvent::iContactId.
-    * @param aEvent Provides information about the change event. 
-    */
-    virtual void HandleDatabaseEventL( TContactDbObserverEvent aEvent );
-    
-    /** 
-     * Triggers the maptile processing for complete address
-     * @param aEvent  Provides information about the change event.   
-     */      
-	void TriggerMaptileRequestL(  TContactDbObserverEvent& aEvent  );
-			
-    /** 
-    * Process the maptile database event and updates the maptile database
-    * @param aEventType  Provides information about the type of request address.
-    * @param aLookupItem Provides information about single address of contact.  
-    */  
-	void UpdateMaptileDatabaseL(TInt aEventType ,
-	                             TLookupItem& aLookupItem );
-	
-    /**
-     *  Handles active object's request completion event. 
-     */
-    void RunL();
-
-    /** 
-     * Implements cancellation of an outstanding request. 
-     */
-    void DoCancel();
- 
-    
-    /** 
-     * Requests for map tile image , structure serch.
-     * @param aLandmark  Provides information about the address.
-     * @param aAddressType Provides information about address type .  
-     * @param aUId, uid of the event.
-     */
-    void RequestMapTileImageL( CPosLandmark&  aLandmark, const TUidSourceType aAddressType,
-                               const TInt32 aUId, const TInt aEventType  );
-    
-    /** 
-     * Requests for map tile image , one box serch.
-     * @param aAddressDetails  Provides information about the address.
-     * @param aAddressType Provides information about address type .  
-     * @param aUId, uid of the event.
-     */
-    void RequestMapTileImageL(const TDesC& aAddressDetails,
-            const TUidSourceType aAddressType, const TInt32 aUId,const TInt aEventType);
- 
-    /** 
-     * Checks whether contact has a valid geocoordinates.
-     * @param aContact  Provides all the required information about the contact.
-     * @param aAddressType Provides information about address type .  
-     * @param aLatitude, Latitude information.
-     * @param aLongitude, Longitude information.
-     * @return If geocoordinate available returns TRUE otherwise FALSE
-     */    
-    TBool IsGeoCoordinateAvailable( QContact& aContact, 
-            QString aAddressType, double& aLatitude , double& aLongitude );
-    
-    /** 
-     * Add to maptile request queue.
-     * @param mapTileRequest, request queue.
-     * @return If successful, retrun KErrNone, or return some systemwide error.
-     */
-    TInt RequestExecute( CMapTileRequest* aMapTileRequest);
-	/**
-    * SetFolderPath.
-    * Sets the maptile storing path.
-    */
-    void SetFolderPathL();
-
-    /**
-    * Refreshes calendar entries in mylocation databases. This is typically called when there is an undefined 
-    * change in calendar db.
-    */
-    void RefreshCalendarEntryListL();    
-
-    /**
-    * Returns True if a calendar entry is available for a given id.
-    */
-    TBool IsCalendarEntryValidL( TUint32 aId );    
-
-    /**
-    * Calender entry added.
-    */
-    void CalenderEntryAddedL(TCalChangeEntry aCalChangeEntry);    
-
-    /**
-    * Calender entry modifyied.
-    */
-    void CalenderEntryModifyL(TCalChangeEntry aCalChangeEntry);
-    /**
-    * Update the mylocations database.
-    */
-    void UpdateDatabaseL( CPosLandmark* aLandmark, const TUint32 aUid, 
-            const TUint32 aSourceType, const TEntryChangeType aChangeType );
-			
-    /** 
-     * Informs the geocode completion
-     */
-    void UpdateGeoCodeToAppDataBase( TReal latitude,TReal longitude );		
-    
-    /** 
-     * Process the pending maptile requests
-     */
-    void ProcessNextMaptileRequest();
-    
-    /**
-     * maptile database manipulation.
-     */
-    void ManipulateMapTileDataBaseL(TLookupItem& aLookupItem);
-    
-    /**
-     * Crop and create multiple maptile images for different applications requirements.
-     */
-    void CreateMultipleMaptiles( const TDesC& aMaptilePath );
-    
-    /**
-     * Crop the maptile image and save the different files.
-     */
-    void CropAndSaveImage( QString filePath, int width, 
-                               int height, QString appType, QString orientationType );
-
-	/**Get the contact name for this perticular id.
-     */
-	void GetContactName( TInt32 iUId , TDes& aName );
-     
-public:  //From MMapTileObserver
-    
-    /**
-     *  Informs the maptile fetching completion  
-     */ 
-    void MapTilefetchingCompleted( TInt aErrCode,const TDesC& aMapTilePath );
-    
-    /**
-     *  Informs the geo codes fetching completion  
-     */
-    void GeoCodefetchingCompleted( TInt aErrCode, const TReal& aLatitude,
-	                                   const TReal& aLongitude, const TDesC& aMapTilePath );
-public://from MNotifychange
-    void NotifyChangeL(TInt &aStatus);
-    void GetChangeNotificationL(TInt &aId, TInt &addressType, TInt &addressCount );
-    void SubscribeFromCalendarL(TInt aId);
-	
-public: //from MyLocationTimerObserver
-    /** 
-     * Notifies the timer expiry when 3AM timer was started to notify. 
-     */
-    void MyLocationThreeAMTimerExpiredL();
-
-    
-#ifdef MYLOCATIONENGINE_UNIT_TEST
-public:
-#else
-private:
-#endif
-
-    // Data member
-    
-    //handle to timer class
-    //calendar session handle
-    CCalSession *iCalSession;
-    
-    // calendar view
-    CCalEntryView *iCalView;   
-
-    // Handle to the contacts database
-    CContactDatabase* iContactsDb;
-    
-    // Receives events reporting changes to a contact database.
-    CContactChangeNotifier *iContactChangeNotifier;
-    
-    // Handle to landmarks db
-    CPosLandmarkDatabase* iLandmarkDb;
-    
-    // landmark change event type.
-    TPosLmEvent iLmEvent;
-   
-    //Handle to maptile interface
-    CMapTileInterface* iMapTileInterface;
-    
-    CMyLocationsDatabaseManager*  iMyLocationsDatabaseManager;
-    
-    //maptiledb 
-    CLookupMapTileDatabase* iMaptileDatabase;
-
-    //Current event type
-    TInt iEventType;
-    
-    //Maptile image request queue
-    RArray<CMapTileRequest*> iMapTileRequestQueue;
-    
-    // 3am Timer
-    CLocationGeoTagTimerAO *iMyLocationThreeAMTimer;
-    
-    //Flag to check maptilegeocoder plugin availability
-    TBool iMaptileGeocoderPluginAvailable;
-	
-	//Maptile image path
-    TFileName imageFilePath;
-    
-    //Object to listen calender db create notification.    
-    CCalenderNotification  *iCalenderNotification;
-    
-    //Contact manager instance for retrieving contact info.
-    QContactManager* iContactManager;
-    
-    //Subscribe from contact
-    CContactSubscriber *iContactSubscriber;
-    
-    //Subscribe from calendar
-    CCalendarSubscriber *iCalendarSubscriber;
-    
-    //Geo-code class instance
-    GeocodeUpdate *iGeocodeUpdate;
-       
-    //Last viewed contact id
-    TInt iLastContactId;
-    
-    //Last viewed calendar id
-    TInt iLastCalendarId;
-    
-    //Address information for viewver maptile processing.
-    RArray<TAppAddressInfo*> iAddressInfo;
-   
-};
-
-#endif // __MYLOCATIONSENGINE_H__
-// End of File
--- a/locationdataharvester/mylocationsengine/mylocationsengine.pro	Tue Aug 31 15:09:25 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,69 +0,0 @@
-
-TEMPLATE=app
-TARGET=mylocationsengine
-CONFIG += Qt mobility
-MOBILITY = publishsubscribe
-DEPENDPATH += .
-INCLUDEPATH += .
-INCLUDEPATH += ../inc
-INCLUDEPATH += ../../inc
-INCLUDEPATH += ../geocodeupdate/inc
-INCLUDEPATH += ../mylocationlogger/inc
-INCLUDEPATH += ../mylocationsdatabasemanager/inc
-INCLUDEPATH += /epoc32/include/app
-
-
-symbian: { 
-
-    TARGET.UID3 = 0x2002680A 
-    isEmpty(TARGET.EPOCSTACKSIZE):TARGET.EPOCSTACKSIZE = 0x8000
-    isEmpty(TARGET.EPOCHEAPSIZE):TARGET.EPOCHEAPSIZE = 20480 \
-        16943040
-    TARGET.CAPABILITY = ALL -TCB
-    INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE
-
-    LIBS += -llbs \
-        -leposlandmarks \
-        -leposlmsearchlib \
-        -leuser \
-        -leposlmdbmanlib \
-        -lcntmodel \
-        -lefsrv \
-        -ledbms \
-        -lbafl \
-        -lflogger \
-        -lQtContacts \
-        -lgeocodeupdate \
-        -lecom \
-	-lcalinterimapi \
-	-llocationdatalookupdb \
-	-lmylocationsdatabasemanager
-	
-	
-	myCrml.sources = ./conf/maptilestatuspublisher.qcrml
-        myCrml.path = c:/resource/qt/crml
-        DEPLOYMENT += myCrml
-
-}
-
-SOURCES += src/appmain.cpp \
-    src/mylocationsengine.cpp \
-    src/maptileinterface.cpp \
-    src/lookupmaptiledb.cpp    \
-    src/calendernotification.cpp \
-    src/mylocationgeotagtimerao.cpp \
-    src/contactsubscriber.cpp \
-    src/calendarsubscriber.cpp
-
-HEADERS += inc/appmain.h \
-    inc/mylocationsengine.h \
-    inc/maptileinterface.h \
-    inc/lookupmaptiledb.h \
-    inc/calendernotification.h \
-    inc/mylocationgeotagtimerao.h \
-    inc/contactsubscriber.h \
-    inc/calendarsubscriber.h
-
-
-
-
--- a/locationdataharvester/mylocationsengine/src/appmain.cpp	Tue Aug 31 15:09:25 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,79 +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: Application startup main implementation.
-*
-*/
-
-//  Include Files  
-#include "mylocationlogger.h"
-#include "appmain.h"
-#include "mylocationsengine.h"
-#include <e32base.h>
-#include <e32std.h>
-
-//  Local Functions
-// -----------------------------------------------------------------------------
-// DoExecuteL()
-// 
-// -----------------------------------------------------------------------------
-//
-static void DoExecuteL()
-{
-    __TRACE_CALLSTACK;// Create and install active scheduler
-    CActiveScheduler* scheduler = NULL;
-
-    scheduler = new (ELeave) CActiveScheduler;
-    CleanupStack::PushL(scheduler);
-    CActiveScheduler::Install(scheduler);
-    
-    // create Mylocations engine object
-    CMyLocationsEngine *myLocationsEngine = CMyLocationsEngine::NewL();
-    CleanupStack::PushL( myLocationsEngine );
-
-    MYLOCLOGSTRING("myLocationsEngine created.");
-    
-    RProcess::Rendezvous(KErrNone);
-    // Start handling requests
-    CActiveScheduler::Start();
-
-    CleanupStack::PopAndDestroy(myLocationsEngine);
-    // Pop and destroy the scheduler
-    CleanupStack::PopAndDestroy(scheduler);
-   
-}
-
-// -----------------------------------------------------------------------------
-// Execute()
-// 
-// -----------------------------------------------------------------------------
-//
-static TInt Execute()
-{  
-    TInt error = KErrNoMemory;
-    // Create the cleanup stack
-    CTrapCleanup* cleanup = CTrapCleanup::New();
-    if (cleanup)
-    {
-        // Initialize and start the server
-        TRAP( error, DoExecuteL() );
-        delete cleanup;
-    }
-    return error;
-}
-
-GLDEF_C TInt E32Main()
-{
-    return Execute();
-}
-
--- a/locationdataharvester/mylocationsengine/src/calendarsubscriber.cpp	Tue Aug 31 15:09:25 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,133 +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: Subscribe source implementation for getting calendar status  
- *              notification from publisher .
- *
- */
-#include "calendarsubscriber.h"
-#include <locationservicedefines.h>
-#include "mylocationlogger.h"
-const TUid KCalendarPropertyCat={0x10005901};
-enum TMyPropertyKeys {EMyPropertyInteger=0x1};
-
-// -----------------------------------------------------------------------------
-// CCalendarSubscriber::NewL()
-// -----------------------------------------------------------------------------
-//
-CCalendarSubscriber* CCalendarSubscriber::NewL(MNotifyChange* aNotifyChange)
-{
-    CCalendarSubscriber* self = CCalendarSubscriber::NewLC(aNotifyChange);
-    CleanupStack::Pop(self);
-    return self;
-}
-
-// -----------------------------------------------------------------------------
-// CCalendarSubscriber::NewLC()
-// -----------------------------------------------------------------------------
-//
-CCalendarSubscriber* CCalendarSubscriber::NewLC(
-        MNotifyChange* aNotifyChange)
-{
-    CCalendarSubscriber* self = new (ELeave) CCalendarSubscriber(
-            aNotifyChange);
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    return self;
-}
-
-// -----------------------------------------------------------------------------
-// CCalendarSubscriber::ConstructL()
-// Symbian 2nd phase constructor can leave.
-// -----------------------------------------------------------------------------
-//
-void CCalendarSubscriber::ConstructL()
-{
-    __TRACE_CALLSTACK;
-    CActiveScheduler::Add(this);
-    TInt ret = iProperty.Attach(KCalendarPropertyCat, EMyPropertyInteger);
-
-    if (KErrNone == ret)
-    {
-        SubscribeChangeNotiFication();
-
-    }
-}
-
-
-// -----------------------------------------------------------------------------
-// CCalendarSubscriber::SubscribeChangeNotiFication()
-// start subscribe for calendar entry
-// -----------------------------------------------------------------------------
-//
-void CCalendarSubscriber::SubscribeChangeNotiFication()
-{
-    __TRACE_CALLSTACK;
-    Cancel();
-    // resubscribe before processing new value to prevent missing updates
-    iProperty.Subscribe(iStatus);
-    SetActive();
-}
-
-// -----------------------------------------------------------------------------
-// CCalendarSubscriber::CCalendarSubscriber()
-// Default constructor .
-// -----------------------------------------------------------------------------
-//
-CCalendarSubscriber::CCalendarSubscriber(MNotifyChange* aNotifyChange) :
-    CActive(EPriorityStandard),
-    iNotifyChange(*aNotifyChange)
-    
-{
-}
-// -----------------------------------------------------------------------------
-// CCalendarSubscriber::~CCalendarSubscriber()
-// default destuctor.
-// -----------------------------------------------------------------------------
-//
-CCalendarSubscriber::~CCalendarSubscriber()
-{
-    __TRACE_CALLSTACK;  
-    Cancel();
-    iProperty.Close();
-    
-}
-// -----------------------------------------------------------------------------
-// CCalendarSubscriber::RunL()
-// Assyncronous request handler , on completion of notification
-// -----------------------------------------------------------------------------
-//
-void CCalendarSubscriber::RunL()
-{
-    __TRACE_CALLSTACK;
-    SubscribeChangeNotiFication();
-    // property updated, get new value
-    TInt value;
-    if ( KErrNone == iProperty.Get( value )  && value > 0)
-    {
-        iNotifyChange.SubscribeFromCalendarL( value );
-    }
-}
-// -----------------------------------------------------------------------------
-// CCalendarSubscriber::DoCancel()
-// Handels the error condition on assynchronous request
-// -----------------------------------------------------------------------------
-//
-void CCalendarSubscriber::DoCancel()
-{
-    __TRACE_CALLSTACK;
-    iProperty.Cancel();
-}
-
-//End of file
-
--- a/locationdataharvester/mylocationsengine/src/calendernotification.cpp	Tue Aug 31 15:09:25 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,116 +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: Mylocation engine source implementation for calender db path observation.
- *
- */
-
-#include <calendernotification.h>
-
-_LIT( KCalendarDbPath, ":\\private\\10003a5b\\" );
-
-const TInt KMaxFilePtahSize = 256;
-
-// -----------------------------------------------------------------------------
-// CMyLocationsEngine::NewL()
-// -----------------------------------------------------------------------------
-//
-CCalenderNotification* CCalenderNotification::NewL(MNotifyChange* aNotifyChange)
-{
-    CCalenderNotification* self = CCalenderNotification::NewLC(aNotifyChange);
-    CleanupStack::Pop(self);
-    return self;
-}
-
-// -----------------------------------------------------------------------------
-// CMyLocationsEngine::NewLC()
-// -----------------------------------------------------------------------------
-//
-CCalenderNotification* CCalenderNotification::NewLC(
-        MNotifyChange* aNotifyChange)
-{
-    CCalenderNotification* self = new (ELeave) CCalenderNotification(
-            aNotifyChange);
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    return self;
-}
-
-// -----------------------------------------------------------------------------
-// CMyLocationsEngine::ConstructL()
-// Symbian 2nd phase constructor can leave.
-// -----------------------------------------------------------------------------
-//
-void CCalenderNotification::ConstructL()
-{
-    CActiveScheduler::Add(this);
-    User::LeaveIfError(iFsession.Connect());
-
-}
-
-
-// -----------------------------------------------------------------------------
-// CMyLocationsEngine::CheckCalenderDbFileStructure()
-// Observes the calendar db file structure changes.
-// -----------------------------------------------------------------------------
-//
-void CCalenderNotification::CheckCalenderDbFileStructure( TChar aDrive )
-{
-    TBuf<KMaxFilePtahSize> filePath;
-    filePath.Append( aDrive );
-    filePath.Append( KCalendarDbPath );
-    iFsession.NotifyChange(ENotifyEntry, iStatus, filePath );
-    SetActive();
-}
-
-// -----------------------------------------------------------------------------
-// CMyLocationsEngine::CCalenderNotification()
-// Default constructor .
-// -----------------------------------------------------------------------------
-//
-CCalenderNotification::CCalenderNotification(MNotifyChange* aNotifyChange) :
-    CActive(EPriorityStandard), iNotifyChange(*aNotifyChange)
-{
-}
-// -----------------------------------------------------------------------------
-// CMyLocationsEngine::~CCalenderNotification()
-// default destuctor.
-// -----------------------------------------------------------------------------
-//
-CCalenderNotification::~CCalenderNotification()
-{
-    Cancel();
-    iFsession.Close();
-}
-// -----------------------------------------------------------------------------
-// CMyLocationsEngine::RunL()
-// Assyncronous request handler , on completion of notification
-// -----------------------------------------------------------------------------
-//
-void CCalenderNotification::RunL()
-{
-    TInt status;
-    iNotifyChange.NotifyChangeL( status );
-}
-// -----------------------------------------------------------------------------
-// CMyLocationsEngine::DoCancel()
-// Handels the error condition on assynchronous request
-// -----------------------------------------------------------------------------
-//
-void CCalenderNotification::DoCancel()
-{
-    iFsession.NotifyChangeCancel();
-}
-
-//End of file
-
--- a/locationdataharvester/mylocationsengine/src/contactsubscriber.cpp	Tue Aug 31 15:09:25 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,156 +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: Subscribe source implementation for getting contact status  
- *              notification from publisher.
- *
- */
-#include "contactsubscriber.h"
-#include "mylocationlogger.h"
-#include <locationservicedefines.h>
-
-const TUid KContactPropertyCat={0x20022EF9};
-enum TMyPropertyKeys {EMyPropertyInteger=0x1, EMyPropertyType=0x2};
-const TInt KBufferSize=16;
-
-// -----------------------------------------------------------------------------
-// CContactSubscriber::NewL()
-// -----------------------------------------------------------------------------
-//
-CContactSubscriber* CContactSubscriber::NewL(MNotifyChange* aNotifyChange)
-{
-    CContactSubscriber* self = CContactSubscriber::NewLC(aNotifyChange);
-    CleanupStack::Pop(self);
-    return self;
-}
-
-// -----------------------------------------------------------------------------
-// CContactSubscriber::NewLC()
-// -----------------------------------------------------------------------------
-//
-CContactSubscriber* CContactSubscriber::NewLC(
-        MNotifyChange* aNotifyChange)
-{
-    CContactSubscriber* self = new (ELeave) CContactSubscriber(
-            aNotifyChange);
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    return self;
-}
-
-// -----------------------------------------------------------------------------
-// CContactSubscriber::ConstructL()
-// Symbian 2nd phase constructor can leave.
-// -----------------------------------------------------------------------------
-//
-void CContactSubscriber::ConstructL()
-{
-    __TRACE_CALLSTACK;
-    CActiveScheduler::Add(this);
-    TInt ret = iProperty.Attach(KContactPropertyCat, EMyPropertyInteger);
-    if (KErrNone == ret)
-    {
-        SubscribeChangeNotiFication();
-    }
-}
-
-
-// -----------------------------------------------------------------------------
-// CContactSubscriber::SubscribeChangeNotiFication()
-// start subscribe for contact entry
-// -----------------------------------------------------------------------------
-//
-void CContactSubscriber::SubscribeChangeNotiFication()
-{
-    __TRACE_CALLSTACK;
-    if (IsActive())
-      {
-          Cancel();
-      }
-    // resubscribe before processing new value to prevent missing updates
-    iProperty.Subscribe(iStatus);   
-    SetActive();
-}
-
-// -----------------------------------------------------------------------------
-// CContactSubscriber::CContactSubscriber()
-// Default constructor .
-// -----------------------------------------------------------------------------
-//
-CContactSubscriber::CContactSubscriber(MNotifyChange* aNotifyChange) :
-    CActive(EPriorityStandard),
-    iNotifyChange(*aNotifyChange)
-    
-{
-}
-// -----------------------------------------------------------------------------
-// CContactSubscriber::~CContactSubscriber()
-// default destuctor.
-// -----------------------------------------------------------------------------
-//
-CContactSubscriber::~CContactSubscriber()
-{
-    __TRACE_CALLSTACK;
-    Cancel();
-    iProperty.Close();
-    
-}
-// -----------------------------------------------------------------------------
-// CContactSubscriber::RunL()
-// Assyncronous request handler , on completion of notification
-// -----------------------------------------------------------------------------
-//
-void CContactSubscriber::RunL()
-{
-    __TRACE_CALLSTACK;
-    SubscribeChangeNotiFication();
-    // property updated, get new value 
-    TBuf8 <KBufferSize> value; 
-    TPtrC8  id; 
-    TPtrC8  sourceType; 
-    TPtrC8  addressCount; 
-    
-    if ( KErrNone == iProperty.Get( value ) )
-    { 
-        TInt pos =  value.Locate(TChar('-')); 
-        id.Set( value.Left(pos) ); 
-        
-        TPtrC8 ptr = value.Right(3); 
-        sourceType.Set(ptr.Left(1)); 
-        addressCount.Set(ptr.Right(1)); 
-        
-        TInt appId = -1, addressType = -1, addressTypeCount = -1; 
-        TLex8 lex(id); 
-        lex.Val(appId); 
-        
-        TLex8 lex1(sourceType); 
-        lex1.Val( addressType ); 
-        
-        TLex8 lex2(addressCount); 
-        lex2.Val(addressTypeCount); 
-        
-        iNotifyChange.GetChangeNotificationL( appId, addressType,addressTypeCount ); 
-    } 
-}
-// -----------------------------------------------------------------------------
-// CContactSubscriber::DoCancel()
-// Handels the error condition on assynchronous request
-// -----------------------------------------------------------------------------
-//
-void CContactSubscriber::DoCancel()
-{
-    iProperty.Cancel();
-}
-
-//End of file
-
--- a/locationdataharvester/mylocationsengine/src/lookupmaptiledb.cpp	Tue Aug 31 15:09:25 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,607 +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: Maptile database lookup table source implementation.
-*
-*/
-#include <QString>
-#include <QFile>
-
-#include <bautils.h>
-#include <locationservicedefines.h>
-#include "mylocationlogger.h"
-#include "lookupmaptiledb.h"
-
-_LIT( KSelectAllFrom, "SELECT * FROM " );
-_LIT(KQueryToDB,"SELECT * FROM cntmaptilelookuptable WHERE cntuid = %d AND source = %d");
-_LIT(KQueryGetCalendaIds,"SELECT cntuid FROM cntmaptilelookuptable WHERE source = %d");
-_LIT( KSelectfilepathFrom, "SELECT filepath FROM " );
-_LIT(KQueryMaptile, "SELECT filepath FROM cntmaptilelookuptable WHERE filepath = '%S'");
-// string 'where'
-_LIT( KStringWhere, " WHERE " );
-// string ' = '
-_LIT( KStringEqual, " = " );
-
-_LIT(KQueryByMaptileFetchingState,"SELECT * FROM cntmaptilelookuptable WHERE fetchingstatus = %d");
-
-// -----------------------------------------------------------------------------
-// CLookupMapTileDatabase::CLookupMapTileDatabase()
-// Default constructor.
-// -----------------------------------------------------------------------------
-//
-CLookupMapTileDatabase::CLookupMapTileDatabase()
-{
-}
-
-// -----------------------------------------------------------------------------
-// CLookupMapTileDatabase::~CLookupMapTileDatabase()
-// Destructor.
-// -----------------------------------------------------------------------------
-//
-CLookupMapTileDatabase::~CLookupMapTileDatabase()
-{
-    __TRACE_CALLSTACK;// close the database
-    iItemsDatabase.Close();
-    // close the file session
-    iFsSession.Close();
-}
-
-// -----------------------------------------------------------------------------
-// CLookupMapTileDatabase::~CLookupMapTileDatabase()
-// Creates an object of this class and pushes to cleanup stack.
-// -----------------------------------------------------------------------------
-//
-CLookupMapTileDatabase* CLookupMapTileDatabase::NewLC(
-        const TDesC& aLookupTableName)
-{
-    CLookupMapTileDatabase* self = new (ELeave) CLookupMapTileDatabase;
-    CleanupStack::PushL(self);
-    self->ConstructL(aLookupTableName);
-    return self;
-}
-
-// -----------------------------------------------------------------------------
-// CLookupMapTileDatabase::NewL()
-// Creates an object of this class.
-// -----------------------------------------------------------------------------
-//
-CLookupMapTileDatabase* CLookupMapTileDatabase::NewL(
-        const TDesC& aLookupTableName)
-{
-    CLookupMapTileDatabase* self = CLookupMapTileDatabase::NewLC(
-            aLookupTableName);
-    CleanupStack::Pop(self);
-    return self;
-}
-
-// -----------------------------------------------------------------------------
-// CLookupMapTileDatabase::ConstructL()
-// 2nd phase contructor.
-// -----------------------------------------------------------------------------
-//
-void CLookupMapTileDatabase::ConstructL(const TDesC& aLookupTableName)
-{
-    __TRACE_CALLSTACK;
-    User::LeaveIfError(iFsSession.Connect());
-
-    //create private path
-    User::LeaveIfError(iFsSession.CreatePrivatePath(RFs::GetSystemDrive()));
-    // private path with no drive on it
-    iFsSession.PrivatePath(iDbFileName);
-
-    TFindFile PrivFolder(iFsSession);
-    // find out the drive
-    if (KErrNone == PrivFolder.FindByDir(iDbFileName, KNullDesC))
-    {
-        iFsSession.MkDir(KLookupDbPath);
-        iDbFileName.Copy(KLookupDbPath);
-        iDbFileName.Append(aLookupTableName);
-
-        if (!BaflUtils::FileExists(iFsSession, iDbFileName))
-        { // no database exists so we make one
-            User::LeaveIfError(iItemsDatabase.Create(iFsSession, iDbFileName));
-            // and will create the only table needed for it
-            CreateTableL(iItemsDatabase);
-
-            //close the database
-            iItemsDatabase.Close();
-        }        
-    }
-}
-
-// -----------------------------------------------------------------------------
-// CLookupMapTileDatabase::Open()
-// Opens the lookup database.
-// -----------------------------------------------------------------------------
-//
-TInt CLookupMapTileDatabase::Open()
-{
-    __TRACE_CALLSTACK;
-    return iItemsDatabase.Open(iFsSession, iDbFileName);
-}
-
-// -----------------------------------------------------------------------------
-// CLookupMapTileDatabase::Close()
-// Closes the lookup database.
-// -----------------------------------------------------------------------------
-//
-void CLookupMapTileDatabase::Close()
-{
-    __TRACE_CALLSTACK;
-    iItemsDatabase.Close();
-}
-
-// -----------------------------------------------------------------------------
-// CLookupMapTileDatabase::CreateTableL()
-// Creates a lookup table.
-// -----------------------------------------------------------------------------
-//
-void CLookupMapTileDatabase::CreateTableL(RDbDatabase& aDatabase)
-{
-    __TRACE_CALLSTACK;// Create a table definition
-    CDbColSet* columns = CDbColSet::NewLC();
-
-    // Add Columns
-
-    // Add uid column
-    columns->AddL(TDbCol(NCntColUid, EDbColUint32));
-
-    columns->AddL(TDbCol(NColSource, EDbColUint32));
-
-    // add file path type column
-    columns->AddL(TDbCol(NCntColFilePath, EDbColText16));
-    
-    //MK 
-    // add map tile fetching status to the db
-    columns->AddL(TDbCol(MapTileFetchingStatus, EDbColUint32));
-    
-
-    // Create a table
-    User::LeaveIfError(aDatabase.CreateTable(KMapTileLookupTable, *columns));
-
-    // cleanup the column set
-    CleanupStack::PopAndDestroy(columns);
-}
-
-// -----------------------------------------------------------------------------
-// CLookupMapTileDatabase::CreateEntryL()
-// Creates an entry in the lookup table.
-// -----------------------------------------------------------------------------
-//
-void CLookupMapTileDatabase::CreateEntryL(const TLookupItem& aLookupItem)
-{
-    __TRACE_CALLSTACK;// create a query for the view
-    TFileName queryBuffer;
-    queryBuffer.Copy(KSelectAllFrom);
-    queryBuffer.Append(KMapTileLookupTable);
-
-    TInt ret = Open();
-    if (ret != KErrNone)
-    {
-		Close();
-        ret = Open();
-        if( ret != KErrNone )
-            return;
-       
-    }
-	 iItemsDatabase.Begin();
-    
-    RDbView myView;
-    myView.Prepare(iItemsDatabase, TDbQuery(queryBuffer));
-    CleanupClosePushL(myView);
-
-    // Inert the item
-    myView.InsertL();
-    // set the fields
-    myView.SetColL(KColumncntUid, aLookupItem.iUid);
-    myView.SetColL(KColumnSource, aLookupItem.iSource);
-    myView.SetColL(KColumnFilePath, aLookupItem.iFilePath);
-    myView.SetColL(KColumnMapTileFetchingStatus, aLookupItem.iFetchingStatus); //MK
-
-    myView.PutL();
-
-    CleanupStack::PopAndDestroy(&myView); // myView
-    iItemsDatabase.Commit();
-    Close();
-}
-
-// -----------------------------------------------------------------------------
-// CLookupMapTileDatabase::ReSetEntryL()
-// Reset the entry with null value and get the used maptile path as part of aLookupItem.
-// -----------------------------------------------------------------------------
-//
-void CLookupMapTileDatabase::ReSetEntryL(TLookupItem &aLookupItem)
-{
-    TFileName queryBuffer;
-    queryBuffer.Format(KQueryToDB, aLookupItem.iUid, aLookupItem.iSource);
-    TInt ret = Open();
-    if (ret != KErrNone)
-    {
-        Close();
-        ret = Open();
-        if( ret != KErrNone )
-            return;
-    }
-    iItemsDatabase.Begin();
-
-    // Create a view of the table based on the query created.
-    RDbView myView;
-    myView.Prepare(iItemsDatabase, TDbQuery(queryBuffer));
-    CleanupClosePushL(myView);
-
-    myView.EvaluateAll();
-    myView.FirstL();
-
-    if (myView.AtRow())
-    {
-        myView.GetL();
-        aLookupItem.iFilePath.Copy(myView.ColDes16(KColumnFilePath));
-        // found the entry. update it.
-        myView.UpdateL();
-        myView.SetColL(KColumnFilePath, KNullDesC);
-        myView.SetColL(KColumnMapTileFetchingStatus,
-                aLookupItem.iFetchingStatus); //MK
-        myView.PutL();
-    }
-
-    CleanupStack::PopAndDestroy(&myView); // myView
-    iItemsDatabase.Commit();
-
-    Close();
-}
-// -----------------------------------------------------------------------------
-// CLookupMapTileDatabase::UpdateEntryL()
-// Updates an entry in the lookup table.
-// -----------------------------------------------------------------------------
-//
-void CLookupMapTileDatabase::UpdateEntryL(const TLookupItem& aLookupItem)
-{
-    __TRACE_CALLSTACK;// Create the query to find the row to be updated.
-    TFileName queryBuffer;
-    queryBuffer.Format(KQueryToDB, aLookupItem.iUid, aLookupItem.iSource);
-    TInt ret = Open();
-    if (ret != KErrNone)
-    {
-		Close();
-        ret = Open();
-        if( ret != KErrNone )
-            return;       
-    }
-	 iItemsDatabase.Begin();
-
-    // Create a view of the table based on the query created.
-    RDbView myView;
-    myView.Prepare(iItemsDatabase, TDbQuery(queryBuffer));
-    CleanupClosePushL(myView);
-
-    myView.EvaluateAll();
-    myView.FirstL();
-    
-    if (myView.AtRow())
-    {
-        // found the entry. update it.
-        myView.UpdateL();
-        myView.SetColL(KColumnFilePath, aLookupItem.iFilePath);
-        myView.SetColL(KColumnMapTileFetchingStatus, aLookupItem.iFetchingStatus); //MK
-        myView.PutL();
-    } 
-
-    CleanupStack::PopAndDestroy(&myView); // myView
-    iItemsDatabase.Commit();
-
-    Close();  
-
-}
-
-// -----------------------------------------------------------------------------
-// CLookupMapTileDatabase::DeleteEntryL()
-// Deletes an entry from the lookup table.
-// -----------------------------------------------------------------------------
-//
-void CLookupMapTileDatabase::DeleteEntryL(TLookupItem& aLookupItem)
-{
-    __TRACE_CALLSTACK;// Create the query to find the row to be deleted.
-
-    TFileName queryBuffer;
-    queryBuffer.Format(KQueryToDB, aLookupItem.iUid, aLookupItem.iSource);
-
-    TInt ret = Open();
-    if (ret != KErrNone)
-    {
-		Close();
-        ret = Open();
-        if( ret != KErrNone )
-            return;
-    }
-	 iItemsDatabase.Begin();
-
-    RDbView myView;
-    // query buffer finds only the selected item row.
-    myView.Prepare(iItemsDatabase, TDbQuery(queryBuffer));
-    CleanupClosePushL(myView);
-
-    myView.EvaluateAll();
-
-    // positions the cursor on the first row of the rowset
-    myView.FirstL();
-
-    // Delete the entry found.
-    if (myView.AtRow())
-    {
-        myView.GetL();
-        if (aLookupItem.iUid == myView.ColUint(KColumncntUid))
-        {
-            aLookupItem.iFilePath.Copy(myView.ColDes16(KColumnFilePath));
-            
-        }
-        myView.DeleteL();
-    }
-
-    CleanupStack::PopAndDestroy(&myView); // myView
-    iItemsDatabase.Commit();
-    // compacts the databse, by physicaly removing deleted data.
-    iItemsDatabase.Compact();
-
-    Close();
-}
-
-// -----------------------------------------------------------------------------
-// CLookupMapTileDatabase::DeleteMapTileL()
-// Deletes an maptile if there's no reference to maptile in lookupdb
-// -----------------------------------------------------------------------------
-//
-void CLookupMapTileDatabase::DeleteMapTileL( const TLookupItem& aLookupItem)
-{
-    __TRACE_CALLSTACK;// Create the query to find the row to be deleted.
-
-    TFileName queryBuffer;    
-    queryBuffer.Format(KQueryMaptile, &aLookupItem.iFilePath);
-    
-    TInt ret = Open();
-    if (ret != KErrNone)
-    {
-       Close();
-       ret = Open();
-       if( ret != KErrNone )
-           return;
-    }
-    
-    iItemsDatabase.Begin();
-
-    RDbView myView;
-    // query buffer finds only the selected item row.
-    myView.Prepare(iItemsDatabase, TDbQuery(queryBuffer));
-    CleanupClosePushL(myView);
-
-    myView.EvaluateAll();
-
-    // positions the cursor on the first row of the rowset
-    myView.FirstL();
-
-    // Delete if no reference to maptile
-    if (!myView.AtRow())
-    {
-        QString filePath =  QString::fromUtf16( aLookupItem.iFilePath.Ptr(), aLookupItem.iFilePath.Length() );
-        //delete all releted  maptile 
-        QString temp=filePath;
-        temp.append(MAPTILE_IMAGE_PORTRAIT);       
-        QFile file;
-        file.remove(temp);
-        
-        temp=filePath;
-        temp.append(MAPTILE_IMAGE_CONTACT);
-        temp.append(MAPTILE_IMAGE_LANDSCAPE);
-        file.remove(temp);
-        
-        temp=filePath;
-        temp.append(MAPTILE_IMAGE_CALENDAR);
-        temp.append(MAPTILE_IMAGE_LANDSCAPE);
-        file.remove(temp);
-        
-        temp=filePath;
-        temp.append(MAPTILE_IMAGE_HURRIGANES);         
-        file.remove(temp);
-         
-       // ret = iFsSession.Delete(aLookupItem.iFilePath);     
-    }
-        
-    CleanupStack::PopAndDestroy(&myView); // myView
-
-    Close();
-}
-
-
-// -----------------------------------------------------------------------------
-// CLookupMapTileDatabase::FindEntriesByMapTileFetchingStatusL()
-// Finds a list of lookup items given a landmark uid.
-// -----------------------------------------------------------------------------
-//
-void CLookupMapTileDatabase::FindEntriesByMapTileFetchingStateL(const TUint32 aFetchingState,
-        RArray<TLookupItem>& aLookupItemArray)
-{
-    __TRACE_CALLSTACK;// Create a query to find the item.
-    TFileName queryBuffer;
-    queryBuffer.Format(KQueryByMaptileFetchingState,aFetchingState);
-    
-    TInt ret = Open();
-        if (ret != KErrNone)
-        {
-           Close();
-           ret = Open();
-           if( ret != KErrNone )
-               return;
-        }
-      iItemsDatabase.Begin();
-
-    
-    // Create a view of the table with the above query.
-    RDbView myView;
-    myView.Prepare(iItemsDatabase, TDbQuery(queryBuffer));
-    CleanupClosePushL(myView);
-    myView.EvaluateAll();
-    myView.FirstL();
-
-    while (myView.AtRow())
-    {
-        // Item found. get the details.
-        myView.GetL();
-        TLookupItem newItem;
-        newItem.iUid = myView.ColUint(KColumnUid);
-        newItem.iSource = myView.ColUint(KColumnSource);
-        aLookupItemArray.Append(newItem);
-        myView.NextL();
-    }
-
-    CleanupStack::PopAndDestroy(&myView); // myView
-}
-
-// -----------------------------------------------------------------------------
-// CLookupMapTileDatabase::GetAllCalendarIdsL()
-// Gets the list of calendar ids .
-// -----------------------------------------------------------------------------
-//
-void CLookupMapTileDatabase::GetAllCalendarIdsL( RArray<TUint32>& aIdArray )
-{
-    __TRACE_CALLSTACK;// Create a query to find the item.
-    TFileName queryBuffer;
-    queryBuffer.Format( KQueryGetCalendaIds, ESourceCalendar );
-    
-    TInt ret = Open();
-        if (ret != KErrNone)
-        {
-           Close();
-           ret = Open();
-           if( ret != KErrNone )
-               return;
-        }
-    iItemsDatabase.Begin();
-
-    
-    // Create a view of the table with the above query.
-    RDbView myView;
-    myView.Prepare( iItemsDatabase, TDbQuery( queryBuffer ) );
-    CleanupClosePushL( myView );
-    myView.EvaluateAll();
-    myView.FirstL();
-
-    while( myView.AtRow() )
-    {
-        // Item found. get the details.
-        myView.GetL();
-        TUint32 id;
-        id = myView.ColUint( KColumnUid );
-        aIdArray.Append( id );
-        myView.NextL();
-    }
-
-    CleanupStack::PopAndDestroy( &myView ); // myView
-    Close();
-}
-
-// -----------------------------------------------------------------------------
-// CLookupMapTileDatabase::FindEntryL()
-// Finds an entry in the lookup table.
-// -----------------------------------------------------------------------------
-//
-TBool CLookupMapTileDatabase::FindEntryL(TLookupItem& aLookupItem)
-{
-    __TRACE_CALLSTACK;// used to store return value
-    TBool retVal = EFalse;
-    // Create a query to find the item.
-    TFileName queryBuffer;
-    queryBuffer.Format(KQueryToDB, aLookupItem.iUid, aLookupItem.iSource);
-
-   TInt ret = Open();
-    if (ret != KErrNone)
-    {
-		Close();
-        ret = Open();
-        if( ret != KErrNone )
-            return EFalse;
-       
-    }
-	 iItemsDatabase.Begin();
-
-    // Create a view of the table with the above query.
-    RDbView myView;
-    myView.Prepare(iItemsDatabase, TDbQuery(queryBuffer));
-    CleanupClosePushL(myView);
-    myView.EvaluateAll();
-    myView.FirstL();
-
-    if (myView.AtRow())
-    {
-        // Item found. get the details.
-        myView.GetL();
-        retVal = ETrue;
-    }
-
-    CleanupStack::PopAndDestroy(&myView); // myView
-    Close();
-    return retVal;
-}
-
-// -----------------------------------------------------------------------------
-// CLookupMapTileDatabase::FindEntryByFIlePathLL()
-// Finds an entry in the lookup table for maptile image file
-// -----------------------------------------------------------------------------
-//
-TBool CLookupMapTileDatabase::FindEntryByFilePathL(const TDesC& aFilePath)
-{
-    __TRACE_CALLSTACK;// used to store return value
-    TBool retVal = EFalse;
-   
-    TInt ret = Open();
-    if (ret != KErrNone)
-    {
-        Close();
-        ret = Open();
-        if( ret != KErrNone )
-            return EFalse;       
-    }
-    
-    iItemsDatabase.Begin();
-    
-    // Create a query to find the item.
-    TFileName queryBuffer;
-    _LIT(KFormatSpec, "%S%S%S%S%S'%S'");
-    
-    queryBuffer.Format(KFormatSpec, 
-        &KSelectfilepathFrom(), 
-        &KMapTileLookupTable(),
-        &KStringWhere(),
-        &NCntColFilePath(),
-        &KStringEqual(),
-        &aFilePath);
-    
-    // Create a view of the table with the above query.
-    RDbView myView;
-    TInt retPrep = myView.Prepare(iItemsDatabase, TDbQuery(queryBuffer));
-    CleanupClosePushL(myView);
-    myView.EvaluateAll();
-    myView.FirstL();
-
-    if (myView.AtRow())
-    {
-        // Item found, return true
-        retVal = ETrue;
-    }
-
-    CleanupStack::PopAndDestroy(&myView); // myView
-    Close();
-
-    return retVal;
-}
-
-// End of file
-
--- a/locationdataharvester/mylocationsengine/src/maptileinterface.cpp	Tue Aug 31 15:09:25 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,307 +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: Maptile interface source implementation for maptile
-*              service.
-*
-*/
-
-#include <EPos_CPosLandmark.h>
-#include <EPos_CPosLandmarkDatabase.h>
-#include <EPos_CPosLmItemIterator.h>
-#include <EPos_CPosLmOperation.h>
-#include <f32file.h>
-#include <bautils.h>
-#include "maptileinterface.h"
-#include "mylocationlogger.h"
-#include "mylocationsdefines.h"
-#include "lookupmaptiledb.h"
-#include <math.h>
-
-//Invalid latitude & longitude value
-const TReal KInvalidLatitudeLongitude =  200.0f;
-const TInt KStreetLvelZoom = 16;
-const TInt KCityLevelZoom = 11;
-const TInt KImagePathSize=36;
-const TInt KMapTileWidthHeight = 256 ;
-_LIT(KFileExtn, ".png");
-
-// -----------------------------------------------------------------------------
-// CMapTileInterface::NewL()
-// Creates and returns the instance of CMapTileInterface
-// -----------------------------------------------------------------------------
-//
-CMapTileInterface* CMapTileInterface::NewL()
-{
-    CMapTileInterface* self = new (ELeave) CMapTileInterface();
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    CleanupStack::Pop(self);
-    return self;
-}
-
-// -----------------------------------------------------------------------------
-// CMapTileInterface::~CMapTileInterface()
-// Destructor
-// -----------------------------------------------------------------------------
-//
-CMapTileInterface::~CMapTileInterface()
-{
-    __TRACE_CALLSTACK;
-   
-    delete iFilePath;
-    
-    delete iMaptileGeocoder;
-    
-    delete iLandmark;
-}    
-
-
-// -----------------------------------------------------------------------------
-// CMapTileInterface::CMapTileInterface()
-// Constructor
-// -----------------------------------------------------------------------------
-//
-CMapTileInterface::CMapTileInterface() :
-           iMaptileGeocoder( NULL ), 
-           iFilePath( NULL ),
-           iObserver(NULL),
-           iLandmark(NULL)
-{
-}
-
-// -----------------------------------------------------------------------------
-// CMapTileInterface::ConstructL()
-// Two phase constructor
-// -----------------------------------------------------------------------------
-//
-void CMapTileInterface::ConstructL()
-{
-    __TRACE_CALLSTACK;
-
-    iMaptileGeocoder = CMaptileGeocoderPlugin::NewL();
-    
-    iMaptileGeocoder->SetMaptileGeocoderObserver( *this );
-}
-// -----------------------------------------------------------------------------
-// CMapTileInterface::GetGeoCodeFromAddressL()
-// Interface for requesting GEO fields for the given address
-// -----------------------------------------------------------------------------
-//
-void CMapTileInterface::GetGeoCodeFromAddressL(const TDesC& aAddressDetails,
-        const TDesC& aFilePath, MMapTileObserver* aObserver)
-{
-    __TRACE_CALLSTACK;
-    iObserver = aObserver;
-    delete iFilePath;
-    iFilePath = NULL;    
-    iFilePath = HBufC::NewL(aFilePath.Length());
-    iFilePath->Des().Copy(aFilePath);
-    iStreetAvailable = EFalse;
-    iMaptileGeocoder->GetCoordinateByAddressL(aAddressDetails, ESilent);
-     
-}
-// -----------------------------------------------------------------------------
-// CMapTileInterface::GetGeoCodeFromAddressL()
-// Interface for requesting GEO fields for the given landmark adress
-// -----------------------------------------------------------------------------
-//
-void CMapTileInterface::GetGeoCodeFromAddressL(CPosLandmark* aLandmark,
-        const TDesC& aFilePath, MMapTileObserver* aObserver)
-{
-    __TRACE_CALLSTACK;
-    iObserver = aObserver;
-    delete iFilePath;
-    iFilePath = NULL;    
-    iFilePath = HBufC::NewL(aFilePath.Length());
-    iFilePath->Des().Copy(aFilePath);
-
-    //Reset the street level available flag
-	iStreetAvailable = EFalse;
-	
-    TPtrC getStreet;
-    aLandmark->GetPositionField(EPositionFieldStreet, getStreet);
-
-    if (getStreet.Length() > 0)
-   {
-        iStreetAvailable = ETrue;
-    }
-    iMaptileGeocoder->GetCoordinateByAddressL(*aLandmark, ESilent);
-}
-
-// -----------------------------------------------------------------------------
-// CMapTileInterface::GetMapTileL()
-// Function for Retrieving latitude & longitude information
-// -----------------------------------------------------------------------------
-//
-void CMapTileInterface::GetMapTileL( const TReal& aLatitude, const TReal& aLongitude)
-{
-    __TRACE_CALLSTACK;//Notification to observer , to update contact db,
-    TInt zoom = KCityLevelZoom;
-    if (iStreetAvailable)
-    {
-        zoom = KStreetLvelZoom;
-    }
-    iStreetAvailable = EFalse;
-    TMapTileParam mapTileparam(aLatitude, aLongitude, zoom, MapTileWidth,MapTileHeight );
-    iMaptileGeocoder->GetMapTileByGeoCodeL( mapTileparam, *iFilePath );
-}
-
-// -----------------------------------------------------------------------------
-// CMapTileInterface::MapComplete()
-// Maptile retrievel notification
-// -----------------------------------------------------------------------------
-//
-void CMapTileInterface::MapTileFetchingCompleted( TInt aErrCode, const TDesC& aMapTilePath )
-{
-    __TRACE_CALLSTACK;
-    MYLOCLOGSTRING1("MapComplete() status-%d ",aErrCode );
-    iObserver->MapTilefetchingCompleted( aErrCode, aMapTilePath );
-}
-
-// ----------------------------------------------------------------------------
-// CMapTileInterface::UpdateFilePathL()
-// Converts the geocoordinate to maptile pixel coordinate and updates the
-// file path to Maptilefolder\RowCol.png
-// ----------------------------------------------------------------------------
-//
-void CMapTileInterface::UpdateFilePathL( const TReal& aLatitude, const TReal& aLongitude )
-{
-    TInt iZoomLvl = KCityLevelZoom;
-    if ( iStreetAvailable )
-        iZoomLvl = KStreetLvelZoom;
-    
-    TInt totalTilesHorizontal = 1 << iZoomLvl;
-    TInt totalTilesVertical = 1 << iZoomLvl;
-
-    TInt totalMapWidth = totalTilesHorizontal * KMapTileWidthHeight;
-    TInt totalMapHeight = totalTilesVertical * KMapTileWidthHeight;
-    
-    TReal pi = 3.14159265;
-
-    TInt convertedx = (( aLongitude + 180.0) * totalMapWidth)
-            / 360.0;
-    TReal convertedtemp = log(tan(( aLatitude + 90) * pi
-            / 360.0));
-    int convertedy = (1 - convertedtemp / pi) * totalMapHeight / 2.0;
-
-    //Get the image row,col
-    TInt iMapTileImageRow = ( convertedy / 256.0 ) * 1000;
-    TInt iMapTileImageCol = ( convertedx / 256.0 ) * 1000;
-    
-    TBuf<KImagePathSize> mImagePath;
-
-    mImagePath.AppendNum(iMapTileImageRow);
-    mImagePath.AppendNum(iMapTileImageCol);
-    mImagePath.Append(KFileExtn);   
-    
-    if( iFilePath )
-    {
-        iFilePath = iFilePath->ReAllocL(iFilePath->Length() + mImagePath.Length() );
-        iFilePath->Des().Append(mImagePath);    
-    }
-}
-
-// -----------------------------------------------------------------------------
-// CMapTileInterface::GeocodeComplete()
-// Geocode completion  notification
-// -----------------------------------------------------------------------------
-//
-void CMapTileInterface::GeocodingCompleted(TInt aErrorcode,
-        MAddressInfo& aAddressInfo)
-{
-    __TRACE_CALLSTACK;
-    TReal latitude, longitude;
-    latitude=aAddressInfo.GetLatitude();
-    longitude=aAddressInfo.GetLongitude();
-    
-    MYLOCLOGSTRING1("GeocodeCompleted() status-%d",aErrorcode);
-    MYLOCLOGSTRING1("GeocodeCompleted() latitude-%f",latitude );
-    MYLOCLOGSTRING1("GeocodeCompleted() longitude-%f",longitude );
-	
-    if (aErrorcode == KErrNone)
-    {
-        if ( latitude != KInvalidLatitudeLongitude
-                && longitude != KInvalidLatitudeLongitude)
-        {           
-            TRAP_IGNORE( SetLandMarkDetailsL(aAddressInfo) );
-			      TRAP_IGNORE( UpdateFilePathL( latitude, longitude ) );
-	      
-            iObserver->GeoCodefetchingCompleted(KErrNone,  latitude, longitude, iFilePath->Des());
-
-        }
-        else
-        {
-            iObserver->GeoCodefetchingCompleted(KErrGeneral,
-		      KInvalidLatitudeLongitude, KInvalidLatitudeLongitude, KNullDesC);
-        }        
-    }
-    else
-    {
-        iObserver->GeoCodefetchingCompleted(aErrorcode,
-		       KInvalidLatitudeLongitude, KInvalidLatitudeLongitude, KNullDesC );
-    }
-}
-
-// -----------------------------------------------------------------------------
-// CMapTileInterface::GetLandMarkDetails()
-// return pointer to CPosLandmark 
-// -----------------------------------------------------------------------------
-//
-CPosLandmark* CMapTileInterface::GetLandMarkDetails()
-{
-    return iLandmark;  
-               
-}
-// -----------------------------------------------------------------------------
-// CMapTileInterface::SetLandMarkDetails()
-// create CPosLandmark details from MAddressInfo 
-// -----------------------------------------------------------------------------
-//
-void CMapTileInterface::SetLandMarkDetailsL(MAddressInfo& aAddressInfo)
-{
-    if(iLandmark)
-    {
-        delete iLandmark;
-        iLandmark=NULL;
-    }
-    TReal latitude,longitude;
-    latitude=aAddressInfo.GetLatitude();
-    longitude=aAddressInfo.GetLongitude();    
-    TLocality position(TCoordinate(latitude,longitude),0);
-    iLandmark=CPosLandmark::NewL();
-    //latitude and longitude
-    iLandmark->SetPositionL(position);
-    
-    //street
-    TPtrC tempText=aAddressInfo.GetThoroughfareName();
-    if(tempText.Length()>0)
-    {
-        iStreetAvailable=ETrue;
-    }
-    iLandmark->SetPositionFieldL(EPositionFieldStreet, tempText);
-    //postal code
-    tempText.Set(aAddressInfo.GetPincode());
-    iLandmark->SetPositionFieldL(EPositionFieldPostalCode, tempText);
-    //city
-    tempText.Set(aAddressInfo.GetCity());
-    iLandmark->SetPositionFieldL(EPositionFieldCity, tempText);
-    //state
-    tempText.Set(aAddressInfo.GetState());
-    iLandmark->SetPositionFieldL(EPositionFieldState, tempText);
-    //country
-    tempText.Set(aAddressInfo.GetCountryName());
-    iLandmark->SetPositionFieldL(EPositionFieldCountry, tempText); 
-    
-}
-//end of line
--- a/locationdataharvester/mylocationsengine/src/mylocationgeotagtimerao.cpp	Tue Aug 31 15:09:25 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,155 +0,0 @@
-/*
-* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Implements geotagging 3AM timer
-*
-*/
-
-#include "mylocationgeotagtimerao.h"
-#include <mylocationlogger.h>
-#include <aknappui.h>
-#include <aknnotewrappers.h>
-#include <avkon.hrh>
-
-//Time at which the geotagging should be triggered( 3.00 AM )
-const TInt GEOTAGGING_TIME_IN_HOURS = 3;
-//Hour specified in minutes
-const TInt HOUR_VALUE_IN_MINUTES = 60;
-//Hour specified in seconds
-const TInt HOUR_VALUE_IN_SECONDS = 3600;
-
-// --------------------------------------------------------------------------
-// CLocationGeoTagTimerAO::CLocationGeoTagTimerAO
-// --------------------------------------------------------------------------
-//
-CLocationGeoTagTimerAO::CLocationGeoTagTimerAO( MyLocationTimerObserver& aObserver ):
-            CTimer(EPriorityStandard ),
-            iTimerObserver(&aObserver)
-{
-
-}
-
-
-// --------------------------------------------------------------------------
-// CLocationGeoTagTimerAO::~CLocationGeoTagTimerAO
-// --------------------------------------------------------------------------
-//
-CLocationGeoTagTimerAO::~CLocationGeoTagTimerAO()
-{
-    MYLOCLOGSTRING ("CLocationGeoTagTimerAO::~CLocationGeoTagTimerAO(), begin");
-    Cancel();
-    MYLOCLOGSTRING ("CLocationGeoTagTimerAO::~CLocationGeoTagTimerAO(), end");
-}
-
-// --------------------------------------------------------------------------
-// CLocationGeoTagTimerAO::NewL
-// --------------------------------------------------------------------------
-//
-CLocationGeoTagTimerAO* CLocationGeoTagTimerAO::NewL( MyLocationTimerObserver& aObserver )
-{
-    CLocationGeoTagTimerAO* self = 
-         new( ELeave ) CLocationGeoTagTimerAO( aObserver);
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop();
-   
-    return self;
-}
-
-
-// --------------------------------------------------------------------------
-// CLocationGeoTagTimerAO::ConstructL
-// --------------------------------------------------------------------------
-//
-void CLocationGeoTagTimerAO::ConstructL()
-{
-    MYLOCLOGSTRING ("CLocationGeoTagTimerAO::ConstructL(), begin");
-    CActiveScheduler::Add(this);
-    CTimer::ConstructL();
-    MYLOCLOGSTRING ("CLocationGeoTagTimerAO::ConstructL(), end");
-}
-
-// --------------------------------------------------------------------------
-// CLocationGeoTagTimerAO::StartTimer
-// --------------------------------------------------------------------------
-//
-void CLocationGeoTagTimerAO::StartTimer()
-{
-    MYLOCLOGSTRING ("CLocationGeoTagTimerAO::StartTimer(), begin");
-    if(!IsActive())
-    {
-        TTime hometime;
-        hometime.HomeTime();
-        
-        //Get the current time in Hour,Minute, Second
-        TDateTime  currentDateTime = hometime.DateTime();
-        TInt currentHr = currentDateTime.Hour(); 
-        TInt currentMin = currentDateTime.Minute();
-        TInt currentSec = currentDateTime.Second();
-        
-        //3 AM in seconds
-        TInt targetTimeInSeconds = GEOTAGGING_TIME_IN_HOURS * HOUR_VALUE_IN_SECONDS;
-        TInt timeDifference;
-        
-        //Find the time difference in seconds between current time to 3.00 AM 
-        //Either on same day or next day.
-        if ( currentHr < GEOTAGGING_TIME_IN_HOURS )
-        {
-           timeDifference = targetTimeInSeconds - 
-                    ( ( currentHr * HOUR_VALUE_IN_SECONDS  ) + ( currentMin * HOUR_VALUE_IN_MINUTES ) + currentSec );
-        }
-        else
-        {
-           timeDifference = ( 24 * HOUR_VALUE_IN_SECONDS - ( 
-                    ( currentHr * HOUR_VALUE_IN_SECONDS ) + ( currentMin * HOUR_VALUE_IN_MINUTES ) + currentSec ) )  +
-                    targetTimeInSeconds ;
-        }
-        
-        //Add the time difference to current time to set the target time ( 3.00 AM )
-        TTimeIntervalSeconds interval( timeDifference );
-        TTime timeToSet;
-        timeToSet.HomeTime();
-        timeToSet+= interval;
-        
-        At( timeToSet );
-    }
-    MYLOCLOGSTRING ("CLocationGeoTagTimerAO::StartTimer(), end");
-}
-
-
-// --------------------------------------------------------------------------
-// CLocationGeoTagTimerAO::RunL
-// --------------------------------------------------------------------------
-//
-void CLocationGeoTagTimerAO::RunL( )
-{
-    MYLOCLOGSTRING ("CLocationGeoTagTimerAO::RunL(), begin");
-    TInt status = iStatus.Int();
-    
-    switch( status )
-    {
-        case KErrNone:
-            //Trigger the reverse geocoding and start the timer again
-            //Create the instance of geotagger class
-            iTimerObserver->MyLocationThreeAMTimerExpiredL();
-            
-            break;
-        default:
-            StartTimer();
-            break;
-    }
-    MYLOCLOGSTRING ( "CLocationGeoTagTimerAO::RunL(), end" );
-}
-
-// End of file
-
--- a/locationdataharvester/mylocationsengine/src/mylocationsengine.cpp	Tue Aug 31 15:09:25 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1829 +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: Mylocation engine source implementation for location picker
-*              and maptile service.
-*
-*/
-
-// INCLUDE FILES
-#include <QFile>
-#include <f32file.h>
-#include <calchangecallback.h> 
-#include <cntitem.h>
-#include <cntfldst.h>
-#include <EPos_CPosLmDatabaseManager.h>
-#include <lbsposition.h>
-#include <bautils.h>
-#include <f32file.h>
-#include <locationservicedefines.h>
-#include <e32property.h>
-#include "contactsubscriber.h"
-#include "calendarsubscriber.h"
-#include "mylocationsengine.h"
-#include "geocodeupdate.h" //header for GeocodeUpdate class
-//handle for CMyLocationsHistoryDbObserver class
-#include "mylocationlogger.h"
-#if ( defined __WINSCW__ ) || ( defined __WINS__ )
-_LIT ( KImageStorageDrive, "C:\\MapTile\\");
-#endif
-_LIT(KFolderName,":\\MapTile\\");
-const TInt KImagePathSize=36;
-const TInt KDefaultFilePathSize = 20;
-const TUid KMaptileStatusPublish={0x2002680A};
-enum TMaptileStatusKeys {EMaptileStatusInteger=0x1};
-
-//Protocol : [appid-addresstype-maptilestatus]
-_LIT8( KMaptileStatusFormat, "%d-%d-%d" );
-const TInt KProtocolBufferSize = 16;
-
-const QString KSpace(" ");
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-CMyLocationsEngine* CMyLocationsEngine::NewL()
-{
-    CMyLocationsEngine* self = new (ELeave) CMyLocationsEngine();
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    CleanupStack::Pop(self);
-    return self;
-}
-
-// -----------------------------------------------------------------------------
-// CMyLocationsEngine::ConstructL()
-// Symbian 2nd phase constructor can leave.
-// -----------------------------------------------------------------------------
-//
-void CMyLocationsEngine::ConstructL()
-{
-    __TRACE_CALLSTACK;
-    CActiveScheduler::Add(this);
-
-    //Connection to Landmark DB
-    iLandmarkDb = CPosLandmarkDatabase::OpenL();
-    ExecuteAndDeleteLD(iLandmarkDb->InitializeL());
-
-    MYLOCLOGSTRING("Connection to Landmark DB.");
-    // create CMyLocationsDatabaseManager instance
-    iMyLocationsDatabaseManager = new (ELeave) CMyLocationsDatabaseManager;
-    iMyLocationsDatabaseManager->ConstructL();
-    
-    MYLOCLOGSTRING("create CMyLocationsDatabaseManager instance");
-
-    TRAPD( error , iMapTileInterface = CMapTileInterface::NewL());
-    if( error == KErrNone )
-    {
-        iMaptileGeocoderPluginAvailable = ETrue;	
-    }
-    
-    MYLOCLOGSTRING("iMapTileInterface = CMapTileInterface::NewL()");
-    //Maptile Db instance
-    iMaptileDatabase = CLookupMapTileDatabase::NewL(KMapTileLookupDatabaseName);
-
-    MYLOCLOGSTRING("Maptile Db instance created ");
-	
-    iGeocodeUpdate = new GeocodeUpdate();
-    iMyLocationThreeAMTimer = CLocationGeoTagTimerAO::NewL(*this);
-  
-    iMyLocationThreeAMTimer->StartTimer();
-    
-    MYLOCLOGSTRING(" iMyLocationThreeAMTimer = CLocationGeoTagTimerAO::NewL(this)");
-  
-    //Create instance of contact manager 
-    iContactManager = new QContactManager();
-
-    MYLOCLOGSTRING(" start contact db observation ");
-    StartContactsChangeNotifierL();
-
-    //set the folder path to store maptile
-    imageFilePath.Zero();
-    SetFolderPathL();
-
-    TInt status = KErrNone;
-    iCalSession = CCalSession::NewL();
-    NotifyChangeL(status);
-
-    // Start listening to landmarks db changes
-    StartLandmarksChangeNotifier();   
-    iContactSubscriber = CContactSubscriber::NewL(this);
-    iCalendarSubscriber = CCalendarSubscriber::NewL(this);
-    TInt ret = RProperty::Define( KMaptileStatusPublish, EMaptileStatusInteger, RProperty::EByteArray  );
-
-}
-// -----------------------------------------------------------------------------
-// CMyLocationsEngine::SetFolderPath()
-// set folder path structure
-// -----------------------------------------------------------------------------
-//
-void CMyLocationsEngine::SetFolderPathL()
-{
-    __TRACE_CALLSTACK;
-    RFs session;
-    User::LeaveIfError(session.Connect());
-   
-    if ( imageFilePath.Length() > 0 && BaflUtils::FolderExists(session, imageFilePath))
-    {
-        session.Close();
-        MYLOCLOGSTRING("Image folder path exists");
-        return;
-    }
-    const TUint EMediaMemoryCard = 0x000014;
-    imageFilePath.Zero();
-#if ( defined __WINSCW__ ) || ( defined __WINS__ )
-    imageFilePath.Copy(KImageStorageDrive);
-    MYLOCLOGSTRING("using in  debug mode");
-#else        
-    TVolumeInfo vol;
-    TInt driveNumber = EDriveE;
-    TChar driveLetter;
-    TDriveInfo driveInfo;
-    TInt error( KErrNone );
-    error=session.Volume(vol, driveNumber);
-    MYLOCLOGSTRING1("E drive volume info status -%d",error);
-    if (error == KErrNone)
-    {
-        error = session.Drive(driveInfo, driveNumber);
-        MYLOCLOGSTRING1("E driveinfo status -%d",error);
-        switch(driveInfo.iType)
-        {
-            case EMediaFlash:
-            case EMediaHardDisk:
-            case EMediaNANDFlash:
-            case EMediaMemoryCard:
-            case EMediaCdRom:
-            {
-                MYLOCLOGSTRING(" E drive match case");
-                session.DriveToChar( driveNumber , driveLetter );
-                imageFilePath.Append(driveLetter);
-                imageFilePath.Append(KFolderName);
-                break;
-            }
-            default:
-            break;
-
-        };
-    }
-
-    if (!imageFilePath.Length() > 0)
-    {
-        driveNumber = EDriveF;
-        error = session.Volume(vol, driveNumber);
-        MYLOCLOGSTRING1("F drive volume info status -%d",error);
-
-        if (error == KErrNone)
-        {
-            error = session.Drive(driveInfo, driveNumber);
-            MYLOCLOGSTRING1("F drive info status-%d", error);
-
-            switch (driveInfo.iMediaAtt)
-            {
-                /** Solid-state media. */
-                case EMediaFlash:
-                case EMediaHardDisk:
-                case EMediaNANDFlash:
-                case EMediaMemoryCard:
-                {
-                    MYLOCLOGSTRING("F drive exist as this type");
-                    session.DriveToChar(driveNumber, driveLetter);
-                    imageFilePath.Append(driveLetter);
-                    imageFilePath.Append(KFolderName);
-                    break;
-                }
-
-                default:
-                break;
-
-            };
-        }
-    }
-#endif
-    if (imageFilePath.Length()>0 && !BaflUtils::FolderExists(session, imageFilePath))
-    {
-        session.MkDirAll(imageFilePath);
-        MYLOCLOGSTRING("folder path does not exist , created ");
-    }
-    session.Close();
-}
-// -----------------------------------------------------------------------------
-// CMyLocationsEngine::CMyLocationsEngine()
-// C++ default constructor can NOT contain any code, that might leave.
-// -----------------------------------------------------------------------------
-//
-CMyLocationsEngine::CMyLocationsEngine() :
-            CActive(EPriorityStandard), 
-            iCalSession(NULL),
-            iCalView(NULL), 
-	        iContactsDb(NULL), 
-	        iContactChangeNotifier(NULL), 
-			iLandmarkDb(NULL),
-            iMapTileInterface(NULL),
-            iMyLocationsDatabaseManager(NULL),
-            iMaptileDatabase(NULL),
-            iMyLocationThreeAMTimer(NULL),
-            iMaptileGeocoderPluginAvailable(EFalse),
-            iCalenderNotification(NULL),
-            iContactManager(NULL),
-            iContactSubscriber(NULL),
-            iCalendarSubscriber(NULL),
-            iGeocodeUpdate(NULL),
-            iLastContactId( -1 ) ,
-            iLastCalendarId( 0 )
-{
-
-}
-
-// -----------------------------------------------------------------------------
-// CMyLocationsEngine::~CMyLocationsEngine()
-// Destructor.
-// -----------------------------------------------------------------------------
-//
-CMyLocationsEngine::~CMyLocationsEngine()
-{
-    __TRACE_CALLSTACK;// delete the member variables.
-   
-    Cancel();
-    
-    delete iContactChangeNotifier;
-
-    delete iMyLocationsDatabaseManager;
-
-    delete iLandmarkDb;
-
-    delete iContactsDb;
-   
-    delete iCalView;
-	
-    delete iCalSession;
-	 
-	delete iMapTileInterface;
-
-    delete iMaptileDatabase;
-       
-    delete iCalenderNotification;
-    
-	delete iMyLocationThreeAMTimer;
-		
-    delete iContactManager;
-    
-    delete iContactSubscriber;
-
-    delete iCalendarSubscriber;
-    
-    delete iGeocodeUpdate;
-    
-    for( TInt index = 0; index < iAddressInfo.Count(); index++ )
-    {
-        delete iAddressInfo[index];
-        iAddressInfo.Remove(index);
-        iAddressInfo.Compress();
-    }
-    
-    iAddressInfo.Reset();
-    
-}
-
-// -----------------------------------------------------------------------------
-// CMyLocationsEngine::NotifyChangeL()
-// Starts calender db create notification to get callbacks. 
-// -----------------------------------------------------------------------------
-//
-void CMyLocationsEngine::NotifyChangeL(TInt &aStatus)
-{
-    __TRACE_CALLSTACK;
-    
-    TBufC<KDefaultFilePathSize> defaultFile = iCalSession->DefaultFileNameL();
-    TChar drive = defaultFile[0];    
-    TRAP(aStatus, iCalSession->OpenL( defaultFile ));
-    MYLOCLOGSTRING1("iCalSession->OpenL() status-%d",aStatus);
-    if ( KErrNone == aStatus )
-    {
-        // create a calendar entry view with the opened session
-        iCalView = CCalEntryView::NewL(*iCalSession);
-        StartCalenderChangeNotifierL();
-    }
-    else
-    {
-        if( !iCalenderNotification )
-        {
-            iCalenderNotification = CCalenderNotification::NewL( this );
-        }
-        
-        
-        iCalenderNotification->CheckCalenderDbFileStructure( drive );
-    }
-}
-// -----------------------------------------------------------------------------
-// CMyLocationsEngine::GetChangeNoficationL()
-// To get callbacks through publisher from contact context
-// -----------------------------------------------------------------------------
-//
-void CMyLocationsEngine::GetChangeNotificationL( TInt &aId, TInt& addressType, TInt& addressCount  )
-{
-    __TRACE_CALLSTACK;
-   
-    iLastContactId = aId;
-    
-    //If the requested id is already in queue, just return
-    for( TInt index = 0 ; index < iMapTileRequestQueue.Count(); index++ )
-    {
-        if( iLastContactId == iMapTileRequestQueue[index]->iUId )
-        {           
-            MYLOCLOGSTRING("contact id is in queue");
-            return;
-        }
-    }
-    
-    TAppAddressInfo* addressInfo = new (ELeave) TAppAddressInfo;
-    addressInfo->iUid = aId;
-    addressInfo->iAddressType =  addressType;
-    //Memory will be freed when the queue is deleted
-    if( iAddressInfo.Append(addressInfo) != KErrNone )
-    {
-        delete addressInfo;
-    }
-    
-    //Get all 3 adress
-    if( addressCount > 1 && iAddressInfo.Count() < addressCount )
-        return;  
-    
-    
-    for( TInt index = 0; index < iAddressInfo.Count(); index++ )
-    {
-        TUidSourceType type = static_cast<TUidSourceType>(iAddressInfo[index]->iAddressType );
-    
-        //if type is contact
-        if( type == ESourceContactsPref || type == ESourceContactsWork || 
-                      type == ESourceContactsHome )
-        {
-            QContact contactInfo = iContactManager->contact( iAddressInfo[index]->iUid );
-            
-            CPosLandmark *contactAddressLm = NULL;
-          
-            TInt itemCount = 0;
-            
-            foreach ( QContactAddress address, contactInfo.details<QContactAddress>() )
-            {
-                QStringList context = address.contexts();
-                if ( context.isEmpty()  && type ==  ESourceContactsPref ) // no context
-                {
-                    contactAddressLm = GetContactAddressDetailsLC( address );
-                    itemCount++;
-                    break;
-                }
-                else if ( !context.isEmpty() && context.first() == QContactAddress::ContextHome &&
-                                    type == ESourceContactsHome )
-                {
-                    contactAddressLm = GetContactAddressDetailsLC( address );
-                    itemCount++;
-                    break;
-                }
-                else if ( !context.isEmpty() && context.first() == QContactAddress::ContextWork  && 
-                                type == ESourceContactsWork )
-                {
-                    contactAddressLm = GetContactAddressDetailsLC( address );
-                    itemCount++;
-                    break;
-                }
-            }
-
-            //Update the entry with inprogress status
-            TLookupItem lookupItem;
-            lookupItem.iUid = iAddressInfo[index]->iUid;
-            lookupItem.iSource = type;
-            lookupItem.iFilePath.Zero();
-            lookupItem.iFetchingStatus = EMapTileFetchingInProgress;
-            iMaptileDatabase->UpdateEntryL( lookupItem );
-            
-            //Request for maptile fetching
-            if( contactAddressLm )
-            {
-                RequestMapTileImageL( *contactAddressLm, type, 
-                         iAddressInfo[index]->iUid, EContactDbObserverEventContactChanged );
-            }
-            
-            CleanupStack::PopAndDestroy( itemCount );
-        }
-    }
-    for( TInt index = 0; index < iAddressInfo.Count(); index++ )
-    {
-	    //free the allocated memory
-        delete iAddressInfo[index];
-		iAddressInfo.Remove(index);
-        iAddressInfo.Compress();
-	}
-    
-    iAddressInfo.Reset();
-}
-
-// -----------------------------------------------------------------------------
-// CMyLocationsEngine::SubscribeFromCalendarL()
-// To get callbacks through publisher from calendar context
-// -----------------------------------------------------------------------------
-//
-void CMyLocationsEngine::SubscribeFromCalendarL(TInt aId)
-{
-    __TRACE_CALLSTACK;
-    iLastCalendarId = aId;
-    for ( int index =0;iMapTileRequestQueue.Count()>index ;index++)
-    {
-        if( iLastCalendarId == iMapTileRequestQueue[index]->iUId )
-        {            
-            return;
-        }
-    }
-    
-    CCalEntry* calEntry = NULL;
-    calEntry = iCalView->FetchL(aId);
-    CleanupStack::PushL(calEntry);
-    TPtrC address(calEntry->LocationL());
-    if( address.Length()>0 )
-    {
-        TLookupItem lookupItem;
-        lookupItem.iUid = aId;
-        lookupItem.iSource = ESourceCalendar;
-        lookupItem.iFilePath.Zero();
-        lookupItem.iFetchingStatus = EMapTileFetchingInProgress;
-        iMaptileDatabase->UpdateEntryL( lookupItem );
-        RequestMapTileImageL( address, ESourceCalendar, aId , EChangeModify );
-    }
-    CleanupStack::PopAndDestroy(calEntry);
-}
-// -----------------------------------------------------------------------------
-// CMyLocationsEngine::StartCalenderChangeNotifierL()
-// Starts calender change notification method to get callbacks when entries are 
-// added/modified/deleted in contacts
-// -----------------------------------------------------------------------------
-//
-void CMyLocationsEngine::StartCalenderChangeNotifierL()
-{
-    __TRACE_CALLSTACK;// Get the current time and set Calendar filter to consider entries whose start time
-    // fall under the timeframe one year past and one year ahead of the current time.
-    if (iCalSession)
-    {
-        MYLOCLOGSTRING("iCalSession is not null");
-        TTime currentTime;
-        currentTime.HomeTime();
-
-        TTime startTime = currentTime - TTimeIntervalYears(1);
-        TTime endTime = currentTime + TTimeIntervalYears(1);
-
-        TCalTime calStartTime;
-        calStartTime.SetTimeLocalL(startTime);
-        
-        MYLOCLOGSTRING("SetTimeLocalL(startTime)");
-
-        TCalTime calEndTime;
-        calEndTime.SetTimeLocalL(endTime);
-        
-        MYLOCLOGSTRING("SetTimeLocalL(endTime)");
-
-        // set the filter for modification tracking
-        CCalChangeNotificationFilter *filter =
-                CCalChangeNotificationFilter::NewL(
-                        MCalChangeCallBack2::EChangeEntryAll, ETrue,
-                        CalCommon::TCalTimeRange(calStartTime, calEndTime));
-        MYLOCLOGSTRING(" CCalChangeNotificationFilter::NewL()");
-        // 'this' object implements MCalChangeCallBack
-        iCalSession->StartChangeNotification(*this, *filter);
-    }
-}
-
-// -----------------------------------------------------------------------------
-// CMyLocationsEngine::StartContactsChangeNotifierL()
-// Starts contacts change notification method to get callbacks when entries are 
-// added/modified/deleted in contacts
-// -----------------------------------------------------------------------------
-//
-void CMyLocationsEngine::StartContactsChangeNotifierL()
-{
-    __TRACE_CALLSTACK;
-   
-    iGeocodeUpdate->createContactdb();
-    iContactsDb = CContactDatabase::OpenL();
-    // Create CContactChangeNotifier object with 'this' object. 
-    iContactChangeNotifier = CContactChangeNotifier::NewL(*iContactsDb,this);
-}
-
-// -----------------------------------------------------------------------------
-// CMyLocationsEngine::StartLandmarksChangeNotifier()
-// Starts landmarks change notification method to get callbacks when entries are added/modified/deleted in landmarks
-// -----------------------------------------------------------------------------
-//
-void CMyLocationsEngine::StartLandmarksChangeNotifier()
-{
-    __TRACE_CALLSTACK;// Resume event listening
-    iLandmarkDb->NotifyDatabaseEvent(iLmEvent, iStatus);
-    SetActive();
-}
-
-// -----------------------------------------------------------------------------
-// CMyLocationsEngine::CalChangeNotification()
-// Callback when there is a change in the calendar database.
-// -----------------------------------------------------------------------------
-//
-
-void CMyLocationsEngine::CalChangeNotification(
-        RArray<TCalChangeEntry>& aChangeItems)
-{
-    __TRACE_CALLSTACK;
-       
-    if(iCalenderNotification)
-    {
-        delete iCalenderNotification;
-        iCalenderNotification = NULL;
-    }
-    
-    // get entries associated with this UID
-    for (int i = 0; i < aChangeItems.Count(); i++)
-    {
-
-        // Check if this is some undefined change in calendar db. 
-        if( aChangeItems[0].iChangeType == EChangeUndefined && aChangeItems[0].iEntryType == EChangeEntryAll )
-        {
-            // Refresh the calendar related entries in the location and maptiledb.
-            RefreshCalendarEntryListL();
-            break;
-        }
-        TCalChangeEntry calChangeEntry = aChangeItems[i];
-        iEventType = calChangeEntry.iChangeType;
-        switch (calChangeEntry.iChangeType)
-        {
-        case EChangeAdd:
-        {
-            
-            TRAP_IGNORE(CalenderEntryAddedL(calChangeEntry));
-            break;
-        }
-
-        case EChangeModify:
-        {
-            if (iMapTileRequestQueue.Count() > 0)
-            {
-                if (calChangeEntry.iEntryId == iMapTileRequestQueue[0]->iUId)
-                {
-                    return;
-                }
-            }
-            TRAP_IGNORE( CalenderEntryModifyL(calChangeEntry) ) ;
-            break;
-        }
-        case EChangeDelete:
-        {
-            TLookupItem lookupItem;
-            lookupItem.iSource = ESourceCalendar;
-            lookupItem.iUid = calChangeEntry.iEntryId;
-            TRAP_IGNORE(ManipulateMapTileDataBaseL(lookupItem));           
-            TRAP_IGNORE( UpdateDatabaseL( NULL, 
-                              calChangeEntry.iEntryId, ESourceCalendar, EEntryDeleted ) );
-            break;
-        }
-        };
-
-    }
-}
-
-// -----------------------------------------------------------------------------
-// CMyLocationsEngine::RefreshCalendarEntryListL()
-// -----------------------------------------------------------------------------
-//
-void CMyLocationsEngine::RefreshCalendarEntryListL()
-{
-    //Get all the calendar ids and check its validity. 
-    //Delete if they are no more valid.
-    RArray<TUint32> ids;
-    iMaptileDatabase->GetAllCalendarIdsL( ids );
-    for( TInt i = 0; i < ids.Count(); i++ )
-    {
-        if( !IsCalendarEntryValidL( ids[i] ) )
-        {
-            TLookupItem lookupItem;
-            lookupItem.iSource = ESourceCalendar;
-            lookupItem.iUid = ids[i];
-            TRAP_IGNORE( ManipulateMapTileDataBaseL( lookupItem ) );           
-            TRAP_IGNORE( UpdateDatabaseL( NULL, 
-                    ids[i], ESourceCalendar, EEntryDeleted ) );
-        
-        }        
-    }
-}
-
-// -----------------------------------------------------------------------------
-// CMyLocationsEngine::IsCalendarEntryValidL()
-// -----------------------------------------------------------------------------
-//
-TBool CMyLocationsEngine::IsCalendarEntryValidL( TUint32 aId )
-{
-    return ( ( iCalView->FetchL( aId ) == NULL ) ? EFalse:ETrue );
-}
-// -----------------------------------------------------------------------------
-// CMyLocationsEngine::CalenderEntryAddedL()
-// -----------------------------------------------------------------------------
-//
-void CMyLocationsEngine::CalenderEntryAddedL(TCalChangeEntry aCalChangeEntry)
-{
-    __TRACE_CALLSTACK;
-    
-    TUint32 entryId=0;
-    entryId=aCalChangeEntry.iEntryId;
-    //create entry in the data base and maintain a fetching state.
-    TLookupItem lookupItem;
-    lookupItem.iUid = entryId ;
-    lookupItem.iSource = ESourceCalendar;
-    lookupItem.iFilePath.Zero();
-    lookupItem.iFetchingStatus = EMapTileFetchingInProgress;     
-    TRAP_IGNORE( iMaptileDatabase->CreateEntryL(lookupItem) );
-    CCalEntry* calEntry = NULL;
-    calEntry = iCalView->FetchL( entryId );
-    CleanupStack::PushL(calEntry);
-    TPtrC address(calEntry->LocationL());     
-    if (address.Length() > 0)
-    {
-        RequestMapTileImageL( address, ESourceCalendar, entryId , EChangeAdd );
-    }  
-    CleanupStack::PopAndDestroy(calEntry);
-}
-
-// -----------------------------------------------------------------------------
-// CMyLocationsEngine::CalenderEntryModifyL()
-// -----------------------------------------------------------------------------
-//
-void CMyLocationsEngine::CalenderEntryModifyL(TCalChangeEntry aCalChangeEntry)
-{
-    __TRACE_CALLSTACK;
-    TUint32 entryId = 0;
-    entryId = aCalChangeEntry.iEntryId;
-    TLookupItem lookupItem;
-    lookupItem.iSource = ESourceCalendar;
-    lookupItem.iUid = entryId;
-    CCalEntry* calEntry = NULL;
-    calEntry = iCalView->FetchL(entryId);
-    CleanupStack::PushL(calEntry);
-    if(iGeocodeUpdate->isGeocodeNotAvailable(entryId))
-    {        
-        TPtrC address(calEntry->LocationL());
-        if (iMyLocationsDatabaseManager->CheckIfAddressChanged(address, entryId,
-                ESourceCalendar))
-        {
-            lookupItem.iFilePath.Zero();
-            lookupItem.iFetchingStatus = EMapTileFetchingInProgress;
-            TRAP_IGNORE( iMaptileDatabase->ReSetEntryL(lookupItem) );
-            if (address.Length() > 0)
-            {
-                RequestMapTileImageL(address, ESourceCalendar, entryId , EChangeModify);
-            }
-            else
-            {
-                UpdateDatabaseL(NULL, entryId, ESourceCalendar, EEntryDeleted);
-            }
-            if ( lookupItem.iFilePath.Length() > 0 )
-            {
-                iMaptileDatabase->DeleteMapTileL(lookupItem);
-            }
-    
-        }        
-    }   
-    CleanupStack::PopAndDestroy(calEntry);
-}
-
-// -----------------------------------------------------------------------------
-// CMyLocationsEngine::HandleDatabaseEventL()
-// Callback that provides information about the contact database change event.
-// -----------------------------------------------------------------------------
-//
-void CMyLocationsEngine::HandleDatabaseEventL(TContactDbObserverEvent aEvent)
-{
-    __TRACE_CALLSTACK;
-    
-    //Forward the event for maptile fetching only if maptile plugin available
-    if( iMaptileGeocoderPluginAvailable )
-    {
-        TriggerMaptileRequestL(aEvent);
-    }
-}
-
-
-// -----------------------------------------------------------------------------
-// CMyLocationsEngine::TriggerMaptileRequestL()
-// Process the contact address information for fetching maptile.
-// -----------------------------------------------------------------------------
-//
-void CMyLocationsEngine::TriggerMaptileRequestL(TContactDbObserverEvent& aEvent)
-{
-    __TRACE_CALLSTACK;
-    TLookupItem lookupItem;      
-    lookupItem.iUid = aEvent.iContactId;
-    // If contact is deleted delete from mylocations db
-    if ( aEvent.iType == EContactDbObserverEventContactDeleted || aEvent.iType == EContactDbObserverEventOwnCardDeleted )
-    {        
-        //Delete the entries from maptile database
-        lookupItem.iSource = ESourceContactsPref;
-        TRAP_IGNORE( ManipulateMapTileDataBaseL(lookupItem));
-
-        lookupItem.iSource = ESourceContactsWork;
-        TRAP_IGNORE( ManipulateMapTileDataBaseL(lookupItem));
-        
-        lookupItem.iSource = ESourceContactsHome;
-        TRAP_IGNORE( ManipulateMapTileDataBaseL(lookupItem));
-              
-        // Delete entries from  mylocation database
-        TRAP_IGNORE( UpdateDatabaseL( NULL, aEvent.iContactId,
-                     ESourceContactsPref, EEntryDeleted ));
-       
-        TRAP_IGNORE( UpdateDatabaseL( NULL, aEvent.iContactId,
-               ESourceContactsHome, EEntryDeleted ));
-
-        TRAP_IGNORE( UpdateDatabaseL( NULL, aEvent.iContactId,
-                               ESourceContactsWork, EEntryDeleted ) );  
-        
-        MYLOCLOGSTRING("EContactDbObserverEventContactDeleted ");
-        return;
-    }
-
-    //Get the contact item
-    iEventType = aEvent.iType;
-    QContact contactInfo = iContactManager->contact( aEvent.iContactId );            
-    CPosLandmark *preferedAddressLm = NULL;
-    CPosLandmark *workAddressLm = NULL;
-    CPosLandmark *homeAddressLm = NULL;
-    
-    TInt itemCount = 0;
-    
-    foreach ( QContactAddress address, contactInfo.details<QContactAddress>() )
-    {
-        QStringList context = address.contexts();
-        if ( context.isEmpty() ) // no context
-        {
-            preferedAddressLm = GetContactAddressDetailsLC( address );
-            itemCount++;
-        }
-        else if ( context.first() == QContactAddress::ContextHome  )
-        {
-            homeAddressLm = GetContactAddressDetailsLC( address );
-            itemCount++;
-        }
-        else if ( context.first() == QContactAddress::ContextWork )
-        {
-            workAddressLm = GetContactAddressDetailsLC( address );
-            itemCount++;
-        }
-    }
-   
-    switch (aEvent.iType)
-    {
-        case EContactDbObserverEventContactChanged:
-        case EContactDbObserverEventOwnCardChanged:
-        {
-            MYLOCLOGSTRING("EContactDbObserverEventContactChanged" );
-            MYLOCLOGSTRING1("iMapTileRequestQueue.Count()-%d",iMapTileRequestQueue.Count() );
-
-            if (iMapTileRequestQueue.Count() > 0)
-            {
-                if (iMapTileRequestQueue[0]->iUId == aEvent.iContactId)
-                {
-                    CleanupStack::PopAndDestroy( itemCount );
-                    MYLOCLOGSTRING("retrun from geolocation callback" );
-                    return;
-                }
-            }
-
-            TBuf<KBufSize> landmarkName;
-            GetContactName(aEvent.iContactId,landmarkName);
-
-            // if default address available, update Mylocations. 
-            lookupItem.iSource = ESourceContactsPref;
-            if (preferedAddressLm)
-            {
-                iMyLocationsDatabaseManager->UpdateEntryName( aEvent.iContactId, ESourceContactsPref, 
-                                     landmarkName );
-                MYLOCLOGSTRING("preferedAddressLm address changed" );
-
-                if ( iMyLocationsDatabaseManager->CheckIfAddressChanged(*preferedAddressLm,
-                    aEvent.iContactId, ESourceContactsPref) )
-
-                {
-                    lookupItem.iFilePath.Zero();
-                    lookupItem.iFetchingStatus = EMapTileFetchingInProgress;
-                    TRAP_IGNORE( iMaptileDatabase->ReSetEntryL(lookupItem) );
-                    
-                    RequestMapTileImageL(*preferedAddressLm, ESourceContactsPref,
-                            aEvent.iContactId, iEventType );
-
-                    if ( lookupItem.iFilePath.Length() > 0 )
-                    {
-                        iMaptileDatabase->DeleteMapTileL(lookupItem);
-                    }
-                    
-                }
-            }
-            else
-            {
-            	TRAP_IGNORE( UpdateDatabaseL( NULL, aEvent.iContactId,
-                     ESourceContactsPref, EEntryDeleted ));
-                TRAP_IGNORE( ManipulateMapTileDataBaseL(lookupItem));
-                
-            }
-            
-            // if home address available, update Mylocations.
-            lookupItem.iSource = ESourceContactsHome;
-            if (homeAddressLm)
-            {
-                iMyLocationsDatabaseManager->UpdateEntryName( aEvent.iContactId, ESourceContactsHome, 
-                                     landmarkName );
-                MYLOCLOGSTRING("homeAddressLm address changed" );
-                if ( iMyLocationsDatabaseManager->CheckIfAddressChanged(*homeAddressLm,
-                        aEvent.iContactId, ESourceContactsHome) )
-                {
-                    lookupItem.iFilePath.Zero();
-                    lookupItem.iFetchingStatus = EMapTileFetchingInProgress;
-                    TRAP_IGNORE( iMaptileDatabase->ReSetEntryL(lookupItem) )
-                    //remove entry from databse                    
-                    RequestMapTileImageL(*homeAddressLm, ESourceContactsHome, aEvent.iContactId,
-                        iEventType);
-                    if (lookupItem.iFilePath.Length() > 0) 
-                    {
-                        iMaptileDatabase->DeleteMapTileL(lookupItem);
-                    }                 
-                }
-            }
-            else
-            {
-                TRAP_IGNORE( UpdateDatabaseL( NULL, aEvent.iContactId,
-                     ESourceContactsHome, EEntryDeleted ));            
-                TRAP_IGNORE( ManipulateMapTileDataBaseL(lookupItem));
-                
-            }
- 
-
-            // if work address available, update Mylocations.
-            lookupItem.iSource = ESourceContactsWork;
-            if (workAddressLm)
-            {
-            	  iMyLocationsDatabaseManager->UpdateEntryName( aEvent.iContactId, ESourceContactsWork, 
-                                     landmarkName );
-
-                MYLOCLOGSTRING("workAddressLm address changed" );
-                if ( iMyLocationsDatabaseManager->CheckIfAddressChanged(*workAddressLm,
-                        aEvent.iContactId, ESourceContactsWork) )
-                {
-                    lookupItem.iFilePath.Zero();
-                    lookupItem.iFetchingStatus = EMapTileFetchingInProgress;
-                    TRAP_IGNORE( iMaptileDatabase->ReSetEntryL(lookupItem) )
-
-                    RequestMapTileImageL(*workAddressLm, ESourceContactsWork,
-                            aEvent.iContactId, iEventType);
-                    if (lookupItem.iFilePath.Length() > 0) 
-                    {
-                        iMaptileDatabase->DeleteMapTileL(lookupItem);
-                    }
-                } 
-            }
-            else
-            {
-                TRAP_IGNORE( UpdateDatabaseL( NULL, aEvent.iContactId,
-                     ESourceContactsWork, EEntryDeleted ));            
-                TRAP_IGNORE( ManipulateMapTileDataBaseL(lookupItem));
-               
-            }
-            break;
-        }    
-        case EContactDbObserverEventContactAdded:
-        {
-            TLookupItem lookupItem;
-            lookupItem.iUid = aEvent.iContactId;
-            lookupItem.iFilePath.Zero();
-            lookupItem.iFetchingStatus = EMapTileFetchingInProgress;
-            
-            MYLOCLOGSTRING("EContactDbObserverEventContactAdded" );
-            if (preferedAddressLm)
-            {
-                //create entry in the data base and maintain a fetching state.
-                lookupItem.iSource = ESourceContactsPref;
-                iMaptileDatabase->CreateEntryL(lookupItem);
-                RequestMapTileImageL(*preferedAddressLm, ESourceContactsPref,
-                        aEvent.iContactId, iEventType);
-            }
-            if (homeAddressLm)
-            {
-                lookupItem.iSource = ESourceContactsHome;
-                iMaptileDatabase->CreateEntryL(lookupItem);
-                RequestMapTileImageL(*homeAddressLm, ESourceContactsHome,
-                        aEvent.iContactId, iEventType);
-            }
-            if (workAddressLm)
-            {
-                lookupItem.iSource = ESourceContactsWork;
-                iMaptileDatabase->CreateEntryL(lookupItem);
-                RequestMapTileImageL(*workAddressLm, ESourceContactsWork,
-                        aEvent.iContactId, iEventType);
-            }
-            break;
-        }
-
-    }
- 
-    CleanupStack::PopAndDestroy( itemCount );
-
-}
-
-
-// -----------------------------------------------------------------------------
-// CMyLocationsEngine::RequestMapTileImageL()
-// Request to get maptiel
-// -----------------------------------------------------------------------------
-//
-void CMyLocationsEngine::RequestMapTileImageL(const TDesC& aAddressDetails,
-        const TUidSourceType aAddressType, const TInt32 aUId ,const TInt aEventType)
-{
-    __TRACE_CALLSTACK;
-    SetFolderPathL();
-    TBuf<KImagePathSize> mImagePath;
-    mImagePath.Copy(imageFilePath);
- 
-
-    CMapTileRequest* mapTileRequest = new (ELeave) CMapTileRequest;
-
-    mapTileRequest->iAddressDetails = aAddressDetails.AllocL();
-    mapTileRequest->iUId = aUId;
-    mapTileRequest->iAddressType = aAddressType;
-    mapTileRequest->iEventType = aEventType;
-    mapTileRequest->iImagePath.Zero();
-    mapTileRequest->iImagePath.Copy(mImagePath);
-    
-    TInt error = KErrNone;
-    
-    if (iMapTileRequestQueue.Count() <= 0)
-    {
-        error = iMapTileRequestQueue.Append(mapTileRequest);
-        if ( KErrNone == error )
-        {
-            error = RequestExecute(mapTileRequest);    
-        }
-    }
-    else
-    {
-        MYLOCLOGSTRING("Added one more request to request queue" );
-        error = iMapTileRequestQueue.Append(mapTileRequest);
-    }
-    
-    //If any error , free the allocated memory
-    if( error != KErrNone )
-    {
-        delete mapTileRequest;
-    }
-    
-}
-// -----------------------------------------------------------------------------
-// CMyLocationsEngine::RequestMapTileImageL()
-// Request to get maptiel
-// -----------------------------------------------------------------------------
-//
-void CMyLocationsEngine::RequestMapTileImageL(CPosLandmark& aLandmark,
-                    const TUidSourceType aAddressType, const TInt32 aUId,
-                    const TInt aEventType )
-{
-    __TRACE_CALLSTACK;
-
-    MYLOCLOGSTRING("check folder path existance!");
-    SetFolderPathL();
- 
-
-    CMapTileRequest* mapTileRequest = new (ELeave) CMapTileRequest;
-
-    mapTileRequest->iLandmarkInfo = CPosLandmark::NewL(aLandmark);
-    mapTileRequest->iUId = aUId;
-    mapTileRequest->iAddressType = aAddressType;
-    mapTileRequest->iEventType = aEventType;
-    mapTileRequest->iImagePath.Zero();
-    mapTileRequest->iImagePath.Copy(imageFilePath);
-    MYLOCLOGSTRING1("RequestMapTileImageL() Queue count -%d",iMapTileRequestQueue.Count());
-
-    TInt error = KErrNone;
-    
-    if (iMapTileRequestQueue.Count() <= 0)
-       {
-           error = iMapTileRequestQueue.Append(mapTileRequest);
-           //error = RequestExecute(mapTileRequest);
-           if( KErrNone == error  )
-           {
-               //error = iMapTileRequestQueue.Append(mapTileRequest);
-               error = RequestExecute(mapTileRequest);
-           }
-  
-       }
-       else
-       {
-           MYLOCLOGSTRING("Added one more request to request queue" );
-           error = iMapTileRequestQueue.Append(mapTileRequest);
-       }
-    
-       //If any error, free the memory allocated
-       if( error != KErrNone )
-       {
-           delete mapTileRequest;
-       }
-}
-
-// -----------------------------------------------------------------------------
-// CMyLocationsEngine::RequestExecute()
-// Executes the maptile image processing request
-// -----------------------------------------------------------------------------
-//
-TInt CMyLocationsEngine::RequestExecute( CMapTileRequest* aMapTileRequest)
-{
-    __TRACE_CALLSTACK;
-    TInt errorCode = KErrNone;
-    MYLOCLOGSTRING1("Request address type - %d ",aMapTileRequest->iAddressType);
-    switch (aMapTileRequest->iAddressType)
-    {
-        case ESourceCalendar:
-        {
-            TRAP(errorCode,iMapTileInterface->GetGeoCodeFromAddressL(*(aMapTileRequest->iAddressDetails),
-                            aMapTileRequest->iImagePath, this ));        
-            break;
-        }
-        case ESourceContactsPref:
-        case ESourceContactsWork:
-        case ESourceContactsHome:
-        {
-            TRAP(errorCode, iMapTileInterface->GetGeoCodeFromAddressL(aMapTileRequest->iLandmarkInfo,
-                            aMapTileRequest->iImagePath, this));            
-            break;
-        }
-        default:
-            break;
-    };  
-
-    return errorCode;
-}
- 
-// -----------------------------------------------------------------------------
-// CMyLocationsEngine::GetContactAddressDetailsLC()
-// get locatin details
-// -----------------------------------------------------------------------------
-//
-CPosLandmark* CMyLocationsEngine::GetContactAddressDetailsLC( 
-                                   QContactAddress& aContactAddress )
-{
-    __TRACE_CALLSTACK;
-    CPosLandmark *landmark = NULL;
-    
-    QString country = aContactAddress.country();
-    QString locality = aContactAddress.locality();
-    QString street = aContactAddress.street();
-    QString region = aContactAddress.region();
-    QString postalcode = aContactAddress.postcode();
-    
-    landmark = CPosLandmark::NewL();
-    CleanupStack::PushL(landmark);
-    
-    if ( !country.isEmpty() )
-    {
-        TPtrC16 tempText(reinterpret_cast<const TUint16*>(country.utf16()));
-        landmark->SetPositionFieldL( EPositionFieldCountry, tempText );
-    }
-    if ( !locality.isEmpty() )
-    {
-        TPtrC16 tempText(reinterpret_cast<const TUint16*>(locality.utf16())); 
-        landmark->SetPositionFieldL(EPositionFieldCity, tempText);
-    }
-    if ( !street.isEmpty() )
-    { 
-        TPtrC16 tempText(reinterpret_cast<const TUint16*>(street.utf16()));
-        landmark->SetPositionFieldL(EPositionFieldStreet, tempText);
-    }
-    if ( !postalcode.isEmpty() )
-    {
-        TPtrC16 tempText(reinterpret_cast<const TUint16*>(postalcode.utf16()));
-        landmark->SetPositionFieldL(EPositionFieldPostalCode, tempText);
-    }
-
-     return landmark;
-}
-
-// -----------------------------------------------------------------------------
-// CMyLocationsEngine::MapsChangeType()
-// Maps the source's change type to Mylocations entry change type
-// -----------------------------------------------------------------------------
-//
-TEntryChangeType CMyLocationsEngine::MapChangeType(TUidSourceType aSrcType,
-        TUint32 aChangeType)
-{
-    __TRACE_CALLSTACK;// return value
-    TEntryChangeType retVal = EEntryUnknown;
-
-    switch (aSrcType)
-    {
-    // if source type is calendar
-    case ESourceCalendar:
-    {
-        switch( aChangeType )
-            {
-            case EChangeAdd:
-                retVal = EEntryAdded;
-                break;
-            case EChangeDelete:
-                retVal =  EEntryDeleted;
-                break;
-            case EChangeModify:
-                retVal =  EEntryModified;
-                break;
-            }
-        break;
-    }
-    // if source type is contacts
-    case ESourceContactsPref:
-    case ESourceContactsWork:
-    case ESourceContactsHome:
-    {
-        switch (aChangeType)
-        {
-        case EContactDbObserverEventContactAdded:
-            retVal = EEntryAdded;
-            break;
-        case EContactDbObserverEventContactDeleted:
-            retVal = EEntryDeleted;
-            break;
-        case EContactDbObserverEventContactChanged:
-            retVal = EEntryModified;
-            break;
-        }
-        break;
-    }
-
-        // if source type is landmarks or maps history
-    case ESourceLandmarks:
-    {
-        switch (aChangeType)
-        {
-        case EPosLmEventLandmarkCreated:
-            retVal = EEntryAdded;
-            break;
-        case EPosLmEventLandmarkDeleted:
-            retVal = EEntryDeleted;
-            break;
-        case EPosLmEventLandmarkUpdated:
-            retVal = EEntryModified;
-            break;
-        }
-        break;
-    }
-    case ESourceLandmarksCategory:
-    {
-        switch (aChangeType)
-        {
-        case EPosLmEventCategoryCreated:
-            retVal = EEntryAdded;
-            break;
-        }
-    }
-        break;
-    }
-    return retVal;
-}
-
-
-// -----------------------------------------------------------------------------
-// CMyLocationsEngine::IsGeoCoordinateAvailable()
-// Checks whether geocoordinate available in the contact detail.
-// -----------------------------------------------------------------------------
-//
-TBool CMyLocationsEngine::IsGeoCoordinateAvailable( QContact& aContact, 
-        QString aAddressType, double& aLatitude , double& aLongitude )
-
-{
-      TBool geoFieldAvailable = EFalse;
-      QContactGeoLocation geoLocation;
-      
-      foreach( geoLocation, aContact.details<QContactGeoLocation>() )
-      {
-          if( !geoLocation.isEmpty())
-          {
-              QStringList context = geoLocation.contexts();
-              if ( context.isEmpty() )
-              {
-                  if ( aAddressType.isEmpty() )
-                  {
-                      geoFieldAvailable = ETrue;
-                      break;
-                  }
-              }
-              else if( context.first() == aAddressType )
-              {
-                  geoFieldAvailable = ETrue;
-                  break;
-              }
-              
-          }
-          
-      }
-      if( geoFieldAvailable )
-      {
-          aLatitude = geoLocation.latitude();
-          aLongitude = geoLocation.longitude();
-      }
-      return geoFieldAvailable;
-}
-
-
-
-// -----------------------------------------------------------------------------
-// CMyLocationsEngine::RunL()
-// Handles active object's request completion event.
-// -----------------------------------------------------------------------------
-//
-void CMyLocationsEngine::RunL()
-{
-    __TRACE_CALLSTACK;
-    switch (iLmEvent.iEventType)
-    {
-        case EPosLmEventLandmarkCreated:
-        case EPosLmEventLandmarkUpdated:
-        {
-            CPosLandmark* readLandmark = iLandmarkDb->ReadLandmarkLC(
-                    iLmEvent.iLandmarkItemId);
-    
-                // update the entry in database.
-                UpdateDatabaseL( readLandmark,
-                        iLmEvent.iLandmarkItemId, ESourceLandmarks, MapChangeType(
-                                ESourceLandmarks, iLmEvent.iEventType ) );
-    
-                CleanupStack::PopAndDestroy(readLandmark);
-        }
-        break;
-        case EPosLmEventLandmarkDeleted:
-        {
-            // delete the corresponding entries in mylocations database.
-            UpdateDatabaseL(NULL,
-                    iLmEvent.iLandmarkItemId, ESourceLandmarks, EEntryDeleted);
-        }
-        break;
-
-    }
-
-    // start the change notifier again;
-    StartLandmarksChangeNotifier();
-
-}
-// -----------------------------------------------------------------------------
-// CMyLocationsEngine::DoCancel()
-// Implements cancellation of an outstanding request.
-// -----------------------------------------------------------------------------
-//
-void CMyLocationsEngine::DoCancel()
-{
-    __TRACE_CALLSTACK;
-    iLandmarkDb->CancelNotifyDatabaseEvent();
-}
-
-// -----------------------------------------------------------------------------
-// CMyLocationsEngine::GeoCodefetchingCompleted()
-// Handles the maptile fetching completion event and updates the maptile lookup db.
-// -----------------------------------------------------------------------------
-//
-void CMyLocationsEngine::GeoCodefetchingCompleted( TInt aErrCode, const TReal& aLatitude,
-            const TReal& aLongitude, const TDesC& aMapTilePath )
-{
-    __TRACE_CALLSTACK;
-    MYLOCLOGSTRING1("GeoCodefetchingCompleted aErrCode - %d ",aErrCode);
-    MYLOCLOGSTRING1("iMapTileRequestQueue.Count - %d",iMapTileRequestQueue.Count());
-
-    TBuf8<KProtocolBufferSize> buffer;
-    
-    if (iMapTileRequestQueue.Count() > 0)
-    {
-        MYLOCLOGSTRING1("No.of RequestQueue - %d",iMapTileRequestQueue.Count());
-       
-	    TLookupItem lookupItem;
-        lookupItem.iSource = iMapTileRequestQueue[0]->iAddressType;
-        lookupItem.iUid = iMapTileRequestQueue[0]->iUId;
-
-        if (aErrCode == KErrNone)
-        {
-            UpdateGeoCodeToAppDataBase( aLatitude, aLongitude );
-            
-            TBool flag = EFalse;
-            TRAP_IGNORE( flag = iMaptileDatabase->FindEntryByFilePathL(aMapTilePath) );
-            if ( flag )
-            {  
-                MYLOCLOGSTRING1("%S - found in the DB",&aMapTilePath);
-            
-             				
-                lookupItem.iFilePath.Copy(aMapTilePath);
-                lookupItem.iFetchingStatus = EMapTileFectchingCompleted;
-                TRAP_IGNORE( UpdateMaptileDatabaseL(iMapTileRequestQueue[0]->iEventType, lookupItem ) );              
-                //Publish the maptile status
-                if( iLastContactId == iMapTileRequestQueue[0]->iUId )
-                {
-                    buffer.Zero();
-                    buffer.Format( KMaptileStatusFormat, iLastContactId, lookupItem.iSource, lookupItem.iFetchingStatus );
-                    RProperty::Set( KMaptileStatusPublish, EMaptileStatusInteger, buffer );
-                }
-                //Publish the maptile status ,if it was from calendar
-                if( iLastCalendarId == iMapTileRequestQueue[0]->iUId )
-                {
-                    buffer.Zero();
-                    buffer.Format( KMaptileStatusFormat, iLastCalendarId, lookupItem.iSource, lookupItem.iFetchingStatus );
-                    RProperty::Set( KMaptileStatusPublish, EMaptileStatusInteger, buffer );
-                }
-                MYLOCLOGSTRING("UpdateMaptileDatabaseL handled");
-
-                //Process the pending maptile requests
-                ProcessNextMaptileRequest();
-                
-            }
-            else
-            {
-                TRAPD( error, iMapTileInterface->GetMapTileL( aLatitude, aLongitude ) );
-                if ( error != KErrNone )
-                {
-                    //Log error message
-                     MYLOCLOGSTRING1("iMapTileInterface->GetMapTileL() status-%d",error);
-                     MapTilefetchingCompleted(error, KNullDesC);
-                }            
-            }            
-        }
-        else
-        {
-		   if ( aErrCode == KErrCouldNotConnect )
-		   {
-		       lookupItem.iFetchingStatus = EMapTileFetchingNetworkError;
-               iMyLocationThreeAMTimer->StartTimer();
-              
-		   }
-		   else
-		   {
-		       lookupItem.iFetchingStatus = EMapTileFetchingUnknownError;
-		   }
-           TRAP_IGNORE( UpdateMaptileDatabaseL(iMapTileRequestQueue[0]->iEventType,lookupItem ) );
-           
-           //Publish the maptile status
-		   if( iLastContactId == iMapTileRequestQueue[0]->iUId )
-		   {
-		      buffer.Zero();
-		      buffer.Format( KMaptileStatusFormat, iLastContactId, lookupItem.iSource, lookupItem.iFetchingStatus );
-		      RProperty::Set( KMaptileStatusPublish, EMaptileStatusInteger, buffer );
-		   }
-            //Publish the maptile status ,if it was from calendar
-		   if( iLastCalendarId == iMapTileRequestQueue[0]->iUId )
-            {
-		      buffer.Zero();
-              buffer.Format( KMaptileStatusFormat, iLastCalendarId, lookupItem.iSource, lookupItem.iFetchingStatus );
-              RProperty::Set( KMaptileStatusPublish, EMaptileStatusInteger, buffer );
-            }
-		   
-		   ProcessNextMaptileRequest();
-        }
-    }    
-}
-
-
-
-
-// -----------------------------------------------------------------------------
-// CMyLocationsEngine::MyLocationThreeAMTimerExpiredL()
-// Triggers the maptile fetching at 3.00 for the network failure cases.
-// -----------------------------------------------------------------------------
-//
-void CMyLocationsEngine::MyLocationThreeAMTimerExpiredL()
-{
-    //Forward the event for maptile fetching only if maptile plugin available
-    if( iMaptileGeocoderPluginAvailable )
-    {
-        RArray<TLookupItem> iLookupItems;
-        iMaptileDatabase->FindEntriesByMapTileFetchingStateL((TUint32)EMapTileFetchingNetworkError,
-                                            iLookupItems);
-        for( TUint32 i = 0; i < iLookupItems.Count(); i++ )
-        {
-            TLookupItem iItem = iLookupItems[i];
-            switch( iItem.iSource )
-            {
-                // Get the home address details
-                case ESourceContactsHome:
-                case ESourceContactsWork:
-                case ESourceContactsPref:
-                     { 
-                        QContact contactInfo = iContactManager->contact( iItem.iUid );
-                        
-                        CPosLandmark *addressLm = NULL;
-    
-                        foreach ( QContactAddress address, contactInfo.details<QContactAddress>() )
-                        {
-                            QStringList context = address.contexts();
-                            if ( ( context.isEmpty() && iItem.iSource == ESourceContactsPref  ) 
-                                 ||
-                                 ( !context.isEmpty() && 
-                                    ( ( context.first() == QContactAddress::ContextHome  && iItem.iSource == ESourceContactsHome ) ||
-                                      ( context.first() == QContactAddress::ContextWork  && iItem.iSource == ESourceContactsWork ) ) ) )
-                            {
-                                // Get the default/prefered address details
-                                addressLm = GetContactAddressDetailsLC( address );
-                                if( addressLm ) 
-                                {
-                                    RequestMapTileImageL( *addressLm,
-                                           ( TUidSourceType )iItem.iSource, iItem.iUid, EContactDbObserverEventContactChanged );
-                                    CleanupStack::PopAndDestroy( addressLm );
-                                    break;
-                                }
-                            }
-                        }                    
-                     }
-                     break;
-                
-                case ESourceCalendar:
-                     {
-                        CCalEntry* calEntry = NULL;
-                        calEntry = iCalView->FetchL(iItem.iUid);
-                        if( calEntry )
-                        {
-                            CleanupStack::PushL(calEntry);
-                            TPtrC address(calEntry->LocationL());
-                            if(address.Length()>0)
-                            {        
-                                RequestMapTileImageL( address, ESourceCalendar, iItem.iUid , EChangeModify);
-                            }
-                            CleanupStack::PopAndDestroy(calEntry);
-                        }
-                        else
-                        {
-                            iMaptileDatabase->DeleteEntryL( iItem );
-                        }
-                     }
-                     break;
-                 
-                 default:
-                     break;
-              }
-         }// end for
-     }
-}
-
-
-// -----------------------------------------------------------------------------
-// CMyLocationsEngine::MapTilefetchingCompleted()
-// Handles the maptile fetching completion event and updates the maptile lookup db.
-// -----------------------------------------------------------------------------
-//
-void CMyLocationsEngine::MapTilefetchingCompleted(TInt aErrCode,
-        const TDesC& aMapTilePath)
-{
-    __TRACE_CALLSTACK;
-    MYLOCLOGSTRING1("MapTilefetchingCompleted aErrCode - %d ",aErrCode);
-    MYLOCLOGSTRING1("iMapTileRequestQueue.Count - %d",iMapTileRequestQueue.Count());
-
-    if ( iMapTileRequestQueue.Count() > 0 )
-    {
-
-        MYLOCLOGSTRING1("No.of RequestQueue - %d",iMapTileRequestQueue.Count());
-
-        TLookupItem lookupItem;
-        lookupItem.iSource = iMapTileRequestQueue[0]->iAddressType;
-        lookupItem.iUid = iMapTileRequestQueue[0]->iUId;
-       
-        if ( aErrCode == KErrNone )
-        {           
-            CreateMultipleMaptiles( aMapTilePath );
-            lookupItem.iFilePath.Copy(aMapTilePath);
-            lookupItem.iFetchingStatus = EMapTileFectchingCompleted;
- 
-        }
-        else if ( aErrCode == KErrCouldNotConnect )
-		{
-		    lookupItem.iFetchingStatus = EMapTileFetchingNetworkError;
-            iMyLocationThreeAMTimer->StartTimer();
-              
-		}
-		else
-		{
-		    lookupItem.iFetchingStatus = EMapTileFetchingUnknownError;
-		}
-		
-        TRAP_IGNORE( UpdateMaptileDatabaseL( iMapTileRequestQueue[0]->iEventType,lookupItem ) );
-
-        // if the source type is contacts, update the contact name into the locationdatalookupdb. 
-        // This has to be done, because there is a possibility  that the user might change the 
-        // contact name between geocodefetchingcomplete and maptilefetchingcomplete.
-        if( iMapTileRequestQueue[0]->iAddressType == ESourceContactsPref ||
-            iMapTileRequestQueue[0]->iAddressType == ESourceContactsHome ||
-            iMapTileRequestQueue[0]->iAddressType == ESourceContactsWork )
-        {
-            TBuf<KBufSize> landmarkName;
-            GetContactName( iMapTileRequestQueue[0]->iUId, landmarkName );
-            
-            iMyLocationsDatabaseManager->UpdateEntryName( 
-                    iMapTileRequestQueue[0]->iUId, ESourceContactsPref, landmarkName );
-            iMyLocationsDatabaseManager->UpdateEntryName( 
-                    iMapTileRequestQueue[0]->iUId, ESourceContactsHome, landmarkName );
-            iMyLocationsDatabaseManager->UpdateEntryName( 
-                    iMapTileRequestQueue[0]->iUId, ESourceContactsWork, landmarkName );
-        }
-
-        //Publish the maptile status , if it was from contact
-        if( iLastContactId == iMapTileRequestQueue[0]->iUId )
-        {
-             TBuf8<KProtocolBufferSize> buffer;
-             buffer.Format( KMaptileStatusFormat, iLastContactId, lookupItem.iSource, lookupItem.iFetchingStatus );
-             RProperty::Set( KMaptileStatusPublish, EMaptileStatusInteger, buffer );
-        }
-        //Publish the maptile status ,if it was from calendar
-        if( iLastCalendarId == iMapTileRequestQueue[0]->iUId )
-        {
-            TBuf8<KProtocolBufferSize> buffer;
-            buffer.Format( KMaptileStatusFormat, iLastCalendarId, lookupItem.iSource, lookupItem.iFetchingStatus );
-            RProperty::Set( KMaptileStatusPublish, EMaptileStatusInteger, buffer );
-        }
-    }
-    
-    ProcessNextMaptileRequest();
-}
-
-
-// -----------------------------------------------------------------------------
-// CMyLocationsEngine::ProcessNextMaptileRequest()
-// Process the next maptile request if any pending.
-// -----------------------------------------------------------------------------
-//
-void CMyLocationsEngine::ProcessNextMaptileRequest()
-{
-    //Process the next request if it is pending
-    if ( iMapTileRequestQueue.Count() > 0)
-    {
-        //Remove the current top request 
-        delete iMapTileRequestQueue[0];
-        iMapTileRequestQueue.Remove(0);
-        iMapTileRequestQueue.Compress();
-    
-        //Process the next request in queue
-        MYLOCLOGSTRING1("MapTile fetch completed request-%d",iMapTileRequestQueue.Count());
-        for (TInt cnt = 0; cnt < iMapTileRequestQueue.Count(); cnt++)
-        {          
-            if ( KErrNone == RequestExecute( iMapTileRequestQueue[0]) )
-            {
-                   break;
-            }
-            else
-            {
-               //Process the next request in queue
-               ProcessNextMaptileRequest();
-
-            }
-        }
-    }
-    else
-    {
-       MYLOCLOGSTRING("MapTile fetch completed no request in queue");
-           iMapTileRequestQueue.Reset();
-    }    
-}
-
-// -----------------------------------------------------------------------------
-// CMyLocationsEngine::HandleMaptileDatabaseL()
-// Handle maptile database(find/create/update/delete).
-// -----------------------------------------------------------------------------
-//
-void CMyLocationsEngine::UpdateMaptileDatabaseL(
-        TInt aEventType, TLookupItem& aLookupItem)
-{
-    __TRACE_CALLSTACK;
-    if (aEventType == EContactDbObserverEventContactChanged || aEventType
-            == EChangeModify || aEventType == EContactDbObserverEventContactAdded ||
-            aEventType == EChangeAdd )
-    {
-        
-        if (iMaptileDatabase->FindEntryL(aLookupItem))
-        {
-            iMaptileDatabase->UpdateEntryL(aLookupItem);
-        }
-        else
-        {
-            iMaptileDatabase->CreateEntryL(aLookupItem);
-        }
-    }
-    if (aLookupItem.iFetchingStatus == EMapTileFetchingUnknownError
-            || aLookupItem.iFetchingStatus == EMapTileFetchingNetworkError)
-    {
-        TRAP_IGNORE( UpdateDatabaseL( NULL,
-                        aLookupItem.iUid, aLookupItem.iSource, EEntryDeleted ) );
-
-    }
-    else
-    {      
-        TPtrC8 ptr(reinterpret_cast<const TUint8*>(MAPTILE_IMAGE_HURRIGANES));   
-        HBufC* buffer = NULL;
-        buffer=HBufC::NewLC(ptr.Length());
-        buffer->Des().Copy(ptr);
-        if(buffer)
-        {
-            aLookupItem.iFilePath.Append(*buffer);
-        }
-        CleanupStack::PopAndDestroy(buffer);
-        iMyLocationsDatabaseManager->UpdateMapTilePath(aLookupItem.iUid,
-                aLookupItem.iSource, aLookupItem.iFilePath);
-    }
-}
-
-// -----------------------------------------------------------------------------
-// CMyLocationsEngine::RestGeoCodeCompleted()
-// observed when rest geo codeing completed.
-// started lat and lon field updation into contact db.
-// -----------------------------------------------------------------------------
-//
-void CMyLocationsEngine::UpdateGeoCodeToAppDataBase( TReal aLatitude, TReal aLongitude )
-{
-    __TRACE_CALLSTACK;
-
-    MYLOCLOGSTRING1("No. of iMapTileRequestQueue - %d",iMapTileRequestQueue.Count());
-    if (iMapTileRequestQueue.Count() > 0)
-    {
-        switch (iMapTileRequestQueue[0]->iAddressType)
-        {
-        //TODO:
-        case ESourceCalendar:
-        {           
-            iGeocodeUpdate->updateGeocodeToCalenderDB(iMapTileRequestQueue[0]->iUId,
-                    aLatitude,aLongitude);                    
-            CPosLandmark *landmark = NULL;
-            landmark = iMapTileInterface->GetLandMarkDetails();
-            if (NULL != landmark)
-            {
-                TRAP_IGNORE( landmark->SetPositionFieldL(EPositionFieldComment,
-                        iMapTileRequestQueue[0]->iAddressDetails->Des() ) );
-                TRAP_IGNORE( UpdateDatabaseL( landmark, iMapTileRequestQueue[0]->iUId,
-                                ESourceCalendar,
-                                MapChangeType( ESourceCalendar, iMapTileRequestQueue[0]->iEventType ) ) );
-            }
-            MYLOCLOGSTRING("Geo-codinate updated to calender db");
-            break;
-        }
-        case ESourceContactsPref:
-        case ESourceContactsWork:
-        case ESourceContactsHome:
-        {
-            iGeocodeUpdate->updateGeocodeToContactDB(
-                    iMapTileRequestQueue[0]->iUId,
-                    iMapTileRequestQueue[0]->iAddressType, aLatitude,
-                    aLongitude);
-            TBuf<KBufSize> landmarkName;
-            GetContactName(iMapTileRequestQueue[0]->iUId,landmarkName);
-            //Update mylocation database 
-            iMapTileRequestQueue[0]->iLandmarkInfo->SetLandmarkNameL( landmarkName );
-            TRAP_IGNORE( UpdateDatabaseL( 
-                    iMapTileRequestQueue[0]->iLandmarkInfo, 
-                    iMapTileRequestQueue[0]->iUId,
-                    iMapTileRequestQueue[0]->iAddressType,
-                    MapChangeType( 
-                        static_cast<TUidSourceType>( iMapTileRequestQueue[0]->iAddressType ), 
-                                                  iMapTileRequestQueue[0]->iEventType )));
-            
-            MYLOCLOGSTRING("Geo-codinate updated to contact db");
-            break;
-        }
-        };
-    }
-
-}
-
-
-// -----------------------------------------------------------------------------
-// CMyLocationsEngine::GetContactName()
-// -----------------------------------------------------------------------------
-//
-void CMyLocationsEngine::GetContactName( TInt32 aUId,TDes& aName)
-{
-	QContact contactInfo = iContactManager->contact( aUId );
-	QContactName name = contactInfo.detail( QContactName::DefinitionName );
-	QString firstName = name.firstName();
-	QString lastName = name.lastName();
-	QString fullName("");
-	
-	if( lastName.isEmpty() )
-    {
-	    fullName = firstName;
-    }
-	else
-    {
-        if( !firstName.isEmpty() )
-        {
-            fullName = firstName + KSpace;
-        }
-        fullName = fullName + lastName; 
-    }
-	
-	aName.Copy( reinterpret_cast<const TUint16*>(fullName.utf16()) );
-}
-
-// -----------------------------------------------------------------------------
-// CMyLocationsEngine::UpdateDatabaseL()
-// -----------------------------------------------------------------------------
-//
-void CMyLocationsEngine::UpdateDatabaseL( CPosLandmark* aLandmark, const TUint32 aUid, 
-        const TUint32 aSourceType, const TEntryChangeType aChangeType )
-{
-    __TRACE_CALLSTACK;
-    if(IsActive())
-    {
-        Cancel();
-    }
-    iMyLocationsDatabaseManager->UpdateDatabaseL( aLandmark, aUid, 
-        aSourceType, aChangeType );
-    if( aSourceType != ESourceLandmarks )
-    {
-        StartLandmarksChangeNotifier();
-    }
-    
-}
-
-// -----------------------------------------------------------------------------
-// CMyLocationsEngine::ManipulateMapTileDataBaseL()
-// -----------------------------------------------------------------------------
-//
-void CMyLocationsEngine::ManipulateMapTileDataBaseL(TLookupItem& aLookupItem)
-{
-    __TRACE_CALLSTACK;
-    TBool entryAvailable=EFalse;
-    entryAvailable = iMaptileDatabase->FindEntryL(aLookupItem);
-    iMaptileDatabase->DeleteEntryL(aLookupItem);
-    if (entryAvailable)
-    {
-        iMaptileDatabase->DeleteMapTileL(aLookupItem);
-    }            
-}
-
-
-// -----------------------------------------------------------------------------
-// CMyLocationsEngine::CreateMultipleMaptiles()
-// -----------------------------------------------------------------------------
-//
-void CMyLocationsEngine::CreateMultipleMaptiles( const TDesC& aMaptilePath )
-{
-    __TRACE_CALLSTACK;
-    QString filePath =  QString::fromUtf16( aMaptilePath.Ptr(), aMaptilePath.Length() );
-    
-    //Portrait image , common for contacts/calendar/context menu
-    CropAndSaveImage( filePath, 
-                      MaptilePortraitWidth, 
-                      MaptilePortraitHeight, 
-                      QString(),
-                      QString( MAPTILE_IMAGE_PORTRAIT ) );
-    
-    //Landscape image for contacts
-    CropAndSaveImage( filePath, 
-                      MaptileContactLandscapeWidth, 
-                      MaptileContactLandscapeHeight,
-                      QString( MAPTILE_IMAGE_CONTACT ),
-                      QString( MAPTILE_IMAGE_LANDSCAPE ) );
-    
-    //Ladscape image for calendar
-    CropAndSaveImage( filePath, 
-                      MaptileCalendarLandscapeWidth, 
-                      MaptileCalendarLandscapeHeight,
-                      QString( MAPTILE_IMAGE_CALENDAR ),
-                      QString( MAPTILE_IMAGE_LANDSCAPE ) );
-    
-    //Image for hurriganes
-    CropAndSaveImage( filePath, 
-                      MaptileHurriganesWidth, 
-                      MaptileHurriganesHeight,
-                      QString( MAPTILE_IMAGE_HURRIGANES ),
-                      QString() );
-    QFile file(filePath);
-    file.remove();   
-}
-
-
-// -----------------------------------------------------------------------------
-// CMyLocationsEngine::CropAndSaveImage()
-// -----------------------------------------------------------------------------
-//
-void CMyLocationsEngine::CropAndSaveImage( QString filePath, int width, 
-                                   int height, QString appType, QString orientationType )
-{    
-     __TRACE_CALLSTACK;
-     QImage SourcePNG( filePath );
-     QImage sourcePixmap( SourcePNG.convertToFormat(QImage::Format_Indexed8));     
-     QImage targetPixmap( sourcePixmap.copy( 
-                               ( MapTileWidth - width )/2, 
-                               ( MapTileHeight - height )/2 , 
-                               width, 
-                               height ) );
-         
-     QString targetImage;
-     targetImage.append( filePath );
-     targetImage.append( appType );
-     targetImage.append( orientationType );
-     targetPixmap.save( targetImage, MAPTILE_IMAGE_TYPE  );
-             
-}
-
-//End of file
-
--- a/locationdataharvester/rom/mylocations.iby	Tue Aug 31 15:09:25 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,35 +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: mylocations iby file
-*
-*/
-
-
-#ifndef __Mylocations_IBY__
-#define __Mylocations_IBY__
-
-file=ABI_DIR\BUILD_DIR\mylocationsengine.exe PROGRAMS_DIR\mylocationsengine.exe
-file=ABI_DIR\BUILD_DIR\geocodeupdate.dll PROGRAMS_DIR\geocodeupdate.dll
-file=ABI_DIR\BUILD_DIR\maptileservice.dll PROGRAMS_DIR\maptileservice.dll
-file=ABI_DIR\BUILD_DIR\locationdatalookupdb.dll PROGRAMS_DIR\locationdatalookupdb.dll
-file=ABI_DIR\BUILD_DIR\mylocationsdatabasemanager.dll PROGRAMS_DIR\mylocationsdatabasemanager.dll
-
-
-//Resource file(s) for Mylocations application (mylocations.iby)
-data=DATAZ_\APP_RESOURCE_DIR\mylocationsengine.rsc APP_RESOURCE_DIR\mylocationsengine.rsc
-
-data=\epoc32\data\z\resource\qt\crml\maptilestatuspublisher.qcrml   resource\qt\crml\maptilestatuspublisher.qcrml
-data=\epoc32\data\z\resource\qt\crml\maptilecontactpublisher.qcrml   resource\qt\crml\maptilecontactpublisher.qcrml
-data=\epoc32\data\z\resource\qt\crml\maptilecalpublisher.qcrml   resource\qt\crml\maptilecalpublisher.qcrml
-#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationlandmarksrefappfors60/Data/LmRefApp.rss	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,788 @@
+/*
+* 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:  Defines the resources used by the Landmark Reference App.
+*
+*/
+
+
+NAME LMKS
+
+#include <eikon.rh>
+#include <avkon.rh>
+#include <avkon.rsg>
+#include <avkon.mbg>
+#include <eikctl.rsg>
+
+#include <appinfo.rh>
+
+#include "LmRefApp.hrh"
+#include "LmRefApp.rls"
+#include <lmrefapp.mbg>
+
+// -----------------------------------------------------------------------------
+//    Define the resource file signature
+//    This resource should be empty.
+// -----------------------------------------------------------------------------
+//
+RESOURCE RSS_SIGNATURE {  }
+
+// -----------------------------------------------------------------------------
+//    Define the title of the app
+// -----------------------------------------------------------------------------
+//
+RESOURCE TBUF { buf="LmRefApp"; }
+
+// -----------------------------------------------------------------------------
+//    Define default application info.
+// -----------------------------------------------------------------------------
+//
+RESOURCE EIK_APP_INFO
+    {
+    status_pane = r_lmrefapp_status_pane;
+    }
+
+// -----------------------------------------------------------------------------
+//  Add a new resource definition
+// -----------------------------------------------------------------------------
+//
+RESOURCE LOCALISABLE_APP_INFO r_lmrefapp_localisable_app_info
+    {
+    short_caption = qtn_lmrefapp_title;
+    caption_and_icon =
+        CAPTION_AND_ICON_INFO
+            {
+            caption = qtn_lmrefapp_title;
+            number_of_icons = 1;
+            icon_file =  "\\resource\\apps\\lmrefappfors60_icon.mif";
+            };
+	view_list = {};
+    }
+
+// -----------------------------------------------------------------------------
+//    Define the application icon.
+// -----------------------------------------------------------------------------
+//
+RESOURCE CONTEXT_PANE r_lmrefapp_app_icon
+    {
+    }
+
+// -----------------------------------------------------------------------------
+//    r_lmrefapp_status_pane
+//    define the default appearance of the status pane
+// -----------------------------------------------------------------------------
+//
+RESOURCE STATUS_PANE_APP_MODEL r_lmrefapp_status_pane
+    {
+    panes =
+        {
+        SPANE_PANE
+            {
+            id = EEikStatusPaneUidContext;
+            type=EAknCtContextPane;
+            resource = r_lmrefapp_app_icon;
+            },
+        SPANE_PANE
+            {
+            id = EEikStatusPaneUidNavi;
+            type = EAknCtNaviPane;
+            resource = r_lmrefapp_navi_decorator;
+            }
+        };
+    }
+
+// -----------------------------------------------------------------------------
+//    r_lmrefapp_navi_decorator
+//    define the navigation decorator on the status pane
+// -----------------------------------------------------------------------------
+//
+RESOURCE NAVI_DECORATOR r_lmrefapp_navi_decorator
+    {
+    type = ENaviDecoratorControlTabGroup;
+    control = TAB_GROUP
+        {
+        tab_width = EAknTabWidthWithTwoLongTabs;
+        active = 0;
+        tabs =
+            {
+            TAB
+                {
+                id = ELandmarksNameTab;
+                txt = qtn_lmrefapp_view;
+                },
+            TAB
+                {
+                id = ELandmarksCategoriesTab;
+                txt = qtn_lmrefapp_categories_view;
+                }
+            };
+        };
+    }
+
+// -----------------------------------------------------------------------------
+//    r_lmrefapp_view
+//    Define the landmarks view
+// -----------------------------------------------------------------------------
+//
+RESOURCE AVKON_VIEW r_lmrefapp_view
+    {
+    menubar = r_lmrefapp_menubar;
+    cba = R_AVKON_SOFTKEYS_OPTIONS_EXIT;
+    }
+
+// -----------------------------------------------------------------------------
+//   r_lmrefapp_menubar
+//   Define the menu bar of the landmarks view
+// -----------------------------------------------------------------------------
+//
+RESOURCE MENU_BAR r_lmrefapp_menubar
+    {
+    titles =
+        {
+        MENU_TITLE
+            {
+            menu_pane = r_lmrefapp_menu;
+            }
+        };
+    }
+
+// -----------------------------------------------------------------------------
+//   r_lmrefapp_menu
+//   Define the menu pane of the landmarks view
+// -----------------------------------------------------------------------------
+//
+RESOURCE MENU_PANE r_lmrefapp_menu
+    {
+    items =
+        {
+        MENU_ITEM
+            {
+            command = ELandmarksOpen;
+            txt = qtn_lmrefapp_open_item;
+            },
+        MENU_ITEM
+            {
+            txt = qtn_lmrefapp_new_lm_item;
+            cascade = r_lmrefapp_add_sub_menu;
+            },
+        MENU_ITEM
+            {
+            command = ELandmarksDelete;
+            txt = qtn_lmrefapp_delete_item;
+            },
+        MENU_ITEM
+            {
+            command = EAknSoftkeyExit;
+            txt = qtn_lmrefapp_exit_item;
+            }
+        };
+    }
+
+// -----------------------------------------------------------------------------
+//   r_lmrefapp_add_sub_menu
+//   Define the add sub menu pane of the landmarks view
+// -----------------------------------------------------------------------------
+//
+RESOURCE MENU_PANE r_lmrefapp_add_sub_menu
+    {
+    items =
+        {
+        MENU_ITEM
+            {
+            command = ELandmarksAddCurrent;
+            txt = qtn_lmrefapp_add_current_item;
+            },
+        MENU_ITEM
+            {
+            command = ELandmarksAddBlank;
+            txt = qtn_lmrefapp_add_blank_item;
+            }
+        };
+    }
+
+// -----------------------------------------------------------------------------
+//    r_lmrefapp_categories_view
+//    Define the categories view
+// -----------------------------------------------------------------------------
+//
+RESOURCE AVKON_VIEW r_lmrefapp_categories_view
+    {
+    menubar = r_lmrefapp_categories_menubar;
+    cba = R_AVKON_SOFTKEYS_OPTIONS_EXIT;
+    }
+
+// -----------------------------------------------------------------------------
+//   r_lmrefapp_categories_menubar
+//   Define the menu bar of the categories view
+// -----------------------------------------------------------------------------
+//
+RESOURCE MENU_BAR r_lmrefapp_categories_menubar
+    {
+    titles =
+        {
+        MENU_TITLE
+            {
+            menu_pane = r_lmrefapp_categories_menu;
+            }
+        };
+    }
+
+// -----------------------------------------------------------------------------
+//   r_lmrefapp_categories_menu
+//   Define the categories menu pane
+// -----------------------------------------------------------------------------
+//
+RESOURCE MENU_PANE r_lmrefapp_categories_menu
+    {
+    items =
+        {
+        MENU_ITEM
+            {
+            command = ELandmarksAddCategory;
+            txt = qtn_lmrefapp_new_cat_item;
+            },
+        MENU_ITEM
+            {
+            command = ELandmarksRename;
+            txt = qtn_lmrefapp_rename_item;
+            },
+        MENU_ITEM
+            {
+            command = ELandmarksDelete;
+            txt = qtn_lmrefapp_delete_item;
+            },
+        MENU_ITEM
+            {
+            command = EAknSoftkeyExit;
+            txt = qtn_lmrefapp_exit_item;
+            }
+        };
+    }
+
+// -----------------------------------------------------------------------------
+//    r_lmrefapp_info_view
+//    Define the landmark info view
+// -----------------------------------------------------------------------------
+//
+RESOURCE AVKON_VIEW r_lmrefapp_info_view
+    {
+    cba = r_lmrefapp_info_view_cba;
+    }
+
+// -----------------------------------------------------------------------------
+//   r_lmrefapp_info_view_cba
+//   CBA for the landmark info view
+// -----------------------------------------------------------------------------
+//
+RESOURCE CBA r_lmrefapp_info_view_cba
+    {
+    buttons =
+        {
+        CBA_BUTTON
+            {
+            id = EAknSoftkeyEdit;
+            txt = qtn_lmrefapp_edit;
+            },
+        CBA_BUTTON
+            {
+            id = EAknSoftkeyBack;
+            txt = qtn_lmrefapp_back;
+            }
+        };
+    }
+
+// -----------------------------------------------------------------------------
+//   r_lmrefapp_edit_menu_bar
+//   Define the menu bar of the edit dialog
+// -----------------------------------------------------------------------------
+//
+RESOURCE MENU_BAR r_lmrefapp_edit_menu_bar
+    {
+    titles =
+        {
+        MENU_TITLE
+            {
+            menu_pane = r_lmrefapp_edit_menu_pane;
+            }
+        };
+    }
+
+// -----------------------------------------------------------------------------
+//   r_lmrefapp_edit_menu_pane
+//   Define the menu pane of the edit dialog
+// -----------------------------------------------------------------------------
+//
+RESOURCE MENU_PANE r_lmrefapp_edit_menu_pane
+    {
+    items =
+        {
+        MENU_ITEM
+            {
+            command = ELandmarksEditCategories;
+            txt = qtn_lmrefapp_edit_cat_item;
+            },
+        MENU_ITEM
+            {
+            command = ELandmarksUpdateToCurrentLocation;
+            txt = qtn_lmrefapp_current_loc;
+            },
+        MENU_ITEM
+            {
+            command = ELandmarksResetCoordinates;
+            txt = qtn_lmrefapp_reset_coords;
+            }
+        };
+    }
+
+// -----------------------------------------------------------------------------
+//    r_lmrefapp_edit_categories_dialog
+//    Dialog containing a list box for selecting categories for a landmark
+// -----------------------------------------------------------------------------
+//
+RESOURCE DIALOG r_lmrefapp_edit_categories_dialog
+    {
+    flags = EAknDialogMarkableList;
+    buttons = R_AVKON_SOFTKEYS_OK_CANCEL;
+    items =
+        {
+        DLG_LINE
+            {
+            type = EAknCtSingleListBox;
+            id = ESelectionListControl;
+            control = LISTBOX
+                {
+                flags = EAknListBoxMarkableList | EAknListBoxLoopScrolling;
+                };
+            }
+        };
+    }
+
+// -----------------------------------------------------------------------------
+//    r_lmrefapp_edit_dialog
+//    Dialog containing a form for editing landmarks fields
+// -----------------------------------------------------------------------------
+//
+RESOURCE DIALOG r_lmrefapp_edit_dialog
+    {
+    flags = EAknDialogGenericFullScreen;
+    buttons = R_AVKON_SOFTKEYS_OPTIONS_DONE;
+    items = {};
+    form = r_lmrefapp_edit_form;
+    }
+
+//-----------------------------------------------------------------------------
+//    r_lmrefapp_edit_form
+//    Form containg the landmark fields for editing.
+//-----------------------------------------------------------------------------
+//
+RESOURCE FORM r_lmrefapp_edit_form
+    {
+    flags = EEikFormUseDoubleSpacedFormat | EEikFormEditModeOnly;
+    items =
+        {
+        DLG_LINE_INDIRECT
+            {
+            line = r_lmrefapp_field_name;
+            },
+        DLG_LINE_INDIRECT
+            {
+            line = r_lmrefapp_field_description;
+            },
+        DLG_LINE_INDIRECT
+            {
+            line = r_lmrefapp_field_category;
+            },
+        DLG_LINE_INDIRECT
+            {
+            line = r_lmrefapp_field_latitude;
+            },
+        DLG_LINE_INDIRECT
+            {
+            line = r_lmrefapp_field_longitude;
+            },
+        DLG_LINE_INDIRECT
+            {
+            line = r_lmrefapp_field_altitude;
+            },
+        DLG_LINE_INDIRECT
+            {
+            line = r_lmrefapp_field_hor_acc;
+            },
+        DLG_LINE_INDIRECT
+            {
+            line = r_lmrefapp_field_ver_acc;
+            },
+        DLG_LINE_INDIRECT
+            {
+            line = r_lmrefapp_field_radius;
+            },
+        DLG_LINE_INDIRECT
+            {
+            line = r_lmrefapp_field_street;
+            },
+        DLG_LINE_INDIRECT
+            {
+            line = r_lmrefapp_field_postal;
+            },
+        DLG_LINE_INDIRECT
+            {
+            line = r_lmrefapp_field_city;
+            },
+        DLG_LINE_INDIRECT
+            {
+            line = r_lmrefapp_field_country;
+            }
+        };
+    }
+
+RESOURCE DLG_LINE r_lmrefapp_field_name
+    {
+    type = EEikCtEdwin;
+    prompt = qtn_lmrefapp_name;
+    id = ELandmarkNameField;
+    control = EDWIN
+        {
+        flags = EEikEdwinNoAutoSelection;
+        maxlength = KEditorMaxWidth;
+        };
+    }
+
+RESOURCE DLG_LINE r_lmrefapp_field_description
+    {
+    type = EEikCtEdwin;
+    prompt = qtn_lmrefapp_description;
+    id = ELandmarkDescField;
+    control = EDWIN
+        {
+        flags = EEikEdwinNoAutoSelection;
+        maxlength = KDescMaxWidth;
+        };
+    }
+
+RESOURCE DLG_LINE r_lmrefapp_field_category
+    {
+    type = EEikCtEdwin;
+    prompt = qtn_lmrefapp_categories;
+    id = ELandmarkCategoryField;
+    control = EDWIN
+        {
+        flags = EEikEdwinNoHorizScrolling | EEikEdwinResizable |
+            EEikEdwinNoAutoSelection | EEikEdwinReadOnly;
+        maxlength = KDescMaxWidth;
+        };
+    }
+
+//  The float editors below cannot use type = EEikCtFlPtEd and
+//  control = FLPTED since we allow NaN in our range.
+RESOURCE DLG_LINE r_lmrefapp_field_latitude
+    {
+    type = EAknCtLocationEditor;
+    prompt = qtn_lmrefapp_latitude;
+    id = ELandmarkLatitudeField;
+    control = LATITUDE_EDITOR
+        {
+        flags = ELocationEdFlagLatitude;
+        latlongresourceid = R_EIK_LATITUDE_AND_LONGITUDE;
+        };
+    }
+
+RESOURCE DLG_LINE r_lmrefapp_field_longitude
+    {
+    type = EAknCtLocationEditor;
+    prompt = qtn_lmrefapp_longitude;
+    id = ELandmarkLongitudeField;
+    control = LONGITUDE_EDITOR
+        {
+        flags = ELocationEdFlagLongitude;
+        latlongresourceid = R_EIK_LATITUDE_AND_LONGITUDE;
+        };
+    }
+
+RESOURCE DLG_LINE r_lmrefapp_field_altitude
+    {
+    type = EEikCtEdwin;
+    prompt = qtn_lmrefapp_altitude;
+    id = ELandmarkAltitudeField;
+    control = EDWIN
+        {
+        flags = EEikEdwinNoAutoSelection;
+        maxlength = KEditorMaxWidth;
+        allowed_input_modes = EAknEditorNumericInputMode;
+        avkon_flags = EAknEditorFlagFixedCase |
+            EAknEditorFlagSupressShiftMenu;
+        default_input_mode = EAknEditorNumericInputMode;
+        numeric_keymap = EAknEditorConverterNumberModeKeymap;
+        };
+    }
+
+RESOURCE DLG_LINE r_lmrefapp_field_hor_acc
+    {
+    type = EEikCtEdwin;
+    prompt = qtn_lmrefapp_hor_acc;
+    id = ELandmarkHorAccField;
+    control = EDWIN
+        {
+        flags = EEikEdwinNoAutoSelection;
+        maxlength = KEditorMaxWidth;
+        allowed_input_modes = EAknEditorNumericInputMode;
+        avkon_flags = EAknEditorFlagFixedCase |
+            EAknEditorFlagSupressShiftMenu;
+        default_input_mode = EAknEditorNumericInputMode;
+        numeric_keymap = EAknEditorConverterNumberModeKeymap;
+        };
+    }
+
+RESOURCE DLG_LINE r_lmrefapp_field_ver_acc
+    {
+    type = EEikCtEdwin;
+    prompt = qtn_lmrefapp_ver_acc;
+    id = ELandmarkVerAccField;
+    control = EDWIN
+        {
+        flags = EEikEdwinNoAutoSelection;
+        maxlength = KEditorMaxWidth;
+        allowed_input_modes = EAknEditorNumericInputMode;
+        avkon_flags = EAknEditorFlagFixedCase |
+            EAknEditorFlagSupressShiftMenu;
+        default_input_mode = EAknEditorNumericInputMode;
+        numeric_keymap = EAknEditorConverterNumberModeKeymap;
+        };
+    }
+
+RESOURCE DLG_LINE r_lmrefapp_field_radius
+    {
+    type = EEikCtEdwin;
+    prompt = qtn_lmrefapp_radius;
+    id = ELandmarkRadiusField;
+    control = EDWIN
+        {
+        flags = EEikEdwinNoAutoSelection;
+        maxlength = KEditorMaxWidth;
+        allowed_input_modes = EAknEditorNumericInputMode;
+        avkon_flags = EAknEditorFlagFixedCase |
+            EAknEditorFlagSupressShiftMenu;
+        default_input_mode = EAknEditorNumericInputMode;
+        numeric_keymap = EAknEditorConverterNumberModeKeymap;
+        };
+    }
+
+RESOURCE DLG_LINE r_lmrefapp_field_street
+    {
+    type = EEikCtEdwin;
+    prompt = qtn_lmrefapp_street;
+    id = ELandmarkStreetField;
+    control = EDWIN
+        {
+        flags = EEikEdwinNoAutoSelection;
+        maxlength = KEditorMaxWidth;
+        };
+    }
+
+RESOURCE DLG_LINE r_lmrefapp_field_postal
+    {
+    type = EEikCtEdwin;
+    prompt = qtn_lmrefapp_postal;
+    id = ELandmarkPostalField;
+    control = EDWIN
+        {
+        flags = EEikEdwinNoAutoSelection;
+        maxlength = KEditorMaxWidth;
+        default_input_mode = EAknEditorNumericInputMode;
+        };
+    }
+
+RESOURCE DLG_LINE r_lmrefapp_field_city
+    {
+    type = EEikCtEdwin;
+    prompt = qtn_lmrefapp_city;
+    id = ELandmarkCityField;
+    control = EDWIN
+        {
+        flags = EEikEdwinNoAutoSelection;
+        maxlength = KEditorMaxWidth;
+        };
+    }
+
+RESOURCE DLG_LINE r_lmrefapp_field_country
+    {
+    type = EEikCtEdwin;
+    prompt = qtn_lmrefapp_country;
+    id = ELandmarkCountryField;
+    control = EDWIN
+        {
+        flags = EEikEdwinNoAutoSelection;
+        maxlength = KEditorMaxWidth;
+        };
+    }
+
+// -----------------------------------------------------------------------------
+//    r_lmrefapp_init_db_progress_dialog
+//    Dialog for displaying a progress dialog when initializing the database
+// -----------------------------------------------------------------------------
+//
+RESOURCE DIALOG r_lmrefapp_init_db_progress_dialog
+    {
+    flags = EAknProgressNoteFlags;
+    buttons = R_AVKON_SOFTKEYS_CANCEL;
+    items =
+        {
+        DLG_LINE
+            {
+            type = EAknCtNote;
+            id = ELandmarksInitDbProgressDialog;
+            control = AVKON_NOTE
+                {
+                layout = EProgressLayout;
+                singular_label = qtn_lmrefapp_initializing;
+                };
+            }
+        };
+    }
+
+// -----------------------------------------------------------------------------
+//    r_lmrefapp_acquire_location_wait_note
+//    Dialog for displaying a wait note when acquiring a location
+// -----------------------------------------------------------------------------
+//
+RESOURCE DIALOG r_lmrefapp_acquire_location_wait_note
+    {
+    flags = EAknWaitNoteFlags | EEikDialogFlagWait;
+    buttons = R_AVKON_SOFTKEYS_CANCEL;
+    items =
+        {
+        DLG_LINE
+            {
+            type = EAknCtNote;
+            id = ELandmarksAcquireLocationWaitNote;
+            control = AVKON_NOTE
+                {
+                layout = EWaitLayout;
+                singular_label = qtn_lmrefapp_acquiring_loc;
+                animation = R_QGN_GRAF_WAIT_BAR_ANIM;
+                };
+            }
+        };
+    }
+
+// -----------------------------------------------------------------------------
+//    r_lmrefapp_general_query
+//    Dialog for displaying a general query
+// -----------------------------------------------------------------------------
+//
+RESOURCE DIALOG r_lmrefapp_general_query
+    {
+    flags = EGeneralQueryFlags;
+    buttons = R_AVKON_SOFTKEYS_YES_NO;
+    items =
+        {
+        DLG_LINE
+            {
+            type = EAknCtQuery;
+            id = ELandmarksGeneralQuery;
+            control = AVKON_CONFIRMATION_QUERY
+                {
+                layout = EConfirmationQueryLayout;
+                };
+            }
+        };
+    }
+
+// -----------------------------------------------------------------------------
+//    r_lmrefapp_rename_query
+//    Dialog for displaying a text editor
+// -----------------------------------------------------------------------------
+//
+RESOURCE DIALOG r_lmrefapp_rename_query
+    {
+    flags = EGeneralQueryFlags;
+    buttons = R_AVKON_SOFTKEYS_OK_CANCEL;
+    items =
+        {
+        DLG_LINE
+            {
+            type = EAknCtQuery;
+            id = ELandmarksRenameQuery;
+            control = AVKON_DATA_QUERY
+                {
+                layout = EDataLayout;
+                control = EDWIN
+                    {
+                    };
+                };
+            }
+        };
+    }
+
+
+// -----------------------------------------------------------------------------
+//    r_lmrefapp_???_label
+//    Field labels for info view and edit dialog
+// -----------------------------------------------------------------------------
+//
+
+RESOURCE TBUF r_lmrefapp_lmname_label { buf = qtn_lmrefapp_name; }
+RESOURCE TBUF r_lmrefapp_description_label { buf = qtn_lmrefapp_description; }
+//RESOURCE TBUF r_lmrefapp_category_label { buf = qtn_lmrefapp_category; }
+RESOURCE TBUF r_lmrefapp_categories_label { buf = qtn_lmrefapp_categories; }
+RESOURCE TBUF r_lmrefapp_lat_label { buf = qtn_lmrefapp_latitude; }
+RESOURCE TBUF r_lmrefapp_lon_label { buf = qtn_lmrefapp_longitude; }
+RESOURCE TBUF r_lmrefapp_alt_label { buf = qtn_lmrefapp_altitude; }
+RESOURCE TBUF r_lmrefapp_hor_acc_label { buf = qtn_lmrefapp_hor_acc; }
+RESOURCE TBUF r_lmrefapp_ver_acc_label { buf = qtn_lmrefapp_ver_acc; }
+RESOURCE TBUF r_lmrefapp_radius_label { buf = qtn_lmrefapp_radius; }
+RESOURCE TBUF r_lmrefapp_street_label { buf = qtn_lmrefapp_street; }
+RESOURCE TBUF r_lmrefapp_postal_label { buf = qtn_lmrefapp_postal; }
+RESOURCE TBUF r_lmrefapp_city_label { buf = qtn_lmrefapp_city; }
+RESOURCE TBUF r_lmrefapp_country_label { buf = qtn_lmrefapp_country; }
+
+RESOURCE TBUF r_lmrefapp_lmname_label_short { buf = qtn_lmrefapp_name_short; }
+RESOURCE TBUF r_lmrefapp_description_label_short { buf = qtn_lmrefapp_description_short; }
+RESOURCE TBUF r_lmrefapp_category_label_short { buf = qtn_lmrefapp_category_short; }
+//RESOURCE TBUF r_lmrefapp_categories_label_short { buf = qtn_lmrefapp_categories_short; }
+RESOURCE TBUF r_lmrefapp_lat_label_short { buf = qtn_lmrefapp_latitude_short; }
+RESOURCE TBUF r_lmrefapp_lon_label_short { buf = qtn_lmrefapp_longitude_short; }
+RESOURCE TBUF r_lmrefapp_alt_label_short { buf = qtn_lmrefapp_altitude_short; }
+RESOURCE TBUF r_lmrefapp_hor_acc_label_short { buf = qtn_lmrefapp_hor_acc_short; }
+RESOURCE TBUF r_lmrefapp_ver_acc_label_short { buf = qtn_lmrefapp_ver_acc_short; }
+RESOURCE TBUF r_lmrefapp_radius_label_short { buf = qtn_lmrefapp_radius_short; }
+RESOURCE TBUF r_lmrefapp_street_label_short { buf = qtn_lmrefapp_street_short; }
+RESOURCE TBUF r_lmrefapp_postal_label_short { buf = qtn_lmrefapp_postal_short; }
+RESOURCE TBUF r_lmrefapp_city_label_short { buf = qtn_lmrefapp_city_short; }
+RESOURCE TBUF r_lmrefapp_country_label_short { buf = qtn_lmrefapp_country_short; }
+
+// -----------------------------------------------------------------------------
+//    Various strings
+// -----------------------------------------------------------------------------
+//
+
+RESOURCE TBUF r_lmrefapp_app_title { buf = qtn_lmrefapp_title; }
+RESOURCE TBUF r_lmrefapp_latitude_error { buf = qtn_lmrefapp_latitude_error; }
+RESOURCE TBUF r_lmrefapp_longitude_error { buf = qtn_lmrefapp_longitude_error; }
+RESOURCE TBUF r_lmrefapp_altitude_error { buf = qtn_lmrefapp_altitude_error; }
+RESOURCE TBUF r_lmrefapp_hor_acc_error { buf = qtn_lmrefapp_hor_acc_error; }
+RESOURCE TBUF r_lmrefapp_ver_acc_error { buf = qtn_lmrefapp_ver_acc_error; }
+RESOURCE TBUF r_lmrefapp_radius_error { buf = qtn_lmrefapp_radius_error; }
+RESOURCE TBUF r_lmrefapp_lat_long_error { buf = qtn_lmrefapp_lat_long_error; }
+RESOURCE TBUF r_lmrefapp_alt_lat_long_error { buf = qtn_lmrefapp_alt_lat_long_error; }
+RESOURCE TBUF r_lmrefapp_hacc_lat_long_error { buf = qtn_lmrefapp_hacc_lat_long_error; }
+RESOURCE TBUF r_lmrefapp_vacc_alt_error { buf = qtn_lmrefapp_vacc_alt_error; }
+RESOURCE TBUF r_lmrefapp_acquiring_loc { buf = qtn_lmrefapp_acquiring_loc; }
+RESOURCE TBUF r_lmrefapp_delete_category { buf = qtn_lmrefapp_delete_category; }
+RESOURCE TBUF r_lmrefapp_new_category { buf = qtn_lmrefapp_new_category; }
+RESOURCE TBUF r_lmrefapp_category_name { buf = qtn_lmrefapp_category_name; }
+RESOURCE TBUF r_lmrefapp_undefined_category { buf = qtn_lmrefapp_undefined_category; }
+RESOURCE TBUF r_lmrefapp_delete_landmark { buf = qtn_lmrefapp_delete_landmark; }
+RESOURCE TBUF r_lmrefapp_edit_cat_title { buf = qtn_lmrefapp_edit_cat_title; }
+RESOURCE TBUF r_lmrefapp_acquiring_loc_error { buf = qtn_lmrefapp_acquiring_loc_error; }
+RESOURCE TBUF r_lmrefapp_empty_landmark_name_error { buf = qtn_lmrefapp_empty_landmark_error; }
+RESOURCE TBUF r_lmrefapp_last_location_used_info { buf = qtn_lmrefapp_last_location_used_info; }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationlandmarksrefappfors60/Data/LmRefApp_reg.rss	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,34 @@
+/*
+* Copyright (c) 2004-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:  Resource registration file 
+*
+*/
+
+
+
+#include <appinfo.rh>
+#include <lmrefapp.rsg>
+
+UID2 KUidAppRegistrationResourceFile
+UID3 0xA0000187
+
+RESOURCE APP_REGISTRATION_INFO
+    {
+    app_file = "lmrefapp";
+    localisable_resource_file = "\\resource\\apps\\lmrefapp";
+    localisable_resource_id = R_LMREFAPP_LOCALISABLE_APP_INFO;
+    datatype_list = {};
+    file_ownership_list = {};
+    service_list = {};
+    }
Binary file locationlandmarksrefappfors60/Data/category_global.bmp has changed
Binary file locationlandmarksrefappfors60/Data/category_global_mask_soft.bmp has changed
Binary file locationlandmarksrefappfors60/Data/category_user.bmp has changed
Binary file locationlandmarksrefappfors60/Data/category_user_mask_soft.bmp has changed
Binary file locationlandmarksrefappfors60/Data/default_lm.bmp has changed
Binary file locationlandmarksrefappfors60/Data/default_lm_mask_soft.bmp has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationlandmarksrefappfors60/Inc/LandmarksAppUi.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,119 @@
+/*
+* Copyright (c) 2004-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:  
+*     See class description below
+*
+*/
+
+
+#ifndef __LANDMARKS_APPUI_H__
+#define __LANDMARKS_APPUI_H__
+
+
+#include "LandmarksOperationObserver.h"
+#include <aknViewAppUi.h>
+#include <AknProgressDialog.h>
+#include <AknTabObserver.h> 
+
+
+class CLandmarksApplicationEngine;
+class CLandmarksCategoriesView;
+class CAknNavigationDecorator;
+class CLandmarksListView;
+class CAknProgressDialog;
+
+class CLandmarksAppUi : 
+    public CAknViewAppUi, 
+    public MLandmarksOperationObserver, 
+    public MAknTabObserver,
+    public MProgressDialogCallback
+    {
+    public:
+        CLandmarksAppUi();
+        void ConstructL();
+        ~CLandmarksAppUi();
+        
+    public: // from CAknViewAppUi
+
+        void HandleCommandL(TInt aCommand);
+
+        TKeyResponse HandleKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType);
+        
+        void HandleResourceChangeL( TInt aType );
+
+    public: // from MLandmarksOperationObserver
+
+        /**
+        * NotifyOperationProgressL notifies the progress and status of an
+        * asynchronous operation.
+        *  
+        * @param aOperation the type of operation that is reported.
+        * @param aProgress the progress of the operation.
+        * @param aErrorCode the status of the operation.
+        */
+        void NotifyOperationProgressL(
+            TOperation aOperation, 
+            TInt aProgress, 
+            TInt aErrorCode);
+
+    public: // from MAknTabObserver
+        
+        /** Called by NaviDecorator when tab is changed
+        * @param aIndex new tab seleected
+        */
+        void TabChangedL(TInt aIndex);
+
+    public: // from MProgressDialogCallback
+
+        /**
+        * Called when the dialog has been dismissed.
+        * 
+        * @param aButtonId the button that was pressed to dismiss the dialog.
+        */
+        void DialogDismissedL(TInt aButtonId);
+
+    private:
+
+        /**
+        * Performs the construction phase of this object that is dependent 
+        * that the application engine is initialized.
+        */
+        void PostConstructL();
+
+        /**
+        * Launches a progress dialog displayed when the default landmark 
+        * database is initialized.
+        */
+        void LaunchProgressDialogL();
+
+    private: // Data
+
+        //! decorates the navi pane (with navigation arrows etc)
+        CAknNavigationDecorator* iNaviDecorator;
+
+        //! the application engine
+        CLandmarksApplicationEngine* iEngine;
+
+        /** displays a progress bar when initializing the 
+            default landmark database. */
+        CAknProgressDialog* iProgressDialog;
+
+        /** indicates if exit has been pressed before the 
+            progressDialog is fully deleted */
+        TBool iDelayedExit;
+        
+    };
+
+#endif // __LANDMARKS_APPUI_H__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationlandmarksrefappfors60/Inc/LandmarksApplication.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,56 @@
+/*
+* Copyright (c) 2004-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:  
+*     See class description below
+*
+*/
+
+
+#ifndef __LANDMARKS_APPLICATION_H__
+#define __LANDMARKS_APPLICATION_H__
+
+
+#include <eikapp.h>
+
+
+
+/**
+*  An instance of CLandmarksApplication is the application part of the Eikon
+*  application framework for the Landmarks reference application
+*/
+class CLandmarksApplication : public CEikApplication
+    {
+    public:  // from CEikApplication
+
+        /** 
+        * AppDllUid returns the application DLL UID value.
+        *
+        *  @return the UID of this Application/Dll
+        */
+        TUid AppDllUid() const;
+
+    protected: // from CEikApplication
+
+        /** 
+        * CreateDocumentL creates a CApaDocument object and return a pointer to it
+        *
+        * @return a pointer to the created document
+        */
+        CApaDocument* CreateDocumentL();
+
+    };
+
+#endif // __LANDMARKS_APPLICATION_H__
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationlandmarksrefappfors60/Inc/LandmarksApplicationEngine.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,349 @@
+/*
+* Copyright (c) 2004-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:  
+*     See class description below
+*
+*/
+
+
+#ifndef __LANDMARKS_APPLICATION_ENGINE_H__
+#define __LANDMARKS_APPLICATION_ENGINE_H__
+
+
+#include <e32base.h>
+#include <EPos_TPosLmSortPref.h>
+
+
+class CPosLandmark;
+class CPosLmOperation;
+class CPosLandmarkDatabase;
+class CPosLandmarkSearch;
+class CLandmarksEngine;
+class CLandmarksCategoriesEngine;
+class CLandmarksDbEventHandler;
+class MLandmarksDbObserver;
+class MLandmarksOperationObserver;
+class CPosLandmarkCategory;
+
+
+
+/**
+*  CLandmarksApplicationEngine provides the main interface to the application 
+*  engine component.
+*  
+*  CLandmarksApplicationEngine is the only engine class UI-components need to 
+*  interact with. It uses the default landmark database for reading/writing
+*  landmarks and categories.
+*
+*/
+class CLandmarksApplicationEngine : public CBase
+    {
+    public: // Constructors and destructor
+
+        /**
+        * Two-phased constructor.
+        *
+        * @returns A new instance of this class.
+        */
+        static CLandmarksApplicationEngine* NewL();
+
+        /**
+        * Destructor.
+        */
+        ~CLandmarksApplicationEngine();
+
+    public: // New functions
+
+        /**
+        * NotifyViewActivated notifies the engine which view is in focus. Should
+        * be called by views when they are activated/deactivated. This makes it
+        * possible for the engine to prioritize its asynchronous operations.
+        *
+        * @param aViewId the TUid identifying the view
+        * @param aIsActive ETrue if view is active, EFalse otherwise
+        */
+        void NotifyViewActivated(TUid aViewId, TBool aIsActive);
+
+        /**
+        * StartInitializeDbIfNecessaryL indicates if the default database needs
+        * to be initialised before it can be used. If it needs to be 
+        * initialized the initialization is started immediately and the 
+        * supplied observer is notified when initialization is ready.
+        *
+        * @param aObserver the observer to be notified when initialization is 
+        * ready
+        * @return ETrue if initializing is necessary, EFalse otherwise
+        */
+        TBool StartInitializeDbIfNecessaryL(
+            MLandmarksOperationObserver* aObserver);
+
+        /**
+        * AddDbObserverL registers the supplied observer as observer of 
+        * database events.
+        *
+        * @param aObserver the observer to be notified when a database event 
+        * occurs
+        */
+        void AddDbObserverL(MLandmarksDbObserver* aObserver);
+
+        // Landmark related functions
+
+        /**
+        * LandmarkLC reads all fields of a landmark in the default 
+        * landmark database. Ownership of the returned landmark is transferred
+        * to the caller.
+        * 
+        * @param aItemId the ItemId identifying the landmark
+        * @return a landmark
+        */
+        CPosLandmark* LandmarkLC(TPosLmItemId aItemId);
+
+        /**
+        * CommitLandmarkL commits a modified landmark.
+        *
+        * @param aLandmark the landmark to commit
+        */
+        void CommitLandmarkL(const CPosLandmark& aLandmark);
+
+        /**
+        * DeleteLandmarkL deletes a landmark.
+        *
+        * @param aItemId the itemId identifying the landmark to be deleted
+        */
+        void DeleteLandmarkL(TPosLmItemId aItemId);
+
+        /**
+        * AddLandmarkL adds a landmark to the database.
+        *
+        * @param aLandmark the landmark to add
+        */
+        void AddLandmarkL(CPosLandmark& aLandmark);
+
+        /**
+        * StartSearchingLandmarksL starts an asynchronous search operation for
+        * landmarks. When the search completes the supplied observer is 
+        * notified and it is supposed to fetch the matches by calling 
+        * @ref FetchLandmarkSearchResult(). All landmarks in the database are 
+        * returned.
+        * 
+        * @param aObserver the observer that is notified when the search 
+        * operation completes
+        */
+        void StartSearchingLandmarksL(
+            MLandmarksOperationObserver* aObserver);
+
+        /**
+        * StartSearchingLandmarksL starts an asynchronous search operation for
+        * landmarks. The names of the landmarks are used as criterion for a 
+        * match. When the search completes the supplied observer is notified 
+        * and it is supposed to fetch the matches by calling 
+        * @ref FetchLandmarkSearchResult().
+        * 
+        * @param aSearchPattern search pattern to compare landmarks against
+        * @param aSearchOnlyInPreviousMatches boolean indicating that only
+        * previous matches should be searched
+        * @param aObserver the observer that is notified when the search 
+        * operation completes
+        */
+        void StartSearchingLandmarksL(
+            const TDesC& aSearchPattern, 
+            TBool aSearchOnlyInPreviousMatches,
+            MLandmarksOperationObserver* aObserver);
+
+        /**
+        * FetchLandmarkSearchResult should be called after a successful 
+        * landmark search operation. It returns the matches from the 
+        * previous landmark search operation. Ownership of the returened array
+        * is kept by this class.
+        * 
+        * @return an array containing matches from a previous landmark search
+        * operation
+        */
+        RArray<TPosLmItemId>* FetchLandmarkSearchResult();
+
+        /**
+        * StartReadingLandmarksL should be called after a successful 
+        * landmark search operation. It continously reads a number of landmarks 
+        * partially, i.e. only the name and the icon of the landmarks are read,
+        * until all landmarks found in a previous search operation are read.  
+        * The method is asynchronous and every time a number of landmarks are  
+        * read the supplied observer is notified, @ref FetchLandmarksLC should 
+        * be called to fetch the read landmarks.
+        *
+        * @param aNrOfItemsToReadPerBundle the number of items to read before 
+        * notifying the supplied observer
+        * @param aObserver the observer that is notified every time a bundle of 
+        * landmarks are read
+        */
+        void StartReadingLandmarksL(
+            TInt aNrOfItemsToReadPerBundle,
+            MLandmarksOperationObserver* aObserver);
+
+        /**
+        * FetchLandmarksLC should be called after a successful landmark read
+        * operation. It returns the landmarks that were partially read during a
+        * preceding landmark read operation. Ownership of the returned array is
+        * transferred to the caller.
+        *
+        * @return an array containing partially read landmarks from a previous 
+        * read operation
+        */
+        CArrayPtr<CPosLandmark>* FetchLandmarksLC();
+
+        // Category related functions
+
+        /**
+        * CategoryLC reads all fields of a category in the default 
+        * landmark database. Ownership of the returned category is transferred
+        * to the caller.
+        * 
+        * @param aItemId the ItemId identifying the category
+        * @return a category
+        */
+        CPosLandmarkCategory* CategoryLC(TPosLmItemId aItemId);
+
+        /**
+        * DeleteCategoryL deletes a category.
+        *
+        * @param aItemId the itemId identifying the category to be deleted
+        */
+        void DeleteCategoryL(TPosLmItemId aItemId);
+
+        /**
+        * UpdateCategoryL updates a modified category.
+        *
+        * @param aCategory the category to update
+        */
+        void UpdateCategoryL(const CPosLandmarkCategory& aCategory);
+
+        /**
+        * AddCategoryL adds a category to the default database.
+        *
+        * @param aCategory the category to add
+        */
+        void AddCategoryL(CPosLandmarkCategory& aCategory);
+
+        /**
+        * StartSearchingCategoriesL starts an asynchronous search operation for
+        * categories. When the search completes the supplied observer is 
+        * notified and it is supposed to fetch the matches by calling 
+        * @ref FetchCategorySearchResult. All categoiries in the database are 
+        * returned.
+        * 
+        * @param aObserver the observer that is notified when the search 
+        * operation completes
+        */
+        void StartSearchingCategoriesL(
+            MLandmarksOperationObserver* aObserver);
+
+        /**
+        * StartSearchingCategoriesL starts an asynchronous search operation for
+        * categories. The names of the categories are used as criterion for a
+        * match. When the search completes the supplied observer is notified 
+        * and it is supposed to fetch the matches by calling 
+        * @ref FetchLandmarkSearchResult().
+        * 
+        * @param aSearchPattern search pattern to compare landmarks against
+        * @param aSearchOnlyInPreviousMatches boolean indicating that only
+        * previous matches should be searched
+        * @param aObserver the observer that is notified when the search 
+        * operation completes
+        */
+        void StartSearchingCategoriesL(
+            const TDesC& aSearchPattern, 
+            TBool aSearchOnlyInPreviousMatches,
+            MLandmarksOperationObserver* aObserver);
+
+        /**
+        * FetchCategorySearchResult should be called after a successful 
+        * category search operation. It returns the matches from the 
+        * previous category search operation. Ownership of the returned array
+        * is kept by this class.
+        * 
+        * @return an array containing matches from a previous categories search
+        * operation
+        */
+        RArray<TPosLmItemId>* FetchCategorySearchResult();
+
+        /**
+        * StartReadingCategoriesL should be called after a successful 
+        * category search operation. It continously reads a number of 
+        * categories until all landmarks found in a previous search operation 
+        * are read. The method is asynchronous and every time a number of 
+        * categories are read the supplied observer is notified. 
+        * @ref FetchLandmarksLC should be called to fetch the read categories.
+        *
+        * @param aNrOfItemsToReadPerBundle the number of categories to read 
+        * before notifying the supplied observer
+        * @param aObserver the observer that is notified every time a bundle of 
+        * categories are read
+        */
+        void StartReadingCategoriesL(
+            TInt aNrOfItemsToReadPerBundle,
+            MLandmarksOperationObserver* aObserver);
+
+        /**
+        * FetchCategoriesLC should be called after a successful category read
+        * operation. It returns the categories that were read during a
+        * preceding landmark read operation. Ownership of teh returned array is
+        * transferred to the caller.
+        *
+        * @return an array containing partially read landmarks from a previous 
+        * read operation
+        */
+        CArrayPtr<CPosLandmarkCategory>* FetchCategoriesLC();
+
+        /**
+        * CategoriesL reads all categories in the default database 
+        * synchronously. Ownership of the returned array is transferred to the
+        * caller.
+        *
+        * @return an array containing all categories in the database.
+        */
+        CArrayPtr<CPosLandmarkCategory>* CategoriesL();
+        
+        /** Returns URI of current landmarks database */
+        HBufC* DatabaseUriLC();
+
+    private:
+
+        /**
+        * C++ default constructor.
+        */
+        CLandmarksApplicationEngine();
+
+        /**
+        * By default Symbian 2nd phase constructor is private.
+        */
+        void ConstructL();
+
+    private: // Data
+
+        //! Default landmark database
+        CPosLandmarkDatabase* iDb;
+
+        //! Landmarks engine part
+        CLandmarksEngine* iLandmarksEngine;
+
+        //! Categories engine part
+        CLandmarksCategoriesEngine* iCategoriesEngine;
+
+        //! Database event handler
+        CLandmarksDbEventHandler* iDbEventHandler;
+
+    };
+
+
+#endif // __LANDMARKS_APPLICATION_ENGINE_H__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationlandmarksrefappfors60/Inc/LandmarksCategoriesContainer.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,179 @@
+/*
+* Copyright (c) 2004-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:  
+*     See class description below
+*
+*/
+
+
+#ifndef __LANDMARKS_CATEGORIES_CONTAINER_H__
+#define __LANDMARKS_CATEGORIES_CONTAINER_H__
+
+
+#include "LandmarksContainerBase.h"
+#include <coecobs.h>
+
+
+class CLandmarksCategoriesModel;
+class CLandmarksDbEventHandler;
+class CLandmarksApplicationEngine;
+class CPosLandmarkCategory;
+class CEikMenuBar;
+
+
+
+/**
+*  This is the categories container that contains a listbox and a search field
+*  for listing categories.
+*/
+class CLandmarksCategoriesContainer : public CLandmarksContainerBase, 
+public MCoeControlObserver
+    {
+    public: // Constructors and destructor
+
+        /**
+        * C++ constructor.
+        *
+        * @param aView the parent view
+        * @param aEngine the landmark engine
+        * @param aMenuBar the categories menubar
+        */
+        CLandmarksCategoriesContainer(
+            CAknView& aView,
+            CLandmarksApplicationEngine& aEngine, 
+            CEikMenuBar& aMenuBar);
+
+        /**
+        * Symbian 2nd phase constructor. Should be called after constructor to 
+        * fully construct the object.
+        *
+        * @param aRect the rectangle this Container will be drawn to
+        */
+        void ConstructL(const TRect& aRect);
+
+        /**
+        * Destructor.
+        */
+        ~CLandmarksCategoriesContainer();
+
+    public: // New functions
+
+        /**
+        * Displays a onfirmation dialog and deletes the current category if 
+        * positive response.
+        */ 
+        void DeleteCategoryL();
+
+        /**
+        * Returns the current category id.
+        *
+        * @return the current category id
+        */
+        TPosLmItemId CurrentCategoryId();
+
+        /**
+        * Indicates whether a category is global or not.
+        *
+        * @return ETrue if global, EFalse otherwise.
+        */
+        TBool IsGlobalL();
+
+    public: // from CoeControl
+
+        /**
+        * OfferKeyEventL handles key events.
+        *
+        * @param aKeyEvent the key event
+        * @param aType the type of key event
+        * @return EKeyWasConsumed if keyevent was handled, EKeyWasNotConsumed 
+        * otherwise 
+        */
+        TKeyResponse OfferKeyEventL(
+            const TKeyEvent& aKeyEvent, TEventCode aType);
+
+    public: // From MLandmarksOperationObserver
+
+        /**
+        * NotifyOperationProgressL notifies the progress and status of an
+        * asynchronous operation.
+        *  
+        * @param aOperation the type of operation that is reported.
+        * @param aProgress the progress of the operation.
+        * @param aErrorCode the status of the operation.
+        */
+        void NotifyOperationProgressL(
+            TOperation aOperation, 
+            TInt aProgress, 
+            TInt aErrorCode);
+
+    public: // From MLandmarksDbObserver
+
+        /**
+        * NotifyDbEventL notifies that an event has occurred in the default 
+        * landmark database.
+        *  
+        * @param aEvent contains info about the event.
+        * @param aErrorCode possible error codes if reporting the event was 
+        * not successful.
+        */
+        void NotifyDbEventL(TPosLmEvent& aEvent, TInt aErrorCode);
+
+    public: // From MCoeControlObserver
+
+        /**
+        * HandleControlEventL handles an event from an observed control.
+        *
+        * @param aControl the control that reported the event
+        * @param aEventType contains info about the event
+        */
+        void HandleControlEventL(CCoeControl* aControl, TCoeEvent aEventType);
+
+    private:
+
+        /**
+        * StartUpdateListBoxL initiates an asynchronous refresh of the listbox.
+        */
+        void StartUpdateListBoxL();
+
+        /**
+        * HandleSearchReadyL updates the state of this class when a search 
+        * operation has completed.
+        *
+        * @param aErrorCode the error code of the search operation
+        */
+        void HandleSearchReadyL(TInt aErrorCode);
+
+        /**
+        * HandleReadReadyL updates the state of this class when a read
+        * operation has completed.
+        *
+        * @param aErrorCode the error code of the search operation
+        */
+        void HandleReadReadyL(TInt aErrorCode);
+
+    private: // Data
+
+        //! The menubar displayed for this vew
+        CEikMenuBar& iMenuBar;
+
+        //! Contains the data model for the listbox
+        CLandmarksCategoriesModel* iModel;
+
+        //! Indicates if the first page of landmarks has been read.
+        TBool iReadingFirstPage;
+    };
+
+
+#endif // __LANDMARKS_CATEGORIES_CONTAINER_H__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationlandmarksrefappfors60/Inc/LandmarksCategoriesDialog.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,101 @@
+/*
+* Copyright (c) 2004-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:  
+*     See class description below
+*
+*/
+
+
+#ifndef __LANDMARKS_CATEGORIES_DIALOG_H__
+#define __LANDMARKS_CATEGORIES_DIALOG_H__
+
+
+#include <e32base.h>
+#include <aknselectionlist.h>
+#include <EPos_Landmarks.h>
+
+
+class CLandmarksApplicationEngine;
+class CLandmarksLmCategoriesModel;
+class CPosLandmarkCategory;
+class CAknTitlePane;
+class CGulIcon;
+
+
+
+/**
+*  CLandmarksCategoriesDialog is a dilog for selecting which categories a 
+*  landmark belongs to.
+*/
+class CLandmarksCategoriesDialog : public CAknMarkableListDialog
+	{
+    public: // Constructors and destructor
+
+        /**
+        * Creates, executes and destroys the dialog after dismissed.
+        * @param aLmCategoriesModel landmark categories
+        * @return EFalse if dialog was cancelled
+        */
+        static TInt RunDialogL(CLandmarksLmCategoriesModel& aLmCategoriesModel);
+
+        /**
+        * Destructor.
+        */
+	    ~CLandmarksCategoriesDialog();
+
+    protected: // From CEikDialog
+
+        /**
+        * Called after the dialog is layed out.
+        */
+        void PostLayoutDynInitL();
+
+        /**
+        * OfferKeyEventL handles key events.
+        *
+        * @param aKeyEvent the key event
+        * @param aType the type of key event
+        * @return EKeyWasConsumed if keyevent was handled, EKeyWasNotConsumed 
+        * otherwise 
+        */
+		TKeyResponse OfferKeyEventL(
+            const TKeyEvent& aKeyEvent,
+            TEventCode aType);
+
+    private:
+
+        /**
+        * C++ constructor.
+        *
+        * @param aSelectedItem the selected item.
+        * @param aMarkedItems an array of selected categories.
+        * @param aListItems array of items to display.
+        */
+	    CLandmarksCategoriesDialog(
+            TInt& aSelectedItem,
+            CArrayFixFlat<TInt>* aMarkedItems,
+            CDesCArray* aListItems);
+
+    private: // Data
+
+        //! The title pane that is dynamically updated
+        CAknTitlePane* iTitlePane;
+
+        //! The original title that the title pane displayed before modified
+        HBufC* iOriginalTitle;
+	};
+
+#endif // __LANDMARKS_CATEGORIES_DIALOG_H__
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationlandmarksrefappfors60/Inc/LandmarksCategoriesEngine.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,260 @@
+/*
+* Copyright (c) 2004-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:  
+*     See class description below
+*
+*/
+
+
+#ifndef __LANDMARKS_CATEGORIES_ENGINE_H__
+#define __LANDMARKS_CATEGORIES_ENGINE_H__
+
+
+#include "LandmarksEngineBase.h"
+#include "LandmarksOperationObserver.h"
+
+
+class CPosLmCategoryManager;
+class CPosLandmarkCategory;
+class CPosLandmarkDatabase;
+class CPosLmItemIterator;
+
+
+
+/**
+*  Implements all functions of the engine related to categories. This engine 
+*  servs the categories view.
+*/
+class CLandmarksCategoriesEngine : public CLandmarksEngineBase
+    {
+    public: // Constructors and destructor
+
+        /**
+        * Two-phased constructor.
+        *
+        * @param aDb an instance of the default landmark database
+        */
+        static CLandmarksCategoriesEngine* NewL(CPosLandmarkDatabase& aDb);
+
+        /**
+        * Destructor.
+        */
+        ~CLandmarksCategoriesEngine();
+
+    public: // New functions
+
+        /**
+        * AddCategoryL adds a category to the database.
+        *
+        * @param aCategory the landmark to add
+        */
+        void AddCategoryL(CPosLandmarkCategory& aCategory);
+
+        /**
+        * UpdateCategoryL updates a category in the database.
+        *
+        * @param aCategory the landmark to update
+        */
+        void UpdateCategoryL(const CPosLandmarkCategory& aCategory);
+
+        /**
+        * DeleteCategoryL deletes a category.
+        *
+        * @param aItemId the itemId identifying the category to be deleted
+        */
+        void DeleteCategoryL(TPosLmItemId aItemId);
+
+        /**
+        * CategoryLC reads a category in the default landmark database.
+        * Ownership of the returned category is transferred to the caller. 
+        * 
+        * @param aItemId the ItemId identifying the category
+        * @return a category
+        */
+        CPosLandmarkCategory* CategoryLC(TPosLmItemId aItemId);
+
+        /**
+        * StartSearchingCategoriesL starts an asynchronous search operation for
+        * categories. When the search completes the supplied observer is 
+        * notified and it is supposed to fetch the matches by calling 
+        * @ref FetchCategorySearchResult. All categoiries in the database are 
+        * returned.
+        * 
+        * @param aObserver the observer that is notified when the search 
+        * operation completes
+        */
+        void StartSearchingCategoriesL(
+            MLandmarksOperationObserver* aObserver);
+
+        /**
+        * StartSearchingCategoriesL starts an asynchronous search operation for
+        * categories. The names of the categories are used as criterion for a
+        * match. When the search completes the supplied observer is notified 
+        * and it is supposed to fetch the matches by calling 
+        * @ref FetchLandmarkSearchResult.
+        * 
+        * @param aSearchPattern search pattern to compare landmarks against
+        * @param aSearchOnlyInPreviousMatches boolean indicating that only
+        * previous matches should be searched
+        * @param aObserver the observer that is notified when the search 
+        * operation completes
+        */
+        void StartSearchingCategoriesL(
+            const TDesC& aSearchPattern,
+            TBool aSearchOnlyInPreviousMatches,
+            MLandmarksOperationObserver* aObserver);
+
+        /**
+        * FetchSearchResultL should be called after a successful 
+        * category search operation. It returns the matches from the 
+        * previous category search operation. Ownership of the returned array 
+        * is kept by this class.
+        * 
+        * @return an array containing matches from a previous categories search
+        * operation
+        */
+        RArray<TPosLmItemId>* FetchSearchResult();
+
+        /**
+        * StartReadingCategoriesL should be called after a successful 
+        * category search operation. It continously reads a number of 
+        * categories until all landmarks found in a previous search operation 
+        * are read. The method is asynchronous and every time a number of 
+        * categories are read the supplied observer is notified. 
+        * @ref FetchLandmarksLC should be called to fetch the read categories.
+        *
+        * @param aNrOfItemsToReadPerBundle the number of categories to read 
+        * before notifying the supplied observer
+        * @param aObserver the observer that is notified every time a bundle of 
+        * categories are read
+        */
+        void StartReadingCategoriesL(
+            TInt aNrOfItemsToReadPerBundle,
+            MLandmarksOperationObserver* aObserver);
+
+        /**
+        * FetchCategoriesLC should be called after a successful category read
+        * operation. It returns the categories that were read during a
+        * preceding landmark read operation. Ownership of the returned array 
+        * is transferred to the caller.
+        *
+        * @return an array containing partially read landmarks from a previous 
+        * read operation
+        */
+        CArrayPtr<CPosLandmarkCategory>* FetchCategoriesLC();
+
+        /**
+        * CategoriesL reads all categories in the default database 
+        * synchronously.Ownership of the returned array is transferred 
+        * to the caller.
+        *
+        * @return an array containing all categories in the database.
+        */
+        CArrayPtr<CPosLandmarkCategory>* CategoriesL();
+
+    protected: // From CActive
+
+        /**
+        * Handles an active object’s request completion event.
+        */
+        void RunL();
+
+        /**
+        * Implements cancellation of an outstanding request.
+        */
+        void DoCancel();
+
+        /**
+        * Handles a leave occurring in the request completion event 
+        * handler RunL().
+        *
+        * @return KErrNone
+        */
+        TInt RunError(TInt aError);
+
+    private: // New functions
+
+        /**
+        * C++ constructor.
+        *
+        * @param aDb an instance of the default landmark database
+        */
+        CLandmarksCategoriesEngine(CPosLandmarkDatabase& aDb);
+
+        /**
+        * By default Symbian 2nd phase constructor is private.
+        */
+        void ConstructL();
+
+        /**
+        * ReadSomeLandmarksL reads a number of categories. The number of 
+        * categories is specified when initiating an asynchronous categories 
+        * read operation.
+        */
+        void ReadSomeCategoriesL();
+
+        /**
+        * NotifyOperationReadyL notifies the observer of an asynchronous 
+        * operation that the operation has completed.
+        *
+        * @param aOperation the kind of operation that is finished
+        * @param aErrorCode the complete code the operation returned
+        */
+        void NotifyOperationReadyL(TOperation aOperation, TInt aErrorCode);
+
+        /**
+        * Fetches the matches after a search operation and populates the data 
+        * member @ref iItemIds
+        */
+        void PopulateItemIdArrayL();
+
+    private: // Data
+
+        //! provides access to categories in the default database
+        CPosLmCategoryManager* iCatManager;
+
+        //! an array containing the item Ids of the last search
+        RArray<TPosLmItemId> iItemIds;
+
+        /** represents a subset of a search result. Used when 
+            reading categories */
+        RArray<TPosLmItemId> iSubSetOfIds;
+
+        /** the observer to notify the progress of asynchronous 
+            operations */
+        MLandmarksOperationObserver* iObserver;
+
+        //! keeps track of which type of operation is executed
+        TOperation iActiveOperation;
+
+        //! keeps track of which item to read
+        TInt iCurrentItemId;
+
+        //! keeps track of how many items to read per bundle
+        TInt iNrOfItemsToRead;
+
+        /** indicates if there is any previous result to 
+            search */
+        TBool iSearchResultExists;
+
+        /** indicates if the current search operation has 
+            carried out with or without search pattern */
+        TBool iFilterSearch;
+
+    };
+
+
+#endif // __LANDMARKS_CATEGORIES_ENGINE_H__
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationlandmarksrefappfors60/Inc/LandmarksCategoriesModel.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,151 @@
+/*
+* Copyright (c) 2004-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:  
+*     See class description below
+*
+*/
+
+
+#ifndef __LANDMARKS_CATEGORIES_MODEL_H__
+#define __LANDMARKS_CATEGORIES_MODEL_H__
+
+
+#include <e32base.h>
+
+
+class CPosLandmarkCategory;
+
+
+
+/**
+*  CLandmarksCategoriesModel holds the data displayed in the category listbox.
+*/
+class CLandmarksCategoriesModel : public CBase
+	{
+    public: // Constructors and destructor
+
+        /**
+        * Two-phased constructor.
+        */
+        static CLandmarksCategoriesModel* NewL();
+
+        /**
+        * Destructor.
+        */
+	    ~CLandmarksCategoriesModel();
+
+    public: // New functions
+
+        /**
+        * Sets the data member iItemIds
+        * 
+        * @param aItemIds a pointer to an array of item ids
+        */
+        void SetItemIds(RArray<TPosLmItemId>* aItemIds);
+
+        /**
+        * ItemList returns a pointer to an array to be used for the listbox
+        *
+        * @return a pointer to an array of descriptors to be displayed in the 
+        * listbox
+        */
+	    CDesCArraySeg* ItemList();
+
+        /**
+        * SetCurrentItem sets the item in the model that is selected in the 
+        * listbox.
+        *
+        * @param aIndex the index in the list box that is selected
+        */
+	    void SetCurrentItem(TInt aIndex);
+	    
+        /**
+        * CurrentItemId returns the id of the current item from the model.
+        *
+        * @return the id of the current item from the model, KPosLmNullItemId 
+        * if there is no current item.
+        */
+	    TPosLmItemId CurrentItemId();
+	    
+        /**
+        * CreateIconListL creates and returns an array of icons that is 
+        * displayed in the listbox. Caller takes ownership of the returned 
+        * array.
+        *
+        * @return a pointer to an array to be displayed in the listbox
+        */
+        CIconList* CreateIconListL();
+
+        /**
+        * Repopulates a part of the model.
+        *
+        * @param aCategories the categories to insert to the model
+        */
+        void RepopulateModelL(
+            CArrayPtr<CPosLandmarkCategory>* aCategories);
+
+    private:
+
+        /**
+        * C++ constructor.
+        */
+	    CLandmarksCategoriesModel();
+
+        /**
+        * By default Symbian 2nd phase constructor is private.
+        */
+	    void ConstructL();
+
+        /**
+        * Formats a list item to fit a CEikColumnistBox with one graphic 
+        * column and one descriptor column.
+        *
+        * @param aCategory the category this list item will represent
+        * @return a formatted descriptor buffer
+        */
+        HBufC* FormatListItemLC(CPosLandmarkCategory& aCategory);
+
+        /**
+        * Appends an icen to the icon array.
+        *
+        * @param aMbmFile the multi bitmap file containing the icon to add
+        * @param aIconOffset the offset in the mbm-file where the icon is 
+        * located
+        * @param aMaskOffset the offset in the mbm-file where the icon mask is
+        * located
+        */
+        void AppendIconL(
+            const TDesC& aMbmFile, 
+            TInt aIconOffset, 
+            TInt aMaskOffset);
+
+    private: // Data
+
+        //! contains the ids idenetifying the categories in the DB
+	    RArray<TPosLmItemId>* iItemIds;
+
+        //! indicates which item in the model is selected
+	    TInt iCurrentItem;
+
+        /** Array of formated descriptors suitable to display in a column 
+            listbox */
+	    CDesCArraySeg* iListItems;
+
+        //! an array of category icons
+        CIconList* iIconList;
+
+	};
+
+#endif // __LANDMARKS_CATEGORIES_MODEL_H__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationlandmarksrefappfors60/Inc/LandmarksCategoriesView.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,139 @@
+/*
+* Copyright (c) 2004-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:  
+*     See class description below
+*
+*/
+
+
+#ifndef __LANDMARKS_CATEGORIES_VIEW_H__
+#define __LANDMARKS_CATEGORIES_VIEW_H__
+
+
+#include <aknview.h>
+
+
+class CLandmarksCategoriesContainer;
+class CLandmarksApplicationEngine;
+class CEikMenuPane;
+
+
+
+/**
+*  CLandmarksCategoriesView is the view displaying categories in the Landmarks 
+*  Reference application.
+*/
+class CLandmarksCategoriesView: public CAknView
+    {
+    public: // Constructors and destructor
+
+        /**
+        * Two-phased constructor.
+        *
+        * @param aEngine the engine used for fetching category data. 
+        * This object takes ownership of the engine.
+        */
+        static CLandmarksCategoriesView* NewLC(
+            CLandmarksApplicationEngine* aEngine);
+
+        /**
+        * Destructor.
+        */
+        ~CLandmarksCategoriesView();
+
+    public: // from CAknView
+
+        /**
+        * Id Identity of this view to the system
+        *
+        * @return the ID of this view
+        */
+        TUid Id() const;
+
+        /** 
+        * HandleCommandL handles user menu selections.
+        *
+        * @param aCommand the enumerated code for the option selected
+        */
+        void HandleCommandL(TInt aCommand);
+
+        /**
+        * DoActivateL Responsible for activating this view.
+        *
+        * @param aPrevViewId The id of the previous view
+        * @param aCustomMessageId message identifier
+        * @param aCustomMessage custom message provided when the view is changed
+        */
+        void DoActivateL(
+            const TVwsViewId& aPrevViewId,
+            TUid aCustomMessageId,
+            const TDesC8& aCustomMessage);
+
+        /**
+        * DoDeactivate Responsible for deactivating this view.
+        */
+        void DoDeactivate();
+
+        /** 
+        * DynInitMenuPaneL initializes the menu pane before it is displayed.
+        *
+        * @param aResourceId a resource ID indetifying the menu bar containing 
+        * the menu pane to be initialized.
+        * @param aMenuPane the menu pane to initialize.
+        */
+        void DynInitMenuPaneL(
+            TInt aResourceId,
+            CEikMenuPane* aMenuPane);
+
+        /** Forwards resource change event to container. Used for 
+         *  layout change handling */
+        void HandleResourceChange( TInt aType );
+
+    private:
+
+        /**
+        * C++ constructor.
+        *        
+        * @param aEngine the engine used for fetching categories data.
+        */
+        CLandmarksCategoriesView(
+            CLandmarksApplicationEngine* aEngine);
+
+        /**
+        * By default Symbian 2nd phase constructor is private.
+        */
+        void ConstructL();
+
+        /**
+        * Launches a text query dialog and adds a category to the database.
+        */
+        void AddCategoryL();
+
+        /**
+        * Launches a text query dialog and renames a category in the database.
+        */
+        void RenameCategoryL();
+
+    private: // Data
+
+        //! The container containing the graphical components of the view
+        CLandmarksCategoriesContainer* iContainer;
+
+        //! The application engine used for modifying categories
+        CLandmarksApplicationEngine* iEngine;
+
+    };
+
+#endif // __LANDMARKS_CATEGORIES_VIEW_H__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationlandmarksrefappfors60/Inc/LandmarksCommonData.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,53 @@
+/*
+* 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:  Contains data and definitions used by several classes
+*
+*/
+
+
+#ifndef __LANDMARKS_COMMON_DATA_H__
+#define __LANDMARKS_COMMON_DATA_H__
+
+
+#include <gulicon.h>
+#include <AknIconUtils.h>
+
+// DATA TYPES
+typedef CArrayPtr<CGulIcon> CIconList;
+
+
+_LIT(KTab, "\t");
+_LIT(KWildCard, "*");
+_LIT(KLandmarksMbmFileName, "\\resource\\apps\\LmRefApp.mbm");
+
+_LIT(KLatLongFormat, "%g");
+_LIT(KListBoxLatLongFormat, "%S%d%c %d' %.3f\"");
+_LIT(KPositiveSign, "+");
+_LIT(KNegativeSign, "-");
+
+const TInt KMinutesPerDegree = 60;
+const TInt KSecondsPerMinute = 60;
+const TInt KDegreeSign = 0x00B0;
+
+const TInt KNrOfDecimals = 2;
+const TInt KNrOfItemsDisplayed = 5;
+const TInt KGranularity = 8;
+
+const TReal KDbUsageLimit = 0.8;
+
+const TInt KDefaultGlobalIconIndex = 0;     // see CreateIconListL()
+const TInt KDefaultUserIconIndex = 1;
+
+#endif // __LANDMARKS_COMMON_DATA_H__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationlandmarksrefappfors60/Inc/LandmarksContainer.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,190 @@
+/*
+* Copyright (c) 2004-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:  
+*     See class description below
+*
+*/
+
+
+#ifndef __LANDMARKS_CONTAINER_H__
+#define __LANDMARKS_CONTAINER_H__
+
+#include "LandmarksContainerBase.h"
+#include <coecobs.h>
+
+class CLandmarksApplicationEngine;
+class CAknNavigationDecorator;
+class CLandmarksModel;
+
+/**
+*  This is the landmarks container that contains a listbox and a search field
+*  for listing landmarks.
+*/
+class CLandmarksContainer : 
+    public CLandmarksContainerBase, 
+    public MCoeControlObserver
+    {
+    public: // Constructors and destructor
+
+        /**
+        * C++ constructor.
+        *
+        * @param aView parent view
+        * @param aEngine the landmark engine
+        * @param aNaviDecorator the tab group to hide when editing landmarks
+        */
+        CLandmarksContainer(
+            CAknView& aView,
+            CLandmarksApplicationEngine& aEngine, 
+            CAknNavigationDecorator* aNaviDecorator);
+
+        /**
+        * Symbian 2nd phase constructor. Should be called after constructor to 
+        * fully construct the object.
+        *
+        * @param aRect the rectangle this Container will be drawn to
+        */
+        void ConstructL(const TRect& aRect);
+
+        /**
+        * Destructor.
+        */
+        ~CLandmarksContainer();
+
+    public: // New functions
+
+        /**
+        * Gets currently highlighted landmarks
+        * @return The landmark item id.
+        */
+        TPosLmItemId CurrentLandmark();
+
+        /** Returns IDs of currentlyt selected items */
+        void GetSelectedLandmarksL( RArray<TPosLmItemId>& aItemIds );
+
+        /**
+        * Displays a confirmation dialog and deletes the current landmark if 
+        * positive response.
+        */ 
+        void DeleteLandmarkL();
+        
+    public: // from CoeControl
+
+        /**
+        * OfferKeyEventL handles key events.
+        *
+        * @param aKeyEvent the key event
+        * @param aType the type of key event
+        * @return EKeyWasConsumed if keyevent was handled, EKeyWasNotConsumed 
+        * otherwise 
+        */
+        TKeyResponse OfferKeyEventL(
+            const TKeyEvent& aKeyEvent, 
+            TEventCode aType);
+
+    public: // From MLandmarksOperationObserver
+
+        /**
+        * NotifyOperationProgressL notifies the progress and status of an
+        * asynchronous operation.
+        *  
+        * @param aOperation the type of operation that is reported.
+        * @param aProgress the progress of the operation.
+        * @param aErrorCode the status of the operation.
+        */
+        void NotifyOperationProgressL(
+            TOperation aOperation, 
+            TInt aProgress, 
+            TInt aErrorCode);
+
+    public: // From MLandmarksDbObserver
+
+        /**
+        * NotifyDbEventL notifies that an event has occurred in the default 
+        * landmark database.
+        *  
+        * @param aEvent contains info about the event.
+        * @param aErrorCode possible error codes if reporting the event was 
+        * not successful.
+        */
+        void NotifyDbEventL(TPosLmEvent& aEvent, TInt aErrorCode);
+
+    public: // From MCoeControlObserver
+
+        /**
+        * HandleControlEventL handles an event from an observed control.
+        *
+        * @param aControl the control that reported the event
+        * @param aEventType contains info about the event
+        */
+        void HandleControlEventL(CCoeControl* aControl, TCoeEvent aEventType);
+
+    private:
+
+        /**
+        * StartUpdateListBoxL initiates an asynchronous refresh of the listbox.
+        */
+        void StartUpdateListBoxL();
+
+        /**
+        * HandleSearchReadyL updates the state of this class when a search 
+        * operation has completed.
+        *
+        * @param aErrorCode the error code of the search operation
+        */
+        void HandleSearchReadyL(TInt aErrorCode);
+
+        /**
+        * HandleReadReadyL updates the state of this class when a read
+        * operation has completed.
+        *
+        * @param aErrorCode the error code of the search operation
+        * @param aFinished ETrue if there are no more landmarks to read, 
+        * EFalse otherwise
+        */
+        void HandleReadReadyL(TInt aErrorCode, TBool aFinished);
+
+        /**
+        * Indicates if it is necessary to refresh the listbox 
+        * when a landmark has been updated.
+        *
+        * @param aModifiedLandmark the id of the landmark that has been updated
+        * @return ETrue if refresh is necessary, EFalse otherwise
+        */
+        TBool IsRefreshNeededL(TPosLmItemId& aModifiedLandmark);
+
+        /**
+        * Stores the name of the current landmark.
+        */
+        void StoreCurrentLandmarkNameL();
+
+    private: // Data
+
+        //! Decorates the navi pane (with navigation arrows etc)
+        CAknNavigationDecorator* iNaviDecorator;
+
+        //! The data model for the listbox
+        CLandmarksModel* iModel;
+
+        //! Indicates if the first page of landmarks has been read.
+        TBool iReadingFirstPage;
+
+        //! Keeps the name of the current item
+        HBufC* iCurrentName;
+
+        //! Indicates if the landmark list is being refreshed
+        TBool iIsActive;
+    };
+
+#endif // __LANDMARKS_CONTAINER_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationlandmarksrefappfors60/Inc/LandmarksContainerBase.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,163 @@
+/*
+* Copyright (c) 2004-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: 
+*     See class description below
+*
+*/
+
+
+#ifndef __LANDMARKS_CONTAINER_BASE_H__
+#define __LANDMARKS_CONTAINER_BASE_H__
+
+
+#include "LandmarksOperationObserver.h"
+#include "LandmarksDbObserver.h"
+#include <coecntrl.h>
+
+
+class CAknView;
+class CLandmarksApplicationEngine;
+class CLandmarksListBox;
+class CAknSearchField;
+
+
+
+/**
+*  CLandmarksContainerBase is an abstrct class that contains functions and data
+*  common for all view containers in this application.
+*/
+class CLandmarksContainerBase :
+    public CCoeControl,
+    public MLandmarksDbObserver,
+    public MLandmarksOperationObserver
+    {
+    public: // Constructors and destructor
+
+        /**
+        *  Destructor
+        */
+        ~CLandmarksContainerBase();
+
+    public: // New functions
+
+        /**
+        * Indicates whether a listbox item is selected or not.
+        */
+        TBool IsItemSelected();
+
+    public: // from CoeControl
+
+        /**
+        * Gets the number of controls contained in a compound control
+        *
+        * @return Number of component controls
+        */
+        TInt CountComponentControls() const;
+
+        /**
+        * Gets the specified component
+        *
+        * @param aIndex specification for component pointer
+        * @return Pointer to component control
+        */
+        CCoeControl* ComponentControl(TInt aIndex) const;
+
+        /**
+        * Called by framework when the view size is changed.
+        */
+        void SizeChanged();
+        
+        /** Reacts to screen size change */
+        void HandleResourceChange( TInt aType );
+
+    public: // From MLandmarksDbObserver
+
+        /**
+        * Notifies that an event has occurred in the default
+        * landmark database.
+        *
+        * @param aEvent contains info about the event.
+        * @param aErrorCode possible error codes if reporting the event was
+        * not successful.
+        */
+        void NotifyDbEventL(TPosLmEvent& aEvent, TInt aErrorCode) = 0;
+
+    public: // From MLandmarksOperationObserver
+
+        /**
+        * Notifies the progress and status of an
+        * asynchronous operation.
+        *
+        * @param aOperation the type of operation that is reported.
+        * @param aProgress the progress of the operation.
+        * @param aErrorCode the status of the operation.
+        */
+        void NotifyOperationProgressL(
+            TOperation aOperation,
+            TInt aProgress,
+            TInt aErrorCode) = 0;
+
+    protected: // Constructors
+
+        /**
+        * C++ default constructor.
+        *
+        * @param aView The parent view.
+        * @param aEngine The application engine.
+        */
+        CLandmarksContainerBase(
+            CAknView& aView,
+            CLandmarksApplicationEngine& aEngine);
+
+        /**
+        * Performs the second phase construction of a
+        * CLandmarksContainerBase object. Should be called by subclasses.
+        *
+        * @param aRect Frame rectangle for container.
+        */
+        void ConstructL(const TRect& aRect);
+
+    private:
+
+        /**
+        * Creates the find box.
+        */
+        void CreateFindBoxL();
+
+        /**
+        * Creates the listbox.
+        */
+        void CreateListBoxL();
+
+    protected: // Data
+
+        //! the control used to display icons and descriptors.
+        CLandmarksListBox* iListBox;
+
+        //! the control used to display a search field.
+        CAknSearchField* iFindBox;
+
+        //! parent view
+        CAknView& iView;
+
+        //! the application engine used for accessing landmarks
+        CLandmarksApplicationEngine& iEngine;
+
+        //! a buffer containing the last descriptor in the find box.
+        HBufC* iOldFilter;
+
+    };
+
+#endif // __LANDMARKS_CONTAINER_BASE_H__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationlandmarksrefappfors60/Inc/LandmarksDbEventHandler.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,109 @@
+/*
+* Copyright (c) 2004-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:  
+*     See class description below
+*
+*/
+
+
+#ifndef __LANDMARKS_DB_EVENT_HANDLER_H__
+#define __LANDMARKS_DB_EVENT_HANDLER_H__
+
+
+#include "LandmarksDbObserver.h"
+#include <e32base.h>
+#include <EPos_Landmarks.h>
+
+
+class CPosLandmarkDatabase;
+class MLandmarksDbEventObserver;
+
+
+
+/**
+*  In the Landmark reference application there is only one instance of 
+*  CLandmarksDbEventHandler. It is the only object observing the 
+*  default landmark database directly. Other objects that want to observe the 
+*  database must register to this object. When an event occurs this object 
+*  broadcasts it to all registered observers.
+*/
+class CLandmarksDbEventHandler : public CActive
+    {
+    public: // Constructors and destructor
+
+        /**
+        * C++ constructor.
+        *
+        * @param aDb the database to observer
+        */
+        CLandmarksDbEventHandler(
+            CPosLandmarkDatabase& aDb);
+
+        /**
+        * Destructor.
+        */
+        ~CLandmarksDbEventHandler();
+
+    public: // New functions
+
+        /**
+        * AddObserverL registers a db observer.
+        *
+        * @param aObserver the observer to register
+        */
+        void AddObserverL(MLandmarksDbObserver* aObserver);
+
+    protected: // from CActive
+
+        /**
+        * Handles an active object’s request completion event.
+        */
+        void RunL();
+
+        /**
+        * Implements cancellation of an outstanding request.
+        */
+        void DoCancel();
+
+        /**
+        * Handles a leave occurring in the request completion event 
+        * handler RunL().
+        *
+        * @return KErrNone
+        */
+        TInt RunError(TInt aError);
+
+    private:
+
+        /**
+        * Starts observing of db enevs
+        */
+        void ObserveEvents();
+
+    private:
+
+        //! The database to observe
+        CPosLandmarkDatabase& iDb;
+
+        //! A db event to be reported
+        TPosLmEvent iEvent;
+
+        //! An array of registered observers
+        RPointerArray<MLandmarksDbObserver> iDbObservers;
+
+    };
+
+
+#endif // __LANDMARKS_DB_EVENT_HANDLER_H__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationlandmarksrefappfors60/Inc/LandmarksDbObserver.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,50 @@
+/*
+* Copyright (c) 2004-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:  
+*     See class description below
+*
+*/
+
+
+#ifndef __LANDMARKS_DB_OBSERVER_H__
+#define __LANDMARKS_DB_OBSERVER_H__
+
+
+#include <e32base.h>
+#include <EPos_Landmarks.h>
+
+
+
+/**
+*  An observer interface used for notifying events originating from the 
+*  landmarks default database.
+*/
+class MLandmarksDbObserver
+    {
+    public: // new functions
+
+        /**
+        * NotifyDbEventL notifies that an event has occurred in the default 
+        * landmark database.
+        *  
+        * @param aEvent contains info about the event.
+        * @param aErrorCode possible error codes if reporting the event was 
+        * not successful.
+        */
+        virtual void NotifyDbEventL(TPosLmEvent& aEvent, TInt aErrorCode) = 0;
+
+    };
+
+#endif // __LANDMARKS_DB_OBSERVER_H__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationlandmarksrefappfors60/Inc/LandmarksDocument.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,77 @@
+/*
+* Copyright (c) 2004-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:  
+*     See class description below
+*
+*/
+
+
+#ifndef __LANDMARKS_DOCUMENT_H__
+#define __LANDMARKS_DOCUMENT_H__
+
+
+#include <AknDoc.h>
+
+
+class CLandmarksAppUi;
+class CEikApplication;
+
+
+
+/**
+*  An instance of CLandmarksDocument is the application part of the Avkon
+*  application framework for the Landmarks reference application
+*/
+class CLandmarksDocument : public CAknDocument
+    {
+    public: // Constructors and destructor
+
+        /**
+        * Two-phased constructor.
+        *
+        * @param aApp an eikon application instance
+        */
+        static CLandmarksDocument* NewL(CEikApplication& aApp);
+
+        /**
+        * Destructor.
+        */
+        ~CLandmarksDocument();
+
+    public: // from CAknDocument
+
+        /**
+        * CreateAppUiL creates a CLandmarksAppUi object and return a pointer 
+        * to it.
+        *
+        * @return a pointer to the created instance of the AppUi created
+        */
+        CEikAppUi* CreateAppUiL();
+
+    private:
+
+        /**
+        * C++ constructor.
+        */
+        CLandmarksDocument(CEikApplication& aApp);
+
+        /**
+        * By default Symbian 2nd phase constructor is private.
+        */
+        void ConstructL();
+
+    };
+
+#endif // __LANDMARKS_DOCUMENT_H__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationlandmarksrefappfors60/Inc/LandmarksEditDialog.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,328 @@
+/*
+* 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: 
+*     See class description below
+*
+*/
+
+
+#ifndef __LANDMARKS_EDIT_DIALOG_H__
+#define __LANDMARKS_EDIT_DIALOG_H__
+
+
+#include <AknForm.h>
+#include <AknForm.h>
+#include "LandmarksOperationObserver.h"
+
+class CLandmarksApplicationEngine;
+class CLandmarksLmCategoriesModel;
+class CLandmarksPositionRequest;
+class CPosLandmarkCategory;
+class CAknTitlePane;
+class CAknWaitDialog;
+class CPosLandmark;
+class TLocality;
+class TPositionInfo;
+
+
+
+/**
+*  A dialog that makes it possible to edit certain fields of a landmark.
+*/
+class CLandmarksEditDialog : 
+    public CAknForm, 
+    public MLandmarksOperationObserver
+    {
+    public: // Constructors and destructor
+
+        /**
+        * Two-phased constructor.
+        *
+        * @param aLandmark the landmark to edit
+        * @param aUseCurrentLocation whether to initiate landmark with
+        * current location
+        * @param aEdited ETrue if the landmark has been modified,
+        * EFalse otherwise
+        * @param aEngine the application engine used for accessing categories
+        * @param aInitialFocusFieldId Item to select on startup
+        */
+        static CLandmarksEditDialog* NewLC(
+            CPosLandmark& aLandmark,
+            TBool aUseCurrentLocation,
+            TBool& aEdited,
+            CLandmarksApplicationEngine& aEngine,
+            TInt aInitialFocusFieldId = 0);
+
+        /**
+        * Destructor.
+        */
+        ~CLandmarksEditDialog();
+
+    public: // From CAknDialog
+
+        /**
+        * DynInitMenuPaneL initializes the menu pane before it is displayed.
+        *
+        * @param aResourceId a resource ID indetifying the menu bar containing
+        * the menu pane to be initialized.
+        * @param aMenuPane the menu pane to initialize.
+        */
+        void DynInitMenuPaneL(TInt aResourceId, CEikMenuPane* aMenuPane);
+
+        /**
+        * Processes user commands.
+        *
+        * @param aCommandId id of the command to respond to
+        */
+        void ProcessCommandL(TInt aCommandId);
+
+    public: // From MLandmarksOperationObserver
+
+        /**
+        * NotifyOperationProgressL notifies the progress and status of an
+        * asynchronous operation.
+        *
+        * @param aOperation the type of operation that is reported.
+        * @param aProgress the progress of the operation.
+        * @param aErrorCode the status of the operation.
+        */
+        void NotifyOperationProgressL(
+            TOperation aOperation,
+            TInt aProgress,
+            TInt aErrorCode);
+
+    protected: // From CAknForm
+
+        /**
+        * Handles a dialog button press for the specified dialog button.
+        *
+        * @param aButtonId
+        * @return ETrue if OK to exit, EFalse to keep the dialog active
+        */
+        TBool OkToExitL(TInt aButtonId);
+
+
+        /**
+        * SaveFormDataL deals with the occasion of a change from
+        * edit->view mode and the user wishes to save the changes.
+        *
+        * @return ETrue if the editable state can be left, EFalse otherwise
+        */
+        TBool SaveFormDataL();
+
+    private: // From CEikDialog
+
+        /**
+        * PreLayoutDynInitL initialises the dialog's controls before the dialog
+        * is sized and layed out.
+        */
+        void PreLayoutDynInitL();
+
+        /**
+        * PostLayoutDynInitL initialises the dialog's controls after the dialog
+        * has been sized but before it has been activated.
+        */
+        void PostLayoutDynInitL();
+
+        /**
+        * Selects desired line on startup
+        */
+        void SetInitialCurrentLine();
+
+        /**
+        * Handles control events.
+        *
+        * @param aControl The control reporting the event
+        * @param aEventType The event type
+        */
+        void HandleControlEventL(
+            CCoeControl* aControl,
+            TCoeEvent aEventType);
+
+        /** Handles layout switch */
+        void HandleResourceChange( TInt aType );
+
+    private:
+
+        enum TErrorInForm
+            {
+            ENoErrors,
+            EWrongLatitude,
+            EWrongLongitude,
+            EWrongAltitude,
+            EWrongHorAcc,
+            EWrongVerAcc,
+            EWrongRadius,
+            EOnlyLatOrLon,
+            ENoLatLonButHorAcc,
+            ENoLatLonButAltitude,
+            ENoAltButVerAcc,
+            EEmptyLandmarkName,
+            };
+
+        /** Constructor
+         *
+         *  @param aLandmark the landmark to edit
+         *  @param aUseCurrentLocation whether to initiate landmark with current location
+         *  @param aEdited ETrue if the landmark has been modified, EFalse otherwise
+         *  @param aEngine the application engine used for accessing categories
+         *  @param aInitialFocusFieldId Item to select on startup
+         */
+        CLandmarksEditDialog(
+            CPosLandmark& aLandmark,
+            TBool aUseCurrentLocation,
+            TBool& aEdited,
+            CLandmarksApplicationEngine& aEngine,
+            TInt aInitialFocusFieldId);
+
+        void ConstructL();
+
+        /** Configures the fields of the landmark to view/edit */
+        void ConfigureFieldsL();
+
+        /** Copies address data from landmark to fields */
+        void ConfigureAddressFieldsL();
+
+        /** Copies the location data from landmark to fields.
+         *  @param aLocation contains the location data to update location fields with.
+         */
+        void ConfigureLocationFieldsL(TLocality& aLocation);
+
+        /** Configures the category field */
+        void ConfigureCategoryFieldL();
+
+        /** Sets text to the specified field
+         * @param aControlId ID of control in the dialog
+         * @param aText Text to set to the control
+         */
+        void SetTextFieldL(TInt aControlId, const TDesC& aText);
+
+        /** Sets text to the specified location field
+         * @param aControlId ID of control in the dialog
+         * @param aPosition Position value to set to the editor
+         */
+        void SetLocationFieldL( TInt aId, const TPosition& aPosition );
+
+        /** Updates the title bar based on the contents in the name field.
+         * @param aFromField Whether to get text from name field or from landmark.
+         */
+        void UpdateTitleBarL(TBool aFromField = EFalse);
+
+        /** Launches a markable list dialog for editing categories for this landmark */
+        void EditCategoriesL();
+        
+        /** Start location request to update landmark with current location */
+        void UpdateToCurrentLocationL();
+
+        /** Gets all data from fields, checks and saves to current landmark */
+        TErrorInForm FetchAndSaveFormDataL();
+
+        /** Saves values of address fields to current landmark */
+        void SaveAddressDataL();
+
+        /** Saves values of coordinates fields to current landmark 
+         *  \return one of TErrorsInFields values
+         */
+        TErrorInForm SaveCoordinateDataL();
+
+        /** Launches an error dialog displaying an error message to the user.
+         *  @param aResourceId a resource id for a descriptor containing an
+         *  error message
+         */
+        void ProcessErrorsInFormL( TErrorInForm aErrorId );
+
+        /** Launches an error dialog displaying an error message to the user.
+         *  @param aResourceId a resource id for a descriptor containing an
+         *  error message
+         */
+        void NotifyErrorToUserL( TInt aResourceId );
+
+        /** Copies address information (address and building position fields) from
+         *  source landmark to target.
+         */
+        void CopyAddressDataL( CPosLandmark& aSrc, CPosLandmark& aTrg );
+
+        /** Copies coordinate information (locality and coverage) from
+         *  source landmark to target. If some fields are empty in source,
+         *  they will also be emptied in result.
+         */
+        void CopyCoordinateDataL( CPosLandmark& aSrc, CPosLandmark& aTrg );
+        
+        /** Checks whether current landmark has any address fields */
+        TBool HasAddressData();
+
+        /** Checks whether current landmark has coordinate set */
+        TBool HasCoordinateData();
+
+        /** Start wait dialog for modal async operations */
+        void StartWaitDialogL( TInt aResId );
+
+        /** Closes wait dialog */
+        void CloseWaitDialog();
+        
+        /** Reset coordinates of current landmark */
+        void ResetCoordinatesL();
+
+    private: // Data
+
+        //! The landmark to be edited
+        CPosLandmark& iOriginalLandmark;
+        
+        //! Own copy of the original landmark's data
+        CPosLandmark* iLandmark;
+        
+        //! Whether to get location on startup
+        TBool iUseCurrentLocation;
+
+        //! Indicates if the landmark has been edited or not
+        TBool& iEdited;
+
+        //! Engine is used for reading categories
+        CLandmarksApplicationEngine& iEngine;
+
+        //! Item selected on startup
+        TInt iInitialFocusFieldId;
+
+        //! The title pane that is dynamically updated
+        CAknTitlePane* iTitlePane;
+
+        //! The original title that the title pane displayed before modified
+        HBufC* iOriginalTitle;
+
+        //! Contains a location if the user wants to update to current location
+        TPositionInfo iPositionInfo;
+
+        //! The name of the application. Used when fetching locations
+        HBufC* iAppName;
+
+        //! A position request used for retriveing locations
+        CLandmarksPositionRequest* iPositionRequest;
+
+        //! The listbox model for categories editor
+        CLandmarksLmCategoriesModel* iLmCategoriesModel;
+
+        //! The category ids that are set for this landmark
+        RArray<TPosLmItemId> iCategoryIds;
+
+        //! Defines how real numbers are formatted
+        TRealFormat iRealFormat;
+
+        //! Defines which real values that have been edited
+        RArray<TBool> iIsRealValueEdited;
+
+        CAknWaitDialog*         iWaitDialog;
+    };
+
+#endif // __LANDMARKS_EDIT_DIALOG__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationlandmarksrefappfors60/Inc/LandmarksEngine.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,257 @@
+/*
+* Copyright (c) 2004-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: 
+*     See class description below
+*
+*/
+
+
+#ifndef __LANDMARKS_ENGINE_H__
+#define __LANDMARKS_ENGINE_H__
+
+
+#include "LandmarksEngineBase.h"
+#include "LandmarksOperationObserver.h"
+#include <EPos_TPosLmSortPref.h>
+
+
+class CPosLandmark;
+
+
+
+/**
+*  Implements all functions of the engine related to landmarks. This engine
+*  servs the landmarks view.
+*/
+class CLandmarksEngine : public CLandmarksEngineBase
+    {
+    public: // Constructors and destructor
+
+        /**
+        * Two-phased constructor.
+        *
+        * @param aDb an instance of the defaukt landmark database
+        */
+        static CLandmarksEngine* NewL(
+            CPosLandmarkDatabase& aDb);
+
+        /**
+        * Destructor.
+        */
+        ~CLandmarksEngine();
+
+    public: // New functions
+
+        /**
+        * StartInitializeDbIfNecessaryL indicates if the default database needs
+        * to be initialised before it can be used. If it needs to be
+        * initialized the initialization is started immediately and the
+        * supplied observer is notified when initialization is ready.
+        *
+        * @param aObserver the observer to be notified when initialization is
+        * ready
+        * @return ETrue if initializing is necessary, EFalse otherwise
+        */
+        TBool StartInitializeDbIfNecessaryL(MLandmarksOperationObserver* aObserver);
+
+        /**
+        * AddLandmarkL adds a landmark to the database.
+        *
+        * @param aLandmark the landmark to add
+        */
+        void AddLandmarkL(CPosLandmark& aLandmark);
+
+        /**
+        * CommitLandmarkL commits a modified landmark.
+        *
+        * @param aLandmark the landmark to commit
+        */
+        void CommitLandmarkL(const CPosLandmark& aLandmark);
+
+        /**
+        * DeleteLandmarkL deletes a landmark.
+        *
+        * @param aItemId the itemId identifying the landmark to be deleted
+        */
+        void DeleteLandmarkL(TPosLmItemId aItemId);
+
+        /**
+        * LandmarkLC reads all fields of a landmark in the default
+        * landmark database. Ownership of the returned landmark is transferred
+        * to the caller.
+        *
+        * @param aItemId the ItemId identifying the landmark
+        * @return a landmark
+        */
+        CPosLandmark* LandmarkLC(TPosLmItemId aItemId);
+
+        /**
+        * StartSearchingLandmarksL starts an asynchronous search operation for
+        * landmarks. When the search completes the supplied observer is
+        * notified and it is supposed to fetch the matches by calling
+        * @ref FetchLandmarkSearchResult. All landmarks in the database are
+        * returned.
+        *
+        * @param aObserver the observer that is notified when the search
+        * operation completes
+        */
+        void StartSearchingLandmarksL(
+            MLandmarksOperationObserver* aObserver);
+
+        /**
+        * StartSearchingLandmarksL starts an asynchronous search operation for
+        * landmarks. The names of the landmarks are uses as criterion for a
+        * match. When the search completes the supplied observer is notified
+        * and it is supposed to fetch the matches by calling
+        * @ref FetchLandmarkSearchResult.
+        *
+        * @param aSearchPattern search pattern to compare landmarks against
+        * @param aSearchOnlyInPreviousMatches boolean indicating that only
+        * previous matches should be searched
+        * @param aObserver the observer that is notified when the search
+        * operation completes
+        */
+        void StartSearchingLandmarksL(
+            const TDesC& aSearchPattern,
+            TBool aSearchOnlyInPreviousMatches,
+            MLandmarksOperationObserver* aObserver);
+
+        /**
+        * FetchSearchResultL should be called after a successful
+        * landmark search operation. It returns the matches from the
+        * previous landmark search operation. Ownership of the returned array
+        * is kept by this class.
+        *
+        * @return an array containing matches from a previous landmark search
+        * operation
+        */
+        RArray<TPosLmItemId>* FetchSearchResult();
+
+        /**
+        * StartReadingLandmarksL should be called after a successful
+        * landmark search operation. It continously reads a number of landmarks
+        * partially, i.e. only the name and the icon of the landmarks are read,
+        * until all landmarks found in a previous search operation are read.
+        * The method is asynchronous and every time a number of landmarks are
+        * read the supplied observer is notified, @ref FetchLandmarksLC should
+        * be called to fetch the read landmarks.
+        *
+        * @param aNrOfItemsToReadPerBundle the number of items to read before
+        * notifying the supplied observer
+        * @param aObserver the observer that is notified every time a bundle of
+        * landmarks are read
+        */
+        void StartReadingLandmarksL(
+            TInt aNrOfItemsToReadPerBundle,
+            MLandmarksOperationObserver* aObserver);
+
+        /**
+        * FetchLandmarksLC should be called after a successful landmark read
+        * operation. It returns the landmarks that were partially read during a
+        * preceding landmark read operation. Ownership of the returned array
+        * is transferred to the caller.
+        *
+        * @return an array containing partially read landmarks from a previous
+        * read operation
+        */
+        CArrayPtr<CPosLandmark>* FetchLandmarksLC();
+
+
+    protected: // From CActive
+
+        /**
+        * Handles an active object’s request completion event.
+        */
+        void RunL();
+
+        /**
+        * Implements cancellation of an outstanding request.
+        */
+        void DoCancel();
+
+        /**
+        * Handles a leave occurring in the request completion event
+        * handler RunL().
+        *
+        * @return KErrNone
+        */
+        TInt RunError(TInt aError);
+
+    private: // New functions
+
+        /**
+        * C++ constructor.
+        *
+        * @param aDb an instance of the default landmark database
+        */
+        CLandmarksEngine(CPosLandmarkDatabase& aDb);
+
+        /**
+        * By default Symbian 2nd phase constructor is private.
+        */
+        void ConstructL();
+
+        /**
+        * ReadSomeLandmarksL reads a number of landmarks. The number of
+        * landmarks is specified when initiating an asynchronous landmark read
+        * operation.
+        */
+        void ReadSomeLandmarksL();
+
+        /**
+        * NotifyOperationReadyL notifies the observer of an asynchronous
+        * operation that the operation has completed.
+        *
+        * @param aOperation the kind of operation that is finished
+        * @param aErrorCode the complete code the operation returned
+        */
+        void NotifyOperationReadyL(TOperation aOperation, TInt aErrorCode);
+
+        /**
+        * Fetches the matches after a search operation and populates the data
+        * member @ref iItemIds
+        */
+        void PopulateItemIdArrayL();
+
+    private: // Data
+
+        //! an array containing the item Ids of the last search
+        RArray<TPosLmItemId> iItemIds;
+
+        //! the observer to notify the progress asynchronous operations
+        MLandmarksOperationObserver* iObserver;
+
+        //! keeps track of which type of operation is executed
+        TOperation iActiveOperation;
+
+        //! keeps track of which item to read
+        TInt iCurrentItemId;
+
+        //! keeps track of how many items to read per bundle
+        TInt iNrOfItemsToRead;
+
+        //! indicates if there is any previous result to search
+        TBool iSearchResultExists;
+
+        /** indicates if the current search operation has been carried
+        out with or without search pattern */
+        TBool iFilterSearch;
+
+        //! defines the sort preferences for this engine
+        TPosLmSortPref iSortPref;
+
+    };
+
+#endif // __LANDMARKS_ENGINE_H__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationlandmarksrefappfors60/Inc/LandmarksEngineBase.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,114 @@
+/*
+* Copyright (c) 2004-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 base class for engines
+*
+*/
+
+
+#ifndef __LANDMARKS_ENGINE_BASE_H__
+#define __LANDMARKS_ENGINE_BASE_H__
+
+//  INCLUDES
+#include <e32base.h>
+#include <EPos_Landmarks.h>
+
+
+class CPosLandmarkDatabase;
+class CPosLandmarkSearch;
+class CLandmarksLmOpWrapper;
+
+
+
+/**
+*  Abstract base class for sub engines.
+*
+*/
+class CLandmarksEngineBase : public CActive
+    {
+    public: // Constructors and destructor
+
+        /**
+        * Destructor.
+        */
+        ~CLandmarksEngineBase();
+
+    public: // New functions
+
+        /**
+        * SetPrio updates the @ref iPriority data member.
+        *
+        * @param aPriority the priority to set
+        */
+        void SetPrio(CActive::TPriority aPriority);
+
+    protected: // From CActive
+
+        /**
+        * RunL should be implemented by sub classes.
+        */
+        virtual void RunL() = 0;
+        
+        /**
+        * DoCancel should be implemented by sub classes.
+        */
+        virtual void DoCancel() = 0;
+
+        /**
+        * RunError should be implemented by sub classes in case RunL might 
+        * leave.
+        */
+        virtual TInt RunError(TInt aError) = 0;
+
+    protected: // New functions
+
+        /**
+        * C++ constructor.
+        * 
+        * @param aDb an instance of the default landmark database
+        */
+        CLandmarksEngineBase(CPosLandmarkDatabase& aDb);
+
+        /**
+        * By default Symbian 2nd phase constructor is private.
+        */
+        void ConstructL();
+
+        /**
+        * SetPriorityAndSetActive updates the priority of this active object 
+        * if necessary and sets it to active. This method should be used by sub 
+        * classes rather than CActive::SetActive()
+        */
+        void SetPriorityAndSetActive();
+
+    protected: // Data
+
+        //! The default landmark database
+        CPosLandmarkDatabase& iDb;
+
+        //! Used for searching the database
+        CPosLandmarkSearch* iSearcher;
+
+        //! An active object wrapping a CPosLmOperation object
+        CLandmarksLmOpWrapper* iLmOpWrapper;
+
+    private: // Data
+
+        //! Used when setting priority of this active object
+        CActive::TPriority iPriority;
+    };
+
+
+#endif // __LANDMARKS_ENGINE_BASE_H__
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationlandmarksrefappfors60/Inc/LandmarksInfoContainer.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,176 @@
+/*
+* Copyright (c) 2004-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: 
+*     See class description below
+*
+*/
+
+
+#ifndef __LANDMARKS_INFOCONTAINER_H__
+#define __LANDMARKS_INFOCONTAINER_H__
+
+
+#include <coecntrl.h>
+#include <EPos_Landmarks.h>
+#include "LandmarksInfoContainer.h"
+
+
+class CEikTextListBox;
+class CAknNavigationDecorator;
+class CAknTitlePane;
+class CAknView;
+class CLandmarksApplicationEngine;
+class CLandmarksInfoModel;
+class CPosLandmark;
+
+
+
+/**
+*  This is the landmarks container that contains a listbox with landmark's
+*  fields listed.
+*/
+class CLandmarksInfoContainer : public CCoeControl
+    {
+    public: // Constructors and destructor
+
+        /**
+        * C++ constructor.
+        *
+        * @param aView parent view
+        * @param aEngine the landmark engine
+        * @param aNaviDecorator the tab group to hide when editing landmarks
+        */
+        CLandmarksInfoContainer(
+            CAknView& aView,
+            CLandmarksApplicationEngine& aEngine,
+            CAknNavigationDecorator* aNaviDecorator);
+
+        /**
+        * Symbian 2nd phase constructor. Should be called after constructor to
+        * fully construct the object.
+        *
+        * @param aRect the rectangle this Container will be drawn to
+        */
+        void ConstructL(const TRect& aRect);
+
+        /**
+        * Destructor.
+        */
+        ~CLandmarksInfoContainer();
+
+    public: // New functions
+
+        /** Stores title pane */
+        void StoreTitlePaneL();
+
+        /** Retores title pane */
+        void RestoreTitlePane();
+
+        /**
+        * Loads specified landmark into the container
+        * @param aLandmarkId The ID of the landmark to be viewed.
+        */
+        void LoadLandmarkL(TPosLmItemId aLandmarkId);
+
+        /**
+        * Launches a dialog for editing the current landmark.
+        * Removes tabs on the navi pane before launching the dialog. Restores
+        * the navi pane after the dialog is dismissed.
+        */
+        void EditLandmarkL();
+
+    public: // from CoeControl
+
+        /**
+        * Gets the number of controls contained in a compound control
+        *
+        * @return Number of component controls
+        */
+        TInt CountComponentControls() const;
+
+        /**
+        * Gets the specified component
+        *
+        * @param aIndex specification for component pointer
+        * @return Pointer to component control
+        */
+        CCoeControl* ComponentControl(TInt aIndex) const;
+
+        /**
+        * Called by framework when the view size is changed.
+        */
+        void SizeChanged();
+
+        /**
+        * Handles key events.
+        *
+        * @param aKeyEvent the key event
+        * @param aType the type of key event
+        * @return EKeyWasConsumed if keyevent was handled, EKeyWasNotConsumed
+        * otherwise
+        */
+        TKeyResponse OfferKeyEventL(
+            const TKeyEvent& aKeyEvent, TEventCode aType);
+
+        /** Reacts to screen size change */
+        void HandleResourceChange(TInt aType);
+
+    private:
+
+        /**
+        * Creates the listbox.
+        */
+        void CreateListBoxL();
+
+        /**
+        * Updates the title bar from landmark name.
+        */
+        void UpdateTitleBarL();
+
+        /**
+        * Updates the view.
+        */
+        void UpdateL();
+
+    private: // Data
+
+        //! The control used to display landmark info.
+        CEikTextListBox* iListBox;
+
+        //! The parent view
+        CAknView& iView;
+
+        //! iEngine the application engine used for accessing landmarks
+        CLandmarksApplicationEngine& iEngine;
+
+        //! Decorates the navi pane (with navigation arrows etc)
+        CAknNavigationDecorator* iNaviDecorator;
+        
+        //! The data model for the listbox
+        CLandmarksInfoModel* iModel;
+
+        //! The landmark being viewed
+        CPosLandmark* iLandmark;
+
+        //! The title pane that is dynamically updated
+        CAknTitlePane* iTitlePane;
+
+        //! The original title that the title pane displayed before modified
+        HBufC* iOriginalTitle;
+
+        //! Fields used in the list
+        RArray<TInt> iFields;
+    };
+
+#endif // __LANDMARKS_INFOCONTAINER_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationlandmarksrefappfors60/Inc/LandmarksInfoModel.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,129 @@
+/*
+* Copyright (c) 2004-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:  
+*     See class description below
+*
+*/
+
+
+#ifndef __LANDMARKS_INFOMODEL_H__
+#define __LANDMARKS_INFOMODEL_H__
+
+
+#include <e32base.h>
+
+
+class TLocality;
+class CPosLandmark;
+class CLandmarksApplicationEngine;
+
+
+
+/**
+*  Contains the data model of the landmarks view.
+*  
+*/
+class CLandmarksInfoModel : public CBase
+	{
+    public: // Constructors and destructor
+
+        /**
+        * C++ constructor.
+        */
+	    CLandmarksInfoModel(CLandmarksApplicationEngine& aEngine);
+
+        /**
+        * Destructor.
+        */
+	    ~CLandmarksInfoModel();
+
+    public: // New functions
+
+        /**
+        * Generates descriptor array from landmark's info.
+        * Caller takes ownership of returned object
+        *
+        * @param aLandmark The landmark to get info of.
+        * @param aFieldIds On return, landmark info field ids.
+        * @return The landmark's info as descriptor array
+        */
+        CDesCArray* GetLandmarkInfoL(
+            CPosLandmark& aLandmark,
+            RArray<TInt>& aFieldIds);
+
+    private:
+
+        /**
+        * Adds new string describing landmark field to the info array.
+        * Adds also field's ID to array of field IDs.
+        * @param aCaption The caption of the field
+        * @param aText The value of the field
+        * @param aArray Target array
+        * @param aFieldIds Target field IDs array
+        */
+        void AddInfoFieldL(
+            const TDesC& aCaption, 
+            const TDesC& aText,
+            CDesCArray& aArray,
+            RArray<TInt>& aFieldIds);
+
+        /**
+        * Adds location fields of the landmark to arrays.
+        *
+        * @param aLocation contains the location data to update location fields
+        * with.
+        * @param aArray Target array
+        * @param aFieldIds Target field IDs array
+        */
+        void AddLocationFieldsL(
+            TLocality& aLocation,
+            CDesCArray& aArray,
+            RArray<TInt>& aFieldIds);
+
+        /**
+        * Adds the category fields to arrays.
+        * @param aLandmark used to retrieve category information
+        * @param aArray Target array
+        * @param aFieldIds Target field IDs array
+        */
+        void AddCategoryFieldsL(
+            CPosLandmark& aLandmark, 
+            CDesCArray& aArray,
+            RArray<TInt>& aFieldIds);
+
+        /**
+        * Adds other text field and to arrays.
+        * @param aCaptionId Caption string resource ID
+        * @param aText The value of the field
+        * @param aArray Target array
+        * @param aFieldIds Target field IDs array
+        */
+        void AddTextFieldL(
+            TInt aCaptionId, 
+            TDesC& aText,
+            CDesCArray& aArray,
+            RArray<TInt>& aFieldIds);
+
+    private: // Data
+
+        //! The application engine used for accessing landmarks
+        CLandmarksApplicationEngine& iEngine;
+
+        //! Defines how real numbers are displayed
+        TRealFormat iRealFormat;
+	};
+
+#endif // __LANDMARKS_INFOMODEL_H__
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationlandmarksrefappfors60/Inc/LandmarksInfoView.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,130 @@
+/*
+* Copyright (c) 2004-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:  
+*     See class description below
+*
+*/
+
+
+#ifndef __LANDMARKS_INFOVIEW_H__
+#define __LANDMARKS_INFOVIEW_H__
+
+#include <aknview.h>
+#include "LandmarksOperationObserver.h"
+
+class CLandmarksApplicationEngine;
+class CAknNavigationDecorator;
+class CLandmarksInfoContainer;
+class CLandmarksEngine;
+
+/**
+*  CLandmarksInfoView is the view displaying landmark's details
+*/
+class CLandmarksInfoView: public CAknView
+    {
+    public: // Constructors and destructor
+
+        /**
+        * Two-phased constructor.
+        *
+        * @param aNaviDecorator the navigation decorator displaying the tabs 
+        * @param aEngine the engine used for fetching category data.
+        */
+        static CLandmarksInfoView* NewLC(
+            CAknNavigationDecorator* aNaviDecorator,
+            CLandmarksApplicationEngine& aEngine);
+
+        /**
+        * Destructor.
+        */
+        ~CLandmarksInfoView();
+
+    public: // from CAknView
+
+        /**
+        * Id Identity of this view to the system.
+        *
+        * @return the ID of this view
+        */
+        TUid Id() const;
+
+        /** 
+        * HandleCommandL handles user menu selections.
+        *
+        * @param aCommand the enumerated code for the option selected
+        */
+        void HandleCommandL(TInt aCommand);
+
+        /**
+        * DoActivateL is responsible for activating this view.
+        *
+        * @param aPrevViewId The id of the previous view
+        * @param aCustomMessageId message identifier
+        * @param aCustomMessage custom message provided when the view is changed
+        */
+        void DoActivateL(
+            const TVwsViewId& aPrevViewId,
+            TUid aCustomMessageId,
+            const TDesC8& aCustomMessage);
+
+        /**
+        * DoDeactivate is responsible for deactivating this view.
+        */
+        void DoDeactivate();
+
+        /** Forwards resource change event to container. Used for 
+         *  layout change handling */
+        void HandleResourceChange( TInt aType );
+
+    private:
+
+        /**
+        * C++ constructor.
+        *        
+        * @param aNaviDecorator the navigation decorator displaying the tabs 
+        * @param aEngine the engine used for fetching categories data.
+        */
+        CLandmarksInfoView(
+            CAknNavigationDecorator* aNaviDecorator, 
+            CLandmarksApplicationEngine& aEngine);
+
+        /**
+        * By default Symbian 2nd phase constructor is private.
+        */
+        void ConstructL();
+
+        /**
+        * Launches a landmark edit dialog
+        */
+        void EditLandmarkL();
+
+    private: // Data
+
+        //! The container containing the graphical components of the view
+        CLandmarksInfoContainer* iContainer;
+
+        //! The application engine used for accessing landmark data
+        CLandmarksApplicationEngine& iEngine;
+
+        //! Ddecorates the navi pane (with navigation arrows etc)
+        CAknNavigationDecorator* iNaviDecorator;
+        
+        //! Application name
+        HBufC* iAppName;
+    };
+
+
+#endif // __LANDMARKS_INFOVIEW_H__
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationlandmarksrefappfors60/Inc/LandmarksListBoxModel.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,69 @@
+/*
+* Copyright (c) 2004-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:  
+*     See class description below
+*
+*/
+
+
+#ifndef __LANDMARKS_LIST_BOX_MODEL_H__
+#define __LANDMARKS_LIST_BOX_MODEL_H__
+
+
+#include <AknUtils.h>
+
+
+
+/**
+*  CLandmarksListBoxModel bypasses the default filtering algorithm provided by 
+*  CAknFilteredTextListBoxModel. The filtering responsibility is forwarded to 
+*  the CCoeControl instance owning the list box. That instance must update the
+*  model when the filter has been modified.
+*/
+class CLandmarksListBoxModel : public CAknFilteredTextListBoxModel
+    {
+    public: // from CAknFilteredTextListBoxModel
+
+        /**
+        * Gets an array of strings to be displayed in the listbox for 
+        * incremental matching of typed characters. This array always contains 
+        * the total number of items rather than a subset filtered out from the 
+        * model.
+        *
+        * @return A text array for matching.
+        */
+        const MDesCArray* MatchableTextArray() const;
+
+        /**
+        * Gets the number of text items in this list box model. This number is 
+        * always the total number of items in the model rather than a subset 
+        * filtered out from the model
+        *
+        * @return The number of text items in this list box model
+        */
+        TInt NumberOfItems() const;
+
+        /**
+        * Gets the text to be displayed in the list box control for a specific 
+        * item.
+        *
+        * @param aItemIndex Index of an item
+        * @return Text string to be displayed
+        */
+        TPtrC ItemText(TInt aItemIndex) const;
+
+    };
+
+#endif // __LANDMARKS_LIST_BOX_MODEL_H__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationlandmarksrefappfors60/Inc/LandmarksListbox.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,71 @@
+/*
+* Copyright (c) 2004-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:  
+*     See class description below
+*
+*/
+
+
+#ifndef __LANDMARKS_LIST_BOX_H__
+#define __LANDMARKS_LIST_BOX_H__
+
+
+#include <aknlists.h>
+
+
+class CLandmarksListBoxModel;
+
+
+
+/**
+*  CLandmarksListBox exists because the list boxes in Landmark reference 
+*  application needs a specialized version of CAknFilteredTextListBoxModel 
+*  called CLandmarksListBoxModel. CLandmarksListBox creates an instance of 
+*  CLandmarksListBoxModel instead of the default CAknFilteredTextListBoxModel.
+*/
+class CLandmarksListBox : public CAknSingleGraphicStyleListBox
+    {
+    public: // Constructors and destructor
+    
+        /**
+        * Symbian 2nd phase constructor. Should be called after the 
+        * constructor.
+        *
+        * @param aParent the parent control
+        * @param aFlags flags defining the behaviour of the listbox
+        */
+        void ConstructL(
+            const CCoeControl* aParent,
+            TInt aFlags);
+
+    public: // from CAknColumnListBox
+
+        /**
+        * Creates the listbox model.
+        */
+        void CreateModelL();
+
+    public: // from CEikColumnListBox
+
+        /**
+        * Returns a pointer to the listbox model.
+        *
+        * @return a pointer to the listbox model
+        */
+        CLandmarksListBoxModel* Model() const;
+
+    };
+
+#endif // __LANDMARKS_LIST_BOX_H__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationlandmarksrefappfors60/Inc/LandmarksLmCategoriesModel.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,113 @@
+/*
+* Copyright (c) 2004-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:  
+*     See class description below
+*
+*/
+
+
+#ifndef __LANDMARKS_LM_CATEGORIES_MODEL_H__
+#define __LANDMARKS_LM_CATEGORIES_MODEL_H__
+
+
+#include <e32std.h>
+#include <EPos_Landmarks.h>
+
+
+class CLandmarksApplicationEngine;
+class CPosLandmarkCategory;
+class CGulIcon;
+
+
+
+/**
+*  CLandmarksLmCategoriesModel holds the data displayed in the category 
+*  listbox in the landmarks category edit dialog.
+*/
+class CLandmarksLmCategoriesModel : public CBase
+	{
+    public: // Constructors and destructor
+
+        /**
+        * Two-phased constructor.
+        *
+        * @param aEngine the landmarks application engine.
+        * @param aMarkedCategories an array of selected landmarks.
+        */
+        static CLandmarksLmCategoriesModel* NewL(
+            CLandmarksApplicationEngine& aEngine,
+            RArray<TPosLmItemId>& aMarkedCategories);
+
+        /**
+        * Destructor.
+        */
+	    ~CLandmarksLmCategoriesModel();
+
+    public: // New functions
+
+        /**
+        * Stores ids of selected categories.
+        *
+        * @param aSelectedIndexes array of indexes of selected catgeories
+        */
+	    void SelectCategoriesL(CArrayFixFlat<TInt>& aSelectedIndexes);
+
+        /**
+        * Returns a descriptor array of formatted list items.
+        *
+        * @return an descriptor array suitable for a two-column listbox
+        */
+        CDesCArray* FormattedCategoryNamesL();
+
+        /**
+        * Returns array of indices of selected categories.
+        *
+        * @return array of indexes of selected catgeories
+        */
+		CArrayFixFlat<TInt>* SelectedCategoriesL();
+
+    private:
+
+        /**
+        * C++ constructor.
+        *
+        * @param aMarkedCategories an array of selected landmarks.
+        */
+	    CLandmarksLmCategoriesModel(
+            RArray<TPosLmItemId>& aMarkedCategories);
+
+        /**
+        * By default Symbian 2nd phase constructor is private.
+        *
+        * @param aEngine the landmarks application engine.
+        */
+	    void ConstructL(CLandmarksApplicationEngine& aEngine);
+
+    private: // Data
+
+        //! contains all existing categories
+        CArrayPtr<CPosLandmarkCategory>* iCategories;
+
+        /** contains Ids for those categories that are selected for the 
+            edited landmark. */
+        RArray<TPosLmItemId>& iMarkedCategoryIds;
+
+        /** An array of formatted category names suitable for a two-column 
+            listbox. */
+	    CDesCArrayFlat* iListItems;
+	    
+	};
+
+#endif // __LANDMARKS_LM_CATEGORIES_MODEL_H__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationlandmarksrefappfors60/Inc/LandmarksLmOpWrapper.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,134 @@
+/*
+* Copyright (c) 2004-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:  
+*     See class description below
+*
+*/
+
+
+#ifndef __LANDMARKS_LM_OP_WRAPPER_H__
+#define __LANDMARKS_LM_OP_WRAPPER_H__
+
+
+#include <e32base.h>
+
+
+class CLandmarksListContainer;
+class CAknNavigationDecorator;
+class CLandmarksEngine;
+class CPosLmOperation;
+
+
+
+/**
+*  Active class that wraps an instance of CPosLmOperation.
+*  The wrapped CPosLmOperation instance is executed incrementally. 
+*  Execution progress can be reported.
+*  This class is designed to be utilized by active objects.
+*/
+class CLandmarksLmOpWrapper: public CActive
+    {
+    public: // Constructors and destructor
+
+        /**
+        * C++ default constructor.
+        * 
+        */
+        CLandmarksLmOpWrapper();
+
+        /**
+        * Destructor.
+        */
+        ~CLandmarksLmOpWrapper();
+
+    public: // New Functions
+
+        /**
+        * Starts execution of the supplied operation.
+        *
+        * @param aLmOperation operation to execute. Ownership of the operation
+        * is transferred to this instance.
+        * @param aStatus the request status to complete when execution of the 
+        * supplied LmOperation is finished.
+        * @param aReportProgress ETrue if progress should be reported 
+        * (incremental execution), EFalse otherwise.
+        */
+        void StartOperation(
+            CPosLmOperation* aLmOperation,
+            TRequestStatus& aStatus,
+            TBool aReportProgress = EFalse);
+
+        /**
+        * Returns a pointer to the wrapped CPosLmOperation object. 
+        * This object keeps ownership of the operation.
+        *
+        * @return a pointer to a CPosLmOperation instance
+        */
+        CPosLmOperation* LmOperationPtr();
+
+        /**
+        * Executes the next step of the incremental operation. Typically 
+        * called when progress of the CPosLmOperaiotion is reported.
+        *
+        * @param aStatus the request status to complete when execution of the 
+        * next step is finished.
+        */
+        void ExecuteNextStep(TRequestStatus& aStatus);
+
+        /**
+        * Return the current progress of the CPosLmnOperation.
+        *
+        * @return a number between 0-100. 100 means that the operation is 
+        * completed
+        */
+        TInt Progress();
+
+    protected: // from CActive
+
+        /**
+        * Implements cancellation of an outstanding request.
+        */
+        void DoCancel();
+
+        /**
+        * Handles an active object’s request completion event.
+        */
+        void RunL();
+
+    private:
+
+        /**
+        * Executes the next step of the incremental operation.
+        */
+        void ExecuteNextStep();
+
+    private: // Data
+
+        //! the wrapped CPosLmOperation that is executed
+        CPosLmOperation* iLmOperation;
+
+        //! contains a value between 0-1 and indicates the progress
+        TReal32 iProgress;
+
+        //! the req. status of the caller executing the operation
+        TRequestStatus* iCallerStatus;
+
+        //! indicates if progress should be reported or not
+        TBool iReportProgress;
+
+    };
+
+
+#endif // __LANDMARKS_LM_OP_WRAPPER_H__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationlandmarksrefappfors60/Inc/LandmarksModel.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,165 @@
+/*
+* Copyright (c) 2004-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:  
+*     See class description below
+*
+*/
+
+
+#ifndef __LANDMARKS_MODEL_H__
+#define __LANDMARKS_MODEL_H__
+
+
+#include <e32base.h>
+#include <badesca.h>
+
+#include <EPos_Landmarks.h>
+
+
+class CPosLandmark;
+
+
+
+/**
+*  Contains the data model of the landmarks view.
+*  
+*/
+class CLandmarksModel : public CBase
+	{
+    public: // Constructors and destructor
+
+        /**
+        * Two-phased constructor.
+        */
+        static CLandmarksModel* NewL();
+
+        /**
+        * Destructor.
+        */
+	    ~CLandmarksModel();
+
+    public: // New functions
+
+        /**
+        * Sets the data member iItemIds
+        * 
+        * @param aItemIds a pointer to an array of item ids
+        */
+        void SetItemIds(RArray<TPosLmItemId>* aItemIds);
+
+        /** Returns item IDs specified by aSelectionIndexes indexes */ 
+        void GetItemIdsL( 
+            const CArrayFix<TInt>& aSelectionIndexes,
+            RArray<TPosLmItemId>& aItemIds );
+
+	    /**
+        * Returns a pointer to an array to be used for a list box.
+        *
+        * @return an array of descriptors formatted to fit a CEikColumnListBox 
+        * with one icon column to the left and one descriptor column to the 
+        * right.
+        */
+	    CDesCArraySeg* ItemList();
+		
+	    /**
+        * Sets current item in the model. The current item should match the  
+        * current selected one in the listbox displaying this model.
+        *
+        * @param aIndex the index of the current item in the list.
+        */
+	    void SetCurrentItem(TInt aIndex);
+	
+	    /**
+        * Returns the item id of the current item in the model.
+        *
+        * @return the item id of the current item in the model. 
+        * KPosLmNullItemId if no item is set as current
+        */
+	    TPosLmItemId CurrentItemId();
+
+        /**
+        * Creates an array of icons that should be displayed be the listbox
+        * displaying the data of this model.
+        *
+        * @return an array of icons. Ownership of CIconList* is tranferred to 
+        * caller
+        */
+        CIconList* CreateIconListL();
+	
+        /**
+        * Repopulates a part of the model.
+        *
+        * @param aLandmarks the landmarks to insert to the model
+        */
+        void RepopulateModelL(
+            CArrayPtr<CPosLandmark>* aLandmarks);
+
+    private:
+
+        /**
+        * Formats a list item to fit a CEikColumnistBox with one graphic 
+        * column and one descriptor column.
+        *
+        * @param aLandmark the landmarks this list item will represent
+        * @return a formatted descriptor buffer
+        */
+        HBufC* FormatListItemLC(CPosLandmark& aLandmark);
+
+        /**
+        * Appends an icen to the icon array.
+        *
+        * @param aMbmFile the multi bitmap file containing the icon to add
+        * @param aIconOffset the offset in the mbm-file where the icon is 
+        * located
+        * @param aMaskOffset the offset in the mbm-file where the icon mask is
+        * located
+        */
+        void AppendIconL(
+            const TDesC& aMbmFile, 
+            TInt aIconOffset, 
+            TInt aMaskOffset);
+
+    private:
+
+        /**
+        * C++ constructor.
+        */
+	    CLandmarksModel();
+
+        /**
+        * By default Symbian 2nd phase constructor is private.
+        */
+	    void ConstructL();
+
+    private:
+
+        //! contains the current item in the model
+        TInt iCurrentItem;
+
+        //! an array of formatted descriptors
+        CDesCArraySeg* iListItems;
+
+        //! an array of item ids matching the landmarks represented by iListItems
+        RArray<TPosLmItemId>* iItemIds;
+
+        //! an array of landmark icons
+        CIconList* iIconList;
+
+        //! the next index to repopulate
+        TInt iIndexToPopulate;
+
+	};
+
+#endif // __LANDMARKS_MODEL_H__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationlandmarksrefappfors60/Inc/LandmarksOperationObserver.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,73 @@
+/*
+* Copyright (c) 2004-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:  
+*     See class description below
+*
+*/
+
+
+#ifndef __LANDMARKS_OPERATION_OBSERVER_H__
+#define __LANDMARKS_OPERATION_OBSERVER_H__
+
+// INCLUDES
+#include <e32base.h>
+
+// CONSTANTS
+const TInt KOperationReady = 100;
+const TInt KOperationNotReady = 0;
+
+// DATA TYPES
+/**
+* TOperation indicates which operation type has been processed
+*/
+enum TOperation
+    {
+    ENoOperation,
+    EInitializeDb,
+    ELandmarkSearch,
+    ECategorySearch,
+    ELandmarkRead,
+    ECategoryRead,
+    EAcquiringLocation
+    };
+
+// CLASS DECLARATION
+
+/**
+*  An observer interface used for notifying the execution progress of 
+*  asynchronous opearations. 
+*  Typically used by objects deriving from other classes than CActive.
+*/
+class MLandmarksOperationObserver
+    {
+    public: // New functions
+
+        /**
+        * NotifyOperationProgressL notifies the progress and status of an
+        * asynchronous operation.
+        *  
+        * @param aOperation the type of operation that is reported.
+        * @param aProgress the progress of the operation.
+        * @param aErrorCode the status of the operation.
+        */
+        virtual void NotifyOperationProgressL(
+            TOperation aOperation, 
+            TInt aProgress, 
+            TInt aErrorCode) = 0;
+
+    };
+
+#endif // __LANDMARKS_OPERATION_OBSERVER_H__
+
+// End of File
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationlandmarksrefappfors60/Inc/LandmarksPositionRequest.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,180 @@
+/*
+* Copyright (c) 2004-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:  
+*     See class description below
+*
+*/
+
+
+#ifndef __LANDMARKS_POSITION_REQUEST_H__
+#define __LANDMARKS_POSITION_REQUEST_H__
+
+
+#include <e32base.h>
+#include <AknProgressDialog.h>
+#include <lbs.h>
+
+
+class MLandmarksOperationObserver;
+class CAknWaitDialog;
+
+
+
+/**
+*  Provides an interface for retrieving the current location.
+*  It also manages a floating progress ball for indicating the progress of the 
+*  location retrieval.
+*/
+class CLandmarksPositionRequest: public CActive, public MProgressDialogCallback
+    {
+    public: // Constructors and destructor
+
+        /**
+        * Two-phased constructor.
+        *
+        * @param aAppName the name of this application
+        * @param aObserver observer to callback when locations are retrieved
+        */
+        static CLandmarksPositionRequest* NewL(
+            const TDesC& aAppName,
+            MLandmarksOperationObserver* aObserver);
+
+        /**
+        * Destructor.
+        */
+        ~CLandmarksPositionRequest();
+
+    public: // New Functions
+
+        /**
+        * Starts the fetching of a location. In the first place the default 
+        * proxy is used for retrieving a location. If fetching default location
+        * fails the last known location is fetched. If fetching last known 
+        * location fails, an error code is returned to the observer.
+        *
+        * @param aMessage the message to present in the progress dialog.
+        * @param aPositionInfo contains the fetched location
+        */
+        void FetchPositionInfoL(
+            const TDesC& aMessage,
+            TPositionInfo& aPositionInfo);
+
+        /**
+        * Dismisses the wait note.
+        */
+        void DismissWaitNote();
+
+    protected: // from CActive
+
+        /**
+        * Implements cancellation of an outstanding request.
+        */
+        void DoCancel();
+
+        /**
+        * Handles an active object’s request completion event.
+        */
+        void RunL();
+
+        /**
+        * Handles a leave occurring in the request completion event 
+        * handler RunL().
+        *
+        * @return KErrNone
+        */
+        TInt RunError(TInt aError);
+
+    public: // from MProgressDialogCallback
+
+        //! Inherited from MProgressDialogCallback
+        void DialogDismissedL(TInt aButtonId);
+
+    private:
+
+        /**
+        * C++ constructor.
+        *
+        * @param aObserver observer to callback when locations are retrieved
+        */
+        CLandmarksPositionRequest(
+            MLandmarksOperationObserver* aObserver);
+
+        /**
+        * By default Symbian 2nd phase constructor is private.
+        */
+        void ConstructL(const TDesC& aAppName);
+
+        /**
+        * Executes the next step of the location retrieval.
+        */
+        void ExecuteNextStep();
+
+        /**
+        * Notifies the observer that the location retrieval is complete.
+        *
+        * @param aError the status of the location retrieval
+        */
+        void NotifyOperationCompleteL(TInt aError);
+
+        /**
+        * Initializes the class to be ready for location acquisition.
+        */
+        void InitializeL();
+
+        /**
+        * Informs user about location request failure.
+        */
+        void ShowErrorL(TInt aError);
+
+    private: // Data types
+
+        /**
+        * TState defines the different states this object may enter.
+        */
+        enum TState 
+            {
+            EIdle,
+            EAcquiringDefaultLocation,
+            EAcquiringLastKnownLocation,
+            EDismissingDialog
+            };
+
+    private: // Data
+
+        //! Contains the location
+        TPositionInfo* iPositionInfo;
+
+        //! The observer to callback when location retieval is ready
+        MLandmarksOperationObserver* iObserver;
+
+        //! Reference to the Location Server session
+        RPositionServer iLocationServer;
+
+        //! Reference to the Location Server subsession
+        RPositioner iPositioner;
+
+        //! The current state this object has entered
+        TState iState;
+
+        //! The progress bar displayed when active
+        CAknWaitDialog* iWaitNote;
+
+        //! The name of this application
+        HBufC* iAppName;
+
+    };
+
+#endif // __LANDMARKS_POSITION_REQUEST_H__
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationlandmarksrefappfors60/Inc/LandmarksUtils.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,80 @@
+/*
+* 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:  
+*     See class description below
+*
+*/
+
+
+#ifndef __LANDMARKS_UTILS_H__
+#define __LANDMARKS_UTILS_H__
+
+/** 
+* Coordinate data conversion utility methods
+*/
+class LandmarksUtils
+    {
+      public:
+
+        /** Converts a float to a descriptor.
+        * Handles the case when the float is NaN
+        * @param aFloat the source float
+        * @param aDes the target descriptor
+        * @param aRealFormat Format used for real value conversion to text
+        */
+        static void FloatToDes(TReal aFloat, TDes& aDes, TRealFormat aRealFormat);
+
+        /** Converts a float lat/long to a descriptor.
+        * Handles the case when the float is NaN
+        * @param aFloat the source float
+        * @param aDes the target descriptor
+        */
+        static void LatLongToDes(TReal aFloat, TDes& aDes);
+
+        /** Converts a latitude or longitude in float format 
+        * to a descriptor containing degrees, minutes and seconds.
+        *
+        * @param aLatLong the source float
+        * @param aDes the target descriptor (degrees, minutes and seconds)
+        */
+        static void LatLongFloatToDegMinSecDesL(TReal aLatLong, TDes& aDes);
+        
+        /** Panics the application due to some programming error
+        * @param aReason The panic number or error code
+        */
+        static void Panic(TInt aReason);
+        
+        /** Pops up error note for user with given text */
+        static void ErrorNoteL( const TDesC& aErrorText );
+      
+        /** Pops up information note for user with given text */
+        static void InfoNoteL( const TDesC& aInfoText );
+
+      private:
+      
+        //! Internal struct for LatLongFloatToDegMinSecDesL
+        struct SDegMinSec
+            {
+            //! degrees
+            TInt32 iDegrees;
+            //! minutes
+            TInt32 iMinutes;
+            //! seconds
+            TReal iSeconds;
+            };
+    };
+
+#endif // __LANDMARKS_UTILS_H__
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationlandmarksrefappfors60/Inc/LandmarksView.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,150 @@
+/*
+* Copyright (c) 2004-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:  
+*     See class description below
+*
+*/
+
+
+#ifndef __LANDMARKS_VIEW_H__
+#define __LANDMARKS_VIEW_H__
+
+#include <aknview.h>
+#include <EPos_Landmarks.h>
+
+class CPosLandmark;
+
+class CLandmarksApplicationEngine;
+class CAknNavigationDecorator;
+class CLandmarksContainer;
+class CLandmarksEngine;
+
+/**
+*  CLandmarksView is the view displaying list of landmarks
+*/
+class CLandmarksView: public CAknView
+    {
+    public: // Constructors and destructor
+
+        /**
+        * Two-phased constructor.
+        *
+        * @param aNaviDecorator the navigation decorator displaying the tabs 
+        * @param aEngine the engine used for fetching category data.
+        */
+        static CLandmarksView* NewLC(
+            CAknNavigationDecorator* aNaviDecorator,
+            CLandmarksApplicationEngine& aEngine);
+
+        /**
+        * Destructor.
+        */
+        ~CLandmarksView();
+
+    public: // from CAknView
+
+        /**
+        * Id Identity of this view to the system.
+        *
+        * @return the ID of this view
+        */
+        TUid Id() const;
+
+        /** 
+        * HandleCommandL handles user menu selections.
+        *
+        * @param aCommand the enumerated code for the option selected
+        */
+        void HandleCommandL(TInt aCommand);
+
+        /**
+        * DoActivateL is responsible for activating this view.
+        *
+        * @param aPrevViewId The id of the previous view
+        * @param aCustomMessageId message identifier
+        * @param aCustomMessage custom message provided when the view is changed
+        */
+        void DoActivateL(
+            const TVwsViewId& aPrevViewId,
+            TUid aCustomMessageId,
+            const TDesC8& aCustomMessage);
+
+        /**
+        * DoDeactivate is responsible for deactivating this view.
+        */
+        void DoDeactivate();
+
+        /** 
+        * DynInitMenuPaneL initializes the menu pane before it is displayed.
+        *
+        * @param aResourceId a resource ID indetifying the menu bar containing 
+        * the menu pane to be initialized.
+        * @param aMenuPane the menu pane to initialize.
+        */
+        void DynInitMenuPaneL(
+            TInt aResourceId,
+            CEikMenuPane* aMenuPane);
+        
+        /** Forwards resource change event to container. Used for 
+         *  layout change handling */
+        void HandleResourceChange( TInt aType );
+        
+    private:
+
+        /**
+        * C++ constructor.
+        *        
+        * @param aNaviDecorator the navigation decorator displaying the tabs 
+        * @param aEngine the engine used for fetching categories data.
+        */
+        CLandmarksView(
+            CAknNavigationDecorator* aNaviDecorator, 
+            CLandmarksApplicationEngine& aEngine);
+
+        /**
+        * By default Symbian 2nd phase constructor is private.
+        */
+        void ConstructL();
+
+        /**
+        * Launches a landmark edit dialog and adds a landmark to the database.
+        *
+        * @param aUseCurrentLocation ETrue if the landmark will be based on 
+        * current location. EFalse if no location should be predefined.
+        */
+        void AddLandmarkL(TBool aUseCurrentLocation);
+
+        /** Opens landmark editor for editing given landmark 
+         *  \param aLandmark The lanndmark to be edited
+         *  \param aFetchCurrentLocation ETrue if the landmark location 
+         *                             shall be updated with current location
+         */
+        TBool EditNewLandmarkL( CPosLandmark& aLandmark, TBool aFetchCurrentLocation );
+        
+    private: // Data
+
+        //! The container containing the graphical components of the view
+        CLandmarksContainer* iContainer;
+
+        //! The application engine used for modifying categories
+        CLandmarksApplicationEngine& iEngine;
+
+        //! Decorates the navi pane (with navigation arrows etc)
+        CAknNavigationDecorator* iNaviDecorator;
+
+    };
+
+
+#endif // __LANDMARKS_VIEW_H__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationlandmarksrefappfors60/Inc/LmRefApp.hrh	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,97 @@
+/*
+* 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:  Defines IDs and constants for UI components
+*
+*/
+
+
+#ifndef __LANDMARKS_HRH__
+#define __LANDMARKS_HRH__
+
+// DATA TYPES
+
+enum TLandmarksCommandIds
+    {
+    ELandmarksOpen = 1,  // start value must not be 0
+    ELandmarksEdit,
+    ELandmarksSave,
+    ELandmarksDelete,
+    ELandmarksRename,
+    ELandmarksAddBlank,
+    ELandmarksAddCurrent,
+    ELandmarksAddCategory,
+    ELandmarksEditCategories,
+    ELandmarksUpdateToCurrentLocation,
+    ELandmarksResetCoordinates
+    };
+
+enum TLandmarksViewIds
+    {
+    ELandmarksViewId = 1,
+    ELandmarksCategoriesViewId,
+    ELandmarksInfoViewId
+    };
+
+enum TLandmarksViewMessageIds
+    {
+    ELandmarksViewInfoById = 1
+    };
+
+enum TLandmarksMenuTabIds
+    {
+    ELandmarksNameTab = 1,
+    ELandmarksCategoriesTab
+    };
+
+enum TLandmarkInfoFieldIds
+    {
+    ELandmarkNameField = 1,
+    ELandmarkDescField,
+    ELandmarkCategoryField,
+    ELandmarkLatitudeField,
+    ELandmarkLongitudeField,
+    ELandmarkAltitudeField,
+    ELandmarkHorAccField,
+    ELandmarkVerAccField,
+    ELandmarkRadiusField,
+    ELandmarkStreetField,
+    ELandmarkPostalField,
+    ELandmarkCityField,
+    ELandmarkCountryField
+    };
+
+enum TLandmarkDialogIds
+    {
+    ELandmarksInitDbProgressDialog = 0x200,
+    ELandmarksGeneralQuery,
+    ELandmarksRenameQuery,
+    ELandmarksAcquireLocationWaitNote
+    };
+
+enum TRealEditors
+    {
+    ELatitudeEditor = 0,
+    ELongitudeEditor,
+    EAltitudeEditor,
+    EHorizontalAccEditor,
+    EVerticalAccEditor,
+    ERadiusEditor
+    };
+
+#define KEditorMaxWidth 255 // equals KPosLmMaxTextFieldLength, see EPos_Landmarks.h
+#define KDescMaxWidth 4095 // equals KPosLmMaxDescriptionLength, see EPos_Landmarks.h
+#define KMaxReal32Length 11 // TReal32 can represent 6-9 significant digits + decimal and sign
+#define KMaxReal64Length 19 // TReal64 can represent 15-17 significant digits + decimal and sign
+
+#endif // __LANDMARKS_HRH__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationlandmarksrefappfors60/Inc/LmRefApp.rls	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,434 @@
+/*
+* 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:  Defines literal strings for a specific language
+*
+*/
+
+
+//  LOCALISATION STRINGS
+
+//d:Defines the application title
+//l:
+//w:
+//
+rls_string qtn_lmrefapp_title                 "LmRefApp"
+
+//d:Defines the landmarks view title
+//l:
+//w:
+//
+rls_string qtn_lmrefapp_view                  "Landmarks"
+
+//d:Defines the categories view title
+//l:
+//w:
+//
+rls_string qtn_lmrefapp_categories_view       "Categories"
+
+//d:Describes the command open landmark
+//l:
+//w:
+//
+rls_string qtn_lmrefapp_open_item             "Open"
+
+//d:Describes the command edit landmark
+//l:
+//w:
+//
+rls_string qtn_lmrefapp_edit_item             "Edit"
+
+//d:Describes the command to save landmark
+//l:
+//w:
+//
+rls_string qtn_lmrefapp_save_item             "Save"
+
+//d:Describes the command for creating a new category
+//l:
+//w:
+//
+rls_string qtn_lmrefapp_new_cat_item          "New Category"
+
+//d:Describes the command for creating a new landmark
+//l:
+//w:
+//
+rls_string qtn_lmrefapp_new_lm_item           "New landmark"
+
+//d:Describes the sub command for creating a landmark based on current
+//d:location
+//l:
+//w:
+//
+rls_string qtn_lmrefapp_add_current_item      "Current location"
+
+//d:Describes the sub command for creating a landmark based on current
+//d:location
+//l:
+//w:
+//
+rls_string qtn_lmrefapp_edit_cat_item         "Edit categories"
+
+//d:Decribes the menu item on the edit landmark menu for fetching the current
+//d:location
+//l:
+//w:
+//
+rls_string qtn_lmrefapp_current_loc           "Fetch current location"
+
+//d:Decribes the menu item on the edit landmark menu for resetting
+//d:coordinates
+//l:
+//w:
+//
+rls_string qtn_lmrefapp_reset_coords 			"Reset coordinates"
+
+//d:Describes the sub command for creating an empty landmark
+//l:
+//w:
+//
+rls_string qtn_lmrefapp_add_blank_item        "Blank"
+
+//d:Describes the command for renaming category
+//l:
+//w:
+//
+rls_string qtn_lmrefapp_rename_item           "Rename"
+
+//d:Describes the command for deleting an item
+//l:
+//w:
+//
+rls_string qtn_lmrefapp_delete_item           "Delete"
+
+//d:Describes the command for exiting the application
+//l:
+//w:
+//
+rls_string qtn_lmrefapp_exit_item             "Exit"
+
+//d:Defines the error when editing a landmark and no data supplied
+//l:
+//w:
+//
+rls_string qtn_lmrefapp_empty_landmark_error  "Enter landmark name"
+
+//d:Defines the error when editing a landmark and the supplied latitude
+//d:is illegal. (Longitude is undefined)
+//l:
+//w:
+//
+rls_string qtn_lmrefapp_latitude_error        "Illegal latitude"
+
+//d:Defines the error when editing a landmark and the supplied longitude
+//d:is illegal. (Latitude is undefined)
+//l:
+//w:
+//
+rls_string qtn_lmrefapp_longitude_error       "Illegal longitude"
+
+//d:Defines the error when editing a landmark and the supplied altitude
+//d:is illegal.
+//l:
+//w:
+//
+rls_string qtn_lmrefapp_altitude_error        "Illegal altitude"
+
+//d:Defines the error when editing a landmark and the horizontal accuracy
+//d:is illegal.
+//l:
+//w:
+//
+rls_string qtn_lmrefapp_hor_acc_error         "Illegal horizontal accuracy"
+
+//d:Defines the error when editing a landmark and the vertical accuracy
+//d:is illegal.
+//l:
+//w:
+//
+rls_string qtn_lmrefapp_ver_acc_error         "Illegal vertical accuracy"
+
+//d:Defines the error when editing a landmark and the coverage radius
+//d:is illegal.
+//l:
+//w:
+//
+rls_string qtn_lmrefapp_radius_error          "Illegal coverage radius"
+
+//d:Defines the error when editing a landmark and either the latitude or the
+//d:longitude are undefined.
+//l:
+//w:
+//
+rls_string qtn_lmrefapp_lat_long_error        "Latitude and longitude must be defined together"
+
+//d:Defines the error when editing a landmark and the supplied altitude
+//d:is legal but no latitude or longitude is defined.
+//l:
+//w:
+//
+rls_string qtn_lmrefapp_alt_lat_long_error    "Setting altitude requires that latitude and longitude are defined"
+
+//d:Defines the error when editing a landmark and the supplied horizontal
+//d:accuracy is legal but no latitude or longitude is defined.
+//l:
+//w:
+//
+rls_string qtn_lmrefapp_hacc_lat_long_error   "Setting horizontal accuracy requires that latitude and longitude are defined"
+
+//d:Defines the error when editing a landmark and the supplied vertical
+//d:accuracy is legal but no altitude is defined.
+//l:
+//w:
+//
+rls_string qtn_lmrefapp_vacc_alt_error        "Setting vertical accuracy requires that altitude is defined"
+
+//d:Decribes the name field of a landmark in the edit landmark dialog.
+//l:
+//w:
+//
+rls_string qtn_lmrefapp_name                  "Name"
+
+//d:Decribes the description field of a landmark in the edit landmark dialog.
+//l:
+//w:
+//
+rls_string qtn_lmrefapp_description           "Description"
+
+//d:Decribes the categories field of a landmark in the edit landmark dialog.
+//l:
+//w:
+//
+rls_string qtn_lmrefapp_categories            "Categories"
+
+//d:Decribes the latitude field of a landmark in the edit landmark dialog.
+//l:
+//w:
+//
+rls_string qtn_lmrefapp_latitude              "Latitude"
+
+//d:Decribes the longitude field of a landmark in the edit landmark dialog.
+//l:
+//w:
+//
+rls_string qtn_lmrefapp_longitude             "Longitude"
+
+//d:Decribes the altitude field of a landmark in the edit landmark dialog.
+//l:
+//w:
+//
+rls_string qtn_lmrefapp_altitude              "Altitude"
+
+//d:Decribes the horizontal accuracy field of a landmark in the edit landmark
+//d:dialog.
+//l:
+//w:
+//
+rls_string qtn_lmrefapp_hor_acc               "Horizontal accuracy"
+
+//d:Decribes the vertical accuracy field of a landmark in the edit landmark
+//d:dialog.
+//l:
+//w:
+//
+rls_string qtn_lmrefapp_ver_acc               "Vertical accuracy"
+
+//d:Decribes the radius field of a landmark in the edit landmark dialog.
+//l:
+//w:
+//
+rls_string qtn_lmrefapp_radius                "Coverage Radius"
+
+//d:Decribes the street field of a landmark in the edit landmark dialog.
+//l:
+//w:
+//
+rls_string qtn_lmrefapp_street                "Street"
+
+//d:Decribes the postal code field of a landmark in the edit landmark dialog.
+//l:
+//w:
+//
+rls_string qtn_lmrefapp_postal                "Postal/ZIP"
+
+//d:Decribes the city field of a landmark in the edit landmark dialog.
+//l:
+//w:
+//
+rls_string qtn_lmrefapp_city                  "City"
+
+//d:Decribes the country field of a landmark in the edit landmark dialog.
+//l:
+//w:
+//
+rls_string qtn_lmrefapp_country               "Country"
+
+//d:Decribes the name field of a landmark in the landmark info view.
+//l:
+//w:
+//
+rls_string qtn_lmrefapp_name_short            "name"
+
+//d:Decribes the description field of a landmark in the landmark info view.
+//l:
+//w:
+//
+rls_string qtn_lmrefapp_description_short     "info"
+
+//d:Decribes the category field of a landmark in the view landmark dialog.
+//l:
+//w:
+//
+rls_string qtn_lmrefapp_category_short        "category"
+
+//d:Decribes the latitude field of a landmark in the landmark info view.
+//l:
+//w:
+//
+rls_string qtn_lmrefapp_latitude_short        "latitude"
+
+//d:Decribes the longitude field of a landmark in the landmark info view.
+//l:
+//w:
+//
+rls_string qtn_lmrefapp_longitude_short       "longitude"
+
+//d:Decribes the altitude field of a landmark in the landmark info view.
+//l:
+//w:
+//
+rls_string qtn_lmrefapp_altitude_short        "altitude"
+
+//d:Decribes the horizontal accuracy field of a landmark in the edit landmark
+//d:dialog.
+//l:
+//w:
+//
+rls_string qtn_lmrefapp_hor_acc_short         "hor.acc."
+
+//d:Decribes the vertical accuracy field of a landmark in the edit landmark
+//d:dialog.
+//l:
+//w:
+//
+rls_string qtn_lmrefapp_ver_acc_short         "vert.acc."
+
+//d:Decribes the radius field of a landmark in the landmark info view.
+//l:
+//w:
+//
+rls_string qtn_lmrefapp_radius_short          "coverage"
+
+//d:Decribes the street field of a landmark in the landmark info view.
+//l:
+//w:
+//
+rls_string qtn_lmrefapp_street_short          "street"
+
+//d:Decribes the postal code field of a landmark in the landmark info view.
+//l:
+//w:
+//
+rls_string qtn_lmrefapp_postal_short          "postal"
+
+//d:Decribes the city field of a landmark in the landmark info view.
+//l:
+//w:
+//
+rls_string qtn_lmrefapp_city_short            "city"
+
+//d:Decribes the country field of a landmark in the landmark info view.
+//l:
+//w:
+//
+rls_string qtn_lmrefapp_country_short         "country"
+
+//d:Describes what is done when the default landmarks database is initialized.
+//l:
+//w:
+//
+rls_string qtn_lmrefapp_initializing          "Initializing database..."
+
+//d:Describes what is done when current location is retrieved.
+//l:
+//w:
+//
+rls_string qtn_lmrefapp_acquiring_loc         "Acquiring location..."
+
+//d:Query that asks the user if it is OK to delete a specific category.
+//d:%S is the name of the current category to be deleted.
+//l:
+//w:
+//
+rls_string qtn_lmrefapp_delete_category       "Delete category \"%S\""
+
+//d:The title of the rename category dialog.
+//l:
+//w:
+//
+rls_string qtn_lmrefapp_new_category          "New Category:"
+
+//d:Description of the category name editor
+//l:
+//w:
+//
+rls_string qtn_lmrefapp_category_name         "Category name:"
+
+//d:Definition of the undefined category choice.
+//l:
+//w:
+//
+rls_string qtn_lmrefapp_undefined_category    "None"
+
+//d:Query that asks the user if it is OK to delete a specific landmark.
+//d:%S is the name of the current landmark to be deleted.
+//l:
+//w:
+//
+rls_string qtn_lmrefapp_delete_landmark       "Delete landmark \"%S\""
+
+//d:Title of the dialog used for assigning categories to a landmark.
+//l:
+//w:
+//
+rls_string qtn_lmrefapp_edit_cat_title        "Categories"
+
+//d:Definition of a the message displayed when acquiring location fails.
+//d:%d represents error code
+//l:
+//w:
+//
+rls_string qtn_lmrefapp_acquiring_loc_error   "Acquiring location failed (reason: %d)"
+
+//d:Edit button title
+//l:
+//w:
+//
+rls_string qtn_lmrefapp_edit                   "Edit"
+
+//d:Back button title
+//l:
+//w:
+//
+rls_string qtn_lmrefapp_back                   "Back"
+
+//d:Definition of the message displayed when acquiring current location fails
+//d:and last known location is used
+//l:
+//w:
+//
+rls_string qtn_lmrefapp_last_location_used_info  "Current location unavailable.\nUsing last known location."
+
+// End of File
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationlandmarksrefappfors60/Src/Landmarks.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,38 @@
+/*
+* Copyright (c) 2004-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:  Creates the Landmarks Reference Application
+*
+*/
+
+
+#include "LandmarksApplication.h"
+
+#include <eikstart.h>
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+LOCAL_C CApaApplication* NewApplication()
+{
+    return new CLandmarksApplication;
+}
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+TInt E32Main()
+{
+    return EikStart::RunApplication(NewApplication);
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationlandmarksrefappfors60/Src/LandmarksAppUi.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,265 @@
+/*
+* Copyright (c) 2004-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:  Implements the CLandmarksAppUi class
+*
+*/
+
+
+
+#include <barsread2.h>
+
+#include <eikprogi.h>
+#include <AknProgressDialog.h>
+#include <akntabgrp.h>
+#include <aknnavide.h>
+
+#include "LmRefApp.hrh"
+#include <lmrefapp.rsg>
+#include "LandmarksAppUi.h"
+#include "LandmarksView.h"
+#include "LandmarksCategoriesView.h"
+#include "LandmarksInfoView.h"
+#include "LandmarksApplicationEngine.h"
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+CLandmarksAppUi::CLandmarksAppUi()
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksAppUi::ConstructL()
+    {
+    BaseConstructL(EAknEnableSkin);
+
+    // Fetch pointer to the status pane.
+    CEikStatusPane* statusPane = StatusPane();
+
+    // Fetch pointer to the default navi pane control.
+    CAknNavigationControlContainer* naviPane = 
+        (CAknNavigationControlContainer*) statusPane->ControlL(
+            TUid::Uid(EEikStatusPaneUidNavi));
+
+    // Initialise the nave decorator that visualizes the tabs and navi arrows.
+    iNaviDecorator = naviPane->ResourceDecorator();
+    CAknTabGroup* tabGroup =
+        static_cast<CAknTabGroup*>(iNaviDecorator->DecoratedControl());
+    tabGroup->SetObserver(this);
+
+    // Create and init the application engine.
+    iEngine = CLandmarksApplicationEngine::NewL();
+
+    // Initialize the default landmark database if necessary.
+    if (iEngine->StartInitializeDbIfNecessaryL(this))
+        {
+        LaunchProgressDialogL();
+        }
+    else
+        {
+        // Db is already initialized - OK to construct views.
+        PostConstructL();
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+CLandmarksAppUi::~CLandmarksAppUi()
+    {
+    delete iNaviDecorator;
+
+    // Cannot delete iEngine here since it is needed when deactivating views.
+    iEngine = NULL;
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksAppUi::HandleCommandL(TInt aCommand)
+    {
+    switch(aCommand)
+        {
+        case EEikCmdExit:
+        case EAknSoftkeyExit:
+            if (iProgressDialog)
+                {
+                // The progress dialog has been dismissed but not yet deleted.
+                // iProgressDialog->ProcessFinishedL() deletes the progress 
+                // dialog asynchronously. If the app is exited before the 
+                // dialog is deleted, a Cone 8 panic will occur.
+                // Thus, iProgressDialog must be deleted explicitely here.
+                delete iProgressDialog;
+                iProgressDialog = NULL;
+                }
+            Exit();
+            break;
+        default:
+            break;
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+TKeyResponse CLandmarksAppUi::HandleKeyEventL(
+    const TKeyEvent& aKeyEvent,TEventCode aType)
+    {
+    // Offer arrow keys to CAknTabGroup, it then calculates new active tab
+    // and later calls our TabChangedL() -method with correct new tab index.
+
+    CAknTabGroup* tabGroup = 
+        static_cast <CAknTabGroup*> (iNaviDecorator->DecoratedControl());
+
+    if (tabGroup &&
+        (aKeyEvent.iCode == EKeyLeftArrow || aKeyEvent.iCode == EKeyRightArrow))
+        {
+        return tabGroup->OfferKeyEventL(aKeyEvent, aType);
+        }
+
+    return EKeyWasNotConsumed;
+    }
+
+// ----------------------------------------------------------------------------
+// ----------------------------------------------------------------------------
+//
+void CLandmarksAppUi::HandleResourceChangeL( TInt aType )
+    {
+    CAknAppUi::HandleResourceChangeL( aType );
+    
+    CLandmarksView* lmView = ( CLandmarksView* ) View( TUid::Uid( ELandmarksViewId ) );
+    if ( lmView )
+        {
+        lmView->HandleResourceChange( aType );
+        }
+
+    CLandmarksCategoriesView* catView = ( CLandmarksCategoriesView* ) View( TUid::Uid( ELandmarksCategoriesViewId ) );
+    if ( catView )
+        {
+        catView->HandleResourceChange( aType );
+        }
+
+    CLandmarksInfoView* infoView = ( CLandmarksInfoView* ) View( TUid::Uid( ELandmarksInfoViewId ) );
+    if ( infoView )
+        {
+        infoView->HandleResourceChange( aType );
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksAppUi::TabChangedL(TInt aIndex)
+    {
+    switch (aIndex)
+        {
+        case 0:
+            ActivateLocalViewL(TUid::Uid(ELandmarksViewId));
+            break;
+        case 1:
+            ActivateLocalViewL(TUid::Uid(ELandmarksCategoriesViewId));
+            break;
+        default:
+            break;    
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksAppUi::NotifyOperationProgressL(
+    TOperation aOperation, 
+    TInt aProgress, 
+    TInt aErrorCode)
+    {
+    if (aOperation == EInitializeDb)
+        {
+        // Update Progressbar
+        CEikProgressInfo* progressBar = iProgressDialog->GetProgressInfoL();
+        progressBar->SetAndDraw(aProgress);
+
+        if (aErrorCode == KErrNone) // Db initialization ready.
+            {
+            // Dismiss dialog. 
+            iProgressDialog->ProcessFinishedL();
+            
+            // Continue with construction
+            PostConstructL();
+            }
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksAppUi::PostConstructL()
+    {
+    // Create landmarks view
+    CLandmarksView* landmarksView = 
+        CLandmarksView::NewLC(iNaviDecorator, *iEngine);
+    AddViewL(landmarksView); // Transfer ownership to base class 
+    CleanupStack::Pop(landmarksView);
+
+    // Create categories view
+    CLandmarksCategoriesView* categoriesView = 
+        CLandmarksCategoriesView::NewLC(iEngine); // ownership is transferred
+    AddViewL(categoriesView); // Transfer ownership to base class 
+    CleanupStack::Pop(categoriesView);
+
+    // Create landmark info view
+    CLandmarksInfoView* infoView = 
+        CLandmarksInfoView::NewLC(iNaviDecorator, *iEngine);
+    AddViewL(infoView); // Transfer ownership to base class 
+    CleanupStack::Pop(infoView);
+
+    // Activate landmarks view
+    landmarksView->ActivateViewL(landmarksView->ViewId());
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksAppUi::DialogDismissedL(TInt /*aButtonId*/)
+    {
+    iProgressDialog = NULL;
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksAppUi::LaunchProgressDialogL()
+    {
+    // Initialize dialog
+    TBool showImmediately(ETrue);
+    iProgressDialog = new (ELeave) CAknProgressDialog(
+        reinterpret_cast <CEikDialog**> (&iProgressDialog), showImmediately);
+    iProgressDialog->PrepareLC(R_LMREFAPP_INIT_DB_PROGRESS_DIALOG);
+    iProgressDialog->SetCallback(this);
+
+    // Initialize progress bar.
+    CEikProgressInfo* progressBar = iProgressDialog->GetProgressInfoL();
+    const TInt KFinalProgressValue = 100;  // 100% done when ready
+    progressBar->SetFinalValue(KFinalProgressValue);
+
+    // Launch the prepared dialog.
+    iProgressDialog->RunLD();
+
+    // Draw the progress bar
+    progressBar->IncrementAndDraw(0);
+    }
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationlandmarksrefappfors60/Src/LandmarksApplication.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,48 @@
+/*
+* Copyright (c) 2004-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 CLandmarksApplication
+*
+*/
+
+
+
+#include "LandmarksDocument.h"
+#include "LandmarksApplication.h"
+
+
+// UID for the application, this should match the uid defined in the mmp file.
+static const TUid KUidLandmarksApp = {0xA0000187};
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+CApaDocument* CLandmarksApplication::CreateDocumentL()
+    {  
+    // Create an Landmarks document, and return a pointer to it
+    CApaDocument* document = CLandmarksDocument::NewL(*this);
+    return document;
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+TUid CLandmarksApplication::AppDllUid() const
+    {
+    // Return the UID for the Landmarks application
+    return KUidLandmarksApp;
+    }
+
+  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationlandmarksrefappfors60/Src/LandmarksApplicationEngine.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,413 @@
+/*
+* Copyright (c) 2004-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 application engine component interface.
+*
+*/
+
+
+
+#include <EPos_CPosLandmarkDatabase.h>
+
+#include "LmRefApp.hrh"
+#include "LandmarksApplicationEngine.h"
+#include "LandmarksCommonData.h"
+#include "LandmarksEngine.h"
+#include "LandmarksCategoriesEngine.h"
+#include "LandmarksDbEventHandler.h"
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CLandmarksApplicationEngine::CLandmarksApplicationEngine
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+CLandmarksApplicationEngine::CLandmarksApplicationEngine()
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CLandmarksApplicationEngine::::ConstructL
+// Symbian 2nd phase constructor can leave.
+// -----------------------------------------------------------------------------
+//
+void CLandmarksApplicationEngine::ConstructL()
+    {
+    iDb = CPosLandmarkDatabase::OpenL();
+    iLandmarksEngine = CLandmarksEngine::NewL(*iDb);
+    iCategoriesEngine = CLandmarksCategoriesEngine::NewL(*iDb);
+    }
+
+// -----------------------------------------------------------------------------
+// CLandmarksApplicationEngine::NewL
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+CLandmarksApplicationEngine* CLandmarksApplicationEngine::NewL()
+    {
+    CLandmarksApplicationEngine* self = 
+        new (ELeave) CLandmarksApplicationEngine();
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    CleanupStack::Pop(self);
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+CLandmarksApplicationEngine::~CLandmarksApplicationEngine()
+    {
+    delete iLandmarksEngine;
+    delete iCategoriesEngine;
+    delete iDbEventHandler;
+    delete iDb;
+    }
+
+// -----------------------------------------------------------------------------
+// CLandmarksApplicationEngine::NotifyViewActivated
+// The engine that corresponds to an active view must have higher priority than
+// engines corresponding to deactivated views.
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+void CLandmarksApplicationEngine::NotifyViewActivated(
+    TUid aViewId, 
+    TBool aIsActive)
+    {
+    if (aViewId.iUid == ELandmarksViewId)
+        {
+        if (aIsActive)
+            {
+            iLandmarksEngine->SetPrio(CActive::EPriorityStandard);
+            }
+        else
+            {
+            iLandmarksEngine->SetPrio(CActive::EPriorityLow);
+            }
+        }
+    else if (aViewId.iUid == ELandmarksCategoriesViewId)
+        {
+        if (aIsActive)
+            {
+            iCategoriesEngine->SetPrio(CActive::EPriorityStandard);
+            }
+        else
+            {
+            iCategoriesEngine->SetPrio(CActive::EPriorityLow);
+            }
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CLandmarksApplicationEngine::StartInitializeDbIfNecessaryL
+// 
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+TBool CLandmarksApplicationEngine::StartInitializeDbIfNecessaryL(
+    MLandmarksOperationObserver* aObserver)
+    {
+    return iLandmarksEngine->StartInitializeDbIfNecessaryL(aObserver);
+    }
+
+// -----------------------------------------------------------------------------
+// CLandmarksApplicationEngine::AddDbObserverL
+// 
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+void CLandmarksApplicationEngine::AddDbObserverL(
+    MLandmarksDbObserver* aObserver)
+    {
+    if (!iDbEventHandler)
+        {
+        iDbEventHandler = new (ELeave) CLandmarksDbEventHandler(*iDb);
+        }
+    iDbEventHandler->AddObserverL(aObserver);
+    }
+
+// -----------------------------------------------------------------------------
+// CLandmarksApplicationEngine::LandmarkLC
+// 
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+CPosLandmark* CLandmarksApplicationEngine::LandmarkLC(TPosLmItemId aItemId)
+    {
+    return iDb->ReadLandmarkLC(aItemId);
+    }
+
+// -----------------------------------------------------------------------------
+// CLandmarksApplicationEngine::CommitLandmarkL
+// 
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+void CLandmarksApplicationEngine::CommitLandmarkL(
+    const CPosLandmark& aLandmark)
+    {
+    // We need to cancel any search/read operation in any view engine. 
+    // Otherwise database will be locked.
+    iLandmarksEngine->Cancel();
+    iCategoriesEngine->Cancel();
+
+    iLandmarksEngine->CommitLandmarkL(aLandmark);
+    }
+
+// -----------------------------------------------------------------------------
+// CLandmarksApplicationEngine::DeleteLandmarkL
+// 
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+void CLandmarksApplicationEngine::DeleteLandmarkL(TPosLmItemId aItemId)
+    {
+    // We need to cancel any search/read operation in any view engine. 
+    // Otherwise database will be locked.
+    iLandmarksEngine->Cancel();
+    iCategoriesEngine->Cancel();
+
+    iLandmarksEngine->DeleteLandmarkL(aItemId);
+    }
+
+// -----------------------------------------------------------------------------
+// CLandmarksApplicationEngine::AddLandmarkL
+// 
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+void CLandmarksApplicationEngine::AddLandmarkL(CPosLandmark& aLandmark)
+    {
+    // We need to cancel any search/read operation in any view engine. 
+    // Otherwise database will be locked.
+    iLandmarksEngine->Cancel();
+    iCategoriesEngine->Cancel();
+
+    iLandmarksEngine->AddLandmarkL(aLandmark);
+    }
+
+// -----------------------------------------------------------------------------
+// CLandmarksApplicationEngine::StartSearchingLandmarksL
+// 
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+void CLandmarksApplicationEngine::StartSearchingLandmarksL(
+    MLandmarksOperationObserver* aObserver)
+    {
+    iLandmarksEngine->StartSearchingLandmarksL(aObserver);
+    }
+
+// -----------------------------------------------------------------------------
+// CLandmarksApplicationEngine::StartSearchingLandmarksL
+// 
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+void CLandmarksApplicationEngine::StartSearchingLandmarksL(
+    const TDesC& aSearchPattern, 
+    TBool aSearchOnlyInPreviousMatches,
+    MLandmarksOperationObserver* aObserver)
+    {
+    iLandmarksEngine->StartSearchingLandmarksL(
+        aSearchPattern, 
+        aSearchOnlyInPreviousMatches, 
+        aObserver);
+    }
+
+// -----------------------------------------------------------------------------
+// CLandmarksApplicationEngine::FetchLandmarkSearchResultL
+// 
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+RArray<TPosLmItemId>* CLandmarksApplicationEngine::FetchLandmarkSearchResult()
+    {
+    return iLandmarksEngine->FetchSearchResult();
+    }
+
+// -----------------------------------------------------------------------------
+// CLandmarksApplicationEngine::StartReadingLandmarksL
+// 
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+void CLandmarksApplicationEngine::StartReadingLandmarksL(
+    TInt aNrOfItemsToReadPerBundle,
+    MLandmarksOperationObserver* aObserver)
+    {
+    iLandmarksEngine->StartReadingLandmarksL(
+        aNrOfItemsToReadPerBundle, 
+        aObserver);
+    }
+
+// -----------------------------------------------------------------------------
+// CLandmarksApplicationEngine::FetchLandmarksLC
+// 
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+CArrayPtr<CPosLandmark>* CLandmarksApplicationEngine::FetchLandmarksLC()
+    {
+    return iLandmarksEngine->FetchLandmarksLC();
+    }
+
+// -----------------------------------------------------------------------------
+// CLandmarksApplicationEngine::CategoryLC
+// 
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+CPosLandmarkCategory* CLandmarksApplicationEngine::CategoryLC(
+    TPosLmItemId aItemId)
+    {
+    return iCategoriesEngine->CategoryLC(aItemId);
+    }
+
+// -----------------------------------------------------------------------------
+// CLandmarksApplicationEngine::DeleteCategoryL
+// 
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+void CLandmarksApplicationEngine::DeleteCategoryL(TPosLmItemId aItemId)
+    {
+    // We need to cancel any search/read operation in any view engine. 
+    // Otherwise database will be locked.
+    iLandmarksEngine->Cancel();
+    iCategoriesEngine->Cancel();
+
+    iCategoriesEngine->DeleteCategoryL(aItemId);
+    }
+
+// -----------------------------------------------------------------------------
+// CLandmarksApplicationEngine::UpdateCategoryL
+// 
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+void CLandmarksApplicationEngine::UpdateCategoryL(
+    const CPosLandmarkCategory& aCategory)
+    {
+    // We need to cancel any search/read operation in any view engine. 
+    // Otherwise database will be locked.
+    iLandmarksEngine->Cancel();
+    iCategoriesEngine->Cancel();
+
+    iCategoriesEngine->UpdateCategoryL(aCategory);
+    }
+
+// -----------------------------------------------------------------------------
+// CLandmarksApplicationEngine::AddCategoryL
+// 
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+void CLandmarksApplicationEngine::AddCategoryL(CPosLandmarkCategory& aCategory)
+    {
+    // We need to cancel any search/read operation in any view engine. 
+    // Otherwise database will be locked.
+    iLandmarksEngine->Cancel();
+    iCategoriesEngine->Cancel();
+
+    iCategoriesEngine->AddCategoryL(aCategory);
+    }
+
+// -----------------------------------------------------------------------------
+// CLandmarksApplicationEngine::StartSearchingCategoriesL
+// 
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+void CLandmarksApplicationEngine::StartSearchingCategoriesL(
+    const TDesC& aSearchPattern, 
+    TBool aSearchOnlyInPreviousMatches,
+    MLandmarksOperationObserver* aObserver)
+    {
+    iCategoriesEngine->StartSearchingCategoriesL(
+        aSearchPattern, 
+        aSearchOnlyInPreviousMatches, 
+        aObserver);
+    }
+
+// -----------------------------------------------------------------------------
+// CLandmarksApplicationEngine::StartSearchingCategoriesL
+// 
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+void CLandmarksApplicationEngine::StartSearchingCategoriesL(
+    MLandmarksOperationObserver* aObserver)
+    {
+    iCategoriesEngine->StartSearchingCategoriesL(aObserver);
+    }
+
+// -----------------------------------------------------------------------------
+// CLandmarksApplicationEngine::FetchCategorySearchResult
+// 
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+RArray<TPosLmItemId>* CLandmarksApplicationEngine::FetchCategorySearchResult()
+    {
+    return iCategoriesEngine->FetchSearchResult();
+    }
+
+// -----------------------------------------------------------------------------
+// CLandmarksApplicationEngine::StartReadingCategoriesL
+// 
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+void CLandmarksApplicationEngine::StartReadingCategoriesL(
+    TInt aNrOfItemsToReadPerBundle,
+    MLandmarksOperationObserver* aObserver)
+    {
+    iCategoriesEngine->StartReadingCategoriesL(
+        aNrOfItemsToReadPerBundle, aObserver);
+    }
+
+// -----------------------------------------------------------------------------
+// CLandmarksApplicationEngine::FetchCategoriesLC
+// 
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+CArrayPtr<CPosLandmarkCategory>* CLandmarksApplicationEngine::FetchCategoriesLC()
+    {
+    return iCategoriesEngine->FetchCategoriesLC();
+    }
+
+// -----------------------------------------------------------------------------
+// CLandmarksApplicationEngine::CategoriesL
+// 
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+CArrayPtr<CPosLandmarkCategory>* CLandmarksApplicationEngine::CategoriesL()
+    {
+    return iCategoriesEngine->CategoriesL();
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+HBufC* CLandmarksApplicationEngine::DatabaseUriLC()
+    {
+    return iDb->DatabaseUriLC();
+    }
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationlandmarksrefappfors60/Src/LandmarksCategoriesContainer.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,410 @@
+/*
+* Copyright (c) 2004-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:  Implements the CLandmarksCategoriesContainer class
+*
+*/
+
+
+
+#include <aknsfld.h>
+#include <AknQueryDialog.h>
+#include <eikclbd.h>
+#include <eikmenub.h>
+
+#include <EPos_CPosLandmarkCategory.h>
+
+#include <lmrefapp.rsg>
+#include "LandmarksCategoriesContainer.h"
+#include "LandmarksCommonData.h"
+#include "LandmarksListbox.h"
+#include "LandmarksListBoxModel.h"
+#include "LandmarksApplicationEngine.h"
+#include "LandmarksCategoriesModel.h"
+
+// ============================= LOCAL FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// ResetAndDestroyCategories
+// Resets and destroys an array of categories. This function is used as a 
+// TCleanupOperation in CLandmarksCategoriesModel.
+// Params: aAny: The categories array to reset ands destroy
+// -----------------------------------------------------------------------------
+//
+void ResetAndDestroyCategories(TAny* aAny)
+    {
+    CArrayPtr<CPosLandmarkCategory>* categories = 
+        reinterpret_cast <CArrayPtr<CPosLandmarkCategory>*> (aAny);
+    categories->ResetAndDestroy();
+    }
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+CLandmarksCategoriesContainer::CLandmarksCategoriesContainer(
+    CAknView& aView,
+    CLandmarksApplicationEngine& aEngine, 
+    CEikMenuBar& aMenuBar)
+:   CLandmarksContainerBase(aView, aEngine), 
+    iMenuBar(aMenuBar)
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksCategoriesContainer::ConstructL(
+    const TRect& aRect)
+    {
+    // Create listbox and findbox.
+    CLandmarksContainerBase::ConstructL(aRect);
+
+    // Start observer db events.
+    iEngine.AddDbObserverL(this);
+
+    // Create data model.
+    iModel = CLandmarksCategoriesModel::NewL();
+
+    // Create a descriptor array that will contain the landmark names and 
+    // icon indeces.
+    CLandmarksListBoxModel* listBoxModel = iListBox->Model();
+    listBoxModel->SetItemTextArray(iModel->ItemList());
+    listBoxModel->SetOwnershipType(ELbmDoesNotOwnItemArray);
+
+    // Create an icon array the will be displayed in the listbox.
+
+    CIconList* icons = iModel->CreateIconListL();
+    iListBox->ItemDrawer()->ColumnData()->SetIconArray(icons);
+
+    // Observe listbox for state changes.
+    iListBox->SetObserver(this);
+
+    // Observe findbox for state changes.
+    iFindBox->SetObserver(this);
+
+    // Populate listbox with categories and icons.
+    StartUpdateListBoxL();
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+CLandmarksCategoriesContainer::~CLandmarksCategoriesContainer()
+    {
+    delete iModel;
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksCategoriesContainer::DeleteCategoryL()
+    {
+    // Format query.
+    HBufC* queryFormat = 
+        iCoeEnv->AllocReadResourceAsDes16LC(R_LMREFAPP_DELETE_CATEGORY);
+
+    CPosLandmarkCategory* category = iEngine.CategoryLC(CurrentCategoryId());
+    TPtrC name;
+    category->GetCategoryName(name);
+    
+    HBufC* query = HBufC::NewLC(name.Length() + queryFormat->Length());
+    query->Des().Format(*queryFormat, &name);
+
+    // Launch dialog.
+    CAknQueryDialog* queryDialog = CAknQueryDialog::NewL();
+    if (queryDialog->ExecuteLD(R_LMREFAPP_GENERAL_QUERY, *query))
+        {
+        // Delete category if positive response.
+        iEngine.DeleteCategoryL(category->CategoryId());
+        }
+    CleanupStack::PopAndDestroy(3, queryFormat);
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+TPosLmItemId CLandmarksCategoriesContainer::CurrentCategoryId()
+    {
+    return iModel->CurrentItemId();
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+TBool CLandmarksCategoriesContainer::IsGlobalL()
+    {
+    CPosLandmarkCategory* category = iEngine.CategoryLC(CurrentCategoryId());
+    TBool isGlobal = (category->GlobalCategory() != KPosLmNullGlobalCategory);
+    CleanupStack::PopAndDestroy(category);
+
+    return isGlobal;
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+TKeyResponse CLandmarksCategoriesContainer::OfferKeyEventL(
+    const TKeyEvent& aKeyEvent, TEventCode aType)
+    {
+	TKeyResponse response = EKeyWasNotConsumed;
+
+    switch (aKeyEvent.iCode)
+        {
+        case EKeyUpArrow:
+        case EKeyDownArrow:
+            // Scrolling the listbox. Forward to iListBox.
+            response = iListBox->OfferKeyEventL(aKeyEvent, aType);
+            break;
+
+        case EKeyDevice3:
+            // Select key pressed. Display menu.
+            iMenuBar.SetMenuTitleResourceId(R_LMREFAPP_CATEGORIES_MENUBAR);
+            iMenuBar.TryDisplayMenuBarL();
+            response = EKeyWasConsumed;
+            break;
+
+        case EKeyBackspace:
+            if (iFindBox->TextLength() == 0 &&
+                IsItemSelected() &&
+                !IsGlobalL())
+                {
+                // If there is no text in the search field backspace will 
+                // delete a category.
+                DeleteCategoryL();
+                response = EKeyWasConsumed;
+                break;
+                }
+            // erase character in find box
+        default:
+            // Forward to findbox.
+            response =  iFindBox->OfferKeyEventL(aKeyEvent, aType);
+            break;
+        }
+
+    return response;
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksCategoriesContainer::NotifyOperationProgressL(
+    TOperation aOperation, 
+    TInt /*aProgress*/, 
+    TInt aErrorCode)
+    {
+    switch (aOperation)
+        {
+        case ECategorySearch:
+            HandleSearchReadyL(aErrorCode);
+            break;
+
+        case ECategoryRead:
+            HandleReadReadyL(aErrorCode);
+            break;
+
+        default:
+            break;
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksCategoriesContainer::NotifyDbEventL(
+    TPosLmEvent& aEvent, 
+    TInt aErrorCode)
+    {
+    if (aErrorCode == KErrNone)
+        {
+        switch (aEvent.iEventType)
+            {
+            case EPosLmEventUnknownChanges:
+            case EPosLmEventLandmarkUnknownChanges:
+            case EPosLmEventCategoryUnknownChanges:
+            // Any of the events below might have cancelled an ongoing 
+            // categories search/read operation => we must restart refreshing listbox
+            case EPosLmEventLandmarkCreated:
+            case EPosLmEventLandmarkDeleted:
+            case EPosLmEventLandmarkUpdated:
+            case EPosLmEventCategoryCreated:
+            case EPosLmEventCategoryDeleted:
+            case EPosLmEventCategoryUpdated:
+                StartUpdateListBoxL();
+                break;
+            case EPosLmEventNewDefaultDatabaseLocation:
+                // Not supported by this application
+                break;
+            case EPosLmEventMediaRemoved:
+                // Not supported by this application
+                break;
+            default:
+                // Ignore other non-category events
+                break;
+            }
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksCategoriesContainer::HandleControlEventL(
+    CCoeControl* aControl, 
+    TCoeEvent aEventType)
+    {
+	if (aEventType == EEventStateChanged && aControl == iListBox)
+		{
+		// Take the index of the current item in the list
+		TInt itemIndex = iListBox->CurrentItemIndex();
+
+		// Set the current item in the model object regarding to the list box.
+		iModel->SetCurrentItem(itemIndex);
+		}
+
+	if (aEventType == EEventStateChanged && aControl == iFindBox)
+		{
+        // Fetch filter from search field
+        TInt searchTextLength = iFindBox->TextLength();
+        HBufC* filterBuf = HBufC::NewLC(searchTextLength);
+        TPtr filter = filterBuf->Des();
+        iFindBox->GetSearchText(filter);
+
+        // If filter has changed repopulate list box. (It is necessary to check
+        // if filter has changed since each filter change generates several 
+        // EEventStateChanged events for find box)
+        if (filter != *iOldFilter)
+            {
+            // Filter has changed. Start filtering.
+            StartUpdateListBoxL();
+            }
+
+        CleanupStack::PopAndDestroy(filterBuf);
+		}
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksCategoriesContainer::StartUpdateListBoxL()
+    {
+    // Fetch filter from search field
+    TInt searchTextLength = iFindBox->TextLength();
+    const TInt KExtraChars = 2; // 2 chars wildcards
+    HBufC* filterBuf = HBufC::NewLC(searchTextLength + KExtraChars);
+    TPtr filter = filterBuf->Des();
+    iFindBox->GetSearchText(filter);
+
+    // Find out if there is any prevoius result to limit the search to
+    TInt oldFilterLength = iOldFilter->Length();
+    TBool searchOnlyInPreviousMatches = 
+        // If previous filter is empty there is no search results
+        oldFilterLength > 0 && 
+
+        // If chars have been removed from filter we abandon previous results
+        filter.Length() > oldFilterLength && 
+
+        // There must exist at least one previous match
+        IsItemSelected();
+
+    // old filter used - now we can update it
+    delete iOldFilter;
+    iOldFilter = NULL;
+    iOldFilter = filter.AllocL();
+
+	// Start to asynchronously populate the listbox model according to filter
+    if (filter.Length() == 0)
+        {
+        iEngine.StartSearchingCategoriesL(this);
+        }
+    else
+        {
+        filter.Append(KWildCard);
+        iEngine.StartSearchingCategoriesL(
+            filter, 
+            searchOnlyInPreviousMatches, 
+            this);
+        }
+
+    CleanupStack::PopAndDestroy(filterBuf);
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksCategoriesContainer::HandleSearchReadyL(TInt aErrorCode)
+    {
+
+    // Delete old icon array and add new
+	CColumnListBoxData* columnData = iListBox->ItemDrawer()->ColumnData();
+    CArrayPtr<CGulIcon>* iconList = columnData->IconArray();
+    iconList->ResetAndDestroy();
+    delete iconList;
+    columnData->SetIconArray(iModel->CreateIconListL());
+
+    if (aErrorCode == KErrNone)
+        {
+        // Update model
+        iModel->SetItemIds(iEngine.FetchCategorySearchResult());
+        iListBox->HandleItemRemovalL();
+
+        iEngine.StartReadingCategoriesL(KNrOfItemsDisplayed, this);
+        iReadingFirstPage = ETrue;
+        }
+    else if (aErrorCode == KErrNotFound)
+        {
+        // Update model (indicate no item is selected)
+        iModel->SetItemIds(NULL);
+        iModel->SetCurrentItem(iListBox->CurrentItemIndex());
+
+        // Update the listbox
+        iListBox->HandleItemRemovalL();
+        iListBox->DrawDeferred();
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksCategoriesContainer::HandleReadReadyL(
+    TInt aErrorCode)
+    {
+    // Update model with new categories
+    CArrayPtr<CPosLandmarkCategory>* categories = iEngine.FetchCategoriesLC();
+    CleanupStack::PushL(TCleanupItem(ResetAndDestroyCategories, categories));
+    iModel->RepopulateModelL(categories);
+    CleanupStack::PopAndDestroy(2, categories);
+
+    if (aErrorCode == KErrNone)
+        {
+        if (iReadingFirstPage)
+            {
+            // First page ready
+            iReadingFirstPage = EFalse;
+
+            // Add the first page
+            iListBox->HandleItemAdditionL();
+
+            // Set the first item selected by default. We must do this since 
+            // HandleItemRemovalL in HandleSearchReadyL resets the listbox.
+            iModel->SetCurrentItem(0);
+            iListBox->SetCurrentItemIndex(0);
+            }
+        else
+            {
+            iListBox->HandleItemAdditionL();
+            }
+        }
+    }
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationlandmarksrefappfors60/Src/LandmarksCategoriesDialog.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,136 @@
+/*
+* Copyright (c) 2004-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:  
+*       Implements the CLandmarksCategoriesDialog class
+*
+*/
+
+
+
+#include <e32std.h>
+#include <akntitle.h> 
+#include <aknappui.h>
+#include <eikmenup.h>
+
+#include "LmRefApp.hrh"
+#include <lmrefapp.rsg>
+#include "LandmarksLmCategoriesModel.h"
+#include "LandmarksApplicationEngine.h"
+#include "LandmarksCategoriesDialog.h"
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+CLandmarksCategoriesDialog::CLandmarksCategoriesDialog(
+    TInt& aSelectedItem,
+    CArrayFixFlat<TInt>* aMarkedItems,
+    CDesCArray* aListItems)
+    : 
+    CAknMarkableListDialog(aSelectedItem, aMarkedItems, aListItems, -1, -1, NULL)
+	{
+	}
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+CLandmarksCategoriesDialog::~CLandmarksCategoriesDialog()
+	{
+    // Restore title pane. Ownership of iOriginalTitle transferred.
+    if (iOriginalTitle && iTitlePane)
+        {
+        iTitlePane->SetText(iOriginalTitle);
+        }
+	}
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+TInt CLandmarksCategoriesDialog::RunDialogL(
+    CLandmarksLmCategoriesModel& aLmCategoriesModel)
+    {
+    // Create array of marked indeces
+    CArrayFixFlat<TInt>* markedItems = aLmCategoriesModel.SelectedCategoriesL();
+    CleanupStack::PushL(markedItems);
+
+    // Create name array
+    CDesCArray* listItems = aLmCategoriesModel.FormattedCategoryNamesL();
+    CleanupStack::PushL(listItems);
+
+    // Create the dialog
+    TInt selectedItem = 0;
+
+    CLandmarksCategoriesDialog* dialog = 
+        new (ELeave) CLandmarksCategoriesDialog(
+            selectedItem, markedItems, listItems);
+    
+	dialog->PrepareLC(R_LMREFAPP_EDIT_CATEGORIES_DIALOG);
+
+	// pre-mark currently selected categories 
+    CEikListBox* listBox = (CEikListBox*) dialog->Control(ESelectionListControl);
+    for (TInt i = 0; i < markedItems->Count(); i++)
+    {
+        listBox->View()->SelectItemL((*markedItems)[i]);
+    }
+
+    TInt res = dialog->RunLD();
+    if (res)
+        {
+        aLmCategoriesModel.SelectCategoriesL(*markedItems);
+        }
+        
+    CleanupStack::PopAndDestroy(2, markedItems);
+    return res;
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksCategoriesDialog::PostLayoutDynInitL()
+    {
+    CAknMarkableListDialog::PostLayoutDynInitL();
+    
+    // Save original title
+    CEikStatusPane* statusPane = iAvkonAppUi->StatusPane();
+    iTitlePane = (CAknTitlePane*) statusPane->ControlL(
+        TUid::Uid(EEikStatusPaneUidTitle));
+    iOriginalTitle = iTitlePane->Text()->AllocL();
+
+    // Update title
+    HBufC* title = iCoeEnv->AllocReadResourceAsDes16L(
+        R_LMREFAPP_EDIT_CAT_TITLE);
+    iTitlePane->SetText(title);
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+TKeyResponse CLandmarksCategoriesDialog::OfferKeyEventL(
+    const TKeyEvent& aKeyEvent, 
+    TEventCode aType)
+    {
+    if (aKeyEvent.iCode == EKeyDevice3)
+        {
+        // An item should be marked/unmarked.
+        CEikListBox* listBox = (CEikListBox*) Control(ESelectionListControl);
+        listBox->View()->ToggleItemL(listBox->View()->CurrentItemIndex());
+        listBox->DrawDeferred();
+        return EKeyWasConsumed;
+        }
+
+    return CAknMarkableListDialog::OfferKeyEventL(aKeyEvent, aType);
+    }
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationlandmarksrefappfors60/Src/LandmarksCategoriesEngine.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,384 @@
+/*
+* Copyright (c) 2004-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 CLandmarksCategoriesEngine
+*
+*/
+
+
+
+#include <EPos_CPosLandmarkDatabase.h>
+#include <EPos_CPosLmCatNameCriteria.h>
+#include <EPos_CPosLandmarkSearch.h>
+#include <EPos_CPosLmCategoryManager.h>
+
+#include "LandmarksCategoriesEngine.h"
+#include "LandmarksLmOpWrapper.h"
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+CLandmarksCategoriesEngine::CLandmarksCategoriesEngine(
+    CPosLandmarkDatabase& aDb)
+:   CLandmarksEngineBase(aDb)
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksCategoriesEngine::ConstructL()
+    {
+    CLandmarksEngineBase::ConstructL();
+    iCatManager = CPosLmCategoryManager::NewL(iDb);
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+CLandmarksCategoriesEngine* CLandmarksCategoriesEngine::NewL(
+    CPosLandmarkDatabase& aDb)
+    {
+    CLandmarksCategoriesEngine* self = 
+        new (ELeave) CLandmarksCategoriesEngine(aDb);
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    CleanupStack::Pop(self);
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+CLandmarksCategoriesEngine::~CLandmarksCategoriesEngine()
+    {
+    Cancel();
+    delete iCatManager;
+    iSubSetOfIds.Close();
+    iItemIds.Close();
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksCategoriesEngine::AddCategoryL(CPosLandmarkCategory& aCategory)
+    {
+    iCatManager->AddCategoryL(aCategory);
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksCategoriesEngine::UpdateCategoryL(const CPosLandmarkCategory& aCategory)
+    {
+    iCatManager->UpdateCategoryL(aCategory);
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksCategoriesEngine::DeleteCategoryL(TPosLmItemId aItemId)
+    {
+    ExecuteAndDeleteLD(iCatManager->RemoveCategoryL(aItemId));
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+CPosLandmarkCategory* CLandmarksCategoriesEngine::CategoryLC(TPosLmItemId aItemId)
+    {
+    return iCatManager->ReadCategoryLC(aItemId);
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksCategoriesEngine::StartSearchingCategoriesL(
+    MLandmarksOperationObserver* aObserver)
+    {
+    // We need to cancel if we are searching/reading categories.
+    Cancel();
+
+    iObserver = aObserver;
+    iSearchResultExists = EFalse;
+    iFilterSearch = EFalse;
+
+    // Complete ourselves and start search for all categories in db in RunL().
+    iStatus = KRequestPending;
+    SetPriorityAndSetActive();
+    iActiveOperation = ECategorySearch;
+    TRequestStatus* status = &iStatus;
+    User::RequestComplete(status, KErrNone);
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksCategoriesEngine::StartSearchingCategoriesL(
+    const TDesC& aSearchPattern, 
+    TBool aSearchOnlyInPreviousMatches,
+    MLandmarksOperationObserver* aObserver)
+    {
+    // We need to cancel if we are searching/reading categories.
+    Cancel();
+
+    if (!iSearchResultExists)
+        {
+        // There are no previous results or previous search did not complete.
+        // We cannot use the result from it.
+        aSearchOnlyInPreviousMatches = EFalse;
+        }
+    iSearchResultExists = EFalse;
+    iFilterSearch = ETrue;
+
+    // Set search criteria
+    CPosLmCatNameCriteria* criteria = CPosLmCatNameCriteria::NewLC();
+    criteria->SetSearchPatternL(aSearchPattern);
+
+    // Create search operation
+    CPosLmOperation* operation = iSearcher->StartCategorySearchL(
+        *criteria, 
+        CPosLmCategoryManager::ECategorySortOrderNameAscending, 
+        aSearchOnlyInPreviousMatches);
+    CleanupStack::PopAndDestroy(criteria);
+
+    // Start search operation
+    iObserver = aObserver;
+    iStatus = KRequestPending;
+    iLmOpWrapper->StartOperation(operation, iStatus);
+    SetPriorityAndSetActive();
+    iActiveOperation = ECategorySearch;
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+RArray<TPosLmItemId>* CLandmarksCategoriesEngine::FetchSearchResult()
+    {
+    return &iItemIds;
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksCategoriesEngine::StartReadingCategoriesL(
+    TInt aNrOfItemsToReadPerBundle,
+    MLandmarksOperationObserver* aObserver)
+    {
+    // We need to cancel if we are searching/reading landmarks.
+    Cancel();
+
+    iNrOfItemsToRead = aNrOfItemsToReadPerBundle;
+    iObserver = aObserver;
+    iCurrentItemId = 0;
+
+    // Start reading a bundle of categories
+    ReadSomeCategoriesL();
+    iActiveOperation = ECategoryRead;
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+CArrayPtr<CPosLandmarkCategory>* CLandmarksCategoriesEngine::FetchCategoriesLC()
+    {
+    TInt nrOfItems = iSubSetOfIds.Count();
+    CArrayPtr<CPosLandmarkCategory>* categories = 
+        new (ELeave) CArrayPtrFlat<CPosLandmarkCategory>(nrOfItems);
+    CleanupStack::PushL(categories);
+
+    // Start the actual read of landmarks. This is done synchronously since 
+    // there is no asynchronous read method as there is for landmarks:
+    // (Compare TakePreparedPartialLandmarksL()) 
+    for (TInt i = 0; i < nrOfItems; i++)
+        {
+        CPosLandmarkCategory* category = 
+            iCatManager->ReadCategoryLC(iSubSetOfIds[i]);
+        categories->AppendL(category);
+        CleanupStack::Pop(category);
+        }
+
+    return categories;
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+CArrayPtr<CPosLandmarkCategory>* CLandmarksCategoriesEngine::CategoriesL()
+    {
+    const TInt KGranularity = 8;
+    CArrayPtrFlat<CPosLandmarkCategory>* categories = 
+        new (ELeave) CArrayPtrFlat<CPosLandmarkCategory>(KGranularity);
+    CleanupStack::PushL(categories);
+    
+    // Get an iterator for all existing categories sorted ascending by name
+    CPosLmItemIterator* itemIterator = iCatManager->CategoryIteratorL(
+        CPosLmCategoryManager::ECategorySortOrderNameAscending);
+    CleanupStack::PushL(itemIterator);
+
+    // Read all categories and add them to an array
+    TPosLmItemId catId = itemIterator->NextL();
+    while (catId != KPosLmNullItemId)
+        {
+        CPosLandmarkCategory* category = iCatManager->ReadCategoryLC(catId);
+        categories->AppendL(category);
+        CleanupStack::Pop(category);
+
+        catId = itemIterator->NextL();
+        }
+    CleanupStack::PopAndDestroy(itemIterator);
+    CleanupStack::Pop(categories);
+
+    return categories;
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksCategoriesEngine::RunL()
+    {
+    if (iStatus == KErrNone)
+        {
+        if (iActiveOperation == ECategorySearch)
+            {
+            // Fetch search result
+            PopulateItemIdArrayL();
+            }
+        else if (iActiveOperation == ECategoryRead)
+            {
+            if (iCurrentItemId < iItemIds.Count())
+                {
+                // There are still found landmarks to read
+                iObserver->NotifyOperationProgressL(
+                    iActiveOperation, KOperationNotReady, KErrNone);
+                ReadSomeCategoriesL();
+                }
+            else
+                {
+                // No more matches to read
+                NotifyOperationReadyL(iActiveOperation, KErrNone);
+                }
+            }
+        }
+    else
+        {
+        // Operation failed. Forward error code
+        NotifyOperationReadyL(iActiveOperation, iStatus.Int());
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksCategoriesEngine::DoCancel()
+    {
+    iLmOpWrapper->Cancel();
+    if (iActiveOperation == ECategorySearch)
+        {
+        iSearchResultExists = EFalse;
+        }
+    iActiveOperation = ENoOperation;
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+TInt CLandmarksCategoriesEngine::RunError(TInt aError)
+    {
+    // Notify user and ignore error code
+    TInt err;
+    TRAP(err, NotifyOperationReadyL(iActiveOperation, aError));
+
+    return KErrNone;
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksCategoriesEngine::ReadSomeCategoriesL()
+    {
+    // Create a subset of the found matches to read
+    iSubSetOfIds.Reset();
+    TInt nrOfMatches = iItemIds.Count();
+    TInt i = 0;
+    while (i < iNrOfItemsToRead && iCurrentItemId < nrOfMatches)
+        {
+        User::LeaveIfError(
+            iSubSetOfIds.Append(iItemIds[iCurrentItemId]));
+        iCurrentItemId++;
+        i++;
+        }
+
+    // Simulate start reading found matches. There is no asynchronous search 
+    // functionality for categories as there is for landmarks, 
+    // (Compare PreparePartialLandmarksL())
+    iStatus = KRequestPending;
+    SetPriorityAndSetActive();
+    TRequestStatus* status = &iStatus;
+    User::RequestComplete(status, KErrNone);
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksCategoriesEngine::NotifyOperationReadyL(
+    TOperation aOperation, 
+    TInt aErrorCode)
+    {
+    iActiveOperation = ENoOperation;
+    iObserver->NotifyOperationProgressL(
+        aOperation, 
+        KOperationReady, 
+        aErrorCode);
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksCategoriesEngine::PopulateItemIdArrayL()
+    {
+    // Fetch itemIterator
+    CPosLmItemIterator* itemIterator = NULL;
+    if (iFilterSearch)
+        {
+        itemIterator = iSearcher->MatchIteratorL();
+        iSearchResultExists = ETrue;
+        }
+    else
+        {
+        itemIterator = iCatManager->CategoryIteratorL(
+            CPosLmCategoryManager::ECategorySortOrderNameAscending);
+        }
+    CleanupStack::PushL(itemIterator);
+    itemIterator->Reset();
+
+    // Fetch iItemIds
+    TUint nrOfItems = itemIterator->NumOfItemsL();
+    if (nrOfItems > 0)
+        {
+        TInt startIndex = 0;
+        iItemIds.Reset();
+        itemIterator->GetItemIdsL(iItemIds, startIndex, nrOfItems);
+        NotifyOperationReadyL(iActiveOperation, KErrNone);
+        }
+    else
+        {
+        // No matches found
+        NotifyOperationReadyL(iActiveOperation, KErrNotFound);
+        }
+    CleanupStack::PopAndDestroy(itemIterator);
+    }
+
+  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationlandmarksrefappfors60/Src/LandmarksCategoriesModel.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,282 @@
+/*
+* Copyright (c) 2004-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:  
+*       Implements the CLandmarksCategoriesModel class and some help functions
+*
+*/
+
+
+
+#include <eikenv.h>
+#include <gulicon.h>
+#include <AknsUtils.h>
+#include <AknsItemID.h>
+
+#include <EPos_CPosLandmarkCategory.h>
+
+#include <lmrefapp.mbg>
+#include "LandmarksCommonData.h"
+#include "LandmarksCategoriesModel.h"
+
+// ============================= LOCAL FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// DefaultIconIndex returns the icon index of the appropriate default icon.
+// User defined categories have different default icons than global ones.
+//
+// Returns: an icon index
+// Param:   aCategory the category to investigate
+// -----------------------------------------------------------------------------
+//
+TInt DefaultIconIndex(CPosLandmarkCategory& aCategory)
+    {
+    // Global categories have different default icon than user-defined.
+    TBool isGlobal = aCategory.GlobalCategory() != KPosLmNullGlobalCategory;
+
+    if (isGlobal)
+        {
+        return KDefaultGlobalIconIndex;
+        }
+    else
+        {
+        return KDefaultUserIconIndex;
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// ResetAndDestroyIcons
+// Resets and destroys an array of icons. This function is used as a 
+// TCleanupOperation.
+// Params: aAny: The icons array to reset ands destroy
+// -----------------------------------------------------------------------------
+//
+void ResetAndDestroyIcons(TAny* aAny)
+    {
+    CIconList* icons = reinterpret_cast <CIconList*> (aAny);
+    for (TInt i = 0; i < icons->Count(); i++)
+        {
+        delete &icons[i];
+        }
+    icons->Reset();
+    }
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+CLandmarksCategoriesModel::CLandmarksCategoriesModel()
+	{
+	}
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksCategoriesModel::ConstructL()
+	{
+	// The list box model uses MDesCArray interface class to take in text items.
+	iListItems = new(ELeave) CDesCArraySeg(KGranularity);
+	}
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+CLandmarksCategoriesModel* CLandmarksCategoriesModel::NewL()
+    {
+    CLandmarksCategoriesModel* self = 
+        new (ELeave) CLandmarksCategoriesModel();
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    CleanupStack::Pop(self);
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+CLandmarksCategoriesModel::~CLandmarksCategoriesModel()
+	{
+	delete iListItems;
+	}
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksCategoriesModel::SetItemIds(RArray<TPosLmItemId>* aItemIds)
+    {
+    iItemIds = aItemIds;
+
+    // Empty descriptor model
+    iListItems->Reset();
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+CDesCArraySeg* CLandmarksCategoriesModel::ItemList()
+    {
+    return iListItems;
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksCategoriesModel::SetCurrentItem(TInt aIndex) 
+    {
+    iCurrentItem = aIndex;
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+TPosLmItemId CLandmarksCategoriesModel::CurrentItemId()
+    {
+    if (iCurrentItem < 0 || iCurrentItem > iItemIds->Count() - 1)
+        {
+        return KPosLmNullItemId;
+        }
+
+    return (*iItemIds)[iCurrentItem];
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+CIconList* CLandmarksCategoriesModel::CreateIconListL()
+    {
+    CIconList* iconList = new (ELeave) CArrayPtrFlat<CGulIcon>(KGranularity);
+    CleanupStack::PushL(TCleanupItem(ResetAndDestroyIcons, iconList));
+    
+    // Create the global category icon consisting of its image and mask.
+    TAknsItemID aknsItemId ={0,0};
+    CGulIcon* icon = AknsUtils::CreateGulIconL(NULL, aknsItemId,
+        KLandmarksMbmFileName, 
+        EMbmLmrefappCategory_global, 
+        EMbmLmrefappCategory_global_mask);
+    CleanupStack::PushL(icon);
+    icon->SetBitmapsOwnedExternally(EFalse); 
+    iconList->AppendL(icon);
+    CleanupStack::Pop(icon);
+
+    // Create the user defined category icon consisting of its image and mask.
+    icon = AknsUtils::CreateGulIconL(NULL, aknsItemId,
+        KLandmarksMbmFileName, 
+        EMbmLmrefappCategory_user, 
+        EMbmLmrefappCategory_user_mask);
+    CleanupStack::PushL(icon);
+    icon->SetBitmapsOwnedExternally(EFalse); 
+    iconList->AppendL(icon);
+    CleanupStack::Pop(icon);
+    
+    CleanupStack::Pop(); // iconList
+
+    // initialze iIconList. We don't need to delete any possible previous 
+    // iIconList since ownership is transferred to calling object.
+    iIconList = iconList;
+
+    return iconList;
+    }
+
+// -----------------------------------------------------------------------------
+// Refreshes a part of the model. Those categories that have been read from the 
+// database overwrites old categories. The model is refreshed incrementally 
+// from top to bottom.
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+void CLandmarksCategoriesModel::RepopulateModelL(
+    CArrayPtr<CPosLandmarkCategory>* aCategories)
+    {
+    TInt nrOfReadItems = aCategories->Count();
+
+    // Format and insert the read categories
+    for (TInt i = 0; i < nrOfReadItems; i++)
+        {
+        // Format name and icon
+        CPosLandmarkCategory* category = (*aCategories)[i];
+        HBufC* formattedName = FormatListItemLC(*category);
+
+        // Insert formatted descriptor into model
+        iListItems->AppendL(*formattedName);
+
+        CleanupStack::PopAndDestroy(formattedName);
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// Formats a list item to the following format "X\tcategoryName"
+// where X = icon index
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+HBufC* CLandmarksCategoriesModel::FormatListItemLC(CPosLandmarkCategory& aCategory)
+    {
+    // Extract name
+    TPtrC name;
+    aCategory.GetCategoryName(name);
+    // 10 extra chars for icon index and column separator
+    const TInt KExtraChars = 10;
+    HBufC* formattedNameBuf = HBufC::NewLC(name.Length() + KExtraChars);
+    TPtr formattedNamePtr = formattedNameBuf->Des();
+
+    // Extract icon info
+    TPtrC mbmIconFile;
+    TInt iconIndex, maskIndex;
+    TInt res = aCategory.GetIcon(mbmIconFile, iconIndex, maskIndex);
+
+    // Format list item
+    if (res == KErrNone)
+        {
+        // Create icon and append it to icon array. 
+        TRAPD(err, AppendIconL(mbmIconFile, iconIndex, maskIndex));
+        if (err == KErrNone)
+            {
+            // Append the array index where the icon is appended
+            formattedNamePtr.AppendNum(iIconList->Count() - 1);
+            }
+        else // Unable to create icon, use appropriate default icon.
+            {
+            formattedNamePtr.AppendNum(DefaultIconIndex(aCategory));
+            }
+        }
+    else // res == KErrNotFound
+        {
+        formattedNamePtr.AppendNum(DefaultIconIndex(aCategory));
+        }
+    formattedNamePtr.Append(KTab);
+    formattedNamePtr.Append(name);
+
+    return formattedNameBuf;
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksCategoriesModel::AppendIconL(
+    const TDesC& aMbmFile, 
+    TInt aIconOffset, 
+    TInt aMaskOffset)
+    {
+    TAknsItemID aknsItemId = {0,0};
+    CGulIcon* icon = AknsUtils::CreateGulIconL(NULL, aknsItemId,
+        aMbmFile, 
+        aIconOffset, 
+        aMaskOffset);
+    CleanupStack::PushL(icon);
+    icon->SetBitmapsOwnedExternally(EFalse);
+    iIconList->AppendL(icon);
+    CleanupStack::Pop(icon);
+    }
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationlandmarksrefappfors60/Src/LandmarksCategoriesView.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,250 @@
+/*
+* Copyright (c) 2004-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:  
+*       Implements the CLandmarksCategoriesView class
+*
+*/
+
+
+
+#include <aknViewAppUi.h>
+#include <eikmenup.h>
+#include <AknQueryDialog.h>
+
+#include <EPos_CPosLandmarkCategory.h>
+
+#include "LmRefApp.hrh"
+#include <lmrefapp.rsg>
+#include "LandmarksCategoriesView.h"
+#include "LandmarksCategoriesContainer.h"
+#include "LandmarksApplicationEngine.h"
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+CLandmarksCategoriesView::CLandmarksCategoriesView(
+    CLandmarksApplicationEngine* aEngine)
+:   iEngine(aEngine)
+    {
+    // No implementation required
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksCategoriesView::ConstructL()
+    {
+    BaseConstructL(R_LMREFAPP_CATEGORIES_VIEW);
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+CLandmarksCategoriesView* CLandmarksCategoriesView::NewLC(
+    CLandmarksApplicationEngine* aEngine)
+    {
+    CLandmarksCategoriesView* self = 
+        new (ELeave) CLandmarksCategoriesView(aEngine);
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+CLandmarksCategoriesView::~CLandmarksCategoriesView()
+    {
+    delete iContainer;
+
+    // This object is responsible for deleting the application engine instance.
+    delete iEngine;
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+TUid CLandmarksCategoriesView::Id() const
+    {
+    return TUid::Uid(ELandmarksCategoriesViewId);
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksCategoriesView::HandleCommandL(TInt aCommand)
+    {
+    switch (aCommand)
+        {
+        case ELandmarksDelete:
+            iContainer->DeleteCategoryL();
+            break;
+
+        case ELandmarksRename:
+            RenameCategoryL();
+            break;
+
+        case ELandmarksAddCategory:
+            AddCategoryL();
+            break;
+
+        default:
+            AppUi()->HandleCommandL(aCommand);
+            break;
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksCategoriesView::DoActivateL(
+    const TVwsViewId& /*aPrevViewId*/,
+    TUid /*aCustomMessageId*/,
+    const TDesC8& /*aCustomMessage*/)
+    {
+    if (!iContainer)
+        {
+        iContainer = new (ELeave) CLandmarksCategoriesContainer(
+            *this, *iEngine, *(MenuBar()));
+        iContainer->SetMopParent(this);
+	    iContainer->ConstructL(ClientRect());
+        }
+
+    // Enable receiving of keyboard events.
+    AppUi()->AddToStackL(*this, iContainer);
+
+    // Make view visible.
+    iContainer->MakeVisible(ETrue);
+
+    // Notify that this view is active.
+    TBool isActive = ETrue;
+    iEngine->NotifyViewActivated(Id(), isActive);
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksCategoriesView::DoDeactivate()
+    {
+    // Hide view.
+    iContainer->MakeVisible(EFalse);
+
+    // Notify that this view is inactive.
+    TBool isActive = EFalse;
+    iEngine->NotifyViewActivated(Id(), isActive);
+
+    // Disable receiving keyboard events.
+    AppUi()->RemoveFromStack(iContainer);
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksCategoriesView::HandleResourceChange( TInt aType )
+    {
+    if ( iContainer )
+        {
+        iContainer->HandleResourceChange( aType );
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksCategoriesView::DynInitMenuPaneL(
+    TInt aResourceId,
+    CEikMenuPane* aMenuPane)
+    {
+    CAknView::DynInitMenuPaneL(aResourceId, aMenuPane);
+    if (aResourceId == R_LMREFAPP_CATEGORIES_MENU)
+        {
+        // If none or a global cat. is selected we need to hide some commands.
+        TBool dimmed = 
+            !iContainer->IsItemSelected() || iContainer->IsGlobalL();
+        aMenuPane->SetItemDimmed(ELandmarksDelete, dimmed);
+        aMenuPane->SetItemDimmed(ELandmarksRename, dimmed);
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksCategoriesView::AddCategoryL()
+    {
+    // Create and initialize dialog
+    TBuf<KPosLmMaxCategoryNameLength> categoryName;
+    CAknTextQueryDialog* queryDialog = CAknTextQueryDialog::NewL(categoryName);
+    queryDialog->SetMaxLength(KPosLmMaxCategoryNameLength);
+    CleanupStack::PushL(queryDialog);
+
+    // Create and set title
+    HBufC* title = 
+        iCoeEnv->AllocReadResourceAsDes16LC(R_LMREFAPP_NEW_CATEGORY);
+    queryDialog->SetPromptL(*title);
+    CleanupStack::PopAndDestroy(title);
+
+    // Launch dialog
+    TBool dialogDismissed = queryDialog->ExecuteLD(R_LMREFAPP_RENAME_QUERY);
+    CleanupStack::Pop(queryDialog);
+    if (dialogDismissed)
+        {
+        // Create and add a new category with user defined name.
+        CPosLandmarkCategory* newCategory = CPosLandmarkCategory::NewLC();
+        newCategory->SetCategoryNameL(categoryName);
+        iEngine->AddCategoryL(*newCategory);
+        CleanupStack::PopAndDestroy(newCategory);
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksCategoriesView::RenameCategoryL()
+    {
+    // Fetch existing category name
+    CPosLandmarkCategory* category = 
+        iEngine->CategoryLC(iContainer->CurrentCategoryId());
+    TPtrC categoryName;
+    category->GetCategoryName(categoryName);
+    TBuf<KPosLmMaxCategoryNameLength> newCategoryName;
+    newCategoryName.Insert(0, categoryName);
+
+    // Create and initialize dialog
+    CAknTextQueryDialog* queryDialog = 
+        CAknTextQueryDialog::NewL(newCategoryName);
+    queryDialog->SetMaxLength(KPosLmMaxCategoryNameLength);
+    CleanupStack::PushL(queryDialog);
+
+    // Create and set title
+    HBufC* title = 
+        iCoeEnv->AllocReadResourceAsDes16LC(R_LMREFAPP_CATEGORY_NAME);
+    queryDialog->SetPromptL(*title);
+    CleanupStack::PopAndDestroy(title);
+
+    // Launch dialog
+    TBool dialogAccepted = queryDialog->ExecuteLD(R_LMREFAPP_RENAME_QUERY);
+    CleanupStack::Pop(queryDialog);
+    if (dialogAccepted)
+        {
+        // Update category name
+        category->SetCategoryNameL(newCategoryName);
+        iEngine->UpdateCategoryL(*category);
+        }
+
+    CleanupStack::PopAndDestroy(category);
+    }
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationlandmarksrefappfors60/Src/LandmarksContainer.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,482 @@
+/*
+* Copyright (c) 2004-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:  Implements the CLandmarksContainer class
+*
+*/
+
+
+
+#include <aknsfld.h>
+#include <aknnavi.h>
+#include <eikclbd.h>
+#include <aknview.h>
+#include <AknQueryDialog.h>
+
+#include "LmRefApp.hrh"
+#include <lmrefapp.rsg>
+#include "LandmarksContainer.h"
+#include "LandmarksCommonData.h"
+#include "LandmarksListBoxModel.h"
+#include "LandmarksModel.h"
+#include "LandmarksApplicationEngine.h"
+#include "LandmarksListbox.h"
+
+// ============================= LOCAL FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// ResetAndDestroyLandmarks resets and destroys all landmarks owned by the 
+// supplied landmark array.
+// Param: aAny: an instance of CArrayPtr<CPosLandmark>* to reset and destroy
+// -----------------------------------------------------------------------------
+//
+void ResetAndDestroyLandmarks(TAny* aAny)
+    {
+    CArrayPtr<CPosLandmark>* landmarks = 
+        reinterpret_cast <CArrayPtr<CPosLandmark>*> (aAny);
+    landmarks->ResetAndDestroy();
+    }
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+CLandmarksContainer::CLandmarksContainer(
+    CAknView& aView,
+    CLandmarksApplicationEngine& aEngine,
+    CAknNavigationDecorator* aNaviDecorator)
+:   CLandmarksContainerBase(aView, aEngine), 
+    iNaviDecorator(aNaviDecorator)
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksContainer::ConstructL(
+    const TRect& aRect)
+    {
+    // Create listbox and findbox.
+    CLandmarksContainerBase::ConstructL(aRect);
+
+    // Start observer db events.
+    iEngine.AddDbObserverL(this);
+
+    // Create data model.
+    iModel = CLandmarksModel::NewL();
+
+    // Create a descriptor array that will contain the landmark names and 
+    // icon indeces.
+    CLandmarksListBoxModel* model = iListBox->Model();
+    model->SetItemTextArray(iModel->ItemList());
+    model->SetOwnershipType(ELbmDoesNotOwnItemArray);
+
+    // Create an icon array that will be displayed in the listbox.
+
+    CIconList* icons = iModel->CreateIconListL();
+    iListBox->ItemDrawer()->ColumnData()->SetIconArray(icons);
+
+    // Observe listbox for state changes.
+    iListBox->SetObserver(this);
+
+    // Observe findbox for state changes.
+    iFindBox->SetObserver(this);
+
+    // Populate listbox with landmarks and icons.
+    StartUpdateListBoxL();
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+CLandmarksContainer::~CLandmarksContainer()
+    {
+    delete iModel;
+    delete iCurrentName;
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+TPosLmItemId CLandmarksContainer::CurrentLandmark()
+    {
+    return iModel->CurrentItemId();
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksContainer::DeleteLandmarkL()
+    {
+    // Extract landmark name
+    TPtrC name;
+    CPosLandmark* currentLandmark = 
+        iEngine.LandmarkLC(iModel->CurrentItemId());
+    currentLandmark->GetLandmarkName(name);
+
+    // Format query
+    HBufC* queryFormat = 
+        iCoeEnv->AllocReadResourceAsDes16LC(R_LMREFAPP_DELETE_LANDMARK);
+    HBufC* queryBuf = HBufC::NewLC(name.Length() + queryFormat->Length());
+    TPtr query = queryBuf->Des();
+    query.Format(*queryFormat, &name);
+
+    // Launch dialog
+    CAknQueryDialog* queryDialog = CAknQueryDialog::NewL();
+    if (queryDialog->ExecuteLD(R_LMREFAPP_GENERAL_QUERY, query))
+        {
+        iEngine.DeleteLandmarkL(currentLandmark->LandmarkId());
+        }
+
+    CleanupStack::PopAndDestroy(3, currentLandmark);
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksContainer::GetSelectedLandmarksL( RArray<TPosLmItemId>& aItemIds )
+    {
+    iModel->GetItemIdsL( *(iListBox->SelectionIndexes()), aItemIds );
+    }
+    
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+TKeyResponse CLandmarksContainer::OfferKeyEventL(
+    const TKeyEvent& aKeyEvent, TEventCode aType)
+    {
+	TKeyResponse response = EKeyWasNotConsumed;
+
+    switch (aKeyEvent.iCode)
+        {
+        case EKeyUpArrow:
+        case EKeyDownArrow:
+            // Scrolling the list box. Forward to iListBox.
+            response = iListBox->OfferKeyEventL(aKeyEvent, aType);
+            break;
+
+        case EKeyDevice3:
+            if ( aKeyEvent.iModifiers & EModifierShift )
+                {
+                iListBox->View()->ToggleItemL( iListBox->CurrentItemIndex() );
+                }
+            else
+                {
+                // Select key pressed. Edit landmark.
+                iView.ProcessCommandL(ELandmarksOpen);
+                response = EKeyWasConsumed;
+                }
+            break;
+
+        case EKeyBackspace:
+            if ((iFindBox->TextLength() == 0) && IsItemSelected())
+                {
+                // If search field is empty backspace deletes a landmark.
+                DeleteLandmarkL();
+                response = EKeyWasConsumed;
+                break;
+                }
+            // remove letter in find box
+        default:
+            // Forward key events to find box.
+            response = iFindBox->OfferKeyEventL(aKeyEvent, aType);
+            break;
+        }
+
+    return response;
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksContainer::NotifyOperationProgressL(
+    TOperation aOperation,
+    TInt aProgress,
+    TInt aErrorCode)
+    {
+    switch (aOperation)
+        {
+        case ELandmarkSearch:
+            HandleSearchReadyL(aErrorCode);
+            break;
+
+        case ELandmarkRead:
+            HandleReadReadyL(aErrorCode, aProgress == KOperationReady);
+            break;
+
+        default:
+            break;
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksContainer::NotifyDbEventL(
+    TPosLmEvent& aEvent, 
+    TInt aErrorCode)
+    {
+    if (aErrorCode == KErrNone)
+        {
+        switch (aEvent.iEventType)
+            {
+            case EPosLmEventUnknownChanges:
+            case EPosLmEventLandmarkUnknownChanges:
+            case EPosLmEventCategoryUnknownChanges:
+            case EPosLmEventLandmarkCreated:
+            case EPosLmEventLandmarkDeleted:
+                StartUpdateListBoxL();
+                break;
+            // Any of the 3 events below might have cancelled an ongoing 
+            // landmark search/read operation => must restart refreshing list
+            case EPosLmEventCategoryCreated:
+            case EPosLmEventCategoryDeleted:
+            case EPosLmEventCategoryUpdated:
+                if (iIsActive)
+                    {
+                    StartUpdateListBoxL();
+                    }
+                break;
+            case EPosLmEventLandmarkUpdated:
+                if (IsRefreshNeededL(aEvent.iLandmarkItemId))
+                    {
+                    StartUpdateListBoxL();
+                    }
+                break;
+            case EPosLmEventNewDefaultDatabaseLocation:
+                // Not supported by this application
+                break;
+            case EPosLmEventMediaRemoved:
+                // Not supported by this application
+                break;
+            default:
+                // Ignore other category events
+                break;
+            }
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksContainer::HandleControlEventL(
+    CCoeControl* aControl, 
+    TCoeEvent aEventType)
+    {
+	if (aEventType == EEventStateChanged && aControl == iListBox)
+		{
+		// Take the index of the current item in the list
+		TInt itemIndex = iListBox->CurrentItemIndex();
+
+		// Set the current item in the model object regarding to the list box.
+		iModel->SetCurrentItem(itemIndex);
+
+        // Store the name of the current landmark
+        StoreCurrentLandmarkNameL();
+        }
+
+	if (aEventType == EEventStateChanged && aControl == iFindBox)
+		{
+        // Fetch filter from search field
+        TInt searchTextLength = iFindBox->TextLength();
+        HBufC* filterBuf = HBufC::NewLC(searchTextLength);
+        TPtr filter = filterBuf->Des();
+        iFindBox->GetSearchText(filter);
+
+        // If filter has changed repopulate list box. (It is necessary to check
+        // if filter has changed since each filter change generates several 
+        // EEventStateChanged events for find box)
+        if (filter != *iOldFilter)
+            {
+            // Filter has changed. Start filtering.
+            StartUpdateListBoxL();
+            }
+
+        CleanupStack::PopAndDestroy(filterBuf);
+		}
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksContainer::StartUpdateListBoxL()
+    {
+    // Fetch filter from find box
+    TInt searchTextLength = iFindBox->TextLength();
+    const TInt KExtraChars = 2; // 2 chars wildcards
+    HBufC* filterBuf = HBufC::NewLC(searchTextLength + KExtraChars);
+    TPtr filter = filterBuf->Des();
+    iFindBox->GetSearchText(filter);
+
+    // Find out if there is any prevoius result to limit the search to
+    TInt oldFilterLength = iOldFilter->Length();
+    TBool searchOnlyInPreviousMatches = 
+        // If previous filter is empty there is no search results
+        oldFilterLength > 0 && 
+
+        // If chars have been removed from filter we abandon previous results
+        filter.Length() > oldFilterLength && 
+
+        // There must exist at least one previous match
+        IsItemSelected();
+
+    // old filter used - now we can update it
+    delete iOldFilter;
+    iOldFilter = NULL;
+    iOldFilter = filter.AllocL();
+
+	// Start to asynchronously populate the listbox model according to filter
+    if (searchTextLength == 0)
+        {
+        iEngine.StartSearchingLandmarksL(this);
+        }
+    else
+        {
+        filter.Insert(0, KWildCard);
+        filter.Append(KWildCard);
+        iEngine.StartSearchingLandmarksL(
+            filter, searchOnlyInPreviousMatches, this);
+        }
+
+    // Indicate we are active
+    iIsActive = ETrue;
+
+    CleanupStack::PopAndDestroy(filterBuf);
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksContainer::HandleSearchReadyL(TInt aErrorCode)
+    {
+
+    // Delete old icon array and add new
+	CColumnListBoxData* columnData = iListBox->ItemDrawer()->ColumnData();
+    CArrayPtr<CGulIcon>* iconList = columnData->IconArray();
+    iconList->ResetAndDestroy();
+    delete iconList;
+    columnData->SetIconArray(iModel->CreateIconListL());
+
+    if (aErrorCode == KErrNone)
+        {
+        // Update model
+        iModel->SetItemIds(iEngine.FetchLandmarkSearchResult());
+        iListBox->HandleItemRemovalL();
+
+        iEngine.StartReadingLandmarksL(KNrOfItemsDisplayed, this);
+        iReadingFirstPage = ETrue;
+        }
+    else if (aErrorCode == KErrNotFound)
+        {
+        // Updating list ready
+        iIsActive = EFalse;
+
+        // Update model (indicate no item is selected)
+        iModel->SetItemIds(NULL);
+        iModel->SetCurrentItem(iListBox->CurrentItemIndex());
+
+		// Update the view
+        iListBox->HandleItemRemovalL();
+        iListBox->DrawDeferred();
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksContainer::HandleReadReadyL(TInt aErrorCode, TBool aFinished)
+    {
+    // Update model with new landmarks
+    CArrayPtr<CPosLandmark>* landmarks = iEngine.FetchLandmarksLC();
+    CleanupStack::PushL(TCleanupItem(ResetAndDestroyLandmarks, landmarks));
+    iModel->RepopulateModelL(landmarks);
+    CleanupStack::PopAndDestroy(2, landmarks);
+
+    if (aErrorCode == KErrNone)
+        {
+        if (aFinished)
+            {
+            // Updating list ready
+            iIsActive = EFalse;
+            }
+        if (iReadingFirstPage)
+            {
+            // First page ready
+            iReadingFirstPage = EFalse;
+
+            // Add the first page
+            iListBox->HandleItemAdditionL();
+
+            // Set the first item selected by default. We must do this since 
+            // HandleItemRemovalL in HandleSearchReadyL resets the listbox.
+            iModel->SetCurrentItem(0);
+            iListBox->SetCurrentItemIndex(0);
+            StoreCurrentLandmarkNameL();
+            }
+        else
+            {
+            iListBox->HandleItemAdditionL();
+            }
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+TBool CLandmarksContainer::IsRefreshNeededL(TPosLmItemId& aModifiedLandmark)
+    {
+    if (iIsActive)
+        {
+        return ETrue;
+        }
+    else
+        {
+        if (aModifiedLandmark == iModel->CurrentItemId())
+            {
+            // Investigate if we need to refresh. Compare name.
+            CPosLandmark* landmark = iEngine.LandmarkLC(aModifiedLandmark);
+            TPtrC name;
+            landmark->GetLandmarkName(name);
+            TBool isNameDifferent = 
+                iCurrentName && *iCurrentName != name ||
+                !iCurrentName && name != KNullDesC;
+            CleanupStack::PopAndDestroy(landmark);
+
+            // If name is different the list needs to be re-sorted. Otherwise 
+            // some other field has been modified and the list is not affected.
+            return isNameDifferent;
+            }
+        else 
+            {
+            // Some other process than this has modified a landmark
+            return ETrue;
+            }
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksContainer::StoreCurrentLandmarkNameL()
+    {
+    CPosLandmark* landmark = iEngine.LandmarkLC(iModel->CurrentItemId());
+    TPtrC name;
+    landmark->GetLandmarkName(name);
+    delete iCurrentName;
+    iCurrentName = NULL;
+    iCurrentName = name.AllocL();
+    CleanupStack::PopAndDestroy(landmark);
+    }
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationlandmarksrefappfors60/Src/LandmarksContainerBase.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,171 @@
+/*
+* Copyright (c) 2004-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:  
+*       Implements the CLandmarksContainerBase class
+*
+*/
+
+
+
+#include <aknsfld.h>
+#include <aknview.h>
+#include <eiklbx.h>
+
+#include <EPos_Landmarks.h>
+
+#include "LandmarksContainerBase.h"
+#include "LandmarksListbox.h"
+#include "LandmarksListBoxModel.h"
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+CLandmarksContainerBase::CLandmarksContainerBase(
+    CAknView& aView,
+    CLandmarksApplicationEngine& aEngine)
+:   iView(aView), iEngine(aEngine)
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksContainerBase::ConstructL(const TRect& aRect)
+    {
+    CreateWindowL();
+
+    CreateListBoxL();
+    CreateFindBoxL();
+
+    SetRect(aRect);
+    ActivateL();
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+CLandmarksContainerBase::~CLandmarksContainerBase()
+    {
+    delete iListBox;
+    delete iFindBox;
+    delete iOldFilter;
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+TBool CLandmarksContainerBase::IsItemSelected()
+    {
+    return (iListBox->CurrentItemIndex() >= 0);
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+TInt CLandmarksContainerBase::CountComponentControls() const
+    {
+    TInt count = 0;
+    if (iListBox)
+        {
+        count++;
+        }
+    if (iFindBox)
+        {
+        count++;
+        }
+
+    return count; // Return the number of controls inside this container.
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+CCoeControl* CLandmarksContainerBase::ComponentControl(TInt aIndex) const
+    {
+    switch (aIndex)
+        {
+        case 0:
+            return iListBox; // Returns the pointer to listbox object.
+        case 1:
+            return iFindBox; // Returns the pointer to findbox object.
+        default:
+            return NULL; // Exception : Returns NULL.
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksContainerBase::CreateFindBoxL()
+    {
+    // Sets style of findbox.
+    CAknSearchField::TSearchFieldStyle style(CAknSearchField::ESearch);
+
+    // Creates FindBox.
+    CGulIcon* defaultIcon = NULL;
+    iFindBox = CAknSearchField::NewL(
+        *this, style, defaultIcon, KPosLmMaxTextFieldLength);
+
+    // Creates a filter (CAknListBoxFilterItems instance). This filter is not 
+    // used in this app but the CAknSearchField class MUST have a filter 
+    // anyway. The filter is bypassed by the CLandmarksListBoxModel class.
+    iListBox->Model()->CreateFilterL(iListBox, iFindBox);
+
+    // Initialize filter buffer
+    iOldFilter = HBufC::NewL(0);
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksContainerBase::CreateListBoxL()
+    {
+    // Create a control to display a list of descriptors
+    iListBox = new (ELeave) CLandmarksListBox();
+    iListBox->SetContainerWindowL(*this);
+    iListBox->ConstructL(this, CEikListBox::ELoopScrolling | EAknListBoxMarkableList );
+
+    // Create scrollbars
+    CEikScrollBarFrame* scrollBar = iListBox->CreateScrollBarFrameL(ETrue);
+    scrollBar->SetScrollBarVisibilityL(
+		CEikScrollBarFrame::EOff, CEikScrollBarFrame::EAuto);
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksContainerBase::SizeChanged()
+    {
+	// Set list box size.
+	iListBox->SetRect( Rect() );
+
+    // Set find box size.
+    AknFind::HandleFixedFindSizeChanged( this, iListBox, iFindBox );
+    }
+    
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksContainerBase::HandleResourceChange(TInt aType)
+    {
+    CCoeControl::HandleResourceChange( aType );
+    if ( aType == KEikDynamicLayoutVariantSwitch )
+        {
+        SetRect( iView.ClientRect() );
+        }
+    }
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationlandmarksrefappfors60/Src/LandmarksDbEventHandler.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,96 @@
+/*
+* Copyright (c) 2004-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:  Implements the class CLandmarksDbEventHandler
+*
+*/
+
+
+
+#include <EPos_CPosLandmarkDatabase.h>
+
+#include "LandmarksDbEventHandler.h"
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+CLandmarksDbEventHandler::CLandmarksDbEventHandler(
+    CPosLandmarkDatabase& aDb)
+: CActive(CActive::EPriorityStandard), iDb(aDb)
+    {
+    CActiveScheduler::Add(this);
+    ObserveEvents();
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+CLandmarksDbEventHandler::~CLandmarksDbEventHandler()
+    {
+    Cancel();
+    iDbObservers.Close();
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksDbEventHandler::AddObserverL(
+    MLandmarksDbObserver* aObserver)
+    {
+    User::LeaveIfError(iDbObservers.Append(aObserver));
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksDbEventHandler::RunL()
+    {
+    for (TInt i = 0; i < iDbObservers.Count(); i++)
+        {
+        // All observers must be notified. We cannot allow the observers to 
+        // leave.
+        TInt err;
+        TRAP(err, iDbObservers[i]->NotifyDbEventL(iEvent, iStatus.Int()));
+        }
+    ObserveEvents();
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksDbEventHandler::DoCancel()
+    {
+    iDb.CancelNotifyDatabaseEvent();
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+TInt CLandmarksDbEventHandler::RunError(TInt /*aError*/)
+    {
+    return KErrNone;
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksDbEventHandler::ObserveEvents()
+    {
+    iStatus = KRequestPending;
+    iDb.NotifyDatabaseEvent(iEvent, iStatus);
+    SetActive();
+    }
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationlandmarksrefappfors60/Src/LandmarksDocument.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,72 @@
+/*
+* Copyright (c) 2004-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 CLandmarksDocument
+*
+*/
+
+
+
+#include "LandmarksAppUi.h"
+#include "LandmarksDocument.h"
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+CLandmarksDocument::CLandmarksDocument(CEikApplication& aApp) : CAknDocument(aApp) 
+    {
+    // No implementation required
+    }   
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksDocument::ConstructL()
+    {
+    // No implementation required
+    }    
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+CLandmarksDocument* CLandmarksDocument::NewL(CEikApplication& aApp)
+    {
+    CLandmarksDocument* self = new (ELeave) CLandmarksDocument(aApp);
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    CleanupStack::Pop(self);
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+CLandmarksDocument::~CLandmarksDocument()
+    {
+    // No implementation required
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+CEikAppUi* CLandmarksDocument::CreateAppUiL()
+    {
+    // Create the application user interface, and return a pointer to it,
+    // the framework takes ownership of this object
+    CEikAppUi* appUi = new (ELeave) CLandmarksAppUi;
+    return appUi;
+    }
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationlandmarksrefappfors60/Src/LandmarksEditDialog.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,1081 @@
+/*
+* 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:  Implements the CLandmarksEditDialog class
+*
+*/
+
+
+#include <eikmenub.h>
+#include <akntitle.h>
+#include <aknnotewrappers.h>
+#include <aknappui.h>
+#include <e32math.h>
+#include <eikcapc.h>
+#include <aknselectionlist.h>
+#include <aknlocationed.h>
+#include <AknWaitDialog.h> 
+#include <avkon.rsg>
+
+#include <lbsposition.h>
+#include <lbspositioninfo.h>
+
+#include <EPos_CPosLandmark.h>
+#include <EPos_CPosLandmarkCategory.h>
+
+#include "LmRefApp.hrh"
+#include <lmrefapp.rsg>
+
+#include "LandmarksUtils.h"
+#include "LandmarksCommonData.h"
+#include "LandmarksEditDialog.h"
+#include "LandmarksCategoriesDialog.h"
+#include "LandmarksPositionRequest.h"
+#include "LandmarksApplicationEngine.h"
+#include "LandmarksAppUi.h"
+#include "LandmarksLmCategoriesModel.h"
+
+// ============================ LOCAL FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+//  Gets value from EDWIN and puts to cleanup stack
+//  @param aEdwin must be EDWIN control
+// -----------------------------------------------------------------------------
+//
+HBufC* FetchTextLC( CCoeControl* aEdwin )
+    {
+    CEikEdwin* editor = static_cast <CEikEdwin*> ( aEdwin );
+    HBufC* text = editor->GetTextInHBufL();
+    if ( text )
+        {
+        CleanupStack::PushL( text );
+        }
+    else
+        {
+        // create empty text
+        text = HBufC::NewLC( 0 );
+        }
+    return text;
+    }
+
+// -----------------------------------------------------------------------------
+//  Retrieves a long float from am EDWIN editor.
+//  @param aDouble double float that is retrieved from editor.
+//  @param aEdwin must be EDWIN control
+//  @return ETrue if successful, EFalse otherwise
+// -----------------------------------------------------------------------------
+//
+TBool FetchDoubleL( TReal& aDouble, CCoeControl* aEdwin )
+    {
+    TBool success = EFalse;
+    TLocale locale;
+
+    HBufC* text = FetchTextLC( aEdwin );
+
+    if ( text->Length() )
+        {
+        // Try to extract value
+        TLex fieldLex( *text );
+        success = ( KErrNone == fieldLex.Val( aDouble, locale.DecimalSeparator() ) );
+        }
+    else
+        {
+        // User has indicated that he/she wants this value to be undefined.
+        TRealX nan;
+        nan.SetNaN();
+        aDouble = nan;
+        success = ETrue;
+        }
+
+    CleanupStack::PopAndDestroy( text );
+    return success;
+    }
+
+// -----------------------------------------------------------------------------
+//  Retrieves a float from am EDWIN editor.
+//  @param aFloat float that is retrieved from editor.
+//  @param aEdwin must be EDWIN control
+//  @return ETrue if successful, EFalse otherwise
+// -----------------------------------------------------------------------------
+//
+TBool FetchFloatL( TReal32& aFloat, CCoeControl* aEdwin )
+    {
+    TBool success = EFalse;
+    TLocale locale;
+
+    HBufC* text = FetchTextLC( aEdwin );
+
+    if ( text->Length() )
+        {
+        // Try to extract value
+        TLex fieldLex( *text );
+        success = ( KErrNone == fieldLex.Val( aFloat, locale.DecimalSeparator() ) );
+        }
+    else
+        {
+        // User has indicated that he/she wants this value to be undefined.
+        TRealX nan;
+        nan.SetNaN();
+        aFloat = nan;
+        success = ETrue;
+        }
+
+    CleanupStack::PopAndDestroy( text );
+    return success;
+    }
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+CLandmarksEditDialog::CLandmarksEditDialog(
+    CPosLandmark& aLandmark,
+    TBool aUseCurrentLocation,
+    TBool& aEdited,
+    CLandmarksApplicationEngine& aEngine,
+    TInt aInitialFocusFieldId )
+:   iOriginalLandmark( aLandmark ),
+    iUseCurrentLocation( aUseCurrentLocation ),
+    iEdited( aEdited ),
+    iEngine( aEngine ),
+    iInitialFocusFieldId( aInitialFocusFieldId )
+    {
+    iEdited = EFalse;
+
+    // Configure real format
+    const TChar KDecimalChar = '.';
+    iRealFormat.iPlaces = KNrOfDecimals;
+    iRealFormat.iPoint = KDecimalChar;
+    iRealFormat.iTriLen = 0;
+    iRealFormat.iWidth = KPosLmMaxTextFieldLength;
+    iRealFormat.iType = KRealFormatFixed;
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksEditDialog::ConstructL()
+    {
+    CAknForm::ConstructL( R_LMREFAPP_EDIT_MENU_BAR );
+
+    // Save original title
+    CEikStatusPane* statusPane = iAvkonAppUi->StatusPane();
+    iTitlePane = ( CAknTitlePane* ) statusPane->ControlL(
+        TUid::Uid( EEikStatusPaneUidTitle ) );
+    iOriginalTitle = iTitlePane->Text()->AllocL();
+
+    // Copy data of original landmark
+    iLandmark = CPosLandmark::NewL( iOriginalLandmark );
+
+    // Create iPositionRequest
+    HBufC* appName = iCoeEnv->AllocReadResourceAsDes16LC( R_LMREFAPP_APP_TITLE );
+    iPositionRequest = CLandmarksPositionRequest::NewL( *appName, this );
+    CleanupStack::PopAndDestroy( appName );
+
+    // Initialize iCategoryIds
+    iLandmark->GetCategoriesL( iCategoryIds );
+
+    iLmCategoriesModel =
+            CLandmarksLmCategoriesModel::NewL( iEngine, iCategoryIds );
+
+    // Initialise states of real value editors
+    for ( TInt i = ELatitudeEditor; i <= ERadiusEditor; i++ )
+        {
+        User::LeaveIfError( iIsRealValueEdited.Append( EFalse ) );
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+CLandmarksEditDialog* CLandmarksEditDialog::NewLC(
+    CPosLandmark& aLandmark,
+    TBool aUseCurrentLocation,
+    TBool& aEdited,
+    CLandmarksApplicationEngine& aEngine,
+    TInt aInitialFocusFieldId )
+    {
+    CLandmarksEditDialog* self = new ( ELeave ) CLandmarksEditDialog(
+        aLandmark, aUseCurrentLocation, aEdited, aEngine, aInitialFocusFieldId );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+CLandmarksEditDialog::~CLandmarksEditDialog()
+    {
+    CloseWaitDialog();
+
+    delete iLandmark;
+    delete iAppName;
+    delete iPositionRequest;
+    iCategoryIds.Close();
+    iIsRealValueEdited.Close();
+    delete iLmCategoriesModel;
+
+    // Restore title pane. Ownership of iTitlePane transferred.
+    if ( iTitlePane && iOriginalTitle )
+        {
+        iTitlePane->SetText( iOriginalTitle );
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksEditDialog::DynInitMenuPaneL(
+    TInt aResourceId,
+    CEikMenuPane* aMenuPane )
+    {
+    CAknForm::DynInitMenuPaneL( aResourceId, aMenuPane );
+
+    if ( aResourceId == R_AVKON_FORM_MENUPANE )
+        {
+        // We do not want to allow the user to modify our Form therefore
+        // Disable the Label, Add, Delete, and Save Field
+        aMenuPane->SetItemDimmed( EAknFormCmdLabel, ETrue );
+        aMenuPane->SetItemDimmed( EAknFormCmdAdd, ETrue );
+        aMenuPane->SetItemDimmed( EAknFormCmdDelete, ETrue );
+        aMenuPane->SetItemDimmed( EAknFormCmdSave, ETrue );
+
+        aMenuPane->SetItemDimmed( ELandmarksUpdateToCurrentLocation,
+            Control( ELandmarkCategoryField )->IsFocused() );
+        aMenuPane->SetItemDimmed( ELandmarksEditCategories,
+            !Control( ELandmarkCategoryField )->IsFocused() );
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksEditDialog::ProcessCommandL( TInt aCommandId )
+	{
+	CAknForm::ProcessCommandL( aCommandId );
+
+        switch ( aCommandId )
+            {
+            case ELandmarksUpdateToCurrentLocation:
+                UpdateToCurrentLocationL();
+                break;
+
+            case ELandmarksResetCoordinates:
+                ResetCoordinatesL();
+                break;
+
+            case ELandmarksEditCategories:
+                EditCategoriesL();
+                break;
+
+            default:
+                break;
+            }
+	}
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksEditDialog::NotifyOperationProgressL(
+    TOperation aOperation,
+    TInt /*aProgress*/,
+    TInt aErrorCode )
+    {
+    if ( aErrorCode == KErrNone &&
+        aOperation == EAcquiringLocation )
+        {
+        // Update location fields with new location
+        TPosition position;
+        iPositionInfo.GetPosition( position );
+        ConfigureLocationFieldsL( position );
+        SetChangesPending( ETrue );
+
+        // Indicate that editors have been updated
+        for ( TInt i = ELatitudeEditor; i <= EVerticalAccEditor; i++ )
+            {
+            iIsRealValueEdited[i] = ETrue;
+            }
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+TBool CLandmarksEditDialog::OkToExitL( TInt aButtonId )
+	{
+    if ( aButtonId == EAknSoftkeyDone )
+        {
+        // exit from CAknForm's "edit" mode
+        return CAknForm::OkToExitL( EAknSoftkeyBack );
+        }
+    else
+        {
+    	return CAknForm::OkToExitL( aButtonId );
+        }
+	}
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksEditDialog::PreLayoutDynInitL()
+    {
+    SetEditableL( ETrue );
+    ConfigureFieldsL();
+    ConfigureCategoryFieldL();
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksEditDialog::PostLayoutDynInitL()
+    {
+    SetChangesPending( ETrue );
+
+    UpdateTitleBarL();
+    CAknForm::PostLayoutDynInitL();
+
+    if ( iUseCurrentLocation )
+        {
+        UpdateToCurrentLocationL();
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksEditDialog::SetInitialCurrentLine()
+    {
+    CAknForm::SetInitialCurrentLine();
+
+    if ( iInitialFocusFieldId >= ELandmarkNameField &&
+        iInitialFocusFieldId <= ELandmarkCountryField )
+        {
+        TInt err = KErrNone;
+        TRAP( err, TryChangeFocusToL( iInitialFocusFieldId ) );
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksEditDialog::HandleControlEventL(
+    CCoeControl* aControl,
+    TCoeEvent aEventType )
+	{
+    CAknForm::HandleControlEventL( aControl, aEventType );
+
+    if ( aEventType == EEventStateChanged )
+        {
+        if ( aControl == ControlOrNull( ELandmarkLatitudeField ) )
+            {
+            iIsRealValueEdited[ELatitudeEditor] = ETrue;
+            }
+        else if ( aControl == ControlOrNull( ELandmarkLongitudeField ) )
+            {
+            iIsRealValueEdited[ELongitudeEditor] = ETrue;
+            }
+        else if ( aControl == ControlOrNull( ELandmarkAltitudeField ) )
+            {
+            iIsRealValueEdited[EAltitudeEditor] = ETrue;
+            }
+        else if ( aControl == ControlOrNull( ELandmarkHorAccField ) )
+            {
+            iIsRealValueEdited[EHorizontalAccEditor] = ETrue;
+            }
+        else if ( aControl == ControlOrNull( ELandmarkVerAccField ) )
+            {
+            iIsRealValueEdited[EVerticalAccEditor] = ETrue;
+            }
+        else if ( aControl == ControlOrNull( ELandmarkRadiusField ) )
+            {
+            iIsRealValueEdited[ERadiusEditor] = ETrue;
+            }
+        else if ( aControl == ControlOrNull( ELandmarkNameField ) )
+            {
+            UpdateTitleBarL( ETrue ); // get it from name field
+            }
+        }
+	}
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksEditDialog::HandleResourceChange( TInt aType )
+	{
+	if ( aType == KEikDynamicLayoutVariantSwitch )
+		{
+		CAknForm::HandleResourceChange( aType );
+		}
+	}
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+TBool CLandmarksEditDialog::SaveFormDataL()
+    {
+    TErrorInForm error = FetchAndSaveFormDataL();
+    if ( error )
+        {
+        ProcessErrorsInFormL( error );
+        // Leave to interrupt saving of data. Other error codes than KErrNone
+        // result in an additional error dialog.
+        User::Leave( KErrNone );
+        }
+    else
+        {
+        // input is valid, save everything to original landmark
+        TPtrC text;
+
+        iLandmark->GetLandmarkName( text );
+        iOriginalLandmark.SetLandmarkNameL( text );
+
+        iLandmark->GetLandmarkDescription( text );
+        iOriginalLandmark.SetLandmarkDescriptionL( text );
+
+        iOriginalLandmark.RemoveLandmarkAttributes( CPosLandmark::ECategoryInfo );
+        for ( TInt i = 0; i < iCategoryIds.Count(); i++ )
+            {
+            iOriginalLandmark.AddCategoryL( iCategoryIds[i] );
+            }
+
+        CopyCoordinateDataL( *iLandmark, iOriginalLandmark );
+        CopyAddressDataL( *iLandmark, iOriginalLandmark );
+        }
+
+    iEdited = ETrue;
+    return ETrue;
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+CLandmarksEditDialog::TErrorInForm CLandmarksEditDialog::FetchAndSaveFormDataL()
+    {
+    HBufC* text = NULL;
+
+    // name
+    text = FetchTextLC( Control( ELandmarkNameField ) );
+    if ( text->Length() )
+        {
+        iLandmark->SetLandmarkNameL( *text );
+        }
+    else
+        {
+        return EEmptyLandmarkName;
+        }
+    CleanupStack::PopAndDestroy( text );
+
+    // description
+    text = FetchTextLC( Control( ELandmarkDescField ) );
+    iLandmark->SetLandmarkDescriptionL( *text );
+    CleanupStack::PopAndDestroy( text );
+
+    // categories
+    iLandmark->RemoveLandmarkAttributes( CPosLandmark::ECategoryInfo );
+    for ( TInt i = 0; i < iCategoryIds.Count(); i++ )
+        {
+        iLandmark->AddCategoryL( iCategoryIds[i] );
+        }
+
+    // Address fields
+    SaveAddressDataL();
+
+    // coordinate fields
+    TErrorInForm error = SaveCoordinateDataL();
+    if ( error )
+        {
+        return error;
+        }
+
+    return ENoErrors;
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksEditDialog::SaveAddressDataL()
+    {
+    HBufC* text = NULL;
+
+    iLandmark->RemovePositionField( EPositionFieldStreet );
+    iLandmark->RemovePositionField( EPositionFieldPostalCode );
+    iLandmark->RemovePositionField( EPositionFieldCity );
+    iLandmark->RemovePositionField( EPositionFieldCountry );
+
+    // street
+    text = FetchTextLC( Control( ELandmarkStreetField ) );
+    if ( text->Length() )
+        {
+        iLandmark->SetPositionFieldL( EPositionFieldStreet, *text );
+        }
+    CleanupStack::PopAndDestroy( text );
+
+    // postal code
+    text = FetchTextLC( Control( ELandmarkPostalField ) );
+    if ( text->Length() )
+        {
+        iLandmark->SetPositionFieldL( EPositionFieldPostalCode, *text );
+        }
+    CleanupStack::PopAndDestroy( text );
+
+    // city
+    text = FetchTextLC( Control( ELandmarkCityField ) );
+    if ( text->Length() )
+        {
+        iLandmark->SetPositionFieldL( EPositionFieldCity, *text );
+        }
+    CleanupStack::PopAndDestroy( text );
+
+    // country
+    text = FetchTextLC( Control( ELandmarkCountryField ) );
+    if ( text->Length() )
+        {
+        iLandmark->SetPositionFieldL( EPositionFieldCountry, *text );
+        }
+    CleanupStack::PopAndDestroy( text );
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+CLandmarksEditDialog::TErrorInForm CLandmarksEditDialog::SaveCoordinateDataL()
+    {
+    TLocality existingLocation;
+    TBool locationExists = ( iLandmark->GetPosition( existingLocation ) == KErrNone );
+
+    TReal latitude = existingLocation.Latitude();
+    TReal longitude = existingLocation.Longitude();
+    TReal32 altitude = existingLocation.Altitude();
+    TReal32 horAcc = existingLocation.HorizontalAccuracy();
+    TReal32 verAcc = existingLocation.VerticalAccuracy();
+
+    TPosition tempPos;
+
+    // latitude
+    if ( iIsRealValueEdited[ELatitudeEditor] || !locationExists )
+        {
+        CAknLocationEditor* editor = static_cast<CAknLocationEditor*>( Control ( ELandmarkLatitudeField ) );
+    	editor->Get( tempPos );
+    	latitude = tempPos.Latitude();
+        }
+
+    // longitude
+    if ( iIsRealValueEdited[ELongitudeEditor] || !locationExists )
+        {
+        CAknLocationEditor* editor = static_cast<CAknLocationEditor*>( Control ( ELandmarkLongitudeField ) );
+    	editor->Get( tempPos );
+    	longitude = tempPos.Longitude();
+        }
+
+    // altitude
+    if ( iIsRealValueEdited[EAltitudeEditor] || !locationExists )
+        {
+        if ( !FetchFloatL( altitude, Control( ELandmarkAltitudeField ) ) )
+            {
+            return EWrongAltitude;
+            }
+        }
+
+    // horizontal accuracy
+    if ( iIsRealValueEdited[EHorizontalAccEditor] || !locationExists )
+        {
+        if ( !FetchFloatL( horAcc, Control( ELandmarkHorAccField ) ) )
+            {
+            return EWrongHorAcc;
+            }
+        }
+
+    // vertical accuracy
+    if ( iIsRealValueEdited[EVerticalAccEditor] || !locationExists )
+        {
+        if ( !FetchFloatL( verAcc, Control( ELandmarkVerAccField ) ) )
+            {
+            return EWrongVerAcc;
+            }
+        }
+
+    // Update location. There are some rules specified by TLocality and
+    // TCoordinate how to update a location. These rules are taken into
+    // account below when validating the location data.
+    if ( Math::IsNaN( latitude ) && Math::IsNaN( longitude ) )
+        {
+        // If lat long are undefined, then alt and hAcc
+        // must be undefined
+        if ( !Math::IsNaN( horAcc ) )
+            {
+            return ENoLatLonButHorAcc;
+            }
+        else if ( !Math::IsNaN( altitude ) )
+            {
+            return ENoLatLonButAltitude;
+            }
+        else if ( !Math::IsNaN( verAcc ) )
+            {
+            return ENoAltButVerAcc;
+            }
+        else
+            {
+            // None position fields are set, Remove position info.
+            iLandmark->RemoveLandmarkAttributes( CPosLandmark::EPosition );
+            }
+        }
+    else if ( !Math::IsNaN( latitude ) && !Math::IsNaN( longitude ) )
+        {
+        if ( !Math::IsNaN( horAcc ) && horAcc < 0 )
+            {
+            // If lat long are defined, hAcc must be positive if defined
+            return EWrongHorAcc;
+            }
+        else if ( Math::IsNaN( altitude ) && !Math::IsNaN( verAcc ) )
+            {
+            // if altitude is undefined, then vertical accuracy
+            // must be undefined
+            return ENoAltButVerAcc;
+            }
+        else if ( !Math::IsNaN( verAcc ) && verAcc < 0 )
+            {
+            // vertical accuracy must be positive if defined
+            return EWrongVerAcc;
+            }
+        else
+            {
+            // It is allowed to set the new locality
+            TCoordinate coordinate( latitude, longitude, altitude );
+            TLocality newLocation( coordinate, horAcc, verAcc );
+            iLandmark->SetPositionL( newLocation );
+            }
+        }
+    else
+        {
+        // Inform user that no valid lat/long has been entered
+        return EOnlyLatOrLon;
+        }
+
+    // coverage radius
+    TReal32 radius;
+    TInt radiusExists = ( iLandmark->GetCoverageRadius( radius ) == KErrNone );
+    if ( iIsRealValueEdited[ERadiusEditor] || !radiusExists )
+        {
+        if ( !FetchFloatL( radius, Control( ELandmarkRadiusField ) ) )
+            {
+            return EWrongRadius;
+            }
+        }
+    if ( !Math::IsNaN( radius ) && radius < 0 )
+        {
+        return EWrongRadius;
+        }
+    iLandmark->SetCoverageRadius( radius );
+
+    return ENoErrors;
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksEditDialog::ConfigureFieldsL()
+    {
+    TPtrC textFieldValue;
+
+    // Configure landmark name
+    textFieldValue.Set( KNullDesC );
+    iLandmark->GetLandmarkName( textFieldValue );
+
+    SetTextFieldL( ELandmarkNameField, textFieldValue );
+
+    // Configure description
+    textFieldValue.Set( KNullDesC );
+    iLandmark->GetLandmarkDescription( textFieldValue );
+
+    SetTextFieldL( ELandmarkDescField, textFieldValue );
+
+    // all address fields
+    ConfigureAddressFieldsL();
+
+    // Configure location fields
+    TLocality location;
+    iLandmark->GetPosition( location );
+    ConfigureLocationFieldsL( location );
+
+    // Configure coverage Radius
+    TReal32 coverageRadius;
+    TBuf<KPosLmMaxTextFieldLength> radiusBuf;
+    TInt res = iLandmark->GetCoverageRadius( coverageRadius );
+    if ( res != KErrNotFound )
+        {
+        radiusBuf.AppendNum( coverageRadius, iRealFormat );
+        }
+
+    SetTextFieldL( ELandmarkRadiusField, radiusBuf );
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksEditDialog::ConfigureAddressFieldsL()
+    {
+    TPtrC textFieldValue;
+
+    // street
+    textFieldValue.Set( KNullDesC );
+    iLandmark->GetPositionField( EPositionFieldStreet, textFieldValue );
+
+    SetTextFieldL( ELandmarkStreetField, textFieldValue );
+
+    // postalCode
+    textFieldValue.Set( KNullDesC );
+    iLandmark->GetPositionField( EPositionFieldPostalCode, textFieldValue );
+
+    SetTextFieldL( ELandmarkPostalField, textFieldValue );
+
+    // city
+    textFieldValue.Set( KNullDesC );
+    iLandmark->GetPositionField( EPositionFieldCity, textFieldValue );
+
+    SetTextFieldL( ELandmarkCityField, textFieldValue );
+
+    // country
+    textFieldValue.Set( KNullDesC );
+    iLandmark->GetPositionField( EPositionFieldCountry, textFieldValue );
+
+    SetTextFieldL( ELandmarkCountryField, textFieldValue );
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksEditDialog::ConfigureLocationFieldsL( TLocality& aLocation )
+    {
+    TBuf<KPosLmMaxTextFieldLength> textFieldValue;
+
+    TPosition pos( aLocation, TTime(0) );
+    // Configure latitude in float format
+    SetLocationFieldL( ELandmarkLatitudeField, pos );
+
+    // Configure longitude in float format
+    SetLocationFieldL( ELandmarkLongitudeField, pos );
+
+    // Configure altitude
+    LandmarksUtils::FloatToDes( aLocation.Altitude(), textFieldValue, iRealFormat );
+    SetTextFieldL( ELandmarkAltitudeField, textFieldValue );
+
+    // Configure horizontal accuracy
+    LandmarksUtils::FloatToDes( aLocation.HorizontalAccuracy(), textFieldValue, iRealFormat );
+    SetTextFieldL( ELandmarkHorAccField, textFieldValue );
+
+    // Configure vertical accuracy
+    LandmarksUtils::FloatToDes( aLocation.VerticalAccuracy(), textFieldValue, iRealFormat );
+    SetTextFieldL( ELandmarkVerAccField, textFieldValue );
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksEditDialog::ConfigureCategoryFieldL()
+    {
+    TInt nrOfCategories = iCategoryIds.Count();
+    const TInt KExtraChars = 2; // CRLF
+
+    HBufC* lmCategoriesBuf = HBufC::NewLC(
+        ( KPosLmMaxTextFieldLength + KExtraChars ) * nrOfCategories );
+
+    TPtr lmCategories = lmCategoriesBuf->Des();
+    for ( TInt i = 0; i < nrOfCategories; i++ )
+        {
+        if ( i > 0 )
+            {
+            lmCategories.Append( CEditableText::ELineBreak );
+            }
+
+        CPosLandmarkCategory* category = iEngine.CategoryLC( iCategoryIds[i] );
+        TPtrC categoryName;
+        category->GetCategoryName( categoryName );
+        lmCategories.Append( categoryName );
+        CleanupStack::PopAndDestroy( category );
+        }
+
+    SetTextFieldL( ELandmarkCategoryField, *lmCategoriesBuf );
+
+    CleanupStack::PopAndDestroy( lmCategoriesBuf );
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksEditDialog::SetTextFieldL( TInt aId, const TDesC& aText )
+    {
+    CEikEdwin* editor = static_cast<CEikEdwin*>( Control( aId ) );
+	editor->SetTextL( &aText );
+    editor->DrawDeferred();
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksEditDialog::SetLocationFieldL( TInt aId, const TPosition& aPosition )
+    {
+    CAknLocationEditor* editor = static_cast<CAknLocationEditor*>( Control( aId ) );
+	editor->Set( aPosition );
+    editor->DrawDeferred();
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksEditDialog::UpdateTitleBarL( TBool aFromField )
+    {
+    if ( aFromField )
+        {
+        TBuf<KPosLmMaxTextFieldLength> name;
+
+        CEikEdwin* nameEditor =
+            static_cast<CEikEdwin*>( Control( ELandmarkNameField ) );
+        nameEditor->GetText( name );
+        iTitlePane->SetTextL( name );
+        }
+    else
+        {
+        TPtrC ptr;
+        iLandmark->GetLandmarkName( ptr );
+        iTitlePane->SetTextL( ptr );
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksEditDialog::ProcessErrorsInFormL(
+    CLandmarksEditDialog::TErrorInForm aErrorId )
+    {
+    switch ( aErrorId )
+        {
+        case ENoErrors:
+            break;
+        case EWrongLatitude:
+            NotifyErrorToUserL( R_LMREFAPP_LATITUDE_ERROR );
+            break;
+        case EWrongLongitude:
+            NotifyErrorToUserL( R_LMREFAPP_LONGITUDE_ERROR );
+            break;
+        case EWrongAltitude:
+            NotifyErrorToUserL( R_LMREFAPP_ALTITUDE_ERROR );
+            break;
+        case EWrongHorAcc:
+            NotifyErrorToUserL( R_LMREFAPP_HOR_ACC_ERROR );
+            break;
+        case EWrongVerAcc:
+            NotifyErrorToUserL( R_LMREFAPP_VER_ACC_ERROR );
+            break;
+        case EWrongRadius:
+            NotifyErrorToUserL( R_LMREFAPP_RADIUS_ERROR );
+            break;
+        case EOnlyLatOrLon:
+            NotifyErrorToUserL( R_LMREFAPP_LAT_LONG_ERROR );
+            break;
+        case ENoLatLonButHorAcc:
+            NotifyErrorToUserL( R_LMREFAPP_HACC_LAT_LONG_ERROR );
+            break;
+        case ENoLatLonButAltitude:
+            NotifyErrorToUserL( R_LMREFAPP_ALT_LAT_LONG_ERROR );
+            break;
+        case ENoAltButVerAcc:
+            NotifyErrorToUserL( R_LMREFAPP_VACC_ALT_ERROR );
+            break;
+        case EEmptyLandmarkName:
+            NotifyErrorToUserL( R_LMREFAPP_EMPTY_LANDMARK_NAME_ERROR );
+            break;
+        default:
+            LandmarksUtils::Panic( KErrGeneral );
+            break;
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksEditDialog::NotifyErrorToUserL( TInt aResourceId )
+    {
+    HBufC* msg = iCoeEnv->AllocReadResourceLC( aResourceId );
+    LandmarksUtils::ErrorNoteL( *msg );
+    CleanupStack::PopAndDestroy( msg );
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksEditDialog::EditCategoriesL()
+    {
+    TInt res = CLandmarksCategoriesDialog::RunDialogL( *iLmCategoriesModel );
+    if ( res )
+        {
+        ConfigureCategoryFieldL();
+        DrawDeferred();
+        SetChangesPending( ETrue );
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksEditDialog::UpdateToCurrentLocationL()
+    {
+    // Update location fields to current location
+    HBufC* title =
+        iCoeEnv->AllocReadResourceAsDes16LC( R_LMREFAPP_ACQUIRING_LOC );
+    iPositionRequest->FetchPositionInfoL( *title, iPositionInfo );
+    CleanupStack::PopAndDestroy( title );
+    }
+
+// ---------------------------------------------------------------------------
+//  Copies address information ( address and building position fields ) from
+//  source landmark to target.
+// ---------------------------------------------------------------------------
+//
+void CLandmarksEditDialog::CopyAddressDataL( CPosLandmark& aSrc, CPosLandmark& aTrg )
+    {
+    // clean address fields
+    for ( TPositionFieldId fieldId = EPositionFieldAddressCapabilitiesBegin + 1;
+          fieldId < EPositionFieldNMEACapabilitiesBegin;
+          fieldId++ )
+        {
+        aTrg.RemovePositionField( fieldId );
+        }
+
+    // copy fields
+    TPositionFieldId fieldId = aSrc.FirstPositionFieldId();
+    while ( fieldId != EPositionFieldNone )
+        {
+        if ( fieldId > EPositionFieldAddressCapabilitiesBegin &&
+             fieldId < EPositionFieldNMEACapabilitiesBegin )
+            {
+            TPtrC field;
+            if ( KErrNone == aSrc.GetPositionField( fieldId, field ) )
+                {
+                aTrg.SetPositionFieldL( fieldId, field );
+                }
+            }
+        fieldId = aSrc.NextPositionFieldId( fieldId );
+        }
+    }
+
+// ---------------------------------------------------------------------------
+//  Copies coordinate information ( locality and coverage ) from
+//  source landmark to target. If some fields are empty in source,
+//  they will also be emptied in result.
+// ---------------------------------------------------------------------------
+//
+void CLandmarksEditDialog::CopyCoordinateDataL( CPosLandmark& aSrc, CPosLandmark& aTrg )
+    {
+    TLocality loc;
+    if ( KErrNone == aSrc.GetPosition( loc ) )
+        {
+        aTrg.SetPositionL( loc );
+        }
+    else
+        {
+        aTrg.RemoveLandmarkAttributes( CPosLandmark::EPosition );
+        }
+
+    TRealX nan;
+    nan.SetNaN();
+    TReal32 coverage( nan );
+
+    aSrc.GetCoverageRadius( coverage );
+    aTrg.SetCoverageRadius( coverage );
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+TBool CLandmarksEditDialog::HasAddressData()
+    {
+    // check only those fields, which are shown to user
+    const TPositionFieldId fieldIds[] =
+        {
+        EPositionFieldCountry,
+        EPositionFieldCity,
+        EPositionFieldStreet,
+        EPositionFieldPostalCode,
+        };
+    const TInt fields = 4;
+
+    for ( TInt i = 0; i < fields; i++ )
+        {
+        TPtrC field;
+        TInt err = iLandmark->GetPositionField( fieldIds[i], field );
+        if ( !err && field.Length() )
+            {
+            return ETrue;
+            }
+        }
+
+    return EFalse;
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+TBool CLandmarksEditDialog::HasCoordinateData()
+    {
+    TLocality loc;
+    return ( KErrNone == iLandmark->GetPosition( loc ) );
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksEditDialog::StartWaitDialogL( TInt aResId )
+    {
+    if ( iWaitDialog )
+        {
+        User::Leave( KErrInUse );
+        }
+        
+    iWaitDialog = new (ELeave) CAknWaitDialog( 
+        ( reinterpret_cast<CEikDialog**>( &iWaitDialog ) ) ); 
+        
+    iWaitDialog->SetTone( CAknNoteDialog::EConfirmationTone ); 
+    iWaitDialog->ExecuteLD( aResId );
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksEditDialog::CloseWaitDialog()
+    {
+    if ( iWaitDialog )
+        {
+        TRAP_IGNORE( iWaitDialog->ProcessFinishedL() );
+        iWaitDialog = NULL;
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksEditDialog::ResetCoordinatesL()
+    {
+    TPosition position;
+    ConfigureLocationFieldsL( position );
+
+    SetChangesPending( ETrue );
+
+    // Indicate that editors have been updated
+    for ( TInt i = ELatitudeEditor; i <= EVerticalAccEditor; i++ )
+        {
+        iIsRealValueEdited[i] = ETrue;
+        }
+    }
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationlandmarksrefappfors60/Src/LandmarksEngine.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,386 @@
+/*
+* Copyright (c) 2004-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:  Implements the CLandmarksEngine class
+*
+*/
+
+
+
+#include <aknview.h>
+#include <EPos_CPosLandmarkDatabase.h>
+#include <EPos_CPosLmPartialReadParameters.h>
+#include <EPos_CPosLandmarkSearch.h>
+#include <EPos_CPosLmTextCriteria.h>
+
+#include "LandmarksEngine.h"
+#include "LandmarksLmOpWrapper.h"
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+CLandmarksEngine::CLandmarksEngine(
+    CPosLandmarkDatabase& aDb) 
+:   CLandmarksEngineBase(aDb),
+    iSortPref(CPosLandmark::ELandmarkName, TPosLmSortPref::EAscending)
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksEngine::ConstructL()
+    {
+    CLandmarksEngineBase::ConstructL();
+
+    // Set partial read parameters
+    CPosLmPartialReadParameters* partialReadParams = 
+        CPosLmPartialReadParameters::NewLC();
+    partialReadParams->SetRequestedAttributes(
+        CPosLandmark::ELandmarkName | CPosLandmark::EIcon);
+    iDb.SetPartialReadParametersL(*partialReadParams);
+    CleanupStack::PopAndDestroy(partialReadParams);
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+CLandmarksEngine* CLandmarksEngine::NewL(
+    CPosLandmarkDatabase& aDb)
+    {
+    CLandmarksEngine* self = new (ELeave) CLandmarksEngine(aDb);
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    CleanupStack::Pop(self);
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+CLandmarksEngine::~CLandmarksEngine()
+    {
+    Cancel();
+    iItemIds.Close();
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+TBool CLandmarksEngine::StartInitializeDbIfNecessaryL(
+    MLandmarksOperationObserver* aObserver)
+    {
+    if (iDb.IsInitializingNeeded())
+        {
+        // Create initialize operation
+        CPosLmOperation* operation = iDb.InitializeL();
+
+        iObserver = aObserver;
+        iActiveOperation = EInitializeDb;
+        iStatus = KRequestPending;
+        SetPriorityAndSetActive();
+
+        // Start asynchronous initialization
+        TBool reportProgress = ETrue;
+        iLmOpWrapper->StartOperation(operation, iStatus, reportProgress);
+
+        return ETrue;
+        }
+    else
+        {
+        return EFalse;
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksEngine::AddLandmarkL(CPosLandmark& aLandmark)
+    {
+    iDb.AddLandmarkL(aLandmark);
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksEngine::CommitLandmarkL(const CPosLandmark& aLandmark)
+    {
+    iDb.UpdateLandmarkL(aLandmark);
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksEngine::DeleteLandmarkL(TPosLmItemId aItemId)
+    {
+    iDb.RemoveLandmarkL(aItemId);
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+CPosLandmark* CLandmarksEngine::LandmarkLC(TPosLmItemId aItemId)
+    {
+    return iDb.ReadLandmarkLC(aItemId);
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksEngine::StartSearchingLandmarksL(
+    MLandmarksOperationObserver* aObserver)
+    {
+    // We need to cancel if we are searching/reading landmarks.
+    Cancel(); 
+
+    iObserver = aObserver;
+    iSearchResultExists = EFalse;
+    iFilterSearch = EFalse;
+    
+    // Complete ourselves and start search for all landmarks in db in RunL().
+    iStatus = KRequestPending;
+    SetPriorityAndSetActive();
+    iActiveOperation = ELandmarkSearch;
+    TRequestStatus* status = &iStatus;
+    User::RequestComplete(status, KErrNone);
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksEngine::StartSearchingLandmarksL(
+    const TDesC& aSearchPattern, 
+    TBool aSearchOnlyInPreviousMatches,
+    MLandmarksOperationObserver* aObserver)
+    {
+    // We need to cancel if we are searching/reading landmarks.
+    Cancel();
+
+    if (!iSearchResultExists)
+        {
+        // There are no previous results or previous search did not complete.
+        // We cannot use the result from it.
+        aSearchOnlyInPreviousMatches = EFalse;
+        }
+    iSearchResultExists = EFalse;
+    iFilterSearch = ETrue;
+
+    // Set search criteria
+    CPosLmTextCriteria* criteria = CPosLmTextCriteria::NewLC();
+    criteria->SetTextL(aSearchPattern);
+    criteria->SetAttributesToSearch(CPosLandmark::ELandmarkName);
+
+    // Create search operation
+    CPosLmOperation* operation = iSearcher->StartLandmarkSearchL(
+        *criteria, iSortPref, aSearchOnlyInPreviousMatches);
+    CleanupStack::PopAndDestroy(criteria);
+
+    // Start search operation
+    iObserver = aObserver;
+    iStatus = KRequestPending;
+    iLmOpWrapper->StartOperation(operation, iStatus);
+    SetPriorityAndSetActive();
+    iActiveOperation = ELandmarkSearch;
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+RArray<TPosLmItemId>* CLandmarksEngine::FetchSearchResult()
+    {
+    return &iItemIds;
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksEngine::StartReadingLandmarksL(
+    TInt aNrOfItemsToReadPerBundle,
+    MLandmarksOperationObserver* aObserver)
+    {
+    // We need to cancel if we are searching/reading landmarks.
+    Cancel();
+
+    iNrOfItemsToRead = aNrOfItemsToReadPerBundle;
+    iObserver = aObserver;
+    iCurrentItemId = 0;
+
+    // Start reading a bundle of landmarks
+    ReadSomeLandmarksL();
+    iActiveOperation = ELandmarkRead;
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+CArrayPtr<CPosLandmark>* CLandmarksEngine::FetchLandmarksLC()
+    {
+    // Fetch the partially read landmarks.
+    CArrayPtr<CPosLandmark>* result = 
+        iDb.TakePreparedPartialLandmarksL(iLmOpWrapper->LmOperationPtr());
+    CleanupStack::PushL(result);
+
+    return result;
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksEngine::RunL()
+    {
+    if (iActiveOperation == EInitializeDb)
+        {
+        // Report progress
+        iObserver->NotifyOperationProgressL(
+            iActiveOperation, iLmOpWrapper->Progress(), iStatus.Int());
+
+        if (iStatus == KPosLmOperationNotComplete)
+            {
+            // Continue initializing database until finished
+            iStatus = KRequestPending;
+            SetPriorityAndSetActive();
+            iLmOpWrapper->ExecuteNextStep(iStatus);
+            }
+        }
+    else if (iStatus != KErrNone)
+        {
+        // Operation failed. Report error code
+        NotifyOperationReadyL(iActiveOperation, iStatus.Int());
+        }
+    else if (iActiveOperation == ELandmarkSearch)
+        {
+        // Fetch search result
+        PopulateItemIdArrayL();
+        }
+    else if (iActiveOperation == ELandmarkRead)
+        {
+        if (iCurrentItemId < iItemIds.Count())
+            {
+            // There are still found landmarks to read
+            iObserver->NotifyOperationProgressL(iActiveOperation, KOperationNotReady, KErrNone);
+            ReadSomeLandmarksL();
+            }
+        else
+            {
+            // No more matches to read
+            NotifyOperationReadyL(iActiveOperation, KErrNone);
+            }
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksEngine::DoCancel()
+    {
+    iLmOpWrapper->Cancel();
+
+    if (iActiveOperation == ELandmarkSearch)
+        {
+        iSearchResultExists = EFalse;
+        }
+    iActiveOperation = ENoOperation;
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+TInt CLandmarksEngine::RunError(TInt aError)
+    {
+    // Notify user and ignore error code
+    TInt err;
+    TRAP(err, NotifyOperationReadyL(iActiveOperation, aError));
+
+    return KErrNone;
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksEngine::ReadSomeLandmarksL()
+    {
+    RArray<TPosLmItemId> subSetOfIds;
+    CleanupClosePushL(subSetOfIds);
+
+    // Create a subset of the found matches to read
+    TInt nrOfMatches = iItemIds.Count();
+    TInt i = 0;
+    while (i < iNrOfItemsToRead && iCurrentItemId < nrOfMatches)
+        {
+        User::LeaveIfError(subSetOfIds.Append(iItemIds[iCurrentItemId]));
+        iCurrentItemId++;
+        i++;
+        }
+
+    // Start reading subset of found matches
+    iStatus = KRequestPending;
+    CPosLmOperation* operation = iDb.PreparePartialLandmarksL(subSetOfIds);
+    iLmOpWrapper->StartOperation(operation, iStatus);
+    SetPriorityAndSetActive();
+
+    CleanupStack::PopAndDestroy(&subSetOfIds);
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksEngine::NotifyOperationReadyL(
+    TOperation aOperation, 
+    TInt aErrorCode)
+    {
+    iActiveOperation = ENoOperation;
+    iObserver->NotifyOperationProgressL(
+        aOperation, 
+        KOperationReady, 
+        aErrorCode);
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksEngine::PopulateItemIdArrayL()
+    {
+    // Fetch itemIterator
+    CPosLmItemIterator* itemIterator = NULL;
+    if (iFilterSearch)
+        {
+        itemIterator = iSearcher->MatchIteratorL();
+        iSearchResultExists = ETrue;
+        }
+    else
+        {
+        itemIterator = iDb.LandmarkIteratorL(iSortPref);
+        }
+    CleanupStack::PushL(itemIterator);
+    itemIterator->Reset();
+
+    // Fetch iItemIds
+    TUint nrOfItems = itemIterator->NumOfItemsL();
+    if (nrOfItems > 0)
+        {
+        TInt startIndex = 0;
+        iItemIds.Reset();
+        itemIterator->GetItemIdsL(iItemIds, startIndex, nrOfItems);
+        NotifyOperationReadyL(iActiveOperation, KErrNone);
+        }
+    else
+        {
+        // No matches found
+        NotifyOperationReadyL(iActiveOperation, KErrNotFound);
+        }
+    CleanupStack::PopAndDestroy(itemIterator);
+    }
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationlandmarksrefappfors60/Src/LandmarksEngineBase.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,77 @@
+/*
+* Copyright (c) 2004-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:  Implements the CLandmarksEngineBase class
+*
+*/
+
+
+
+#include <EPos_CPosLandmarkDatabase.h>
+#include <EPos_CPosLandmarkSearch.h>
+
+#include "LandmarksEngineBase.h"
+#include "LandmarksLmOpWrapper.h"
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+CLandmarksEngineBase::CLandmarksEngineBase(
+    CPosLandmarkDatabase& aDb) 
+:   CActive(CActive::EPriorityStandard), 
+    iDb(aDb)
+    {
+    CActiveScheduler::Add(this);
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksEngineBase::ConstructL()
+    {
+    iSearcher = CPosLandmarkSearch::NewL(iDb);
+    iLmOpWrapper = new (ELeave) CLandmarksLmOpWrapper();
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+CLandmarksEngineBase::~CLandmarksEngineBase()
+    {
+    delete iLmOpWrapper;
+    delete iSearcher;
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksEngineBase::SetPrio(CActive::TPriority aPriority)
+    {
+    iPriority = aPriority;
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksEngineBase::SetPriorityAndSetActive()
+    {
+    if (iPriority != Priority())
+        {
+        CActive::SetPriority(iPriority);
+        }
+    SetActive();
+    }
+
+  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationlandmarksrefappfors60/Src/LandmarksInfoContainer.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,288 @@
+/*
+* 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:  Implements the CLandmarksInfoContainer class
+*
+*/
+
+
+
+#include <aknsfld.h>
+#include <aknnavi.h>
+#include <aknlists.h> 
+#include <eikclbd.h>
+#include <akntitle.h>
+#include <aknview.h>
+#include <aknnavide.h>
+
+#include <lbspositioninfo.h>
+
+#include <lmrefapp.rsg>
+#include "LmRefApp.hrh"
+#include "LandmarksCommonData.h"
+#include "LandmarksInfoContainer.h"
+#include "LandmarksInfoModel.h"
+#include "LandmarksEditDialog.h"
+#include "LandmarksApplicationEngine.h"
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+CLandmarksInfoContainer::CLandmarksInfoContainer(
+    CAknView& aView,
+    CLandmarksApplicationEngine& aEngine,
+    CAknNavigationDecorator* aNaviDecorator)
+:   iView(aView),
+    iEngine(aEngine), 
+    iNaviDecorator(aNaviDecorator)
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksInfoContainer::ConstructL(const TRect& aRect)
+    {
+    CreateWindowL();
+    CreateListBoxL();
+
+    // Create data model.
+    iModel = new (ELeave) CLandmarksInfoModel(iEngine);
+
+    SetRect(aRect);
+    ActivateL();
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+CLandmarksInfoContainer::~CLandmarksInfoContainer()
+    {
+    iFields.Close();
+    delete iListBox;
+	delete iLandmark;
+    delete iModel;
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+TInt CLandmarksInfoContainer::CountComponentControls() const
+    {
+    TInt count = 0;
+    if (iListBox)
+        {
+        count++;
+        }
+
+    return count; // Return the number of controls inside this container.
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+CCoeControl* CLandmarksInfoContainer::ComponentControl(TInt aIndex) const
+    {
+    switch (aIndex)
+        {
+        case 0:
+            return iListBox; // Returns the pointer to listbox object.
+        default:
+            return NULL; // Exception : Returns NULL.
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+TKeyResponse CLandmarksInfoContainer::OfferKeyEventL(
+    const TKeyEvent& aKeyEvent, TEventCode aType)
+    {
+	TKeyResponse response = EKeyWasNotConsumed;
+
+    switch (aKeyEvent.iCode)
+        {
+        case EKeyUpArrow:
+        case EKeyDownArrow:
+            // Scrolling the listbox. Forward to iListBox.
+            response = iListBox->OfferKeyEventL(aKeyEvent, aType);
+            break;
+
+        case EKeyLeftArrow:
+        case EKeyRightArrow:
+            // Eat these to disable switching views
+            response = EKeyWasConsumed;
+            break;
+
+        case EKeyDevice3:
+            EditLandmarkL();
+            response = EKeyWasConsumed;
+            break;
+            
+        default:
+            // menu keys should be handled
+            break;
+        }
+        
+	return response;
+    }
+    
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksInfoContainer::StoreTitlePaneL()
+    {
+    CEikStatusPane* statusPane = iAvkonAppUi->StatusPane();
+    iTitlePane = (CAknTitlePane*) statusPane->ControlL(
+        TUid::Uid(EEikStatusPaneUidTitle));
+
+    iOriginalTitle = iTitlePane->Text()->AllocL();
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksInfoContainer::RestoreTitlePane()
+    {
+    if (iTitlePane && iOriginalTitle)
+        {
+        iTitlePane->SetText(iOriginalTitle); // ownership is transferred
+        }
+    else
+        {
+        delete iOriginalTitle;
+        }
+    iOriginalTitle = NULL;
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksInfoContainer::CreateListBoxL()
+    {
+    // Create a control to display a list of descriptors
+    iListBox = new (ELeave) CAknSingleHeadingStyleListBox();
+    iListBox->SetContainerWindowL(*this);
+    iListBox->ConstructL(this, 0);
+
+    // Create scrollbars
+    CEikScrollBarFrame* scrollBar = iListBox->CreateScrollBarFrameL();
+    scrollBar->SetScrollBarVisibilityL(
+		CEikScrollBarFrame::EOff, CEikScrollBarFrame::EAuto);
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksInfoContainer::SizeChanged()
+    {
+	// Set list box size.
+	iListBox->SetRect(Rect());
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksInfoContainer::HandleResourceChange(TInt aType)
+    {
+    CCoeControl::HandleResourceChange(aType);
+    if ( aType == KEikDynamicLayoutVariantSwitch )
+        {
+        SetRect(iView.ClientRect());
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksInfoContainer::LoadLandmarkL(TPosLmItemId aLandmarkId)
+    {
+	delete iLandmark;
+	iLandmark = NULL;
+
+    iLandmark = iEngine.LandmarkLC(aLandmarkId);
+    CleanupStack::Pop(iLandmark);
+
+    UpdateL();
+    iListBox->View()->SetCurrentItemIndex(0);
+    }
+    
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksInfoContainer::EditLandmarkL()
+    {
+    // Create editor
+    TBool isEdited = EFalse;
+
+    TInt selectedLine = iListBox->View()->CurrentItemIndex();
+    TInt activeField = 0;
+    if (selectedLine >= 0 && selectedLine < iFields.Count())
+        {
+        activeField = iFields[selectedLine];
+        }
+    
+    CLandmarksEditDialog* editDialog = CLandmarksEditDialog::NewLC(
+        *iLandmark, EFalse, isEdited, iEngine, activeField);
+
+    TInt err = editDialog->ExecuteLD(R_LMREFAPP_EDIT_DIALOG);
+    CleanupStack::Pop(editDialog);
+    User::LeaveIfError(err);
+
+    UpdateL();
+
+    // Commit if edited
+    if (isEdited)
+        {
+        iEngine.CommitLandmarkL(*iLandmark);
+    
+        // move to first field
+        iListBox->View()->SetCurrentItemIndex(0);
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksInfoContainer::UpdateL()
+    {
+    CDesCArray* infoArray = iModel->GetLandmarkInfoL(*iLandmark, iFields);
+
+    CTextListBoxModel* model = iListBox->Model();
+    model->SetItemTextArray(infoArray);
+    model->SetOwnershipType(ELbmOwnsItemArray);
+    iListBox->HandleItemAdditionL();
+
+    UpdateTitleBarL();
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksInfoContainer::UpdateTitleBarL()
+    {
+    TPtrC ptr;
+    if (iLandmark)
+        {
+        iLandmark->GetLandmarkName(ptr);
+        iTitlePane->SetTextL(ptr);
+        }
+    else 
+        {
+        iTitlePane->SetTextL(*iOriginalTitle);
+        }
+    }
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationlandmarksrefappfors60/Src/LandmarksInfoModel.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,246 @@
+/*
+* 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:  Implements the CLandmarksInfoModel class
+*
+*/
+
+
+
+#include <eikenv.h>
+#include <gulicon.h>
+#include <AknsUtils.h>
+#include <AknsItemID.h>
+#include <aknlocationed.h>
+
+#include <lbsposition.h>
+#include <EPos_CPosLandmark.h>
+#include <EPos_CPosLandmarkCategory.h>
+
+#include <lmrefapp.rsg>
+#include "LmRefApp.hrh"
+#include "LandmarksInfoModel.h"
+#include "LandmarksUtils.h"
+#include "LandmarksCommonData.h"
+#include "LandmarksApplicationEngine.h"
+
+const TInt KFieldCaptions[] = 
+    {
+    0,                                  // this slot is not used
+    R_LMREFAPP_LMNAME_LABEL_SHORT,      // ELandmarkNameField
+    R_LMREFAPP_DESCRIPTION_LABEL_SHORT, // ELandmarkDescField
+    R_LMREFAPP_CATEGORY_LABEL_SHORT,    // ELandmarkCategoryField    
+    R_LMREFAPP_LAT_LABEL_SHORT,         // ELandmarkLatitudeField
+    R_LMREFAPP_LON_LABEL_SHORT,         // ELandmarkLongitudeField
+    R_LMREFAPP_ALT_LABEL_SHORT,         // ELandmarkAltitudeField
+    R_LMREFAPP_HOR_ACC_LABEL_SHORT,     // ELandmarkHorAccField
+    R_LMREFAPP_VER_ACC_LABEL_SHORT,     // ELandmarkVerAccField
+    R_LMREFAPP_RADIUS_LABEL_SHORT,      // ELandmarkRadiusField
+    R_LMREFAPP_STREET_LABEL_SHORT,      // ELandmarkStreetField
+    R_LMREFAPP_POSTAL_LABEL_SHORT,      // ELandmarkPostalField
+    R_LMREFAPP_CITY_LABEL_SHORT,        // ELandmarkCityField
+    R_LMREFAPP_COUNTRY_LABEL_SHORT,     // ELandmarkCountryField
+    };
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+CLandmarksInfoModel::CLandmarksInfoModel(
+    CLandmarksApplicationEngine& aEngine)
+    : iEngine(aEngine)
+	{
+    // Configure real format
+    const TChar KDecimalChar = '.';
+    iRealFormat.iPlaces = KNrOfDecimals;
+    iRealFormat.iPoint = KDecimalChar;
+    iRealFormat.iTriLen = 0;
+    iRealFormat.iWidth = KPosLmMaxTextFieldLength;
+    iRealFormat.iType = KRealFormatFixed;
+	}
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+CLandmarksInfoModel::~CLandmarksInfoModel()
+	{
+	}
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+CDesCArray* CLandmarksInfoModel::GetLandmarkInfoL(
+    CPosLandmark& aLandmark,
+    RArray<TInt>& aFieldIds)
+    {
+    TPtrC fieldValue;
+    aFieldIds.Reset();
+
+    const TInt KInfoArrayGranularity = 16;
+    CDesCArray* infoArray = new (ELeave) CDesCArrayFlat(KInfoArrayGranularity);
+
+    // Format landmark name
+    fieldValue.Set(KNullDesC);
+    aLandmark.GetLandmarkName(fieldValue);
+
+    AddTextFieldL(ELandmarkNameField, fieldValue, *infoArray, aFieldIds);
+
+    // Format description
+    fieldValue.Set(KNullDesC);
+    aLandmark.GetLandmarkDescription(fieldValue);
+
+    AddTextFieldL(ELandmarkDescField, fieldValue, *infoArray, aFieldIds);
+
+    // Format categories
+    AddCategoryFieldsL(aLandmark, *infoArray, aFieldIds);
+
+    // Format location fields
+    TLocality location;
+    aLandmark.GetPosition(location);
+    AddLocationFieldsL(location, *infoArray, aFieldIds);
+
+    // Format coverage Radius
+    TReal32 coverageRadius;
+    TBuf<KPosLmMaxTextFieldLength> radiusBuf;
+    TInt res = aLandmark.GetCoverageRadius(coverageRadius);
+    if (res != KErrNotFound)
+        {
+        radiusBuf.AppendNum(coverageRadius, iRealFormat);
+        }
+
+    AddTextFieldL(ELandmarkRadiusField, radiusBuf, *infoArray, aFieldIds);
+
+    // Format street;
+    fieldValue.Set(KNullDesC);
+    aLandmark.GetPositionField(EPositionFieldStreet, fieldValue);
+
+    AddTextFieldL(ELandmarkStreetField, fieldValue, *infoArray, aFieldIds);
+
+    // Format postalCode;
+    fieldValue.Set(KNullDesC);
+    aLandmark.GetPositionField(EPositionFieldPostalCode, fieldValue);
+
+    AddTextFieldL(ELandmarkPostalField, fieldValue, *infoArray, aFieldIds);
+
+    // Format city;
+    fieldValue.Set(KNullDesC);
+    aLandmark.GetPositionField(EPositionFieldCity, fieldValue);
+
+    AddTextFieldL(ELandmarkCityField, fieldValue, *infoArray, aFieldIds);
+
+    // Format country
+    fieldValue.Set(KNullDesC);
+    aLandmark.GetPositionField(EPositionFieldCountry, fieldValue);
+
+    AddTextFieldL(ELandmarkCountryField, fieldValue, *infoArray, aFieldIds);
+    
+    return infoArray;
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksInfoModel::AddTextFieldL(
+    TInt aFieldId, 
+    TDesC& aText, 
+    CDesCArray& aArray,
+    RArray<TInt>& aFieldIds)
+    {
+    if (aText.Length())
+        {
+        HBufC* caption = CCoeEnv::Static()->
+            AllocReadResourceAsDes16LC(KFieldCaptions[aFieldId]);
+
+        const TInt KNumTabsAndOther = 10;        
+        HBufC* item = HBufC::NewLC(
+            caption->Length() + aText.Length() + KNumTabsAndOther); 
+            
+        _LIT(KItemFormat, "%S\t%S\t\t");
+        item->Des().Format(KItemFormat, caption, &aText); 
+        
+        // append new item to the list
+        aFieldIds.AppendL(aFieldId);
+        aArray.AppendL(*item); 
+        CleanupStack::PopAndDestroy(2, caption);
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksInfoModel::AddLocationFieldsL(
+    TLocality& aLocation,
+    CDesCArray& aArray,
+    RArray<TInt>& aFieldIds)
+    {
+    TBuf<KPosLmMaxTextFieldLength> fieldValue;
+
+    TPosition pos( aLocation, TTime(0) );
+
+    // Format latitude in system format
+    HBufC* latStr = CAknLocationEditor::DisplayableLocationL( 
+        pos, CAknLocationEditor::ELatitudeOnly );
+    CleanupStack::PushL( latStr );
+    AddTextFieldL( ELandmarkLatitudeField, *latStr, aArray, aFieldIds );
+    CleanupStack::PopAndDestroy( latStr );
+
+    // Format longitude in system format
+    HBufC* lonStr = CAknLocationEditor::DisplayableLocationL( 
+        pos, CAknLocationEditor::ELongitudeOnly );
+    CleanupStack::PushL( lonStr );
+    AddTextFieldL( ELandmarkLongitudeField, *lonStr, aArray, aFieldIds );
+    CleanupStack::PopAndDestroy( lonStr );
+
+    // Format altitude
+    LandmarksUtils::FloatToDes(aLocation.Altitude(), fieldValue, iRealFormat);
+    AddTextFieldL(ELandmarkAltitudeField, fieldValue, aArray, aFieldIds);
+
+    // Format horizontal accuracy
+    LandmarksUtils::FloatToDes(aLocation.HorizontalAccuracy(), fieldValue, iRealFormat);
+    AddTextFieldL(ELandmarkHorAccField, fieldValue, aArray, aFieldIds);
+
+    // Format vertical accuracy
+    LandmarksUtils::FloatToDes(aLocation.VerticalAccuracy(), fieldValue, iRealFormat);
+    AddTextFieldL(ELandmarkVerAccField, fieldValue, aArray, aFieldIds);
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksInfoModel::AddCategoryFieldsL(
+    CPosLandmark& aLandmark,
+    CDesCArray& aArray,
+    RArray<TInt>& aFieldIds)
+    {
+    RArray< TPosLmItemId > categories;
+    CleanupClosePushL(categories);
+    aLandmark.GetCategoriesL(categories);
+    TInt nrOfCategories = categories.Count();
+    
+    for (TInt i = 0; i < nrOfCategories; i++)
+        {
+        TPtrC categoryName;
+        CPosLandmarkCategory* category = iEngine.CategoryLC(categories[i]);
+        category->GetCategoryName(categoryName);
+
+        AddTextFieldL(ELandmarkCategoryField, categoryName, aArray, aFieldIds);
+
+        CleanupStack::PopAndDestroy(category);
+        }
+
+    CleanupStack::PopAndDestroy(&categories);
+    }
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationlandmarksrefappfors60/Src/LandmarksInfoView.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,177 @@
+/*
+* Copyright (c) 2004-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:  
+*       Implements the CLandmarksInfoView class
+*
+*/
+
+
+#include <eikmenup.h>
+#include <aknViewAppUi.h>
+#include <aknnavide.h>
+
+#include <lbspositioninfo.h>
+#include <EPos_Landmarks.h>
+
+#include <lmrefapp.rsg>
+#include "LmRefApp.hrh"
+
+#include "LandmarksAppUi.h"
+#include "LandmarksUtils.h"
+#include "LandmarksInfoView.h"
+#include "LandmarksApplicationEngine.h"
+#include "LandmarksInfoContainer.h"
+#include "LandmarksEditDialog.h"
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+CLandmarksInfoView::CLandmarksInfoView(
+    CAknNavigationDecorator* aNaviDecorator,
+    CLandmarksApplicationEngine& aEngine)
+:   iEngine(aEngine), 
+    iNaviDecorator(aNaviDecorator)
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksInfoView::ConstructL()
+    {
+    BaseConstructL(R_LMREFAPP_INFO_VIEW);
+    iAppName = iCoeEnv->AllocReadResourceAsDes16L(R_LMREFAPP_APP_TITLE);
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+CLandmarksInfoView* CLandmarksInfoView::NewLC(
+    CAknNavigationDecorator* aNaviDecorator,
+    CLandmarksApplicationEngine& aEngine)
+    {
+    CLandmarksInfoView* self = new (ELeave) CLandmarksInfoView(
+        aNaviDecorator, aEngine);
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+CLandmarksInfoView::~CLandmarksInfoView()
+    {
+    delete iContainer;
+    delete iAppName;
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+TUid CLandmarksInfoView::Id() const
+    {
+    return TUid::Uid(ELandmarksInfoViewId);
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksInfoView::HandleCommandL(TInt aCommand)
+    {
+    switch (aCommand)
+        {
+        case EAknSoftkeyEdit:
+            iContainer->EditLandmarkL();
+            break;
+
+        case EAknSoftkeyBack:
+            AppUi()->ActivateLocalViewL(TUid::Uid(ELandmarksViewId));
+            break;
+
+        default:
+            AppUi()->HandleCommandL(aCommand);
+            break;
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksInfoView::DoActivateL(
+    const TVwsViewId& /*aPrevViewId*/,
+    TUid aCustomMessageId,
+    const TDesC8& aCustomMessage)
+    {
+    __ASSERT_ALWAYS(aCustomMessageId.iUid == ELandmarksViewInfoById,
+                    LandmarksUtils::Panic(KErrGeneral));
+    
+    if (!iContainer)
+        {
+        iContainer = new (ELeave) CLandmarksInfoContainer(
+            *this, iEngine, iNaviDecorator);
+        iContainer->SetMopParent(this);
+	    iContainer->ConstructL(ClientRect());
+        }
+
+    iContainer->StoreTitlePaneL();
+
+    // Enable receiving of keyboard events.
+    AppUi()->AddToStackL(*this, iContainer);
+
+    // custom message contains landmark id
+    TPckgBuf<TPosLmItemId> lmid;
+    lmid.Copy(aCustomMessage);
+    iContainer->LoadLandmarkL(lmid());
+    
+    // Make view visible.
+    iNaviDecorator->MakeVisible(EFalse);
+    iContainer->MakeVisible(ETrue);
+
+    // Notify that this view is active
+    iEngine.NotifyViewActivated(Id(), ETrue);
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksInfoView::DoDeactivate()
+    {
+    // Hide view.
+    iContainer->MakeVisible(EFalse);
+    iNaviDecorator->MakeVisible(ETrue);
+    iContainer->RestoreTitlePane();
+
+    // Notify that this view is inactive
+    TBool isActive = EFalse;
+    iEngine.NotifyViewActivated(Id(), isActive);
+
+    // Disable receiving keyboard events.
+    AppUi()->RemoveFromStack(iContainer);
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksInfoView::HandleResourceChange( TInt aType )
+    {
+    if ( iContainer )
+        {
+        iContainer->HandleResourceChange( aType );
+        }
+    }
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationlandmarksrefappfors60/Src/LandmarksListBox.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,59 @@
+/*
+* Copyright (c) 2004-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:  
+*       Implements the CLandmarksContainerBase class
+*
+*/
+
+
+
+#include "LandmarksListbox.h"
+#include "LandmarksListBoxModel.h"
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksListBox::ConstructL(
+    const CCoeControl* aParent,
+    TInt aFlags)
+    {
+    // Create a specialized model, forwarding the filtering algorithm to the 
+    // landmark API.
+    iModel = new (ELeave) CLandmarksListBoxModel;
+
+    // Continue construction of the object.
+    CEikColumnListBox::ConstructL(aParent, aFlags);
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksListBox::CreateModelL()
+    {
+    // Do nothing. Model is already constructed in constructor.
+    // This method must be overridden to prevent base class to recreate a new, 
+    // for our purpuses, non-suitable model.
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+CLandmarksListBoxModel* CLandmarksListBox::Model() const
+    {
+    return static_cast <CLandmarksListBoxModel*> (iModel);
+    }
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationlandmarksrefappfors60/Src/LandmarksListBoxModel.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,49 @@
+/*
+* Copyright (c) 2004-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:  
+*       Implements the CLandmarksContainerBase class
+*
+*/
+
+
+
+#include "LandmarksListBoxModel.h"
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+const MDesCArray* CLandmarksListBoxModel::MatchableTextArray() const
+    {
+    return iItemTextArray;
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+TInt CLandmarksListBoxModel::NumberOfItems() const
+    {
+    return iItemTextArray->MdcaCount();
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+TPtrC CLandmarksListBoxModel::ItemText(TInt aItemIndex) const
+    {
+    return iItemTextArray->MdcaPoint(aItemIndex);
+    }
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationlandmarksrefappfors60/Src/LandmarksLmCategoriesModel.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,158 @@
+/*
+* Copyright (c) 2004-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:  
+*       Implements the CLandmarksLmCategoriesModel class
+*
+*/
+
+
+
+#include <eikenv.h>
+#include <gulicon.h>
+#include <AknIconArray.h>
+#include <avkon.mbg>
+
+#include <EPos_CPosLandmarkCategory.h>
+
+#include "LandmarksUtils.h"
+#include "LandmarksCommonData.h"
+#include "LandmarksLmCategoriesModel.h"
+#include "LandmarksApplicationEngine.h"
+
+
+_LIT(KItemFormat, "\t%S");
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+CLandmarksLmCategoriesModel::CLandmarksLmCategoriesModel(
+    RArray<TPosLmItemId>& aMarkedCategories)
+:   iMarkedCategoryIds(aMarkedCategories)
+	{
+	}
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksLmCategoriesModel::ConstructL(CLandmarksApplicationEngine& aEngine)
+	{
+    iCategories = aEngine.CategoriesL();
+	}
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+CLandmarksLmCategoriesModel* CLandmarksLmCategoriesModel::NewL(
+    CLandmarksApplicationEngine& aEngine,
+    RArray<TPosLmItemId>& aMarkedCategories)
+    {
+    CLandmarksLmCategoriesModel* self = new (ELeave) 
+        CLandmarksLmCategoriesModel(aMarkedCategories);
+    CleanupStack::PushL(self);
+    self->ConstructL(aEngine);
+    CleanupStack::Pop(self);
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+CLandmarksLmCategoriesModel::~CLandmarksLmCategoriesModel()
+	{
+    if (iCategories)
+        {
+        iCategories->ResetAndDestroy();
+	    delete iCategories;
+        }
+	}
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksLmCategoriesModel::SelectCategoriesL(
+    CArrayFixFlat<TInt>& aSelectedIndexes) 
+    {
+    // clear current list of selected categories
+    iMarkedCategoryIds.Reset();
+
+    for (TInt i = 0; i < aSelectedIndexes.Count(); i++)
+        {
+        TInt categoryIndex = aSelectedIndexes[i];
+
+        // Fetch the id of the selected item.
+        __ASSERT_ALWAYS((categoryIndex >= 0) && (categoryIndex < iCategories->Count()),
+                        LandmarksUtils::Panic(KErrGeneral));
+        TPosLmItemId selectedCategoryId = (*iCategories)[categoryIndex]->CategoryId();
+
+        User::LeaveIfError(iMarkedCategoryIds.Append(selectedCategoryId));
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+CArrayFixFlat<TInt>* CLandmarksLmCategoriesModel::SelectedCategoriesL() 
+    {
+    CArrayFixFlat<TInt>* selectedItems = new (ELeave) CArrayFixFlat<TInt>(KGranularity);
+    CleanupStack::PushL(selectedItems);
+
+    for (TInt i = 0; i < iCategories->Count(); i++)
+        {
+        TPosLmItemId categoryId = (*iCategories)[i]->CategoryId();
+
+		TInt index = iMarkedCategoryIds.Find(categoryId);
+        if (KErrNotFound != index)
+        	{
+	        selectedItems->AppendL(i);
+        	}
+        }
+
+	CleanupStack::Pop(selectedItems);        
+	return selectedItems;        
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+CDesCArray* CLandmarksLmCategoriesModel::FormattedCategoryNamesL()
+    {
+    // Granularity is set to be 8.
+    CDesCArrayFlat* listItems = new (ELeave) CDesCArrayFlat(KGranularity);
+    CleanupStack::PushL(listItems);
+
+    for (TInt i = 0; i < iCategories->Count(); i++)
+        {
+        // Create buffer that will contain the name and mark status. 3 extra 
+        // chars for tab and icon index.
+        const TInt KExtraChars = 3; 
+        TPtrC categoryName;
+        User::LeaveIfError((*iCategories)[i]->GetCategoryName(categoryName));
+        HBufC* formattedCategoryName = HBufC::NewLC(categoryName.Length() + KExtraChars);
+
+        // format string with category
+        formattedCategoryName->Des().Format(KItemFormat, &categoryName);
+
+        listItems->AppendL(*formattedCategoryName);
+        CleanupStack::PopAndDestroy(formattedCategoryName);
+        }
+
+    CleanupStack::Pop(listItems);
+
+    iListItems = listItems;
+    return iListItems;
+    }
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationlandmarksrefappfors60/Src/LandmarksLmOpWrapper.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,131 @@
+/*
+* Copyright (c) 2004-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:  Implements the CLandmarksLmOpWrapper class
+*
+*/
+
+
+
+#include <EPos_Landmarks.h>
+#include <EPos_CPosLmOperation.h>
+
+#include "LandmarksLmOpWrapper.h"
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+CLandmarksLmOpWrapper::CLandmarksLmOpWrapper()
+: CActive(CActive::EPriorityStandard)
+    {
+    CActiveScheduler::Add(this);
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+CLandmarksLmOpWrapper::~CLandmarksLmOpWrapper()
+    {
+    Cancel();
+    delete iLmOperation;
+    iLmOperation = NULL;
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksLmOpWrapper::StartOperation(
+    CPosLmOperation* aLmOperation,
+    TRequestStatus& aStatus,
+    TBool aReportProgress)
+    {
+    delete iLmOperation;
+    iLmOperation = aLmOperation;
+    iCallerStatus = &aStatus;
+    iReportProgress = aReportProgress;
+    iProgress = 0;
+
+    ExecuteNextStep();
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+CPosLmOperation* CLandmarksLmOpWrapper::LmOperationPtr()
+    {
+    return iLmOperation;
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksLmOpWrapper::ExecuteNextStep(TRequestStatus& aStatus)
+    {
+    iCallerStatus = &aStatus;
+    ExecuteNextStep();
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+TInt CLandmarksLmOpWrapper::Progress()
+    {
+    return (TInt) (iProgress * 100);
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksLmOpWrapper::DoCancel()
+    {
+    delete iLmOperation;
+    iLmOperation = NULL;
+    User::RequestComplete(iCallerStatus, KErrCancel);
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksLmOpWrapper::RunL()
+    {
+    if (iStatus == KErrNone)
+        {
+        // Operation finished.
+        User::RequestComplete(iCallerStatus, KErrNone);
+        }
+    else if (iStatus == KPosLmOperationNotComplete)
+        {
+        if (iReportProgress)
+            {
+            User::RequestComplete(iCallerStatus, KPosLmOperationNotComplete);
+            }
+        else
+            {
+            ExecuteNextStep();
+            }
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksLmOpWrapper::ExecuteNextStep()
+    {
+    iStatus = KRequestPending;
+    iLmOperation->NextStep(iStatus, iProgress);
+    SetActive();
+    }
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationlandmarksrefappfors60/Src/LandmarksModel.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,251 @@
+/*
+* Copyright (c) 2004-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:  Implements the CLandmarksModel class
+*
+*/
+
+
+
+#include <eikenv.h>
+#include <gulicon.h>
+#include <AknsUtils.h>
+#include <AknsItemID.h>
+
+#include <EPos_CPosLandmark.h>
+
+#include <lmrefapp.mbg>
+#include "LandmarksCommonData.h"
+#include "LandmarksModel.h"
+
+
+const TInt KDefaultIconIndex = 0;
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+CLandmarksModel::CLandmarksModel()
+	{
+	}
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksModel::ConstructL()
+	{
+	// The list box model uses MDesCArray interface class to take in text items.
+	iListItems = new (ELeave) CDesCArraySeg(KGranularity);
+	}
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+CLandmarksModel* CLandmarksModel::NewL()
+    {
+    CLandmarksModel* self = new (ELeave) CLandmarksModel();
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    CleanupStack::Pop(self);
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+CLandmarksModel::~CLandmarksModel()
+	{
+	delete iListItems;
+	}
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksModel::SetItemIds(RArray<TPosLmItemId>* aItemIds)
+    {
+    iItemIds = aItemIds;
+
+    // Empty descriptor model
+    iListItems->Reset();
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+CDesCArraySeg* CLandmarksModel::ItemList()
+    {
+    return iListItems;
+    }
+		
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksModel::SetCurrentItem(TInt aIndex) 
+    {
+    iCurrentItem = aIndex;
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+TPosLmItemId CLandmarksModel::CurrentItemId()
+    {
+    if (!iItemIds || iCurrentItem < 0 || 
+        iCurrentItem > iItemIds->Count() - 1)
+        {
+        return KPosLmNullItemId;
+        }
+
+    return (*iItemIds)[iCurrentItem];
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksModel::GetItemIdsL( 
+    const CArrayFix<TInt>& aSelectionIndexes,
+    RArray<TPosLmItemId>& aItemIds )
+    {
+	CleanupClosePushL(aItemIds);
+	
+    aItemIds.Reset();
+    if ( iItemIds )
+        {
+        for ( TInt i = 0; i < aSelectionIndexes.Count(); i++ )
+            {
+            if ( i < iItemIds->Count() )
+                {
+                aItemIds.AppendL( (*iItemIds)[aSelectionIndexes[i]] );
+                }
+            else
+                {
+                break;
+                }
+            }
+        }
+		
+	CleanupStack::Pop(&aItemIds);
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+CIconList* CLandmarksModel::CreateIconListL()
+    {
+    CIconList* iconList = 
+        (CIconList*) new (ELeave) CArrayPtrFlat<CGulIcon>(KGranularity);
+    CleanupStack::PushL(iconList);
+    
+    // Create the default landmark icon consisting of its image and mask
+    TAknsItemID aknsItemId = {0,0};
+    CGulIcon* icon = AknsUtils::CreateGulIconL(NULL, aknsItemId,
+        KLandmarksMbmFileName, 
+        EMbmLmrefappDefault_lm, 
+        EMbmLmrefappDefault_lm_mask);
+    CleanupStack::PushL(icon);
+    icon->SetBitmapsOwnedExternally(EFalse);
+    iconList->AppendL(icon);
+    CleanupStack::Pop(2, iconList);
+
+    // initialze iIconList. We don't need to delete any possible previous 
+    // iIconList since ownership is transferred to calling object.
+    iIconList = iconList;
+
+    return iIconList;
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksModel::RepopulateModelL(
+    CArrayPtr<CPosLandmark>* aLandmarks)
+    {
+    TInt nrOfReadItems = aLandmarks->Count();
+
+    // Format and insert the read landmarks
+    for (TInt i = 0; i < nrOfReadItems; i++)
+        {
+        CPosLandmark* landmark = (*aLandmarks)[i];
+        HBufC* formattedListItem = FormatListItemLC(*landmark);
+        iListItems->AppendL(*formattedListItem);
+        CleanupStack::PopAndDestroy(formattedListItem);
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// Formats a list item to the following format "X\tlandmarkName\t"
+// where X = icon index
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+HBufC* CLandmarksModel::FormatListItemLC(CPosLandmark& aLandmark)
+    {
+    // Extract name
+    TPtrC name;
+    aLandmark.GetLandmarkName(name);
+    // 10 extra chars for icon index and column separator
+    const TInt KExtraChars = 10;
+    HBufC* formattedNameBuf = HBufC::NewLC(name.Length() + KExtraChars);
+    TPtr formattedNamePtr = formattedNameBuf->Des();
+
+    // Extract icon info
+    TPtrC mbmIconFile;
+    TInt iconIndex, maskIndex;
+    TInt res = aLandmark.GetIcon(mbmIconFile, iconIndex, maskIndex);
+
+    // Format list item
+    if (res == KErrNone)
+        {
+        // Create icon and append it to icon array. 
+        TRAPD(err, AppendIconL(mbmIconFile, iconIndex, maskIndex));
+        if (err == KErrNone)
+            {
+            // Append the array index where the icon is appended
+            formattedNamePtr.AppendNum(iIconList->Count() - 1);
+            }
+        else
+            {
+            formattedNamePtr.AppendNum(KDefaultIconIndex);
+            }
+        }
+    else // res == KErrNotFound
+        {
+        formattedNamePtr.AppendNum(KDefaultIconIndex);
+        }
+    formattedNamePtr.Append(KTab);
+    formattedNamePtr.Append(name);
+
+    return formattedNameBuf;
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksModel::AppendIconL(
+    const TDesC& aMbmFile, 
+    TInt aIconOffset, 
+    TInt aMaskOffset)
+    {
+    TAknsItemID aknsItemId = {0,0};
+    CGulIcon* icon = AknsUtils::CreateGulIconL(NULL, aknsItemId,
+        aMbmFile, 
+        aIconOffset, 
+        aMaskOffset);
+    CleanupStack::PushL(icon);
+    icon->SetBitmapsOwnedExternally(EFalse);
+    iIconList->AppendL(icon);
+    CleanupStack::Pop(icon);
+    }
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationlandmarksrefappfors60/Src/LandmarksPositionRequest.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,287 @@
+/*
+* 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:  Implements the CLandmarksPositionRequest class
+*
+*/
+
+
+
+#include <AknWaitDialog.h>
+#include <coemain.h>
+#include <aknnotewrappers.h>
+
+#include <lbspositioninfo.h>
+
+#include <lmrefapp.rsg>
+#include "LandmarksUtils.h"
+#include "LandmarksPositionRequest.h"
+#include "LandmarksOperationObserver.h"
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+CLandmarksPositionRequest::CLandmarksPositionRequest(
+    MLandmarksOperationObserver* aObserver)
+    : 
+    CActive(CActive::EPriorityStandard), 
+    iObserver(aObserver),
+    iState(EIdle)
+    {
+    CActiveScheduler::Add(this);
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksPositionRequest::ConstructL(const TDesC& aAppName)
+    {
+    iAppName = aAppName.AllocL();
+    InitializeL();
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+CLandmarksPositionRequest* CLandmarksPositionRequest::NewL(
+    const TDesC& aAppName,
+    MLandmarksOperationObserver* aObserver)
+    {
+    CLandmarksPositionRequest* self =
+        new (ELeave) CLandmarksPositionRequest(aObserver);
+    CleanupStack::PushL(self);
+    self->ConstructL(aAppName);
+    CleanupStack::Pop(self);
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+CLandmarksPositionRequest::~CLandmarksPositionRequest()
+    {
+    Cancel();
+    iPositioner.Close();
+    iLocationServer.Close();
+    DismissWaitNote();
+    delete iAppName;
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksPositionRequest::FetchPositionInfoL(
+    const TDesC& aMessage,
+    TPositionInfo& aPositionInfo)
+    {
+    Cancel();
+    iPositionInfo = &aPositionInfo;
+
+    // Initialize wait note
+    CAknWaitDialog* waitNote = new (ELeave) CAknWaitDialog(
+        reinterpret_cast <CEikDialog**> (&iWaitNote), ETrue); // show immedaitely
+    CleanupStack::PushL(waitNote);
+    waitNote->SetCallback(this);
+    waitNote->SetTextL(aMessage);
+    waitNote->PrepareLC(R_LMREFAPP_ACQUIRE_LOCATION_WAIT_NOTE);
+    CleanupStack::Pop(waitNote); // waitNote will delete itself
+    iWaitNote = waitNote;
+
+    // Request location
+    iState = EAcquiringDefaultLocation;
+    ExecuteNextStep();
+
+    // Launch wait note
+    iWaitNote->RunLD();
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksPositionRequest::DismissWaitNote()
+    {
+    if (iWaitNote)
+        {
+        TInt err;
+        TRAP(err, iWaitNote->ProcessFinishedL());
+        iWaitNote = NULL;
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksPositionRequest::DoCancel()
+    {
+    // Cancel location request
+    if (iState == EAcquiringDefaultLocation)
+        {
+        iPositioner.CancelRequest(EPositionerNotifyPositionUpdate);
+        }
+    else if (iState == EAcquiringLastKnownLocation)
+        {
+        iPositioner.CancelRequest(EPositionerGetLastKnownPosition);
+        }
+    iState = EIdle;
+    DismissWaitNote();
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksPositionRequest::RunL()
+    {
+    if (iStatus == KErrNone)
+        {
+        // Location retrieved. Operation finished.
+
+        if ( iState == EAcquiringLastKnownLocation )
+            {
+            // inform user that it was last known location
+            HBufC* msg = CCoeEnv::Static()->AllocReadResourceLC( R_LMREFAPP_LAST_LOCATION_USED_INFO );
+            LandmarksUtils::ErrorNoteL( *msg );
+            CleanupStack::PopAndDestroy(msg);
+            }
+
+        NotifyOperationCompleteL(KErrNone);
+        }
+    else // iStatus != KErrNone
+        {
+        if (iState == EAcquiringDefaultLocation)
+            {
+            // Fetching current location failed. Try last known location.
+            iState = EAcquiringLastKnownLocation;
+            ExecuteNextStep();
+            }
+        else if (iState == EAcquiringLastKnownLocation)
+            {
+            // Fetching last known location failed. 
+            NotifyOperationCompleteL(iStatus.Int());
+            }
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+TInt CLandmarksPositionRequest::RunError(TInt /*aError*/)
+    {
+    // Ignore possible errors.
+    return KErrNone;
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksPositionRequest::DialogDismissedL(TInt aButtonId)
+    {
+    if (aButtonId == EAknSoftkeyCancel)
+        {
+        // Dialog is already dismissed by framework
+        iWaitNote = NULL;
+
+        Cancel();
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksPositionRequest::ShowErrorL(TInt aError)
+    {
+    HBufC* format = CCoeEnv::Static()->AllocReadResourceAsDes16LC(
+        R_LMREFAPP_ACQUIRING_LOC_ERROR);
+    
+    // some extra characters needed for error code
+    const TInt KErrorCodeTextLength = 10;
+    HBufC* message = HBufC::NewLC(
+        format->Length() + KErrorCodeTextLength);
+    message->Des().Format(*format, aError);
+
+    CAknInformationNote* informationNote = 
+        new (ELeave) CAknInformationNote(ETrue);
+    informationNote->ExecuteLD(*message);
+    CleanupStack::PopAndDestroy(2, format);
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksPositionRequest::ExecuteNextStep()
+    {
+    iStatus = KRequestPending;
+
+    switch (iState)
+        {
+        case EAcquiringDefaultLocation:
+            iPositioner.NotifyPositionUpdate(*iPositionInfo, iStatus);
+            break;
+        case EAcquiringLastKnownLocation:
+            iPositioner.GetLastKnownPosition(*iPositionInfo, iStatus);
+            break;
+        default:    
+            // this case should never happen, see RunL
+            LandmarksUtils::Panic(KErrGeneral);
+            break;
+        }
+
+    SetActive();
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksPositionRequest::NotifyOperationCompleteL(TInt aError)
+    {
+    DismissWaitNote();
+    iState = EIdle;
+
+    // Notify user if location couldn't be fetched.
+    if (aError) 
+        {
+        ShowErrorL(aError);
+        }
+
+    // Notify Observer
+    iObserver->NotifyOperationProgressL(
+        EAcquiringLocation, KOperationReady, aError);
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksPositionRequest::InitializeL()
+    {
+    // Connect to the location server
+    User::LeaveIfError(iLocationServer.Connect());
+
+    // Open the default positioner
+    User::LeaveIfError(iPositioner.Open(iLocationServer));
+
+    // Set this application as location requestor
+    User::LeaveIfError(iPositioner.SetRequestor(
+        CRequestor::ERequestorService,
+        CRequestor::EFormatApplication,
+        *iAppName));
+
+    // Set maximum allowed time for a location request
+    const TInt K30Seconds = 30000000;
+    TTimeIntervalMicroSeconds timeOut(K30Seconds);
+    TPositionUpdateOptions updateOptions;
+    updateOptions.SetUpdateTimeOut(timeOut);
+    User::LeaveIfError(iPositioner.SetUpdateOptions(updateOptions));
+    }
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationlandmarksrefappfors60/Src/LandmarksUtils.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,141 @@
+/*
+* 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:  Implements the CLandmarksViewDialog class
+*
+*/
+
+
+
+#include <e32std.h>
+#include <e32math.h>
+
+#include <aknnotewrappers.h>
+
+#include "LandmarksUtils.h"
+#include "LandmarksCommonData.h"
+
+// ============================= STATIC FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void LandmarksUtils::FloatToDes(TReal aFloat, TDes& aDes, TRealFormat aRealFormat)
+    {
+    if (Math::IsNaN(aFloat))
+        {
+        aDes = KNullDesC;
+        }
+    else
+        {
+        aDes.Num(aFloat, aRealFormat);
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void LandmarksUtils::LatLongToDes(TReal aFloat, TDes& aDes)
+    {
+    if (Math::IsNaN(aFloat))
+        {
+        aDes = KNullDesC;
+        }
+    else
+        {
+        aDes.Format(KLatLongFormat, aFloat);
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void LandmarksUtils::LatLongFloatToDegMinSecDesL(TReal aLatLong, TDes& aDes)
+    {
+    if (!Math::IsNaN(aLatLong))
+        {
+        // Convert to deg min sec
+        SDegMinSec degMinSec;
+
+        // Fetch degrees
+        User::LeaveIfError(Math::Int(degMinSec.iDegrees, Abs(aLatLong)));
+
+        // Fetch minutes
+        TReal minutes = (Abs(aLatLong) - degMinSec.iDegrees) * KMinutesPerDegree;
+        User::LeaveIfError(Math::Int(degMinSec.iMinutes, minutes));
+
+        // Fetch seconds
+        degMinSec.iSeconds = 
+            ((minutes - degMinSec.iMinutes) * KSecondsPerMinute);
+
+        // Check if seconds is going to be rounded to 60
+        const TReal KMaxSeconds = 59.999;
+        if (degMinSec.iSeconds > KMaxSeconds)
+            {
+            degMinSec.iSeconds = 0;
+            degMinSec.iMinutes++;
+            if (degMinSec.iMinutes == KMinutesPerDegree)
+                {
+                degMinSec.iMinutes = 0;
+                degMinSec.iDegrees++;
+                // We do not need to check if degress > 90 or if degrees > 180.
+                // Landmarks FW takes care of that.
+                }
+            }
+
+        // Format output descriptor
+        if (aLatLong >= 0)
+            {
+            aDes.Format(KListBoxLatLongFormat, &KPositiveSign, 
+                degMinSec.iDegrees, KDegreeSign, degMinSec.iMinutes, 
+                degMinSec.iSeconds);
+            }
+        else
+            {
+            aDes.Format(KListBoxLatLongFormat, &KNegativeSign, 
+                Abs(degMinSec.iDegrees), KDegreeSign, Abs(degMinSec.iMinutes), 
+                Abs(degMinSec.iSeconds));
+            }
+        }
+    else
+        {
+        aDes.Zero();
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void LandmarksUtils::Panic(TInt aReason)
+    {
+    _LIT(KPanic, "LmRefApp bug");
+    User::Panic(KPanic, aReason);
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void LandmarksUtils::ErrorNoteL( const TDesC& aErrorText )
+    {
+    CAknErrorNote* errorNote = new (ELeave) CAknErrorNote( ETrue );
+    errorNote->ExecuteLD( aErrorText );
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void LandmarksUtils::InfoNoteL( const TDesC& aInfoText )
+    {
+    CAknInformationNote* infoNote = new (ELeave) CAknInformationNote( ETrue );
+    infoNote->ExecuteLD( aInfoText );
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationlandmarksrefappfors60/Src/LandmarksView.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,237 @@
+/*
+* Copyright (c) 2004-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:  
+*       Implements the CLandmarksView class
+*
+*/
+
+
+
+#include <eikmenup.h>
+#include <aknViewAppUi.h>
+#include <aknnavide.h>
+
+#include <lbspositioninfo.h>
+#include <epos_poslandmarkserialization.h>
+
+#include <lmrefapp.rsg>
+#include "LmRefApp.hrh"
+#include "LandmarksView.h"
+#include "LandmarksAppUi.h"
+#include "LandmarksApplicationEngine.h"
+#include "LandmarksContainer.h"
+#include "LandmarksEditDialog.h"
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+CLandmarksView::CLandmarksView( 
+    CAknNavigationDecorator* aNaviDecorator,
+    CLandmarksApplicationEngine& aEngine )
+:   iEngine( aEngine ), 
+    iNaviDecorator( aNaviDecorator )
+    {
+    // No implementation required
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksView::ConstructL()
+    {
+    BaseConstructL( R_LMREFAPP_VIEW );
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+CLandmarksView* CLandmarksView::NewLC( 
+    CAknNavigationDecorator* aNaviDecorator,
+    CLandmarksApplicationEngine& aEngine )
+    {
+    CLandmarksView* self = new ( ELeave ) CLandmarksView( 
+        aNaviDecorator, aEngine );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+CLandmarksView::~CLandmarksView()
+    {
+    delete iContainer;
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+TUid CLandmarksView::Id() const
+    {
+    return TUid::Uid( ELandmarksViewId );
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksView::HandleCommandL( TInt aCommand )
+    {
+        {
+        switch ( aCommand )
+            {
+            case ELandmarksAddCurrent:
+                AddLandmarkL( ETrue ); // use current location
+                break;
+
+            case ELandmarksAddBlank:
+                AddLandmarkL( EFalse ); // create blank
+                break;
+
+            case ELandmarksDelete:
+                iContainer->DeleteLandmarkL();
+                break;
+
+            case ELandmarksOpen:
+                {
+                TPckgC<TPosLmItemId> lmId( iContainer->CurrentLandmark() );
+                
+                AppUi()->ActivateLocalViewL( 
+                    TUid::Uid( ELandmarksInfoViewId ),
+                    TUid::Uid( ELandmarksViewInfoById ),
+                    lmId );
+                break;
+                }
+
+            default:
+                AppUi()->HandleCommandL( aCommand );
+                break;
+            }
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksView::DoActivateL( 
+    const TVwsViewId& /*aPrevViewId*/,
+    TUid /*aCustomMessageId*/,
+    const TDesC8& /*aCustomMessage*/ )
+    {
+    if ( !iContainer )
+        {
+        iContainer = new ( ELeave ) CLandmarksContainer( 
+            *this, iEngine, iNaviDecorator );
+        iContainer->SetMopParent( this );
+	    iContainer->ConstructL( ClientRect() );
+        }
+   
+    // Enable receiving of keyboard events.
+    AppUi()->AddToStackL( *this, iContainer );
+
+    // Make view visible.
+    iContainer->MakeVisible( ETrue );
+
+    // Notify that this view is active
+    iEngine.NotifyViewActivated( Id(), ETrue );
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksView::DoDeactivate()
+    {
+    // Hide view.
+    iContainer->MakeVisible( EFalse );
+
+    // Notify that this view is inactive
+    iEngine.NotifyViewActivated( Id(), EFalse );
+
+    // Disable receiving keyboard events.
+    AppUi()->RemoveFromStack( iContainer );
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksView::HandleResourceChange( TInt aType )
+    {
+    if ( iContainer )
+        {
+        iContainer->HandleResourceChange( aType );
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksView::DynInitMenuPaneL( 
+    TInt aResourceId,
+    CEikMenuPane* aMenuPane )
+    {
+        {
+        if ( aResourceId == R_LMREFAPP_MENU )
+            {
+            // If no landmark is selected we need to hide some command options.
+            TBool isListEmpty  = !iContainer->IsItemSelected();
+            aMenuPane->SetItemDimmed( ELandmarksDelete, isListEmpty );
+            aMenuPane->SetItemDimmed( ELandmarksOpen, isListEmpty );
+            }
+        }
+
+    CAknView::DynInitMenuPaneL( aResourceId, aMenuPane );
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CLandmarksView::AddLandmarkL( TBool aUseCurrentLocation )
+    {
+    // Create new landmark
+    CPosLandmark* newLandmark = CPosLandmark::NewLC();
+
+    if ( EditNewLandmarkL( *newLandmark, aUseCurrentLocation ) )
+        {
+        iEngine.AddLandmarkL( *newLandmark );
+        }
+
+    CleanupStack::PopAndDestroy( newLandmark );
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+TBool CLandmarksView::EditNewLandmarkL( CPosLandmark& aLandmark, TBool aFetchCurrentLocation )
+    {
+    // Create edit dialog
+    TBool isEdited( EFalse );
+    CLandmarksEditDialog* editDialog = CLandmarksEditDialog::NewLC( 
+        aLandmark, aFetchCurrentLocation, isEdited, iEngine );
+
+    // Remove tabs from this view
+    iNaviDecorator->MakeVisible( EFalse );
+
+    // Dialog must not leave without restoring tab group. Must be trapped.
+    TRAPD( err, editDialog->ExecuteLD( R_LMREFAPP_EDIT_DIALOG ) );
+
+    // Restore tabs to this view
+    iNaviDecorator->MakeVisible( ETrue );
+
+    User::LeaveIfError( err );
+    CleanupStack::Pop( editDialog );
+    return isEdited;
+    }
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationlandmarksrefappfors60/gfx/qgn_menu_lmrefappfors60.svg	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,56 @@
+<?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" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="100%" height="100%" viewBox="0 0 88 87.999">
+<g>
+<g>
+<g>
+<g>
+<rect fill="none" width="88" height="87.999"/>
+</g>
+</g>
+<g>
+<linearGradient id="XMLID_7_" gradientUnits="userSpaceOnUse" x1="12.3042" y1="18.3799" x2="63.4113" y2="79.287">
+<stop offset="0" style="stop-color:#B3DDFF"/>
+<stop offset="0.8146" style="stop-color:#084296"/>
+<stop offset="1" style="stop-color:#084296"/>
+</linearGradient>
+<path fill="url(#XMLID_7_)" d="M32.135,7.415L14.363,17.432v23.167c0,0,8.926,15.351,10.468,18.001       c-2.386,1.704-15.44,11.03-15.44,11.03l21.613,12.652c0,0,12.907-9.85,14.71-11.226c1.979,1.109,16.231,9.101,16.231,9.101       l16.664-15.132c0,0-14.066-6.929-16.888-8.318c1.467-3.01,10.531-21.604,10.531-21.604l-22.298-9.59       c0,0-1.486,3.173-2.093,4.467c-2.046-0.88-6.573-2.826-6.573-2.826s-3.713,2.463-5.696,3.778       c-0.327-0.744-0.542-1.233-0.657-1.495c0.007-0.824,0.213-23.72,0.213-23.72L32.135,7.415z"/>
+<linearGradient id="XMLID_8_" gradientUnits="userSpaceOnUse" x1="40.8276" y1="52.1914" x2="16.1997" y2="21.1353">
+<stop offset="0" style="stop-color:#5AA7E0"/>
+<stop offset="1" style="stop-color:#3366CC"/>
+</linearGradient>
+<polygon fill="url(#XMLID_8_)" points="59.051,57.621 69.536,36.111 50.944,28.115 48.852,32.581 41.493,29.418 34.719,33.911        32.932,29.849 33.117,9.157 16.363,18.601 16.363,40.06 27.476,59.169 13.064,69.463 30.856,79.879 45.546,68.669        61.667,77.708 75.089,65.521 "/>
+<linearGradient id="XMLID_9_" gradientUnits="userSpaceOnUse" x1="60.585" y1="31.876" x2="53.8582" y2="45.1125">
+<stop offset="0" style="stop-color:#5AA7E0"/>
+<stop offset="1" style="stop-color:#3366CC"/>
+</linearGradient>
+<polygon fill="url(#XMLID_9_)" points="41.26,48.783 50.944,28.115 69.536,36.111 59.051,57.621 "/>
+<polygon fill="#0046B7" points="16.363,40.06 27.476,59.169 41.26,48.783 32.932,29.849 "/>
+<polygon fill="#3366CC" points="16.363,40.06 16.363,18.601 33.117,9.157 32.932,29.849 "/>
+<polygon fill="#CFECFF" points="26.696,39.23 41.493,29.418 59.523,37.168 45.546,47.954 "/>
+<path fill="#5AA7E0" d="M41.954,55.286"/>
+<polygon fill="#3366CC" points="26.696,39.23 27.476,59.169 45.546,68.669 45.546,47.954 "/>
+<polygon fill="#5AA7E0" points="13.064,69.463 27.476,59.169 45.546,68.669 30.856,79.879 "/>
+<linearGradient id="XMLID_10_" gradientUnits="userSpaceOnUse" x1="29.2085" y1="63.6836" x2="48.7102" y2="56.1976">
+<stop offset="0" style="stop-color:#5AA7E0"/>
+<stop offset="0.0056" style="stop-color:#5AA7E0"/>
+<stop offset="0.85" style="stop-color:#3366CC"/>
+<stop offset="1" style="stop-color:#3366CC"/>
+</linearGradient>
+<polygon fill="url(#XMLID_10_)" points="43.423,46.971 27.476,59.169 45.546,68.669 45.546,47.954 "/>
+<polygon fill="#0046B7" points="45.546,47.954 45.546,68.669 59.051,57.621 59.523,37.168 "/>
+<linearGradient id="XMLID_11_" gradientUnits="userSpaceOnUse" x1="45.3936" y1="59.5186" x2="59.0508" y2="59.5186">
+<stop offset="0" style="stop-color:#0046B7"/>
+<stop offset="1" style="stop-color:#3366CC"/>
+</linearGradient>
+<polygon fill="url(#XMLID_11_)" points="45.394,50.368 45.546,68.669 59.051,57.621 "/>
+<linearGradient id="XMLID_12_" gradientUnits="userSpaceOnUse" x1="60.8945" y1="68.6807" x2="57.2953" y2="58.792">
+<stop offset="0" style="stop-color:#5AA7E0"/>
+<stop offset="0.4101" style="stop-color:#5AA7E0"/>
+<stop offset="1" style="stop-color:#3366CC"/>
+</linearGradient>
+<polygon fill="url(#XMLID_12_)" points="61.667,77.708 45.546,68.669 59.051,57.621 75.089,65.521 "/>
+</g>
+</g>
+</g>
+</svg>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationlandmarksrefappfors60/group/LmRefApp.mmp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,100 @@
+/*
+* 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:  Defines the components forming the Landmarks Reference Application.
+*
+*/
+
+#include <platform_paths.hrh>
+
+TARGET              lmrefapp.exe
+TARGETTYPE          exe
+EPOCSTACKSIZE       0x5000
+UID                 0x100039CE 0xA0000187
+
+VENDORID            0
+CAPABILITY          Location ReadUserData WriteUserData
+
+SOURCEPATH          ../Src
+
+// Application mandatory classes
+SOURCE              Landmarks.cpp
+SOURCE              LandmarksApplication.cpp
+SOURCE              LandmarksAppUi.cpp
+SOURCE              LandmarksDocument.cpp
+
+// View classes
+SOURCE              LandmarksView.cpp
+SOURCE              LandmarksContainerBase.cpp
+SOURCE              LandmarksContainer.cpp
+SOURCE              LandmarksModel.cpp
+SOURCE              LandmarksCategoriesView.cpp
+SOURCE              LandmarksCategoriesContainer.cpp
+SOURCE              LandmarksCategoriesModel.cpp
+SOURCE              LandmarksInfoView.cpp
+SOURCE              LandmarksInfoContainer.cpp
+SOURCE              LandmarksInfoModel.cpp
+
+// Engine component classes
+SOURCE              LandmarksApplicationEngine.cpp
+SOURCE              LandmarksEngineBase.cpp
+SOURCE              LandmarksEngine.cpp
+SOURCE              LandmarksCategoriesEngine.cpp
+SOURCE              LandmarksLmOpWrapper.cpp
+SOURCE              LandmarksDbEventHandler.cpp
+
+// Other components
+SOURCE              LandmarksEditDialog.cpp
+SOURCE              LandmarksCategoriesDialog.cpp
+SOURCE              LandmarksLmCategoriesModel.cpp
+SOURCE              LandmarksListBox.cpp
+SOURCE              LandmarksListBoxModel.cpp
+SOURCE              LandmarksPositionRequest.cpp
+SOURCE              LandmarksUtils.cpp
+
+USERINCLUDE         ../Inc
+MW_LAYER_SYSTEMINCLUDE
+
+LIBRARY             euser.lib
+LIBRARY             efsrv.lib
+LIBRARY             estor.lib
+LIBRARY             cone.lib
+LIBRARY             apparc.lib
+LIBRARY             bafl.lib
+LIBRARY             eikcore.lib
+LIBRARY             eikcoctl.lib
+LIBRARY             eikctl.lib
+LIBRARY             eikdlg.lib
+LIBRARY             egul.lib
+
+LIBRARY             avkon.lib
+LIBRARY             aknskins.lib
+
+LIBRARY             eposlandmarks.lib
+LIBRARY             eposlmsearchlib.lib
+LIBRARY             lbs.lib
+
+START RESOURCE      ../Data/LmRefApp.rss
+HEADER
+TARGETPATH /resource/apps
+END
+
+
+START RESOURCE      ../Data/LmRefApp_reg.rss
+DEPENDS lmrefapp.rsg
+#ifdef WINSCW
+TARGETPATH           /private/10003a3f/apps
+#else
+TARGETPATH           /private/10003a3f/import/apps
+#endif
+END
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationlandmarksrefappfors60/group/bld.inf	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,38 @@
+/*
+* Copyright (c) 2004-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:  Input file for bldmake bldfiles command
+*
+*/
+
+PRJ_PLATFORMS
+DEFAULT ARMV5
+
+PRJ_MMPFILES
+LmRefApp.mmp
+
+PRJ_EXTENSIONS
+
+START EXTENSION s60/mifconv
+OPTION TARGETFILE lmrefappfors60_icon.mif
+OPTION SOURCEDIR ../gfx
+OPTION SOURCES -c32 qgn_menu_lmrefappfors60.svg
+END
+
+
+START EXTENSION s60/mifconv
+OPTION TARGETFILE lmrefapp.mbm
+OPTION HEADERFILE lmrefapp.mbg
+OPTION SOURCEDIR ../data
+OPTION SOURCES -c8,8  category_global.bmp -c8,8 category_user.bmp -c8,8 default_lm.bmp
+END
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationlandmarksrefappfors60/group/icons_bitmaps_dc.miflist	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,4 @@
+/c8,8  ..\data\category_global.bmp
+/c8,8  ..\data\category_user.bmp
+/c8,8  ..\data\default_lm.bmp
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationlandmarksrefappfors60/group/lmrefapp_icons_bitmaps_dc.mk	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,53 @@
+#
+# Copyright (c) 2004-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:  Makefile to generate list item icons
+#
+
+ifeq (WINS,$(findstring WINS, $(PLATFORM)))
+ZDIR=$(EPOCROOT)epoc32\release\$(PLATFORM)\$(CFG)\z
+else
+ZDIR=$(EPOCROOT)epoc32\data\z
+endif
+
+TARGETDIR=$(ZDIR)\resource\apps
+ICONTARGETFILENAME=$(TARGETDIR)\lmrefapp.mbm
+
+HEADERDIR=$(EPOCROOT)epoc32\include
+HEADERFILENAME=$(HEADERDIR)\lmrefapp.mbg
+
+do_nothing :
+		@rem do_nothing
+
+MAKMAKE : do_nothing
+
+BLD : do_nothing
+
+CLEAN : do_nothing
+
+LIB : do_nothing
+
+CLEANLIB : do_nothing
+
+RESOURCE :
+		mifconv $(ICONTARGETFILENAME) /h$(HEADERFILENAME) /Ficons_bitmaps_dc.miflist
+
+FREEZE : do_nothing
+
+SAVESPACE : do_nothing
+
+RELEASABLES :
+		@echo $(HEADERFILENAME)&& \
+		@echo $(ICONTARGETFILENAME)
+
+FINAL : do_nothing
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationlandmarksrefappfors60/group/lmrefapp_icons_scalable_dc.mk	Wed Sep 01 12:31:27 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:  Makefile to generate list item icons
+#
+
+ifeq (WINS,$(findstring WINS, $(PLATFORM)))
+ZDIR=$(EPOCROOT)epoc32\release\$(PLATFORM)\$(CFG)\Z
+else
+ZDIR=$(EPOCROOT)epoc32\data\z
+endif
+
+
+TARGETDIR=$(ZDIR)\RESOURCE\APPS
+ICONTARGETFILENAME=$(TARGETDIR)\lmrefappfors60_icon.mif
+
+
+do_nothing :
+	@rem do_nothing
+
+MAKMAKE : do_nothing
+
+BLD : do_nothing
+
+CLEAN : do_nothing
+
+LIB : do_nothing
+
+CLEANLIB : do_nothing
+
+RESOURCE :
+	mifconv $(ICONTARGETFILENAME) \
+		/c32 ..\gfx\qgn_menu_lmrefappfors60.svg
+
+FREEZE : do_nothing
+
+SAVESPACE : do_nothing
+
+RELEASABLES :
+	@echo $(ICONTARGETFILENAME)
+
+FINAL : do_nothing
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationlandmarksrefappfors60/sis/LmRefApp_armv5.pkg	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,40 @@
+;
+; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of "Eclipse Public License v1.0"
+; which accompanies 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 
+;
+&EN
+
+; standard SIS file header
+#{"LmRefApp"},(0xA0000187),1,0,0
+
+; Localised Vendor name
+%{"Vendor-EN"}
+
+; Unique Vendor name
+:"Vendor"
+
+; Supports S60 v 3.0
+[0x101F7961], 0, 0, 0, {"S60ProductID"}
+
+; Files to install
+"\epoc32\release\armv5\urel\LmRefApp.exe"-"!:\sys\bin\LmRefApp.exe"
+"\epoc32\data\z\resource\apps\LmRefApp.rsc"-"!:\resource\apps\LmRefApp.rsc"
+"\epoc32\data\z\private\10003a3f\import\apps\LmRefApp_reg.rsc"        -"!:\private\10003a3f\import\apps\LmRefApp_reg.rsc"
+"\epoc32\data\z\resource\apps\LmRefApp.mbm"-"!:\resource\apps\LmRefApp.mbm"
+"\epoc32\data\z\resource\apps\LmRefApp.mif"-"!:\resource\apps\LmRefApp.mif"
+"\epoc32\data\z\resource\apps\lmrefappfors60_icon.mif"-"!:\resource\apps\lmrefappfors60_icon.mif"
+
+;required for application to be covered by backup/restore facility
+"backup_registration.xml"-"!:\private\A0000187\backup_registration.xml"
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationlandmarksrefappfors60/sis/LmRefApp_armv5_abiv2.pkg	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,39 @@
+;
+; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of "Eclipse Public License v1.0"
+; which accompanies 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 
+;
+&EN
+
+; standard SIS file header
+#{"LmRefApp"},(0xA0000187),1,0,0
+
+; Localised Vendor name
+%{"Vendor-EN"}
+
+; Unique Vendor name
+:"Vendor"
+
+; Supports S60 v 3.0
+[0x101F7961], 0, 0, 0, {"S60ProductID"}
+
+; Files to install
+"..\..\..\epoc32\release\armv5_abiv2\urel\LmRefApp.exe"                -"!:\sys\bin\LmRefApp.exe"
+"..\..\..\epoc32\data\z\resource\apps\LmRefApp.rsc"                -"!:\resource\apps\LmRefApp.rsc"
+"..\..\..\epoc32\data\z\private\10003a3f\import\apps\LmRefApp_reg.rsc"        -"!:\private\10003a3f\import\apps\LmRefApp_reg.rsc"
+"..\..\..\epoc32\data\z\resource\apps\LmRefApp.mbm"                -"!:\resource\apps\LmRefApp.mbm"
+"..\..\..\epoc32\data\z\resource\apps\LmRefApp.mif"                -"!:\resource\apps\LmRefApp.mif"
+"..\..\..\epoc32\data\z\resource\apps\lmrefappfors60_icon.mif"        -"!:\resource\apps\lmrefappfors60_icon.mif"
+
+;required for application to be covered by backup/restore facility
+"backup_registration.xml"-"!:\private\A0000187\backup_registration.xml"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationlandmarksrefappfors60/sis/LmRefApp_gcce.pkg	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,39 @@
+;
+; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of "Eclipse Public License v1.0"
+; which accompanies 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 
+;
+&EN
+
+; standard SIS file header
+#{"LmRefApp"},(0xA0000187),1,0,0
+
+; Localised Vendor name
+%{"Vendor-EN"}
+
+; Unique Vendor name
+:"Vendor"
+
+; Supports S60 v 3.0
+[0x101F7961], 0, 0, 0, {"S60ProductID"}
+
+;Files to install
+"..\..\..\epoc32\release\gcce\urel\LmRefApp.exe"                -"!:\sys\bin\LmRefApp.exe"
+"..\..\..\epoc32\data\z\resource\apps\LmRefApp.rsc"                -"!:\resource\apps\LmRefApp.rsc"
+"..\..\..\epoc32\data\z\private\10003a3f\import\apps\LmRefApp_reg.rsc"        -"!:\private\10003a3f\import\apps\LmRefApp_reg.rsc"
+"..\..\..\epoc32\data\z\resource\apps\LmRefApp.mbm"                -"!:\resource\apps\LmRefApp.mbm"
+"..\..\..\epoc32\data\z\resource\apps\LmRefApp.mif"                -"!:\resource\apps\LmRefApp.mif"
+"..\..\..\epoc32\data\z\resource\apps\lmrefappfors60_icon.mif"                -"!:\resource\apps\lmrefappfors60_icon.mif"
+
+;required for application to be covered by backup/restore facility
+"backup_registration.xml"-"!:\private\A0000187\backup_registration.xml"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationlandmarksrefappfors60/sis/backup_registration.xml	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,6 @@
+<?xml version="1.0" standalone="yes"?>
+<backup_registration>
+  <system_backup/>
+  <restore requires_reboot = "no"/>
+</backup_registration>
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationlandmarksuirefapp/data/lmuirefapp.rss	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,149 @@
+/*
+* 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:   LandmarksUi Content File -    
+*     This file contains all the resources for the LM UI Ref Application.
+*
+*/
+
+
+
+
+
+
+//  RESOURCE IDENTIFIER
+NAME    AWIZ // 4 letter ID
+
+//  INCLUDES
+#include <eikon.rh>
+#include "lmuirefapp.hrh"
+#include "lmuirefapp.rls"
+#include <avkon.rsg>
+#include <avkon.rh>
+#include <avkon.mbg>
+#include <appinfo.rh>
+
+//RESOURCE DEFINITIONS 
+RESOURCE RSS_SIGNATURE { }
+
+RESOURCE TBUF { buf="LmkUIRefApp"; }
+
+RESOURCE EIK_APP_INFO
+    {
+    }
+        
+RESOURCE LOCALISABLE_APP_INFO r_lmuirefapp_localisable_app_info
+		{
+		short_caption =  qtn_lmuirefapp_title;
+		caption_and_icon = CAPTION_AND_ICON_INFO
+		        {
+		        caption = qtn_lmuirefapp_title;
+		number_of_icons = 1;
+			icon_file = 
+		        "\\resource\\apps\\lmuirefapp_icon.mif";
+		        };
+		}            
+
+//----------------------------------------------------
+//
+//    r_lmuirefapp_view
+//    By landmark view
+//
+//----------------------------------------------------
+//
+RESOURCE AVKON_VIEW r_lmuirefapp_view 
+    {
+    menubar = r_lmuirefapp_menubar;
+    cba = R_AVKON_SOFTKEYS_OPTIONS_EXIT;
+    }
+
+//----------------------------------------------------
+//
+//    r_lmk_bylm_menubar
+//
+//----------------------------------------------------
+//
+RESOURCE MENU_BAR r_lmuirefapp_menubar 
+    {
+    titles=
+        {
+        MENU_TITLE { menu_pane = r_lmuirefapp_menu1; txt = ""; }
+        };
+    }
+
+RESOURCE MENU_PANE r_lmuirefapp_menu1
+{
+items=
+{
+	MENU_ITEM { command = ELmUiRefAppCmdNewLm;
+	                                txt = "New landmark";
+	                          },
+	MENU_ITEM { command = ELmUiRefAppCmdEditLm;
+	                                txt = "Edit landmark";
+	                          },
+	MENU_ITEM { command = ELmUiRefAppCmdViewLm;
+	                                txt = "View landmark";
+	                          },
+	MENU_ITEM { command = ELmUiRefAppCmdDeleteLm;
+	                                txt = "Delete landmark";
+	                          },	
+  MENU_ITEM { command = ELmUiRefAppCmdSingleCatSelector;
+													        txt = "Show single category selector";
+  													},
+	MENU_ITEM { command = ELmUiRefAppCmdMultiLmSelector;
+	                                txt = "Show multiple landmark selector";
+	                          },
+	MENU_ITEM { command = ELmUiRefAppCmdMultiCatSelector;
+	                                txt = "Show multiple category selector"; 
+	                          }	    	    
+	};
+}
+    
+//----------------------------------------------------
+//   
+//    r_lm_delete_landmark
+//    Text for confirmation query
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_lmuirefapp_delete_landmark
+    {
+    buf = qtn_lmuirefapp_conf_delete_landmark;
+    }
+
+//----------------------------------------------------
+//   
+//    r_lmuirefapp_query
+//    
+//
+//----------------------------------------------------
+//
+RESOURCE DIALOG r_lmuirefapp_query
+	{
+	flags = EGeneralQueryFlags;
+	buttons = R_AVKON_SOFTKEYS_YES_NO;
+	items = 
+		{
+		DLG_LINE
+			{
+			type = EAknCtQuery;
+			id = EGeneralQuery;
+			control = AVKON_CONFIRMATION_QUERY
+				{
+				layout = EConfirmationQueryLayout;
+				};
+			}
+		};
+	}
+ 
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationlandmarksuirefapp/data/lmuirefapp_reg.rss	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,48 @@
+/*
+* 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:   LandmarksUi Content File -    
+*     This file contains Application registration info of Ref Application.
+*
+*/
+
+
+
+
+
+
+#include <appinfo.rh>
+#include <lmuirefapp.rsg>
+#include "LmUiRefAppUID.h" 
+
+UID2 KUidAppRegistrationResourceFile
+UID3 KLmUiRefAppUID3 
+
+RESOURCE APP_REGISTRATION_INFO
+    {
+    app_file = "LmUiRefApp"; 
+    localisable_resource_file = "\\resource\\apps\\lmuirefapp";
+    localisable_resource_id = R_LMUIREFAPP_LOCALISABLE_APP_INFO;
+    }
+
+// End of File
+
+
+
+
+
+
+
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationlandmarksuirefapp/gfx/qgn_menu_lluirefapp.svg	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,56 @@
+<?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" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="100%" height="100%" viewBox="0 0 88 87.999">
+<g>
+<g>
+<g>
+<g>
+<rect fill="none" width="88" height="87.999"/>
+</g>
+</g>
+<g>
+<linearGradient id="XMLID_7_" gradientUnits="userSpaceOnUse" x1="12.3042" y1="18.3799" x2="63.4113" y2="79.287">
+<stop offset="0" style="stop-color:#B3DDFF"/>
+<stop offset="0.8146" style="stop-color:#084296"/>
+<stop offset="1" style="stop-color:#084296"/>
+</linearGradient>
+<path fill="url(#XMLID_7_)" d="M32.135,7.415L14.363,17.432v23.167c0,0,8.926,15.351,10.468,18.001       c-2.386,1.704-15.44,11.03-15.44,11.03l21.613,12.652c0,0,12.907-9.85,14.71-11.226c1.979,1.109,16.231,9.101,16.231,9.101       l16.664-15.132c0,0-14.066-6.929-16.888-8.318c1.467-3.01,10.531-21.604,10.531-21.604l-22.298-9.59       c0,0-1.486,3.173-2.093,4.467c-2.046-0.88-6.573-2.826-6.573-2.826s-3.713,2.463-5.696,3.778       c-0.327-0.744-0.542-1.233-0.657-1.495c0.007-0.824,0.213-23.72,0.213-23.72L32.135,7.415z"/>
+<linearGradient id="XMLID_8_" gradientUnits="userSpaceOnUse" x1="40.8276" y1="52.1914" x2="16.1997" y2="21.1353">
+<stop offset="0" style="stop-color:#5AA7E0"/>
+<stop offset="1" style="stop-color:#3366CC"/>
+</linearGradient>
+<polygon fill="url(#XMLID_8_)" points="59.051,57.621 69.536,36.111 50.944,28.115 48.852,32.581 41.493,29.418 34.719,33.911        32.932,29.849 33.117,9.157 16.363,18.601 16.363,40.06 27.476,59.169 13.064,69.463 30.856,79.879 45.546,68.669        61.667,77.708 75.089,65.521 "/>
+<linearGradient id="XMLID_9_" gradientUnits="userSpaceOnUse" x1="60.585" y1="31.876" x2="53.8582" y2="45.1125">
+<stop offset="0" style="stop-color:#5AA7E0"/>
+<stop offset="1" style="stop-color:#3366CC"/>
+</linearGradient>
+<polygon fill="url(#XMLID_9_)" points="41.26,48.783 50.944,28.115 69.536,36.111 59.051,57.621 "/>
+<polygon fill="#0046B7" points="16.363,40.06 27.476,59.169 41.26,48.783 32.932,29.849 "/>
+<polygon fill="#3366CC" points="16.363,40.06 16.363,18.601 33.117,9.157 32.932,29.849 "/>
+<polygon fill="#CFECFF" points="26.696,39.23 41.493,29.418 59.523,37.168 45.546,47.954 "/>
+<path fill="#5AA7E0" d="M41.954,55.286"/>
+<polygon fill="#3366CC" points="26.696,39.23 27.476,59.169 45.546,68.669 45.546,47.954 "/>
+<polygon fill="#5AA7E0" points="13.064,69.463 27.476,59.169 45.546,68.669 30.856,79.879 "/>
+<linearGradient id="XMLID_10_" gradientUnits="userSpaceOnUse" x1="29.2085" y1="63.6836" x2="48.7102" y2="56.1976">
+<stop offset="0" style="stop-color:#5AA7E0"/>
+<stop offset="0.0056" style="stop-color:#5AA7E0"/>
+<stop offset="0.85" style="stop-color:#3366CC"/>
+<stop offset="1" style="stop-color:#3366CC"/>
+</linearGradient>
+<polygon fill="url(#XMLID_10_)" points="43.423,46.971 27.476,59.169 45.546,68.669 45.546,47.954 "/>
+<polygon fill="#0046B7" points="45.546,47.954 45.546,68.669 59.051,57.621 59.523,37.168 "/>
+<linearGradient id="XMLID_11_" gradientUnits="userSpaceOnUse" x1="45.3936" y1="59.5186" x2="59.0508" y2="59.5186">
+<stop offset="0" style="stop-color:#0046B7"/>
+<stop offset="1" style="stop-color:#3366CC"/>
+</linearGradient>
+<polygon fill="url(#XMLID_11_)" points="45.394,50.368 45.546,68.669 59.051,57.621 "/>
+<linearGradient id="XMLID_12_" gradientUnits="userSpaceOnUse" x1="60.8945" y1="68.6807" x2="57.2953" y2="58.792">
+<stop offset="0" style="stop-color:#5AA7E0"/>
+<stop offset="0.4101" style="stop-color:#5AA7E0"/>
+<stop offset="1" style="stop-color:#3366CC"/>
+</linearGradient>
+<polygon fill="url(#XMLID_12_)" points="61.667,77.708 45.546,68.669 59.051,57.621 75.089,65.521 "/>
+</g>
+</g>
+</g>
+</svg>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationlandmarksuirefapp/group/LmUiRefAppUID.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,37 @@
+/*
+* 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:   LandmarksUi Content File -     Common header for UIDs of Landmarks UI Reference App.
+*
+*/
+
+
+
+
+
+
+#ifndef LMUIREFAPPKUID_H
+#define LMUIREFAPPKUID_H
+
+//
+// Common system UIDs
+//
+#define KAppUID2 0x100039CE
+
+// Ref application UID
+
+// CONSTANTS
+// UID of the application
+#define  KLmUiRefAppUID3 0xA0000188
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationlandmarksuirefapp/group/bld.inf	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,59 @@
+/*
+* 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:   LandmarksUi Content File -    
+*        This file provides the information required for building the
+*    whole of a location application.
+*
+*/
+
+
+
+
+
+
+
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_EXPORTS
+
+PRJ_MMPFILES
+lmuirefapp.mmp
+
+
+PRJ_TESTMMPFILES
+
+PRJ_EXTENSIONS
+START EXTENSION s60/mifconv
+OPTION TARGETFILE lmuirefapp_icon.mif
+OPTION SOURCEDIR ../gfx
+OPTION SOURCES -c32 qgn_menu_lluirefapp.svg
+END
+
+//  End of File
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationlandmarksuirefapp/group/lmuirefapp.mmp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,70 @@
+/*
+* 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:   LandmarksUi Content File -    
+*     This is the project specification file for Landamrsk UI Reference Application.
+*
+*/
+
+
+
+
+
+#include <platform_paths.hrh>
+#include "LmUiRefAppUID.h"
+
+TARGET  LmUiRefApp.exe
+TARGETTYPE exe 
+UID 0x0 KLmUiRefAppUID3 
+
+EPOCSTACKSIZE 0x5000
+CAPABILITY NetworkServices Location ReadUserData WriteUserData LocalServices
+
+
+VENDORID    0
+
+USERINCLUDE . ../inc
+APP_LAYER_SYSTEMINCLUDE
+
+
+SOURCEPATH ../src
+SOURCE  LmUiRefApp.cpp 
+SOURCE  LmUiRefAppUi.cpp
+SOURCE  LmUiRefAppDocument.cpp
+SOURCE  LmUiRefAppContainer.cpp
+SOURCE  LmUiRefAppView.cpp
+
+// UI Resources
+START RESOURCE ../data/lmuirefapp.rss
+HEADER
+TARGETPATH resource/apps
+LANG     SC
+END
+
+// Application registration info for installer
+START RESOURCE ../data/lmuirefapp_reg.rss
+DEPENDS lmuirefapp.rsg
+#ifdef WINSCW
+TARGETPATH 	  /private/10003a3f/apps
+#else
+TARGETPATH 	  /private/10003a3f/import/apps
+#endif
+END
+
+
+LIBRARY eposlandmarks.lib
+LIBRARY euser.lib apparc.lib cone.lib eikcore.lib
+LIBRARY eikcoctl.lib avkon.lib
+LIBRARY LmkCommonUi.lib
+LIBRARY CommonEngine.lib
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationlandmarksuirefapp/inc/LmUiRefApp.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,59 @@
+/*
+* 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:   LandmarksUi Content File -
+*     Declares main application class.
+*
+*/
+
+
+
+
+
+
+#ifndef LMUIREFAPP_H
+#define LMUIREFAPP_H
+
+// INCLUDES
+#include <aknapp.h>
+
+// CLASS DECLARATION
+
+/**
+* LmUiRefApp application class.
+* Provides factory to create concrete document object.
+*
+*/
+class CLmUiRefApp : public CAknApplication
+    {
+
+    public: // Functions from base classes
+    private:
+
+        /**
+        * From CApaApplication, creates CLmUiRefAppDocument document object.
+        * @return A pointer to the created document object.
+        */
+        CApaDocument* CreateDocumentL();
+
+        /**
+        * From CApaApplication, returns application's UID (KUidLmUiRefApp).
+        * @return The value of KUidLmUiRefApp.
+        */
+        TUid AppDllUid() const;
+    };
+
+#endif
+
+// End of File
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationlandmarksuirefapp/inc/LmUiRefAppContainer.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,102 @@
+/*
+* 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:   LandmarksUi Content File -
+*     Declares container control class for application.
+*
+*/
+
+
+
+
+
+
+#ifndef CLMUIREFAPPCONTAINER_H
+#define CLMUIREFAPPCONTAINER_H
+
+// INCLUDES
+#include <coecntrl.h>
+
+// FORWARD DECLARATIONS
+
+// CLASS DECLARATION
+
+/**
+*  CLmUiRefAppContainer container control class.
+*
+*/
+class CLmUiRefAppContainer: public CCoeControl
+    {
+    public: // Constructors and destructor
+
+
+         /* Two-phased constructor
+         * @param aKeyProcessor
+         * @param aParent
+         * @param aRect A rectangle for drawing.
+         * @return The newly created object.
+         */
+         static CLmUiRefAppContainer* NewL(MObjectProvider* aParent,
+		                           const TRect& aRect );
+
+        /**
+        * Destructor.
+        */
+        ~CLmUiRefAppContainer();
+
+    public: // New functions
+
+
+    public: // Functions from base classes
+
+	void Draw(const TRect& /*aRect*/) const;
+
+    private: // Functions from base classes
+
+       /**
+        * From CoeControl,SizeChanged.
+        */
+        void SizeChanged();
+
+       /**
+        * From CoeControl,CountComponentControls.
+        */
+        TInt CountComponentControls() const;
+
+       /**
+        * From CCoeControl,ComponentControl.
+        */
+        CCoeControl* ComponentControl(TInt aIndex) const;
+
+
+       private:
+        /**
+        * C++ default constructor.
+        * @param aKeyProcessor
+        * @return newly instantiated object
+        */
+        CLmUiRefAppContainer();
+
+        void ConstructL(const TRect& aRect);
+
+
+    private: //data
+
+        CEikLabel* iLabel;          // example label
+        CEikLabel* iToDoLabel;      // example label
+
+    };
+
+#endif
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationlandmarksuirefapp/inc/LmUiRefAppDocument.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,92 @@
+/*
+* 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:   LandmarksUi Content File -
+*     Declares document for application.
+*
+*/
+
+
+
+
+
+
+#ifndef LMUIREFAPPDOCUMENT_H
+#define LMUIREFAPPDOCUMENT_H
+
+// INCLUDES
+#include <AknDoc.h>
+#include <EPos_Landmarks.h>
+
+// CONSTANTS
+
+// FORWARD DECLARATIONS
+class  CEikAppUi;
+
+class CPosLandmarkDatabase;
+
+// CLASS DECLARATION
+
+/**
+*  CLmUiRefAppDocument application class.
+*/
+class CLmUiRefAppDocument: public CAknDocument
+    {
+    public: // Constructors and destructor
+        /**
+        * Two-phased constructor.
+        */
+        static CLmUiRefAppDocument* NewL(CEikApplication& aApp);
+
+        /**
+        * Destructor.
+        */
+        virtual ~CLmUiRefAppDocument();
+
+    public: // New functions
+
+       /**
+        * Returns a reference to landmarks database.
+        * @return database reference, not initialized necessarily
+        */
+    CPosLandmarkDatabase& LmDb() const;
+
+    protected:  // New functions
+
+    protected:  // Functions from base classes
+
+    private:
+
+        /**
+        * EPOC default constructor.
+        */
+         CLmUiRefAppDocument(CEikApplication& aApp);
+        void ConstructL();
+
+    private:
+
+        /**
+        * From CEikDocument, create LmUiRefAppUi "App UI" object.
+        */
+        CEikAppUi* CreateAppUiL();
+
+    private: //Data
+    	///Own:
+
+    	CPosLandmarkDatabase* iDb;
+    };
+
+#endif
+
+// End of File
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationlandmarksuirefapp/inc/LmUiRefAppUi.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,106 @@
+/*
+* 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:   LandmarksUi Content File -
+*     Declares UI class for application.
+*
+*/
+
+
+
+
+
+
+#ifndef LMUIREFAPPUI_H
+#define LMUIREFAPPUI_H
+
+// INCLUDES
+#include <eikapp.h>
+#include <eikdoc.h>
+#include <e32std.h>
+#include <coeccntx.h>
+#include <aknappui.h>
+#include <aknViewAppUi.h>
+
+#include <EPos_Landmarks.h>
+
+// FORWARD DECLARATIONS
+class CLmkLandmarkSelectorDlg;
+class CLmUiRefAppDocument;
+
+// CONSTANTS
+//const ?type ?constant_var = ?constant;
+
+
+// CLASS DECLARATION
+
+/**
+* Application UI class.
+* Provides support for the following features:
+* - EIKON control architecture
+*
+*/
+class CLmUiRefAppUi : public CAknViewAppUi
+    {
+    public: // // Constructors and destructor
+
+        /**
+        * EPOC default constructor.
+        */
+        void ConstructL();
+
+        /**
+        * Destructor.
+        */
+        ~CLmUiRefAppUi();
+
+    public: // New functions
+
+
+       /**
+        *Return reference to document
+        * @return reference to CLmkDocument
+        */
+
+
+        CLmUiRefAppDocument& Document() const;
+
+    public: // Functions from base classes
+
+    private:
+        // From MEikMenuObserver
+        void DynInitMenuPaneL(TInt aResourceId,CEikMenuPane* aMenuPane);
+
+    private:
+        /**
+        * From CEikAppUi, takes care of command handling.
+        * @param aCommand command to be handled
+        */
+        void HandleCommandL(TInt aCommand);
+
+        /**
+        * From CEikAppUi, handles key events.
+        * @param aKeyEvent Event to handled.
+        * @param aType Type of the key event.
+        * @return Response code (EKeyWasConsumed, EKeyWasNotConsumed).
+        */
+        virtual TKeyResponse HandleKeyEventL(
+            const TKeyEvent& aKeyEvent,TEventCode aType);
+
+    private: //Data
+
+    };
+
+#endif
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationlandmarksuirefapp/inc/LmUiRefAppView.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,123 @@
+/*
+* 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:   LandmarksUi Content File -
+*     Declares UI class for application.
+*
+*/
+
+
+
+
+
+
+#ifndef LMUIREFAPPVIEW
+#define LMUIREFAPPVIEW_H
+
+// INCLUDES
+#include <eikapp.h>
+#include <eikdoc.h>
+#include <e32std.h>
+#include <coeccntx.h>
+#include <aknappui.h>
+#include <aknViewAppUi.h>
+#include <aknview.h>
+
+// FORWARD DECLARATIONS
+
+class CLmkLandmarkSelectorDlg;
+class CLmkCategorySelectorDlg;
+class CLmUiRefAppContainer;
+class CPosLandmark;
+class CPosLandmarkDatabase;
+// CLASS DECLARATION
+
+/**
+*  CLmUiRefAppview class.
+*
+*/
+class CLmUiRefAppView : public CAknView
+    {
+    public: // Constructors and destructor
+        /**
+        * C++ default constructor.
+        * @param aKeyProcessor
+        * @param aLmkSender
+        * @return created CLmkByLmView object
+        */
+        static CLmUiRefAppView* NewLC();
+
+        /**
+        * Destructor.
+        */
+        ~CLmUiRefAppView();
+
+    private: // constructor
+        /**
+        * C++ constructor
+        * @return newly instantiated object
+        */
+        CLmUiRefAppView();
+
+        /**
+        * By default Symbian 2nd phase constructor is private.
+        */
+        void ConstructL();
+
+        // New Functions added
+        void NewLmCmdL();
+        void ExecuteLmEditorL(CPosLandmark* aLandmark, CPosLandmarkDatabase& aDb);
+
+	public: // New Funcs
+        CAknViewAppUi* ViewAppUi();
+        TPosLmItemId SelectedItem() const;
+        TInt LaunchLandmarksDialogL();
+
+        // Multiple Landmarks Selector dialog
+        TInt LaunchMultiLandmarkSelectorDialogL();
+
+        // Multiple category selector dialog
+        TInt LaunchMultiCategorySelectorDialogL();
+
+        // Helper method for checking whether the database is empty or not
+		TBool IsLmDbEmptyL();
+
+		// Single category selector dialog
+		TInt LaunchSingleCategoeyDialogL();
+
+    public: // From CAknView
+        TUid Id() const;
+        void HandleCommandL( TInt aCommand );
+
+    private: //From CAknView
+        void DoActivateL( const TVwsViewId& aPrevViewId, TUid aCustomMessageId,
+                          const TDesC8& aCustomMessage );
+        void DoDeactivate();
+
+    protected:  // From MEikMenuObserver
+        void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane );
+
+    private: // Data
+		/// Own: A pointer to container
+		CLmUiRefAppContainer* iContainer;
+		CLmUiRefAppUi* iLmUiRefAppUi;
+		TPosLmItemId  iSelectedItem;
+		CLmkLandmarkSelectorDlg *iLmkSelectDlg;
+        CLmkCategorySelectorDlg *iCategorySelectDlg;
+		CPosLandmarkDatabase* ilDb;
+    };
+
+#endif // CLMKBYLMVIEW_H
+
+// End of File
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationlandmarksuirefapp/inc/lmuirefapp.hrh	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,46 @@
+/*
+* 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 constants/enums definitions.
+*
+*/
+
+
+
+
+
+
+#ifndef S60HELLOWORLD_HRH
+#define S60HELLOWORLD_HRH
+
+
+
+enum TLmUiRefAppViewId
+{
+   ELmUiRefAppView = 1
+};
+
+
+enum TLmUiRefAppCmdId
+{
+   ELmUiRefAppCmdEditLm= 0x6100, // opens for editing
+   ELmUiRefAppCmdNewLm,
+   ELmUiRefAppCmdDeleteLm,
+   ELmUiRefAppCmdViewLm,
+   ELmUiRefAppCmdMultiLmSelector,
+   ELmUiRefAppCmdMultiCatSelector,
+   ELmUiRefAppCmdSingleCatSelector
+};
+
+#endif      // S60HELLOWORLD_HRH
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationlandmarksuirefapp/inc/lmuirefapp.rls	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,45 @@
+/*
+* 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 is a localisation file for LM Ui Reference Application A .loc file
+*      is the one and only place where the logical strings
+*      to be localised are defined. 
+*
+*/
+
+
+
+
+
+
+
+// LOCALISATION STRINGS
+
+
+//d:Defines the application title
+//l:
+//w:
+//r: 3.0
+//
+#define qtn_lmuirefapp_title                 "LmUiRefApp"
+
+
+//d:Confirmation query text when user is about to delete one landmark
+//l:popup_note_window_1
+//w:
+//r: 3.0
+//
+#define qtn_lmuirefapp_conf_delete_landmark		"Delete landmark?"
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationlandmarksuirefapp/sis/LmUiRefApp_ARMV5.pkg	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,41 @@
+;
+; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of "Eclipse Public License v1.0"
+; which accompanies this distribution, and is available
+; at the URL "http://www.eclipse.org/legal/epl-v10.html".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description:   LandmarkUi Content File     
+;
+&EN
+
+; standard SIS header
+#{"LandmarksUi Reference  Application"},(0xA0000188),1,0,24,TYPE=SA
+
+;Localised Vendor name
+%{"Vendor-EN"}
+
+;Unique Vendor name
+:"Vendor"
+
+;
+;Supports S60 3.0
+[0x101F7961], 0, 0, 0, {"S60ProductID"}
+
+;Files to install
+; EXEs
+"..\..\..\..\..\epoc32\release\armv5\urel\LmUiRefApp.exe"-"!:\sys\bin\LmUiRefApp.exe"
+
+; Resource files
+"..\..\..\..\..\epoc32\data\z\resource\apps\lmuirefapp.rsc"			-"!:\resource\apps\lmuirefapp.rsc"
+"..\..\..\..\..\epoc32\data\z\private\10003a3f\import\apps\lmuirefapp_reg.rsc"	-"!:\private\10003a3f\import\apps\lmuirefapp_reg.rsc"
+"..\..\..\..\..\Epoc32\data\z\resource\apps\lluirefapp_icon.mif"		-"!:\resource\apps\lluirefapp_icon.mif"
+
+;required for application to be covered by backup/restore facility 
+"backup_registration.xml"						-"!:\private\A0000188\backup_registration.xml"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationlandmarksuirefapp/sis/LmUiRefApp_ARMV5_abiv2.pkg	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,41 @@
+;
+; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of "Eclipse Public License v1.0"
+; which accompanies this distribution, and is available
+; at the URL "http://www.eclipse.org/legal/epl-v10.html".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description:   LandmarkUi Content File     
+;
+&EN
+
+; standard SIS header
+#{"LandmarksUi Reference  Application"},(0xA0000188),1,0,24,TYPE=SA
+
+;Localised Vendor name
+%{"Vendor-EN"}
+
+;Unique Vendor name
+:"Vendor"
+
+;
+;Supports S60 3.0
+[0x101F7961], 0, 0, 0, {"S60ProductID"}
+
+;Files to install
+; EXEs
+"..\..\..\epoc32\release\armv5_abiv2\urel\LmUiRefApp.exe"-"!:\sys\bin\LmUiRefApp.exe"
+
+; Resource files
+"..\..\..\epoc32\data\z\resource\apps\lmuirefapp.rsc"			-"!:\resource\apps\lmuirefapp.rsc"
+"..\..\..\epoc32\data\z\private\10003a3f\import\apps\lmuirefapp_reg.rsc"	-"!:\private\10003a3f\import\apps\lmuirefapp_reg.rsc"
+"..\..\..\Epoc32\data\z\resource\apps\lluirefapp_icon.mif"		-"!:\resource\apps\lluirefapp_icon.mif"
+
+;required for application to be covered by backup/restore facility 
+"backup_registration.xml"						-"!:\private\A0000188\backup_registration.xml"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationlandmarksuirefapp/sis/LmUiRefApp_GCCE.pkg	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,41 @@
+;
+; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of "Eclipse Public License v1.0"
+; which accompanies this distribution, and is available
+; at the URL "http://www.eclipse.org/legal/epl-v10.html".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description:   LandmarkUi Content File     
+;
+&EN
+
+; standard SIS header
+#{"LandmarksUi Reference  Application"},(0xA0000188),1,0,24,TYPE=SA
+
+;Localised Vendor name
+%{"Vendor-EN"}
+
+;Unique Vendor name
+:"Vendor"
+
+;
+;Supports S60 3.0
+[0x101F7961], 0, 0, 0, {"S60ProductID"}
+
+;Files to install
+; EXEs
+"..\..\..\epoc32\release\gcce\urel\LmUiRefApp.exe"-"!:\sys\bin\LmUiRefApp.exe"
+
+; Resource files
+"..\..\..\epoc32\data\z\resource\apps\lmuirefapp.rsc"			-"!:\resource\apps\lmuirefapp.rsc"
+"..\..\..\epoc32\data\z\private\10003a3f\import\apps\lmuirefapp_reg.rsc"	-"!:\private\10003a3f\import\apps\lmuirefapp_reg.rsc"
+"..\..\..\epoc32\data\z\resource\apps\lluirefapp_icon.mif"		-"!:\resource\apps\lluirefapp_icon.mif"
+
+;required for application to be covered by backup/restore facility 
+"backup_registration.xml"						-"!:\private\A0000188\backup_registration.xml"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationlandmarksuirefapp/sis/backup_registration.xml	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,5 @@
+<?xml version="1.0" standalone="yes"?>
+<backup_registration>
+  <system_backup/>
+  <restore requires_reboot = "no"/>
+</backup_registration>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationlandmarksuirefapp/src/LmUiRefApp.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,64 @@
+/*
+* 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:   LandmarksUi Content File -
+*
+*/
+
+
+
+
+
+
+
+// INCLUDE FILES
+#include <eikstart.h>
+#include "LmUiRefApp.h"
+#include "LmUiRefAppDocument.h"
+#include "LmUiRefAppUID.h"
+
+// ================= MEMBER FUNCTIONS =======================
+
+// ---------------------------------------------------------
+// LmUiRefApp::AppDllUid()
+// Returns application UID
+// ---------------------------------------------------------
+//
+TUid CLmUiRefApp::AppDllUid() const
+    {
+    return  TUid::Uid( KLmUiRefAppUID3 );
+    }
+
+
+// ---------------------------------------------------------
+// LmUiRefApp::CreateDocumentL()
+// Creates LmUiRefApp object
+// ---------------------------------------------------------
+//
+CApaDocument* CLmUiRefApp::CreateDocumentL()
+    {
+    return CLmUiRefAppDocument::NewL( *this );
+    }
+
+LOCAL_C CApaApplication* NewApplication()
+    {
+    return new  CLmUiRefApp;
+    }
+
+GLDEF_C TInt E32Main ()
+    {
+    return EikStart::RunApplication( NewApplication );
+    }
+
+// End of File
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationlandmarksuirefapp/src/LmUiRefAppContainer.cpp	Wed Sep 01 12:31:27 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:   LandmarksUi Content File -
+*
+*/
+
+
+
+
+
+
+
+// INCLUDE FILES
+#include <AknsUtils.h>
+#include <avkon.hrh>
+#include <eiklabel.h>
+#include "LmUiRefAppUi.h"
+#include <lmuirefapp.rsg>
+#include "lmuirefapp.hrh"
+#include "LmUiRefAppView.h"
+#include "LmUiRefAppContainer.h"
+
+_LIT(KLmUiRefApp, "Landmarks UI Reference");
+_LIT(KTextApp, "Application!");
+
+const TInt KLable1X(20);
+const TInt KLable1Y(50);
+const TInt KLable2X(50);
+const TInt KLable2Y(80);
+
+// ================= MEMBER FUNCTIONS =======================
+
+// ----------------------------------------------------------------------------
+// CLmUiRefAppContainer::NewL
+// ----------------------------------------------------------------------------
+//
+CLmUiRefAppContainer* CLmUiRefAppContainer::NewL(
+        MObjectProvider* aParent,
+	const TRect& aRect )
+    {
+    CLmUiRefAppContainer* self =
+    new( ELeave ) CLmUiRefAppContainer();
+    CleanupStack::PushL( self );
+    self->SetMopParent( aParent );
+    self->ConstructL( aRect );
+    CleanupStack::Pop(self ); // self
+    return self;
+    }
+
+// ----------------------------------------------------------------------------
+// CLmUiRefAppContainer::ConstructL
+// ----------------------------------------------------------------------------
+void CLmUiRefAppContainer::ConstructL(const TRect& aRect)
+    {
+    CreateWindowL();
+
+    iLabel = new (ELeave) CEikLabel;
+    iLabel->SetContainerWindowL(*this);
+    iLabel->SetTextL(KLmUiRefApp);
+    iToDoLabel = new (ELeave) CEikLabel;
+    iToDoLabel->SetContainerWindowL( *this );
+    iToDoLabel->SetTextL(KTextApp);
+    SetRect(aRect);
+    ActivateL();
+    }
+
+// ----------------------------------------------------------------------------
+// CLmUiRefAppContainer::CLmUiRefAppContainer()
+// ----------------------------------------------------------------------------
+CLmUiRefAppContainer::CLmUiRefAppContainer()
+    {
+    }
+
+// ----------------------------------------------------------------------------
+// CLmUiRefAppContainer::~CLmUiRefAppContainer()
+// ----------------------------------------------------------------------------
+CLmUiRefAppContainer::~CLmUiRefAppContainer()
+    {
+    delete iLabel;
+    delete iToDoLabel;
+    }
+
+// ---------------------------------------------------------
+// CLmUiRefAppContainer::SizeChanged()
+// Called by framework when the view size is changed
+// ---------------------------------------------------------
+//
+void CLmUiRefAppContainer::SizeChanged()
+    {
+    // TODO: Add here control resize code etc.
+    iLabel->SetExtent(TPoint(KLable1X, KLable1Y), iLabel->MinimumSize());
+    iToDoLabel->SetExtent(TPoint(KLable2X, KLable2Y), iToDoLabel->MinimumSize());
+    }
+
+// ---------------------------------------------------------
+// CLmUiRefAppContainer::CountComponentControls() const
+// return number of controls inside this container
+// ---------------------------------------------------------
+//
+TInt CLmUiRefAppContainer::CountComponentControls() const
+    {
+    return 2; // return nbr of controls inside this container
+    }
+
+// ---------------------------------------------------------
+// CLmUiRefAppContainer::ComponentControl(TInt aIndex) const
+// return control inside the container
+// ---------------------------------------------------------
+//
+CCoeControl* CLmUiRefAppContainer::ComponentControl(TInt aIndex) const
+    {
+    switch ( aIndex )
+        {
+        case 0:
+            return iLabel;
+        case 1:
+            return iToDoLabel;
+        default:
+            return NULL;
+        }
+    }
+
+// ---------------------------------------------------------
+//  CLmUiRefAppContainer::Draw(Trect& aRect)
+// ---------------------------------------------------------
+//
+void CLmUiRefAppContainer::Draw(const TRect& /*aRect*/) const
+    {
+    // Get the standard graphics context
+    CWindowGc& gc = SystemGc();
+    // TODO: Add your drawing code here
+    // example code...
+    gc.SetPenStyle(CGraphicsContext::ENullPen);
+    gc.SetBrushColor(KRgbGray);
+    gc.SetBrushStyle(CGraphicsContext::ESolidBrush);
+    TRect rect = Rect();
+    gc.DrawRect(rect);
+    }
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationlandmarksuirefapp/src/LmUiRefAppDocument.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,105 @@
+/*
+* 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:   LandmarksUi Content File -
+*     Declares document for application.
+*
+*/
+
+
+
+
+
+
+// INCLUDE FILES
+#include "LmUiRefAppDocument.h"
+#include "LmUiRefAppUi.h"
+#include <EPos_CPosLandmarkDatabase.h>
+#include <EPos_Landmarks.h>
+#include <EPos_CPosLmOperation.h>
+
+
+
+// ================= MEMBER FUNCTIONS =======================
+
+// ---------------------------------------------------------------------------
+// CLmUiRefAppDocument::CLmUiRefAppDocument
+// constructor
+// ---------------------------------------------------------------------------
+//
+CLmUiRefAppDocument::CLmUiRefAppDocument(CEikApplication& aApp)
+: CAknDocument(aApp)
+    {
+    }
+
+// ---------------------------------------------------------------------------
+// CLmUiRefAppDocument::~CLmUiRefAppDocument
+// ---------------------------------------------------------------------------
+//
+CLmUiRefAppDocument::~CLmUiRefAppDocument()
+    {
+    delete iDb;
+    }
+
+// ---------------------------------------------------------------------------
+// CLmUiRefAppDocument::ConstructL()
+// ---------------------------------------------------------------------------
+//
+void CLmUiRefAppDocument::ConstructL()
+    {
+    //Open database and initilize it if needed
+    iDb = CPosLandmarkDatabase::OpenL();
+    CPosLmOperation* operation = NULL;
+    if ( iDb->IsInitializingNeeded() )
+        {
+        operation = iDb->InitializeL();
+        operation->ExecuteL();
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// CLmUiRefAppDocument::NewL()
+// ---------------------------------------------------------------------------
+//
+CLmUiRefAppDocument* CLmUiRefAppDocument::NewL(
+        CEikApplication& aApp)
+    {
+    CLmUiRefAppDocument* self = new (ELeave) CLmUiRefAppDocument( aApp );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop();
+
+    return self;
+    }
+
+// ----------------------------------------------------
+// CLmUiRefAppDocument::CreateAppUiL()
+// constructs CLmUiRefAppUi
+// ----------------------------------------------------
+//
+CEikAppUi* CLmUiRefAppDocument::CreateAppUiL()
+    {
+    return new (ELeave) CLmUiRefAppUi;
+    }
+
+// ---------------------------------------------------------------------------
+// CLmUiRefAppDocument::LmDb
+// ---------------------------------------------------------------------------
+//
+CPosLandmarkDatabase& CLmUiRefAppDocument::LmDb() const
+    {
+    return *iDb;
+    }
+
+// End of File
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationlandmarksuirefapp/src/LmUiRefAppUi.cpp	Wed Sep 01 12:31:27 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:   LandmarksUi Content File -
+*
+*/
+
+
+
+
+
+
+
+// INCLUDE FILES
+#include "LmUiRefAppDocument.h"
+#include "LmUiRefAppUi.h"
+#include <lmuirefapp.rsg>
+#include "lmuirefapp.hrh"
+#include <avkon.hrh>
+#include <aknViewAppUi.h>
+#include "LmUiRefAppView.h"
+#include <AknsUtils.h>
+
+
+
+
+// ================= MEMBER FUNCTIONS =======================
+//
+// ----------------------------------------------------------
+// CLmUiRefAppUi::ConstructL()
+// Symbian 2nd phase constructor can leave.
+// ----------------------------------------------------------
+//
+void CLmUiRefAppUi::ConstructL()
+    {
+    //BaseConstructL(EAknEnableSkin);
+    BaseConstructL( EAknEnableSkin | EAknEnableMSK);
+    CLmUiRefAppView* lmView =   CLmUiRefAppView::NewLC();
+    AddViewL(lmView); // Transfer Ownership
+    CleanupStack::Pop();
+    SetDefaultViewL(*lmView);
+    }
+
+// ----------------------------------------------------
+// CLmUiRefAppUi::~CLmUiRefAppUi:()
+// Destructor Frees reserved resources
+// ----------------------------------------------------
+//
+CLmUiRefAppUi::~CLmUiRefAppUi()
+   {
+
+   }
+
+//------------------------------------------------------------------------------
+// CLmUiRefAppUi::DynInitMenuPaneL(TInt aResourceId,CEikMenuPane* aMenuPane)
+//  This function is called by the EIKON framework just before it displays
+//  a menu pane. Its default implementation is empty, and by overriding it,
+//  the application can set the state of menu items dynamically according
+//  to the state of application data.
+//------------------------------------------------------------------------------
+//
+void CLmUiRefAppUi::DynInitMenuPaneL(
+    TInt /*aResourceId*/,CEikMenuPane* /*aMenuPane*/)
+    {
+    }
+
+// ----------------------------------------------------
+// CLmUiRefAppUi::HandleKeyEventL(
+//     const TKeyEvent& aKeyEvent,TEventCode /*aType*/)
+// Handles key events. It is called by HandleWsEventL()
+// when a key press event occurs
+// ----------------------------------------------------
+//
+TKeyResponse CLmUiRefAppUi::HandleKeyEventL(
+    const TKeyEvent& /*aKeyEvent*/,TEventCode /*aType*/)
+    {
+    return EKeyWasNotConsumed;
+    }
+
+// ----------------------------------------------------
+// CLmkAppUi::Document
+// ----------------------------------------------------
+//
+CLmUiRefAppDocument& CLmUiRefAppUi::Document() const
+    {
+    // Explicit cast: the document must always be of type CLmkDocument
+    CLmUiRefAppDocument* document =
+        static_cast<CLmUiRefAppDocument*>( CEikAppUi::Document() );
+
+    return *document;
+    }
+
+
+// ----------------------------------------------------
+// CLmUiRefAppUi::HandleCommandL(TInt aCommand)
+// Handles commands defined in resource files
+// ----------------------------------------------------
+//
+void CLmUiRefAppUi::HandleCommandL(TInt aCommand)
+    {
+    switch ( aCommand )
+        {
+        // these all are same: exit
+        case EAknSoftkeyBack:
+        case EAknSoftkeyExit:
+        case EEikCmdExit:
+            {
+	        Exit();
+	        break;
+            }
+        default:
+            break;
+        }
+    }
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationlandmarksuirefapp/src/LmUiRefAppView.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,484 @@
+/*
+* 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:   LandmarksUi Content File -
+*
+*/
+
+
+
+
+
+
+// INCLUDE FILES
+#include <e32def.h>
+#include <avkon.hrh>
+#include <aknViewAppUi.h>
+#include <AknsUtils.h>
+#include <StringLoader.h>
+#include <aknnotewrappers.h>
+#include <eikmenup.h>
+#include <EPos_CPosLandmarkDatabase.h>
+#include <lmuirefapp.rsg>
+#include "lmuirefapp.hrh"
+#include "CLmkLandmarkSelectorDlg.h"
+#include "CLmkCategorySelectorDlg.h"
+#include "LmUiRefAppDocument.h"
+#include "LmUiRefAppContainer.h"
+#include "LmUiRefAppUi.h"
+#include "LmUiRefAppView.h"
+#include "CLmkEditorDlg.h"
+#include "TLmkItemIdDbCombiInfo.h"		//For multi db support, combiinfo struct
+
+#define LMK_PARAMS (CLmkEditorDlg::ELmkOnlyName | CLmkEditorDlg::ELmkCategory | CLmkEditorDlg::ELmkStreet | CLmkEditorDlg::ELmkCity | CLmkEditorDlg::ELmkLatitude| CLmkEditorDlg::ELmkLongitude)
+
+#define LMK_PARAMS_DEFAULT CLmkEditorDlg::ELmkAll
+
+// ================= MEMBER FUNCTIONS =======================
+//-------------------------------------------------------------------------
+// CLmUiRefAppView::NewLC
+// Two-phased constructor.
+//-------------------------------------------------------------------------
+//
+CLmUiRefAppView* CLmUiRefAppView::NewLC()
+    {
+    CLmUiRefAppView* self =
+        new( ELeave ) CLmUiRefAppView();
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    return self;
+    }
+
+//---------------------------------------------------------------------------
+// CLmUiRefAppView::CLmUiRefAppView
+// C++ default constructor can NOT contain any code, that
+// might leave.
+//---------------------------------------------------------------------------
+//
+CLmUiRefAppView::CLmUiRefAppView()
+    {
+    }
+
+// --------------------------------------------------------------------------
+// CLmUiRefAppView::ConstructL
+// Symbian 2nd phase constructor can leave.
+// --------------------------------------------------------------------------
+//
+void CLmUiRefAppView::ConstructL()
+    {
+    BaseConstructL(R_LMUIREFAPP_VIEW);
+    }
+
+// --------------------------------------------------------------------------
+// CLmUiRefAppView::~CLmUiRefAppView
+// ------------------------------------------------------------------------
+//
+CLmUiRefAppView::~CLmUiRefAppView()
+    {
+    if ( iContainer )
+        {
+        AppUi()->RemoveFromViewStack( *this, iContainer );
+        }
+    delete iContainer;
+    }
+
+// --------------------------------------------------------------------------
+// TUid CLmUiRefAppView::Id
+// --------------------------------------------------------------------------
+//
+TUid CLmUiRefAppView::Id() const
+    {
+    return TUid::Uid(ELmUiRefAppView);
+    }
+
+// --------------------------------------------------------------------------
+// CLmUiRefAppView::HandleCommandL
+// --------------------------------------------------------------------------
+//
+void CLmUiRefAppView::HandleCommandL( TInt aCommand )
+    {
+    switch ( aCommand )
+        {
+        // these all are same: exit
+        case EAknSoftkeyExit:
+        case EAknSoftkeyBack:
+			{
+			AppUi()->HandleCommandL(EEikCmdExit);
+			break;
+			}
+  	    case ELmUiRefAppCmdDeleteLm:
+			{
+			if (IsLmDbEmptyL())
+			    {
+			    // Display some Error Note here
+			    iContainer->DrawNow();
+			    return;
+			    }
+			if (LaunchLandmarksDialogL() == 0)
+			    {
+			    // If Selector is cancelled, return to MAIN view
+			    iContainer->DrawNow();
+			    return;
+			    }
+			// Display Note
+			CEikonEnv* env = CEikonEnv::Static();
+			HBufC* noteText = NULL;
+			noteText
+			   = StringLoader::LoadLC( R_LMUIREFAPP_DELETE_LANDMARK, env );
+			CAknQueryDialog* query =
+			          new( ELeave ) CAknQueryDialog( *noteText );
+			TInt ret = query->ExecuteLD( R_LMUIREFAPP_QUERY);
+			if (!(ret))
+			    {
+			    CleanupStack::PopAndDestroy(noteText); //noteText
+			    iContainer->DrawNow();
+			    return;
+			    }
+			TPosLmItemId delLmItem = SelectedItem();
+			ilDb->RemoveLandmarkL(delLmItem);
+			delete ilDb;
+			CleanupStack::PopAndDestroy(noteText); //noteText
+			break;
+			}
+    	case ELmUiRefAppCmdNewLm :
+			{
+			//if to be used later on or commented because of an Error.
+			NewLmCmdL();
+			break;
+			}
+    	case ELmUiRefAppCmdViewLm:
+			{
+			/* Launch LM Selector only when Landmarks
+			* Database has any entries
+			*/
+			if (IsLmDbEmptyL())
+			    {
+			    // Display some Error Note here
+			    iContainer->DrawNow();
+			    return;
+			    }
+			if (LaunchLandmarksDialogL() == 0)
+			    {
+			    // If Selector is cancelled, return to MAIN view
+			    iContainer->DrawNow();
+			    return;
+			    }
+
+			CLmkEditorDlg::TLmkEditorParams editParams;
+			editParams.iAttributes = CLmkEditorDlg::ELmkAll;
+			editParams.iEditorMode = CLmkEditorDlg::ELmkViewer;
+			TPosLmItemId lmItem = SelectedItem();
+			CLmkEditorDlg *dlg = CLmkEditorDlg::NewL(*ilDb,
+			                                            lmItem,
+			                                            editParams);
+			dlg->ExecuteLD();
+			iContainer->DrawNow();
+			delete ilDb;
+			break;
+			}
+
+    	case ELmUiRefAppCmdEditLm:
+			{
+			if (IsLmDbEmptyL())
+			    {
+			    // Display some Error Note here
+			    iContainer->DrawNow();
+			    return;
+				}
+			if (LaunchLandmarksDialogL() == 0)
+				{
+				// If Selector is cancelled, return to MAIN view
+				iContainer->DrawNow();
+			    return;
+				}
+			CPosLandmark* landmarkedi = NULL;
+			ExecuteLmEditorL(landmarkedi, *ilDb);
+			// Refresh
+			iContainer->DrawNow();
+			delete ilDb;
+			break;
+            }
+		case ELmUiRefAppCmdMultiLmSelector:
+            {
+            if ( IsLmDbEmptyL() )
+            	{
+            	// Display some Error Note here
+            	iContainer->DrawNow();
+            	return;
+            	}
+
+            if ( LaunchMultiLandmarkSelectorDialogL() == 0 )
+            	{
+            	// If Selector is cancelled, return to MAIN view
+            	iContainer->DrawNow();
+            	return;
+            	}
+            break;
+            }
+		case ELmUiRefAppCmdMultiCatSelector:
+    		{
+    		if ( IsLmDbEmptyL() )
+    			{
+    			// Display some Error Note here
+    			iContainer->DrawNow();
+    			return;
+    			}
+
+    		if ( LaunchMultiCategorySelectorDialogL() == 0 )
+    			{
+    			// If Selector is cancelled, return to MAIN view
+    			iContainer->DrawNow();
+    			return;
+    			}
+    		break;
+    		}
+		case ELmUiRefAppCmdSingleCatSelector:
+    		{
+    		if ( IsLmDbEmptyL() )
+    			{
+    			// Display some Error Note here
+    			iContainer->DrawNow();
+    			return;
+    			}
+
+    		if ( LaunchSingleCategoeyDialogL() == 0 )
+    			{
+    			// If Selector is cancelled, return to MAIN view
+    			iContainer->DrawNow();
+    			return;
+    			}
+    		// Refresh view if needed
+			iContainer->DrawNow();
+			delete ilDb;
+    		break;
+    		}
+        default:
+    	   break;
+    	}
+    }
+
+// --------------------------------------------------------------------------
+// CLmUiRefAppView::NewLmCmdL()
+// --------------------------------------------------------------------------
+//
+void CLmUiRefAppView::NewLmCmdL()
+    {
+    CPosLandmark* landmark = CPosLandmark::NewL();
+    CleanupStack::PushL( landmark );
+	CLmUiRefAppUi* lmUiAppUi = static_cast<CLmUiRefAppUi*>( ViewAppUi() );
+	CPosLandmarkDatabase& iaDb = (lmUiAppUi->Document().LmDb());
+    ExecuteLmEditorL( landmark, iaDb );
+    CleanupStack::PopAndDestroy( landmark );
+    }
+
+// -----------------------------------------------------------------------------
+// CLmUiRefAppView::ExecuteLmEditorL()
+// -----------------------------------------------------------------------------
+void CLmUiRefAppView::ExecuteLmEditorL(
+    CPosLandmark* aLandmark, CPosLandmarkDatabase& aDb)
+    {
+	CLmkEditorDlg::TLmkEditorParams editParams;
+    editParams.iAttributes = LMK_PARAMS_DEFAULT;
+    editParams.iEditorMode = CLmkEditorDlg::ELmkEditor;
+	TPosLmItemId lmItem = SelectedItem();
+	if (aLandmark)
+	    {
+	    CLmkEditorDlg *dlg = CLmkEditorDlg::NewL(aDb, *aLandmark, editParams);
+        dlg->ExecuteLD();
+        }
+	else
+        {
+		CLmkEditorDlg *dlg = CLmkEditorDlg::NewL(aDb, lmItem, editParams);
+		dlg->ExecuteLD();
+        }
+    }
+
+// --------------------------------------------------------------------------
+// CLmUiRefAppView::DoActivateL
+// --------------------------------------------------------------------------
+//
+void CLmUiRefAppView::DoActivateL(
+    const TVwsViewId& /*aPrevViewId*/,
+    TUid /*aCustomMessageId*/,
+    const TDesC8& /*aCustomMessage*/ )
+    {
+    if ( !iContainer )
+        {
+        iContainer = CLmUiRefAppContainer::NewL(this, ClientRect() );
+    	AppUi()->AddToStackL( *this, iContainer );
+        }
+    }
+
+// --------------------------------------------------------------------------
+// CLmUiRefAppView::DoDeactivate
+// --------------------------------------------------------------------------
+//
+void CLmUiRefAppView::DoDeactivate()
+    {
+    if ( iContainer )
+        {
+        AppUi()->RemoveFromViewStack( *this, iContainer );
+        }
+    delete iContainer;
+    iContainer = NULL;
+    }
+
+// --------------------------------------------------------------------------
+// CLmUiRefAppView::LaunchLandmarksDialogL()
+// --------------------------------------------------------------------------
+//
+TInt CLmUiRefAppView::LaunchLandmarksDialogL()
+    {
+    // Launch LMK Selector
+	iLmkSelectDlg = CLmkLandmarkSelectorDlg::NewL();
+	iLmkSelectDlg->SetMopParent(this);
+    TLmkItemIdDbCombiInfo selItem;
+	TInt retVal = iLmkSelectDlg->ExecuteLD( selItem );
+    if (retVal !=0)
+        {
+        iSelectedItem = selItem.GetItemId();
+        ilDb = selItem.GetLmDb();
+        }
+   return retVal;
+   }
+
+// --------------------------------------------------------------------------
+// CLmUiRefAppView::ViewAppUi()
+// --------------------------------------------------------------------------
+//
+CAknViewAppUi* CLmUiRefAppView::ViewAppUi()
+    {
+    return static_cast<CAknViewAppUi*>( iAvkonAppUi );
+    }
+
+// --------------------------------------------------------------------------
+// CLmUiRefAppView::SelectedItem()
+// --------------------------------------------------------------------------
+//
+TPosLmItemId CLmUiRefAppView::SelectedItem() const
+    {
+    return iSelectedItem;
+    }
+
+// --------------------------------------------------------------------------
+// CLmUiRefAppView::IsLmDbEmptyL()
+// --------------------------------------------------------------------------
+//
+TBool CLmUiRefAppView::IsLmDbEmptyL()
+    {
+	CPosLmItemIterator* itemIterator = NULL;CLmUiRefAppUi* lmUiAppUi = static_cast<CLmUiRefAppUi*>( ViewAppUi() );
+	CPosLandmarkDatabase& iaDb = lmUiAppUi->Document().LmDb();
+
+	itemIterator = iaDb.LandmarkIteratorL();
+
+	CleanupStack::PushL(itemIterator);
+	itemIterator->Reset();
+	TUint nrOfItems = itemIterator->NumOfItemsL();
+	CleanupStack::PopAndDestroy(itemIterator);
+	if (nrOfItems == 0)
+	    {
+	    return ETrue;
+	    }
+	return EFalse;
+    }
+
+// ---------------------------------------------------------
+// CLmkByLmView::DynInitMenuPaneL
+// ---------------------------------------------------------
+//
+void CLmUiRefAppView::DynInitMenuPaneL(
+    TInt aResourceId,
+    CEikMenuPane* aMenuPane )
+    {
+    switch ( aResourceId )
+        {
+        case R_LMUIREFAPP_MENU1:
+            {
+  		    if (IsLmDbEmptyL())
+		        {
+                // Show NEW LM Menu Item
+                aMenuPane->SetItemDimmed( ELmUiRefAppCmdEditLm, ETrue );
+                aMenuPane->SetItemDimmed( ELmUiRefAppCmdViewLm, ETrue );
+                aMenuPane->SetItemDimmed( ELmUiRefAppCmdDeleteLm, ETrue );
+                }
+		    break;
+            }
+        default:
+            {
+            break;
+            }
+        }
+    }
+// --------------------------------------------------------------------------
+// CLmUiRefAppView::LaunchMultiLandmarkSelectorDialogL()
+// --------------------------------------------------------------------------
+//
+TInt CLmUiRefAppView::LaunchMultiLandmarkSelectorDialogL()
+	{
+	// Launch LMK Selector
+	iLmkSelectDlg = CLmkLandmarkSelectorDlg::NewL();
+	iLmkSelectDlg->SetMopParent(this);
+	RArray<TLmkItemIdDbCombiInfo> selItemArray;
+	TInt retVal = iLmkSelectDlg->ExecuteLD( selItemArray );
+	TInt count = selItemArray.Count();
+	if ( count > 0 )
+		{
+		CPosLandmarkDatabase* pDb =   selItemArray[0].GetLmDb();
+		delete( pDb );
+		}
+	selItemArray.Close();
+	return retVal;
+	}
+
+//--------------------------------------------------------------------------
+// CLmUiRefAppView::LaunchLandmarksDialogL()
+// --------------------------------------------------------------------------
+//
+TInt CLmUiRefAppView::LaunchMultiCategorySelectorDialogL()
+	{
+	// Launch multiple Category Selector
+	iCategorySelectDlg = CLmkCategorySelectorDlg::NewL();
+	iCategorySelectDlg->SetMopParent(this);
+	RArray<TLmkItemIdDbCombiInfo> selItemArray;
+	TInt retVal = iCategorySelectDlg->ExecuteLD( selItemArray );
+	TInt count = selItemArray.Count();
+	if ( count > 0 )
+		{
+		CPosLandmarkDatabase* pDb =   selItemArray[0].GetLmDb();
+		delete( pDb );
+		}
+	selItemArray.Close();
+	return retVal;
+	}
+
+// --------------------------------------------------------------------------
+// CLmUiRefAppView::LaunchSingleCategoeyDialogL()
+// --------------------------------------------------------------------------
+//
+TInt CLmUiRefAppView::LaunchSingleCategoeyDialogL()
+    {
+    // Launch single category selector
+	iCategorySelectDlg = CLmkCategorySelectorDlg::NewL();
+	iCategorySelectDlg->SetMopParent(this);
+    TLmkItemIdDbCombiInfo selItem;
+	TInt retVal = 	iCategorySelectDlg->ExecuteLD( selItem );
+    if (retVal !=0)
+        {
+        iSelectedItem = selItem.GetItemId();
+        ilDb = selItem.GetLmDb();
+        }
+   return retVal;
+   }
+
+
+// End of File
--- a/locationpickerservice/inc/hgwidgetdatamodel.h	Tue Aug 31 15:09:25 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,70 +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: HgWidgetDataModel implementation
-*
-*/
-
-#ifndef HGWIDGETDATAMODEL_H
-#define HGWIDGETDATAMODEL_H
-
-#include <QAbstractListModel>
-#include <HbIcon>
-
-class LocationPickerProxyModel;
-
-/*!
- Constructs the data model
- */
-class HgWidgetDataModel : public QAbstractListModel
-{
-    Q_OBJECT
-public:
-    //ImageType to be set
-    enum TImageType
-    {
-        ETypeQIcon,
-        ETypeHbIcon,
-        ETypeQImage
-    };
-public:
-    //constructor
-    explicit HgWidgetDataModel( LocationPickerProxyModel *aProxyModel, QObject *aParent=0);
-    //destructor
-    virtual ~HgWidgetDataModel();
-    //count of number of items in model
-    int rowCount(const QModelIndex &aParent=QModelIndex()) const;
-    //get the data from QStandardModel for HgWidgetModel 
-    QVariant data(const QModelIndex &aIndex, int aRole=Qt::DisplayRole) const;
-    //Set Image Type
-    void setImageDataType(TImageType type);
-    //reset the model with new data
-    void resetModel( LocationPickerProxyModel *aProxyModel );
-
-#ifdef LOCPICKER_UNIT_TEST
-public:
-#else    
-private:
-#endif
-	//Image Type
-    TImageType                       mImageType;
-    //default Image type
-    HbIcon                          mDefaultImage;
-    //low resolution image
-    bool                            mUseLowResImages;
-    //proxymodel
-    LocationPickerProxyModel        *mProxyModel;
-};
-
-#endif // HgWidgetDataModel_H
-
--- a/locationpickerservice/inc/locationpickerappwindow.h	Tue Aug 31 15:09:25 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: LocationPickerAppWindow declaration
-*
-*/
-
-#ifndef LOCATIONPICKERAPPWINDOW_H
-#define LOCATIONPICKERAPPWINDOW_H
-#include <HbMainWindow>
-
-#include "locationpickertypes.h"
-
-// Forward declarations
-class LocationPickerSearchView;
-class LocationPickerDocumentLoader;
-class LocationPickerView;
-class LocationPickerService;
-class LocationPickerProxyModel;
-class LocationPickerContent;
-
-class LocationPickerAppWindow: public HbMainWindow
-{
-    Q_OBJECT
-public:
-    // constructor
-    LocationPickerAppWindow(QWidget *parent=0, Hb::WindowFlags 
-            windowFlags=Hb::WindowFlagNone);
-    
-    // destructor
-    ~LocationPickerAppWindow();
-
-#ifdef LOCPICKER_UNIT_TEST
-public slots:
-#else    
-private slots:
-#endif
-    //Connect the slots for Potrait view
-    void connectSlots();
-public slots:
-    // a list item is selected
-    void itemSelected( quint32 aLm );
-#ifdef LOCPICKER_UNIT_TEST
-public slots:
-#else    
-private slots:
-#endif
-
-    //activate search view
-    void activateSearchView();
-    //activate locationpicker view
-    void activateLocationPickerView();
-    //changes the orientation
-    void changeOrientation( Qt::Orientation );
-    //complete the service
-    void serviceComplete();
-    //slot to close details dialog (if open)
-    void closeDetailsDialog();
-
-#ifdef LOCPICKER_UNIT_TEST
-public:
-#else    
-private:
-#endif
-    // search view
-    LocationPickerSearchView* mLocationPickerSearchView;
-    //document loader
-    LocationPickerDocumentLoader* mLocationPickerDocumentLoader;
-    //location picker potrait view
-    LocationPickerView* mLocationPickerView;
-	//locationpicker content
-    LocationPickerContent* mLocationPickerContent;
-    //location picker service;
-    LocationPickerService *mService;
-};
-#endif // LOCATIONPICKERAPPWINDOW_H
--- a/locationpickerservice/inc/locationpickercollectioncontent.h	Tue Aug 31 15:09:25 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,48 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: LocationPickerCollectionContent declaration
-*
-*/
-
-#ifndef LOCATIONPICKERCOLLECTIONCONTENT_H
-#define LOCATIONPICKERCOLLECTIONCONTENT_H
-
-class QStandardItemModel;
-class LocationPickerProxyModel;
-class LocationPickerDataManager;
-
-/**  
- * Class for handling collection content
- */
-class LocationPickerCollectionContent : public QObject
-{
-public:
-    // constructor
-    LocationPickerCollectionContent( quint32 aCollectionid );
-    //Destructor
-    ~LocationPickerCollectionContent();
-    //get proxy model
-    LocationPickerProxyModel* getProxyModel();
-    // gets the data pointed to by index and copies to the aValue
-    void getData( QModelIndex aIndex, quint32& aValue );
-    //return true if location entry is found
-    bool locationFound();
-private:
-    LocationPickerProxyModel *mProxyModel;
-    QStandardItemModel *mModel;
-    LocationPickerDataManager *mDataManager;
-    bool mLocationFound;
-};
-
-#endif // LOCATIONPICKERCOLLECTIONCONTENT_H
--- a/locationpickerservice/inc/locationpickercollectionlistcontent.h	Tue Aug 31 15:09:25 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,48 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: LocationPickerCollectionListContent declaration
-*
-*/
-
-#ifndef LOCATIONPICKERCOLLECTIONLISTCONTENT_H
-#define LOCATIONPICKERCOLLECTIONLISTCONTENT_H
-
-class QStandardItemModel;
-class LocationPickerDataManager;
-
-/**  
- * Class for handling Collections content of location picker
- */
-class LocationPickerCollectionListContent : public QObject
-{
-public:
-
-    // constructor
-    LocationPickerCollectionListContent();
-
-    // destructor
-    ~LocationPickerCollectionListContent();
-    //get standard model
-    QStandardItemModel* getStandardModel();
-    // gets the data pointed to by index and copies to the aValue
-    void getData( QModelIndex aIndex, quint32& aValue );
-
-private:
-    //standard Item Model
-    QStandardItemModel *mModel;
-    //datamanager
-    LocationPickerDataManager *mDataManager;
-};
-
-#endif // LOCATIONPICKERCOLLECTIONLISTCONTENT_H
--- a/locationpickerservice/inc/locationpickercontent.h	Tue Aug 31 15:09:25 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,57 +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: LocationPickerContent declaration
-*
-*/
-
-#ifndef LOCATIONPICKERCONTENT_H
-#define LOCATIONPICKERCONTENT_H
-
-
-#include "locationpickerproxymodel.h"
-
-//forward declaration
-class QStandardItemModel;
-class LocationPickerDataManager;
-
-/**  
- *Class to create model for Location Picker
- */
-class LocationPickerContent : public QObject
-{
-    Q_OBJECT
-public:
-
-    // contructor
-    LocationPickerContent();
-
-    // destructor
-    ~LocationPickerContent();
-    
-    //get standard Grid Model
-    QStandardItemModel* getStandardModel();
-    
-    void createNoEntryDisplay( QStandardItemModel *aModel );
-    
-    bool populateModel();
-
-private:
-    Qt::Orientations mOrientation;
-    LocationPickerDataManager *mDataManager;
-    QStandardItemModel *mStandardModel;
-    
-};
-
-
-#endif // LOCATIONPICKERCONTENT_H
--- a/locationpickerservice/inc/locationpickerdatamanager.h	Tue Aug 31 15:09:25 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,54 +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: LocationPickerDataManager declaration
-*
-*/
-
-#ifndef LOCATIONPICKERDATAMANAGER_H
-#define LOCATIONPICKERDATAMANAGER_H
-
-#include <QStandardItemModel>
-#include "locationpickertypes.h"
-#include "qlocationpickeritem.h"
-
-class LocationPickerDataManagerPrivate;
-
-/**  Class used for managing the data of model
- *
- */
-class LocationPickerDataManager
-{
-public:
-    static LocationPickerDataManager* getInstance();
-private:
-    // constructors
-    LocationPickerDataManager();
-
-    // destructor
-    ~LocationPickerDataManager();
-public:
-    // populates the model with data
-    bool populateModel( QStandardItemModel &aModel, TViewType aViewType, 
-            quint32 aCollectionId = 0);
-
-    // gets the location item
-    void getLocationItem( quint32 aLmId, QLocationPickerItem &aItem );
-
-private:
-
-    LocationPickerDataManagerPrivate* const d_ptr;
-    Q_DECLARE_PRIVATE_D(d_ptr, LocationPickerDataManager)
-};
-
-#endif // LOCATIONPICKERDATAMANAGER_H
--- a/locationpickerservice/inc/locationpickerdatamanager_p.h	Tue Aug 31 15:09:25 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: LocationPickerDataManager private declaration
-*
-*/
-
-#ifndef LOCATIONPICKERDATAMANAGER_P_H
-#define LOCATIONPICKERDATAMANAGER_P_H
-
-#include <QStandardItemModel>
-#include "locationpickertypes.h"
-#include "qlocationpickeritem.h"
-
-class LocationDataLookupDb;
-class QLookupItem;
-
-/**  Class used for managing the data of model
- *
- */
-class LocationPickerDataManagerPrivate
-{
-public:
-    // constructor
-    LocationPickerDataManagerPrivate();
-    
-    // destructor
-    ~LocationPickerDataManagerPrivate();
-    
-    // populates the model with data
-    bool populateModel( QStandardItemModel &aModel, TViewType aViewType, 
-            quint32 aCollectionId = 0 );
-    
-    // gets the location item
-    void getLocationItem( quint32 aLmId, QLocationPickerItem &aItem );
-
-private:
-    // populates landmarks
-    bool populateLandmarks( QList<QLookupItem> &aItemArray );
-    // populates collections
-    void populateCollections( QList<int>& aCount );
-
-private:
-    QStandardItemModel *mModel;
-    TViewType mViewType;
-    LocationDataLookupDb *mDb; 
-    quint32 mCategoryId;
-};
-
-#endif // LOCATIONPICKERDATAMANAGER_P_H
--- a/locationpickerservice/inc/locationpickerdocumentloader.h	Tue Aug 31 15:09:25 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,46 +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: LocationPickerDocumentLoader declaration
-*
-*/
-
-#ifndef LOCATIONPICKERDOCUMENTLOADER_H_
-#define LOCATIONPICKERDOCUMENTLOADER_H_
-
-#include <HbDocumentLoader>
-
-class LocationPickerDocumentLoader : public HbDocumentLoader
-{
-
-public:
-
-    /**
-     * Constructor.
-     */
-    LocationPickerDocumentLoader();
-
-    /**
-     * Destructor.   
-     */
-    ~LocationPickerDocumentLoader();
-
-public:
-
-    /**
-     * from base class
-     */
-    QObject *createObject( const QString& type, const QString &name );
-};
-
-#endif /* LOCATIONPICKERDOCUMENTLOADER_H_ */
--- a/locationpickerservice/inc/locationpickerproxymodel.h	Tue Aug 31 15:09:25 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: LocationPickerProxyModel declaration
-*
-*/
-
-#ifndef LOCATIONPICKERPROXYMODEL_H
-#define LOCATIONPICKERPROXYMODEL_H
-
-
-#include <QSortFilterProxyModel>
-
-
-/**  Class used for sorting and filtering model items
-*
-*/
-class LocationPickerProxyModel : public QSortFilterProxyModel
-{
-    Q_OBJECT
-
-public:
-    // constructor
-    LocationPickerProxyModel( QObject *parent = 0 );
-
-    // used to
-    void filterParameterChanged( QString aSearchText );
-
-protected:
-    // override QSortFilterProxyModel function  to define logic for filter
-    bool filterAcceptsRow( int sourceRow, const QModelIndex &sourceParent ) const;
-    // override QSortFilterProxyModel function  to define logic for sort
-    bool lessThan( const QModelIndex &left, const QModelIndex &right ) const;
-
-private:
-    // search string
-    QString mSearchText;
-};
- 
- 
-#endif // LOCATIONPICKERPROXYMODEL_H
--- a/locationpickerservice/inc/locationpickersearchview.h	Tue Aug 31 15:09:25 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,100 +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: LocationPickerSearchView declaration
-*
-*/
-
-#ifndef LOCATIONPICKERSEARCHVIEW_H
-#define LOCATIONPICKERSEARCHVIEW_H
-
-
-#include <HbView>
-
-class HbListView;
-class QStandardItemModel;
-class HbSearchPanel;
-class LocationPickerDataManager;
-class LocationPickerProxyModel;
-class HbDocumentLoader;
-class HbTextItem;
-class QGraphicsLinearLayout;
-class HbAbstractViewItem;
-class QPoint;
-class HbMenu;
-
-/**  
- * Class defines the search view of location picker
- */
-class LocationPickerSearchView : public HbView
-{
-    Q_OBJECT
-public:
-    // constructor
-    LocationPickerSearchView( HbDocumentLoader &aLoader );
-    // destructor
-    ~LocationPickerSearchView();
-    //initialize the action items and connect to slots
-    void init( QStandardItemModel *aModel );
-private:
-    void getData( QModelIndex aIndex, quint32& aValue );
-#ifdef LOCPICKER_UNIT_TEST
-public slots:
-#else    
-private slots:
-#endif
-    // slot to perform search
-    void doSearch( QString aCriteria );
-    // slot to handle select event on a list item
-    void handleActivated(const QModelIndex &aIndex);
-    // slot to handle backbutton on search panel
-    void handleExit();
-	//launch context menu
-    void launchPopUpMenu(HbAbstractViewItem *aItem, const QPointF &aPoint);
-	//handle long press
-    void handleLongPress();
-    //delete context menu
-    void deleteMenu();
-signals:
-    //signals to switch current view
-    void switchView();
-    //signals when any item is selected
-    void selectItem( quint32 aLm );
-#ifdef LOCPICKER_UNIT_TEST
-public:
-#else    
-private:
-#endif
-    //proxymodel used for sort and filter
-    LocationPickerProxyModel *mProxyModel;
-    // model for the view
-    QStandardItemModel *mModel;
-    // list view
-    HbListView  *mListView;
-    // search panel
-    HbSearchPanel *mSearchPanel;
-    //TextItem
-    HbTextItem* mEmptyLabel;
-    //Graphicslayout
-    QGraphicsLinearLayout* mVerticalLayout;
-    //Documentloader
-    HbDocumentLoader &mDocumentLoader;
-    QModelIndex mIndex;
-    //context menu
-    HbMenu* mLongPressMenu;
-    //select action
-    HbAction* mSelectAction;
-};
-
-
-#endif // LOCATIONPICKERSEARCHVIEW_H
--- a/locationpickerservice/inc/locationpickerservice.h	Tue Aug 31 15:09:25 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,59 +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: LocationPickerService declaration
-*
-*/
-
-#ifndef LOCATIONPICKERSERVICE_H
-#define LOCATIONPICKERSERVICE_H
-
-#include <xqserviceprovider.h>
-#include "qlocationpickeritem.h"
-
-class LocationPickerAppWindow;
-/**
- *  LocationPickerService
- * 
- */	
-class LocationPickerService : public XQServiceProvider
-{
-    Q_OBJECT
-
-public:
-
-    // constructor
-    LocationPickerService( LocationPickerAppWindow *aParent = 0 );
-
-    // destructor
-    ~LocationPickerService();
-
-    // item selection complete
-    void complete( QLocationPickerItem aLm);
-    
-    // is active
-    bool isActive();
-
-public slots:
-    //for QTHighway to notify provider about request
-     void pick();
-    
-private:
-
-    // handle to the application main window
-    LocationPickerAppWindow* mServiceApp;
-    int mAsyncReqId;
-    QLocationPickerItem mReturn;
-};
-
-#endif // LOCATIONPICKERSERVICE_H
--- a/locationpickerservice/inc/locationpickertypes.h	Tue Aug 31 15:09:25 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,70 +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: defines types and constants for location picker
-*
-*/
-
-#ifndef LOCATIONPICKERTYPES_H
-#define LOCATIONPICKERTYPES_H
-
-#include <hbglobal.h>
-#include <locationservicedefines.h>
-
-// separator
-const QString KSeparator(",");
-
-// space
-const QString KSpace(" ");
-
-//Icon Paths
-
-// dummy image for a LandMarks
-const QString KDummyImage("qtg_large_maps");
-//Image for calendar entries
-const QString KCalendarImage("qtg_large_calendar");
-//Image for contacts entries
-const QString KContactsImage("qtg_large_phonebook");
-
-//Contacts collection icon
-const QString KCollectionsContacts("qtg_small_phonebook");
-
-//Calendar collection icon
-const QString KCollectionsCalendar("qtg_small_calendar");
-
-//Places collection icon
-const QString KCollectionsPlaces("qtg_small_favorite");
-
-//Contacts type home icon
-const QString KContactHomeIcon("qtg_mono_home");
-//Contacts type work icon
-const QString KContactWorkIcon("qtg_mono_work");
-
-/** 
- * Defines view type in location picker
-*/
-enum TViewType
-{
-    /** LocationPicker Content */
-    ELocationPickerContent,
-    /** Collection list Content*/
-    ELocationPickerCollectionListContent,
-    /** Search View */
-    ELocationPickerSearchView,
-    /** Collection content */
-    ELocationPickerCollectionContent
-};
-
-
-#endif // LOCATIONPICKERTYPES_H
-
--- a/locationpickerservice/inc/locationpickerview.h	Tue Aug 31 15:09:25 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,171 +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: LocationPickerView declaration
-*
-*/
-
-#ifndef LOCATIONPICKERVIEW_H
-#define LOCATIONPICKERVIEW_H
-
-
-#include <HbView>
-#include <hbdocumentloader.h>
-#include "locationpickertypes.h"
-#include <QGraphicsLinearLayout>
-#include <hgwidgets/hgmediawall.h>
-
-#include <HbLabel>
-#include <HbTextItem>
-//forward declarations
-class HbListView;
-class QStandardItemModel;
-class LocationPickerProxyModel;
-class LocationPickerCollectionListContent;
-class LocationPickerCollectionContent;
-class HgWidgetDataModel;
-class HbListViewItem;
-class HbAction;
-class HbAbstractViewItem;
-class QPoint;
-class HbDialog;
-class HbLabel;
-/**  
- * Class defines the location picker view
- */
-class LocationPickerView : public HbView
-{
-    Q_OBJECT
-public:
-    // constructor
-    LocationPickerView( HbDocumentLoader* aLoader );
-    // destructor
-    ~LocationPickerView();
-public:
-    //disable the tabs
-    void disableTabs();
-    //get the items from docml and connect to respective slots
-    void init( Qt::Orientation aOrientation, QStandardItemModel *aModel );
-    //Set the appropriate model on list view
-    void manageListView();
-    //create hurriganes widget
-    void createHurriganesWidget();
-    //manage hurriganes view
-    void manageHgWidget();
-    //Create collection list and sets to list view
-    void setCollectionData( quint32 acategoryId );
-    //Get the view type
-    TViewType getViewType();
-    //set the view type
-    void setViewType( TViewType aViewType );
-    //clear collection Model
-    void clearContentModel();
-    void removeDetailsLabel();
-    //close the popupdialog
-    void closeDetailsDialog();
-#ifdef LOCPICKER_UNIT_TEST
-public:
-#else    
-private:
-#endif
-    void displayNoEntries();
-#ifdef LOCPICKER_UNIT_TEST
-public slots:
-#else    
-private slots:
-#endif
-    //slot to handle list item actions     
-    void handleActivated( const QModelIndex &aIndex );
-    //slots to handle menu action items     
-    void sortDescending();
-    void sortAscending();
-    //handle secondary back action
-    void backTriggered();
-    //slot to handle search tab
-    void searchTabTriggered();
-    //context menu
-    void launchPopUpMenu( HbAbstractViewItem *aItem, const QPointF &aPoint );
-    //launch context menu
-    void launchPopUpMenu( const QModelIndex &aIndex, const QPointF &aPoint );
-    //handle select event
-    void handleSelect();
-    //handle details event
-    void handleDetails();
-    //slot to handle all tab
-    void allTabTriggered();
-    //slot to handle collection tab
-    void colectionTabTriggered();
-    //delete context menu
-    void deleteMenu();
-signals:
-    void switchToSearchView();
-    void selectItem( quint32 aLm );
-    void completeService();
-#ifdef LOCPICKER_UNIT_TEST
-public:
-#else    
-private:
-#endif
-    //document loader
-    HbDocumentLoader* mDocumentLoader;
-    // collection list content
-    LocationPickerCollectionListContent* mLocationPickerCollectionListContent;
-    //locationPickerProxyModel
-    LocationPickerProxyModel *mProxyModel;
-	//standard model
-    QStandardItemModel *mModel;
-    //actions
-    HbAction *mAllAction;
-    HbAction *mCollectionAction;
-    HbAction *mSearchAction;
-    HbAction *mAscendingAction;
-    HbAction *mDescendingAction;
-    //secondary back action
-    HbAction *mBackAction;
-    // list view
-    HbListView  *mListView;
-    //list item
-    HbListViewItem *mListItem;
-    //collection content 
-    LocationPickerCollectionContent *mCollectionContent;
-    //ViewType
-    TViewType mViewType ;
-    // get the collection/category id
-    quint32 mCategoryId;
-    //label to show current view
-    QModelIndex mIndex;
-    //linear Layout
-    QGraphicsLinearLayout *mLinerLayout;
-    //model for hurriganes
-    HgWidgetDataModel       *mHgModel;
-    //hurriganes 
-    HgWidget                *mWidget;
-    // label to show view details
-    HbLabel *mColllabel;
-    //text item to show no entries
-    HbTextItem*             mEmptyLabel;
-    //pop up dialog to show details
-    HbDialog* mDialog;
-    HbLabel* mMapIconLabel;
-    HbLabel* mTitleLabel;
-    HbLabel* mAddressMiddle;
-    HbLabel* mAddressBottom;
-    HbAction* mDone;
-    HbMenu* mLongPressMenu;
-    HbAction* mSelectAction; 
-    HbAction* mDetailsAction; 
-    bool mPopulated;
-};
-
-
-#endif // LOCATIONPICKERVIEW_H
--- a/locationpickerservice/locationpickerservice.pro	Tue Aug 31 15:09:25 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: Location picker service project file
-
-SERVICEAPP = app
-TARGET = locationpickerservice
-DEPENDPATH += .
-INCLUDEPATH += .
-INCLUDEPATH += ../inc
-MOC_DIR = moc
-CONFIG += hb
-
-
-symbian: { 
-    # Build.inf rules
-    BLD_INF_RULES.prj_exports += \
-         "$${LITERAL_HASH}include <platform_paths.hrh>" \
-         "rom/locationpickerservice.iby  CORE_APP_LAYER_IBY_EXPORT_PATH(locationpickerservice.iby)"
-
-    TARGET.UID3 = 0x2002C3AA 
-    isEmpty(TARGET.EPOCSTACKSIZE):TARGET.EPOCSTACKSIZE = 0x14000
-    isEmpty(TARGET.EPOCHEAPSIZE):TARGET.EPOCHEAPSIZE = 20480 \
-        16943040
-    TARGET.CAPABILITY = ALL \
-        -TCB
-
-    INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE
-    
-}
-
-# ##### qthighway
-CONFIG += service
-LIBS += -lxqservice \
-    -lxqserviceutil \
-    -lganeswidgets.dll \
-    -lthumbnailmanagerqt.dll \
-    -llocationdatalookupdb
-SERVICE.FILE = service_conf.xml
-SERVICE.OPTIONS = embeddable
-SERVICE.OPTIONS += hidden
-
-# #### /qthighway
-
-RESOURCES += ./resources/locationpicker.qrc 
-
-TRANSLATIONS += lilpicker.ts
-
-SOURCES += src/main.cpp \
-    src/locationpickercontent.cpp \
-    src/locationpickerappwindow.cpp \
-    src/locationpickersearchview.cpp \
-    src/locationpickerproxymodel.cpp \
-    src/locationpickercollectionlistcontent.cpp \
-    src/locationpickercollectioncontent.cpp \
-    src/locationpickerservice.cpp \
-    src/locationpickerdatamanager.cpp \
-    src/locationpickerdatamanager_p.cpp \
-    src/locationpickerview.cpp \
-    src/locationpickerdocumentloader.cpp \
-    src/hgwidgetdatamodel.cpp
-    
-    
-    
-
-HEADERS += inc/locationpickercontent.h \
-    inc/locationpickerappwindow.h \
-    inc/locationpickersearchview.h \
-    inc/locationpickerproxymodel.h \
-    inc/locationpickercollectionlistcontent.h \
-    inc/locationpickercollectioncontent.h \
-    inc/locationpickertypes.h \
-    inc/locationpickerservice.h \
-    inc/locationpickerdatamanager.h \
-    inc/locationpickerdatamanager_p.h \
-    inc/locationpickerview.h \
-    inc/locationpickerdocumentloader.h \
-    inc/hgwidgetdatamodel.h
-
--- a/locationpickerservice/resources/location.hgmediawall.css	Tue Aug 31 15:09:25 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,69 +0,0 @@
-HgMediawall#location[scrollBarPolicy="ScrollBarAlwaysOff"]
-{
-    layout:layout-noscrollbar;
-    front-cover-elevation-factor:0.5;
-}
-
-HgMediawall#location[!scrollBarPolicy="ScrollBarAlwaysOff"]
-{
-    layout:layout-scrollbar;
-    front-cover-elevation-factor:0.5;
-}
-
-HgMediawall#location::title
-{
-	font-variant:secondary;
-    text-align: center center;
-	left:-var(hb-param-margin-gene-screen);
-	right:var(hb-param-margin-gene-screen);
-	top:-var(hb-param-margin-gene-middle-vertical);
-	bottom:0un;
-	text-line-count-min:1;
-	text-line-count-max:1;
-	zvalue: 2;
-    size-policy: preferred preferred;
-}
-
-HgMediawall#location::description
-{
-	font-variant:primary-small;
-    text-align: center center;
-	left:-var(hb-param-margin-gene-screen);
-	right:var(hb-param-margin-gene-screen);
-	top:-var(hb-param-margin-gene-middle-vertical);
-	bottom:0un;
-	text-line-count-min:1;
-	text-line-count-max:1;
-	zvalue: 2;
-    size-policy: preferred preferred;
-}
-
-HgMediawall#location::scrollbar-vertical
-{
-	left:-var(hb-param-margin-gene-screen);
-	right:var(hb-param-margin-gene-screen);
-	top:-var(hb-param-margin-gene-top);
-	bottom:0.5 un;
-	zvalue: 2;
-    size-policy: preferred preferred;
-}
-
-HgMediawall#location::content
-{
-    size-policy: minimum-expanding minimum-expanding;
-	left:0un;
-	right:0un;
-	top:0un;
-	bottom:0un;
-	zvalue: 0;
-}
-
-HgMediawall#location::centeritem
-{
-    size-policy: minimum-expanding minimum-expanding;
-	left:-var(hb-param-touch-area-gene-primary-medium);
-	right:var(hb-param-touch-area-gene-primary-medium);
-	top:0un;
-	bottom:1un;
-	zvalue: 2;
-}
--- a/locationpickerservice/resources/location.hgmediawall.widgetml	Tue Aug 31 15:09:25 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,31 +0,0 @@
-<hbwidget version="0.1" type="HgMediawall">
-  <layout name="layout-scrollbar" type="mesh">
-    <meshitem src="content" srcEdge="BOTTOM" dst="" dstEdge="BOTTOM" />
-    <meshitem src="content" srcEdge="TOP" dst="" dstEdge="TOP" />
-	<meshitem src="content" srcEdge="RIGHT" dst="" dstEdge="RIGHT" />
-    <meshitem src="content" srcEdge="LEFT" dst="" dstEdge="LEFT" />
-    <meshitem src="scrollbar-horizontal" srcEdge="BOTTOM" dst="content" dstEdge="BOTTOM" />
-	<meshitem src="scrollbar-horizontal" srcEdge="RIGHT" dst="content" dstEdge="RIGHT" />
-    <meshitem src="scrollbar-horizontal" srcEdge="LEFT" dst="content" dstEdge="LEFT" />
-    <meshitem src="title" srcEdge="TOP" dst="content" dstEdge="TOP" />
-    <meshitem src="title" srcEdge="CENTERH" dst="content" dstEdge="CENTERH" />
-    <meshitem src="centeritem" srcEdge="BOTTOM" dst="scrollbar-horizontal" dstEdge="TOP" />
-    <meshitem src="centeritem" srcEdge="TOP" dst="title" dstEdge="BOTTOM" />
-	<meshitem src="centeritem" srcEdge="RIGHT" dst="content" dstEdge="RIGHT" />
-    <meshitem src="centeritem" srcEdge="LEFT" dst="content" dstEdge="LEFT" />
-  </layout>
-  <layout name="layout-noscrollbar" type="mesh">
-    <meshitem src="content" srcEdge="BOTTOM" dst="" dstEdge="BOTTOM" />
-    <meshitem src="content" srcEdge="TOP" dst="" dstEdge="TOP" />
-	<meshitem src="content" srcEdge="RIGHT" dst="" dstEdge="RIGHT" />
-    <meshitem src="content" srcEdge="LEFT" dst="" dstEdge="LEFT" />
-    <meshitem src="description" srcEdge="BOTTOM" dst="content" dstEdge="BOTTOM" />
-    <meshitem src="description" srcEdge="CENTERH" dst="content" dstEdge="CENTERH" />
-    <meshitem src="title" srcEdge="TOP" dst="content" dstEdge="TOP" />
-    <meshitem src="title" srcEdge="CENTERH" dst="content" dstEdge="CENTERH" />
-    <meshitem src="centeritem" srcEdge="BOTTOM" dst="content" dstEdge="BOTTOM" />
-    <meshitem src="centeritem" srcEdge="TOP" dst="title" dstEdge="BOTTOM" />
-	<meshitem src="centeritem" srcEdge="RIGHT" dst="content" dstEdge="RIGHT" />
-    <meshitem src="centeritem" srcEdge="LEFT" dst="content" dstEdge="LEFT" />
-  </layout>
-</hbwidget>
--- a/locationpickerservice/resources/locationpicker.qrc	Tue Aug 31 15:09:25 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,9 +0,0 @@
-<RCC>
-    <qresource>
-        <file>locationpickerview.docml</file>
-        <file>locationpickersearchview.docml</file>
-        <file>popupdialog.docml</file>
-        <file>location.hgmediawall.widgetml</file>
-        <file>location.hgmediawall.css</file>
-    </qresource>
-</RCC>
--- a/locationpickerservice/resources/locationpickersearchview.docml	Tue Aug 31 15:09:25 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<hbdocument version="0.9">
-    <widget name="LocationPickerSearchView" type="HbView">
-        <widget name="locationPickerSearchView" role="HbView:widget" type="HbWidget">
-            <widget name="container" type="HbWidget">
-                <widget name="SearchListView" type="HbListView">
-                    <widget name="listItemPrototype" role="HbListView:prototype" type="HbListViewItem">
-                        <string name="state" value="normal"/>
-                    </widget>
-                    <sizehint height="47.7612un" type="PREFERRED" width="35.8209un"/>
-                </widget>
-                <widget name="searchPanel" type="HbSearchPanel"/>
-                <real name="z" value="1"/>
-                <sizehint height="23.8806un" type="PREFERRED" width="11.9403un"/>
-                <layout orientation="Vertical" type="linear">
-                    <linearitem itemname="SearchListView"/>
-                    <linearitem itemname="searchPanel"/>
-                </layout>
-            </widget>
-            <layout type="anchor">
-                <anchoritem dst="container" dstEdge="LEFT" spacing="0un" src="" srcEdge="LEFT"/>
-                <anchoritem dst="container" dstEdge="TOP" spacing="0un" src="" srcEdge="TOP"/>
-                <anchoritem dst="container" dstEdge="RIGHT" spacing="0un" src="" srcEdge="RIGHT"/>
-                <anchoritem dst="container" dstEdge="BOTTOM" spacing="0un" src="" srcEdge="BOTTOM"/>
-            </layout>
-        </widget>
-        <string locid="txt_lint_title_select_location" name="title"/>
-    </widget>
-    <metadata activeUIState="Common ui state" display="NHD portrait" unit="un">
-        <uistate name="Common ui state" sections="#common"/>
-        <dummydata objectName="SearchListView" section="#common" value="0"/>
-    </metadata>
-</hbdocument>
--- a/locationpickerservice/resources/locationpickerview.docml	Tue Aug 31 15:09:25 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,44 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<hbdocument version="0.9">
-    <object name="allAction" type="HbAction">
-        <bool name="checkable" value="TRUE"/>
-        <icon iconName="qtg_mono_location" name="icon"/>
-        <string name="text" value=""/>
-    </object>
-    <object name="collectionAction" type="HbAction">
-        <bool name="checkable" value="TRUE"/>
-        <icon iconName="qtg_mono_location_collection" name="icon"/>
-        <string name="text" value=""/>
-    </object>
-    <object name="searchAction" type="HbAction">
-        <icon iconName="qtg_mono_search" name="icon"/>
-        <string name="text" value=""/>
-    </object>
-    <object name="ascendingAction" type="HbAction">
-        <string locid="txt_lint_opt_sort_by_sub_ascending" name="text" value="Ascending"/>
-    </object>
-    <object name="descendingAction" type="HbAction">
-        <string locid="txt_lint_opt_sort_by_sub_descending" name="text" value="Descending"/>
-    </object>
-    <widget name="LocationPickerView" type="HbView">
-        <widget name="content" role="HbView:widget" type="HbWidget">
-            <layout orientation="Vertical" type="linear"/>
-        </widget>
-        <widget name="viewToolbar" role="HbView:toolBar" type="HbToolBar">
-            <ref object="allAction" role="HbToolBar:addAction"/>
-            <ref object="collectionAction" role="HbToolBar:addAction"/>
-            <ref object="searchAction" role="HbToolBar:addAction"/>
-        </widget>
-        <widget name="viewMenu" role="HbView:menu" type="HbMenu">
-            <widget name="sortByMenu" role="HbMenu:menu" type="HbMenu">
-                <ref object="ascendingAction" role="HbMenu:addAction"/>
-                <ref object="descendingAction" role="HbMenu:addAction"/>
-                <string locid="txt_lint_opt_sort_by" name="title" value="Sort By"/>
-            </widget>
-        </widget>
-        <string locid="txt_lint_title_select_location" name="title"/>
-    </widget>
-    <metadata activeUIState="Common ui state" display="NHD portrait" unit="un">
-        <uistate name="Common ui state" sections="#common"/>
-    </metadata>
-</hbdocument>
--- a/locationpickerservice/resources/popupdialog.docml	Tue Aug 31 15:09:25 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<hbdocument version="1.0">
-    <object name="action" type="HbAction">
-        <string name="role" value="HbDialog:primaryAction"/>
-        <string locid="txt_lint_button_done" name="text"/>
-    </object>
-    <widget name="dialog" type="HbDialog">
-        <widget name="container" role="HbDialog:contentWidget" type="HbWidget">
-            <widget name="mapLabel" type="HbLabel">
-                <real name="z" value="3"/>
-                <sizepolicy horizontalPolicy="Fixed" horizontalStretch="0" verticalPolicy="Fixed" verticalStretch="0"/>
-                <sizehint height="expr((var(hb-param-screen-width)-(2*var(hb-param-margin-gene-popup))-(2*var(hb-param-margin-gene-screen)))*3/4)" type="FIXED" width="expr(var(hb-param-screen-width)-(2*var(hb-param-margin-gene-popup))-(2*var(hb-param-margin-gene-screen)))"/>
-                <sizehint height="expr((var(hb-param-screen-width)-(2*var(hb-param-margin-gene-popup))-(2*var(hb-param-margin-gene-screen)))*3/4)" type="MINIMUM" width="expr(var(hb-param-screen-width)-(2*var(hb-param-margin-gene-popup))-(2*var(hb-param-margin-gene-screen)))"/>
-                <sizehint height="expr((var(hb-param-screen-width)-(2*var(hb-param-margin-gene-popup))-(2*var(hb-param-margin-gene-screen)))*3/4)" type="MAXIMUM" width="expr(var(hb-param-screen-width)-(2*var(hb-param-margin-gene-popup))-(2*var(hb-param-margin-gene-screen)))"/>
-                <bool name="visible" value="TRUE"/>
-            </widget>
-            <widget name="titleLabel" type="HbLabel">
-                <string name="plainText"/>
-            </widget>
-            <widget name="addressMiddle" type="HbLabel">
-                <string name="plainText"/>
-            </widget>
-            <widget name="addressBottom" type="HbLabel">
-                <string name="plainText"/>
-            </widget>
-            <real name="z" value="0"/>
-            <layout spacing="var(hb-param-margin-gene-popup)" type="grid">
-                <contentsmargins bottom="0un" left="0un" right="0un" top="0un"/>
-                <griditem column="0" itemname="mapLabel" row="0"/>
-                <griditem column="0" itemname="addressBottom" row="3"/>
-                <griditem column="0" itemname="titleLabel" row="1"/>
-                <griditem column="0" itemname="addressMiddle" row="2"/>
-            </layout>
-        </widget>
-        <rect height="67.31343un" name="geometry" width="46.71642un" x="2un" y="14.02985un"/>
-        <sizepolicy horizontalPolicy="Preferred" horizontalStretch="0" verticalPolicy="Preferred" verticalStretch="0"/>
-        <ref object="action" role="HbDialog:primaryAction"/>
-    </widget>
-    <metadata activeUIState="Common ui state" display="NHD portrait" unit="un">
-        <uistate name="Common ui state" sections="#common"/>
-    </metadata>
-</hbdocument>
--- a/locationpickerservice/rom/locationpickerservice.iby	Tue Aug 31 15:09:25 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,28 +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:  The locationpickerservice iby file.
-*
-*/
-#ifndef __LOCATION_PICKER_SERVICE_IBY__
-#define __LOCATION_PICKER_SERVICE_IBY__
-
-// ---- locationpickerservice --------------------------------------------------------
-
-file=ABI_DIR/BUILD_DIR/locationpickerservice.exe                   PROGRAMS_DIR/locationpickerservice.exe
-data=ZPRIVATE/10003a3f/import/apps/locationpickerservice_reg.rsc		/private/10003a3f/import/apps/locationpickerservice_reg.rsc	
-data=DATAZ_/resource/apps/locationpickerservice.rsc		/resource/apps/locationpickerservice.rsc
-// Localizations
-data=DATAZ_\QT_TRANSLATIONS_DIR\lilpicker_en.qm     QT_TRANSLATIONS_DIR\lilpicker_en.qm
-
-#endif // __LOCATION_PICKER_SERVICE_IBY__
--- a/locationpickerservice/service_conf.xml	Tue Aug 31 15:09:25 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>com.nokia.symbian</name>
-  <filepath>No path</filepath>
-  <description>Location Picker</description>
-  <interface>
-     <name>ILocationPick</name>
-     <version>1.0</version>
-     <description>Interface to pick a location</description>
-     <customproperty key="txt_aiw_action_text">Pick</customproperty>
-   </interface>
-</service>
--- a/locationpickerservice/src/hgwidgetdatamodel.cpp	Tue Aug 31 15:09:25 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,167 +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: HgWidgetDataModel implementation
-*
-*/
-
-#include <QBrush>
-#include <HbIcon>
-#include <hgwidgets/hgwidgets.h>
-#include <QPainter>
-
-#include "locationpickertypes.h"
-#include "hgwidgetdatamodel.h"
-#include "locationpickerproxymodel.h"
-
-const int MAPSTROKE(3);
-// ----------------------------------------------------------------------------
-// HgWidgetDataModel::HgWidgetDataModel()
-// ----------------------------------------------------------------------------
-HgWidgetDataModel::HgWidgetDataModel( LocationPickerProxyModel *aProxyModel, QObject *aParent )
-    : QAbstractListModel(aParent),
-      mImageType(ETypeHbIcon),
-      mDefaultImage(KDummyImage),
-      mUseLowResImages(false),
-      mProxyModel(NULL)
-{
-    mProxyModel  = aProxyModel;   
-    
-}
-
-// ----------------------------------------------------------------------------
-// HgWidgetDataModel::resetModel()
-// ----------------------------------------------------------------------------
-void HgWidgetDataModel::resetModel( LocationPickerProxyModel *aProxyModel )
-{   
-    //reset and update
-    mProxyModel = aProxyModel;
-    reset();
-    emit beginResetModel();
-    emit endResetModel();
-}
-
-
-// ----------------------------------------------------------------------------
-// HgWidgetDataModel::~HgWidgetDataModel()
-// ----------------------------------------------------------------------------
-HgWidgetDataModel::~HgWidgetDataModel()
-{
-
-}
-
-// ----------------------------------------------------------------------------
-// HgWidgetDataModel::rowCount()
-// ----------------------------------------------------------------------------
-int HgWidgetDataModel::rowCount( const QModelIndex &aParent ) const
-{
-    Q_UNUSED(aParent);
-
-    return mProxyModel->rowCount(QModelIndex());
-   
-}
-
-// ----------------------------------------------------------------------------
-// HgWidgetDataModel::data()
-// ----------------------------------------------------------------------------
-QVariant HgWidgetDataModel::data(const QModelIndex &aIndex, int aRole) const
-{   
-    int row= aIndex.row();
-    int col = aIndex.column();
-    //get proxy model index
-    QModelIndex proxyModelIndex = mProxyModel->index(row,col);
-    QVariant returnValue = QVariant();
-    if ( !aIndex.isValid() )
-    {
-        return returnValue;
-    }
-
-    if( row >= mProxyModel->rowCount(QModelIndex()) )
-    {
-        return returnValue;
-    }
-
-    switch ( aRole )
-    {
-        case HgWidget::HgVisibilityRole:
-        {
-            returnValue = true;
-        }
-        break;
-        case Qt::DisplayRole:
-        {
-            QStringList displayText;
-            QStringList adressDetail = mProxyModel->data(proxyModelIndex,Qt::DisplayRole).toStringList();
-            QString displayString;
-            if(!adressDetail[0].isEmpty())
-            {
-                displayString = adressDetail[0]+KSeparator+KSpace+adressDetail[1];
-            }
-            else
-            {
-                displayString = adressDetail[1];
-            }
-            QString text("");
-            displayText <<displayString<<text;
-            returnValue = displayText;
-            break;
-        }
-        case Qt::DecorationRole:
-        {
-            //get icon name from data model
-            QString iconName =  mProxyModel->data(proxyModelIndex,Qt::UserRole+1).toString();
-            if (iconName.isEmpty()) 
-            {
-                returnValue = mDefaultImage;
-            }
-            else 
-            {   
-                QString adressType =  mProxyModel->data(proxyModelIndex,Qt::UserRole+2).toString();
-                QPixmap mapPixmap(iconName);
-                int mapWidth = mapPixmap.width();
-                int mapHeight = mapPixmap.height();
-                QBrush brush(Qt::black,Qt::SolidPattern);
-                QPainter painter;
-                painter.begin(&mapPixmap);
-                HbIcon adressTypeIcon(adressType);
-                //draw the adressType Icon over mapTile Icon
-                adressTypeIcon.paint(&painter,QRectF((mapPixmap.width()-adressTypeIcon.width()),0,adressTypeIcon.width(),adressTypeIcon.height()));
-                painter.fillRect(QRect(0,0,mapWidth,MAPSTROKE),brush);
-                painter.fillRect(QRect(0,mapHeight-MAPSTROKE,mapWidth,(mapHeight-MAPSTROKE)),brush);
-                painter.fillRect(QRect(0,0,MAPSTROKE,mapPixmap.height()),brush);
-                painter.fillRect(QRect((mapWidth-MAPSTROKE),0,mapWidth,mapHeight),brush);
-                painter.end();
-                QIcon landscape( mapPixmap );
-                HbIcon landscapeIcon(landscape);
-                returnValue = landscapeIcon;
-            }
-            break;
-        }
-        default:
-            break;
-        }
-
-    return returnValue;
-}
-
-
-// ----------------------------------------------------------------------------
-// HgWidgetDataModel::setImageDataType()
-// ----------------------------------------------------------------------------
-void HgWidgetDataModel::setImageDataType(TImageType type)
-{
-    mImageType = type;
-}
-
-
-
--- a/locationpickerservice/src/locationpickerappwindow.cpp	Tue Aug 31 15:09:25 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,192 +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: LocationPickerAppWindow implementation
-*
-*/
-
-#include "locationpickerappwindow.h"
-
-#include "qlocationpickeritem.h"
-
-#include "locationpickersearchview.h"
-#include "locationpickerview.h"
-#include "locationpickerservice.h"
-#include "locationpickerdatamanager.h"
-#include "locationpickerdocumentloader.h"
-#include "locationpickercontent.h"
-
-// ----------------------------------------------------------------------------
-// LocationPickerAppWindow::LocationPickerAppWindow()
-// ----------------------------------------------------------------------------
-LocationPickerAppWindow::LocationPickerAppWindow( QWidget *parent, Hb::WindowFlags windowFlags )
-	:HbMainWindow(parent, windowFlags),
-	mLocationPickerSearchView(NULL),
-    mLocationPickerDocumentLoader(NULL),
-	mLocationPickerView(NULL),
-	mLocationPickerContent(NULL),
-    mService(NULL)
-{
-    // create the service object;
-    mService = new LocationPickerService(this);
-    mLocationPickerContent = new LocationPickerContent();
-    
-    //create document loader object
-    mLocationPickerDocumentLoader = new LocationPickerDocumentLoader();
-    bool ok = false;
-    //load the Locationpicker view
-    mLocationPickerDocumentLoader->load(":/locationpickerview.docml", &ok);
-    Q_ASSERT_X(ok, "locationpickerservice", "invalid DocML file");
-    //find graphics location picker potrait view
-    QGraphicsWidget *locationPickerWidget = mLocationPickerDocumentLoader->findWidget("LocationPickerView");
-    Q_ASSERT_X((locationPickerWidget != 0), "locationpickerservice", "invalid DocML file");
-    mLocationPickerView = qobject_cast<LocationPickerView*>(locationPickerWidget);
-    bool populated = mLocationPickerContent->populateModel();
-    connectSlots();
-    if(!populated)
-    {
-        mLocationPickerView->disableTabs();
-        addView(mLocationPickerView);
-        setCurrentView(mLocationPickerView);
-    }
-    else
-    {    
-    //initialize potrait widgets and connect to respective signals 
-    mLocationPickerView->init( this->orientation(), mLocationPickerContent->getStandardModel());
-    addView( mLocationPickerView );
-    setCurrentView(mLocationPickerView);
-    //connect to orientationChanged signal
-     connect(this, SIGNAL(orientationChanged(Qt::Orientation)),this, SLOT(changeOrientation(Qt::Orientation)));
-    connect(this, SIGNAL(aboutToChangeOrientation()),this, SLOT(closeDetailsDialog()));
-     
-    }
-}
-
-// ----------------------------------------------------------------------------
-// LocationPickerAppWindow::~LocationPickerAppWindow()
-// ----------------------------------------------------------------------------
-LocationPickerAppWindow::~LocationPickerAppWindow()
-{
-    delete mService;
-    delete mLocationPickerSearchView;
-    delete mLocationPickerDocumentLoader;
-    delete mLocationPickerView;
-    delete mLocationPickerContent;
-}
-
-// ----------------------------------------------------------------------------
-// LocationPickerAppWindow::itemSelected()
-// ----------------------------------------------------------------------------
-void LocationPickerAppWindow::itemSelected( quint32 aLmid )
-{
-    QLocationPickerItem item;
-    LocationPickerDataManager::getInstance()->getLocationItem(aLmid, item);
-    // complete the request
-    mService->complete(item);
-}
-
-void LocationPickerAppWindow::serviceComplete()
-{
-    // Other views request complete with a valid location picker item
-    QLocationPickerItem item;
-    item.mIsValid = false;
-    mService->complete(item);
-}
-// ----------------------------------------------------------------------------
-// LocationPickerAppWindow::activateSearchView()
-// ----------------------------------------------------------------------------
-void LocationPickerAppWindow::activateSearchView()
-{   
-    //load the LocationPickerSearchView
-    bool ok = false;
-    if(!mLocationPickerSearchView)
-    {
-        mLocationPickerDocumentLoader->load(":/locationpickersearchview.docml", &ok);
-        Q_ASSERT_X(ok, "locationpickerService", "invalid DocML file");
-        //find the LocationPickerSearchView
-        QGraphicsWidget *locationPickerSearchWidget = mLocationPickerDocumentLoader->findWidget("LocationPickerSearchView");
-        Q_ASSERT_X((locationPickerSearchWidget != 0), "locationpickerService", "invalid DocML file");
-        mLocationPickerSearchView = qobject_cast<LocationPickerSearchView*>(locationPickerSearchWidget);
-        Q_ASSERT_X((mLocationPickerSearchView != 0), "mLocationPickerSearchView", 
-            "qobject cast failure");
-        //initialize the action items and connect to slots
-        mLocationPickerSearchView->init(mLocationPickerContent->getStandardModel());
-        connect(mLocationPickerSearchView,SIGNAL(switchView()),this,SLOT(activateLocationPickerView()));
-        connect(mLocationPickerSearchView,SIGNAL(selectItem( quint32 )),this,SLOT(itemSelected( quint32 )));
-        addView(mLocationPickerSearchView);
-    }
-    //set LocationPickerSearchview as current view
-    setCurrentView(mLocationPickerSearchView);
-   
-}
-
-
-// ----------------------------------------------------------------------------
-// LocationPickerAppWindow::activateLocationPickerView()
-// ----------------------------------------------------------------------------
-void LocationPickerAppWindow::activateLocationPickerView()
-{ 
-    mLocationPickerView->setViewType( ELocationPickerContent );
-    //check the orientation and load view accordingly 
-    if(this->orientation() == Qt::Horizontal)
-    {
-        mLocationPickerView->manageHgWidget();
-    }
-    else
-    { 
-        mLocationPickerView->manageListView();
-    }
-    setCurrentView(mLocationPickerView);
-}
-
-// ----------------------------------------------------------------------------
-// LocationPickerAppWindow::changeOrientation()
-// ----------------------------------------------------------------------------
-void LocationPickerAppWindow::changeOrientation( Qt::Orientation )
-{   
-    //check the orientation and load view accordingly 
-    if(mLocationPickerView->getViewType()== ELocationPickerCollectionContent || 
-            mLocationPickerView->getViewType()== ELocationPickerContent )
-    {
-        if(this->orientation() == Qt::Vertical)
-       {
-            mLocationPickerView->manageListView();
-      
-       }
-       
-   else if(this->orientation() == Qt::Horizontal)
-       {
-           mLocationPickerView->manageHgWidget();
-       }
-    }
-}
-
-// ----------------------------------------------------------------------------
-// LocationPickerAppWindow::closeDetailsDialog()
-// ----------------------------------------------------------------------------
-void LocationPickerAppWindow::closeDetailsDialog()
-{
-    mLocationPickerView->closeDetailsDialog();
-}
-
-// ----------------------------------------------------------------------------
-// LocationPickerAppWindow::connectSlots()
-// ----------------------------------------------------------------------------
-void LocationPickerAppWindow::connectSlots()
-{
-    connect(mLocationPickerView,SIGNAL(switchToSearchView()),this,SLOT(activateSearchView()));
-    connect(mLocationPickerView,SIGNAL(selectItem( quint32 )),this,SLOT(itemSelected( quint32 )));
-    connect(mLocationPickerView,SIGNAL(completeService()),this,SLOT(serviceComplete()));
-}
-
-Q_IMPLEMENT_USER_METATYPE(QLocationPickerItem)
--- a/locationpickerservice/src/locationpickercollectioncontent.cpp	Tue Aug 31 15:09:25 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,96 +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: LocationPickerCollectionContent implementation
-*
-*/
-
-#include <QStandardItemModel>
-
-#include "locationpickerproxymodel.h"
-#include "locationpickercollectioncontent.h"
-#include "locationpickerdatamanager.h"
-#include "locationpickertypes.h"
-
-// ======== MEMBER FUNCTIONS ========
-
-// ----------------------------------------------------------------
-// LocationPickerCollectionContent::LocationPickerCollectionContent()
-// -----------------------------------------------------------------
-LocationPickerCollectionContent::LocationPickerCollectionContent( quint32 aCollectionId )
-    :mProxyModel(NULL),
-    mModel(NULL),
-    mDataManager(NULL),
-	mLocationFound(false)
-{
-    // Create a standard model for the view list
-    mModel = new QStandardItemModel( this );
-    // create data manager to manage data in the model
-    mDataManager = LocationPickerDataManager::getInstance();
-    if( mDataManager->populateModel( *mModel, ELocationPickerCollectionContent, aCollectionId ) )
-    {
-        // Create the proxy model.
-        mProxyModel = new LocationPickerProxyModel();
-        mProxyModel->setSourceModel(mModel);
-        mProxyModel->setDynamicSortFilter(TRUE);
-        mProxyModel->setSortRole(Qt::DisplayRole);
-        mProxyModel->setSortCaseSensitivity(Qt::CaseInsensitive);
-        // sort
-        mProxyModel->sort(0, Qt::AscendingOrder);
-        mLocationFound = true;
-    }
-    else
-    {
-        // no locations to display.
-        QStandardItem *modelItem = new QStandardItem();
-        modelItem->setData(QVariant(hbTrId("txt_lint_list_no_location_entries_present")), Qt::DisplayRole);
-        mModel->appendRow( modelItem );
-        mLocationFound = false;
-     }
-}
-
-// ----------------------------------------------------------------
-// LocationPickerCollectionContent::~LocationPickerCollectionContent
-// -----------------------------------------------------------------
-LocationPickerCollectionContent::~LocationPickerCollectionContent()
-{
-    delete mProxyModel;
-    delete mModel;
-}
-
-// ----------------------------------------------------------------
-// LocationPickerCollectionContent::getProxyModel
-// -----------------------------------------------------------------
-LocationPickerProxyModel* LocationPickerCollectionContent::getProxyModel()
-{
-    return mProxyModel;
-}
-
-// ----------------------------------------------------------------------------
-// LocationPickerCollectionContent::getData()
-// ----------------------------------------------------------------------------
-
-void LocationPickerCollectionContent::getData( QModelIndex aIndex, quint32& aValue )
-{
-    QStandardItem* item = mModel->item( aIndex.row(), aIndex.column() );
-    QVariant var = item->data( Qt::UserRole );
-    aValue = var.toUInt();
-}
-
-// ----------------------------------------------------------------------------
-// LocationPickerCollectionContent::locationFound()
-// ----------------------------------------------------------------------------
-bool LocationPickerCollectionContent::locationFound()
-{
-    return mLocationFound;
-}
--- a/locationpickerservice/src/locationpickercollectionlistcontent.cpp	Tue Aug 31 15:09:25 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,71 +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: LocationPickerCollectionListContent implementation
-*
-*/
-
-#include <QStandardItemModel>
-
-#include "locationpickercollectionlistcontent.h"
-#include "locationpickerdatamanager.h"
-
-// ======== MEMBER FUNCTIONS ========
-
-// ----------------------------------------------------------------------
-// LocationPickerCollectionListContent::LocationPickerCollectionListContent()
-// ----------------------------------------------------------------------
-LocationPickerCollectionListContent::LocationPickerCollectionListContent()
-    :mModel(NULL),
-    mDataManager(NULL)
-{
-    // Create a standard model for the view list
-    mModel = new QStandardItemModel( this );
-    if(mModel)
-    {
-        // create data manager to manage data in the model
-        mDataManager = LocationPickerDataManager::getInstance();
-        bool populated = mDataManager->populateModel( *mModel, ELocationPickerCollectionListContent);
-        if(!populated)
-        {
-        qFatal("Error creating collection");
-        }
-    }
-}
-
-// ----------------------------------------------------------------------
-// LocationPickerCollectionListContent::~LocationPickerCollectionListContent()
-// ----------------------------------------------------------------------
-LocationPickerCollectionListContent::~LocationPickerCollectionListContent()
-{
-    delete mModel;
-}
-
-// ----------------------------------------------------------------
-// LocationPickerCollectionListContent::getStandardModel
-// -----------------------------------------------------------------
-QStandardItemModel* LocationPickerCollectionListContent::getStandardModel()
-{
-    return mModel;
-}
-
-// ----------------------------------------------------------------------------
-// LocationPickerCollectionListContent::getData()
-// ----------------------------------------------------------------------------
-
-void LocationPickerCollectionListContent::getData( QModelIndex aIndex, quint32& aValue )
-{
-    QStandardItem* item = mModel->item( aIndex.row(), aIndex.column() );
-    QVariant var = item->data( Qt::UserRole );
-    aValue = var.toUInt();
-}
--- a/locationpickerservice/src/locationpickercontent.cpp	Tue Aug 31 15:09:25 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: LocationPickerContent implementation
-*
-*/
-
-#include <QStandardItemModel>
-
-#include "locationpickercontent.h"
-#include "locationpickerproxymodel.h"
-#include "locationpickertypes.h"
-#include "locationpickerdatamanager.h"
-
-// ======== MEMBER FUNCTIONS ========
-
-// -----------------------------------------------------------------------------
-// LocationPickerContent::LocationPickerContent()
-// -----------------------------------------------------------------------------
-LocationPickerContent::LocationPickerContent()
-	:mDataManager(NULL),
-	mStandardModel(NULL)
-{
-    // create data manager to manage data in the model
-    mDataManager = LocationPickerDataManager::getInstance();
-
-}
-
-// -----------------------------------------------------------------------------
-// LocationPickerContent::populateModel()
-// -----------------------------------------------------------------------------
-bool LocationPickerContent::populateModel()
-{
-    bool locationsFound;
-    // Create a standard model for the list view
-    mStandardModel = new QStandardItemModel( this );
-    if( mDataManager->populateModel( *mStandardModel, ELocationPickerContent ) )
-    {
-        locationsFound = true;
-    }
-    else
-    {
-        createNoEntryDisplay(mStandardModel);
-        locationsFound = false;
-    }
-    return locationsFound;
-}
-
-// -----------------------------------------------------------------------------
-// LocationPickerContent::LocationPickerContent()
-// -----------------------------------------------------------------------------
-LocationPickerContent::~LocationPickerContent()
-{
-    delete mStandardModel;
-}
-
-
-// -----------------------------------------------------------------------------
-// LocationPickerContent::getStandardModel()
-// -----------------------------------------------------------------------------
-QStandardItemModel* LocationPickerContent::getStandardModel()
-{
-    return mStandardModel;
-}
-
-// ----------------------------------------------------------------------------
-// LocationPickerContent::createNoEntryDisplay()
-// ----------------------------------------------------------------------------
-
-void LocationPickerContent::createNoEntryDisplay( QStandardItemModel *aModel )
-{
-    // no locations to display.
-    QStandardItem *modelItem = new QStandardItem();
-    modelItem->setData(QVariant(hbTrId("txt_lint_list_no_location_entries_present")), Qt::DisplayRole);
-    aModel->appendRow( modelItem );
-}
--- a/locationpickerservice/src/locationpickerdatamanager.cpp	Tue Aug 31 15:09:25 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,67 +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: LocationPickerDataManager implementation
-*
-*/
-
-#include "locationpickerdatamanager.h"
-#include "locationpickerdatamanager_p.h"
-
-
-// ----------------------------------------------------------------------------
-// LocationPickerDataManager::getInstance()
-// ----------------------------------------------------------------------------
-LocationPickerDataManager* LocationPickerDataManager::getInstance()
-{
-    static LocationPickerDataManager singletonInstance;
-    return &singletonInstance;
-}
-
-// ----------------------------------------------------------------------------
-// LocationPickerDataManager::LocationPickerDataManager()
-// ----------------------------------------------------------------------------
-
-LocationPickerDataManager::LocationPickerDataManager() :
-    d_ptr( new LocationPickerDataManagerPrivate() )
-{
-}
-
-
-// ----------------------------------------------------------------------------
-// LocationPickerDataManager::~LocationPickerDataManager()
-// ----------------------------------------------------------------------------
-LocationPickerDataManager::~LocationPickerDataManager()
-{
-    delete d_ptr;
-}
-
-// ----------------------------------------------------------------------------
-// LocationPickerDataManager::populateModel()
-// ----------------------------------------------------------------------------
-bool LocationPickerDataManager::populateModel( QStandardItemModel &aModel, TViewType aViewType, 
-        quint32 aCollectionId )
-{   
-    Q_D( LocationPickerDataManager);
-    return( d->populateModel( aModel, aViewType, aCollectionId) );
-}
-
-// ----------------------------------------------------------------------------
-// LocationPickerDataManager::getLocationItem()
-// ----------------------------------------------------------------------------
-
-void LocationPickerDataManager::getLocationItem( quint32 aLmId, QLocationPickerItem& aItem )
-{
-    Q_D( LocationPickerDataManager);
-    return( d->getLocationItem( aLmId, aItem ) );
-}
--- a/locationpickerservice/src/locationpickerdatamanager_p.cpp	Tue Aug 31 15:09:25 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,339 +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: LocationPickerDataManager private implementation
-*
-*/
-
-#include <HbIcon>
-#include <locationdatalookupdb.h>
-#include <QFile>
-#include "locationpickerdatamanager_p.h"
-
-
-// ----------------------------------------------------------------------------
-// LocationPickerDataManagerPrivate::LocationPickerDataManagerPrivate()
-// ----------------------------------------------------------------------------
-
-LocationPickerDataManagerPrivate::LocationPickerDataManagerPrivate() :
-        mModel( NULL ),
-        mViewType( ELocationPickerContent ),
-        mDb( NULL )
-{
-    mDb = new LocationDataLookupDb();
-    mDb->open();
-}
-
-
-// ----------------------------------------------------------------------------
-// LocationPickerDataManagerPrivate::~LocationPickerDataManagerPrivate()
-// ----------------------------------------------------------------------------
-LocationPickerDataManagerPrivate::~LocationPickerDataManagerPrivate()
-{
-    // delete the member variables;
-    if( mDb )
-    {
-        mDb->close();
-        delete mDb;
-        mDb = NULL;
-    }
-}
-
-// ----------------------------------------------------------------------------
-// LocationPickerDataManagerPrivate::populateModel()
-// ----------------------------------------------------------------------------
-bool LocationPickerDataManagerPrivate::populateModel(  QStandardItemModel &aModel, 
-        TViewType aViewType, quint32 aCollectionId )
-{
-    mModel = &aModel;
-    mViewType = aViewType;
-
-    if( !mDb )
-    {
-        // no items in the landmark database, so return false.
-        return false;
-    }
-
-    switch( mViewType )
-    {
-        case ELocationPickerContent:
-        case ELocationPickerSearchView:
-             {
-                 QList<QLookupItem> itemArray;
-                 mDb->getEntries( itemArray );
-                 return populateLandmarks( itemArray );
-             }
-             
-        case ELocationPickerCollectionListContent:
-             {
-                 QList<int> aCount;
-                 mDb->getCount(aCount, aCollectionId);
-                 populateCollections(aCount);
-                 return true;
-             }
-        case ELocationPickerCollectionContent:
-             {
-                 QList<QLookupItem> itemArray;
-                 mDb->getEntries( itemArray, aCollectionId );             
-                 if( itemArray.count() == 0 )
-                     return false;
-                 
-                 return populateLandmarks( itemArray );
-             }
-    }
-    return true;
-}
-
-// ----------------------------------------------------------------------------
-// LocationPickerDataManagerPrivate::populateLandmarks()
-// ----------------------------------------------------------------------------
-
-bool LocationPickerDataManagerPrivate::populateLandmarks( QList<QLookupItem> &aItemArray )
-{    
-    mModel->clear();
-
-    if( !aItemArray.count() )
-    {
-        return false;
-    }
-    QString lmAddressLine1;
-    QString lmAddressLine2;
-    QString contextAddress;
-    QString contextAddressCountry;
-    
-    for( int i = 0; i < aItemArray.count(); i++ )
-    {
-        contextAddress.clear();
-        contextAddressCountry.clear();
-        lmAddressLine1.clear();
-        lmAddressLine2.clear();
-    
-        if( !aItemArray[i].mIsDuplicate )
-        {
-            lmAddressLine1 = aItemArray[i].mName;
-            
-            bool addressEmtpy = true; // used to check if address line 2 is empty
-            if( !aItemArray[i].mStreet.isEmpty() )
-            {
-                if( lmAddressLine1.isEmpty() )
-                {
-                    lmAddressLine1 = aItemArray[i].mStreet;
-                }
-                else
-                {
-                    lmAddressLine2 = aItemArray[i].mStreet;
-                    addressEmtpy = EFalse;
-            	  }
-            }
-            if( !aItemArray[i].mCity.isEmpty() )
-            {
-                if( lmAddressLine1.isEmpty() )
-                {
-                    lmAddressLine1 = aItemArray[i].mCity;
-                }
-                else
-                {
-                    if( !addressEmtpy )
-                    {
-                        lmAddressLine2 = lmAddressLine2 + KSeparator;
-                        lmAddressLine2 = lmAddressLine2 + KSpace;
-                        lmAddressLine2 = lmAddressLine2 + aItemArray[i].mCity;
-                    }
-                    else
-                    {
-                        lmAddressLine2 = aItemArray[i].mCity;
-                        addressEmtpy = EFalse;
-                    }
-                }
-            }
-            if( !aItemArray[i].mState.isEmpty() )
-            {
-                if( lmAddressLine1.isEmpty() )
-                {
-                    lmAddressLine1 = aItemArray[i].mState;
-                }
-                else
-                {
-                    if( !addressEmtpy )
-                    {
-                        lmAddressLine2 = lmAddressLine2 + KSeparator;
-                        lmAddressLine2 = lmAddressLine2 + KSpace;
-                        lmAddressLine2 = lmAddressLine2 + aItemArray[i].mState;
-                    }
-                    else
-                    {
-                        lmAddressLine2 = aItemArray[i].mState;
-                        addressEmtpy = EFalse;
-                    }
-                }
-            }
-            contextAddress = lmAddressLine2;
-            if( !aItemArray[i].mCountry.isEmpty() )
-            {
-                if( !addressEmtpy )
-                {
-                    lmAddressLine2 = lmAddressLine2 + KSeparator;
-                    lmAddressLine2 = lmAddressLine2 + KSpace;
-                    lmAddressLine2 = lmAddressLine2 + aItemArray[i].mCountry;
-                }
-                else
-                {
-                    lmAddressLine2 = aItemArray[i].mCountry;
-                    addressEmtpy = EFalse;
-                }
-                contextAddressCountry = aItemArray[i].mCountry;
-            }
-            // set icons based on contact address type
-            QVariantList icons;
-            HbIcon adressTypeIcon;
-            HbIcon potraitIcon;
-            QString adressType;
-            bool adressIconPresent = false;
-            if( aItemArray[i].mSourceType == ESourceContactsHome )
-            {
-                adressTypeIcon = HbIcon(KContactHomeIcon);
-                adressType = KContactHomeIcon;
-                adressIconPresent = true;
-            }
-            else if( aItemArray[i].mSourceType == ESourceContactsWork )
-            {
-                adressTypeIcon = HbIcon(KContactWorkIcon);
-                adressType = KContactWorkIcon;
-                adressIconPresent = true;
-            }
-            
-            if( aItemArray[i].mSourceType == ESourceCalendar )
-            {
-                potraitIcon = HbIcon( KCalendarImage );
-            }
-            else if( aItemArray[i].mSourceType == ESourceContactsWork ||  aItemArray[i].mSourceType 
-                    == ESourceContactsHome || aItemArray[i].mSourceType == ESourceContactsPref )
-            {
-                potraitIcon = HbIcon( KContactsImage );
-            }    
-            else
-            {
-                potraitIcon = HbIcon( KDummyImage );
-            }
-        
-            // create a list item and set to model
-            QStringList addressData;
-            QString landscapeIconPath;
-
-            if( QFile::exists( aItemArray[i].mMapTilePath ) )
-            { 
-                //draw maptile Icon            
-                landscapeIconPath = QString( aItemArray[i].mMapTilePath );
-            }
-            else
-            {
-                //draw dummy icon
-                landscapeIconPath = QString("");
-            }
-            addressData.clear();
-            icons<<potraitIcon;
-            if(adressIconPresent)
-            {
-                icons<<adressTypeIcon;
-            }
-            QStringList contextList;
-            contextList<<lmAddressLine1<<contextAddress<<contextAddressCountry;
-            QStandardItem *modelItem = new QStandardItem();
-            addressData << lmAddressLine1 << lmAddressLine2;
-            modelItem->setData(QVariant(addressData), Qt::DisplayRole);
-            modelItem->setData( icons, Qt::DecorationRole );
-            modelItem->setData( aItemArray[i].mId, Qt::UserRole );
-            modelItem->setData(landscapeIconPath,Qt::UserRole+1);
-            modelItem->setData(adressType,Qt::UserRole+2);
-            modelItem->setData(QVariant(contextList), Qt::UserRole+3);
-            
-            mModel->appendRow( modelItem );
-         }
-   }
-    
-    return true;
-}
-
-// ----------------------------------------------------------------------------
-// LocationPickerDataManagerPrivate::populateCollections()
-// ----------------------------------------------------------------------------
-
-void LocationPickerDataManagerPrivate::populateCollections(QList<int>& aCount)
-{
-    // add contact collection
-    QStandardItem *modelItemContact = new QStandardItem();
-    int conNum = aCount.value(0);
-    QString contactCollectionNum(hbTrId("txt_lint_list_ln_items",conNum));
-    QString contactCollectionName( hbTrId("txt_lint_list_contact_addresses") );
- 
-
-    QStringList contact = (QStringList()<<contactCollectionName<<contactCollectionNum);
-    modelItemContact->setData( QVariant( contact ), Qt::DisplayRole );
-      
-    modelItemContact->setData( HbIcon ( KCollectionsContacts ), Qt::DecorationRole );
-    modelItemContact->setData( ESourceLandmarksContactsCat, Qt::UserRole );
-    mModel->appendRow( modelItemContact );
-   
-    //txt_lint_list_calender_addresses
-    int calNum = aCount.value(1);
-    QString calendarCollectionNum(hbTrId("txt_lint_list_ln_items",calNum));
-    QString calendarCollectionName( hbTrId("txt_lint_list_calendar_locations") );
-    QStringList calender = (QStringList()<<calendarCollectionName<<calendarCollectionNum);
-    
-    QStandardItem *modelItemCalendar = new QStandardItem();
-    modelItemCalendar->setData( QVariant( calender ), Qt::DisplayRole );
-    modelItemCalendar->setData( HbIcon ( KCollectionsCalendar ), Qt::DecorationRole );
-    modelItemCalendar->setData( ESourceLandmarksCalendarCat, Qt::UserRole );
-    mModel->appendRow( modelItemCalendar );
-     
-    //txt_lint_list_places_addresses
-    int placNum = aCount.value(2);
-    QString placesCollectionNum(hbTrId("txt_lint_list_ln_items",placNum));
-    QString placesCollectionName( hbTrId("txt_lint_list_places") );
-    QStringList places = (QStringList()<<placesCollectionName<<placesCollectionNum);
-
-    QStandardItem *modelItemPlaces = new QStandardItem();
-    modelItemPlaces->setData( QVariant( places ), Qt::DisplayRole );
-    modelItemPlaces->setData( HbIcon (KCollectionsPlaces), Qt::DecorationRole );
-    modelItemPlaces->setData( ESourceLandmarks, Qt::UserRole );
-    mModel->appendRow( modelItemPlaces );
-}
-
-
-// ----------------------------------------------------------------------------
-// LocationPickerDataManagerPrivate::getLocationItem()
-// ----------------------------------------------------------------------------
-
-void LocationPickerDataManagerPrivate::getLocationItem( quint32 aId, QLocationPickerItem& aItem )
-{
-    QLookupItem item;
-    item.mId = aId;
-    if( mDb->findEntryById( item ) )
-    {
-        aItem.mName = item.mName;
-        aItem.mStreet = item.mStreet;
-        aItem.mPostalCode = item.mPostalCode;
-        aItem.mCity = item.mCity;
-        aItem.mState = item.mState;
-        aItem.mCountry = item.mCountry;
-        aItem.mLatitude = item.mLatitude;
-        aItem.mLongitude = item.mLongitude;
-        aItem.mIsValid = true;
-    }
-    else
-    {
-        aItem.mIsValid = false;
-    }
-    
-}
-
--- a/locationpickerservice/src/locationpickerdocumentloader.cpp	Tue Aug 31 15:09:25 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: locationpickerdocumentloader implementation
-*
-*/
-
-#include "locationpickerdocumentloader.h"
-#include "locationpickerview.h"
-#include "locationpickersearchview.h"
-
-// ---------------------------------------------------------------------------
-// LocationPickerDocumentLoader::LocationPickerDocumentLoader()
-// ---------------------------------------------------------------------------
-//
-LocationPickerDocumentLoader::LocationPickerDocumentLoader()
-{
-}
-
-// ---------------------------------------------------------------------------
-// LocationPickerDocumentLoader::~LocationPickerDocumentLoader()
-// ---------------------------------------------------------------------------
-//
-LocationPickerDocumentLoader::~LocationPickerDocumentLoader()
-{
-}
-
-// ---------------------------------------------------------------------------
-// LocationPickerDocumentLoader::createObject
-// ---------------------------------------------------------------------------
-//
-QObject *LocationPickerDocumentLoader::createObject( const QString& type, const QString &name )
-{   
-    //for locationpickerview
-    if ( name == LocationPickerView::staticMetaObject.className() )
-    {
-        QObject *object = new LocationPickerView(this);
-        object->setObjectName( name );
-        return object;
-    }
-    //for locationpickersearchview
-    if ( name == LocationPickerSearchView::staticMetaObject.className() )
-    {
-        QObject *object = new LocationPickerSearchView(*this);
-        object->setObjectName( name );
-        return object;
-    }
-    //default case
-    return HbDocumentLoader::createObject( type, name );
-}
--- a/locationpickerservice/src/locationpickerproxymodel.cpp	Tue Aug 31 15:09:25 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,74 +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: LocationPickerProxyModel implementation
-*
-*/
-
-#include <QStandardItemModel>
-#include "locationpickerproxymodel.h"
-
-// ----------------------------------------------------
-// LocationPickerProxyModel::LocationPickerProxyModel()
-// ----------------------------------------------------
-
-LocationPickerProxyModel::LocationPickerProxyModel( QObject *parent )
-     :QSortFilterProxyModel(parent)
-{
-}
-
-// ----------------------------------------------------
-// LocationPickerProxyModel::lessThan()
-// ----------------------------------------------------
- bool LocationPickerProxyModel::lessThan( const QModelIndex &left,
-                                      const QModelIndex &right ) const
-{
-     // get left and right items data and implement sort logic
-     // return true if left is less than right
-     QVariant leftData = sourceModel()->data(left);
-     QVariant rightData = sourceModel()->data(right);
-
-     QStringList leftStringList = leftData.toStringList();
-
-     QStringList rightStringList = rightData.toStringList();
-
-     return QString::compare( QString( leftStringList[0] + " " + leftStringList[1] ),
-             QString( rightStringList[0] + " " + rightStringList[1] ), Qt::CaseInsensitive ) < 0;
-
-}
-
- // ----------------------------------------------------
-// LocationPickerProxyModel::filterAcceptsRow()
-// ----------------------------------------------------
-
-bool LocationPickerProxyModel::filterAcceptsRow( int sourceRow,
-        const QModelIndex &sourceParent ) const
-{
-
-    // implement logic for search.
-    QModelIndex index0 = sourceModel()->index(sourceRow, 0, sourceParent);
-
-    QStringList stringList = sourceModel()->data(index0).toStringList();
-    QString fullString = " " + stringList[0] + " " + stringList[1];
-
-    return (fullString.contains(mSearchText, Qt::CaseInsensitive));
-
-}
-
- // ----------------------------------------------------
-// LocationPickerProxyModel::filterParameterChanged()
-// ----------------------------------------------------
-void LocationPickerProxyModel::filterParameterChanged( QString aSearchText )
-{
-    mSearchText = " " + aSearchText;
-}
--- a/locationpickerservice/src/locationpickersearchview.cpp	Tue Aug 31 15:09:25 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,207 +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: LocationPickerSearchView implementation
-*
-*/
-
-#include <HbListViewItem>
-#include <QStandardItemModel>
-#include <HbSearchPanel>
-#include <HbListView>
-#include <HbTextItem>
-#include <HbDocumentLoader>
-#include <QGraphicsLinearLayout>
-#include <HbMenu>
-#include <HbAction>
-
-#include "locationpickerproxymodel.h"
-#include "locationpickersearchview.h"
-#include "locationpickerdatamanager.h"
-
-// ======== MEMBER FUNCTIONS ========
-
-// ----------------------------------------------------
-// LocationPickerSearchView::LocationPickerSearchView()
-// ----------------------------------------------------
-LocationPickerSearchView::LocationPickerSearchView( HbDocumentLoader &aLoader )
-    :mProxyModel(NULL),
-    mModel(NULL),
-    mListView(NULL),
-    mSearchPanel(NULL),
-    mEmptyLabel(NULL),
-    mVerticalLayout(NULL),
-    mDocumentLoader(aLoader),
-	mLongPressMenu(NULL),
-	mSelectAction(NULL)
-{
-
-}
-// ----------------------------------------------------
-// LocationPickerSearchView::~LocationPickerSearchView()
-// ----------------------------------------------------
-LocationPickerSearchView::~LocationPickerSearchView()
-{
-    delete mProxyModel;
-    delete mEmptyLabel;
-}
-
-// ----------------------------------------------------
-// LocationPickerSearchView::init()
-// ----------------------------------------------------
-void LocationPickerSearchView::init( QStandardItemModel *aModel )
-{   
-    mModel = aModel;
-    //get listview from docml
-    mListView = qobject_cast<HbListView*>(
-            mDocumentLoader.findObject(QString("SearchListView")));
-    if(!mListView)
-    {
-        qFatal("Error Reading Docml");   
-    }
-    //get search panel from docml
-    mSearchPanel = qobject_cast<HbSearchPanel*>(
-            mDocumentLoader.findObject(QString("searchPanel")));
-    //conect to respective slots
-    connect(mListView, SIGNAL(activated(const QModelIndex &)), this, SLOT(handleActivated
-    (const QModelIndex &)));
-    connect(mListView,SIGNAL(longPressed(HbAbstractViewItem*, const QPointF &)),this,
-                SLOT(launchPopUpMenu(HbAbstractViewItem*, const QPointF &)));
-    connect(mSearchPanel, SIGNAL(exitClicked()),this, SLOT(handleExit()));
-    connect(mSearchPanel,SIGNAL(criteriaChanged(QString)),this,SLOT(doSearch(QString)));
-    
-    //Set graphics size for the list items.
-    HbListViewItem *hbListItem = new HbListViewItem();
-    hbListItem->setGraphicsSize(HbListViewItem::Thumbnail);
-    mListView->setItemPrototype( hbListItem );
-
-    // Create the proxy model.
-    mProxyModel = new LocationPickerProxyModel();
-    mProxyModel->setSourceModel(mModel);
-    mListView->setModel(mProxyModel);
-
-    // set filter properties
-    mProxyModel->setDynamicSortFilter(TRUE);
-    mProxyModel->setSortRole(Qt::DisplayRole);
-    mProxyModel->setSortCaseSensitivity(Qt::CaseInsensitive);
-    // sort 
-    mProxyModel->sort(0, Qt::AscendingOrder);
-}
-
-// ----------------------------------------------------
-// LocationPickerSearchView::handleExit()
-// ----------------------------------------------------
-void LocationPickerSearchView::handleExit()
-{   
-    //emit signal to switch the current view
-    emit switchView();
-}
-
-// ----------------------------------------------------
-// LocationPickerSearchView::doSearch()
-// ----------------------------------------------------
-void LocationPickerSearchView::doSearch( QString aCriteria )
-{
-    // use the string to search
-    mProxyModel->filterParameterChanged(aCriteria);
-    mProxyModel->setFilterFixedString(aCriteria);
-    //if no entries presentdisplay empty text item
-    if (!mProxyModel->rowCount() )
-    {
-        if(!mEmptyLabel)
-        {    
-            QGraphicsWidget *widget = NULL;
-            widget = mDocumentLoader.findWidget(QString("container"));
-            mVerticalLayout = static_cast<QGraphicsLinearLayout*>(widget->layout());
-            if(!widget || !mVerticalLayout)
-            {
-                qFatal("Error Reading Docml"); 
-            }
-            mVerticalLayout->removeItem(mListView);
-            mListView->setVisible(false);
-            mEmptyLabel = new HbTextItem(hbTrId("txt_lint_list_no_results"));
-            mEmptyLabel->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
-            mEmptyLabel->setFontSpec(HbFontSpec(HbFontSpec::Primary));
-            mEmptyLabel->setAlignment(Qt::AlignCenter);
-            mVerticalLayout->insertItem(0, mEmptyLabel);
-            mEmptyLabel->setVisible(true);
-        }
-    }
-    //else display the result
-    else if (mEmptyLabel)
-    {   
-        mVerticalLayout->removeItem(mEmptyLabel);
-        mEmptyLabel->setVisible(false);
-        delete mEmptyLabel;
-        mEmptyLabel=NULL;
-        mVerticalLayout->insertItem(0, mListView);
-        mListView->setVisible(true);
-    }
-}
-
-// ----------------------------------------------------
-// LocationPickerSearchView::handleActivated()
-// ----------------------------------------------------
-void LocationPickerSearchView::handleActivated( const QModelIndex &aIndex )
-{
-    QModelIndex index = mProxyModel->mapToSource(aIndex);
-    quint32 lm = 0;
-    getData( index, lm );
-    //emit item is selectedsignal
-    emit selectItem( lm );
-}
-
-// ----------------------------------------------------------------------------
-// LocationPickerSearchView::getData()
-// ----------------------------------------------------------------------------
-
-void LocationPickerSearchView::getData( QModelIndex aIndex, quint32& aValue )
-{
-    QStandardItem* item = mModel->item( aIndex.row(), aIndex.column() );
-    QVariant var = item->data( Qt::UserRole );
-    aValue = var.toUInt();
-}
-
-// -----------------------------------------------------------------------------
-// LocationPickerSearchView::launchPopUpMenu()
-// -----------------------------------------------------------------------------
-void LocationPickerSearchView::launchPopUpMenu(HbAbstractViewItem *aItem, const QPointF &aPoint)
-{
-    mLongPressMenu = new HbMenu();
-    mLongPressMenu->setTimeout(HbMenu::NoTimeout);
-    mSelectAction  = mLongPressMenu->addAction(hbTrId("txt_lint_list_select"));
-    mIndex = aItem->modelIndex();
-    connect(mSelectAction, SIGNAL(triggered()),this, SLOT(handleLongPress()));
-    mLongPressMenu->setPreferredPos(aPoint);
-    connect(mLongPressMenu,SIGNAL(aboutToClose ()),this,SLOT(deleteMenu()));
-    mLongPressMenu->open();
-}
-
-// -----------------------------------------------------------------------------
-// LocationPickerSearchView::handleLongPress()
-// -----------------------------------------------------------------------------
-void LocationPickerSearchView::handleLongPress()
-{
-    handleActivated(mIndex);
-}
-
-// -----------------------------------------------------------------------------
-// LocationPickerSearchView::deleteMenu()
-// -----------------------------------------------------------------------------
-void LocationPickerSearchView::deleteMenu()
-{
-    mLongPressMenu->deleteLater();
-    mLongPressMenu = NULL;
-    mSelectAction->deleteLater();
-    mSelectAction = NULL;
-}
--- a/locationpickerservice/src/locationpickerservice.cpp	Tue Aug 31 15:09:25 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,76 +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: LocationPickerService implementation
-*
-*/
-
-#include <hbapplication.h>
-#include "locationpickerservice.h"
-#include "locationpickerappwindow.h"
-
-// ----------------------------------------------------------------------------
-// LocationPickerService::LocationPickerService()
-// ----------------------------------------------------------------------------
-//
-LocationPickerService::LocationPickerService(LocationPickerAppWindow* parent)
-: XQServiceProvider(QLatin1String("com.nokia.symbian.ILocationPick"),parent),mServiceApp(parent)
-{
-    mAsyncReqId = 0;
-    publishAll();
-}
-
-// ----------------------------------------------------------------------------
-// LocationPickerService::~LocationPickerService()
-// ----------------------------------------------------------------------------
-//
-LocationPickerService::~LocationPickerService()
-{
-}
-
-
-// ----------------------------------------------------------------------------
-// LocationPickerService::complete()
-// ----------------------------------------------------------------------------
-void LocationPickerService::complete( QLocationPickerItem aLm )
-{
-    if ( isActive() )
-    {
-        mReturn=aLm;
-        connect( this, SIGNAL( returnValueDelivered() ), qApp, SLOT( quit() ) );
-        bool ok = completeRequest(mAsyncReqId,mReturn);
-		mAsyncReqId = 0;
-    }
-}
-// ----------------------------------------------------------------------------
-// isActive()
-// ----------------------------------------------------------------------------
-//
-bool LocationPickerService::isActive()
-{
-    return mAsyncReqId>0;
-}
-
-
-// ----------------------------------------------------------------------------
-// LocationPickerService::pick()
-// ----------------------------------------------------------------------------
-//
-void LocationPickerService::pick()
-{
-    connect( this, SIGNAL( clientDisconnected() ), qApp, SLOT( quit() ) );
-    mAsyncReqId = setCurrentRequestAsync();
-}
-
-
-
--- a/locationpickerservice/src/locationpickerview.cpp	Tue Aug 31 15:09:25 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,787 +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: LocationPickerView implementation
-*
-*/
-
-#include "locationpickerview.h"
-
-#include <HbMainWindow>
-#include <qstandarditemmodel.h>
-#include <HbListView>
-#include <HbListViewItem>
-#include <HbAction>
-#include <HbMenu>
-#include <HbToolBar>
-#include <HbStyleLoader>
-#include <QGraphicsLinearLayout>
-#include <HbDialog>
-
-#include "hgwidgetdatamodel.h"
-#include "locationpickerproxymodel.h"
-#include "locationpickerdatamanager.h"
-#include "locationpickercontent.h" 
-#include "locationpickercollectionlistcontent.h"
-#include "locationpickercollectioncontent.h"
-
-// ======== MEMBER FUNCTIONS ========
-
-// ----------------------------------------------------
-// LocationPickerView::LocationPickerView()
-// ----------------------------------------------------
-LocationPickerView::LocationPickerView( HbDocumentLoader* aLoader )
-    :mDocumentLoader(aLoader),
-    mLocationPickerCollectionListContent(NULL),
-    mProxyModel(NULL),
-    mAllAction(NULL),
-    mCollectionAction(NULL),
-    mSearchAction(NULL),
-    mAscendingAction(NULL),
-    mDescendingAction(NULL),
-    mListView(NULL),
-    mCollectionContent(NULL),
-    mViewType(ELocationPickerContent),
-    mLinerLayout(NULL),
-    mColllabel(NULL),
-    mEmptyLabel(NULL),
-    mDialog(NULL),
-    mMapIconLabel(NULL),
-    mTitleLabel(NULL),
-    mAddressMiddle(NULL),
-    mAddressBottom(NULL),
-    mLongPressMenu(NULL),
-    mSelectAction(NULL),
-    mDetailsAction(NULL),
-    mPopulated(false)
-{   
-    //Create Action Items
-    mAllAction = qobject_cast<HbAction*> (mDocumentLoader->findObject(
-            QString("allAction")));
-    mCollectionAction = qobject_cast<HbAction*> (mDocumentLoader->findObject(
-            QString("collectionAction")));
-    mSearchAction = qobject_cast<HbAction*> (mDocumentLoader->findObject(
-            QString("searchAction")));
-    mAscendingAction = qobject_cast<HbAction*> (mDocumentLoader->findObject(
-            QString("ascendingAction")));
-    mDescendingAction = qobject_cast<HbAction*> (mDocumentLoader->findObject(
-            QString("descendingAction")));
-    if( !mAllAction || !mCollectionAction || !mSearchAction || !mAscendingAction || !mDescendingAction )
-    {
-        qFatal("Error Reading Docml");
-    }
-    // create back action
-    mBackAction = new HbAction(Hb::BackNaviAction);
-    // add back key action
-    setNavigationAction(mBackAction);
-    //connect to slots
-     connect(mBackAction, SIGNAL(triggered()), this,
-            SLOT(backTriggered()));     
-    //create list item  
-    mListItem = new HbListViewItem();
-    //set the graphics size
-    mListItem->setGraphicsSize(HbListViewItem::Thumbnail);
-}
-// ----------------------------------------------------
-// LocationPickerView::~LocationPickerView()
-// ----------------------------------------------------
-LocationPickerView::~LocationPickerView()
-{
-    delete mListItem;
-    delete mBackAction;
-    if(mPopulated)
-    {
-    	mLinerLayout->removeItem(mListView);
-    	mLinerLayout->removeItem(mWidget);
-    	delete mCollectionContent;
-    	delete mLocationPickerCollectionListContent;
-    	delete mListView;
-    	delete mWidget;
-    	delete mHgModel;
-    	delete mProxyModel;
-    	delete mColllabel;
-    }
-}
-
-// ----------------------------------------------------------------------------
-// LocationPickerView::backButtonTriggered()
-// ----------------------------------------------------------------------------
-void LocationPickerView::backTriggered()
-{
-    //if current model is collection content, go back to collectionlist content  
-    if(mViewType == ELocationPickerCollectionContent)
-    {
-        mListItem->setGraphicsSize(HbListViewItem::MediumIcon);
-		removeDetailsLabel();
-        mAscendingAction->setDisabled(true);
-        mDescendingAction->setDisabled(true);
-        mAllAction->setChecked(false);
-        mViewType = ELocationPickerCollectionListContent;
-        manageListView();
-
-        clearContentModel();
-    }
-    else
-    {
-        //complete the service
-        emit completeService();
-    } 
-    
-}
-
-
-// ----------------------------------------------------
-// LocationPickerView::init()
-// ----------------------------------------------------
-void LocationPickerView::init( Qt::Orientation aOrientation, QStandardItemModel *aModel )
-{   
-    mPopulated = true;
-    // Create Collection List Content
-    mLocationPickerCollectionListContent = new LocationPickerCollectionListContent();
-    mModel = aModel;        
-    // Create Collection List Content
-    mLocationPickerCollectionListContent = new LocationPickerCollectionListContent();
-    //create proxy model
-    mProxyModel = new LocationPickerProxyModel( this  );
-    mProxyModel->setSourceModel(aModel);
-    // set sort properties
-    mProxyModel->setDynamicSortFilter(TRUE);
-    mProxyModel->setSortRole(Qt::DisplayRole);
-    mProxyModel->setSortCaseSensitivity(Qt::CaseInsensitive);
-    // sort in ascending order
-    mProxyModel->sort(0, Qt::AscendingOrder); 
-    mLinerLayout = static_cast<QGraphicsLinearLayout*>(widget()->layout());
-    //Get HbAction items
-    mListView = new HbListView();
-    mColllabel =  new HbLabel();
-    createHurriganesWidget();  
-    mWidget->setModel(mHgModel);
-    //connect to slots
-    connect(mAscendingAction, SIGNAL(triggered()), this, SLOT(sortAscending()));
-    connect(mDescendingAction, SIGNAL(triggered()), this,
-            SLOT(sortDescending()));
-    //connect all action Items to respective slots
-    connect(mAllAction, SIGNAL(triggered()), this, SLOT(allTabTriggered()));
-    connect(mCollectionAction, SIGNAL(triggered()), this,SLOT(colectionTabTriggered()));
-    connect(mSearchAction, SIGNAL(triggered()), this,
-            SLOT(searchTabTriggered()));
-    // connect the signal of the list activated to a slot.
-    connect(mListView, SIGNAL(activated(const QModelIndex &)), this, SLOT(handleActivated(const QModelIndex &)));
-    connect(mListView,SIGNAL(longPressed(HbAbstractViewItem*, const QPointF &)),this,
-            SLOT(launchPopUpMenu(HbAbstractViewItem*, const QPointF &)));
-    //set widget according to orientation
-    if(aOrientation == Qt::Horizontal)
-    {
-        manageHgWidget();
-    }
-    else
-    {
-        manageListView();
-    }
-}
-
-
-void LocationPickerView::createHurriganesWidget()
-{
-    //hurrriganes widget
-    mHgModel = new HgWidgetDataModel( mProxyModel, this );
-    mHgModel->setImageDataType(HgWidgetDataModel::ETypeQImage);
-    //create MediaWall Object
-    mWidget = new HgMediawall();
-    HbIcon defaultIcon(KDummyImage);
-    QPainter painter;
-    QPixmap defaultImage(defaultIcon.width(),defaultIcon.height());
-    painter.begin(&defaultImage);
-    defaultIcon.paint(&painter,QRectF(0,0,defaultIcon.width(),defaultIcon.height()));
-    painter.end();
-    mWidget->setDefaultImage( defaultImage.toImage() );
-    HgMediawall* mediawall = qobject_cast<HgMediawall*>( mWidget );
-    mediawall->setObjectName("location");
-    HbStyleLoader::registerFilePath(":/location.hgmediawall.widgetml");
-    HbStyleLoader::registerFilePath(":/location.hgmediawall.css");
-    mediawall->enableReflections(false);
-    mediawall->setFontSpec(HbFontSpec(HbFontSpec::Primary));
-    mediawall->setItemSize(QSize(4,3));
-    connect(this->mainWindow(), SIGNAL(orientationChanged(Qt::Orientation)),mWidget,
-            SLOT(orientationChanged(Qt::Orientation)));
-
-    mWidget->setAcceptTouchEvents(true);
-    connect(mWidget, SIGNAL(activated(const QModelIndex &)),this, SLOT(handleActivated(const QModelIndex &)));
-    connect(mWidget, SIGNAL(longPressed(const QModelIndex &, const QPointF &)),this, 
-            SLOT(launchPopUpMenu(const QModelIndex &, const QPointF &)));
-    mWidget->setLongPressEnabled(true);
-    mWidget->scrollTo(mWidget->currentIndex());
-}
-
-// -----------------------------------------------------------------------------
-// LocationPickerView::manageHgWidget()
-// -----------------------------------------------------------------------------
-void LocationPickerView::manageHgWidget()
-{   
-    removeDetailsLabel();
-    mLinerLayout->removeItem(mListView);
-    mListView->hide();
-    mWidget->show();
-    mLinerLayout->updateGeometry();
-    //set the appropriate model
-    switch(mViewType)
-    {
-        case ELocationPickerContent:
-        {  
-            mHgModel->resetModel(mProxyModel);
-            mAllAction->setChecked(true);
-            mCollectionAction->setChecked(false);
-            mLinerLayout->insertItem(1,mWidget);
-        }
-        break;
-        case ELocationPickerCollectionContent:
-        {
-            setCollectionData(mCategoryId);
-            mCollectionAction->setChecked(true);
-            mAllAction->setChecked(false);
-        }
-        break;
-    }
-}
-
-// ----------------------------------------------------
-// LocationPickerView::manageListView()
-// ----------------------------------------------------
-void LocationPickerView::manageListView()
-{   
-    if(mEmptyLabel)
-    {
-        removeDetailsLabel();
-    }
-    else
-    {
-        mLinerLayout->removeItem(mWidget);
-        mWidget->hide();   
-    }
-    mLinerLayout->insertItem(1,mListView);
-    mListView->show();
-    //set the appropriate model
-    switch(mViewType)
-    {
-        case ELocationPickerContent:
-        {   
-            mListItem->setGraphicsSize(HbListViewItem::Thumbnail);
-            mListView->setModel(mProxyModel,mListItem);
-            mAllAction->setChecked(true);
-            mCollectionAction->setChecked(false);
-            mViewType = ELocationPickerContent;
-        }
-        break;
-        case ELocationPickerCollectionListContent:
-        {
-            mListView->setModel(mLocationPickerCollectionListContent->getStandardModel(),mListItem);
-            mCollectionAction->setChecked(true);
-            mAllAction->setChecked(false);
-            if(mAscendingAction->isEnabled())
-            {
-                mAscendingAction->setDisabled(true);
-                mDescendingAction->setDisabled(true);
-            }
-            mViewType = ELocationPickerCollectionListContent;
-        }
-        break;
-        case ELocationPickerCollectionContent:
-        {
-            mCollectionAction->setChecked(true);
-            mAllAction->setChecked(false);
-            mViewType = ELocationPickerCollectionContent;
-            setCollectionData(mCategoryId);
-        }
-        break;
-        default:
-            break;
-    }
-}
-
-// -----------------------------------------------------------------------------
-// LocationPickerView::disableTabs()
-// -----------------------------------------------------------------------------
-void LocationPickerView::disableTabs()
-{
-    //if no location entries present
-    mLinerLayout = static_cast<QGraphicsLinearLayout*>(widget()->layout());
-    mEmptyLabel =  new HbTextItem( hbTrId( "txt_lint_list_no_location_entries_present" ) );
-    mEmptyLabel->setSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding );
-    mEmptyLabel->setFontSpec( HbFontSpec( HbFontSpec::Primary ) );
-    mEmptyLabel->setAlignment( Qt::AlignCenter );
-    mLinerLayout->insertItem( 1, mEmptyLabel );
-    mAllAction->setDisabled( true );
-    mCollectionAction->setDisabled( true );
-    mSearchAction->setDisabled( true );
-    mAscendingAction->setDisabled( true );
-    mDescendingAction->setDisabled( true );
-}
-
-// -----------------------------------------------------------------------------
-// LocationPickerView::handleActivated()
-// -----------------------------------------------------------------------------
-void LocationPickerView::handleActivated( const QModelIndex &aIndex )
-{
-    QModelIndex  index;
-    QStandardItem* item;
-    int row= aIndex.row();
-    int col = aIndex.column();
-    //handle the activated signal according to model set
-    switch(mViewType)
-    {    
-        case ELocationPickerContent:
-        {   
-            if(mainWindow()->orientation() == Qt::Vertical)
-            {
-                index = mProxyModel->mapToSource(
-                    aIndex);
-                item = mModel->item( index.row(), index.column() );
-            }
-            else
-            {
-                QModelIndex proxyModelIndex = mProxyModel->index(row,col);
-                index = mProxyModel->mapToSource(
-                        proxyModelIndex);
-                item = mModel->item( index.row(), index.column() );
-            }
-            QVariant var = item->data( Qt::UserRole );
-            quint32 lm = var.toUInt();
-            //item selected, complete request
-            emit selectItem( lm );
-        }
-            break;
-        case ELocationPickerCollectionListContent:
-        {
-            mLocationPickerCollectionListContent->getData(
-                    aIndex, mCategoryId );
-            setCollectionData(mCategoryId);
-            mViewType = ELocationPickerCollectionContent;
-        }
-            break;
-        case ELocationPickerCollectionContent:
-        {
-            if(mainWindow()->orientation() == Qt::Vertical)
-            {
-                index = mCollectionContent->getProxyModel()->mapToSource(
-                    aIndex);
-            }
-            else
-            {
-                QModelIndex proxyModelIndex = mCollectionContent->getProxyModel()->index(row,col);
-                index = mCollectionContent->getProxyModel()->mapToSource(
-                        proxyModelIndex);
-            }
-            quint32 lm = 0;
-            mCollectionContent->getData(index, lm);
-            //item selected, complete request
-            emit selectItem(lm);
-        }
-            break;
-        default:
-            break;
-    }
-}
-
-// -----------------------------------------------------------------------------
-// LocationPickerView::sortAscending()
-// -----------------------------------------------------------------------------
-void LocationPickerView::sortAscending()
-{   
-    //check the model set and do sorting accordingly
-    if (mViewType == ELocationPickerContent)
-    {
-        mProxyModel->sort( 0, Qt::AscendingOrder );
-        if(mainWindow()->orientation()==Qt::Horizontal)
-            mHgModel->resetModel(mProxyModel);
-    }
-    else
-    {
-        mCollectionContent->getProxyModel()->sort( 0, Qt::AscendingOrder );
-        if(mainWindow()->orientation()==Qt::Horizontal)
-                    mHgModel->resetModel(mCollectionContent->getProxyModel());
-    }
-}
-
-// -----------------------------------------------------------------------------
-// LocationPickerView::sortDescending()
-// -----------------------------------------------------------------------------
-void LocationPickerView::sortDescending()
-{
-    //check the model set and do sorting accordingly
-    if (mViewType == ELocationPickerContent)
-    {
-        mProxyModel->sort(0, Qt::DescendingOrder);
-        if(mainWindow()->orientation()==Qt::Horizontal)
-                    mHgModel->resetModel(mProxyModel);
-    }
-    else
-    {
-        mCollectionContent->getProxyModel()->sort( 0, Qt::DescendingOrder );
-        if(mainWindow()->orientation()==Qt::Horizontal)
-                    mHgModel->resetModel(mCollectionContent->getProxyModel());
-    }
-}
-
-// -----------------------------------------------------------------------------
-// LocationPickerView::allTabTriggered()
-// -----------------------------------------------------------------------------
-void LocationPickerView::allTabTriggered()
-{
-    removeDetailsLabel();
-    //execute only if tab is not pressed
-    if (mAllAction->isChecked())
-    {    
-        mViewType = ELocationPickerContent;
-        mCollectionAction->setChecked(false);
-        mAscendingAction->setEnabled(true);
-        mDescendingAction->setEnabled(true);
-        //delete mCollectionContent if coming back from collectioncontent
-        if (mCollectionContent)
-        {
-            delete mCollectionContent;
-            mCollectionContent = NULL;
-        }
-        if(mainWindow()->orientation() == Qt::Vertical)
-        {
-            manageListView();
-        }
-        else
-        {
-            manageHgWidget();
-        }
-    }
-    else
-    {
-        //Keep the tab pressed
-        mAllAction->setChecked(true);
-    }
-    
-}
-
-// -----------------------------------------------------------------------------
-// LocationPickerView::colectionTabTriggered()
-// -----------------------------------------------------------------------------
-void LocationPickerView::colectionTabTriggered()
-{
-	  if( mViewType == ELocationPickerCollectionListContent ||
-	      mViewType == ELocationPickerCollectionContent )
-	  {
-	  	  mCollectionAction->setChecked(true);
-	      return;
-	  }
-    mListItem->setGraphicsSize(HbListViewItem::MediumIcon);
-    removeDetailsLabel();
-    //execute only if tab is not pressed
-    if (mCollectionAction->isChecked())
-    {           
-        mAscendingAction->setDisabled(true);
-        mDescendingAction->setDisabled(true);
-        mAllAction->setChecked(false);
-        mViewType = ELocationPickerCollectionListContent;
-        manageListView();
-    }
-    else
-    {
-        //Keep the tab pressed
-        mCollectionAction->setChecked(true);
-    }
-}
-
-// -----------------------------------------------------------------------------
-// LocationPickerView::searchTabTriggered()
-// -----------------------------------------------------------------------------
-void LocationPickerView::searchTabTriggered()
-{
-    mWidget->hide();
-    emit switchToSearchView();
-}
-
-// -----------------------------------------------------------------------------
-// LocationPickerView::setCollectionData()
-// -----------------------------------------------------------------------------
-void LocationPickerView::setCollectionData( quint32 acategoryId )
-{
-    if(!mCollectionContent)
-    {
-        mCollectionContent
-        = new LocationPickerCollectionContent( acategoryId );
-    }
-    
-    if(mainWindow()->orientation() == Qt::Vertical)
-    {
-        QString categoryname;
-        removeDetailsLabel();    
-        switch(acategoryId)
-        {
-
-            case 1: categoryname = QString(hbTrId("txt_lint_subhead_places"));
-            break;
-            case 8: categoryname = QString(hbTrId("txt_lint_subhead_contact_addresses"));     
-            break;
-            case 9: categoryname = QString(hbTrId("txt_lint_subhead_calendar_event_locations"));
-            break;
-        }
-        if(mCollectionContent->locationFound())
-        {
-            mListView->setModel( mCollectionContent->getProxyModel(),mListItem );
-            //Enable the options
-            mAscendingAction->setEnabled(true);
-            mDescendingAction->setEnabled(true);
-            mListItem->setGraphicsSize(HbListViewItem::Thumbnail);
-        }
-        else
-        {
-            displayNoEntries();
-        }
-        mCollectionAction->setChecked(true);
-
-        if(mColllabel)
-        {
-            mLinerLayout->insertItem(0,mColllabel);
-            mColllabel->setPlainText(categoryname);   
-            mColllabel->show();
-        }
-    }
-    else
-    {
-           if(mCollectionContent->locationFound())
-           {
-               mHgModel->resetModel( mCollectionContent->getProxyModel() );
-               //Enable the options
-               mAscendingAction->setEnabled(true);
-               mDescendingAction->setEnabled(true);
-               mLinerLayout->removeItem(mListView);
-               mListView->hide();
-               mLinerLayout->insertItem(1,mWidget);
-               mWidget->show();
-               mLinerLayout->updateGeometry();
-           }
-           else
-           {
-               displayNoEntries();
-           }
-    }
-    mViewType = ELocationPickerCollectionContent;
-}
-
-// -----------------------------------------------------------------------------
-// LocationPickerView::getViewType()
-// -----------------------------------------------------------------------------
-TViewType LocationPickerView::getViewType()
-{
-    return mViewType;
-}
-
-// -----------------------------------------------------------------------------
-// LocationPickerView::setViewType()
-// -----------------------------------------------------------------------------
-void LocationPickerView::setViewType( TViewType aViewType )
-{
-    mViewType = aViewType;
-}
-
-
-// -----------------------------------------------------------------------------
-// LocationPickerView::clearContentModel()
-// -----------------------------------------------------------------------------
-void LocationPickerView::clearContentModel()
-{
-    if(mCollectionContent)
-    {
-    	delete mCollectionContent;
-    	mCollectionContent = NULL;
-    }
-}
-
-// -----------------------------------------------------------------------------
-// LocationPickerView::launchPopUpMenu()
-// -----------------------------------------------------------------------------
-void LocationPickerView::launchPopUpMenu( HbAbstractViewItem *aItem, const QPointF &aPoint )
-{
-    mLongPressMenu = new HbMenu();
-    mLongPressMenu->setTimeout(HbMenu::NoTimeout);
-    connect(mLongPressMenu,SIGNAL(aboutToClose ()),this,SLOT(deleteMenu()));
-    mSelectAction  = mLongPressMenu->addAction(hbTrId("txt_lint_list_select"));
-    if( mViewType == ELocationPickerCollectionContent || mViewType == ELocationPickerContent )
-    {
-        mDetailsAction  = mLongPressMenu->addAction(hbTrId("txt_lint_menu_details"));
-        connect(mDetailsAction, SIGNAL(triggered()), this, SLOT(handleDetails()));
-    }
-    mIndex = aItem->modelIndex();
-    connect(mSelectAction, SIGNAL(triggered()), this, SLOT(handleSelect()));
-    mLongPressMenu->setPreferredPos(aPoint);
-    mLongPressMenu->open();
-}
-
-// -----------------------------------------------------------------------------
-// LocationPickerView::launchPopUpMenu()
-// -----------------------------------------------------------------------------
-void LocationPickerView::launchPopUpMenu( const QModelIndex &aIndex, const QPointF &aPoint )
-{
-    mLongPressMenu = new HbMenu();
-    mLongPressMenu->setTimeout(HbMenu::NoTimeout);
-    connect(mLongPressMenu,SIGNAL(aboutToClose ()),this,SLOT(deleteMenu()));
-    mSelectAction  = mLongPressMenu->addAction(hbTrId("txt_lint_list_select"));
-    mIndex = aIndex;
-    connect(mSelectAction, SIGNAL(triggered()), this, SLOT(handleSelect()));
-    mLongPressMenu->setPreferredPos(aPoint);
-    mLongPressMenu->open();
-}
-// -----------------------------------------------------------------------------
-// LocationPickerView::handleSelect()
-// -----------------------------------------------------------------------------
-void LocationPickerView::handleSelect()
-{
-    handleActivated(mIndex);
-}
-
-// -----------------------------------------------------------------------------
-// LocationPickerView::deleteMenu()
-// -----------------------------------------------------------------------------
-void LocationPickerView::deleteMenu()
-{
-    mLongPressMenu->deleteLater();
-    mLongPressMenu = NULL;
-    mSelectAction->deleteLater();
-    mSelectAction = NULL;
-    mDetailsAction->deleteLater();
-    mDetailsAction = NULL;
-    
-}
-
-// -----------------------------------------------------------------------------
-// LocationPickerView::handleSelect()
-// -----------------------------------------------------------------------------
-void LocationPickerView::handleDetails()
-{
-    HbDocumentLoader* loader = new HbDocumentLoader();
-
-    bool ok = false;
-    //load the popup dialog
-    loader->load(":/popupdialog.docml", &ok);
-    Q_ASSERT_X(ok,"locationpickerservice","invalid DocML file");
-    //find graphics popup dialog
-    QGraphicsWidget *popUpDialog = loader->findWidget("dialog");
-    Q_ASSERT_X((popUpDialog != 0), "locationpickerservice", "invalid DocML file");
-    mDialog = qobject_cast<HbDialog*>(popUpDialog);
-    mMapIconLabel = qobject_cast<HbLabel*>(loader->findWidget("mapLabel"));
-    mTitleLabel = qobject_cast<HbLabel*>(loader->findWidget("titleLabel"));
-    mAddressMiddle = qobject_cast<HbLabel*>(loader->findWidget("addressMiddle"));
-    mAddressBottom = qobject_cast<HbLabel*>(loader->findWidget("addressBottom"));
-    mDone = qobject_cast<HbAction*>(loader->findObject(QString("action")));
-    mTitleLabel->setFontSpec(HbFontSpec(HbFontSpec::Primary));
-    mDialog->setDismissPolicy(HbDialog::NoDismiss);
-    mDialog->setTimeout(HbDialog::NoTimeout);
-    connect(mDone, SIGNAL(triggered()), this, SLOT(closeDetailsDialog()));
-    QStringList adressDetail;
-    QString iconName;
-    mMapIconLabel->setAlignment(Qt::AlignCenter);
-    if(mViewType == ELocationPickerContent)
-    {
-        adressDetail = mProxyModel->data(mIndex,Qt::UserRole+3).toStringList();
-        iconName =  mProxyModel->data(mIndex,Qt::UserRole+1).toString();
-    }
-    else
-    {
-        adressDetail = mCollectionContent->getProxyModel()->data(mIndex,Qt::UserRole+3).toStringList();
-        iconName =  mCollectionContent->getProxyModel()->data(mIndex,Qt::UserRole+1).toString();
-    }
-    if(iconName.isEmpty())
-    {
-        mMapIconLabel->setIcon(KDummyImage); 
-    }
-    else
-    {
-        mMapIconLabel->setIcon(HbIcon(iconName)); 
-    }
-
-    if(adressDetail[0].isEmpty() && adressDetail[1].isEmpty())
-    {
-        mTitleLabel->setPlainText(adressDetail[2]);
-        mAddressMiddle->setPlainText(QString(""));
-        mAddressBottom->setPlainText(QString(""));
-    }
-    else if(adressDetail[0].isEmpty())
-    {
-        mTitleLabel->setPlainText(adressDetail[1]);
-        mAddressMiddle->setPlainText(adressDetail[2]);
-        mAddressBottom->setPlainText(QString(""));
-    }
-    else if (adressDetail[1].isEmpty())
-    {
-        mTitleLabel->setPlainText(adressDetail[0]);
-        mAddressMiddle->setPlainText(adressDetail[2]);
-        mAddressBottom->setPlainText(QString(""));
-    }
-    else
-    {
-        mTitleLabel->setPlainText(adressDetail[0]);
-        mAddressMiddle->setPlainText(adressDetail[1]);
-        mAddressBottom->setPlainText(adressDetail[2]);
-    }
- 
-    mDialog->open();
-    delete loader;
-}
-
-// -----------------------------------------------------------------------------
-// LocationPickerView::closeDetailsDialog()
-// -----------------------------------------------------------------------------
-void LocationPickerView::closeDetailsDialog()
-{
-    if(mDialog)
-    {
-        mDialog->close();
-        delete mDialog;
-        mDialog = NULL;
-    }
-}
-// -----------------------------------------------------------------------------
-// LocationPickerView::displayNoEntries()
-// -----------------------------------------------------------------------------
-void LocationPickerView::displayNoEntries()
-{
-    if(!mEmptyLabel)
-    {
-        mEmptyLabel =  new HbTextItem(hbTrId("txt_lint_list_no_location_entries_present"));
-        mEmptyLabel->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
-        mEmptyLabel->setFontSpec(HbFontSpec(HbFontSpec::Primary));
-        mEmptyLabel->setAlignment(Qt::AlignCenter);
-        mLinerLayout->removeItem(mListView);
-        mListView->hide();
-        mWidget->setVisible(false);
-        mLinerLayout->insertItem(0, mEmptyLabel);
-    }
-    
-}
-
-// -----------------------------------------------------------------------------
-// LocationPickerView::removeDetailsLabel()
-// -----------------------------------------------------------------------------
-void LocationPickerView::removeDetailsLabel()
-{
-    if (mLinerLayout && mColllabel)
-    {
-        mColllabel->setPlainText("");
-        mLinerLayout->removeItem(mColllabel);
-        mColllabel->hide();
-    }
-    if(mEmptyLabel)
-    {   
-        mLinerLayout->removeItem(mEmptyLabel);
-        mEmptyLabel->hide();
-        delete mEmptyLabel;
-        mEmptyLabel = NULL;
-    }
-}
-
--- a/locationpickerservice/src/main.cpp	Tue Aug 31 15:09:25 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,31 +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: main.cpp
-*
-*/
-
-#include <HbApplication>
-#include <HbTranslator>
-#include "locationpickerappwindow.h"
-
-int main(int argc, char *argv[])
-{
-    HbApplication app(argc, argv);   
-    HbTranslator translator("lilpicker");    
-    app.setApplicationName( hbTrId("txt_lint_title_select_location") );
-    LocationPickerAppWindow mainWindow;
-    mainWindow.viewport()->grabGesture(Qt::TapGesture);
-    mainWindow.show();
-    return app.exec();
-}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationsatviewrefapp/data/SatelliteReference.rss	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,123 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+/*
+* ============================================================================
+*  Name     : SatelliteReference.rss
+*  Part of  : Satellite Reference App
+* ============================================================================
+*/
+
+
+//  RESOURCE IDENTIFIER
+NAME    SRAP // 4 letter ID
+
+#include <eikon.rh>
+#include "SatelliteReference.rls"
+#include "SatelliteReference.hrh"
+#include <avkon.rsg>
+#include <avkon.rh>
+#include <avkon.mbg>
+#include <appinfo.rh>
+
+RESOURCE RSS_SIGNATURE { }
+
+RESOURCE TBUF { buf="Satellite Reference App"; }
+
+RESOURCE EIK_APP_INFO
+    {
+    hotkeys=r_satellitereference_hotkeys;
+    menubar=r_satellitereference_menubar;
+    cba=R_AVKON_SOFTKEYS_OPTIONS_EXIT;     
+    }
+
+//----------------------------------------------------
+//   
+//    r_satellitereference_hotkeys
+//
+//----------------------------------------------------
+//
+RESOURCE HOTKEYS r_satellitereference_hotkeys
+    {
+    control=
+        {
+        HOTKEY { command=EAknCmdExit; key='e'; }
+        };
+    }
+
+//----------------------------------------------------
+//   
+//    r_satellitereference_menubar
+//
+//----------------------------------------------------
+//
+RESOURCE MENU_BAR r_satellitereference_menubar
+    {
+    titles=
+        {
+        MENU_TITLE { menu_pane=r_satellitereference_menu; txt="File"; }
+        };
+    }
+
+//----------------------------------------------------
+//   
+//    r_satellitereference_menu
+//
+//----------------------------------------------------
+//
+RESOURCE MENU_PANE r_satellitereference_menu
+    {
+    items=
+        {
+        MENU_ITEM { command=ESatelliteInfoCmd; txt=qtn_sateref_Satellite_status; },
+        MENU_ITEM { command=EAknCmdExit; txt=qtn_satref_exit; }
+        };
+    }
+//----------------------------------------------------
+//   
+//    r_satellitereference_localisable_app_info
+//
+//----------------------------------------------------
+//
+RESOURCE LOCALISABLE_APP_INFO r_satellitereference_localisable_app_info
+    {
+    short_caption = "SatRef";
+    caption_and_icon = 
+    CAPTION_AND_ICON_INFO
+        {
+        caption = "SatelliteRef";
+        number_of_icons = 1;
+        icon_file = 
+                "\\resource\\apps\\lsatviewrefapp_aif.mif";
+        };
+    }
+
+//----------------------------------------------------
+//   
+//    r_satref_service_rule_name
+//    Logical service rule name
+//
+//----------------------------------------------------
+//
+RESOURCE TBUF r_satref_service_rule_name
+    {
+    buf = qtn_satref_logical_rule_name;
+    }
+
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationsatviewrefapp/data/SatelliteReference_reg.rss	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,31 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+#include <appinfo.rh>
+#include <satellitereference.rsg>
+
+UID2 KUidAppRegistrationResourceFile
+UID3 0xA000018A
+
+RESOURCE APP_REGISTRATION_INFO
+    {
+    app_file = "SatelliteReference";
+    localisable_resource_file = "\\resource\\apps\\SatelliteReference"; 
+    localisable_resource_id = R_SATELLITEREFERENCE_LOCALISABLE_APP_INFO;
+    }
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationsatviewrefapp/gfx/qgn_menu_lsatviewrefapp.svg	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,56 @@
+<?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" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="100%" height="100%" viewBox="0 0 88 87.999">
+<g>
+<g>
+<g>
+<g>
+<rect fill="none" width="88" height="87.999"/>
+</g>
+</g>
+<g>
+<linearGradient id="XMLID_7_" gradientUnits="userSpaceOnUse" x1="12.3042" y1="18.3799" x2="63.4113" y2="79.287">
+<stop offset="0" style="stop-color:#B3DDFF"/>
+<stop offset="0.8146" style="stop-color:#084296"/>
+<stop offset="1" style="stop-color:#084296"/>
+</linearGradient>
+<path fill="url(#XMLID_7_)" d="M32.135,7.415L14.363,17.432v23.167c0,0,8.926,15.351,10.468,18.001       c-2.386,1.704-15.44,11.03-15.44,11.03l21.613,12.652c0,0,12.907-9.85,14.71-11.226c1.979,1.109,16.231,9.101,16.231,9.101       l16.664-15.132c0,0-14.066-6.929-16.888-8.318c1.467-3.01,10.531-21.604,10.531-21.604l-22.298-9.59       c0,0-1.486,3.173-2.093,4.467c-2.046-0.88-6.573-2.826-6.573-2.826s-3.713,2.463-5.696,3.778       c-0.327-0.744-0.542-1.233-0.657-1.495c0.007-0.824,0.213-23.72,0.213-23.72L32.135,7.415z"/>
+<linearGradient id="XMLID_8_" gradientUnits="userSpaceOnUse" x1="40.8276" y1="52.1914" x2="16.1997" y2="21.1353">
+<stop offset="0" style="stop-color:#5AA7E0"/>
+<stop offset="1" style="stop-color:#3366CC"/>
+</linearGradient>
+<polygon fill="url(#XMLID_8_)" points="59.051,57.621 69.536,36.111 50.944,28.115 48.852,32.581 41.493,29.418 34.719,33.911        32.932,29.849 33.117,9.157 16.363,18.601 16.363,40.06 27.476,59.169 13.064,69.463 30.856,79.879 45.546,68.669        61.667,77.708 75.089,65.521 "/>
+<linearGradient id="XMLID_9_" gradientUnits="userSpaceOnUse" x1="60.585" y1="31.876" x2="53.8582" y2="45.1125">
+<stop offset="0" style="stop-color:#5AA7E0"/>
+<stop offset="1" style="stop-color:#3366CC"/>
+</linearGradient>
+<polygon fill="url(#XMLID_9_)" points="41.26,48.783 50.944,28.115 69.536,36.111 59.051,57.621 "/>
+<polygon fill="#0046B7" points="16.363,40.06 27.476,59.169 41.26,48.783 32.932,29.849 "/>
+<polygon fill="#3366CC" points="16.363,40.06 16.363,18.601 33.117,9.157 32.932,29.849 "/>
+<polygon fill="#CFECFF" points="26.696,39.23 41.493,29.418 59.523,37.168 45.546,47.954 "/>
+<path fill="#5AA7E0" d="M41.954,55.286"/>
+<polygon fill="#3366CC" points="26.696,39.23 27.476,59.169 45.546,68.669 45.546,47.954 "/>
+<polygon fill="#5AA7E0" points="13.064,69.463 27.476,59.169 45.546,68.669 30.856,79.879 "/>
+<linearGradient id="XMLID_10_" gradientUnits="userSpaceOnUse" x1="29.2085" y1="63.6836" x2="48.7102" y2="56.1976">
+<stop offset="0" style="stop-color:#5AA7E0"/>
+<stop offset="0.0056" style="stop-color:#5AA7E0"/>
+<stop offset="0.85" style="stop-color:#3366CC"/>
+<stop offset="1" style="stop-color:#3366CC"/>
+</linearGradient>
+<polygon fill="url(#XMLID_10_)" points="43.423,46.971 27.476,59.169 45.546,68.669 45.546,47.954 "/>
+<polygon fill="#0046B7" points="45.546,47.954 45.546,68.669 59.051,57.621 59.523,37.168 "/>
+<linearGradient id="XMLID_11_" gradientUnits="userSpaceOnUse" x1="45.3936" y1="59.5186" x2="59.0508" y2="59.5186">
+<stop offset="0" style="stop-color:#0046B7"/>
+<stop offset="1" style="stop-color:#3366CC"/>
+</linearGradient>
+<polygon fill="url(#XMLID_11_)" points="45.394,50.368 45.546,68.669 59.051,57.621 "/>
+<linearGradient id="XMLID_12_" gradientUnits="userSpaceOnUse" x1="60.8945" y1="68.6807" x2="57.2953" y2="58.792">
+<stop offset="0" style="stop-color:#5AA7E0"/>
+<stop offset="0.4101" style="stop-color:#5AA7E0"/>
+<stop offset="1" style="stop-color:#3366CC"/>
+</linearGradient>
+<polygon fill="url(#XMLID_12_)" points="61.667,77.708 45.546,68.669 59.051,57.621 75.089,65.521 "/>
+</g>
+</g>
+</g>
+</svg>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationsatviewrefapp/group/SatelliteReference.mmp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,67 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies 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 acts as a reference application to depict the use of
+*				the CSatellite dialog which is a part of BLID
+*
+*/
+/*
+* ============================================================================
+*  Name     : SatelliteReference.mmp
+*  Part of  : Satellite Reference App
+*  Description: This acts as a reference application to depict the use of
+*				the CSatellite dialog which is a part of BLID
+*     
+*     
+* ============================================================================
+*/
+#include <platform_paths.hrh>
+
+CAPABILITY Location SwEvent
+VENDORID    0
+
+LANG SC
+
+TARGET SatelliteReference.exe
+TARGETTYPE  exe	
+UID  0x100039CE 0xA000018A
+
+epocstacksize 0x5000
+
+SOURCEPATH ../src
+SOURCE SatelliteReferenceApp.cpp
+SOURCE SatelliteReferenceAppUi.cpp
+SOURCE SatelliteReferenceContainer.cpp
+SOURCE SatelliteReferenceDocument.cpp
+
+START RESOURCE ../data/SatelliteReference.rss
+HEADER
+TARGETPATH	resource/apps
+END
+
+START RESOURCE ../data/SatelliteReference_reg.rss
+DEPENDS satellitereference.rsg
+#ifdef WINSCW
+TARGETPATH 	  /private/10003a3f/apps
+#else
+TARGETPATH 	  /private/10003a3f/import/apps
+#endif
+END
+
+USERINCLUDE .  ../inc
+APP_LAYER_SYSTEMINCLUDE
+
+
+LIBRARY euser.lib apparc.lib cone.lib eikcore.lib 
+LIBRARY eikcoctl.lib avkon.lib CommonEngine.lib
+LIBRARY SatInfo.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationsatviewrefapp/group/bld.inf	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,40 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+/*
+* ============================================================================
+*  Name     : bld.inf
+*  Part of  : Satellite Reference App
+* ============================================================================
+*/
+
+
+PRJ_PLATFORMS
+DEFAULT ARMV5_ABIV2
+
+PRJ_EXPORTS
+
+PRJ_MMPFILES
+SatelliteReference.mmp
+
+PRJ_EXTENSIONS
+START EXTENSION s60/mifconv
+OPTION TARGETFILE lsatviewrefapp_aif.mif
+OPTION SOURCEDIR ../gfx
+OPTION SOURCES -c32 qgn_menu_lsatviewrefapp.svg
+END
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationsatviewrefapp/inc/SatelliteReference.hrh	Wed Sep 01 12:31:27 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: 
+*
+*/
+
+
+#ifndef SATELLITE_REFERENCE_HRH
+#define SATELLITE_REFERENCE_HRH
+
+enum TSatelliteRefernceCommandIds
+    {
+    ESatelliteInfoCmd = 90
+    };
+
+#endif // SATELLITE_REFERENCE_HRH
+    
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationsatviewrefapp/inc/SatelliteReference.rls	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,54 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+/*
+* ============================================================================
+*  Name     : SatelliteReference.rls
+*  Part of  : Satellite Reference App
+* ============================================================================
+*/
+
+// LOCALISATION STRINGS
+
+//d:Applications logical
+//d:service name for tule
+//l:list_single_heading_pane_2
+//w:
+//r:3.0
+//
+rls_string qtn_satref_logical_rule_name "Satellite Ref"
+
+//d:Options menu item to
+//d:open satellites status view
+//l:list_single_popup_menu_pane_1
+//w:
+//r:3.0
+//
+rls_string qtn_sateref_Satellite_status "Satellite Status"
+
+//d:Options menu item to
+//d:exit from the application
+//l:list_single_popup_menu_pane_1
+//w:
+//r:3.0
+//
+rls_string qtn_satref_exit	"Exit"
+
+// End of File
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationsatviewrefapp/inc/SatelliteReferenceApp.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,64 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+/*
+* ============================================================================
+*  Name     : SatelliteReferenceApp 
+*  Part of  : Satellite Reference App
+* ============================================================================
+*/
+
+#ifndef SATELLITE_REFERENCE_APP_H
+#define SATELLITE_REFERENCE_APP_H
+
+// INCLUDES
+#include <aknapp.h>
+
+// CONSTANTS
+// UID of the application
+const TUid KUidSatelliteReferenceApp = { 0xA000018A };
+
+// CLASS DECLARATION
+
+/**
+* SatelliteReference application class.
+* Provides factory to create concrete document object.
+* 
+*/
+class CSatelliteReferenceApp : public CAknApplication
+    {
+    
+    public: // Functions from base classes
+    private:
+
+        /**
+        * From CApaApplication, creates document object.
+        * @return A pointer to the created document object.
+        */
+        CApaDocument* CreateDocumentL();
+        
+        /**
+        * From CApaApplication, returns application's UID.
+        * @return The value of KUidSatelliteReferenceApp.
+        */
+        TUid AppDllUid() const;
+    };
+
+#endif
+
+// End of File
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationsatviewrefapp/inc/SatelliteReferenceAppUi.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,96 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+/*
+* ============================================================================
+*  Name     : SatelliteReferenceAppUi
+*  Part of  : Satellite Reference App
+* ============================================================================
+*/
+
+#ifndef SATELLITE_REFERENCE_APPUI_H
+#define SATELLITE_REFERENCE_APPUI_H
+
+// INCLUDES
+#include <eikapp.h>
+#include <eikdoc.h>
+#include <e32std.h>
+#include <coeccntx.h>
+#include <aknappui.h>
+#include <aknapp.h>
+#include <CSatelliteInfoUI.h>
+
+// FORWARD DECLARATIONS
+class CSatelliteReferenceContainer;
+class CSatelliteInfoUI;
+
+
+// CLASS DECLARATION
+
+/**
+* Application UI class.
+* Provides support for the following features:
+* - EIKON control architecture
+*/
+class CSatelliteReferenceAppUi : public CAknAppUi
+    {
+    public: // // Constructors and destructor
+
+        void ConstructL();
+
+        /**
+        * Destructor.
+        */      
+        ~CSatelliteReferenceAppUi();
+        
+    private:
+        // From MEikMenuObserver
+        void DynInitMenuPaneL(TInt aResourceId,CEikMenuPane* aMenuPane);
+
+    private:
+        /**
+        * From CEikAppUi, takes care of command handling.
+        * @param aCommand command to be handled
+        */
+        void HandleCommandL(TInt aCommand);
+
+        /**
+        * From CEikAppUi, handles key events.
+        * @param aKeyEvent Event to handled.
+        * @param aType Type of the key event. 
+        * @return Response code (EKeyWasConsumed, EKeyWasNotConsumed). 
+        */
+        virtual TKeyResponse HandleKeyEventL(
+            const TKeyEvent& aKeyEvent,TEventCode aType);
+            
+        /**
+        * From CEikAppUi, handles the event when
+        * the application is switch between foreground and
+        * background
+        */
+        void HandleForegroundEventL(TBool aForeground);
+
+    private: //Data
+        CSatelliteReferenceContainer* iAppContainer; 
+        
+        /// Pointer to CSatelliteUI
+        CSatelliteInfoUI* iSatelliteInfo;
+    };
+
+#endif
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationsatviewrefapp/inc/SatelliteReferenceContainer.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,96 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+/*
+* ============================================================================
+*  Name     : SatelliteReferenceContainer
+*  Part of  : Satellite Reference App
+* ============================================================================
+*/
+
+#ifndef SATELLITE_REFERENCE_CONTAINER_H
+#define SATELLITE_REFERENCE_CONTAINER_H
+
+// INCLUDES
+#include <coecntrl.h>
+#include <aknappui.h>
+   
+// FORWARD DECLARATIONS
+class CEikLabel;        // for example labels
+
+// CLASS DECLARATION
+
+/**
+*  CSatelliteReferenceContainer  container control class.
+*  
+*/
+class CSatelliteReferenceContainer : public CCoeControl, MCoeControlObserver
+    {
+    public: // Constructors and destructor
+        
+        /**
+        * EPOC default constructor.
+        * @param aRect Frame rectangle for container.
+        */
+        void ConstructL(const TRect& aRect, CAknAppUi* aAppUi);
+
+        /**
+        * Destructor.
+        */
+        ~CSatelliteReferenceContainer();
+        
+        /**
+        * To handle layout change event
+        */
+        void HandleResourceChange(TInt aType);
+
+    private: // Functions from base classes
+
+       /**
+        * From CoeControl,SizeChanged.
+        */
+        void SizeChanged();
+
+       /**
+        * From CoeControl,CountComponentControls.
+        */
+        TInt CountComponentControls() const;
+
+       /**
+        * From CCoeControl,ComponentControl.
+        */
+        CCoeControl* ComponentControl(TInt aIndex) const;
+
+       /**
+        * From CCoeControl,Draw.
+        */
+        void Draw(const TRect& aRect) const;
+
+       /**
+        * From ?base_class ?member_description
+        */
+        // event handling section
+        // e.g Listbox events
+        void HandleControlEventL(CCoeControl* aControl,TCoeEvent aEventType);
+        
+    private:
+    	CAknAppUi* iAppUi;
+    };
+
+#endif
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationsatviewrefapp/inc/SatelliteReferenceDocument.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,72 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+/*
+* ============================================================================
+*  Name     : SatelliteReferenceDocument
+*  Part of  : Satellite Reference App
+* ============================================================================
+*/
+
+#ifndef SATELLITE_REFERENCE_DOCUMENT_H
+#define SATELLITE_REFERENCE_DOCUMENT_H
+
+// INCLUDES
+#include <AknDoc.h>
+   
+
+// FORWARD DECLARATIONS
+class  CEikAppUi;
+
+// CLASS DECLARATION
+
+/**
+*  CSatelliteReferenceDocument application class.
+*/
+class CSatelliteReferenceDocument : public CAknDocument
+    {
+    public: // Constructors and destructor
+        /**
+        * Two-phased constructor.
+        */
+        static CSatelliteReferenceDocument* NewL(CEikApplication& aApp);
+
+        /**
+        * Destructor.
+        */
+        virtual ~CSatelliteReferenceDocument();
+
+    private:
+
+        /**
+        * EPOC default constructor.
+        */
+        CSatelliteReferenceDocument(CEikApplication& aApp);
+        void ConstructL();
+
+    private:
+
+        /**
+        * From CEikDocument, create "App UI" object.
+        */
+        CEikAppUi* CreateAppUiL();
+    };
+
+#endif
+
+// End of File
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationsatviewrefapp/sis/LocationSatViewRefApp_ARMV5.pkg	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,60 @@
+;
+; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of "Eclipse Public License v1.0"
+; which accompanies this distribution, and is available
+; at the URL "http://www.eclipse.org/legal/epl-v10.html".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description: 
+;     SatelliteReference package.
+;
+;
+; ============================================================================
+;  Name     : LmUiRefApp_armv5.pkg
+;  Part of  : Satellite Reference App
+;  Description:
+;     SatelliteReference package.
+;
+; ============================================================================
+;
+
+; Languages
+; none -  English only by default
+&EN
+; Installation header
+; Only one component name as we only support English
+; UID is the main app's UID
+
+#{"Satellite Info UI Reference  Application"},(0xA000018A),1,0,24,TYPE=SA
+
+
+; Localised Vendor name
+%{"Vendor-EN"}
+
+; Unique Vendor name
+:"Vendor"
+
+;Supports S60 v 3.0
+[0x101F7961], 0, 0, 0, {"S60ProductID"}
+
+; EXEs
+"\epoc32\release\armv5\urel\SatelliteReference.exe"		-"!:\sys\bin\SatelliteReference.exe"
+; Resource files
+"\epoc32\data\z\resource\apps\SatelliteReference.RSC"		-"!:\resource\apps\SatelliteReference.RSC"
+"\epoc32\data\z\private\10003a3f\import\apps\SatelliteReference_reg.RSC"-"!:\private\10003a3f\import\apps\SatelliteReference_reg.RSC"
+"\epoc32\data\z\resource\apps\lsatviewrefapp_aif.mif"		-"!:\resource\apps\lsatviewrefapp_aif.mif"
+ 
+; Required files:
+;required for application to be covered by backup/restore facility 
+"backup_registration.xml"						-"!:\private\A000018A\backup_registration.xml"
+
+; Embedded SIS-files
+; none
+
+; End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationsatviewrefapp/sis/LocationSatViewRefApp_armv5_abiv2.pkg	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,60 @@
+;
+; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of "Eclipse Public License v1.0"
+; which accompanies this distribution, and is available
+; at the URL "http://www.eclipse.org/legal/epl-v10.html".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description: 
+;     SatelliteReference package.
+;
+;
+; ============================================================================
+;  Name     : LmUiRefApp_ARMV5_abiv2.pkg
+;  Part of  : Satellite Reference App
+;  Description:
+;     SatelliteReference package.
+;
+; ============================================================================
+;
+
+; Languages
+; none -  English only by default
+&EN
+; Installation header
+; Only one component name as we only support English
+; UID is the main app's UID
+
+#{"Satellite Info UI Reference  Application"},(0xA000018A),1,0,24,TYPE=SA
+
+
+; Localised Vendor name
+%{"Vendor-EN"}
+
+; Unique Vendor name
+:"Vendor"
+
+;Supports S60 v 3.0
+[0x101F7961], 0, 0, 0, {"S60ProductID"}
+
+; EXEs
+"..\..\..\epoc32\release\armv5_abiv2\urel\SatelliteReference.exe"	-"!:\sys\bin\SatelliteReference.exe"
+; Resource files
+"..\..\..\epoc32\data\z\resource\apps\SatelliteReference.RSC"		-"!:\resource\apps\SatelliteReference.RSC"
+"..\..\..\epoc32\data\z\private\10003a3f\import\apps\SatelliteReference_reg.RSC"-"!:\private\10003a3f\import\apps\SatelliteReference_reg.RSC"
+ "..\..\..\epoc32\data\z\resource\apps\lsatviewrefapp_aif.mif"		-"!:\resource\apps\lsatviewrefapp_aif.mif"
+ 
+; Required files:
+;required for application to be covered by backup/restore facility 
+"backup_registration.xml"						-"!:\private\A000018A\backup_registration.xml"
+
+; Embedded SIS-files
+; none
+
+; End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationsatviewrefapp/sis/LocationSatViewRefApp_gcce.pkg	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,61 @@
+;
+; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of "Eclipse Public License v1.0"
+; which accompanies this distribution, and is available
+; at the URL "http://www.eclipse.org/legal/epl-v10.html".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description: 
+;     SatelliteReference package.
+;
+;
+; ============================================================================
+;  Name     : LmUiRefApp_ARMI.pkg
+;  Part of  : Satellite Reference App
+;  Description:
+;     SatelliteReference package.
+;
+; ============================================================================
+;
+
+; Languages
+; none -  English only by default
+&EN
+; Installation header
+; Only one component name as we only support English
+; UID is the main app's UID
+
+#{"Satellite Info UI Reference  Application"},(0xA000018A),1,0,24,TYPE=SA
+
+; Localised Vendor name
+%{"Vendor-EN"}
+
+; Unique Vendor name
+:"Vendor"
+
+;Supports S60 v 3.0
+[0x101F7961], 0, 0, 0, {"S60ProductID"}
+
+; EXEs
+"..\..\..\epoc32\release\gcce\urel\SatelliteReference.exe"-"!:\sys\bin\SatelliteReference.exe"
+
+
+; Resource files
+"..\..\..\epoc32\data\z\resource\apps\SatelliteReference.RSC"		-"!:\resource\apps\SatelliteReference.RSC"
+"..\..\..\epoc32\data\z\private\10003a3f\import\apps\SatelliteReference_reg.RSC"-"!:\private\10003a3f\import\apps\SatelliteReference_reg.RSC"
+"..\..\..\epoc32\data\z\resource\apps\lsatviewrefapp_aif.mif"		-"!:\resource\apps\lsatviewrefapp_aif.mif"
+
+; Required files:
+;required for application to be covered by backup/restore facility 
+"backup_registration.xml"						-"!:\private\A000018A\backup_registration.xml"
+
+; Embedded SIS-files
+; none
+
+; End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationsatviewrefapp/sis/backup_registration.xml	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,5 @@
+<?xml version="1.0" standalone="yes"?>
+<backup_registration>
+  <system_backup/>
+  <restore requires_reboot = "no"/>
+</backup_registration>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationsatviewrefapp/src/SatelliteReferenceApp.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,74 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+/*
+* ============================================================================
+*  Name     : SatelliteReferenceApp 
+*  Part of  : Satellite Reference App 
+* ============================================================================
+*/
+
+// INCLUDE FILES
+#include    "SatelliteReferenceApp.h"
+#include    "SatelliteReferenceDocument.h"
+#include 	<eikstart.h>
+
+// ================= OTHER EXPORTED FUNCTIONS ==============
+//
+// ---------------------------------------------------------
+// NewApplication() 
+// Constructs CSatelliteReferenceApp
+// Returns: created application object
+// ---------------------------------------------------------
+//
+EXPORT_C CApaApplication* NewApplication()
+    {
+    return new CSatelliteReferenceApp;
+    }
+
+// ================= MEMBER FUNCTIONS =======================
+
+// ---------------------------------------------------------
+// CSatelliteReferenceApp::AppDllUid()
+// Returns application UID
+// ---------------------------------------------------------
+//
+TUid CSatelliteReferenceApp::AppDllUid() const
+    {
+    return KUidSatelliteReferenceApp;
+    }
+  
+
+GLDEF_C TInt E32Main()
+    {
+    return EikStart::RunApplication( NewApplication );
+    }
+   
+// ---------------------------------------------------------
+// CSatelliteReferenceApp::CreateDocumentL()
+// Creates SatelliteReferenceDocument object
+// ---------------------------------------------------------
+//
+CApaDocument* CSatelliteReferenceApp::CreateDocumentL()
+    {
+    return CSatelliteReferenceDocument::NewL( *this );
+    }
+
+
+
+// End of File  
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationsatviewrefapp/src/SatelliteReferenceAppUi.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,145 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+/*
+* ============================================================================
+*  Name     : SatelliteReferenceAppUi
+*  Part of  : Satellite Reference App
+* ============================================================================
+*/
+
+// INCLUDE FILES
+#include "SatelliteReferenceAppUi.h"
+#include "SatelliteReferenceContainer.h" 
+#include <satellitereference.rsg>
+#include "SatelliteReference.hrh"
+#include <StringLoader.h>
+
+#include <avkon.hrh>
+
+// ================= MEMBER FUNCTIONS =======================
+//
+// ----------------------------------------------------------
+// CSatelliteReferenceAppUi::ConstructL()
+// ----------------------------------------------------------
+//
+void CSatelliteReferenceAppUi::ConstructL()
+    {
+    //we hae to enable MSK for 3.2
+    BaseConstructL( EAknEnableMSK );
+    iAppContainer = new (ELeave) CSatelliteReferenceContainer;
+    iAppContainer->SetMopParent(this);
+    iAppContainer->ConstructL( ClientRect(), this);
+    AddToStackL( iAppContainer );
+    }
+
+// ----------------------------------------------------
+// CSatelliteReferenceAppUi::~CSatelliteReferenceAppUi()
+// Destructor
+// Frees reserved resources
+// ----------------------------------------------------
+//
+CSatelliteReferenceAppUi::~CSatelliteReferenceAppUi()
+    {
+    if (iAppContainer)
+        {
+        RemoveFromStack( iAppContainer );
+        delete iAppContainer;
+        }
+   }
+
+// ------------------------------------------------------------------------------
+//  CSatelliteReferenceAppUi::DynInitMenuPaneL(TInt aResourceId,CEikMenuPane* aMenuPane)
+//  This function is called by the EIKON framework just before it displays
+//  a menu pane. Its default implementation is empty, and by overriding it,
+//  the application can set the state of menu items dynamically according
+//  to the state of application data.
+// ------------------------------------------------------------------------------
+//
+void CSatelliteReferenceAppUi::DynInitMenuPaneL(
+    TInt /*aResourceId*/,CEikMenuPane* /*aMenuPane*/)
+    {
+    }
+
+// ----------------------------------------------------
+// CSatelliteReferenceAppUi::HandleKeyEventL(
+//     const TKeyEvent& aKeyEvent,TEventCode /*aType*/)
+// ----------------------------------------------------
+//
+TKeyResponse CSatelliteReferenceAppUi::HandleKeyEventL(
+    const TKeyEvent& /*aKeyEvent*/,TEventCode /*aType*/)
+    {
+    return EKeyWasNotConsumed;
+    }
+    
+// ------------------------------------------------------------------
+// CSatelliteReferenceAppUi::HandleForegroundEventL(TBool aForeground)
+// ------------------------------------------------------------------
+//
+void CSatelliteReferenceAppUi::HandleForegroundEventL(TBool aForeground)
+	{
+	if(iSatelliteInfo)	
+		{
+		iSatelliteInfo->HandleForegroundEventL(aForeground);			
+		}
+	}
+
+// ----------------------------------------------------
+// CSatelliteReferenceAppUi::HandleCommandL(TInt aCommand)
+// ----------------------------------------------------
+//
+void CSatelliteReferenceAppUi::HandleCommandL(TInt aCommand)
+    {
+    switch ( aCommand )
+        {
+        case EAknSoftkeyBack:
+        case EAknSoftkeyExit:
+        case EEikCmdExit:
+            {
+            Exit();
+            break;
+            }
+            
+        case ESatelliteInfoCmd:
+	        {
+	        HBufC* srvName = StringLoader::LoadLC( 
+	                              R_SATREF_SERVICE_RULE_NAME, 
+	                              CEikonEnv::Static() );
+	        // Creating instance of CSatelliteInfo
+	    	iSatelliteInfo = CSatelliteInfoUI::NewL();
+	    	
+	    	//Setting the default satellite view as Firmament view 
+	    	iSatelliteInfo->SetLaunchView(CSatelliteInfoUI::ESatelliteFirmamentView);
+	    	
+	    	// ExecuteLD displays the satellite dialog.
+	    	// The dialog display satellite ID's along with 
+	    	// their signal strengths depicted using bar's.
+	    	iSatelliteInfo->ExecuteLD(*srvName);
+	    	
+	    	CleanupStack::PopAndDestroy(srvName); //srvName
+	    	iSatelliteInfo = NULL;
+	    	break;
+	        }        
+	        	
+        default:
+	        {
+	        break;
+	        }            
+        }
+    }
+
+// End of File  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationsatviewrefapp/src/SatelliteReferenceContainer.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,117 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+/*
+* ============================================================================
+*  Name     : SatelliteReferenceContainer
+*  Part of  : Satellite Reference App
+* ============================================================================
+*/
+
+// INCLUDE FILES
+#include "SatelliteReferenceContainer.h"
+
+#include <eiklabel.h>  // for example label control
+
+// ================= MEMBER FUNCTIONS =======================
+
+// ---------------------------------------------------------
+// CSatelliteReferenceContainer::ConstructL(const TRect& aRect)
+// Second phase constructor
+// ---------------------------------------------------------
+//
+
+void CSatelliteReferenceContainer::ConstructL(const TRect& aRect, CAknAppUi* aAppUi)
+    {
+    CreateWindowL();           
+    SetRect(aRect);
+    ActivateL();
+    iAppUi = aAppUi;
+    }
+
+// ------------------------------------------------------------
+// CSatelliteReferenceContainer::~CSatelliteReferenceContainer()
+// Destructor
+// ------------------------------------------------------------
+//
+CSatelliteReferenceContainer::~CSatelliteReferenceContainer()
+    {    
+    }
+
+// ---------------------------------------------------------
+// CSatelliteReferenceContainer::SizeChanged()
+// Called by framework when the view size is changed
+// ---------------------------------------------------------
+//
+void CSatelliteReferenceContainer::SizeChanged()
+    {
+    }
+    
+// ---------------------------------------------------------
+// CSatelliteReferenceContainer::HandleResourceChange()
+// ---------------------------------------------------------
+//
+void CSatelliteReferenceContainer::HandleResourceChange(TInt aType)
+	{
+	if ( aType == KEikDynamicLayoutVariantSwitch )
+        {
+        SetRect(iAppUi->ClientRect());
+        }        	
+	}
+
+// ---------------------------------------------------------
+// CSatelliteReferenceContainer::CountComponentControls() const
+// ---------------------------------------------------------
+//
+TInt CSatelliteReferenceContainer::CountComponentControls() const
+    {
+    return 0; // return nbr of controls inside this container
+    }
+
+// ---------------------------------------------------------
+// CSatelliteReferenceContainer::ComponentControl(TInt aIndex) const
+// ---------------------------------------------------------
+//
+CCoeControl* CSatelliteReferenceContainer::ComponentControl(TInt /*aIndex*/) const
+    {
+    return NULL;
+    }
+
+// ---------------------------------------------------------
+// CSatelliteReferenceContainer::Draw(const TRect& aRect) const
+// ---------------------------------------------------------
+//
+void CSatelliteReferenceContainer::Draw(const TRect& aRect) const
+    {
+    CWindowGc& gc = SystemGc();
+    gc.SetPenStyle(CGraphicsContext::ENullPen);
+    gc.SetBrushColor(KRgbGray);
+    gc.SetBrushStyle(CGraphicsContext::ESolidBrush);
+    gc.DrawRect(aRect);
+    }
+
+// ---------------------------------------------------------
+// CSatelliteReferenceContainer::HandleControlEventL(
+//     CCoeControl* aControl,TCoeEvent aEventType)
+// ---------------------------------------------------------
+//
+void CSatelliteReferenceContainer::HandleControlEventL(
+    CCoeControl* /*aControl*/,TCoeEvent /*aEventType*/)
+    {
+    }
+
+// End of File  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationsatviewrefapp/src/SatelliteReferenceDocument.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,86 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+/*
+* ============================================================================
+*  Name     : SatelliteReferenceDocument
+*  Part of  : Satellite Reference App
+* ============================================================================
+*/
+
+// INCLUDE FILES
+#include "SatelliteReferenceDocument.h"
+#include "SatelliteReferenceAppUi.h"
+
+// ================= MEMBER FUNCTIONS =======================
+
+// ---------------------------------------------------------
+// CSatelliteReferenceDocument::CSatelliteReferenceDocument()
+// constructor
+// ---------------------------------------------------------
+//
+CSatelliteReferenceDocument::CSatelliteReferenceDocument(CEikApplication& aApp)
+: CAknDocument(aApp)    
+    {
+    }
+
+// ---------------------------------------------------------
+// CSatelliteReferenceDocument::~CSatelliteReferenceDocument()
+// destructor
+// ---------------------------------------------------------
+//
+CSatelliteReferenceDocument::~CSatelliteReferenceDocument()
+    {
+    }
+
+
+// ---------------------------------------------------------
+// CSatelliteReferenceDocument::ConstructL()
+// EPOC default constructor can leave.
+// ---------------------------------------------------------
+//
+void CSatelliteReferenceDocument::ConstructL()
+    {
+    }
+
+
+// ---------------------------------------------------------
+// CSatelliteReferenceDocument::NewL()
+// Two-phased constructor.
+// ---------------------------------------------------------
+//
+CSatelliteReferenceDocument* CSatelliteReferenceDocument::NewL(
+        CEikApplication& aApp)     // SatelliteReferenceApp reference
+    {
+    CSatelliteReferenceDocument* self = new (ELeave) CSatelliteReferenceDocument( aApp );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop();
+    return self;
+    }
+    
+// ----------------------------------------------------
+// CSatelliteReferenceDocument::CreateAppUiL()
+// constructs SatelliteReference
+// ----------------------------------------------------
+//
+CEikAppUi* CSatelliteReferenceDocument::CreateAppUiL()
+    {
+    return new (ELeave) CSatelliteReferenceAppUi;
+    }
+
+// End of File  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mapnavproviderrefapp/BWINS/mnrefproviderengine.50u.def	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,55 @@
+EXPORTS
+	?FindResourceFileL@CMnrpEngine@@QAEXABVTDesC16@@AAV?$TBuf@$0BAA@@@@Z @ 1 NONAME ; void CMnrpEngine::FindResourceFileL(class TDesC16 const &, class TBuf<256> &)
+	?Center@CMnrpMapModel@@QBE?AVTCoordinate@@XZ @ 2 NONAME ; class TCoordinate CMnrpMapModel::Center(void) const
+	?ScreenToAbsolute@CMnrpMapModel@@QBENH@Z @ 3 NONAME ; double CMnrpMapModel::ScreenToAbsolute(int) const
+	?NewL@CMnrpMapModel@@SAPAV1@AAVMMapModelObserver@@AAVCMnrpEngine@@@Z @ 4 NONAME ; class CMnrpMapModel * CMnrpMapModel::NewL(class MMapModelObserver &, class CMnrpEngine &)
+	?Width@CMnrpMapModel@@QBENXZ @ 5 NONAME ; double CMnrpMapModel::Width(void) const
+	?GetPosition@CMnrpPositionRequest@@QAEXAAVTPositionInfo@@@Z @ 6 NONAME ; void CMnrpPositionRequest::GetPosition(class TPositionInfo &)
+	?NewL@CMnrpMapModel@@SAPAV1@AAVCMnrpEngine@@@Z @ 7 NONAME ; class CMnrpMapModel * CMnrpMapModel::NewL(class CMnrpEngine &)
+	?SetOptionsL@CMnrpPositionRequest@@QAEXABVTPositionUpdateOptionsBase@@@Z @ 8 NONAME ; void CMnrpPositionRequest::SetOptionsL(class TPositionUpdateOptionsBase const &)
+	?GoCenter@CMnrpMapModel@@QAEXXZ @ 9 NONAME ; void CMnrpMapModel::GoCenter(void)
+	?FetchNewPosition@CMnrpPositionRequest@@QAEXH@Z @ 10 NONAME ; void CMnrpPositionRequest::FetchNewPosition(int)
+	?Course@CMnrpPositionRequest@@QAEMXZ @ 11 NONAME ; float CMnrpPositionRequest::Course(void)
+	?CoordinateToString@MnrpUtils@@SAXNAAVTDes16@@HH@Z @ 12 NONAME ; void MnrpUtils::CoordinateToString(double, class TDes16 &, int, int)
+	?CurrentLocation@CMnrpMapModel@@QBE?AVTCurrentLocation@1@XZ @ 13 NONAME ; class CMnrpMapModel::TCurrentLocation CMnrpMapModel::CurrentLocation(void) const
+	?AddressToCoordL@CMnrpEngine@@QAEPAVCPosLandmark@@ABV2@@Z @ 14 NONAME ; class CPosLandmark * CMnrpEngine::AddressToCoordL(class CPosLandmark const &)
+	?MoveTo@CMnrpMapModel@@QAEXVTCoordinate@@@Z @ 15 NONAME ; void CMnrpMapModel::MoveTo(class TCoordinate)
+	?AbsoluteToScreen@CMnrpMapModel@@QBEHN@Z @ 16 NONAME ; int CMnrpMapModel::AbsoluteToScreen(double) const
+	?Zoom@CMnrpMapModel@@QAEXN@Z @ 17 NONAME ; void CMnrpMapModel::Zoom(double)
+	?NewL@CMnrpPositionRequest@@SAPAV1@ABVTDesC16@@AAVMMnrpPositionObserver@@@Z @ 18 NONAME ; class CMnrpPositionRequest * CMnrpPositionRequest::NewL(class TDesC16 const &, class MMnrpPositionObserver &)
+	?Right@CMnrpMapModel@@QBENXZ @ 19 NONAME ; double CMnrpMapModel::Right(void) const
+	?Height@CMnrpMapModel@@QBENXZ @ 20 NONAME ; double CMnrpMapModel::Height(void) const
+	?Left@CMnrpMapModel@@QBENXZ @ 21 NONAME ; double CMnrpMapModel::Left(void) const
+	?Heading@CMnrpPositionRequest@@QAEMXZ @ 22 NONAME ; float CMnrpPositionRequest::Heading(void)
+	?AbsoluteToScreen@CMnrpMapModel@@QBE?AVTPoint@@VTCoordinate@@@Z @ 23 NONAME ; class TPoint CMnrpMapModel::AbsoluteToScreen(class TCoordinate) const
+	?GetGrid@CMnrpMapModel@@QBEXAAVTGrid@1@@Z @ 24 NONAME ; void CMnrpMapModel::GetGrid(class CMnrpMapModel::TGrid &) const
+	?UpdateModelL@CMnrpMapModel@@QAEXABVCMnrpMapImageService@@@Z @ 25 NONAME ; void CMnrpMapModel::UpdateModelL(class CMnrpMapImageService const &)
+	?UpdateModel@CMnrpMapModel@@QAEXABVTMnMapImageParams@@@Z @ 26 NONAME ; void CMnrpMapModel::UpdateModel(class TMnMapImageParams const &)
+	?FindClosestPoisL@CMnrpEngine@@QAEXABVCPosLandmark@@AAV?$RArray@UTDistanceToPoi@CMnrpEngine@@@@H@Z @ 27 NONAME ; void CMnrpEngine::FindClosestPoisL(class CPosLandmark const &, class RArray<struct CMnrpEngine::TDistanceToPoi> &, int)
+	?Fs@CMnrpEngine@@QAEAAVRFs@@XZ @ 28 NONAME ; class RFs & CMnrpEngine::Fs(void)
+	?AddressToCoordL@CMnrpEngine@@QAEPAVCPosLandmark@@ABVTDesC16@@@Z @ 29 NONAME ; class CPosLandmark * CMnrpEngine::AddressToCoordL(class TDesC16 const &)
+	?AddressToCoordLC@CMnrpEngine@@QAEPAVCPosLandmark@@ABVTDesC16@@@Z @ 30 NONAME ; class CPosLandmark * CMnrpEngine::AddressToCoordLC(class TDesC16 const &)
+	?DistanceToString@MnrpUtils@@SAXNAAVTDes16@@@Z @ 31 NONAME ; void MnrpUtils::DistanceToString(double, class TDes16 &)
+	?Speed@CMnrpPositionRequest@@QAEMXZ @ 32 NONAME ; float CMnrpPositionRequest::Speed(void)
+	??1CMnrpMapModel@@UAE@XZ @ 33 NONAME ; CMnrpMapModel::~CMnrpMapModel(void)
+	?Bottom@CMnrpMapModel@@QBENXZ @ 34 NONAME ; double CMnrpMapModel::Bottom(void) const
+	?CoordToAddressLC@CMnrpEngine@@QAEPAVCPosLandmark@@ABVTCoordinate@@@Z @ 35 NONAME ; class CPosLandmark * CMnrpEngine::CoordToAddressLC(class TCoordinate const &)
+	?SpeedToString@MnrpUtils@@SAXNAAVTDes16@@@Z @ 36 NONAME ; void MnrpUtils::SpeedToString(double, class TDes16 &)
+	?NumIgnoredLandmarks@CMnrpMapModel@@QAEHXZ @ 37 NONAME ; int CMnrpMapModel::NumIgnoredLandmarks(void)
+	??1CMnrpEngine@@UAE@XZ @ 38 NONAME ; CMnrpEngine::~CMnrpEngine(void)
+	?AngleToString@MnrpUtils@@SAXNAAVTDes16@@@Z @ 39 NONAME ; void MnrpUtils::AngleToString(double, class TDes16 &)
+	?PrintableStringLC@MnrpUtils@@SAPAVHBufC16@@ABVTDesC16@@@Z @ 40 NONAME ; class HBufC16 * MnrpUtils::PrintableStringLC(class TDesC16 const &)
+	?MagneticCourse@CMnrpPositionRequest@@QAEMXZ @ 41 NONAME ; float CMnrpPositionRequest::MagneticCourse(void)
+	?SetScreenSize@CMnrpMapModel@@QAEXVTSize@@@Z @ 42 NONAME ; void CMnrpMapModel::SetScreenSize(class TSize)
+	?BestCoordToAddressMatchesL@CMnrpEngine@@QAEXABVTCoordinate@@AAV?$RPointerArray@VCPosLandmark@@@@H@Z @ 43 NONAME ; void CMnrpEngine::BestCoordToAddressMatchesL(class TCoordinate const &, class RPointerArray<class CPosLandmark> &, int)
+	?AddressToCoordLC@CMnrpEngine@@QAEPAVCPosLandmark@@ABV2@@Z @ 44 NONAME ; class CPosLandmark * CMnrpEngine::AddressToCoordLC(class CPosLandmark const &)
+	?MagneticHeading@CMnrpPositionRequest@@QAEMXZ @ 45 NONAME ; float CMnrpPositionRequest::MagneticHeading(void)
+	?Top@CMnrpMapModel@@QBENXZ @ 46 NONAME ; double CMnrpMapModel::Top(void) const
+	??1CMnrpPositionRequest@@UAE@XZ @ 47 NONAME ; CMnrpPositionRequest::~CMnrpPositionRequest(void)
+	?ScreenToAbsolute@CMnrpMapModel@@QBE?AVTCoordinate@@VTPoint@@@Z @ 48 NONAME ; class TCoordinate CMnrpMapModel::ScreenToAbsolute(class TPoint) const
+	?DistanceBetweenLandmarks@CMnrpEngine@@QAEMABVCPosLandmark@@0@Z @ 49 NONAME ; float CMnrpEngine::DistanceBetweenLandmarks(class CPosLandmark const &, class CPosLandmark const &)
+	?KnownPlacesL@CMnrpEngine@@QAE?AV?$TArray@PAVCPosLandmark@@@@XZ @ 50 NONAME ; class TArray<class CPosLandmark *> CMnrpEngine::KnownPlacesL(void)
+	?UpdateModelL@CMnrpMapModel@@QAEXAAVCMnrpMapViewService@@@Z @ 51 NONAME ; void CMnrpMapModel::UpdateModelL(class CMnrpMapViewService &)
+	?NewL@CMnrpEngine@@SAPAV1@XZ @ 52 NONAME ; class CMnrpEngine * CMnrpEngine::NewL(void)
+	?RenderL@CMnrpMapModel@@QBEXAAVCFbsBitmap@@VTRect@@PAVCFont@@2@Z @ 53 NONAME ; void CMnrpMapModel::RenderL(class CFbsBitmap &, class TRect, class CFont *, class CFont *) const
+
Binary file mapnavproviderrefapp/data/default_lm.bmp has changed
Binary file mapnavproviderrefapp/data/default_lm_mask_soft.bmp has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mapnavproviderrefapp/data/mnrefprovider.rss	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,156 @@
+/*
+* 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 definition file for MnRefProvider
+*
+*/
+
+
+NAME MNTP
+
+#include <eikon.rsg>
+#include <eikon.rh>
+#include <avkon.rsg>
+#include <avkon.mbg>
+#include <avkon.rh>
+
+#include <appinfo.rh>
+#include "mnrp.hrh"
+
+RESOURCE RSS_SIGNATURE {  }
+
+RESOURCE TBUF { buf="MnRefProvider"; }
+
+RESOURCE EIK_APP_INFO
+    {
+    menubar = r_mnrefprovider_menubar;
+    cba = R_AVKON_SOFTKEYS_OPTIONS_EXIT;
+    }
+
+RESOURCE LOCALISABLE_APP_INFO r_mnrefprovider_localisable_app_info
+    {
+    short_caption = "MnRefProvider";
+    caption_and_icon =
+        CAPTION_AND_ICON_INFO
+            {
+            caption = "MnRefProvider";
+            };
+    view_list = {};
+    }
+
+RESOURCE CONTEXT_PANE r_mnrefprovider_app_icon
+    {
+    }
+
+RESOURCE MENU_BAR r_mnrefprovider_menubar
+    {
+    titles =
+        {
+        MENU_TITLE
+            {
+            menu_pane = r_mnrefprovider_menu;
+            }
+        };
+    }
+
+RESOURCE MENU_PANE r_mnrefprovider_menu
+    {
+    items =
+        {
+        MENU_ITEM
+            {
+            command = EAknSoftkeyExit;
+            txt = "Exit";
+            }
+        };
+    }
+
+RESOURCE DIALOG r_mnrefprovider_selection_dialog
+    {
+    flags = EAknDialogSelectionList;
+    buttons = R_AVKON_SOFTKEYS_OK_CANCEL;
+    items =
+        {
+        DLG_LINE
+            {
+            type = EAknCtSingleGraphicListBox;
+            id = ESelectionListControl;
+            control = LISTBOX
+                {
+                flags = EAknListBoxSelectionList;
+                };
+            },
+        // the next dlg line is optional.
+        DLG_LINE
+            {
+            itemflags = EEikDlgItemNonFocusing;
+            id = EFindControl;
+            type = EAknCtSelectionListFixedFind;
+            }
+        };
+    }
+
+RESOURCE AVKON_VIEW r_mnrefprovider_map_view
+    {
+    menubar = r_mnrefprovider_map_view_menubar;
+    cba = R_AVKON_SOFTKEYS_OPTIONS_EXIT;
+    }
+
+RESOURCE AVKON_VIEW r_mnrefprovider_map_view_chained
+    {
+    menubar = r_mnrefprovider_map_view_menubar;
+    cba = R_AVKON_SOFTKEYS_OPTIONS_BACK;
+    }
+
+RESOURCE MENU_BAR r_mnrefprovider_map_view_menubar
+    {
+    titles =
+        {
+        MENU_TITLE
+            {
+            menu_pane = r_mnrefprovider_map_view_menu;
+            }
+        };
+    }
+
+RESOURCE MENU_PANE r_mnrefprovider_map_view_menu
+    {
+    items =
+        {
+        MENU_ITEM
+            {
+            command = EMnrpCommandSelect;
+            txt = "Select";
+            },
+        MENU_ITEM
+            {
+            command = EMnrpCommandFullScreen;
+            txt = "Toggle Fullscreen";
+            },
+        MENU_ITEM
+            {
+            command = EAknSoftkeyExit;
+            txt = "Exit";
+            }
+        };
+    }
+
+RESOURCE AVKON_VIEW r_mnrefprovider_navi_view
+    {
+    cba = R_AVKON_SOFTKEYS_EXIT;
+    }
+
+RESOURCE AVKON_VIEW r_mnrefprovider_navi_view_chained
+    {
+    cba = R_AVKON_SOFTKEYS_BACK;
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mapnavproviderrefapp/data/mnrefprovider_reg.rss	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,66 @@
+/*
+* 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:  Registration file for MnRefProvider
+*
+*/
+
+
+#include <appinfo.rh>
+
+#include "mnappserviceuids.hrh"
+#include "mnappservices.hrh"
+#include "mnserviceinfo.rh"
+
+#include <mnrefprovider.rsg>
+
+UID2 KUidAppRegistrationResourceFile
+UID3 0x03132013
+
+RESOURCE APP_REGISTRATION_INFO
+    {
+    app_file = "MnRefProvider";
+    localisable_resource_file = "\\resource\\apps\\MnRefProvider";
+    localisable_resource_id = R_MNREFPROVIDER_LOCALISABLE_APP_INFO;
+    
+    launch = KAppLaunchInForeground;
+    hidden = KAppNotHidden;
+        
+    datatype_list = {};
+    file_ownership_list = {};
+    service_list =
+        {
+        SERVICE_INFO
+            {
+            uid = KMnAppMapViewService;
+            datatype_list = {};
+            opaque_data = r_mnrefprovider_mapview_opaquedata;
+            },
+        SERVICE_INFO
+            {
+            uid = KMnAppNavigationService;
+            datatype_list = {};
+            opaque_data = r_mnrefprovider_navigation_opaquedata;
+            }
+        };
+    }
+
+RESOURCE MN_SERVICE_INFO r_mnrefprovider_mapview_opaquedata
+    {
+    service_features = KMnSvcFeatureShowMap | KMnSvcFeatureSelectFromMap;
+    }
+
+RESOURCE MN_SERVICE_INFO r_mnrefprovider_navigation_opaquedata
+    {
+    service_features = KMnSvcFeatureNavigateTo;
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mapnavproviderrefapp/data/mnrefproviderback.rss	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,95 @@
+/*
+* 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 definition file for MnRefProviderBack
+*
+*/
+
+
+NAME MNRG
+
+#include <eikon.rsg>
+#include <eikon.rh>
+#include <avkon.rsg>
+#include <avkon.mbg>
+#include <avkon.rh>
+
+#include <appinfo.rh>
+
+RESOURCE RSS_SIGNATURE {  }
+
+RESOURCE TBUF { buf="MnRefProviderBack"; }
+
+RESOURCE EIK_APP_INFO
+    {
+    menubar = r_mnrefgeocoder_menubar;
+    cba = R_AVKON_SOFTKEYS_OPTIONS_EXIT;
+    }
+
+RESOURCE LOCALISABLE_APP_INFO r_mnrefgeocoder_localisable_app_info
+    {
+    short_caption = "MnRefProvider";
+    caption_and_icon =
+        CAPTION_AND_ICON_INFO
+            {
+            caption = "MnRefProvider";
+            };
+    view_list = {};
+    }
+
+RESOURCE CONTEXT_PANE r_mnrefgeocoder_app_icon
+    {
+    }
+
+RESOURCE MENU_BAR r_mnrefgeocoder_menubar
+    {
+    titles =
+        {
+        MENU_TITLE
+            {
+            menu_pane = r_mnrefgeocoder_menu;
+            }
+        };
+    }
+
+RESOURCE MENU_PANE r_mnrefgeocoder_menu
+    {
+    items =
+        {
+        MENU_ITEM
+            {
+            command = EAknSoftkeyExit;
+            txt = "Exit";
+            }
+        };
+    }
+
+RESOURCE AVKON_LIST_QUERY r_mnrefgeocoder_list_query
+    {
+    flags = EGeneralQueryFlags;
+    softkeys = R_AVKON_SOFTKEYS_OK_CANCEL;
+    items =
+        {
+        AVKON_LIST_QUERY_DLG_LINE
+            {
+            control = AVKON_LIST_QUERY_CONTROL
+                {
+                listtype = EAknCtSinglePopupMenuListBox;
+                listbox = AVKON_LIST_QUERY_LIST
+                    {
+                    };
+                heading = "Select best match";
+                };
+            }
+        };
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mapnavproviderrefapp/data/mnrefproviderback_reg.rss	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,75 @@
+/*
+* 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:  Registration file for MnRefProviderBack
+*
+*/
+
+
+#include <appinfo.rh>
+
+#include "mnappserviceuids.hrh"
+#include "mnappservices.hrh"
+#include "mnserviceinfo.rh"
+
+#include <mnrefproviderback.rsg>
+
+UID2 KUidAppRegistrationResourceFile
+UID3 0x03132014
+
+RESOURCE APP_REGISTRATION_INFO
+    {
+    app_file = "mnrefproviderback";
+    localisable_resource_file = "\\resource\\apps\\mnrefproviderback";
+    localisable_resource_id = R_MNREFGEOCODER_LOCALISABLE_APP_INFO;
+
+    launch = KAppLaunchInBackground;
+    hidden = KAppIsHidden;
+
+    datatype_list = {};
+    file_ownership_list = {};
+    service_list =
+        {
+        SERVICE_INFO
+            {
+            uid = KMnAppGeocodingService;
+            datatype_list = {};
+            opaque_data = r_mnrefgeocoder_geocoding_opaquedata;
+            }
+#ifdef RD_MAPNAV_BITMAP_ACCESS
+        ,
+        SERVICE_INFO
+            {
+            uid = KMnAppMapImageService;
+            datatype_list = {};
+            opaque_data = r_mnrefprovider_mapimage_opaquedata;
+            }
+#endif
+        };
+    }
+
+RESOURCE MN_SERVICE_INFO r_mnrefgeocoder_geocoding_opaquedata
+    {
+    service_features =
+        KMnSvcFeatureCoordToAddr |
+        KMnSvcFeatureAddrToCoord |
+        KMnSvcFeaturePlainAddrToCoord;
+    }
+
+#ifdef RD_MAPNAV_BITMAP_ACCESS
+RESOURCE MN_SERVICE_INFO r_mnrefprovider_mapimage_opaquedata
+    {
+    service_features = KMnSvcFeatureVectorMap;
+    }
+#endif
+	 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mapnavproviderrefapp/data/mnrefproviderengine.rss	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,205 @@
+/*
+* 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 definition file for MnRefProviderEngine
+*
+*/
+
+
+NAME MNRE
+
+#include <eikon.rsg>
+#include <eikon.rh>
+#include <avkon.rsg>
+#include <avkon.mbg>
+#include <avkon.rh>
+
+#include <appinfo.rh>
+
+RESOURCE RSS_SIGNATURE {  }
+
+RESOURCE TBUF { buf=""; }
+
+STRUCT PLACE
+    {
+    LTEXT city;
+    LTEXT country;
+    DOUBLE lat;
+    DOUBLE lon;
+    }
+
+STRUCT PLACES
+    {
+    STRUCT places[];
+    }
+
+RESOURCE PLACES r_mnrefproviderengine_places
+    {
+    places =
+        {
+        PLACE { city="Tampere"; country="Finland"; lat=61.50; lon=23.83; }, 
+        PLACE { city="Turku"; country="Finland"; lat=60.45; lon=22.28; }, 
+        PLACE { city="Oulu"; country="Finland"; lat=65.02; lon=28.47; }, 
+        PLACE { city="Saint-Petersburg"; country="Russia"; lat=59.92; lon=30.42; }, 
+        PLACE { city="Göteborg"; country="Sweden"; lat=57.72; lon=11.97; }, 
+        PLACE { city="Kabul"; country="Afghanistan"; lat=35.10; lon=68.55; },
+        PLACE { city="Tirana"; country="Albania"; lat=41.74; lon=19.38; },
+        PLACE { city="Algiers"; country="Algeria"; lat=37.55; lon=2.29; },
+        PLACE { city="Luanda"; country="Angola"; lat=-8.35; lon=12.76; },
+        PLACE { city="Yerevan"; country="Armenia"; lat=40.47; lon=44.21; },
+        PLACE { city="Oranjestad"; country="Aruba"; lat=13.12; lon=-70.76; },
+        PLACE { city="Canberra"; country="Australia"; lat=-35.15; lon=149.04; },
+        PLACE { city="Vienna"; country="Austria"; lat=48.75; lon=15.82; },
+        PLACE { city="Baku"; country="Azerbaijan"; lat=40.79; lon=49.50; },
+        PLACE { city="Nassau"; country="Bahamas"; lat=25.74; lon=-77.99; },
+        PLACE { city="Dhaka"; country="Bangladesh"; lat=24.10; lon=90.05; },
+        PLACE { city="Bridgetown"; country="Barbados"; lat=13.68; lon=-60.20; },
+        PLACE { city="Minsk"; country="Belarus"; lat=54.08; lon=27.43; },
+        PLACE { city="Brussels"; country="Belgium"; lat=51.64; lon=3.56; },
+        PLACE { city="Belmopan"; country="Belize"; lat=17.32; lon=-88.52; },
+        PLACE { city="Hamilton"; country="Bermuda"; lat=-37.75; lon=175.28; },
+        PLACE { city="Thimphu"; country="Bhutan"; lat=28.07; lon=89.05; },
+        PLACE { city="Gaborone"; country="Botswana"; lat=-24.36; lon=25.56; },
+        PLACE { city="Brasilia"; country="Brazil"; lat=-15.48; lon=-48.22; },
+        PLACE { city="Sofia"; country="Bulgaria"; lat=43.08; lon=23.00; },
+        PLACE { city="Bujumbura"; country="Burundi"; lat=-3.19; lon=29.17; },
+        PLACE { city="Yaounde"; country="Cameroon"; lat=4.52; lon=10.90; },
+        PLACE { city="Ottawa"; country="Canada"; lat=46.28; lon=-76.53; },
+        PLACE { city="Santiago"; country="Chile"; lat=-33.07; lon=-70.99; },
+        PLACE { city="Beijing"; country="China"; lat=40.13; lon=116.12; },
+        PLACE { city="Bogota"; country="Colombia"; lat=4.78; lon=-74.21; },
+        PLACE { city="Moroni"; country="Comoros"; lat=-11.10; lon=42.69; },
+        PLACE { city="Brazzaville"; country="Congo"; lat=-3.48; lon=14.50; },
+        PLACE { city="Zagreb"; country="Croatia"; lat=45.95; lon=15.88; },
+        PLACE { city="Havana"; country="Cuba"; lat=23.82; lon=-83.05; },
+        PLACE { city="Nicosia"; country="Cyprus"; lat=35.79; lon=32.73; },
+        PLACE { city="Copenhagen"; country="Denmark"; lat=56.32; lon=11.93; },
+        PLACE { city="Djibouti"; country="Djibouti"; lat=12.24; lon=42.35; },
+        PLACE { city="Roseau"; country="Dominica"; lat=15.85; lon=-61.91; },
+        PLACE { city="Quito"; country="Ecuador"; lat=-0.20; lon=-78.55; },
+        PLACE { city="Cairo"; country="Egypt"; lat=30.38; lon=30.87; },
+        PLACE { city="Asmara"; country="Eritrea"; lat=15.40; lon=38.83; },
+        PLACE { city="Tallinn"; country="Estonia"; lat=60.28; lon=23.90; },
+        PLACE { city="Suva"; country="Fiji"; lat=-18.07; lon=178.47; },
+        PLACE { city="Helsinki"; country="Finland"; lat=60.32; lon=24.98; },
+        PLACE { city="Paris"; country="France"; lat=49.86; lon=1.34; },
+        PLACE { city="Libreville"; country="Gabon"; lat=1.11; lon=8.74; },
+        PLACE { city="Banjul"; country="Gambia"; lat=14.07; lon=-17.27; },
+        PLACE { city="Tbilisi"; country="Georgia"; lat=42.63; lon=43.90; },
+        PLACE { city="Berlin"; country="Germany"; lat=52.67; lon=13.23; },
+        PLACE { city="Accra"; country="Ghana"; lat=6.16; lon=-0.79; },
+        PLACE { city="Gibraltar"; country="Gibraltar"; lat=36.14; lon=-5.39; },
+        PLACE { city="Athens"; country="Greece"; lat=38.94; lon=22.74; },
+        PLACE { city="Godthabsfjord"; country="Greenland"; lat=64.47; lon=-52.05; },
+        PLACE { city="Agana"; country="Guam"; lat=14.05; lon=144.17; },
+        PLACE { city="Guatemala"; country="Guatemala"; lat=14.69; lon=-90.39; },
+        PLACE { city="Conakry"; country="Guinea"; lat=9.87; lon=-14.20; },
+        PLACE { city="Georgetown"; country="Guyana"; lat=6.90; lon=-58.26; },
+        PLACE { city="Tegucigalpa"; country="Honduras"; lat=14.40; lon=-87.55; },
+        PLACE { city="Budapest"; country="Hungary"; lat=47.53; lon=19.04; },
+        PLACE { city="Reykjavik"; country="Iceland"; lat=64.58; lon=-22.36; },
+        PLACE { city="Delhi"; country="India"; lat=29.56; lon=76.29; },
+        PLACE { city="Jakarta"; country="Indonesia"; lat=-5.99; lon=106.66; },
+        PLACE { city="Tehran"; country="Iran"; lat=35.91; lon=51.24; },
+        PLACE { city="Baghdad"; country="Iraq"; lat=33.40; lon=44.35; },
+        PLACE { city="Jerusalem"; country="Israel"; lat=31.98; lon=34.97; },
+        PLACE { city="Rome"; country="Italy"; lat=42.78; lon=11.60; },
+        PLACE { city="Kingston"; country="Jamaica"; lat=29.30; lon=167.80; },
+        PLACE { city="Tokyo"; country="Japan"; lat=36.39; lon=139.04; },
+        PLACE { city="Amman"; country="Jordan"; lat=32.28; lon=35.54; },
+        PLACE { city="Almaty"; country="Kazakhstan"; lat=43.45; lon=76.75; },
+        PLACE { city="Nairobi"; country="Kenya"; lat=-0.91; lon=36.43; },
+        PLACE { city="Bairiki"; country="Kiribati"; lat=1.87; lon=172.55; },
+        PLACE { city="Bishkek"; country="Kyrgyzstan"; lat=43.45; lon=74.02; },
+        PLACE { city="Vientiane"; country="Laos"; lat=18.51; lon=102.05; },
+        PLACE { city="Riga"; country="Latvia"; lat=57.18; lon=23.92; },
+        PLACE { city="Beirut"; country="Lebanon"; lat=34.19; lon=35.21; },
+        PLACE { city="Maseru"; country="Lesotho"; lat=-28.58; lon=26.78; },
+        PLACE { city="Monrovia"; country="Liberia"; lat=7.24; lon=-11.72; },
+        PLACE { city="Tripoli"; country="Libya"; lat=33.21; lon=12.87; },
+        PLACE { city="Vaduz"; country="Liechtenstein"; lat=48.11; lon=8.54; },
+        PLACE { city="Vilnius"; country="Lithuania"; lat=54.97; lon=25.00; },
+        PLACE { city="Luxembourg"; country="Luxembourg"; lat=50.55; lon=5.22; },
+        PLACE { city="Macau"; country="Macau"; lat=22.49; lon=113.33; },
+        PLACE { city="Antananarivo"; country="Madagascar"; lat=-18.61; lon=47.21; },
+        PLACE { city="Lilongwe"; country="Malawi"; lat=-13.42; lon=33.22; },
+        PLACE { city="Male"; country="Maldives"; lat=4.90; lon=72.77; },
+        PLACE { city="Bamako"; country="Mali"; lat=13.47; lon=-8.82; },
+        PLACE { city="Valletta"; country="Malta"; lat=36.43; lon=13.97; },
+        PLACE { city="Nouakchott"; country="Mauritania"; lat=18.32; lon=-16.14; },
+        PLACE { city="Dzaoudzi"; country="Mayotte"; lat=-12.34; lon=44.84; },
+        PLACE { city="Palikir"; country="Micronesia"; lat=7.51; lon=157.56; },
+        PLACE { city="Chisinau"; country="Moldova"; lat=47.92; lon=27.95; },
+        PLACE { city="Monaco"; country="Monaco"; lat=44.41; lon=6.67; },
+        PLACE { city="Plymouth"; country="Montserrat"; lat=50.65; lon=-4.42; },
+        PLACE { city="Rabat"; country="Morocco"; lat=34.81; lon=-7.57; },
+        PLACE { city="Maputo"; country="Mozambique"; lat=-25.66; lon=32.23; },
+        PLACE { city="Yangon"; country="Myanmar"; lat=16.84; lon=96.08; },
+        PLACE { city="Windhoek"; country="Namibia"; lat=-21.94; lon=16.42; },
+        PLACE { city="Domaneab"; country="Nauru"; lat=0.31; lon=166.07; },
+        PLACE { city="Kathmandu"; country="Nepal"; lat=28.43; lon=84.66; },
+        PLACE { city="Amsterdam"; country="Netherlands"; lat=53.17; lon=4.01; },
+        PLACE { city="Managua"; country="Nicaragua"; lat=12.61; lon=-86.84; },
+        PLACE { city="Niamey"; country="Niger"; lat=13.73; lon=1.89; },
+        PLACE { city="Lagos"; country="Nigeria"; lat=38.00; lon=-9.60; },
+        PLACE { city="Alofi"; country="Niue"; lat=-18.95; lon=-170.02; },
+        PLACE { city="Oslo"; country="Norway"; lat=60.46; lon=10.20; },
+        PLACE { city="Muscat"; country="Oman"; lat=24.48; lon=57.74; },
+        PLACE { city="Islamabad"; country="Pakistan"; lat=34.43; lon=72.40; },
+        PLACE { city="Koror"; country="Palau"; lat=7.77; lon=134.06; },
+        PLACE { city="Panama"; country="Panama"; lat=9.97; lon=-80.52; },
+        PLACE { city="Asuncion"; country="Paraguay"; lat=-25.26; lon=-57.67; },
+        PLACE { city="Lima"; country="Peru"; lat=-11.31; lon=-77.79; },
+        PLACE { city="Manila"; country="Philippines"; lat=14.80; lon=120.75; },
+        PLACE { city="Adamstown"; country="Pitcairn"; lat=-24.53; lon=-130.62; },
+        PLACE { city="Warsaw"; country="Poland"; lat=52.94; lon=20.28; },
+        PLACE { city="Lisbon"; country="Portugal"; lat=38.72; lon=-9.20; },
+        PLACE { city="Doha"; country="Qatar"; lat=25.95; lon=50.93; },
+        PLACE { city="Bucharest"; country="Romania"; lat=45.34; lon=25.21; },
+        PLACE { city="Moscow"; country="Russia"; lat=55.88; lon=37.50; },
+        PLACE { city="Kigali"; country="Rwanda"; lat=-1.70; lon=29.78; },
+        PLACE { city="Dakar"; country="Senegal"; lat=15.06; lon=-17.87; },
+        PLACE { city="Victoria"; country="Seychelles"; lat=-3.71; lon=54.53; },
+        PLACE { city="Singapore"; country="Singapore"; lat=1.28; lon=103.85; },
+        PLACE { city="Ljubljana"; country="Slovenia"; lat=46.83; lon=13.79; },
+        PLACE { city="Mogadishu"; country="Somalia"; lat=2.60; lon=44.85; },
+        PLACE { city="Madrid"; country="Spain"; lat=41.49; lon=-4.74; },
+        PLACE { city="Khartoum"; country="Sudan"; lat=15.56; lon=32.54; },
+        PLACE { city="Paramaribo"; country="Surinam"; lat=5.85; lon=-55.18; },
+        PLACE { city="Mbabane"; country="Swaziland"; lat=-25.92; lon=30.72; },
+        PLACE { city="Stockholm"; country="Sweden"; lat=59.67; lon=17.71; },
+        PLACE { city="Berne"; country="Switzerland"; lat=47.49; lon=6.92; },
+        PLACE { city="Damascus"; country="Syria"; lat=33.89; lon=35.91; },
+        PLACE { city="Taipei"; country="Taiwan"; lat=25.93; lon=120.62; },
+        PLACE { city="Dushanbe"; country="Tajikistan"; lat=39.48; lon=67.88; },
+        PLACE { city="Dodoma"; country="Tanzania"; lat=-5.16; lon=34.78; },
+        PLACE { city="Bangkok"; country="Thailand"; lat=14.36; lon=99.90; },
+        PLACE { city="Lhasa"; country="Tibet"; lat=30.60; lon=90.17; },
+        PLACE { city="Lome"; country="Togo"; lat=6.63; lon=0.73; },
+        PLACE { city="Tunis"; country="Tunisia"; lat=36.85; lon=10.17; },
+        PLACE { city="Ankara"; country="Turkey"; lat=40.34; lon=32.56; },
+        PLACE { city="Ashkhabad"; country="Turkmenistan"; lat=38.22; lon=58.11; },
+        PLACE { city="Funafuti"; country="Tuvalu"; lat=-8.30; lon=178.96; },
+        PLACE { city="Kampala"; country="Uganda"; lat=1.20; lon=31.64; },
+        PLACE { city="Kiev"; country="Ukraine"; lat=50.92; lon=30.06; },
+        PLACE { city="Montevideo"; country="Uruguay"; lat=-34.21; lon=-56.81; },
+        PLACE { city="Tashkent"; country="Uzbekistan"; lat=41.40; lon=69.24; },
+        PLACE { city="Caracas"; country="Venezuela"; lat=11.16; lon=-67.58; },
+        PLACE { city="Hanoi"; country="Vietnam"; lat=21.33; lon=105.67; },
+        PLACE { city="Sanaa"; country="Yemen"; lat=16.39; lon=43.26; },
+        PLACE { city="Belgrade"; country="Yugoslavia"; lat=45.56; lon=19.77; },
+        PLACE { city="Lusaka"; country="Zambia"; lat=-15.00; lon=27.80; },
+        PLACE { city="Harare"; country="Zimbabwe"; lat=-17.30; lon=30.61; }
+		};
+	}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mapnavproviderrefapp/data/mnrefproviderplugin.rss	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,51 @@
+/*
+* 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:  Defines the ECom registration resource for TestProviderPlugin.
+*
+*/
+
+
+//  RESOURCE IDENTIFIER
+NAME MNTP
+
+#include <ecom/registryinfov2.rh>
+#include <mnpluginuids.hrh> // defines interface UID
+
+RESOURCE REGISTRY_INFO r_mycoordconverterplugin_reginfo
+	{
+	resource_format_version = RESOURCE_FORMAT_VERSION_2;
+	// DLL UID of the DLL
+	dll_uid = 0x03133037;
+	interfaces =
+	    {
+	    INTERFACE_INFO
+	        {
+	        // UID of coordinate converter interface,
+	        // defined in mnpluginuids.hrh
+	        interface_uid = KMnMapImageConverterIf;
+	        implementations =
+	            {
+	            IMPLEMENTATION_INFO
+	                {
+	                // The licensee needs to allocate this UID from Symbian
+	                implementation_uid = 0x03133038;
+	                version_no = 1;
+	                display_name = "MnRefProviderCoordConverter";
+	                // SID of provider application executable
+	                default_data = "03132014";
+	                }
+	            };
+	        }
+	    };
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mapnavproviderrefapp/eabi/mnrefproviderengine.50u.def	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,64 @@
+EXPORTS
+	_ZN11CMnrpEngine12KnownPlacesLEv @ 1 NONAME
+	_ZN11CMnrpEngine15AddressToCoordLERK12CPosLandmark @ 2 NONAME
+	_ZN11CMnrpEngine15AddressToCoordLERK7TDesC16 @ 3 NONAME
+	_ZN11CMnrpEngine16AddressToCoordLCERK12CPosLandmark @ 4 NONAME
+	_ZN11CMnrpEngine16AddressToCoordLCERK7TDesC16 @ 5 NONAME
+	_ZN11CMnrpEngine16CoordToAddressLCERK11TCoordinate @ 6 NONAME
+	_ZN11CMnrpEngine16FindClosestPoisLERK12CPosLandmarkR6RArrayINS_14TDistanceToPoiEEi @ 7 NONAME
+	_ZN11CMnrpEngine17FindResourceFileLERK7TDesC16R4TBufILi256EE @ 8 NONAME
+	_ZN11CMnrpEngine24DistanceBetweenLandmarksERK12CPosLandmarkS2_ @ 9 NONAME
+	_ZN11CMnrpEngine26BestCoordToAddressMatchesLERK11TCoordinateR13RPointerArrayI12CPosLandmarkEi @ 10 NONAME
+	_ZN11CMnrpEngine2FsEv @ 11 NONAME
+	_ZN11CMnrpEngine4NewLEv @ 12 NONAME
+	_ZN11CMnrpEngineD0Ev @ 13 NONAME
+	_ZN11CMnrpEngineD1Ev @ 14 NONAME
+	_ZN11CMnrpEngineD2Ev @ 15 NONAME
+	_ZN13CMnrpMapModel11UpdateModelERK17TMnMapImageParams @ 16 NONAME
+	_ZN13CMnrpMapModel12UpdateModelLER19CMnrpMapViewService @ 17 NONAME
+	_ZN13CMnrpMapModel12UpdateModelLERK20CMnrpMapImageService @ 18 NONAME
+	_ZN13CMnrpMapModel13SetScreenSizeE5TSize @ 19 NONAME
+	_ZN13CMnrpMapModel19NumIgnoredLandmarksEv @ 20 NONAME
+	_ZN13CMnrpMapModel4NewLER11CMnrpEngine @ 21 NONAME
+	_ZN13CMnrpMapModel4NewLER17MMapModelObserverR11CMnrpEngine @ 22 NONAME
+	_ZN13CMnrpMapModel4ZoomEd @ 23 NONAME
+	_ZN13CMnrpMapModel6MoveToE11TCoordinate @ 24 NONAME
+	_ZN13CMnrpMapModel8GoCenterEv @ 25 NONAME
+	_ZN20CMnrpPositionRequest11GetPositionER13TPositionInfo @ 26 NONAME
+	_ZN20CMnrpPositionRequest11SetOptionsLERK26TPositionUpdateOptionsBase @ 27 NONAME
+	_ZN20CMnrpPositionRequest14MagneticCourseEv @ 28 NONAME
+	_ZN20CMnrpPositionRequest15MagneticHeadingEv @ 29 NONAME
+	_ZN20CMnrpPositionRequest16FetchNewPositionEi @ 30 NONAME
+	_ZN20CMnrpPositionRequest4NewLERK7TDesC16R21MMnrpPositionObserver @ 31 NONAME
+	_ZN20CMnrpPositionRequest5SpeedEv @ 32 NONAME
+	_ZN20CMnrpPositionRequest6CourseEv @ 33 NONAME
+	_ZN20CMnrpPositionRequest7HeadingEv @ 34 NONAME
+	_ZN20CMnrpPositionRequestD0Ev @ 35 NONAME
+	_ZN20CMnrpPositionRequestD1Ev @ 36 NONAME
+	_ZN20CMnrpPositionRequestD2Ev @ 37 NONAME
+	_ZN9MnrpUtils13AngleToStringEdR6TDes16 @ 38 NONAME
+	_ZN9MnrpUtils13SpeedToStringEdR6TDes16 @ 39 NONAME
+	_ZN9MnrpUtils16DistanceToStringEdR6TDes16 @ 40 NONAME
+	_ZN9MnrpUtils17PrintableStringLCERK7TDesC16 @ 41 NONAME
+	_ZN9MnrpUtils18CoordinateToStringEdR6TDes16ii @ 42 NONAME
+	_ZNK13CMnrpMapModel16AbsoluteToScreenE11TCoordinate @ 43 NONAME
+	_ZNK13CMnrpMapModel16ScreenToAbsoluteE6TPoint @ 44 NONAME
+	_ZNK13CMnrpMapModel16ScreenToAbsoluteEi @ 45 NONAME
+	_ZNK13CMnrpMapModel3TopEv @ 46 NONAME
+	_ZNK13CMnrpMapModel4LeftEv @ 47 NONAME
+	_ZNK13CMnrpMapModel5RightEv @ 48 NONAME
+	_ZNK13CMnrpMapModel5WidthEv @ 49 NONAME
+	_ZNK13CMnrpMapModel6BottomEv @ 50 NONAME
+	_ZNK13CMnrpMapModel6CenterEv @ 51 NONAME
+	_ZNK13CMnrpMapModel6HeightEv @ 52 NONAME
+	_ZNK13CMnrpMapModel7GetGridERNS_5TGridE @ 53 NONAME
+	_ZNK13CMnrpMapModel7RenderLER10CFbsBitmap5TRectP5CFontS4_ @ 54 NONAME
+	_ZTI11CMnrpEngine @ 55 NONAME ; #<TI>#
+	_ZTI13CMnrpMapModel @ 56 NONAME ; #<TI>#
+	_ZTI20CMnrpPositionRequest @ 57 NONAME ; #<TI>#
+	_ZTIN13CMnrpMapModel9CDrawItemE @ 58 NONAME ; #<TI>#
+	_ZTV11CMnrpEngine @ 59 NONAME ; #<VT>#
+	_ZTV13CMnrpMapModel @ 60 NONAME ; #<VT>#
+	_ZTV20CMnrpPositionRequest @ 61 NONAME ; #<VT>#
+	_ZTVN13CMnrpMapModel9CDrawItemE @ 62 NONAME ; #<VT>#
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mapnavproviderrefapp/group/bld.inf	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,40 @@
+/*
+* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Build information file for project MapNavRefProviderApp
+*
+*/
+
+
+#include <bldvariant.hrh>
+#include <platform_paths.hrh>
+
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_EXTENSIONS
+START EXTENSION s60/mifconv
+OPTION TARGETFILE MnRefProvider.mif  // this will also generate .mbm;
+OPTION HEADERFILE MnRefProvider.mbg
+OPTION SOURCES -c8,8 default_lm.bmp
+OPTION SOURCEDIR ../data
+END
+
+PRJ_MMPFILES
+mnrefengine.mmp
+mnrefprovider.mmp
+mnrefproviderback.mmp
+
+#ifdef RD_MAPNAV_BITMAP_ACCESS
+mnrefproviderplugin.mmp
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mapnavproviderrefapp/group/mnrefengine.mmp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,59 @@
+/*
+* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Project definition file for MnRefProviderEngine
+*
+*/
+
+
+#include <platform_paths.hrh>
+
+TARGET              mnrefproviderengine.dll
+TARGETTYPE          dll
+UID                 0x1000008D 0x03132015
+
+VENDORID            VID_DEFAULT
+CAPABILITY          ReadUserData WriteUserData Location
+
+SOURCEPATH          ../src
+
+SOURCE              mnrpengine.cpp
+SOURCE              mnrpmapmodel.cpp
+SOURCE              mnrppositionrequest.cpp
+SOURCE              mnrputils.cpp
+
+USERINCLUDE         ../inc
+APP_LAYER_SYSTEMINCLUDE
+
+LIBRARY             euser.lib efsrv.lib estor.lib bafl.lib
+LIBRARY             eikcore.lib
+LIBRARY             aknicon.lib egul.lib gdi.lib bitgdi.lib
+
+LIBRARY             eposlandmarks.lib
+LIBRARY             lbs.lib
+LIBRARY             mnclientlib.lib mnservicelib.lib
+
+DEBUGLIBRARY        flogger.lib
+
+START RESOURCE      ../data/mnrefproviderengine.rss
+HEADER
+TARGETPATH          /resource
+END
+
+#ifdef RD_MAPNAV_BITMAP_ACCESS
+#ifdef WINS
+DEFFILE         ../BWINS/mnrefproviderengine.50.def
+#else
+DEFFILE         ../eabi/mnrefproviderengine.50.def
+#endif
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mapnavproviderrefapp/group/mnrefprovider.mmp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,77 @@
+/*
+* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Project definition file for MnRefProvider
+*
+*/
+
+
+#include <platform_paths.hrh>
+
+TARGET              mnrefprovider.exe
+TARGETTYPE          exe
+EPOCSTACKSIZE       0x5000
+UID                 0x100039CE 0x03132013
+
+VENDORID            VID_DEFAULT
+CAPABILITY          ReadUserData WriteUserData Location
+
+SOURCEPATH          ../src
+
+SOURCE              mnrefprovider.cpp
+SOURCE              mnrpapplication.cpp
+SOURCE              mnrpappui.cpp
+SOURCE              mnrpdocument.cpp
+SOURCE              mnrpappserver.cpp
+
+SOURCE              mnrpappview.cpp
+SOURCE              mnrpappcontrol.cpp
+
+SOURCE              mnrpmapview.cpp
+SOURCE              mnrpmapcontrol.cpp
+
+SOURCE              mnrpnaviview.cpp
+SOURCE              mnrpnavimodel.cpp
+SOURCE              mnrpnavicontrol.cpp
+
+SOURCE              mnrpnavigationservice.cpp
+SOURCE              mnrpmapviewservice.cpp
+
+USERINCLUDE         ../inc
+
+APP_LAYER_SYSTEMINCLUDE
+
+LIBRARY             euser.lib efsrv.lib estor.lib apparc.lib bafl.lib
+LIBRARY             cone.lib eikcore.lib eikcoctl.lib eikctl.lib eikdlg.lib
+
+LIBRARY             avkon.lib aknskins.lib aknicon.lib
+LIBRARY             egul.lib gdi.lib ws32.lib fbscli.lib
+LIBRARY             imageconversion.lib
+
+LIBRARY             eposlandmarks.lib eposlmsearchlib.lib
+LIBRARY             lbs.lib
+LIBRARY             mnservicelib.lib
+
+LIBRARY             mnrefproviderengine.lib
+
+DEBUGLIBRARY        flogger.lib
+
+START RESOURCE      ../data/mnrefprovider.rss
+HEADER
+TARGETPATH          /resource/apps
+END
+
+START RESOURCE      ../data/mnrefprovider_reg.rss
+DEPENDS mnrefprovider.rsg
+TARGETPATH          /private/10003a3f/apps
+END
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mapnavproviderrefapp/group/mnrefproviderback.mmp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,67 @@
+/*
+* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Project definition file for MnRefGeocoder
+*
+*/
+
+
+#include <platform_paths.hrh>
+
+TARGET              mnrefproviderback.exe
+TARGETTYPE          exe
+EPOCSTACKSIZE       0x5000
+UID                 0x100039CE 0x03132014
+
+VENDORID            VID_DEFAULT
+CAPABILITY          ReadUserData WriteUserData Location
+
+SOURCEPATH          ../src
+
+SOURCE              mnrefproviderback.cpp
+SOURCE              mnrpapplicationback.cpp
+SOURCE              mnrpappuiback.cpp
+SOURCE              mnrpdocumentback.cpp
+SOURCE              mnrpappserverback.cpp
+
+SOURCE              mnrpgeocodingservice.cpp
+#ifdef RD_MAPNAV_BITMAP_ACCESS
+SOURCE              mnrpmapimageservice.cpp
+#endif
+
+USERINCLUDE         ../inc
+APP_LAYER_SYSTEMINCLUDE
+
+LIBRARY             euser.lib efsrv.lib estor.lib bafl.lib
+LIBRARY             cone.lib apparc.lib eikcore.lib eikcoctl.lib
+LIBRARY             ws32.lib gdi.lib
+
+LIBRARY             avkon.lib aknskins.lib
+
+LIBRARY             eposlandmarks.lib
+LIBRARY             lbs.lib
+LIBRARY             mnservicelib.lib
+
+LIBRARY             mnrefproviderengine.lib
+
+DEBUGLIBRARY        flogger.lib
+
+START RESOURCE      ../data/mnrefproviderback.rss
+HEADER
+TARGETPATH          /resource/apps
+END
+
+START RESOURCE      ../data/mnrefproviderback_reg.rss
+DEPENDS mnrefproviderback.rsg
+TARGETPATH          /private/10003a3f/apps
+END
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mapnavproviderrefapp/group/mnrefproviderplugin.mmp	Wed Sep 01 12:31:27 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:  Project definition file for MnRefProviderPlugin
+*
+*/
+
+
+#include <platform_paths.hrh>
+
+TARGET              MnRefProviderPlugin.dll
+TARGETTYPE          PLUGIN
+UID                 0x10009D8D 0x03133037
+
+VENDORID            VID_DEFAULT
+CAPABILITY          ReadUserData WriteUserData Location
+
+SOURCEPATH          ../src
+
+SOURCE              mnrefproviderplugin.cpp
+SOURCE				mnrpcoordconverter.cpp
+
+USERINCLUDE         ../inc
+APP_LAYER_SYSTEMINCLUDE
+
+LIBRARY             euser.lib
+LIBRARY             lbs.lib
+LIBRARY             mnclientlib.lib
+LIBRARY             mnrefproviderengine.lib
+DEBUGLIBRARY        flogger.lib
+
+START RESOURCE      ../data/mnrefproviderplugin.rss
+TARGET			    mnrefproviderplugin.rsc
+TARGETPATH          /resource/plugins
+END
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mapnavproviderrefapp/inc/debug.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,86 @@
+/*
+* 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:  Debug macros
+*
+*/
+
+
+#ifndef MNRP_DEBUG_H
+#define MNRP_DEBUG_H
+
+#include <e32base.h>
+
+#ifdef _DEBUG
+
+#include <e32svr.h>
+#include <e32std.h>
+#include <f32file.h>
+#include <flogger.h>
+
+_LIT(KLogFile, "mnlog.txt");
+_LIT(KLogDirFullName, "c:\\logs\\");
+_LIT(KLogDir, "mn");
+
+inline void Prefix( TDes& aMessage )
+    {
+    RProcess process;
+    _LIT( KPrefix, "[MnRefProvider/%ld]: ");
+    aMessage.Format( KPrefix, process.Id().Id() );
+    }
+
+inline void Log( TRefByValue<const TDesC> aFmt, ... )
+    {
+    VA_LIST list;
+    VA_START( list, aFmt );
+
+    HBufC* buf = HBufC::New(512);
+    if ( buf )
+    	{
+    	TPtr ptr( buf->Des() );
+	    Prefix( ptr );
+	    ptr.AppendFormatList( aFmt, list );
+
+	    RDebug::RawPrint( ptr );
+	    RFileLogger::Write( KLogDir, KLogFile, EFileLoggingModeAppend, ptr );
+
+	    delete buf;
+    	}
+    }
+
+#define LOG( a )             { Log( _L( a ) ); }
+#define LOG1( a, b )         { Log( _L( a ), b ); }
+#define LOG2( a, b, c )      { Log( _L( a ), b, c ); }
+#define LOG3( a, b, c, d )   { Log( _L( a ), b, c, d ); }
+#define LOG4( a, b, c, d, e )   { Log( _L( a ), b, c, d, e ); }
+
+#else // _DEBUG
+
+// Release version - no logging
+#define LOG( a)
+#define LOG1( a, b )
+#define LOG2( a, b, c )
+#define LOG3( a, b, c, d )
+#define LOG4( a, b, c, d, e )
+
+#endif // _DEBUG
+
+inline void Panic( TInt aReason )
+    {
+    _LIT( KPanicCategory, "MnRefProvider" );
+    LOG1("Panicking: %1", aReason);
+    User::Panic( KPanicCategory, aReason );
+    }
+
+#endif // MNRP_DEBUG_H
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mapnavproviderrefapp/inc/mnrp.hrh	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,35 @@
+/*
+* 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:  Common source and resource constants
+*
+*/
+
+
+#ifndef __MNRP_HRH__
+#define __MNRP_HRH__
+
+enum TMnrpCommandIds
+    {
+	EMnrpCommandFullScreen = 100,
+	EMnrpCommandSelect
+    };
+
+enum TMnrpViewIds
+    {
+    EMnrpAppViewId = 1,
+    EMnrpMapViewId,
+    EMnrpNavigationViewId
+    };
+
+#endif // __MNRP_HRH__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mapnavproviderrefapp/inc/mnrpappcontrol.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,53 @@
+/*
+* 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:  CMnrpAppControl class definition 
+*
+*/
+
+
+#ifndef MNRP_APPCONTROL_H
+#define MNRP_APPCONTROL_H
+
+#include <coecntrl.h>
+class CMnrpAppView;
+
+/** Empty view for the case when application is started
+ *	from menu */
+class CMnrpAppControl : public CCoeControl
+    {
+    public:
+
+        static CMnrpAppControl* NewL( CMnrpAppView& aView, const TRect& aRect );
+
+        virtual ~CMnrpAppControl();
+
+    public:  // From CCoeControl
+
+        TInt CountComponentControls() const;
+        CCoeControl* ComponentControl( TInt aIndex ) const;
+        void HandleResourceChange( TInt aType );
+
+        void Draw( const TRect& aRect ) const;
+        
+    private:
+
+        void ConstructL( const TRect& aRect );
+        CMnrpAppControl( CMnrpAppView& aView );
+        
+    private:
+        CMnrpAppView&   iView;
+    };
+
+#endif // MNRP_APPCONTROL_H
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mapnavproviderrefapp/inc/mnrpapplication.h	Wed Sep 01 12:31:27 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:  CMnrpApplication class definition 
+*
+*/
+
+
+#ifndef MNRP_APPLICATION_H
+#define MNRP_APPLICATION_H
+
+#include <eikapp.h>
+
+/**
+ *  An instance of CMnrpApplication is the application part of the Eikon
+ *  application framework for the MnRefProvider.
+ *	MnRefProvider is an Application Server, which implements MapView and Navigation
+ *	services of M&N FW.
+ */
+class CMnrpApplication : public CEikApplication
+    {
+    public:  // from CEikApplication
+
+        /** 
+        * AppDllUid returns the application DLL UID value.
+        *
+        *  @return the UID of this Application/Dll
+        */
+        TUid AppDllUid() const;
+
+    protected: // from CEikApplication
+
+        /** 
+        * CreateDocumentL creates a CApaDocument object and return a pointer to it
+        *
+        * @return a pointer to the created document
+        */
+        CApaDocument* CreateDocumentL();
+        
+        void NewAppServerL(CApaAppServer *&aAppServer);
+
+    };
+
+#endif // MNRP_APPLICATION_H
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mapnavproviderrefapp/inc/mnrpapplicationback.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,56 @@
+/*
+* 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:  CMnrpApplicationBack class definition
+*
+*/
+
+
+#ifndef MNRP_APPLICATIONBACK_H
+#define MNRP_APPLICATIONBACK_H
+
+#include <eikapp.h>
+
+/**
+ *  An instance of CMnrpApplicationBack is the application part of the Eikon
+ *  application framework for the MnRefGeocoder.
+ *	MnRefGeocoder is a hidden application and works only as geocoder server.
+ *	It accepts geocoding requests from M&N FW, serves them and exits, when 
+ *	all clients are disconnected.
+ */
+class CMnrpApplicationBack : public CEikApplication
+    {
+    public:  // from CEikApplication
+
+        /** 
+        * AppDllUid returns the application DLL UID value.
+        *
+        *  @return the UID of this Application/Dll
+        */
+        TUid AppDllUid() const;
+
+    protected: // from CEikApplication
+
+        /** 
+        * CreateDocumentL creates a CApaDocument object and return a pointer to it
+        *
+        * @return a pointer to the created document
+        */
+        CApaDocument* CreateDocumentL();
+        
+        void NewAppServerL(CApaAppServer *&aAppServer);
+
+    };
+
+#endif // MNRP_APPLICATIONBACK_H
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mapnavproviderrefapp/inc/mnrpappserver.h	Wed Sep 01 12:31:27 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:  CMnrpAppServer class definition
+*
+*/
+
+
+#ifndef MNRP_APPSERVER_H
+#define MNRP_APPSERVER_H
+
+#include <AknServerApp.h>
+
+class CMnrpAppUi;
+class CMnrpNavigationService;
+class CMnrpMapViewService;
+
+/** Application Server class of MnRefProvider component */
+class CMnrpAppServer : public CAknAppServer
+    {
+    public:
+        ~CMnrpAppServer();
+        
+        CMnrpAppUi* AppUi();
+
+    public: // from CAknAppServer
+    	/** Creates new service class and returns pointer to it */
+        IMPORT_C CApaAppServiceBase* CreateServiceL(TUid aServiceType) const;
+        
+        /** Overrides base function. Doesn't close application evenb if all
+         *	clients have disconnected until user closes it herself. 
+         *	It is important for standalone execution, when calling application
+         *	may be closed, but user still wants to continue with Map or Navigation.
+         */
+        IMPORT_C void HandleAllClientsClosed();
+        
+    protected:        
+    	/** Creates new navigation service class and returns pointer to it */
+        CMnrpNavigationService* CreateNavigationServiceL() const;
+    	/** Creates new map view service class and returns pointer to it */
+        CMnrpMapViewService* CreateMapViewServiceL() const;
+    };
+
+#endif // MNRP_APPSERVER_H
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mapnavproviderrefapp/inc/mnrpappserverback.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,60 @@
+/*
+* 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:  CMnrpAppServerBack class definition
+*
+*/
+
+
+#ifndef MNRP_APPSERVERBACK_H
+#define MNRP_APPSERVERBACK_H
+
+#include <AknServerApp.h>
+
+class CMnrpGeocodingService;
+class CMnrpEngine;
+
+#ifdef RD_MAPNAV_BITMAP_ACCESS
+class CMnrpMapImageService;
+#endif
+
+/** Application Server class of MnRefGeocoder component
+ *	It ows Engine instance.
+ */
+class CMnrpAppServerBack : public CAknAppServer
+    {
+    public:
+        static CMnrpAppServerBack* NewL();
+        ~CMnrpAppServerBack();
+
+    public: // from CAknAppServer
+    	/** Creates new geocoding service class and returns pointer to it */
+        IMPORT_C CApaAppServiceBase* CreateServiceL( TUid aServiceType ) const;
+
+    protected:
+        void ConstructL();
+
+    	/** Creates new geocoding service class and returns pointer to it */
+        CMnrpGeocodingService* CreateGeocodingServiceL() const;
+
+#ifdef RD_MAPNAV_BITMAP_ACCESS
+    	/** Creates new map image service class and returns pointer to it */
+        CMnrpMapImageService* CreateMapImageServiceL() const;
+#endif
+
+    private:
+        CMnrpEngine* iEngine;
+    };
+
+#endif // MNRP_APPSERVERBACK_H
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mapnavproviderrefapp/inc/mnrpappui.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,120 @@
+/*
+* 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:  CMnrpAppUi class definition
+*
+*/
+
+
+#ifndef MNRP_APPUI_H
+#define MNRP_APPUI_H
+
+#include <aknViewAppUi.h>
+#include <EPos_Landmarks.h>
+
+class TCoordinate;
+class CPosLandmark;
+
+class CMnrpAppView;
+class CMnrpNaviView;
+class CMnrpMapView;
+
+class CMnrpMapViewService;
+
+class CAknNavigationDecorator;
+class CAknNavigationControlContainer;
+
+class CMnrpEngine;
+
+/** Map selection callback class */
+class MMapSelectionCallback
+    {
+    public:
+        /** Called when user selects location from map */
+        virtual void HandleSelectionL( const TCoordinate& aSelection ) = 0;
+
+        /** Called when user selects landmark from dialog list */
+        virtual void HandleSelectionL( TInt aLandmarkIndex ) = 0;
+        virtual void HandleSelectionL( TPosLmItemId aLandmarkId, TInt aDbIndex ) = 0;
+        
+        /** Called when user refuses selection */
+        virtual void HandleSelectionErrorL( TInt aError ) = 0;
+    };
+
+/** Simple App UI for MnRefProvider component.
+ *	It manages application views.
+ */
+class CMnrpAppUi : public CAknViewAppUi
+    {
+    public:
+
+        CMnrpAppUi( CMnrpEngine& aEngine );
+        void ConstructL();
+        ~CMnrpAppUi();
+
+        void ShowMapL( CMnrpMapViewService& aService );
+
+        void StartSelectionL( 
+            CMnrpMapViewService& aService,  
+            MMapSelectionCallback& aCallback );
+
+        void StopSelection();
+
+        void ShowNavigationL( const CPosLandmark& aDestination );
+
+		/** Returns ETrue if Map or Navigaton view is still open */
+        TBool IsAnyUserViewActive();
+        
+		/** Returns ETrue if application was started embedded */
+        TBool IsChainedMode();
+
+        void SetNaviPaneTitleL( const TDesC& aPaneTitle );
+        void SetRightSoftkeyCommandL( TInt aCommand, const TDesC& aButtonTitle );
+        
+    protected: // from CAknAppUi
+    
+        void HandleCommandL(TInt aCommand);
+        void HandleResourceChangeL( TInt aType );
+        TBool ProcessCommandParametersL( CApaCommandLine &aCommandLine );
+
+    private:
+
+        void PostConstructL();
+
+        void SelectFromDialogL(
+            CMnrpMapViewService& aService,
+            MMapSelectionCallback& aCallback );
+
+    private:
+    	/** Empty view */
+        CMnrpAppView* iAppView;
+
+		/** Navigation view */
+        CMnrpNaviView* iNaviView;
+		/** Map view */
+        CMnrpMapView* iMapView;
+
+        //Own:
+        CAknNavigationDecorator* iNaviPaneLabel;
+
+        //Ref:
+        CAknNavigationControlContainer* iNaviPane;
+        
+        TInt iParentWg;
+
+        /** Reference to engine */
+        CMnrpEngine& iEngine;
+    };
+
+#endif // MNRP_APPUI_H
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mapnavproviderrefapp/inc/mnrpappuiback.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,42 @@
+/*
+* 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:   class definition
+*
+*/
+
+
+#ifndef MNRP_APPUIBACK_H
+#define MNRP_APPUIBACK_H
+
+#include <aknViewAppUi.h>
+
+/** Simple App UI class of the MnRefGeocoder component */
+class CMnrpAppUiBack : public CAknAppUi
+    {
+    public:
+        void ConstructL();
+
+        /**  Moves application to foreground */
+        void MoveForeground();
+        
+        /**  Moves application to background */
+        void MoveBackground();
+
+    public: // from CEikAppUi
+
+        void HandleCommandL(TInt aCommand);
+    };
+
+#endif // MNRP_APPUIBACK_H
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mapnavproviderrefapp/inc/mnrpappview.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,59 @@
+/*
+* 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:  CMnrpAppView class definition 
+*
+*/
+
+
+#ifndef MNRP_APPVIEW_H
+#define MNRP_APPVIEW_H
+
+#include <aknview.h>
+
+class CMnrpAppControl;
+
+/** Empty view for the case when application is started
+ *	from menu*/
+class CMnrpAppView : public CAknView
+    {
+    public:
+
+        static CMnrpAppView* NewL();
+        virtual ~CMnrpAppView();
+
+    public: // from CAknView
+
+        TUid Id() const;
+
+        void DoActivateL(
+            const TVwsViewId& aPrevViewId,
+            TUid aCustomMessageId,
+            const TDesC8& aCustomMessage);
+
+        void DoDeactivate();
+
+    private:
+
+        CMnrpAppView();
+        void ConstructL();
+        
+    private:
+    
+    	/** UI control */
+        CMnrpAppControl* iControl;    
+
+    };
+
+#endif // MNRP_APPVIEW_H
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mapnavproviderrefapp/inc/mnrpcoordconverter.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,53 @@
+/*
+* 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:  CMnrpCoordConverter class definition
+*
+*/
+
+
+#ifndef MNRP_COORDINATECONVERTER_H
+#define MNRP_COORDINATECONVERTER_H
+
+#include <mncoordinateconverterbase.h>
+
+class CMnrpEngine;
+class CMnrpMapModel;
+
+class CMnrpCoordConverter : public CMnCoordinateConverterBase
+    {
+    public:
+        static CMnrpCoordConverter* NewL();
+
+        ~CMnrpCoordConverter();
+
+    protected: // From CMnCoordinateConverterBase
+
+        TInt GetImageCoordinate(
+            const TCoordinate& aWorldCoordinate,
+            TPoint& aImagePoint );
+
+        TInt GetWorldCoordinate(
+            const TPoint& aImagePoint,
+            TCoordinate& aWorldCoordinate );
+
+    protected:
+        CMnrpCoordConverter();
+
+    private:
+
+        CMnrpEngine*            iEngine;
+        CMnrpMapModel*          iModel;
+    };
+
+#endif /*MNTP_COORDINATECONVERTER_H*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mapnavproviderrefapp/inc/mnrpdocument.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,54 @@
+/*
+* 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:  CMnrpDocument class definition
+*
+*/
+
+
+#ifndef MNRP_DOCUMENT_H
+#define MNRP_DOCUMENT_H
+
+#include <AknDoc.h>
+
+class CMnrpEngine;
+class CEikApplication;
+
+/** Document class of MnRefProvider component.
+ *	It creates and owns Engine instance
+ */
+class CMnrpDocument : public CAknDocument
+    {
+    public:
+
+        static CMnrpDocument* NewL( CEikApplication& aApp );
+        ~CMnrpDocument();
+
+		/** Returns reference to Engine instance */        
+        CMnrpEngine& Engine();
+
+    public: // from CAknDocument
+
+        CEikAppUi* CreateAppUiL();
+
+    private:
+
+        CMnrpDocument( CEikApplication& aApp );
+        void ConstructL();
+    
+    private:
+        CMnrpEngine* iEngine;        
+    };
+
+#endif // MNRP_DOCUMENT_H
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mapnavproviderrefapp/inc/mnrpdocumentback.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,43 @@
+/*
+* 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:  CMnrpDocumentBack class definition
+*
+*/
+
+
+#ifndef MNRP_DOCUMENTGEO_H
+#define MNRP_DOCUMENTGEO_H
+
+#include <AknDoc.h>
+
+class CEikApplication;
+
+/** Document class of MnRefGeocoder component */
+class CMnrpDocumentBack : public CAknDocument
+    {
+    public:
+
+        static CMnrpDocumentBack* NewL( CEikApplication& aApp );
+
+    public: // from CAknDocument
+
+        CEikAppUi* CreateAppUiL();
+
+    private:
+
+        CMnrpDocumentBack( CEikApplication& aApp );
+    };
+
+#endif // MNRP_DOCUMENTGEO_H
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mapnavproviderrefapp/inc/mnrpengine.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,147 @@
+/*
+* 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:  CMnrpEngine class definition
+*
+*/
+
+
+#ifndef MNRP_ENGINE_H
+#define MNRP_ENGINE_H
+
+#include <e32base.h>
+#include <f32file.h>
+
+class CPosLandmark;
+class TCoordinate;
+class RResourceReader;
+
+/** Engine class used both by MnRefProvider and MnRefGeocoder 
+ *	components. Provides access to POIs database ( resource file,
+ *	some cities ) and geocoding services. 
+ */
+class CMnrpEngine : public CBase
+    {
+    public:
+    
+        struct TDistanceToPoi
+            {
+            TInt iPoiIndex; // index to KnownPlaces
+            TReal32 iDistance; // distance to Poi of iPoiIndex
+            };
+    
+    public:
+        IMPORT_C static CMnrpEngine* NewL();
+        IMPORT_C ~CMnrpEngine();
+
+		/** Gives access to set of POIs */
+        IMPORT_C TArray<CPosLandmark*> KnownPlacesL();
+        
+        /** Returns coordinate of given address:
+		 *	Find a POI, which country or city matches given address
+		 *	and returns its coordinates.
+		 *	@param aAddress landmark, containing address
+		 *	@return landmark, containg coordinates
+		 *	@leave KErrNotFound if can't find POI matching given address
+ 		 */
+        IMPORT_C CPosLandmark* AddressToCoordLC( const CPosLandmark& aAddress );
+
+        /** @overload
+         *  @return landmark, containg coordinates, or NULL
+         */
+        IMPORT_C CPosLandmark* AddressToCoordL( const CPosLandmark& aAddress );
+        
+        /** @overload
+		 *	@param aAddress string containing address
+		 *	@return landmark, containg coordinates
+		 *	@leave KErrNotFound if can't find POI matching given address
+ 		 */
+        IMPORT_C CPosLandmark* AddressToCoordLC( const TDesC& aAddress );
+
+        /** @overload
+         *  @param aAddress string containing address
+         *  @return landmark, containg coordinates, or NULL
+         */
+        IMPORT_C CPosLandmark* AddressToCoordL( const TDesC& aAddress );
+
+        /** Returns address for given coordinate:
+		 *	Find a closest POI and return its city and country and
+ 		 *	fill street with "%d[m,Km,tKm] from <city>" string, like "5 km to Tampere"
+		 *	@param aLocation coordinate
+		 *	@return landmark, containg address
+		 *	@leave KErrNotFound if can't find any POI
+ 		 */
+        IMPORT_C CPosLandmark* CoordToAddressLC( const TCoordinate& aLocation );
+        
+        /** Finds a resource file in the system. 
+         *	It looks on all the drives for the file and folder given as parameter
+         *	@param[in] aFilePathAndName path and name of the file to search for. Drive
+         *							info is ignored
+         *	@param[out] aRscFile full name of found resource file
+         *	@leave KErrNotFound if file is not found.
+         */
+        IMPORT_C void FindResourceFileL( 
+            const TDesC& aFilePathAndName,
+            TFileName& aRscFile );
+
+        /** Returns reference to open file session, given at construction */
+        IMPORT_C RFs& Fs();
+
+        /** Calculates distance between two landmarks.
+         *  @param aFrom Source landmark
+         *  @param aTo Destination landmark
+         *  @return Distance, or NaN, if distance cannot be calculated
+         */
+        IMPORT_C TReal32 DistanceBetweenLandmarks( 
+            const CPosLandmark& aFrom, 
+            const CPosLandmark& aTo );
+
+        /** Finds POIs closest to given reference landmark. 
+         *  @param[in] aReference reference landmark
+         *  @param[out] aNeighbourPois List of closest POIs. 
+         *  @param[in] aMaxMatches Maximum number of results needed
+         */
+        IMPORT_C void FindClosestPoisL( 
+            const CPosLandmark& aReference,
+            RArray<CMnrpEngine::TDistanceToPoi>& aNeighbourPois,
+            TInt aMaxMatches );
+
+        /** Finds POIs closest to given location. 
+         *  @param[in] aReference reference location
+         *  @param[out] aNeighbourPois List of landmarks of closest POIs. 
+         *  @param[in] aMaxMatches Maximum number of results needed
+         */
+        IMPORT_C void BestCoordToAddressMatchesL( 
+            const TCoordinate& aLocation,
+            RPointerArray<CPosLandmark>& aMatches,
+            TInt aMaxMatches );
+
+    protected:
+
+        void ConstructL();
+        CMnrpEngine();
+
+		/** Loads POIs from database ( resource file ) */
+        void LoadKnownPlacesL();
+        /** Reads array of PLACES resource structures */
+        void ReadPlacesResourceL( RResourceReader& aReader );
+        
+        CPosLandmark* CreateCloseLandmarkLC( const CPosLandmark& aReference, TReal32 aDistance );
+
+    private:
+        RPointerArray<CPosLandmark> iPlaces;
+        RFs                         iFileSession;
+    };
+
+#endif // MNRP_ENGINE_H
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mapnavproviderrefapp/inc/mnrpgeocodingservice.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,102 @@
+/*
+* 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:  CMnrpGeocodingService class definition
+*
+*/
+
+
+#ifndef MNRP_GEOCODINGSERVICE_H
+#define MNRP_GEOCODINGSERVICE_H
+
+#include "mngeocodingservicebase.h"
+
+class CPosLandmark;
+class CMnrpEngine;
+
+/** Implementation of geocoding service (KMnAppGeocodingService). 
+ *	It uses CIdle to simulate asynchronous processing. All the geocoding
+ *	job is done using the CMnrpEngine class.
+ */
+class CMnrpGeocodingService : public CMnGeocodingServiceBase
+    {
+    public :
+        static CMnrpGeocodingService* NewL( CMnrpEngine& aEngine );
+        
+    protected :
+        CMnrpGeocodingService( CMnrpEngine& aEngine );
+        virtual ~CMnrpGeocodingService();
+
+        void ConstructL();
+
+		/** Prevents parallel asynchronous requests */
+        void LeaveIfBusyL();
+        /** Starts processing of new request by starting CIdle.*/
+        void StartProcessingL();
+        /** Callback for CIdle. Parameter is the pointer to this. */
+        static TInt GeocodingProcessingCallBack( TAny* aPtr );
+        /** Non-leaving part of geocoding. Calls FinishProcessingL and if
+         *	it leaves, completes client's request with error.*/
+        void HandleGeocodingCompleted();
+        /** Does the geocoding and completes user's request.*/
+        void FinishProcessingL();
+
+        /** Asks user to select one of best Coord to Addr matches */
+        CPosLandmark* LetUserSelectBestMatchL( const CPosLandmark& aReference );
+
+    protected: // from CMnGeocodingServiceBase
+    
+        /** Handles client's request for finding address by given coordinate. */
+        void HandleFindAddressByCoordinateL( const CPosLandmark& aLandmark );
+        
+        /** Handles client's request for finding coordinate by given address. */
+        void HandleFindCoordinateByAddressL( const CPosLandmark& aLandmark );
+
+        /** Handles client's request for finding coordinate by given address. */
+        void HandleFindCoordinateByAddressL( const TDesC& aAddress );
+        
+    protected: // from CMnServiceBase
+
+        /** Reports that client cancelled request */
+        void DoCancel();
+
+    private:
+        CMnrpEngine&            iEngine;
+    
+        enum TServiceType
+            {
+            ENone,
+            ECoordToAddr,
+            EAddrToCoord,
+            EPlainToCoord
+            };
+        
+        /** Type of last received request to make correct request to Engine */    
+        TServiceType            iCurrentService;
+    
+    	/** Keeps client's data */
+        CPosLandmark*           iLandmark;
+    	/** Keeps client's data */
+        HBufC*                  iPlainAddress;
+
+        /** Keeps client's option */
+        TBool                   iDialogAllowed;
+
+		/** Asynchronous geocoding processor */        
+        CIdle*                  iProcessor;
+        
+    };
+
+#endif // MNRP_GEOCODINGSERVICE_H
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mapnavproviderrefapp/inc/mnrpmapcontrol.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,117 @@
+/*
+* 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:  CMnrpMapControl class definition
+*
+*/
+
+
+#ifndef MNRP_MAPCONTROL_H
+#define MNRP_MAPCONTROL_H
+
+#include <coecntrl.h>
+#include "mnrpmapmodel.h"
+
+class CMnrpEngine;
+class CMnrpMapView;
+
+/** Map view. Draws map on screen using information from 
+ 	CMnrpMapModel.
+ */
+class CMnrpMapControl : public CCoeControl, public MMapModelObserver
+    {
+    public: 
+
+        static CMnrpMapControl* NewL( CMnrpMapView& aView, const TRect& aRect, CMnrpEngine& aEngine );
+        virtual ~CMnrpMapControl();
+        
+        void UpdateModelL( CMnrpMapViewService& aService );
+        void SetSelectionModeL( TBool aSelectionMode );
+        
+        /** Returns current cursor location in selection mode */
+        TCoordinate CurrentLocation();
+
+        void ToggleFullScreen();
+
+    public:  // from CCoeControl
+
+        void Draw( const TRect& aRect ) const;
+        TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType );
+        void SizeChanged();
+        void HandleResourceChange( TInt aType );
+
+    public:  // from MMapModelObserver
+
+		/** Redraws itself when model is updated */
+        void HandleModelUpdateL();
+
+    private:
+
+        CMnrpMapControl( CMnrpMapView& aView );
+        void ConstructL( const TRect& aRect, CMnrpEngine& aEngine );
+        
+        void DrawCursor( CWindowGc& aGc ) const;
+
+		/** Draws text around map
+		 *	Top area - left longitude, cell size, right longitude
+		 *	Left area - top latitude, bottom latitude
+		 *	Bottom area - center coordinates
+		 */
+        void DrawGridText( 
+            CWindowGc& aGc, 
+            const TRect& aInnerBox,
+            const TRect& aOuterBox,
+            const CFont* aFont,
+            CMnrpMapModel::TGrid& aGrid ) const;
+
+        /** Helper to find out border size based on font dimensions */
+        TSize BorderSize() const;
+
+		/** Returns specifications of used font */
+        TFontSpec SmallFontSpec( TInt aFontHeightInTwips ) const;
+        
+        void MoveCursor( TInt aXmove, TInt aYmove );
+        TRect CursorMargin();
+
+        void Zoom( TReal aRate );
+
+        void SetFullScreen( TBool aFullScreen );
+
+		void CreateFonts();
+		void DestroyFonts();
+
+		void CreateScreenBufferL( const TSize& aSize );
+        void RenderL();
+
+    private:
+        /** Parent view */
+        CMnrpMapView& iView;
+        
+    	/** Model */
+        CMnrpMapModel* iModel;
+        TSize iViewSize;
+        
+        TBool iSelectionMode;
+        TPoint iCursor;
+        TCoordinate iAbsoluteCursor;
+
+        /** Whether fullscreen mode on or off*/
+        TBool iIsFullScreen;
+        
+        mutable CFbsBitmap* iOffScreenBitmap;
+        CFont* iTextFont;
+        CFont* iItemFont;
+    };
+
+#endif // MNRP_MAPVIEW_H
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mapnavproviderrefapp/inc/mnrpmapimageservice.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,92 @@
+/*
+* 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:  CMnrpMapImageService class
+*
+*/
+
+
+#ifndef MN_TPMAPIMAGESERVICE_H
+#define MN_TPMAPIMAGESERVICE_H
+
+#include "mnmapimageservicebase.h"
+
+class CPosLandmark;
+class CEikonEnv;
+class CFont;
+class CMnrpMapModel;
+
+/** Implementation of geocoding service (KMnAppMapImageService). 
+ */
+class CMnrpMapImageService : public CMnMapImageServiceBase
+    {
+    public :
+        static CMnrpMapImageService* NewL( CMnrpEngine& aEngine );
+        
+        void HandleTestCommandL( TInt aCommand );
+
+    protected :
+        /** C++ constructor */
+        CMnrpMapImageService( CMnrpEngine& aEngine );
+        /** Destructor */
+        virtual ~CMnrpMapImageService();
+
+        void ConstructL();
+
+        void LeaveIfBusyL();
+        void LeaveIfInstructedL();
+        void StartProcessingL();
+        static TInt MapImageProcessingCallBack( TAny* aPtr );
+        void HandleMapImageCompletedL();
+        void FinishProcessingL();
+
+        TInt GetTestCommand();
+
+        void RenderL();
+
+    private:
+        void DumpDataL();
+        
+        void CreateFonts();
+        void DestroyFonts();
+
+    protected: // from CMnMapImageServiceBase
+    
+        /** Handles client's request for finding address by given coordinate. */
+        void HandleRenderingL();
+        
+    protected: // from CMnServiceBase
+
+        /** Reports that client cancelled request */
+        void DoCancel();
+
+    private:
+    
+        enum TServiceType
+            {
+            ENone,
+            ERender,
+            };
+            
+        TServiceType            iCurrentService;
+        CMnrpEngine&            iEngine;
+        CMnrpMapModel*          iModel;
+        CPeriodic*              iProcessor;
+        CEikonEnv*              iEikon;
+        CFont*                  iItemFont;
+        CFont*                  iTextFont;
+    };
+
+#endif // MN_TPMAPIMAGESERVICE_H
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mapnavproviderrefapp/inc/mnrpmapmodel.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,301 @@
+/*
+* 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:  CMnrpMapModel class definition
+*
+*/
+
+
+#ifndef MNRP_MAPMODEL_H
+#define MNRP_MAPMODEL_H
+
+#include <coecntrl.h>
+#include "mnrppositionrequest.h"
+#include "EPos_Landmarks.h"
+
+class CFbsBitmap;
+class CImageDecoder;
+
+class CPosLandmark;
+class CPosLandmarkDatabase;
+class CPosLmCategoryManager;
+
+class CMnrpMapViewService;
+#ifdef RD_MAPNAV_BITMAP_ACCESS
+class CMnrpMapImageService;
+class TMnMapImageParams;
+#endif
+class CMnrpEngine;
+
+class MImageLoaderObserver;
+
+/** Point with real coordinates */
+class TRealPoint
+    {
+    public:
+        TRealPoint();
+        TRealPoint( TReal aX, TReal aY );
+        TRealPoint( TCoordinate aCoordinate );
+
+        TRealPoint operator+( const TRealPoint& aRight );
+        TRealPoint operator-( const TRealPoint& aRight );
+        TRealPoint operator*( const TReal& aRight );
+        TRealPoint operator/( const TReal& aRight );
+
+        void Set( TReal aX, TReal aY );
+        TCoordinate Coordinate();
+        TBool IsValid();
+
+        TReal iX; // matches longitude in this model
+        TReal iY; // matches latitude in this model
+    };
+
+/** Model observer class */
+class MMapModelObserver
+    {
+    public:
+        virtual void HandleModelUpdateL() =0;
+    };
+
+/** Data model for MapView.
+ *  This implementation shows map as rectangle and does not support
+ *  passing its borders. It displays POIs from Engine and client's
+ *	landmarks, which define view area, if not specified by client.
+ */
+class CMnrpMapModel : public CBase, public MMnrpPositionObserver
+    {
+    public:
+        IMPORT_C static CMnrpMapModel* NewL(
+            MMapModelObserver& aObserver,
+            CMnrpEngine& aEngine );
+
+        IMPORT_C static CMnrpMapModel* NewL(
+            CMnrpEngine& aEngine );
+
+        IMPORT_C ~CMnrpMapModel();
+
+		/** Service calls it when new ShowOnMap request comes
+		 *	from client */
+        IMPORT_C void UpdateModelL( CMnrpMapViewService& aService );
+
+#ifdef RD_MAPNAV_BITMAP_ACCESS
+		/** Service calls it when new RenderImage request comes
+		 *	from client */
+        IMPORT_C void UpdateModelL( const CMnrpMapImageService& aService );
+
+		/** Plugin calls it when new CoordinateConversion request comes
+		 *	from client */
+        IMPORT_C void UpdateModel( const TMnMapImageParams& aParams );
+#endif
+		/** Defines dimensions of view used for map display.
+		 *	this information is used to convert absolute coordinates
+		 *	to screen coordinates. Absolute coordinates are plain
+		 *	latitude and longitude degrees.
+		 */
+        IMPORT_C void SetScreenSize( TSize aScreenSize );
+
+        IMPORT_C void RenderL(
+            CFbsBitmap& aBitmap,
+            TRect aTargetRect,
+            CFont* aTextFont,
+            CFont* aItemFont ) const;
+        
+        IMPORT_C TInt NumIgnoredLandmarks();
+
+		/** Draw item.
+		 *	It is a POI or client's landmark, holds coordinates
+		 *	and associated text and icon.
+		 */
+        class CDrawItem : public CBase
+            {
+            public:
+            	/** Constructs from landmark instance */
+                static CDrawItem* NewLC( const CPosLandmark& );
+            	/** Constructs from linked landmark. If landmark
+            	 *	does not have icon, it tries to get icon of its
+            	 *	category, if only single category is assigned.
+            	 */
+                static CDrawItem* NewLC(
+                    const CPosLandmark& aLm,
+                    CPosLmCategoryManager& aCatman );
+
+                ~CDrawItem();
+
+                const TDesC& Text() { return *iText; };
+                TPoint& Position() { return iScreenPosition; };
+                TRealPoint AbsolutePosition() { return iAbsolutePosition; };
+                CFbsBitmap* Bitmap() { return iBitmap; };
+                CFbsBitmap* Mask() { return iMask; };
+                TBool IsPoi() { return iOwnPoi; };
+                
+                void SetAbsolutePosition( const TLocality& aLocality );
+
+            private:
+                HBufC*      iText;
+               	/** Absolute coordinates - lat,lon */
+                TRealPoint  iAbsolutePosition;
+                /** Coordinates on screen (pixels) */
+                TPoint      iScreenPosition;
+                CFbsBitmap* iBitmap;
+                CFbsBitmap* iMask;
+                /** Whether it is client's landmark or internal POI */
+                TBool       iOwnPoi;
+
+            friend class CMnrpMapModel;
+            };
+		/** Returns all items, that can be shown on screen. Screen
+		 *	coordinates are updated according to current scale and viewport */
+        TArray<CDrawItem*> Items() const;
+
+		/** Describes grid to show */
+        class TGrid
+            {
+            public:
+            	/** Reference grid point (screen) */
+                TPoint iReference;
+                /** Distance between grid lines (screen)*/
+                TInt iGridStep;
+
+            	/** Coordinate of reference grid point (absolute) */
+                TCoordinate iAbsoluteReference;
+                /** Distance between grid lines (absolute) */
+                TReal iAbsoluteGridStep;
+            };
+
+        /** Returns grid for current viewport and scale */
+        void GetGrid( TGrid& aGrid ) const;
+
+        /** Information about current location */
+        class TCurrentLocation
+            {
+            public:
+            	/** Screen coordinates */
+                TPoint  iLocation;
+            	/** Error radius in screen units - pixels */
+                TInt    iErrorRadius;
+
+                /** Absolute coordinates */
+                TCoordinate iAbsoluteLocation;
+            	/** Error radius in degrees */
+                TReal       iAbsoluteErrorDegrees;
+
+                TBool       iIsValid;
+            };
+
+        /** Returns current location */
+        IMPORT_C TCurrentLocation CurrentLocation() const;
+
+		// Zooming
+        IMPORT_C void Zoom( TReal aZoomRate );
+
+		// View movement
+        IMPORT_C void MoveTo( TCoordinate aTarget );
+
+        // Reset-kind of action, moves to world center
+        IMPORT_C void GoCenter();
+
+		/** Converts absolute units to screen */
+        IMPORT_C TPoint AbsoluteToScreen( TCoordinate aAbsolutePoint ) const;
+        IMPORT_C TInt AbsoluteToScreen( TReal aDistance ) const;
+
+		/** Converts screen coords to absolute */
+        IMPORT_C TCoordinate ScreenToAbsolute( TPoint aScreenPoint ) const;
+        IMPORT_C TReal ScreenToAbsolute( TInt aDistance ) const;
+
+		// Viewport in absolute units - degrees
+        IMPORT_C TReal Left() const;
+        IMPORT_C TReal Top() const;
+        IMPORT_C TReal Right() const;
+        IMPORT_C TReal Bottom() const;
+        IMPORT_C TReal Width() const;
+        IMPORT_C TReal Height() const;
+        IMPORT_C TCoordinate Center() const;
+
+    protected:
+		/** Converts absolute coords to screen */
+        TPoint AbsoluteToScreen( TRealPoint aAbsolutePoint ) const;
+
+    protected:  // from MMnrpPositionObserver
+
+		/** Forces map view update when new position comes */
+        void HandlePositionRequestCompletedL( TInt aError );
+
+    private:
+
+        void ConstructL();
+        CMnrpMapModel( MMapModelObserver& aObserver, CMnrpEngine& aEngine );
+        CMnrpMapModel( CMnrpEngine& aEngine );
+
+        void AddCitiesL();
+
+		/** Includes given draw item into bounding box */
+        void AdjustBoundingBox( CDrawItem& aItem, TRealPoint& aMin, TRealPoint& aMax );
+        
+        /** Verifies if draw item has position. If not, tries geocoding.
+         *  Updates the item if position is found from geocoding.
+         *  @return ETrue if position is found (possibly from geocoding), EFalse otherwise */
+        TBool CheckDrawItemHasPositionL( CDrawItem& aItem, const CPosLandmark& aLandmark );
+
+		/** Adjusts viewport if movement or zooming goes beyond the borders */
+        void CheckBorders();
+
+        TReal MaxScale() const;
+        TRect CursorMargin();
+
+		// Grid drawing
+        void DrawGrid(
+            CFbsBitGc& aGc,
+            const TSize& aBoxSize,
+            CMnrpMapModel::TGrid& aGrid ) const;
+
+        void DrawVerticalLine( CFbsBitGc& aGc, TInt aX, TSize aBoxSize ) const;
+        void DrawHorizontalLine( CFbsBitGc& aGc, TInt aY, TSize aBoxSize ) const;
+
+		/** Draws drawable items */
+        void DrawLandmarks(
+            CFbsBitGc& aGc,
+            CFont& aFont,
+            const TSize& aBoxSize,
+            TBool aSwitchColorAndShadow ) const;
+
+		/** Draws current location */
+        void DrawCurrentLocation(
+            CFbsBitGc& aGc,
+            const TSize& aBoxSize ) const;
+
+    private:
+        CMnrpPositionRequest*           iPositionRequest;
+        TPositionInfo                   iPosInfo;
+
+        TSize                           iScreenSize;
+        TRealPoint                      iViewOrigin;
+
+        TReal                           iScale; // 1 == 1 degree per pixel
+
+        MMapModelObserver*              iObserver;
+
+        mutable RPointerArray<CDrawItem> iDrawItems;
+
+        CMnrpEngine&            		iEngine;
+
+        TBool                           iUseCurrentLocationAsOrigin;
+        TBool                           iShowCurrentLocation;
+
+        CFont*                          iTextFont;
+        CFont*                          iItemFont;
+        
+        TInt 							iNumIgnoredLandmarks; 
+    };
+
+#endif // MNRP_MAPMODEL_H
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mapnavproviderrefapp/inc/mnrpmapview.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,95 @@
+/*
+* 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:  CMnrpMapView class definition
+*
+*/
+
+
+#ifndef MNRP_MAPVIEW_H
+#define MNRP_MAPVIEW_H
+
+#include <aknview.h>
+
+class CMnrpEngine;
+class CMnrpMapModel;
+class CMnrpMapControl;
+
+class CMnrpMapViewService;
+class MMapSelectionCallback;
+
+/** Map view. Draws map on screen using information from 
+ 	CMnrpMapModel.
+ */
+class CMnrpMapView : public CAknView
+    {
+    public: 
+
+        static CMnrpMapView* NewL( TBool aChained, CMnrpEngine& aEngine );
+        virtual ~CMnrpMapView();
+        
+        /** Shows map view in browser mode 
+         *  @param aService Object to get map view options from
+         */
+        void SetMapModeL( CMnrpMapViewService& aService );
+
+        /** Shows map view in selection mode 
+         *  @param aService Object to get map view options from
+         *  @param aCallback Object to inform about selection
+         */
+        void SetSelectionModeL( 
+            CMnrpMapViewService& aService,  
+            MMapSelectionCallback& aCallback );
+
+        void HandleUserSelectionL( TInt aError );
+
+        void StopSelection();
+		
+    public: // from CAknView
+
+        TUid Id() const;
+
+        void HandleCommandL( TInt aCommand );
+
+        void DoActivateL(
+            const TVwsViewId& aPrevViewId,
+            TUid aCustomMessageId,
+            const TDesC8& aCustomMessage);
+
+        void DoDeactivate();
+        
+        void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane *aMenuPane );
+
+    private:
+
+        CMnrpMapView( CMnrpEngine& aEngine );
+        void ConstructL( TBool aChained );
+        
+    private:
+        /** Application engine */
+        CMnrpEngine& iEngine;
+    	
+    	/** UI control */
+        CMnrpMapControl* iControl;    
+
+        /** Map view data */
+        CMnrpMapViewService* iMapViewService;
+
+        /** Selection callback listener */        
+        MMapSelectionCallback* iSelectionCallback;
+        
+        TBool iChained;
+    };
+
+#endif // MNRP_MAPVIEW_H
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mapnavproviderrefapp/inc/mnrpmapviewservice.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,80 @@
+/*
+* 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:  CMnrpMapViewService class definition
+*
+*/
+
+
+#ifndef MNRP_MAPVIEWSERVICE_H
+#define MNRP_MAPVIEWSERVICE_H
+
+#include <mnmapviewservicebase.h>
+
+#include "mnrpappui.h"
+
+class CPosLandmark;
+
+/** Implementation of MapView service (KMnAppMapViewService). 
+ */
+class CMnrpMapViewService : public CMnMapViewServiceBase, public MMapSelectionCallback
+    {
+    public :
+        static CMnrpMapViewService* NewL();
+        
+    protected :
+        CMnrpMapViewService();
+        virtual ~CMnrpMapViewService();
+        void ConstructL();
+
+        CMnrpAppUi* AppUi();
+
+    protected: // from CMnMapViewServiceBase
+    
+        /** Handles client's request for showing map */
+        void HandleShowMapL();
+
+        /** Handles client's request for showing map from current location */
+        void HandleShowCurrentLocationL();
+
+        /** Handles client's request for selecting a location from map */
+        void HandleSelectFromMapL();
+
+    protected: // from CMnServiceBase
+
+        /** Reports that client cancelled request */
+        void DoCancel();
+
+        void CompleteSelectionL( const TCoordinate& aSelection );
+
+    protected: // from MMapSelectionCallback
+            
+        void HandleSelectionL( const TCoordinate& aSelection );
+
+        void HandleSelectionL( TInt aLandmarkIndex );
+        void HandleSelectionL( TPosLmItemId aLandmarkId, TInt aDbIndex );
+
+        void HandleSelectionErrorL( TInt aError );
+
+    private:
+        void StopSelection();
+
+    private:
+
+        /** Flag shows that selection is ongoing */
+        TBool                   iSelecting;
+    };
+
+#endif // MNRP_MAPVIEWSERVICE_H
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mapnavproviderrefapp/inc/mnrpnavicontrol.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,69 @@
+/*
+* 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:  CMnrpNaviControl class definition
+*
+*/
+
+
+#ifndef MNRP_NAVICONTROL_H
+#define MNRP_NAVICONTROL_H
+
+#include <coecntrl.h>
+#include "mnrpnavimodel.h"
+
+class CAknSingleHeadingStyleListBox;
+class CMnrpNaviView;
+
+/** Navigation view.
+ *	Shows list box with navigation information items: 
+ *	destination name and coordinates, current position coordinates
+ *	distance and bearing to destination.
+ */	
+class CMnrpNaviControl : public CCoeControl, public MNaviModelObserver
+    {
+    public:
+
+        static CMnrpNaviControl* NewL( CMnrpNaviView& aView, const TRect& aRect, CMnrpEngine& aEngine );
+        virtual ~CMnrpNaviControl();
+
+        void UpdateModelL( CPosLandmark& aDestination );
+        
+    protected:    
+    	/** Creates list box */
+        void CreateListBoxL();
+
+    public: // from MNaviModelObserver
+        void HandleModelUpdateL();
+
+    protected:  // from CCoeControl
+        TInt CountComponentControls() const;
+        CCoeControl* ComponentControl( TInt aIndex ) const;
+        TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType );
+        void SizeChanged();
+        void HandleResourceChange( TInt aType );
+
+    private:
+
+        void ConstructL( const TRect& aRect, CMnrpEngine& aEngine );
+        CMnrpNaviControl( CMnrpNaviView& aView );
+    
+    private:
+        CMnrpNaviView&                  iView;
+    
+        CAknSingleHeadingStyleListBox*  iListBox;
+        CMnrpNaviModel*         		iModel;
+    };
+
+#endif // MNRP_NAVICONTROL_H
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mapnavproviderrefapp/inc/mnrpnavigationservice.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,51 @@
+/*
+* 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:  CMnrpNavigationService class definition
+*
+*/
+
+
+#ifndef MNRP_NAVIGATIONSERVICE_H
+#define MNRP_NAVIGATIONSERVICE_H
+
+#include "mnnavigationservicebase.h"
+
+class CPosLandmark;
+
+/** Implementation of Navigation service (KMnAppNavigationService). 
+ */
+class CMnrpNavigationService : public CMnNavigationServiceBase
+    {
+    public :
+        static CMnrpNavigationService* NewL();
+        
+    protected :
+        CMnrpNavigationService();
+        virtual ~CMnrpNavigationService();
+        void ConstructL();
+
+    public: // from CMnNavigationServiceBase
+    
+        /** Handles client's request for navigation. */
+        void HandleNavigateToL( const CPosLandmark& aDestination );
+    
+    protected: // from CMnServiceBase
+
+        /** Empty implementation, as the only request is sychcronous */
+        void DoCancel();
+    };
+
+#endif // MNRP_NAVIGATIONSERVICE_H
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mapnavproviderrefapp/inc/mnrpnavimodel.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,96 @@
+/*
+* 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:  CMnrpNaviModel class definition
+*
+*/
+
+
+#ifndef MNRP_NAVIMODEL_H
+#define MNRP_NAVIMODEL_H
+
+#include <coecntrl.h>
+#include "mnrppositionrequest.h"
+
+class CMnrpEngine;
+class CPosLandmark;
+
+/** Model observer class */
+class MNaviModelObserver
+    {
+    public:
+        virtual void HandleModelUpdateL() =0;
+    };
+
+/** Navigation view model. 
+ *	Prepares data to be shown on navigation view
+ */
+class CMnrpNaviModel : public CBase, public MMnrpPositionObserver
+    {
+    public:
+        static CMnrpNaviModel* NewL( MNaviModelObserver& aObserver, CMnrpEngine& aEngine );
+
+		/** Called by service class to inform that client has changed 
+		 *	navigation target */
+        void SetDestinationL( const CPosLandmark& aNewDestination );
+
+		/** List item information */
+        class CListItem : public CBase
+            {
+            public:
+                static CListItem* NewL( 
+                	const TDesC& aItemHeader, 
+                	const TDesC& aItemValue );
+            
+                ~CListItem();
+                
+                const TDesC& Header() { return *iHeader; };
+                const TDesC& Value() { return *iValue; };
+                
+            private:
+            	/** List item header */
+                HBufC* iHeader;
+            	/** List item text */
+                HBufC* iValue;                
+            };
+
+		/** Returns list items to be shown on Navigation view */
+        TArray<CListItem*> ListItemsL();
+
+        ~CMnrpNaviModel();
+        
+    public:  // from MMnrpPositionObserver
+
+		/** Informs navigation view that data has been changed */
+        void HandlePositionRequestCompletedL( TInt aError );
+        
+    private: 
+
+        void ConstructL();
+        CMnrpNaviModel( MNaviModelObserver& aObserver, CMnrpEngine& aEngine );
+    
+    private:
+        CMnrpEngine&                    iEngine;
+    
+        CMnrpPositionRequest*   		iPositionRequest;
+        TPositionInfo                   iPosInfo;
+
+        CPosLandmark*                   iDestination;
+        
+        MNaviModelObserver&             iObserver;
+        
+        RPointerArray<CListItem>        iListItems;
+    };
+
+#endif // MNRP_NAVIMODEL_H
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mapnavproviderrefapp/inc/mnrpnaviview.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,74 @@
+/*
+* 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:  CMnrpNaviView class definition
+*
+*/
+
+
+#ifndef MNRP_NAVIVIEW_H
+#define MNRP_NAVIVIEW_H
+
+#include <aknview.h>
+
+class CMnrpEngine;
+class CMnrpNaviModel;
+class CMnrpNaviControl;
+class CPosLandmark;
+
+/** Map view. Draws map on screen using information from 
+ 	CMnrpMapModel.
+ */
+class CMnrpNaviView : public CAknView
+    {
+    public: 
+
+        static CMnrpNaviView* NewL( TBool aChained, CMnrpEngine& aEngine );
+        virtual ~CMnrpNaviView();
+        
+        /** Shows map view in browser mode 
+         *  @param aService Object to get map view options from
+         */
+        void SetDestinationL( const CPosLandmark& aDestination );
+        
+    public: // from CAknView
+
+        TUid Id() const;
+
+        void HandleCommandL( TInt aCommand );
+
+        void DoActivateL(
+            const TVwsViewId& aPrevViewId,
+            TUid aCustomMessageId,
+            const TDesC8& aCustomMessage);
+
+        void DoDeactivate();
+
+    private:
+
+        CMnrpNaviView( CMnrpEngine& aEngine );
+        void ConstructL( TBool aChained );
+        
+    private:
+        /** Application engine */
+        CMnrpEngine& iEngine;
+    	
+    	/** UI control */
+        CMnrpNaviControl* iControl;    
+        
+        /** Destination */
+        CPosLandmark* iDestination;
+    };
+
+#endif // MNRP_NAVIVIEW_H
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mapnavproviderrefapp/inc/mnrppositionrequest.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,141 @@
+/*
+* 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:  CMnrpPositionRequest class definition
+*
+*/
+
+
+#ifndef MNRP_POSITION_REQUEST_H_
+#define MNRP_POSITION_REQUEST_H_
+
+#include <e32base.h>
+#include <lbs.h>
+
+class TPositionUpdateOptions;
+
+/** Position observer */
+class MMnrpPositionObserver
+    {
+    public:
+        virtual void HandlePositionRequestCompletedL( TInt aError ) =0;
+    };
+
+/** Provides an interface for retrieving the current location.
+ */
+class CMnrpPositionRequest: public CActive
+    {
+    public: 
+
+        /** Creates new instance of request
+        * @param aAppName the name of this application
+        * @param aObserver observer to callback when locations are retrieved
+        */
+        IMPORT_C static CMnrpPositionRequest* NewL(
+            const TDesC& aRequestorName,
+            MMnrpPositionObserver& aObserver);
+
+        IMPORT_C ~CMnrpPositionRequest();
+
+    public: 
+
+        /**
+         * Starts the fetching of a location. In the first place the default 
+         * proxy is used for retrieving a location. If fetching default location
+         * fails the last known location is fetched. If fetching last known 
+         * location fails, an error code is returned to the observer.
+         *
+         * @param aLastKnownLocationAllowed whether last know location is allowed
+         */
+        IMPORT_C void FetchNewPosition( TBool aLastKnownLocationAllowed = EFalse );
+
+ 		/** Returns current location */
+        IMPORT_C void GetPosition( TPositionInfo& aPosition );
+
+ 		/** Returns current speed info */
+        IMPORT_C TReal32 Speed();
+
+ 		/** Returns current heading info */
+        IMPORT_C TReal32 Heading();
+
+ 		/** Returns current magnetic heading info */
+        IMPORT_C TReal32 MagneticHeading();
+
+ 		/** Returns current course info */
+        IMPORT_C TReal32 Course();
+
+ 		/** Returns current magnetic course info */
+        IMPORT_C TReal32 MagneticCourse();
+
+		/** Modifies options for the next request */
+        IMPORT_C void SetOptionsL( const TPositionUpdateOptionsBase& aOptions );
+
+    protected: // from CActive
+
+        void DoCancel();
+        void RunL();
+        TInt RunError(TInt aError);
+
+    private:
+
+        CMnrpPositionRequest( MMnrpPositionObserver& aObserver );
+        void ConstructL( const TDesC& aAppName );
+
+        /** Issues new request for location retrieval. */
+        void ExecuteNextStep();
+
+        void InitContainer( HPositionGenericInfo& aGenericInfo );
+        void SaveContainer( const HPositionGenericInfo& aGenericInfo );
+
+    private:
+
+        /**
+        * TState defines the different states this object may enter.
+        */
+        enum TState 
+            {
+            EIdle,
+            EAcquiringDefaultLocation,
+            EAcquiringLastKnownLocation
+            };
+
+    private: 
+
+        //! Contains the location
+        HPositionGenericInfo* iGenericPosition;
+        
+        //! Local storage for last location info
+        TPositionInfo iPositionInfo;
+        TReal32 iSpeed;
+        TReal32 iHeading;
+        TReal32 iMagneticHeading;
+        TReal32 iCourse;
+        TReal32 iMagneticCourse;
+
+        //! The observer to callback when location retieval is ready
+        MMnrpPositionObserver& iObserver;
+
+        //! Reference to the Location Server session
+        RPositionServer iLocationServer;
+
+        //! Reference to the Location Server subsession
+        RPositioner iPositioner;
+        
+        TBool iLastKnownLocationAllowed;
+
+        //! The current state this object has entered
+        TState iState;
+    };
+
+#endif // MNRP_POSITION_REQUEST_H_
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mapnavproviderrefapp/inc/mnrputils.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,67 @@
+/*
+* 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:  MnrpUtils class definition
+*
+*/
+
+
+#ifndef MNRP_UTILS_H
+#define MNRP_UTILS_H
+
+const TInt KMaxCoordStrSize = 15;
+
+class MnrpUtils
+    {
+    public:
+    
+        /** Converts given coordinate into a string 
+         *  \param aCoord coordinate
+         *  \param aStr target string of KMaxCoordStrSize length (at least)
+         *  \param aFull if EFalse, will omit higher parts if they are 0,
+         *               if ETrue, outputs degrees, minutes, seconds and milliseconds
+         *  \param aMillis whether milliseconds should be included or not
+         */
+        IMPORT_C static void CoordinateToString( 
+            TReal aCoord, 
+            TDes& aStr, 
+            TBool aFull = EFalse,
+            TBool aMillis = EFalse );
+            
+        /** Converts given distance value to a string with units
+         *  \param aDistance distance in meters 
+         *  \param aStr target string
+         */
+        IMPORT_C static void DistanceToString( TReal aDistance, TDes& aStr );
+
+        /** Converts given angle value to a string
+         *  \param aAngle angle in degrees (angle form North Pole) 
+         *  \param aStr target string
+         */
+        IMPORT_C static void AngleToString( TReal aAngle, TDes& aStr );
+
+        /** Converts given speed value to a string with units
+         *  \param aSpeed speed in meters per second
+         *  \param aStr target string
+         */
+        IMPORT_C static void SpeedToString( TReal aSpeed, TDes& aStr );
+
+        /** Replaces unprintable characters in a string with spaces
+         *  \param aStr string to work with
+         *  \return pointer to new string buffer with ownership
+         */
+        IMPORT_C static HBufC* PrintableStringLC( const TDesC& aStr );
+    };
+
+#endif // MNRP_UTILS_H
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mapnavproviderrefapp/sis/mnrefprovider_armv5.pkg	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,85 @@
+;
+; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of "Eclipse Public License v1.0"
+; which accompanies 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 MN ref provider
+;
+
+ÿþ;   I n s t a l l a t i o n   f i l e   f o r   M & N   R e f e r e n c e   P r o v i d e r   A p p 
+ 
+ 
+ 
+ ;   L a n g u a g e s 
+ 
+ & E N , R U 
+ 
+ 
+ 
+ ;   s t a n d a r d   S I S   f i l e   h e a d e r 
+ 
+ # { " M n R e f P r o v i d e r E N " , " M n R e f P r o v i d e r R U " } , ( 0 x 0 3 1 3 2 0 1 3 ) , 1 , 2 , 4 
+ 
+ 
+ 
+ ;   L o c a l i s e d   V e n d o r   n a m e 
+ 
+ % { " V e n d o r - E N " , " V e n d o r - R U " } 
+ 
+ 
+ 
+ ;   U n i q u e   V e n d o r   n a m e 
+ 
+ : " V e n d o r " 
+ 
+ 
+ 
+ ;   S u p p o r t s   S 6 0   v   3 . 0 
+ 
+ [ 0 x 1 0 1 F 7 9 6 1 ] ,   0 ,   0 ,   0 ,   { " S 6 0 P r o d u c t I D " , " S 6 0 P r o d u c t I D " } 
+ 
+ 
+ 
+ ;   F i l e s   t o   i n s t a l l 
+ 
+ " \ e p o c 3 2 \ r e l e a s e \ a r m v 5 \ u r e l \ m n r e f p r o v i d e r . e x e " - " ! : \ s y s \ b i n \ m n r e f p r o v i d e r . e x e " 
+ 
+ " \ e p o c 3 2 \ d a t a \ z \ r e s o u r c e \ a p p s \ m n r e f p r o v i d e r . r s c " - " ! : \ r e s o u r c e \ a p p s \ m n r e f p r o v i d e r . r s c " 
+ 
+ " \ e p o c 3 2 \ d a t a \ z \ r e s o u r c e \ a p p s \ m n r e f p r o v i d e r . m b m " - " ! : \ r e s o u r c e \ a p p s \ m n r e f p r o v i d e r . m b m " 
+ 
+ " \ e p o c 3 2 \ d a t a \ z \ r e s o u r c e \ a p p s \ m n r e f p r o v i d e r . m i f " - " ! : \ r e s o u r c e \ a p p s \ m n r e f p r o v i d e r . m i f " 
+ 
+ " \ e p o c 3 2 \ d a t a \ z \ p r i v a t e \ 1 0 0 0 3 a 3 f \ a p p s \ m n r e f p r o v i d e r _ r e g . r s c " - " ! : \ p r i v a t e \ 1 0 0 0 3 a 3 f \ i m p o r t \ a p p s \ m n r e f p r o v i d e r _ r e g . r s c " 
+ 
+ 
+ 
+ " \ e p o c 3 2 \ r e l e a s e \ a r m v 5 \ u r e l \ m n r e f p r o v i d e r b a c k . e x e " - " ! : \ s y s \ b i n \ m n r e f p r o v i d e r b a c k . e x e " 
+ 
+ " \ e p o c 3 2 \ d a t a \ z \ r e s o u r c e \ a p p s \ m n r e f p r o v i d e r b a c k . r s c " - " ! : \ r e s o u r c e \ a p p s \ m n r e f p r o v i d e r b a c k . r s c " 
+ 
+ " \ e p o c 3 2 \ d a t a \ z \ p r i v a t e \ 1 0 0 0 3 a 3 f \ a p p s \ m n r e f p r o v i d e r b a c k _ r e g . r s c " - " ! : \ p r i v a t e \ 1 0 0 0 3 a 3 f \ i m p o r t \ a p p s \ m n r e f p r o v i d e r b a c k _ r e g . r s c " 
+ 
+ 
+ 
+ " \ e p o c 3 2 \ r e l e a s e \ a r m v 5 \ u r e l \ m n r e f p r o v i d e r e n g i n e . d l l " - " ! : \ s y s \ b i n \ m n r e f p r o v i d e r e n g i n e . d l l " 
+ 
+ " \ e p o c 3 2 \ d a t a \ z \ r e s o u r c e \ m n r e f p r o v i d e r e n g i n e . r s c " - " ! : \ r e s o u r c e \ m n r e f p r o v i d e r e n g i n e . r s c " 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mapnavproviderrefapp/sis/mnrefprovider_bitmap_armv5.pkg	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,89 @@
+;
+; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of "Eclipse Public License v1.0"
+; which accompanies 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 MN ref provider ( includes map image service)
+;
+
+ÿþ;   I n s t a l l a t i o n   f i l e   f o r   M & N   R e f e r e n c e   P r o v i d e r   A p p 
+ 
+ 
+ 
+ ;   L a n g u a g e s 
+ 
+ & E N , R U 
+ 
+ 
+ 
+ ;   s t a n d a r d   S I S   f i l e   h e a d e r 
+ 
+ # { " M n R e f P r o v i d e r E N " , " M n R e f P r o v i d e r R U " } , ( 0 x 0 3 1 3 2 0 1 3 ) , 1 , 2 , 4 
+ 
+ 
+ 
+ ;   L o c a l i s e d   V e n d o r   n a m e 
+ 
+ % { " V e n d o r - E N " , " V e n d o r - R U " } 
+ 
+ 
+ 
+ ;   U n i q u e   V e n d o r   n a m e 
+ 
+ : " V e n d o r " 
+ 
+ 
+ 
+ ;   S u p p o r t s   S 6 0   v   3 . 0 
+ 
+ [ 0 x 1 0 1 F 7 9 6 1 ] ,   0 ,   0 ,   0 ,   { " S 6 0 P r o d u c t I D " , " S 6 0 P r o d u c t I D " } 
+ 
+ 
+ 
+ ;   F i l e s   t o   i n s t a l l 
+ 
+ " \ e p o c 3 2 \ r e l e a s e \ a r m v 5 \ u r e l \ m n r e f p r o v i d e r . e x e " - " ! : \ s y s \ b i n \ m n r e f p r o v i d e r . e x e " 
+ 
+ " \ e p o c 3 2 \ d a t a \ z \ r e s o u r c e \ a p p s \ m n r e f p r o v i d e r . r s c " - " ! : \ r e s o u r c e \ a p p s \ m n r e f p r o v i d e r . r s c " 
+ 
+ " \ e p o c 3 2 \ d a t a \ z \ r e s o u r c e \ a p p s \ m n r e f p r o v i d e r . m b m " - " ! : \ r e s o u r c e \ a p p s \ m n r e f p r o v i d e r . m b m " 
+ 
+ " \ e p o c 3 2 \ d a t a \ z \ r e s o u r c e \ a p p s \ m n r e f p r o v i d e r . m i f " - " ! : \ r e s o u r c e \ a p p s \ m n r e f p r o v i d e r . m i f " 
+ 
+ " \ e p o c 3 2 \ d a t a \ z \ p r i v a t e \ 1 0 0 0 3 a 3 f \ a p p s \ m n r e f p r o v i d e r _ r e g . r s c " - " ! : \ p r i v a t e \ 1 0 0 0 3 a 3 f \ i m p o r t \ a p p s \ m n r e f p r o v i d e r _ r e g . r s c " 
+ 
+ 
+ 
+ " \ e p o c 3 2 \ r e l e a s e \ a r m v 5 \ u r e l \ m n r e f p r o v i d e r b a c k . e x e " - " ! : \ s y s \ b i n \ m n r e f p r o v i d e r b a c k . e x e " 
+ 
+ " \ e p o c 3 2 \ d a t a \ z \ r e s o u r c e \ a p p s \ m n r e f p r o v i d e r b a c k . r s c " - " ! : \ r e s o u r c e \ a p p s \ m n r e f p r o v i d e r b a c k . r s c " 
+ 
+ " \ e p o c 3 2 \ d a t a \ z \ p r i v a t e \ 1 0 0 0 3 a 3 f \ a p p s \ m n r e f p r o v i d e r b a c k _ r e g . r s c " - " ! : \ p r i v a t e \ 1 0 0 0 3 a 3 f \ i m p o r t \ a p p s \ m n r e f p r o v i d e r b a c k _ r e g . r s c " 
+ 
+ 
+ 
+ " \ e p o c 3 2 \ r e l e a s e \ a r m v 5 \ u r e l \ m n r e f p r o v i d e r e n g i n e . d l l " - " ! : \ s y s \ b i n \ m n r e f p r o v i d e r e n g i n e . d l l " 
+ 
+ " \ e p o c 3 2 \ d a t a \ z \ r e s o u r c e \ m n r e f p r o v i d e r e n g i n e . r s c " - " ! : \ r e s o u r c e \ m n r e f p r o v i d e r e n g i n e . r s c " 
+ 
+ 
+ 
+ " \ e p o c 3 2 \ r e l e a s e \ a r m v 5 \ u r e l \ m n r e f p r o v i d e r p l u g i n . d l l " - " ! : \ s y s \ b i n \ m n r e f p r o v i d e r p l u g i n . d l l " 
+ 
+ " \ e p o c 3 2 \ d a t a \ z \ r e s o u r c e \ p l u g i n s \ m n r e f p r o v i d e r p l u g i n . r s c " - " ! : \ r e s o u r c e \ p l u g i n s \ m n r e f p r o v i d e r p l u g i n . r s c " 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mapnavproviderrefapp/src/mnrefprovider.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,31 @@
+/*
+* 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:  CApaApplication class implementation
+*
+*/
+
+
+#include <eikstart.h>
+#include "mnrpapplication.h"
+
+LOCAL_C CApaApplication* NewApplication()
+{
+    return new CMnrpApplication;
+}
+
+TInt E32Main()
+{
+    return EikStart::RunApplication( NewApplication );
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mapnavproviderrefapp/src/mnrefproviderback.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,31 @@
+/*
+* 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:  Main application methods
+*
+*/
+
+
+#include <eikstart.h>
+#include "mnrpapplicationback.h"
+
+LOCAL_C CApaApplication* NewApplication()
+{
+    return new CMnrpApplicationBack;
+}
+
+TInt E32Main()
+{
+    return EikStart::RunApplication( NewApplication );
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mapnavproviderrefapp/src/mnrefproviderplugin.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,47 @@
+/*
+* 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:  Main application methods
+*
+*/
+
+
+#include <e32base.h>
+#include <ecom/ecom.h>
+#include <ecom/implementationproxy.h>
+
+#include "debug.h"
+#include "mnrpcoordconverter.h"
+
+// ========================== GLOBAL FUNCTIONS ===============================
+
+// ---------------------------------------------------------------------------
+// Table of implementations
+// ---------------------------------------------------------------------------
+//
+const TImplementationProxy ImplementationTable[] =
+    {
+    // Note! UID below is implementation UID, not DLL UID.
+    IMPLEMENTATION_PROXY_ENTRY( 0x03133038, CMnrpCoordConverter::NewL ),
+    };
+
+// ---------------------------------------------------------------------------
+// Note this function must be exported at ordinal 1
+// ---------------------------------------------------------------------------
+//
+EXPORT_C const TImplementationProxy* ImplementationGroupProxy(
+    TInt& aTableCount)
+    {
+    aTableCount = 1;
+    return ImplementationTable;
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mapnavproviderrefapp/src/mnrpappcontrol.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,109 @@
+/*
+* 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:  CMnrpAppControlclass implementation
+*
+*/
+
+
+#include <coemain.h>
+#include <AknDef.h>
+#include "mnrpappview.h"
+#include "mnrpappcontrol.h"
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+CMnrpAppControl::CMnrpAppControl( CMnrpAppView& aView )
+: iView( aView )
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+CMnrpAppControl::~CMnrpAppControl()
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+CMnrpAppControl* CMnrpAppControl::NewL( CMnrpAppView& aView, const TRect& aRect)
+    {
+    CMnrpAppControl* self = new (ELeave) CMnrpAppControl( aView );
+    CleanupStack::PushL( self );
+    self->ConstructL( aRect );
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+TInt CMnrpAppControl::CountComponentControls() const 
+    { 
+    return 0; 
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+CCoeControl* CMnrpAppControl::ComponentControl( TInt /*aIndex*/ ) const
+    {
+    return NULL;
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CMnrpAppControl::ConstructL( const TRect& aRect )
+    {
+    // Create a window for this application view
+    CreateWindowL();
+
+    // Set the windows size
+    SetRect( aRect );
+
+    // Activate the window, which makes it ready to be drawn
+    ActivateL();
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CMnrpAppControl::Draw( const TRect& /*aRect*/ ) const
+    {
+    // Get the standard graphics context
+    CWindowGc& gc = SystemGc();
+
+    // Gets the control's extent
+    TRect rect = Rect();
+
+    // Clears the screen
+    gc.Clear( rect );
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CMnrpAppControl::HandleResourceChange( TInt aType )
+    {
+    CCoeControl::HandleResourceChange( aType );
+    if ( aType == KEikDynamicLayoutVariantSwitch )
+        {
+        SetRect( iView.ClientRect() );
+        }
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mapnavproviderrefapp/src/mnrpapplication.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,56 @@
+/*
+* 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:  CMnrpApplication class implementation
+*
+*/
+
+
+#include "debug.h"
+
+#include "mnrpdocument.h"
+#include "mnrpappserver.h"
+#include "mnrpapplication.h"
+
+// UID for the application, this should match the uid defined in the mmp file.
+static const TUid KUidMnRefProviderApp = {0x03132013};
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+CApaDocument* CMnrpApplication::CreateDocumentL()
+    {  
+    LOG( "MnRefProvider: CreateDocumentL" );
+    CApaDocument* document = CMnrpDocument::NewL( *this );
+    return document;
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+TUid CMnrpApplication::AppDllUid() const
+    {
+    // Return the UID for the MnRefProvider application
+    return KUidMnRefProviderApp;
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CMnrpApplication::NewAppServerL( CApaAppServer*& aAppServer )
+    {
+    LOG( "MnRefProvider: NewAppServerL" );
+    aAppServer = new (ELeave) CMnrpAppServer;
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mapnavproviderrefapp/src/mnrpapplicationback.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,56 @@
+/*
+* 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:  CMnrpApplicationGeoGeo class implementation
+*
+*/
+
+
+#include "debug.h"
+
+#include "mnrpdocumentback.h"
+#include "mnrpappserverback.h"
+#include "mnrpapplicationback.h"
+
+// UID for the application, this should match the uid defined in the mmp file.
+static const TUid KUidMnRefProviderBackApp = {0x03132014};
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+CApaDocument* CMnrpApplicationBack::CreateDocumentL()
+    {  
+    LOG( "MnRefProviderBack: CreateDocumentL" );
+    CApaDocument* document = CMnrpDocumentBack::NewL( *this );
+    return document;
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+TUid CMnrpApplicationBack::AppDllUid() const
+    {
+    // Return the UID for the MnRefProvider application
+    return KUidMnRefProviderBackApp;
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CMnrpApplicationBack::NewAppServerL( CApaAppServer*& aAppServer )
+    {
+    LOG( "MnRefProviderBack: NewAppServerL" );
+    aAppServer = CMnrpAppServerBack::NewL();
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mapnavproviderrefapp/src/mnrpappserver.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,125 @@
+/*
+* 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:  CMnrpAppServer class implementation
+*
+*/
+
+
+#include <mnappserviceuids.hrh>
+#include "debug.h"
+
+#include <lbsposition.h>
+#include <EPos_CPosLandmark.h>
+
+#include "mnrpnavigationservice.h"
+#include "mnrpmapviewservice.h"
+
+#include <mnrefprovider.rsg>
+#include "mnrpappui.h"
+#include "mnrpengine.h"
+#include "mnrpappserver.h"
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+CMnrpAppServer::~CMnrpAppServer()
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CApaAppServiceBase* CMnrpAppServer::CreateServiceL(TUid aServiceType) const
+    {  
+    LOG1("MnRefProvider::CreateServiceL, svcUid = %X", aServiceType.iUid);
+    switch ( aServiceType.iUid )
+        {
+        case KMnAppMapViewService:
+            return CreateMapViewServiceL();
+
+        case KMnAppNavigationService:
+            return CreateNavigationServiceL();
+            
+        default:
+            return CAknAppServer::CreateServiceL( aServiceType );
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CMnrpAppServer::HandleAllClientsClosed()
+    {
+    LOG( "MnRefProvider: HandleAllClientsClosed" );
+    CMnrpAppUi* appUi = AppUi();
+    if ( appUi )
+    	{
+    	if ( appUi->IsChainedMode() ) 
+    		{
+    		// close
+    		CAknAppServer::HandleAllClientsClosed();
+    		}
+    	else // standalone mode
+    		{
+    		if ( !appUi->IsAnyUserViewActive() )
+    			{
+	    		// close
+	    		CAknAppServer::HandleAllClientsClosed();
+    			}
+    		else
+    			{	
+    			// "remain active until user closes me"
+    			}
+    		}	
+    	}
+	else
+        {
+        CAknAppServer::HandleAllClientsClosed();
+        }
+    }
+    
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+CMnrpNavigationService* CMnrpAppServer::CreateNavigationServiceL() const
+    {
+    LOG( "MnRefProvider: CreateNavigationServiceL" );
+    CMnrpNavigationService* svc = CMnrpNavigationService::NewL();
+    return svc;
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+CMnrpMapViewService* CMnrpAppServer::CreateMapViewServiceL() const
+    {
+    LOG( "MnRefProvider: CreateMapViewServiceL" );
+    CMnrpMapViewService* svc = CMnrpMapViewService::NewL();
+    return svc;
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+CMnrpAppUi* CMnrpAppServer::AppUi()
+    {
+    CMnrpAppUi* ui = (CMnrpAppUi*) CEikonEnv::Static()->AppUi();
+    if ( !ui )
+        {
+        LOG("MnRefProvider: UI not found!");
+        }
+    return ui;
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mapnavproviderrefapp/src/mnrpappserverback.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,107 @@
+/*
+* 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:  CMnrpAppServerBack class implementation
+*
+*/
+
+
+#include <mnappserviceuids.hrh>
+#include "debug.h"
+
+#include <lbsposition.h>
+#include <EPos_CPosLandmark.h>
+
+#include "mnrpgeocodingservice.h"
+
+#ifdef RD_MAPNAV_BITMAP_ACCESS
+#include "mnrpmapimageservice.h"
+#endif
+
+#include "mnrpappuiback.h"
+#include "mnrpengine.h"
+#include "mnrpappserverback.h"
+
+// ============================ LOCAL FUNCTIONS ===============================
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+CMnrpAppServerBack::~CMnrpAppServerBack()
+    {
+    delete iEngine;
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+CMnrpAppServerBack* CMnrpAppServerBack::NewL()
+    {
+    CMnrpAppServerBack* self = new (ELeave) CMnrpAppServerBack();
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CMnrpAppServerBack::ConstructL()
+    {
+    iEngine = CMnrpEngine::NewL();
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CApaAppServiceBase* CMnrpAppServerBack::CreateServiceL(TUid aServiceType) const
+    {
+    LOG1("MnRefProviderBack::CreateServiceL, svcUid = %X", aServiceType.iUid);
+    switch ( aServiceType.iUid )
+        {
+        case KMnAppGeocodingService:
+            return CreateGeocodingServiceL();
+
+#ifdef RD_MAPNAV_BITMAP_ACCESS
+        case KMnAppMapImageService:
+            return CreateMapImageServiceL();
+#endif
+        default:
+            return CAknAppServer::CreateServiceL( aServiceType );
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+CMnrpGeocodingService* CMnrpAppServerBack::CreateGeocodingServiceL() const
+    {
+    LOG( "MnRefProviderBack: CreateGeocodingServiceL" );
+    CMnrpGeocodingService* svc = CMnrpGeocodingService::NewL( *iEngine );
+    return svc;
+    }
+
+#ifdef RD_MAPNAV_BITMAP_ACCESS
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+CMnrpMapImageService* CMnrpAppServerBack::CreateMapImageServiceL() const
+    {
+    LOG( "MnRefProviderBack: CreateGeocodingServiceL" );
+    CMnrpMapImageService* svc = CMnrpMapImageService::NewL( *iEngine );
+    return svc;
+    }
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mapnavproviderrefapp/src/mnrpappui.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,492 @@
+/*
+* 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:  CMnrpAppUi class implementation
+*
+*/
+
+
+#include <aknnavi.h>
+#include <aknnavide.h>
+#include <eikbtgpc.h>
+
+#include <AknIconUtils.h>
+#include <aknselectionlist.h>
+#include <gulicon.h>
+
+#include <mnrefprovider.rsg>
+#include <MnRefProvider.mbg>
+#include "mnrp.hrh"
+
+#include <EPos_CPosLandmark.h>
+#include <EPos_CPosLandmarkDatabase.h>
+
+#include "mnrpappview.h"
+#include "mnrpnaviview.h"
+#include "mnrpmapview.h"
+
+#include "mnrpmapviewservice.h"
+#include "mnrpnavigationservice.h"
+
+#include "mnrpdocument.h"
+#include "mnrpengine.h"
+#include "mnrpappui.h"
+#include "mnrputils.h"
+#include "debug.h"
+
+const TInt KDefaultLmIconIndex = 0;
+_LIT( KMbmFile, "\\resource\\apps\\MnRefProvider.mbm");
+
+// ============================ LOCAL FUNCTIONS ===============================
+
+// ---------------------------------------------------------------------------
+// ---------------------------------------------------------------------------
+//
+void CleanupIconArray( TAny* aArray )
+    {
+    LOG("MnRefProvider::CleanupIconArray in");
+    ( ( CArrayPtrSeg<CGulIcon>* ) aArray)->ResetAndDestroy();
+    delete aArray;
+    LOG("MnRefProvider::CleanupIconArray out");
+    }
+
+// ---------------------------------------------------------------------------
+// ---------------------------------------------------------------------------
+//
+void AddIconL(
+    CArrayPtr<CGulIcon>& aIconArray,
+    const TDesC& aFileName,
+    TInt aIconIndex,
+    TInt aMaskIndex )
+    {
+    LOG("MnRefProvider::AddIconL in");
+    CFbsBitmap* icon = NULL;
+    CFbsBitmap* mask = NULL;
+
+    AknIconUtils::CreateIconLC( icon, mask, aFileName, aIconIndex, aMaskIndex );
+    CGulIcon* gul = CGulIcon::NewL( icon, mask );
+
+    gul->SetBitmapsOwnedExternally( EFalse );
+    CleanupStack::PushL( gul );
+    aIconArray.AppendL( gul );
+    CleanupStack::Pop( 3 ); // gul, icon & mask
+    LOG("MnRefProvider::AddIconL out");
+    }
+
+// ---------------------------------------------------------------------------
+// ---------------------------------------------------------------------------
+//
+CArrayPtrSeg<CGulIcon>* CreateIconListLC( TInt aGranularity )
+    {
+    CArrayPtrSeg<CGulIcon>* iconList =
+        new (ELeave) CArrayPtrSeg<CGulIcon>( aGranularity );
+    CleanupStack::PushL( TCleanupItem( CleanupIconArray, iconList ) );
+
+    AddIconL(
+        *iconList,
+        KMbmFile,
+        EMbmMnrefproviderDefault_lm,
+        EMbmMnrefproviderDefault_lm_mask);
+
+    return iconList;
+    }
+
+// ---------------------------------------------------------------------------
+// ---------------------------------------------------------------------------
+//
+void AddLandmarkL(
+    const CPosLandmark& aLandmark,
+    CDesCArray& aTextArray,
+    CArrayPtr<CGulIcon>& aIconArray )
+    {
+    TPtrC name;
+    aLandmark.GetLandmarkName( name );
+
+    HBufC* printableName = MnrpUtils::PrintableStringLC( name );
+    
+    TPtrC iconFile;
+    TInt iconIndex, maskIndex, iconArrayIndex;
+
+    if ( aLandmark.GetIcon( iconFile, iconIndex, maskIndex ) == KErrNone )
+        {
+        AddIconL( aIconArray, iconFile, iconIndex, maskIndex );
+        iconArrayIndex = aIconArray.Count() - 1;
+        }
+    else
+        {
+        iconArrayIndex = KDefaultLmIconIndex;
+        }
+
+    _LIT(KListItemFormat, "%d\t%S\t\t");
+    const TInt KListItemMinSize = 20;
+
+    HBufC* item = HBufC::NewLC( printableName->Size() + KListItemMinSize );
+    item->Des().Format( KListItemFormat, iconArrayIndex, printableName );
+
+    aTextArray.AppendL( *item );
+
+    CleanupStack::PopAndDestroy( item );
+    CleanupStack::PopAndDestroy( printableName );
+    }
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+CMnrpAppUi::CMnrpAppUi( CMnrpEngine& aEngine )
+  : iEngine( aEngine )
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CMnrpAppUi::ConstructL()
+    {
+    BaseConstructL( EAknEnableSkin );
+    
+    // This is empty view, it will be shown by UI framework,
+    // when application starts
+    iAppView = CMnrpAppView::NewL();
+    AddViewL( iAppView );
+
+    if ( !iEikonEnv->StartedAsServerApp() )
+        {
+        // switch to map view if started normally
+        iMapView = CMnrpMapView::NewL( EFalse, iEngine );
+        AddViewL( iMapView );
+        ActivateLocalViewL( iMapView->Id() );
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+CMnrpAppUi::~CMnrpAppUi()
+    {
+    delete iNaviPaneLabel;
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CMnrpAppUi::HandleCommandL( TInt aCommand )
+    {
+    switch(aCommand)
+        {
+        case EAknSoftkeyBack:
+        	{
+    	    CEikAppServer* server = iEikonEnv->AppServer();
+		    if ( server )
+		    	{
+		        server->NotifyServerExit( EEikCmdExit );
+		    	}
+		    Exit();	
+        	break;
+        	}
+        	
+        case EEikCmdExit:
+        case EAknSoftkeyExit:
+            {
+    	    CEikAppServer* server = iEikonEnv->AppServer();
+		    if ( server )
+		    	{
+		        server->NotifyServerExit( EAknCmdExit ); // this will close client also
+		    	}
+		    Exit();	
+        	break;
+            }
+        default:
+            break;
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+TBool CMnrpAppUi::IsChainedMode()
+    {
+    return ( iParentWg != 0 );
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+TBool CMnrpAppUi::IsAnyUserViewActive()
+    {
+    TVwsViewId viewId;
+    if ( ( GetActiveViewId( viewId ) == KErrNotFound ) ||
+         ( viewId.iViewUid.iUid != EMnrpMapViewId && 
+           viewId.iViewUid.iUid != EMnrpNavigationViewId ) )
+        {
+        return EFalse;
+        }
+    else
+        {
+        return ETrue;
+        }
+    }
+
+// ----------------------------------------------------------------------------
+// ----------------------------------------------------------------------------
+//
+void CMnrpAppUi::SetNaviPaneTitleL( const TDesC& aPaneTitle )
+    {
+    if ( !iNaviPane )
+        {
+        iNaviPane = static_cast<CAknNavigationControlContainer*>(
+                StatusPane()->ControlL( TUid::Uid( EEikStatusPaneUidNavi ) ) );
+        }
+
+    if ( iNaviPaneLabel )
+        {
+        CAknNavigationDecorator* naviLabel = iNaviPane->CreateNavigationLabelL( aPaneTitle );
+        CleanupStack::PushL( naviLabel );
+
+        iNaviPane->ReplaceL( *iNaviPaneLabel, *naviLabel );
+
+        delete iNaviPaneLabel;
+        iNaviPaneLabel = naviLabel;
+
+        CleanupStack::Pop( naviLabel );
+        }
+    else
+        {
+        iNaviPaneLabel = iNaviPane->CreateNavigationLabelL( aPaneTitle );
+        iNaviPane->PushL( *iNaviPaneLabel );
+        }
+    }    
+
+// ----------------------------------------------------------------------------
+// ----------------------------------------------------------------------------
+//
+void CMnrpAppUi::SetRightSoftkeyCommandL( TInt aCommand, const TDesC& aButtonTitle )
+    {
+    if ( Cba() )
+        {
+        Cba()->SetCommandL( 1, aCommand, aButtonTitle );
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+TBool CMnrpAppUi::ProcessCommandParametersL( CApaCommandLine &aCommandLine )
+    {
+    iParentWg = aCommandLine.ParentWindowGroupID();
+    LOG1("parent window group id %d", iParentWg );
+    
+    return CAknAppUi::ProcessCommandParametersL( aCommandLine );
+    }
+
+// ----------------------------------------------------------------------------
+// ----------------------------------------------------------------------------
+//
+void CMnrpAppUi::HandleResourceChangeL( TInt aType )
+    {
+    CAknAppUi::HandleResourceChangeL( aType );
+    
+    TRect rect( ClientRect() );
+    if ( Cba() )
+        {
+		Cba()->SetBoundingRect( TRect() );
+		Cba()->ReduceRect( rect );
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CMnrpAppUi::ShowMapL( CMnrpMapViewService& aService )
+    {
+    if ( !iMapView )
+        {
+        iMapView = CMnrpMapView::NewL( IsChainedMode(), iEngine );
+        AddViewL( iMapView );
+        }
+        
+    iMapView->SetMapModeL( aService );
+    ActivateLocalViewL( iMapView->Id() );
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CMnrpAppUi::ShowNavigationL( const CPosLandmark& aDestination )
+    {
+    if ( !iNaviView )
+        {
+        iNaviView = CMnrpNaviView::NewL( IsChainedMode(), iEngine );
+        AddViewL( iNaviView );
+        }
+        
+    iNaviView->SetDestinationL( aDestination );
+    ActivateLocalViewL( iNaviView->Id() );
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CMnrpAppUi::StartSelectionL( 
+    CMnrpMapViewService& aService,  
+    MMapSelectionCallback& aCallback )
+    {
+	SetNaviPaneTitleL( aService.SelectionRequestText() );
+
+    if ( aService.Options() & CMnMapView::EOptionRestrictSelection )
+        {
+        // select from dialog 
+        SelectFromDialogL( aService, aCallback );
+        }
+    else
+        {
+        // select from map
+        if ( !iMapView )
+            {
+            iMapView = CMnrpMapView::NewL( IsChainedMode(), iEngine );
+            AddViewL( iMapView );
+            }
+
+        iMapView->SetSelectionModeL( aService, aCallback );
+        ActivateLocalViewL( iMapView->Id() );
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CMnrpAppUi::StopSelection()
+    {
+    __ASSERT_DEBUG( iMapView, Panic( KErrGeneral ) );
+    iMapView->StopSelection();
+
+    // Selection is done - close selection view
+    TRAP_IGNORE( ActivateLocalViewL( iAppView->Id() ) );
+    }
+    
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CMnrpAppUi::SelectFromDialogL(
+    CMnrpMapViewService& aService,
+    MMapSelectionCallback& aCallback )
+    {
+    LOG("MnRefProvider::SelectFromDialogL in");
+
+    const TInt KGranularity = 8;
+
+    CDesCArraySeg *textArray = new (ELeave) CDesCArraySeg( KGranularity );
+    CleanupStack::PushL( textArray );
+    CArrayPtrSeg<CGulIcon>* iconArray = CreateIconListLC( KGranularity );
+
+    TInt linkedLmsOffset = 0;
+
+    CMnrpDocument* doc = ( CMnrpDocument* ) Document();
+    CMnrpEngine& engine = doc->Engine();
+
+    // add non-linked landmarks
+    LOG("MnRefProvider::DoSelectionDialogL adding non-linked landmarks");
+    for ( TInt i = 0; i < aService.LandmarksToShow().Count(); i++)
+        {
+        const CPosLandmark* lm = aService.LandmarksToShow()[i];
+        AddLandmarkL( *lm, *textArray, *iconArray );
+        }
+
+    // add linked landmarks
+    LOG("MnRefProvider::DoSelectionDialogL adding linked landmarks");
+
+    // create dictionary of linked landmarks
+    // in order to ease searching for return values
+    // when completing request
+    RArray<TInt> dbIndices;
+    RArray<TPosLmItemId> lmIds;
+
+    CleanupClosePushL( dbIndices );
+    CleanupClosePushL( lmIds );
+
+    linkedLmsOffset = textArray->Count();
+    for ( TInt db = 0; db < aService.LandmarksToShowDatabases().Count(); db++ )
+        {
+        const HBufC* uri = aService.LandmarksToShowDatabases()[db];
+
+        CPosLandmarkDatabase* lmdb = CPosLandmarkDatabase::OpenL( *uri );
+        CleanupStack::PushL( lmdb );
+
+        if ( lmdb->IsInitializingNeeded() )
+            {
+            ExecuteAndDeleteLD( lmdb->InitializeL() );
+            }
+
+        for ( TInt i = 0; i < aService.LinkedLandmarksToShow(db).Count(); i++)
+            {
+            TPosLmItemId id = aService.LinkedLandmarksToShow(db)[i];
+
+            CPosLandmark* lm = lmdb->ReadLandmarkLC( id );
+            AddLandmarkL( *lm, *textArray, *iconArray );
+            
+            dbIndices.AppendL( db );
+            lmIds.AppendL( id );
+
+            CleanupStack::PopAndDestroy( lm );
+            }
+
+        CleanupStack::PopAndDestroy( lmdb );
+        }
+
+    TInt selected = 0;
+    CAknSelectionListDialog *dialog =
+        CAknSelectionListDialog::NewL( selected, textArray, R_MNREFPROVIDER_MENUBAR );
+
+    dialog->PrepareLC( R_MNREFPROVIDER_SELECTION_DIALOG );
+
+    dialog->SetIconArrayL( iconArray );
+    CleanupStack::Pop(); // iconArray cleanup
+
+    LOG1("MnRefProvider::SelectFromDialogL launching dialog with %d items", textArray->Count() );
+    TInt result = dialog->RunLD();
+    if ( result )
+        {
+        LOG("MnRefProvider::SelectFromDialogL approved");
+        if ( selected < linkedLmsOffset )
+            {
+            aCallback.HandleSelectionL( selected );
+            }
+        else
+            {
+            TInt linkedLmIndex = selected - linkedLmsOffset;
+            if ( linkedLmIndex < dbIndices.Count() && 
+                 linkedLmIndex < lmIds.Count() )
+                {
+                aCallback.HandleSelectionL( lmIds[linkedLmIndex], dbIndices[linkedLmIndex] );
+                }
+            else
+                {
+                // never happens
+                LOG("MnRefProvider::SelectFromDialogL selection out of range, out");
+                aCallback.HandleSelectionErrorL( KErrGeneral );
+                }
+            }
+        }
+    else
+        {
+        LOG("MnRefProvider::SelectFromDialogL cancelled, out");
+        aCallback.HandleSelectionErrorL( KErrCancel );
+        }
+
+    CleanupStack::PopAndDestroy( &lmIds );
+    CleanupStack::PopAndDestroy( &dbIndices );
+
+    CleanupStack::PopAndDestroy( textArray );
+    LOG("MnRefProvider::SelectFromDialogL out");
+}    
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mapnavproviderrefapp/src/mnrpappuiback.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,69 @@
+/*
+* 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:  CMnrpAppUiBack classimplementation
+*
+*/
+
+
+#include <aknnavi.h>
+#include <aknnavide.h>
+
+#include "mnrpengine.h"
+#include "mnrpappuiback.h"
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CMnrpAppUiBack::ConstructL()
+    {
+    BaseConstructL( EAknEnableSkin );
+    // no view is created as this application is intended to be run
+    // only as hidden server
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CMnrpAppUiBack::HandleCommandL(TInt aCommand)
+    {
+    switch(aCommand)
+        {
+        case EEikCmdExit:
+        case EAknSoftkeyExit:
+            Exit();
+            break;
+        default:
+            break;
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// ---------------------------------------------------------------------------
+//
+void CMnrpAppUiBack::MoveForeground()
+    {
+    RWindowGroup& window = iEikonEnv->RootWin();
+    window.SetOrdinalPosition( 0 );
+    }
+
+// ---------------------------------------------------------------------------
+// ---------------------------------------------------------------------------
+//
+void CMnrpAppUiBack::MoveBackground()
+    {
+    RWindowGroup& window = iEikonEnv->RootWin();
+    window.SetOrdinalPosition( -1 );
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mapnavproviderrefapp/src/mnrpappview.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,107 @@
+/*
+* 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:  CMnrpAppView class implementation
+*
+*/
+
+
+#include "mnrp.hrh"
+#include "mnrpappui.h"
+#include "mnrpappcontrol.h"
+#include "mnrpappview.h"
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+CMnrpAppView::CMnrpAppView()
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+CMnrpAppView::~CMnrpAppView()
+    {
+    delete iControl;
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+CMnrpAppView* CMnrpAppView::NewL()
+    {
+    CMnrpAppView* self = new ( ELeave ) CMnrpAppView();
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CMnrpAppView::ConstructL()
+    {
+    BaseConstructL();
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+TUid CMnrpAppView::Id() const
+    {
+    return TUid::Uid( EMnrpAppViewId );
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CMnrpAppView::DoActivateL(
+    const TVwsViewId& /*aPrevViewId*/,
+    TUid /* aCustomMessageId */,
+    const TDesC8& /* aCustomMessage */)
+    {
+    if ( !iControl )
+        {
+        iControl = CMnrpAppControl::NewL( *this, ClientRect() );
+        iControl->SetMopParent( this );
+        }
+
+    // Enable receiving of keyboard events.
+    CMnrpAppUi* ui = ( CMnrpAppUi* ) AppUi();
+    ui->AddToStackL( *this, iControl );
+
+    _LIT( KEmpty, "" );
+    ui->SetNaviPaneTitleL( KEmpty );
+
+    // Make view visible.
+    iControl->MakeVisible( ETrue );
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CMnrpAppView::DoDeactivate()
+    {
+    if ( iControl )
+        {
+        // Hide view.
+        iControl->MakeVisible( EFalse );
+
+        // Disable receiving keyboard events.
+        AppUi()->RemoveFromStack( iControl );
+        }
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mapnavproviderrefapp/src/mnrpcoordconverter.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,97 @@
+/*
+* 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:  CMnrpCoordConverter implementation
+*
+*/
+
+
+#include <e32base.h>
+
+#include "debug.h"
+#include "mnrpengine.h"
+#include "mnrpmapmodel.h"
+#include "mnrpcoordconverter.h"
+
+// ========================== MEMBER FUNCTIONS ===============================
+
+// ---------------------------------------------------------------------------
+// ---------------------------------------------------------------------------
+//
+CMnrpCoordConverter* CMnrpCoordConverter::NewL()
+    {
+    CMnrpCoordConverter* self = new (ELeave) CMnrpCoordConverter;
+    CleanupStack::PushL( self );
+
+    self->iEngine = CMnrpEngine::NewL();
+    self->iModel = CMnrpMapModel::NewL( *self->iEngine );
+
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+// ---------------------------------------------------------------------------
+// ---------------------------------------------------------------------------
+//
+CMnrpCoordConverter::CMnrpCoordConverter()
+    {
+    }
+
+// ---------------------------------------------------------------------------
+// ---------------------------------------------------------------------------
+//
+CMnrpCoordConverter::~CMnrpCoordConverter()
+    {
+    delete iModel;
+    delete iEngine;
+    }
+
+// ---------------------------------------------------------------------------
+// ---------------------------------------------------------------------------
+//
+TInt CMnrpCoordConverter::GetImageCoordinate(
+    const TCoordinate& aWorldCoordinate,
+    TPoint& aImagePoint )
+    {
+    const TMnMapImageParams& params = MapImageParams();
+
+    if ( params.ImageType() == TMnMapImageParams::ETypeSatelliteImage )
+        {
+        return KErrArgument;
+        }
+
+    iModel->UpdateModel( params );
+
+    aImagePoint = iModel->AbsoluteToScreen( aWorldCoordinate );
+    return KErrNone;
+    }
+
+// ---------------------------------------------------------------------------
+// ---------------------------------------------------------------------------
+//
+TInt CMnrpCoordConverter::GetWorldCoordinate(
+    const TPoint& aImagePoint,
+    TCoordinate& aWorldCoordinate )
+    {
+    const TMnMapImageParams& params = MapImageParams();
+
+    if ( params.ImageType() == TMnMapImageParams::ETypeSatelliteImage )
+        {
+        return KErrArgument;
+        }
+
+    iModel->UpdateModel( params );
+
+    aWorldCoordinate = iModel->ScreenToAbsolute( aImagePoint  );
+    return KErrNone;
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mapnavproviderrefapp/src/mnrpdocument.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,80 @@
+/*
+* 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:  CMnrpDocument class implementation
+*
+*/
+
+
+#include "mnrpappui.h"
+#include "mnrpengine.h"
+#include "mnrpdocument.h"
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+CMnrpDocument::CMnrpDocument(CEikApplication& aApp) 
+    : CAknDocument(aApp) 
+    {
+    }   
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CMnrpDocument::ConstructL()
+    {
+    iEngine = CMnrpEngine::NewL();
+    }    
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+CMnrpDocument* CMnrpDocument::NewL( CEikApplication& aApp )
+    {
+    CMnrpDocument* self = new (ELeave) CMnrpDocument(aApp);
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    CleanupStack::Pop(self);
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+CMnrpDocument::~CMnrpDocument()
+    {
+    delete iEngine;
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+CMnrpEngine& CMnrpDocument::Engine()
+    { 
+    return *iEngine; 
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+CEikAppUi* CMnrpDocument::CreateAppUiL()
+    {
+    // Create the application user interface, and return a pointer to it,
+    // the framework takes ownership of this object
+    CEikAppUi* appUi = new (ELeave) CMnrpAppUi( *iEngine );
+    return appUi;
+    }
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mapnavproviderrefapp/src/mnrpdocumentback.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,53 @@
+/*
+* 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:  CMnrpDocumentBack class implementation
+*
+*/
+
+
+#include "mnrpappuiback.h"
+#include "mnrpengine.h"
+#include "mnrpdocumentback.h"
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+CMnrpDocumentBack::CMnrpDocumentBack(CEikApplication& aApp) 
+    : CAknDocument(aApp) 
+    {
+    }   
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+CMnrpDocumentBack* CMnrpDocumentBack::NewL( CEikApplication& aApp )
+    {
+    CMnrpDocumentBack* self = new (ELeave) CMnrpDocumentBack( aApp );
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+CEikAppUi* CMnrpDocumentBack::CreateAppUiL()
+    {
+    // Create the application user interface, and return a pointer to it,
+    // the framework takes ownership of this object
+    CEikAppUi* appUi = new (ELeave) CMnrpAppUiBack();
+    return appUi;
+    }
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mapnavproviderrefapp/src/mnrpengine.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,433 @@
+/*
+* 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:  CMnrpEngine class implementation
+*
+*/
+
+
+#include <coemain.h>
+#include <aknlists.h>
+#include <barsread2.h>
+#include <barsc2.h> 
+
+#include <lbsposition.h>
+#include <lbspositioninfo.h>
+
+#include <EPos_CPosLandmark.h>
+#include <EPos_CPosLandmarkDatabase.h>
+
+#include <mnrefproviderengine.rsg>
+
+#include "../inc/debug.h"
+#include "mnrpengine.h"
+
+_LIT( KCitiesResourceFile, "\\resource\\mnrefproviderengine.rsc");
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+CMnrpEngine::CMnrpEngine()
+    { 
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CMnrpEngine::~CMnrpEngine()
+    {
+    iPlaces.ResetAndDestroy();
+    iFileSession.Close();
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CMnrpEngine* CMnrpEngine::NewL()
+    {
+    CMnrpEngine* self = new (ELeave) CMnrpEngine();
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CMnrpEngine::ConstructL()
+    {
+    User::LeaveIfError( iFileSession.Connect() );
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TArray<CPosLandmark*> CMnrpEngine::KnownPlacesL()
+    {
+    if ( iPlaces.Count() == 0 )
+        {
+        TRAP_IGNORE( LoadKnownPlacesL() );
+        }
+
+    return iPlaces.Array();        
+    }
+    
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CPosLandmark* CMnrpEngine::AddressToCoordLC( const CPosLandmark& aAddress )
+    {
+    CPosLandmark* lm = AddressToCoordL( aAddress );
+    if ( lm )
+        {
+        CleanupStack::PushL( lm );
+        return lm;
+        }
+    else
+        {
+        User::Leave( KErrNotFound );
+        return NULL;
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CPosLandmark* CMnrpEngine::AddressToCoordL( const CPosLandmark& aAddress )
+    {
+    TPtrC city, country;
+    aAddress.GetPositionField( EPositionFieldCity, city );
+    
+    TArray<CPosLandmark*> pois = KnownPlacesL();
+    
+    if ( city.Length() )
+        {
+        for ( TInt i = 0; i < pois.Count(); i++ )
+            {
+            TPtrC poiCity;
+            pois[i]->GetPositionField( EPositionFieldCity, poiCity );
+            if ( poiCity.CompareF( city ) == 0 )
+                {
+                return CPosLandmark::NewL( *pois[i] );
+                }
+            }
+        }
+    
+    return NULL;
+    }
+    
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CPosLandmark* CMnrpEngine::AddressToCoordLC( const TDesC& aAddress )
+    {
+    CPosLandmark* lm = AddressToCoordL( aAddress );
+    if ( lm )
+        {
+        CleanupStack::PushL( lm );
+        return lm;
+        }
+    else
+        {
+        User::Leave( KErrNotFound );
+        return NULL;
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CPosLandmark* CMnrpEngine::AddressToCoordL( const TDesC& aAddress )
+    {
+    TArray<CPosLandmark*> pois = KnownPlacesL();
+
+    if ( aAddress.Length() )
+        {
+        for ( TInt i = 0; i < pois.Count(); i++ )
+            {
+            TPtrC city, country;
+            pois[i]->GetPositionField( EPositionFieldCity, city );
+            pois[i]->GetPositionField( EPositionFieldCountry, country );
+            
+            if ( aAddress.FindF( city ) >= 0 )
+                {
+                return CPosLandmark::NewL( *pois[i] );
+                }
+            }
+        }
+        
+    return NULL;
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TReal32 CMnrpEngine::DistanceBetweenLandmarks( 
+    const CPosLandmark& aFrom,
+    const CPosLandmark& aTo )
+    {
+    TRealX nan;
+    nan.SetNaN();
+    TReal32 distance = nan;
+    
+    TLocality locFrom, locTo;
+
+    if ( aFrom.GetPosition( locFrom ) == KErrNone &&
+         aTo.GetPosition( locTo ) == KErrNone )
+        {
+        TReal32 dist;
+        if ( locFrom.Distance( locTo, dist ) == KErrNone )
+            {
+            distance = dist;
+            }
+        }
+    return distance;
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CMnrpEngine::FindClosestPoisL( 
+    const CPosLandmark& aReference,
+    RArray<CMnrpEngine::TDistanceToPoi>& aNeighbourPois,
+    TInt aMaxMatches )
+    {
+    aNeighbourPois.Reset();
+    TArray<CPosLandmark*> pois = KnownPlacesL();
+
+    // calc distances to known places and find out closest ones
+    for ( TInt i = 0; i < pois.Count(); i++ )
+        {
+        CPosLandmark* poi = pois[i];
+
+        TReal32 distance = DistanceBetweenLandmarks( aReference, *poi );
+        
+        if ( Math::IsNaN( distance ) )
+            {
+            continue;
+            }
+        
+        TDistanceToPoi newDistToPoi;
+        newDistToPoi.iPoiIndex = i;
+        newDistToPoi.iDistance = distance;
+
+        for ( TInt k = 0; k < aNeighbourPois.Count(); k++ )
+            {
+            TDistanceToPoi distToPoi = aNeighbourPois[k];
+            if ( distance < distToPoi.iDistance )
+                {
+                // current POI is closer to reference than current neighbour
+                aNeighbourPois.InsertL( newDistToPoi, k );
+                break;
+                }
+            }
+
+        if ( aNeighbourPois.Count() < aMaxMatches )
+            {
+            aNeighbourPois.AppendL( newDistToPoi );
+            }
+
+        if ( aNeighbourPois.Count() > aMaxMatches )
+            {
+            aNeighbourPois.Remove( aNeighbourPois.Count() - 1 ); // remove last
+            }
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+CPosLandmark* CMnrpEngine::CreateCloseLandmarkLC( 
+    const CPosLandmark& aReference,
+    TReal32 aDistance )
+    {
+    CPosLandmark* lm = CPosLandmark::NewLC( aReference );
+    TPtrC oldName;
+    lm->GetLandmarkName( oldName );
+    
+    // create street in the form of "50 km to <POI name>"
+    const TInt KDistValueLen = 5; // "40000"
+    const TInt KAdditionalChars = 7; // " km to "
+
+    _LIT( KLocationNameFormat, "%d m to %S" );
+    _LIT( KLocationNameFormatKm, "%d km to %S" );
+
+    HBufC* locName = HBufC::NewLC( oldName.Length() + KDistValueLen + KAdditionalChars );
+
+    if ( aDistance < 1000 )
+        {
+        locName->Des().Format( KLocationNameFormat, TInt( aDistance ), &oldName );
+        }
+    else
+        {
+        locName->Des().Format( KLocationNameFormatKm, TInt( aDistance / 1000 ), &oldName );
+        }
+
+    lm->SetPositionFieldL( EPositionFieldLocationName, *locName );
+    lm->SetPositionFieldL( EPositionFieldStreet, *locName );
+   
+    CleanupStack::PopAndDestroy( locName );
+    return lm; // left in stack
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CPosLandmark* CMnrpEngine::CoordToAddressLC( const TCoordinate& aLocation )
+    {
+    TArray<CPosLandmark*> pois = KnownPlacesL();
+
+    // find closest POI
+    RArray<TDistanceToPoi> matches;
+	CleanupClosePushL( matches );
+    
+    CPosLandmark* temp = CPosLandmark::NewLC();
+    TLocality loc( aLocation, 0 ); // accuracy is not used by this implementation
+    temp->SetPositionL( loc );
+    FindClosestPoisL( *temp, matches, 1 ); // only one match needed
+    CleanupStack::PopAndDestroy( temp );
+    
+    if ( matches.Count() < 1 )
+		{
+		User::Leave( KErrNotFound );
+		}
+
+    TDistanceToPoi distToPoi = matches[0];
+	CleanupStack::PopAndDestroy( &matches );
+
+    CPosLandmark* lm = CreateCloseLandmarkLC(
+        *pois[distToPoi.iPoiIndex],
+        distToPoi.iDistance );
+
+    return lm; // left in stack
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CMnrpEngine::BestCoordToAddressMatchesL( 
+    const TCoordinate& aLocation,
+    RPointerArray<CPosLandmark>& aMatches,
+    TInt aMaxMatches )
+    {
+    TArray<CPosLandmark*> pois = KnownPlacesL();
+
+    // find closest POIs
+    RArray<TDistanceToPoi> matches;
+    CleanupClosePushL( matches );
+    
+    CPosLandmark* temp = CPosLandmark::NewLC();
+    TLocality loc( aLocation, 0 ); // accuracy is not used by this implementation
+    temp->SetPositionL( loc );
+    FindClosestPoisL( *temp, matches, aMaxMatches );
+    CleanupStack::PopAndDestroy( temp );
+    
+    for ( TInt i = 0; i < matches.Count(); i++ )
+        {
+        TDistanceToPoi distToPoi = matches[i];
+        
+        CPosLandmark* lm = CreateCloseLandmarkLC( 
+            *pois[distToPoi.iPoiIndex], 
+            distToPoi.iDistance );
+            
+        aMatches.AppendL( lm );    
+        CleanupStack::Pop( lm );
+        }
+    CleanupStack::PopAndDestroy( &matches );
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CMnrpEngine::FindResourceFileL( 
+    const TDesC& aFilePathAndName,
+    TFileName& aRscFile )
+    {
+    TParse parse;
+    parse.Set( aFilePathAndName, NULL, NULL );
+    
+    TFindFile finder( iFileSession );
+    if ( finder.FindByDir( parse.NameAndExt(), parse.Path() ) == KErrNone )
+        {
+        aRscFile.Copy( finder.File() );
+        }
+    else
+        {
+        User::Leave( KErrNotFound );
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+EXPORT_C RFs& CMnrpEngine::Fs() 
+    { 
+    return iFileSession;
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CMnrpEngine::LoadKnownPlacesL()
+    {
+    TFileName resourceFile;
+    FindResourceFileL( KCitiesResourceFile(), resourceFile );
+
+    CResourceFile* resFile = CResourceFile::NewLC( iFileSession, resourceFile, 0, 0 );
+    resFile->ConfirmSignatureL( 0 );
+
+    RResourceReader reader;
+
+    reader.OpenLC( resFile, R_MNREFPROVIDERENGINE_PLACES );
+    ReadPlacesResourceL( reader );
+    CleanupStack::PopAndDestroy( &reader );
+    
+    CleanupStack::PopAndDestroy( resFile );
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CMnrpEngine::ReadPlacesResourceL( RResourceReader& aReader )
+    {
+    TInt size = aReader.ReadInt16L();
+
+    for ( TInt i = 0; i < size; i++ )
+        {
+        HBufC* city = aReader.ReadHBufCL();
+        CleanupStack::PushL( city );
+        HBufC* country = aReader.ReadHBufCL();
+        CleanupStack::PushL( country );
+
+        TReal64 lat = aReader.ReadReal64L();
+        TReal64 lon = aReader.ReadReal64L();
+        
+        CPosLandmark* lm = CPosLandmark::NewLC();
+        lm->SetLandmarkNameL( *city );
+        
+        lm->SetPositionFieldL( EPositionFieldCity, *city );
+        lm->SetPositionFieldL( EPositionFieldCountry, *country );
+        
+        TLocality coord;
+        coord.SetCoordinate( lat, lon );
+        lm->SetPositionL( coord );
+        
+        iPlaces.AppendL( lm );
+        CleanupStack::Pop( lm );
+        CleanupStack::PopAndDestroy( country );
+        CleanupStack::PopAndDestroy( city );
+        }
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mapnavproviderrefapp/src/mnrpgeocodingservice.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,343 @@
+/*
+* 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:  CMnrpGeocodingService class implementation
+*
+*/
+
+
+#include <e32base.h>
+
+#include <aknnotewrappers.h>
+
+#include <lbsposition.h>
+
+#include <EPos_CPosLandmark.h>
+#include <epos_poslandmarkserialization.h>
+
+#include <mngeocodingservicebase.h>
+
+#include "debug.h"
+
+#include "mnrpappserverback.h"
+#include "mnrpappuiback.h"
+#include "mnrpdocumentback.h"
+#include "mnrpengine.h"
+
+#include <mnrefproviderback.rsg>
+#include "mnrpgeocodingservice.h"
+
+// ======== LOCAL FUNCTIONS ========
+
+// ---------------------------------------------------------------------------
+//  Cleanup item for RPointerArray<CPosLandmark>
+// ---------------------------------------------------------------------------
+//
+void CleanupLandmarksArray( TAny* aArray )
+    {
+    ( static_cast<RPointerArray<CPosLandmark>*>( aArray ) )->ResetAndDestroy();
+    }
+
+// ---------------------------------------------------------------------------
+//  Cleanup item for moving application fore/background
+// ---------------------------------------------------------------------------
+//
+void CleanupForeground( TAny* aAppUi )
+    {
+    ( static_cast<CMnrpAppUiBack*>( aAppUi ) )->MoveBackground();
+    }
+
+// ======== MEMBER FUNCTIONS ========
+
+// ---------------------------------------------------------------------------
+// ---------------------------------------------------------------------------
+//
+CMnrpGeocodingService::CMnrpGeocodingService( CMnrpEngine& aEngine )
+ :  iEngine( aEngine )
+    {
+    }
+
+// ---------------------------------------------------------------------------
+// ---------------------------------------------------------------------------
+//
+CMnrpGeocodingService* CMnrpGeocodingService::NewL( CMnrpEngine& aEngine )
+    {
+    CMnrpGeocodingService* self = new (ELeave) CMnrpGeocodingService( aEngine );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop( self );
+    return self;
+    }
+    
+// ---------------------------------------------------------------------------
+// ---------------------------------------------------------------------------
+//
+CMnrpGeocodingService::~CMnrpGeocodingService()
+    {
+    delete iProcessor;
+    delete iLandmark;
+    delete iPlainAddress;
+    }
+
+// ---------------------------------------------------------------------------
+// ---------------------------------------------------------------------------
+//
+void CMnrpGeocodingService::ConstructL()
+    {
+    BaseConstructL();
+    
+    iProcessor = CIdle::NewL( CActive::EPriorityIdle );
+    }
+
+// ---------------------------------------------------------------------------
+// ---------------------------------------------------------------------------
+//
+void CMnrpGeocodingService::LeaveIfBusyL()
+    {
+    if ( iProcessor->IsActive() )
+        {
+        User::Leave( KErrInUse );
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// ---------------------------------------------------------------------------
+//
+void CMnrpGeocodingService::StartProcessingL()
+    {
+    iProcessor->Start( TCallBack( CMnrpGeocodingService::GeocodingProcessingCallBack, this ) );
+    }
+
+// ---------------------------------------------------------------------------
+// ---------------------------------------------------------------------------
+//
+TInt CMnrpGeocodingService::GeocodingProcessingCallBack( TAny* aPtr )
+    {
+    CMnrpGeocodingService* self =    
+        static_cast<CMnrpGeocodingService*> ( aPtr );
+        
+    self->HandleGeocodingCompleted();
+    return EFalse;
+    }
+
+// ---------------------------------------------------------------------------
+// ---------------------------------------------------------------------------
+//
+void CMnrpGeocodingService::HandleGeocodingCompleted()
+    {
+    TInt err = KErrNone;
+    TRAP( err, FinishProcessingL() );
+    if ( err )
+        {
+        CompleteRequest( err );
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// ---------------------------------------------------------------------------
+//
+void CMnrpGeocodingService::FinishProcessingL()
+    {
+    LOG1("MnRefProvider: FinishProcessingL in, cursvc %d", iCurrentService);
+
+    TLocality loc;
+    CPosLandmark* lm = NULL;
+    
+    switch ( iCurrentService )
+        {
+        case ECoordToAddr:
+                
+            if ( iDialogAllowed )
+                {
+                lm = LetUserSelectBestMatchL( *iLandmark );
+                CleanupStack::PushL( lm );
+                }
+            else
+                {
+                // search and return just best match - closest POI
+                if ( iLandmark->GetPosition( loc ) != KErrNone )
+                    {
+                    User::Leave( KErrArgument );
+                    }
+                lm = iEngine.CoordToAddressLC( loc );
+                }
+            break;
+
+        case EAddrToCoord:
+            lm = iEngine.AddressToCoordLC( *iLandmark );
+            break;
+
+        case EPlainToCoord:
+            lm = iEngine.AddressToCoordLC( *iPlainAddress );
+            break;
+            
+        default:            
+            User::Leave( KErrGeneral );
+        }
+
+    iCurrentService = ENone;    
+    
+    CompleteGeocodingRequestL( *lm );
+    CleanupStack::PopAndDestroy( lm );
+
+    LOG("MnRefProvider: FinishProcessingL out");
+    }
+
+// ---------------------------------------------------------------------------
+// ---------------------------------------------------------------------------
+//
+CPosLandmark* CMnrpGeocodingService::LetUserSelectBestMatchL( const CPosLandmark& aReference )
+    {
+    // 1. Find best matches
+    
+    RPointerArray<CPosLandmark> matches;
+    CleanupStack::PushL( TCleanupItem( CleanupLandmarksArray, &matches ) );
+    
+    TLocality location;
+    if ( aReference.GetPosition( location ) != KErrNone )
+        {
+        User::Leave( KErrArgument );
+        }
+    
+    const TInt KMaxmMatches = 3;
+    iEngine.BestCoordToAddressMatchesL( location, matches, KMaxmMatches );
+    
+    if ( matches.Count() < 1 )
+        {
+        User::Leave( KErrNotFound ); // cannot find any match
+        }
+    
+    // 2. Start selection dialog
+    
+    TInt result = 1, selected = 0;
+    if ( matches.Count() > 1 )
+        {
+        // prepare dialog
+        const TInt KGranularity = 8;
+        CDesCArraySeg *textArray = new (ELeave) CDesCArraySeg( KGranularity );
+        CleanupStack::PushL( textArray );
+        
+        for ( TInt i = 0; i < matches.Count(); i++ )
+            {
+            HBufC* buf = HBufC::NewLC( KPosLmMaxTextFieldLength );
+            TPtrC ptr( buf->Des() );
+            
+            matches[i]->GetPositionField( EPositionFieldLocationName, ptr );
+            textArray->AppendL( ptr );
+
+            CleanupStack::PopAndDestroy( buf );
+            }
+        
+        // bring application foreground
+        CMnrpAppUiBack* ui = (CMnrpAppUiBack*) CEikonEnv::Static()->AppUi();
+        CleanupStack::PushL( TCleanupItem( CleanupForeground, ui ) );
+        ui->MoveForeground();
+
+        CAknListQueryDialog* dialog = new (ELeave) CAknListQueryDialog( &selected );
+        dialog->PrepareLC( R_MNREFGEOCODER_LIST_QUERY );
+
+        dialog->SetItemTextArray( textArray );
+        dialog->SetOwnershipType( ELbmOwnsItemArray );
+
+        // pop up dialog
+        result = dialog->RunLD();
+
+        CleanupStack::PopAndDestroy(); // move background
+        CleanupStack::Pop( textArray );
+        }
+
+    // 3. Return result
+    CPosLandmark* lm = NULL;
+    if ( result )
+        {
+        lm = matches[selected];
+        matches.Remove( selected );
+        }
+    else
+        {
+        User::Leave( KErrCancel ); 
+        // user cancelled geocoding selection dialog
+        // it automatically cancels geocoding request
+        }
+
+    CleanupStack::PopAndDestroy(); // matches
+    return lm;
+    }
+
+// ---------------------------------------------------------------------------
+// From class CMnGeocodingServiceBase
+// ---------------------------------------------------------------------------
+//
+void CMnrpGeocodingService::HandleFindAddressByCoordinateL(
+    const CPosLandmark& aLandmark)
+    {
+    LeaveIfBusyL();
+
+    delete iLandmark;
+    iLandmark = NULL;
+    iLandmark = CPosLandmark::NewL(aLandmark);
+    
+    iCurrentService = ECoordToAddr;
+    iDialogAllowed = !( Options() & CMnGeocoder::EOptionDialogDisabled );
+    StartProcessingL();
+    }
+        
+// ---------------------------------------------------------------------------
+// From class CMnGeocodingServiceBase
+// ---------------------------------------------------------------------------
+//
+void CMnrpGeocodingService::HandleFindCoordinateByAddressL(
+    const CPosLandmark& aLandmark)
+    {
+    LeaveIfBusyL();
+
+    delete iLandmark;
+    iLandmark = NULL;
+    iLandmark = CPosLandmark::NewL( aLandmark );
+    
+    iCurrentService = EAddrToCoord;
+    iDialogAllowed = !( Options() & CMnGeocoder::EOptionDialogDisabled );
+    StartProcessingL();
+    }
+
+// ---------------------------------------------------------------------------
+// From class CMnGeocodingServiceBase
+// ---------------------------------------------------------------------------
+//
+void CMnrpGeocodingService::HandleFindCoordinateByAddressL(
+    const TDesC& aAddress)
+    {
+    LeaveIfBusyL();
+
+    delete iPlainAddress;
+    iPlainAddress = NULL;
+    iPlainAddress = aAddress.AllocL();
+    
+    delete iLandmark;
+    iLandmark = NULL;
+    iLandmark = CPosLandmark::NewL();
+    
+    iCurrentService = EPlainToCoord;
+    iDialogAllowed = !( Options() & CMnGeocoder::EOptionDialogDisabled );
+    StartProcessingL();
+    }
+
+// ---------------------------------------------------------------------------
+// From class CMnServiceBase
+// ---------------------------------------------------------------------------
+//
+void CMnrpGeocodingService::DoCancel()
+    {
+    iProcessor->Cancel();
+    iCurrentService = ENone;
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mapnavproviderrefapp/src/mnrpmapcontrol.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,644 @@
+/*
+* 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:  CMnrpMapControl class implementation
+*
+*/
+
+
+#include <coemain.h>
+#include <aknlists.h>
+#include <barsread.h>
+#include <aknnotewrappers.h>
+
+#include <bitstd.h>
+#include <bitdev.h>
+
+#include <lbsposition.h>
+
+#include "debug.h"
+
+#include "mnrputils.h"
+#include "mnrpmapview.h"
+#include "mnrpmapcontrol.h"
+
+const TInt KCodeKeyLeft = 0x34;
+const TInt KCodeKeyRight = 0x36;
+const TInt KCodeKeyUp = 0x32;
+const TInt KCodeKeyDown = 0x38;
+const TInt KCodeKeyCenter = 0x35;
+
+const TInt KCodeKeySelect = EKeyDevice3;
+const TInt KCodeKeySelect2 = 0x13;
+
+const TInt KCodeKeyZoomIn = 42;
+const TInt KCodeKeyZoomOut = 35;
+const TInt KCodeKeyZoomIn2 = 0x33;
+const TInt KCodeKeyZoomOut2 = 0x39;
+
+const TRgb KCursorColor( 255, 255, 255 );
+const TRgb KGridTextColor( 0, 0, 0 );
+const TRgb KOriginMarkColor( 0, 0, 255 );
+
+const TInt KTextFontHeightInTwips = 100;
+const TInt KItemFontHeightInTwips = 120;
+const TReal KBorderSizeFactor = 2;
+
+const TInt KCursorMarginSize = 20; // pixels
+const TInt KCursorArrowSize = 4; // pixels
+const TInt KCursorCircleRadius = 4; // pixels
+
+const TInt KCursorMove = 10; // pixels
+const TInt KWindowMove = 20; // pixels
+const TReal KJumpFactor = 5;
+const TReal KCrawlFactor = 2.0 / KCursorMove;
+
+const TReal KZoomOutRate = 1.5;
+const TReal KZoomInRate =  1 / KZoomOutRate;
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+CMnrpMapControl::CMnrpMapControl( CMnrpMapView& aView )
+ :  iView( aView )
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+CMnrpMapControl::~CMnrpMapControl()
+    {
+    delete iModel;
+    delete iOffScreenBitmap;
+    DestroyFonts();
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+CMnrpMapControl* CMnrpMapControl::NewL( 
+    CMnrpMapView& aView,
+    const TRect& aRect,
+    CMnrpEngine& aEngine )
+    {
+    CMnrpMapControl* self = new ( ELeave ) CMnrpMapControl( aView );
+    CleanupStack::PushL( self );
+    self->ConstructL( aRect, aEngine );
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CMnrpMapControl::UpdateModelL( CMnrpMapViewService& aService )
+    {
+    iModel->UpdateModelL( aService );
+    }
+    
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CMnrpMapControl::SetSelectionModeL( TBool aSelectionMode ) 
+    {
+    iSelectionMode = aSelectionMode;
+    iAbsoluteCursor = iModel->Center();
+    iCursor = iModel->AbsoluteToScreen( iAbsoluteCursor );
+    DrawDeferred();
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+TCoordinate CMnrpMapControl::CurrentLocation()
+    {
+    return iAbsoluteCursor;
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CMnrpMapControl::ConstructL( 
+    const TRect& aRect,
+    CMnrpEngine& aEngine )
+    {
+    // Create a window for this application view
+    CreateWindowL();
+
+    iModel = CMnrpMapModel::NewL( *this, aEngine );
+
+    // Set the windows size
+    SetRect( aRect );
+    
+    iAbsoluteCursor = TCoordinate( 0, 0 );
+    iCursor = iModel->AbsoluteToScreen( iAbsoluteCursor );
+    
+    CreateFonts();
+    CreateScreenBufferL( aRect.Size() );
+
+    // Activate the window, which makes it ready to be drawn
+    ActivateL();
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+TKeyResponse CMnrpMapControl::OfferKeyEventL(
+    const TKeyEvent& aKeyEvent, 
+    TEventCode /*aType*/ )
+    {
+    TKeyResponse response = EKeyWasConsumed;
+    
+    TInt step = iSelectionMode ? KCursorMove : KWindowMove;
+    TBool isShift = aKeyEvent.iModifiers & EModifierShift;
+    TReal crawlFactor = isShift ? KCrawlFactor : 1;
+
+    TInt xmove = 0;
+    TInt ymove = 0;
+    
+    TBool redraw = ETrue;
+
+    switch ( aKeyEvent.iCode )
+        {
+        case EKeyLeftArrow:
+            xmove = -step * crawlFactor;
+            break;
+
+        case KCodeKeyLeft:
+            xmove = -step * KJumpFactor;
+            break;
+
+        case EKeyRightArrow:
+            xmove = step * crawlFactor;
+            break;
+
+        case KCodeKeyRight:
+            xmove = step * KJumpFactor;
+            break;
+
+        case EKeyUpArrow:
+            ymove = -step * crawlFactor;
+            break;
+
+        case KCodeKeyUp:
+        case EKeyPageUp:
+            ymove = -step * KJumpFactor;
+            break;
+
+        case EKeyDownArrow:
+            ymove = step * crawlFactor;
+            break;
+            
+        case KCodeKeyDown:
+        case EKeyPageDown:
+            ymove = step * KJumpFactor;
+            break;
+
+        case KCodeKeyZoomIn:
+        case KCodeKeyZoomIn2:
+            Zoom( KZoomInRate );
+            break;
+
+        case KCodeKeyZoomOut:
+        case KCodeKeyZoomOut2:
+            Zoom( KZoomOutRate );
+            break;
+
+        case KCodeKeyCenter:
+            iModel->GoCenter();
+            iCursor = iModel->AbsoluteToScreen( TCoordinate( 0, 0 ) );
+            break;
+
+        case KCodeKeySelect:
+        case KCodeKeySelect2:
+            if ( iSelectionMode )
+                {
+                iView.HandleUserSelectionL( KErrNone );
+                redraw = EFalse;
+                }
+            break;
+
+        default:
+            response = EKeyWasNotConsumed;
+            redraw = EFalse;
+            break;
+        }
+
+    if ( xmove || ymove )
+        {
+        if ( iSelectionMode )
+            {
+            MoveCursor( xmove, ymove );
+            }
+        else
+            {
+            TCoordinate center = iModel->Center();
+            TCoordinate moveTo( 
+                center.Latitude() - iModel->ScreenToAbsolute( ymove ),
+                center.Longitude() + iModel->ScreenToAbsolute( xmove ) );
+            iModel->MoveTo( moveTo );
+            }
+        }
+
+    if ( redraw )
+        {
+        RenderL();
+        DrawDeferred();
+        }
+
+    return response;
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CMnrpMapControl::HandleModelUpdateL()
+    {
+    RenderL();
+    DrawDeferred();
+    
+    TInt ignored = iModel->NumIgnoredLandmarks();
+    if ( ignored )
+    	{
+        CAknInformationNote* note = new (ELeave) CAknInformationNote( ETrue );
+        _LIT( KMessageIgnoredLm, "One landmark\nhas no coordinates\nand can't be shown." );
+        _LIT( KMessageIgnoredLms, "%d landmarks\nhave no coordinates\nand can't be shown." );
+        if ( ignored == 1 )
+        	{
+        	note->ExecuteLD( KMessageIgnoredLm() );
+        	}
+        else
+        	{
+            TBuf<64> message;
+        	message.Format( KMessageIgnoredLms, ignored );
+        	note->ExecuteLD( message );
+        	}
+    	}
+    }
+    
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CMnrpMapControl::CreateScreenBufferL( const TSize& aSize )
+	{
+	CGraphicsDevice* screenDevice = iEikonEnv->ScreenDevice();
+
+	// create a bitmap to be used off-screen
+	CFbsBitmap* offScreenBitmap = new (ELeave) CFbsBitmap();
+	User::LeaveIfError( offScreenBitmap->Create( aSize, screenDevice->DisplayMode() ) );
+	CleanupStack::PushL( offScreenBitmap );
+
+	if ( iOffScreenBitmap )
+		{
+		delete iOffScreenBitmap;
+		}
+	iOffScreenBitmap = offScreenBitmap;
+
+	CleanupStack::Pop( offScreenBitmap );
+	}
+
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CMnrpMapControl::CreateFonts()
+	{
+    CGraphicsDevice* screenDevice = iEikonEnv->ScreenDevice();
+
+    const CFont* denseFont = iEikonEnv->DenseFont();
+    TFontSpec fs = denseFont->FontSpecInTwips();
+
+    fs.iHeight = KTextFontHeightInTwips;
+    screenDevice->GetNearestFontInTwips( iTextFont, fs );
+    
+    fs.iHeight = KItemFontHeightInTwips;
+    screenDevice->GetNearestFontInTwips( iItemFont, fs );
+	}
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CMnrpMapControl::DestroyFonts()
+	{
+	CGraphicsDevice* screenDevice = iEikonEnv->ScreenDevice();
+	
+    screenDevice->ReleaseFont( iItemFont );
+    iItemFont = NULL;
+    screenDevice->ReleaseFont( iTextFont );
+    iTextFont = NULL;
+	}
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CMnrpMapControl::Draw( const TRect& /*aRect*/ ) const
+    {
+    // Get the standard graphics context
+    CWindowGc& gc = SystemGc();
+
+    TRect rect = Rect();
+    TRect border( rect );
+    border.Shrink( BorderSize() );
+	
+    gc.Clear( TRect( rect.iTl.iX, rect.iTl.iY, rect.iBr.iX, border.iBr.iY ) );
+    gc.Clear( TRect( rect.iTl.iX, border.iBr.iY, rect.iBr.iX, rect.iBr.iY ) );
+    gc.Clear( TRect( rect.iTl.iX, border.iTl.iY, border.iTl.iX, border.iBr.iY ) );
+    gc.Clear( TRect( border.iBr.iX, border.iTl.iY, rect.iBr.iX, border.iBr.iY ) );
+
+    CMnrpMapModel::TGrid grid;
+    iModel->GetGrid( grid );
+    DrawGridText( gc, border, rect, iTextFont, grid );
+
+	if ( iOffScreenBitmap )
+		{
+		gc.BitBlt( border.iTl, iOffScreenBitmap );
+		}
+	else
+		{
+		gc.Clear();	
+		}
+			
+    if ( iSelectionMode )
+        {
+        gc.SetOrigin( border.iTl );
+        DrawCursor( gc );
+        }
+
+    // draw border
+    gc.SetPenColor( KRgbGray );
+    gc.SetPenSize( TSize( 1, 1 ) );
+    gc.SetOrigin( rect.iTl );
+    gc.DrawRect( border );
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CMnrpMapControl::DrawGridText( 
+    CWindowGc& aGc, 
+    const TRect& aInnerBox,
+    const TRect& aOuterBox,
+    const CFont* aFont,
+    CMnrpMapModel::TGrid& aGrid ) const
+    {
+    aGc.UseFont( aFont );
+    
+    TBuf<KMaxCoordStrSize> latTopStr, latBottomStr, lonLeftStr, lonRightStr;
+    TBuf<KMaxCoordStrSize> gridMajorStr, latStr, lonStr;
+    
+    MnrpUtils::CoordinateToString( iModel->Left(), lonLeftStr, ETrue );
+    MnrpUtils::CoordinateToString( iModel->Top(), latTopStr, ETrue );
+    MnrpUtils::CoordinateToString( iModel->Right(), lonRightStr, ETrue );
+    MnrpUtils::CoordinateToString( iModel->Bottom(), latBottomStr, ETrue );
+
+    if ( !iSelectionMode )
+        {
+        MnrpUtils::CoordinateToString( ( iModel->Right() + iModel->Left() ) / 2, lonStr, ETrue );
+        MnrpUtils::CoordinateToString( ( iModel->Top() + iModel->Bottom() ) / 2, latStr, ETrue );
+        }
+    else
+        {
+        MnrpUtils::CoordinateToString( iAbsoluteCursor.Longitude(), lonStr, ETrue );
+        MnrpUtils::CoordinateToString( iAbsoluteCursor.Latitude(), latStr, ETrue );
+        }
+
+    MnrpUtils::CoordinateToString( aGrid.iAbsoluteGridStep, gridMajorStr );
+
+    TRect lonBox( aInnerBox.iTl.iX, 0, aInnerBox.iBr.iX, aInnerBox.iBr.iY );
+    TRect latBox( 0, aInnerBox.iTl.iY, aInnerBox.iTl.iX, aInnerBox.iBr.iY );
+    TRect centerBox( aInnerBox.iTl.iX, aInnerBox.iBr.iY, aInnerBox.iBr.iX, aOuterBox.iBr.iY );
+
+    TInt textBaseLine = aFont->AscentInPixels() + KBorderSizeFactor / 2;
+    TInt vertTextBaseLine = aFont->AscentInPixels() + KBorderSizeFactor / 2;
+
+    aGc.SetPenColor( KGridTextColor );
+
+    aGc.DrawText( lonLeftStr, lonBox, textBaseLine, CGraphicsContext::ELeft );
+    aGc.DrawText( lonRightStr, lonBox, textBaseLine, CGraphicsContext::ERight );
+    aGc.DrawTextVertical( latTopStr, latBox, vertTextBaseLine, EFalse, CGraphicsContext::ELeft );
+    aGc.DrawTextVertical( latBottomStr, latBox, vertTextBaseLine, EFalse, CGraphicsContext::ERight );
+
+    aGc.DrawText( gridMajorStr, lonBox, textBaseLine, CGraphicsContext::ECenter );
+
+    aGc.SetPenColor( KOriginMarkColor );
+    aGc.DrawText( latStr, centerBox, textBaseLine, CGraphicsContext::ELeft );
+    aGc.DrawText( lonStr, centerBox, textBaseLine, CGraphicsContext::ERight );
+    
+    aGc.DiscardFont();
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CMnrpMapControl::DrawCursor( CWindowGc& aGc ) const
+    {
+    aGc.SetPenColor( KCursorColor );
+    aGc.SetPenSize( TSize( 1, 1 ) );
+    aGc.SetDrawMode( CGraphicsContext::EDrawModeNOTSCREEN );
+    
+    TRect cursorCircleRect( iCursor, TSize( 0, 0 ) );
+    cursorCircleRect.Grow( KCursorCircleRadius, KCursorCircleRadius );
+    aGc.DrawEllipse( cursorCircleRect );
+    
+    // upper vertical line
+    aGc.DrawLine( TPoint( iCursor.iX, cursorCircleRect.iTl.iY ), 
+                  TPoint( iCursor.iX, cursorCircleRect.iTl.iY - KCursorArrowSize ) );
+    // lower vertical line
+    aGc.DrawLine( TPoint( iCursor.iX, cursorCircleRect.iBr.iY ), 
+                  TPoint( iCursor.iX, cursorCircleRect.iBr.iY + KCursorArrowSize ) );
+
+    // left horiz line
+    aGc.DrawLine( TPoint( cursorCircleRect.iTl.iX, iCursor.iY ), 
+                  TPoint( cursorCircleRect.iTl.iX - KCursorArrowSize, iCursor.iY ) );
+    // right horiz line
+    aGc.DrawLine( TPoint( cursorCircleRect.iBr.iX, iCursor.iY ), 
+                  TPoint( cursorCircleRect.iBr.iX + KCursorArrowSize, iCursor.iY ) );
+
+    aGc.SetDrawMode( CGraphicsContext::EDrawModePEN );
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CMnrpMapControl::SizeChanged()
+    {
+    TRect rect( Rect() );
+    
+    DestroyFonts();
+    CreateFonts();
+    
+    rect.Shrink( BorderSize() );
+    iViewSize = rect.Size();
+    iModel->SetScreenSize( iViewSize );
+    TRAP_IGNORE( CreateScreenBufferL( rect.Size() ) );
+    TRAP_IGNORE( RenderL() );
+    DrawDeferred();
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CMnrpMapControl::HandleResourceChange( TInt aType )
+    {
+    CCoeControl::HandleResourceChange( aType );
+    if ( aType == KEikDynamicLayoutVariantSwitch )
+        {
+        SetFullScreen( iIsFullScreen );
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CMnrpMapControl::ToggleFullScreen()
+    {
+    SetFullScreen( !iIsFullScreen );
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CMnrpMapControl::SetFullScreen( TBool aFullScreen )
+    {
+    iIsFullScreen = aFullScreen;
+    if ( iIsFullScreen)
+        {
+        SetExtentToWholeScreen();
+        }
+    else
+        {
+        SetRect( iView.ClientRect() );
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CMnrpMapControl::MoveCursor( TInt aXmove, TInt aYmove )
+    {
+    iCursor += TPoint( aXmove, aYmove );
+
+    iCursor.iX = Max( 0, iCursor.iX );
+    iCursor.iX = Min( iViewSize.iWidth, iCursor.iX );
+
+    iCursor.iY = Max( 0, iCursor.iY );
+    iCursor.iY = Min( iViewSize.iHeight, iCursor.iY );
+
+    // verify cursor margin
+    TRect cursorMargin = CursorMargin();
+    
+    iAbsoluteCursor = iModel->ScreenToAbsolute( iCursor );
+    
+    TReal xcorrection = 0;
+    TReal ycorrection = 0;
+
+    if ( aXmove > 0 ) // moving right
+        {
+        TInt toMargin = iCursor.iX - cursorMargin.iBr.iX;
+        if ( toMargin > 0 ) // cursor went beyond cursor margin, move view
+            {
+            xcorrection = iModel->ScreenToAbsolute( toMargin );
+            }
+        }
+    else if ( aXmove < 0 ) // moving left
+        {
+        TInt toMargin = iCursor.iX - cursorMargin.iTl.iX;
+        if ( toMargin < 0 )
+            {
+            xcorrection = iModel->ScreenToAbsolute( toMargin );
+            }
+        }
+
+    if ( aYmove > 0 ) // moving down
+        {
+        TInt toMargin = iCursor.iY - cursorMargin.iBr.iY;
+        if ( toMargin > 0 )
+            {
+            ycorrection = -iModel->ScreenToAbsolute( toMargin );
+            }
+        }
+    else if ( aYmove < 0 ) // moving up
+        {
+        TInt toMargin = iCursor.iY - cursorMargin.iTl.iY;
+        if ( toMargin < 0 )
+            {
+            ycorrection = -iModel->ScreenToAbsolute( toMargin );
+            }
+        }
+    
+    TCoordinate center = iModel->Center();
+    TCoordinate moveTo( 
+        center.Latitude() + ycorrection,
+        center.Longitude() + xcorrection );
+    iModel->MoveTo( moveTo );
+
+    iCursor = iModel->AbsoluteToScreen( iAbsoluteCursor );
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+TRect CMnrpMapControl::CursorMargin()
+    {
+    TRect rect( iViewSize );
+    rect.Shrink( KCursorMarginSize, KCursorMarginSize );
+    return rect;
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CMnrpMapControl::Zoom( TReal aRate )
+    {
+    if ( iSelectionMode )
+        {
+        iModel->MoveTo( iAbsoluteCursor );
+        iModel->Zoom( aRate );
+        iCursor = iModel->AbsoluteToScreen( iAbsoluteCursor );
+        }
+    else
+        {
+        iModel->Zoom( aRate );
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+TSize CMnrpMapControl::BorderSize() const 
+    {
+	TSize size( 0, 0 );
+	if ( iTextFont )
+		{
+	    TInt fontHeight = iTextFont->HeightInPixels();
+	    
+	    size.iWidth = size.iHeight = TInt( fontHeight + KBorderSizeFactor );
+		}
+    return size;
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CMnrpMapControl::RenderL()
+    {
+    TRect rect = Rect();
+    TRect border( rect );
+    border.Shrink( BorderSize() );
+
+    if ( iOffScreenBitmap && iTextFont && iItemFont )
+        {
+        iModel->RenderL( *iOffScreenBitmap, TRect( border.Size() ), iTextFont, iItemFont );
+        }
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mapnavproviderrefapp/src/mnrpmapimageservice.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,243 @@
+/*
+* 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:  ÑMnrpMapImageService class implementation
+*
+*/
+
+
+#include <e32base.h>
+#include <e32math.h>
+#include <e32property.h>
+#include <eikenv.h>
+#include <gdi.h>
+
+#include <lbsposition.h>
+
+#include <EPos_CPosLandmark.h>
+#include <epos_poslandmarkserialization.h>
+
+#include <mnmapimage.h>
+#include <mnmapimageparams.h>
+#include <mnmapimageservicebase.h>
+
+#include "debug.h"
+#include "mnrpengine.h"
+#include "mnrpappuiback.h"
+#include "mnrpappserverback.h"
+#include "mnrpmapmodel.h"
+#include "mnrpmapimageservice.h"
+
+const TInt KTextFontHeightInTwips = 100;
+const TInt KItemFontHeightInTwips = 120;
+
+const TTimeIntervalMicroSeconds32 KProcessingDelay = 200 * 1000;
+
+// ======== LOCAL FUNCTIONS ========
+
+extern void CoordinateToString( TReal aCoord, TDes& aStr );
+
+// ======== MEMBER FUNCTIONS ========
+
+// ---------------------------------------------------------------------------
+// ---------------------------------------------------------------------------
+//
+CMnrpMapImageService* CMnrpMapImageService::NewL( CMnrpEngine& aEngine )
+    {
+    CMnrpMapImageService* self = new (ELeave) CMnrpMapImageService( aEngine );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+// ---------------------------------------------------------------------------
+// ---------------------------------------------------------------------------
+//
+CMnrpMapImageService::CMnrpMapImageService( CMnrpEngine& aEngine )
+  : iEngine( aEngine )
+    {
+    }
+
+// ---------------------------------------------------------------------------
+// ---------------------------------------------------------------------------
+//
+CMnrpMapImageService::~CMnrpMapImageService()
+    {
+	if ( iProcessor )
+		{
+	    iProcessor->Cancel();
+	    delete iProcessor;
+		}
+    delete iModel;
+    DestroyFonts();
+    }
+
+// ---------------------------------------------------------------------------
+// ---------------------------------------------------------------------------
+//
+void CMnrpMapImageService::ConstructL()
+    {
+    BaseConstructL();
+
+    iEikon = CEikonEnv::Static();
+    CreateFonts();
+
+    iModel = CMnrpMapModel::NewL( iEngine );
+    iProcessor = CPeriodic::NewL( CActive::EPriorityIdle );
+    }
+
+// ---------------------------------------------------------------------------
+// ---------------------------------------------------------------------------
+//
+void CMnrpMapImageService::LeaveIfBusyL()
+    {
+    if ( iProcessor->IsActive() )
+        {
+        LOG("CMnRefProviderMapViewService::LeaveIfBusyL BUSY");
+        User::Leave( KErrInUse );
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// ---------------------------------------------------------------------------
+//
+void CMnrpMapImageService::StartProcessingL()
+    {
+    iProcessor->Start( KProcessingDelay, KProcessingDelay,
+        TCallBack( CMnrpMapImageService::MapImageProcessingCallBack, this ) );
+    }
+
+// ---------------------------------------------------------------------------
+// ---------------------------------------------------------------------------
+//
+TInt CMnrpMapImageService::MapImageProcessingCallBack( TAny* aPtr )
+    {
+    CMnrpMapImageService* self =
+        static_cast<CMnrpMapImageService*> ( aPtr );
+
+    TRAP_IGNORE( self->HandleMapImageCompletedL() );
+    return EFalse;
+    }
+
+// ---------------------------------------------------------------------------
+// ---------------------------------------------------------------------------
+//
+void CMnrpMapImageService::HandleMapImageCompletedL()
+    {
+    iProcessor->Cancel();
+    TInt err = KErrNone;
+    TRAP( err, FinishProcessingL() );
+    if ( err )
+        {
+        CompleteRequest( err );
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// ---------------------------------------------------------------------------
+//
+void CMnrpMapImageService::RenderL()
+    {
+    TMnMapImageParams& params = MapImageParams();
+
+    if ( params.Direction() != 0 ||
+         params.ImageType() != TMnMapImageParams::ETypeVectorMap )
+        {
+        User::Leave( KErrNotSupported );
+        }
+
+    CFbsBitmap& bitmap = TargetBitmap();
+
+    iModel->SetScreenSize( params.Size() );
+    iModel->UpdateModelL( *this );
+    iModel->RenderL( bitmap, TRect( params.Size() ), iTextFont, iItemFont );
+
+    // complete request
+    params.SetProjectionId(0);
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CMnrpMapImageService::CreateFonts()
+	{
+    CGraphicsDevice* screenDevice = iEikon->ScreenDevice();
+
+    const CFont* denseFont = iEikon->DenseFont();
+    TFontSpec fs = denseFont->FontSpecInTwips();
+
+    fs.iHeight = KTextFontHeightInTwips;
+    screenDevice->GetNearestFontInTwips( iTextFont, fs );
+
+    fs.iHeight = KItemFontHeightInTwips;
+    screenDevice->GetNearestFontInTwips( iItemFont, fs );
+	}
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CMnrpMapImageService::DestroyFonts()
+	{
+	CGraphicsDevice* screenDevice = iEikon->ScreenDevice();
+
+    screenDevice->ReleaseFont( iItemFont );
+    screenDevice->ReleaseFont( iTextFont );
+	}
+
+// ---------------------------------------------------------------------------
+// ---------------------------------------------------------------------------
+//
+void CMnrpMapImageService::FinishProcessingL()
+    {
+    LOG1("FinishProcessingL in, cursvc %d", iCurrentService);
+    TCoordinate coord;
+    switch ( iCurrentService )
+        {
+        case ERender:
+            {
+            RenderL();
+            }
+            break;
+
+        default:
+            User::Leave( KErrGeneral );
+        }
+
+    iCurrentService = ENone;
+    CompleteRendering();
+    LOG("FinishProcessingL out");
+    }
+
+// ---------------------------------------------------------------------------
+// From class CMnMapImageServiceBase
+// ---------------------------------------------------------------------------
+//
+void CMnrpMapImageService::HandleRenderingL()
+    {
+    LeaveIfBusyL();
+
+    iCurrentService = ERender;
+    StartProcessingL();
+    }
+
+// ---------------------------------------------------------------------------
+// From class CMnServiceBase
+// ---------------------------------------------------------------------------
+//
+void CMnrpMapImageService::DoCancel()
+    {
+    iProcessor->Cancel();
+    iCurrentService = ENone;
+    }
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mapnavproviderrefapp/src/mnrpmapmodel.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,1251 @@
+/*
+* 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:  CMnrpMapModel class implementation
+*
+*/
+
+
+
+#include <coemain.h>
+#include <barsread.h>
+#include <bautils.h>
+
+#include <aknlists.h>
+#include <AknIconUtils.h>
+#include <AknWaitDialog.h>
+
+#include <fbs.h>
+#include <imageconversion.h>
+#include <icl/imagedata.h>
+
+#include <lbs.h>
+#include <lbsposition.h>
+#include <lbspositioninfo.h>
+
+#include <EPos_CPosLandmark.h>
+#include <EPos_CPosLandmarkDatabase.h>
+#include <EPos_CPosLandmarkCategory.h>
+#include <EPos_CPosLmCategoryManager.h>
+
+#include "debug.h"
+#include "mnrpengine.h"
+#include "mnrputils.h"
+#include "mnrpappserver.h"
+
+#include "mnrpmapviewservice.h"
+#ifdef RD_MAPNAV_BITMAP_ACCESS
+#include "mnrpmapimageservice.h"
+#endif
+#include "mnrpmapmodel.h"
+
+const TInt KUpdateInterval = 1 * 1000 * 1000; // 1 sec
+const TInt KUpdateTimeout = 10 * 1000 * 1000; // 10 sec
+
+const TInt KMaxX = 180;
+const TInt KMinX = -180;
+const TInt KMapWidth = KMaxX - KMinX;
+
+const TInt KMaxY = 90;
+const TInt KMinY = -90;
+const TInt KMapHeight = KMaxY - KMinY;
+
+const TReal KDegree = 1.0;
+const TReal KMinute = KDegree / 60.0;
+const TReal KSecond = KMinute / 60.0;
+const TReal KMilliSecond = KSecond / 1000.0;
+
+const TReal KMaxCell = 60 * KDegree;
+const TReal KMinScale = 10 * KMilliSecond; // 0.01 second / 1 px
+
+const TInt KBigCellsInView = 2;
+
+const TInt KCellDividers[] = { 6, 2, 5 };
+const TInt KNumCellDividers = 3;
+
+const TReal KDefaultRadius = 1; // 1 degree
+const TReal KRadiusBorderFactor = 1.1; // 110%
+
+const TReal KEarthEquator = 40075000;
+//const TReal KEarthRadius = 6371010;
+
+const TInt KLmTextOffset = 3;
+const TInt KLmTextShadowOffset = 1;
+
+const TInt KGridPenSize( 1 );
+
+// ============================ LOCAL FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+TPoint AbsoluteToImage( TRealPoint aAbsolute, TReal aImageToAbsoluteScale )
+    {
+    TInt s = ( KMapWidth / 2 + aAbsolute.iX ) / aImageToAbsoluteScale;
+    TInt t = ( KMapHeight / 2 - aAbsolute.iY ) / aImageToAbsoluteScale;
+
+    return TPoint( s , t );
+    }
+
+// ============================ MEMBER CLASSES' FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+//  TRealPoint implementation
+// -----------------------------------------------------------------------------
+//
+
+TRealPoint::TRealPoint()
+    {
+    TRealX nan;
+    nan.SetNaN();
+
+    iX = nan;
+    iY = nan;
+    }
+
+TRealPoint::TRealPoint( TReal aX, TReal aY )
+    : iX( aX ), iY( aY )
+    {
+    }
+
+TRealPoint::TRealPoint( TCoordinate aCoordinate )
+    : iX( aCoordinate.Longitude() ), iY( aCoordinate.Latitude() )
+    {
+    }
+
+TCoordinate TRealPoint::Coordinate()
+    {
+    return TCoordinate( iY, iX );
+    }
+
+TRealPoint TRealPoint::operator+(
+    const TRealPoint& aRight )
+    {
+    return TRealPoint( this->iX + aRight.iX, this->iY + aRight.iY );
+    }
+
+TRealPoint TRealPoint::operator-(
+    const TRealPoint& aRight )
+    {
+    return TRealPoint( this->iX - aRight.iX, this->iY - aRight.iY );
+    }
+
+TRealPoint TRealPoint::operator*( const TReal& aRight )
+    {
+    return TRealPoint( this->iX * aRight, this->iY * aRight );
+    }
+
+TRealPoint TRealPoint::operator/( const TReal& aRight )
+    {
+    return TRealPoint( this->iX / aRight, this->iY / aRight );
+    }
+
+void TRealPoint::Set( TReal aX, TReal aY )
+    {
+    iX = aX;
+    iY = aY;
+    }
+
+TBool TRealPoint::IsValid()
+    {
+    return ( !Math::IsNaN( iX ) && !Math::IsNaN( iY ) );
+    }
+
+// -----------------------------------------------------------------------------
+//  CDrawItem implementation
+// -----------------------------------------------------------------------------
+//
+CMnrpMapModel::CDrawItem* CMnrpMapModel::CDrawItem::NewLC(
+    const CPosLandmark& aLm )
+    {
+    CDrawItem* self = new (ELeave) CDrawItem;
+    CleanupStack::PushL( self );
+
+    TPtrC name;
+    aLm.GetLandmarkName( name );
+    self->iText = MnrpUtils::PrintableStringLC( name );
+    CleanupStack::Pop( self->iText );
+
+    TLocality loc;
+    if ( KErrNone == aLm.GetPosition( loc ) )
+        {
+        self->SetAbsolutePosition( loc );
+        }
+
+    TPtrC iconFile;
+    TInt iconIndex, maskIndex;
+    if ( KErrNone == aLm.GetIcon( iconFile, iconIndex, maskIndex ) )
+        {
+        AknIconUtils::CreateIconL( self->iBitmap, self->iMask, iconFile, iconIndex, maskIndex );
+        AknIconUtils::PreserveIconData( self->iBitmap );
+        }
+
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+CMnrpMapModel::CDrawItem* CMnrpMapModel::CDrawItem::NewLC(
+    const CPosLandmark& aLm,
+    CPosLmCategoryManager& aCatman )
+    {
+    CDrawItem* self = NewLC( aLm );
+
+    if ( !self->iBitmap )
+        {
+        // try icon from category
+        RArray<TPosLmItemId> cats;
+        CleanupClosePushL( cats );
+        aLm.GetCategoriesL( cats );
+
+        if ( cats.Count() == 1 )
+            {
+            CPosLandmarkCategory* cat = aCatman.ReadCategoryLC( cats[0] );
+
+            TPtrC iconFile;
+            TInt iconIndex, maskIndex;
+            if ( KErrNone == cat->GetIcon( iconFile, iconIndex, maskIndex ) )
+                {
+                AknIconUtils::CreateIconL( self->iBitmap, self->iMask, iconFile, iconIndex, maskIndex );
+                AknIconUtils::PreserveIconData( self->iBitmap );
+                }
+
+            CleanupStack::PopAndDestroy( cat );
+            }
+        CleanupStack::PopAndDestroy( &cats );
+        }
+
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CMnrpMapModel::CDrawItem::SetAbsolutePosition( const TLocality& aLocality )
+    {
+    iAbsolutePosition = TRealPoint( aLocality.Longitude(), aLocality.Latitude() );
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+CMnrpMapModel::CDrawItem::~CDrawItem()
+    {
+    if ( iBitmap )
+        {
+        AknIconUtils::DestroyIconData( iBitmap );
+        }
+    delete iBitmap;
+    delete iMask;
+    delete iText;
+    }
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+CMnrpMapModel::CMnrpMapModel(
+    MMapModelObserver& aObserver,
+    CMnrpEngine& aEngine )
+    :
+    iObserver( &aObserver ), iEngine( aEngine )
+    {
+    iScale = 1;
+    iViewOrigin.Set( 0, 0 );
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+CMnrpMapModel::CMnrpMapModel( CMnrpEngine& aEngine )
+    : iEngine( aEngine )
+    {
+    iScale = 1;
+    iViewOrigin.Set( 0, 0 );
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+CMnrpMapModel::~CMnrpMapModel()
+    {
+    delete iPositionRequest;
+    iDrawItems.ResetAndDestroy();
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CMnrpMapModel* CMnrpMapModel::NewL(
+    MMapModelObserver& aObserver,
+    CMnrpEngine& aEngine )
+    {
+    CMnrpMapModel* self = new (ELeave) CMnrpMapModel( aObserver, aEngine );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CMnrpMapModel* CMnrpMapModel::NewL( CMnrpEngine& aEngine )
+    {
+    CMnrpMapModel* self = new (ELeave) CMnrpMapModel( aEngine );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CMnrpMapModel::ConstructL()
+    {
+    _LIT( KRequestorName, "MnRefProvider" );
+    iPositionRequest = CMnrpPositionRequest::NewL( KRequestorName, *this );
+
+    TPositionUpdateOptions options;
+    options.SetUpdateInterval( TTimeIntervalMicroSeconds( KUpdateInterval ) );
+    options.SetUpdateTimeOut( TTimeIntervalMicroSeconds( KUpdateTimeout ) );
+    iPositionRequest->SetOptionsL( options );
+
+    AddCitiesL();
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+TBool CMnrpMapModel::CheckDrawItemHasPositionL( CDrawItem& aItem, const CPosLandmark& aLandmark )
+	{
+    if ( !aItem.AbsolutePosition().IsValid() )
+        {
+        // try to find coordinate by address
+        CPosLandmark* poi = iEngine.AddressToCoordL( aLandmark );
+        if ( poi )
+        	{
+            TLocality pos;
+            poi->GetPosition( pos );
+            aItem.SetAbsolutePosition( pos );
+        	}
+    	delete poi;
+        }
+    
+    return aItem.AbsolutePosition().IsValid();
+	}
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CMnrpMapModel::UpdateModelL( CMnrpMapViewService& aService )
+    {
+    ASSERT( iObserver );
+
+    iDrawItems.ResetAndDestroy();
+
+    iShowCurrentLocation =
+        aService.CurrentLocationOption() != CMnMapView::ECurrentLocationDisabled;
+
+    if ( iShowCurrentLocation )
+        {
+        iPositionRequest->FetchNewPosition();
+        }
+
+    // Add client-defined marks
+    
+    iNumIgnoredLandmarks = 0;
+    TRealPoint min, max;
+
+    // add non-linked landmarks
+    for ( TInt i = 0; i < aService.LandmarksToShow().Count(); i++)
+        {
+        const CPosLandmark* lm = aService.LandmarksToShow()[i];
+        
+        CDrawItem* item = CDrawItem::NewLC( *lm );
+        if ( CheckDrawItemHasPositionL( *item, *lm ) )
+        	{
+        	iDrawItems.AppendL( item );
+            CleanupStack::Pop( item );
+            AdjustBoundingBox( *item, min, max );
+        	}
+        else
+        	{
+            CleanupStack::PopAndDestroy( item );
+            iNumIgnoredLandmarks++;
+        	}
+        }
+
+    // add linked landmarks
+    for ( TInt db = 0; db < aService.LandmarksToShowDatabases().Count(); db++ )
+        {
+        const HBufC* uri = aService.LandmarksToShowDatabases()[db];
+
+        LOG1("MnRefProvider::LinkedLandmarks: database (%S)", uri );
+
+        CPosLandmarkDatabase* lmdb = CPosLandmarkDatabase::OpenL( *uri );
+        CleanupStack::PushL( lmdb );
+
+        if ( lmdb->IsInitializingNeeded() )
+            {
+            ExecuteAndDeleteLD( lmdb->InitializeL() );
+            }
+
+        CPosLmCategoryManager* catman = CPosLmCategoryManager::NewL( *lmdb );
+        CleanupStack::PushL( catman );
+
+        for ( TInt i = 0; i < aService.LinkedLandmarksToShow(db).Count(); i++)
+            {
+            TPosLmItemId id = aService.LinkedLandmarksToShow(db)[i];
+            LOG1("MnRefProvider::LinkedLandmarks: id (%d)", id );
+
+            CPosLandmark* lm = lmdb->ReadLandmarkLC( id );
+
+            CDrawItem* item = CDrawItem::NewLC( *lm, *catman );
+            if ( CheckDrawItemHasPositionL( *item, *lm ) )
+            	{
+            	iDrawItems.AppendL( item );
+                CleanupStack::Pop( item );
+                AdjustBoundingBox( *item, min, max );
+            	}
+            else
+            	{
+                CleanupStack::PopAndDestroy( item );
+                iNumIgnoredLandmarks++;
+            	}
+
+            CleanupStack::PopAndDestroy( lm );
+            }
+
+        CleanupStack::PopAndDestroy( catman );
+        CleanupStack::PopAndDestroy( lmdb );
+        }
+
+    // Add predefined places
+    AddCitiesL();
+
+    LOG4("MnRefProvider::BoundingBox: %f, %f, %f, %f", min.iX, min.iY, max.iX, max.iY );
+
+    // set origin
+    iUseCurrentLocationAsOrigin = EFalse;
+    if ( aService.IsAreaCentralPointSet() )
+        {
+        TCoordinate center;
+        aService.GetAreaCentralPoint( center );
+        iViewOrigin.Set( center.Longitude(), center.Latitude() );
+        }
+    else if ( !Math::IsNaN( max.iX ) ) // others are also valid then
+        {
+        iViewOrigin.Set( ( max.iX + min.iX ) / 2, ( max.iY + min.iY ) / 2 );
+        }
+    else if ( iShowCurrentLocation )
+        {
+        // get current location and use it as center point
+        // this implementation defers location acquiring
+        iUseCurrentLocationAsOrigin = ETrue;
+        // FetchCurrentLocation();
+        iViewOrigin.Set( 0, 0 );
+        }
+    else
+        {
+        iViewOrigin.Set( 0, 0 );
+        }
+
+    LOG2("MnRefProvider: viewOrigin (%f, %f)", iViewOrigin.iX, iViewOrigin.iY);
+
+    // set scale
+    TReal desiredScale = 0;
+    TReal radius = 0;
+
+    if ( !Math::IsNaN( aService.AreaRadius() ) )
+        {
+         // Radius setting is easy in this implementation
+         // because map is rectangular just convert meters to degrees
+        radius = Abs( aService.AreaRadius() ) / KEarthEquator * 360;
+        LOG1("MnRefProvider: user radius (%f)", radius );
+        }
+    else if ( !Math::IsNaN( max.iX ) ) // others are also valid then
+        {
+        // get radius from bounding box
+        radius = Max( Abs( max.iX - min.iX ), Abs( max.iY - min.iY ) );
+        LOG2("MnRefProvider: bounding radius (%f), with border (%f)", radius, radius * KRadiusBorderFactor );
+        radius *= KRadiusBorderFactor;
+        }
+    else
+        {
+        // default radius
+        }
+
+    if ( radius <= 0 )
+        {
+        radius = KDefaultRadius;
+        LOG1("MnRefProvider: default radius (%f)", radius );
+        }
+
+    desiredScale = radius / TReal( Max( iScreenSize.iWidth, iScreenSize.iHeight ) );
+
+    LOG3("MnRefProvider: desired scale (%f), min (%f), max(%f)",
+        desiredScale, KMinScale, MaxScale() );
+
+    iScale = Max( Min( desiredScale, MaxScale() ), KMinScale );
+    CheckBorders();
+
+    LOG1("MnRefProvider: scale (%f)", iScale );
+
+    iObserver->HandleModelUpdateL();
+    }
+
+
+#ifdef RD_MAPNAV_BITMAP_ACCESS
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CMnrpMapModel::UpdateModelL( const CMnrpMapImageService& aService )
+    {
+    iDrawItems.ResetAndDestroy();
+
+    iShowCurrentLocation =
+        aService.ShowOptions() & CMnMapImage::EShowOptionCurrentLocation;
+
+    if ( iShowCurrentLocation )
+        {
+        iPositionRequest->FetchNewPosition();
+        }
+
+    if ( aService.ShowOptions() & CMnMapImage::EShowOptionLandmarks)
+        {
+
+        // Add user-defined marks
+        TRealPoint min, max;
+
+        // add default landmarks
+        CPosLandmarkDatabase* lmdb = CPosLandmarkDatabase::OpenL();
+        CleanupStack::PushL( lmdb );
+
+        if ( lmdb->IsInitializingNeeded() )
+            {
+            ExecuteAndDeleteLD( lmdb->InitializeL() );
+            }
+
+        CPosLmCategoryManager* catman = CPosLmCategoryManager::NewL( *lmdb );
+        CleanupStack::PushL( catman );
+
+        CPosLmItemIterator* iter = lmdb->LandmarkIteratorL();
+        CleanupStack::PushL( iter );
+
+        TInt count = iter->NumOfItemsL();
+        for ( TInt i = 0; i < count; i++)
+            {
+            TPosLmItemId id = iter->NextL();
+
+            CPosLandmark* lm = lmdb->ReadLandmarkLC( id );
+
+            CDrawItem* item = CDrawItem::NewLC( *lm, *catman );
+            if ( CheckDrawItemHasPositionL( *item, *lm ) )
+            	{
+            	iDrawItems.AppendL( item );
+                CleanupStack::Pop( item );
+                AdjustBoundingBox( *item, min, max );
+            	}
+            else
+            	{
+                CleanupStack::PopAndDestroy( item );
+            	}
+
+            CleanupStack::PopAndDestroy( lm );
+            }
+        CleanupStack::PopAndDestroy( iter );
+        CleanupStack::PopAndDestroy( catman );
+        CleanupStack::PopAndDestroy( lmdb );
+
+        LOG4("MnRefProvider::BoundingBox: %f, %f, %f, %f", min.iX, min.iY, max.iX, max.iY );
+        }
+
+    if ( aService.ShowOptions() & CMnMapImage::EShowOptionPois )
+        {
+        // Add predefined places
+        AddCitiesL();
+        }
+
+    TMnMapImageParams params = aService.MapImageParams();
+
+    UpdateModel( params );
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CMnrpMapModel::UpdateModel( const TMnMapImageParams& aParams )
+    {
+    SetScreenSize( aParams.Size() );
+
+    TCoordinate center;
+    aParams.GetCenterPoint( center );
+    iViewOrigin.Set( center.Longitude(), center.Latitude() );
+
+    LOG2("MnRefProvider: viewOrigin (%f, %f)", iViewOrigin.iX, iViewOrigin.iY);
+
+    // set scale
+    TReal desiredScale = 0;
+    TReal32 width, height;
+    aParams.GetVisibleArea( width, height );
+    TReal radius = Max( width, height );
+
+    if ( radius <= 0 )
+        {
+        radius = KDefaultRadius;
+        LOG1("MnRefProvider: default radius (%f)", radius );
+        }
+
+    desiredScale = radius / TReal( Max( iScreenSize.iWidth, iScreenSize.iHeight ) );
+
+    LOG3("MnRefProvider: desired scale (%f), min (%f), max(%f)",
+        desiredScale, KMinScale, MaxScale() );
+
+    iScale = Max( Min( desiredScale, MaxScale() ), KMinScale );
+    CheckBorders();
+
+    LOG1("MnRefProvider: scale (%f)", iScale );
+    }
+#endif
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CMnrpMapModel::AddCitiesL()
+    {
+    TArray<CPosLandmark*> places = iEngine.KnownPlacesL();
+    for ( TInt i = 0; i < places.Count(); i++)
+        {
+        CPosLandmark* lm = places[i];
+        CDrawItem* item = CDrawItem::NewLC( *lm );
+        item->iOwnPoi = ETrue;
+        iDrawItems.AppendL( item );
+        CleanupStack::Pop( item );
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CMnrpMapModel::GetGrid( CMnrpMapModel::TGrid& aGrid ) const
+    {
+    TReal angle = Min( Width(), Height() );
+
+    TReal minAngle = Min( iScreenSize.iWidth, iScreenSize.iHeight ) * KMinScale;
+
+    if ( angle > minAngle )
+        {
+        // 1. Find nice grid scale
+
+        TInt dividerIndex = 0;
+        TReal cellSize = KMaxCell;
+
+        while ( cellSize * KBigCellsInView > angle )
+            {
+            cellSize /= KCellDividers[dividerIndex];
+
+            if ( ++dividerIndex == KNumCellDividers )
+                {
+                dividerIndex = 0;
+                }
+            }
+
+        aGrid.iAbsoluteGridStep = cellSize;
+
+        // 2. Find closest grid point
+
+        TReal x = TInt( iViewOrigin.iX / cellSize ) * cellSize;
+        TReal y = TInt( iViewOrigin.iY / cellSize ) * cellSize;
+
+        aGrid.iAbsoluteReference = TRealPoint( x, y ).Coordinate();
+        }
+    else
+        {
+        aGrid.iAbsoluteReference = TCoordinate( 0, 0 );
+        aGrid.iAbsoluteGridStep = minAngle / KBigCellsInView;
+        }
+
+    // convert to screen coordinates
+    aGrid.iReference = AbsoluteToScreen( aGrid.iAbsoluteReference );
+    aGrid.iGridStep = AbsoluteToScreen( aGrid.iAbsoluteGridStep );
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CMnrpMapModel::Zoom( TReal aZoomRate )
+    {
+    iScale *= aZoomRate;
+    CheckBorders();
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CMnrpMapModel::GoCenter()
+    {
+    iViewOrigin.Set( 0, 0 );
+    CheckBorders();
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CMnrpMapModel::MoveTo( TCoordinate aTarget )
+    {
+    iViewOrigin = aTarget;
+    CheckBorders();
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CMnrpMapModel::CheckBorders()
+    {
+    if ( Height() > KMapHeight || Width() > KMapWidth )
+        {
+        iScale = MaxScale();
+        }
+    if ( iScale < KMinScale )
+        {
+        iScale = KMinScale;
+        }
+    if ( Left() < KMinX )
+        {
+        iViewOrigin.iX = KMinX + Width() / 2;
+        }
+    if ( Right() > KMaxX )
+        {
+        iViewOrigin.iX = KMaxX - Width() / 2;
+        }
+    if ( Top() > KMaxY )
+        {
+        iViewOrigin.iY = KMaxY - Height() / 2;
+        }
+    if ( Bottom() < KMinY )
+        {
+        iViewOrigin.iY = KMinY + Height() / 2;
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TReal CMnrpMapModel::Left() const
+    {
+    return iViewOrigin.iX - Width() / 2;
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TReal CMnrpMapModel::Right() const
+    {
+    return iViewOrigin.iX + Width() / 2;
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TReal CMnrpMapModel::Top() const
+    {
+    return iViewOrigin.iY + Height() / 2;
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TReal CMnrpMapModel::Bottom() const
+    {
+    return iViewOrigin.iY - Height() / 2;
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TReal CMnrpMapModel::Width() const
+    {
+    return TReal( iScreenSize.iWidth ) * iScale;
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TReal CMnrpMapModel::Height() const
+    {
+    return TReal( iScreenSize.iHeight ) * iScale;
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TCoordinate CMnrpMapModel::Center() const
+    {
+    return TCoordinate( iViewOrigin.iY, iViewOrigin.iX );
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+TArray<CMnrpMapModel::CDrawItem*> CMnrpMapModel::Items() const
+    {
+    // adjust all items to screen coordinates
+    for ( TInt i = 0; i < iDrawItems.Count(); i++ )
+        {
+        iDrawItems[i]->iScreenPosition = AbsoluteToScreen( iDrawItems[i]->iAbsolutePosition );
+        }
+    return iDrawItems.Array();
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+CMnrpMapModel::TCurrentLocation CMnrpMapModel::CurrentLocation() const
+    {
+    TCurrentLocation current;
+
+    TPosition pos;
+    iPosInfo.GetPosition( pos );
+
+    current.iAbsoluteLocation = pos;
+
+    if ( !Math::IsNaN( pos.Latitude() ) && !Math::IsNaN( pos.Longitude() ) )
+        {
+        current.iLocation = AbsoluteToScreen( current.iAbsoluteLocation );
+
+        // calculate error radius in degrees and pixels
+        if ( !Math::IsNaN( pos.HorizontalAccuracy() ) )
+            {
+            current.iAbsoluteErrorDegrees = ( pos.HorizontalAccuracy() / KEarthEquator ) * 360;
+            current.iErrorRadius = current.iAbsoluteErrorDegrees / iScale;
+            }
+        else
+            {
+            current.iErrorRadius = 0;
+            current.iAbsoluteErrorDegrees = 0;
+            }
+
+        current.iIsValid = ETrue;
+        }
+    else
+        {
+        current.iIsValid = EFalse;
+        }
+
+    return current;
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CMnrpMapModel::SetScreenSize( TSize aScreenSize )
+    {
+    __ASSERT_DEBUG( aScreenSize.iWidth >= 1 && aScreenSize.iHeight >= 1,
+                    Panic( KErrGeneral ) );
+    iScreenSize = aScreenSize;
+    CheckBorders();
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+TReal CMnrpMapModel::MaxScale() const
+    {
+    TReal scaleByWidth = KMapWidth / TReal( iScreenSize.iWidth );
+    TReal scaleByHeight = KMapHeight / TReal( iScreenSize.iHeight );
+    return Min( scaleByWidth, scaleByHeight );
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+TPoint CMnrpMapModel::AbsoluteToScreen( TRealPoint aAbsolutePoint ) const
+    {
+    TRealPoint realScreen = ( aAbsolutePoint - TRealPoint( Left(), Bottom() ) ) / iScale;
+    return TPoint( realScreen.iX, iScreenSize.iHeight - realScreen.iY );
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TPoint CMnrpMapModel::AbsoluteToScreen( TCoordinate aAbsolutePoint ) const
+    {
+    TRealPoint real( aAbsolutePoint.Longitude(), aAbsolutePoint.Latitude() );
+    return AbsoluteToScreen( real );
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+TInt CMnrpMapModel::AbsoluteToScreen( TReal aDistance ) const
+    {
+    return aDistance / iScale;
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TCoordinate CMnrpMapModel::ScreenToAbsolute( TPoint aScreenPoint ) const
+    {
+    TReal xdiff = aScreenPoint.iX * iScale;
+    TReal ydiff = aScreenPoint.iY * iScale;
+    return TCoordinate( Top() - ydiff, Left() + xdiff );
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TReal CMnrpMapModel::ScreenToAbsolute( TInt aDistance ) const
+    {
+    return aDistance * iScale;
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CMnrpMapModel::AdjustBoundingBox(
+    CMnrpMapModel::CDrawItem& aItem,
+    TRealPoint& aMin,
+    TRealPoint& aMax )
+    {
+    // X
+    if ( !Math::IsNaN( aItem.iAbsolutePosition.iX ) )
+        {
+        if ( Math::IsNaN( aMin.iX ) || aItem.iAbsolutePosition.iX < aMin.iX )
+            {
+            aMin.iX = aItem.iAbsolutePosition.iX;
+            }
+        if ( Math::IsNaN( aMax.iX ) || aItem.iAbsolutePosition.iX > aMax.iX )
+            {
+            aMax.iX = aItem.iAbsolutePosition.iX;
+            }
+        }
+
+    // Y
+    if ( !Math::IsNaN( aItem.iAbsolutePosition.iY ) )
+        {
+        if ( Math::IsNaN( aMin.iY ) || aItem.iAbsolutePosition.iY < aMin.iY )
+            {
+            aMin.iY = aItem.iAbsolutePosition.iY;
+            }
+        if ( Math::IsNaN( aMax.iY ) || aItem.iAbsolutePosition.iY > aMax.iY )
+            {
+            aMax.iY = aItem.iAbsolutePosition.iY;
+            }
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CMnrpMapModel::HandlePositionRequestCompletedL( TInt aError )
+    {
+    if ( !aError )
+        {
+        iPositionRequest->GetPosition( iPosInfo );
+        if ( iObserver )
+            {
+            iObserver->HandleModelUpdateL();
+            }
+        }
+    if ( iShowCurrentLocation )
+        {
+        iPositionRequest->FetchNewPosition();
+        }
+    }
+
+// =====================================================
+// DRAWING METHODS
+// =====================================================
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CMnrpMapModel::RenderL(
+    CFbsBitmap& aBitmap,
+    TRect aTargetRect,
+    CFont* aTextFont,
+    CFont* aItemFont ) const
+	{
+	// create an off-screen device and context
+	CFbsBitmapDevice* bitmapDevice = CFbsBitmapDevice::NewL( &aBitmap );
+	CleanupStack::PushL( bitmapDevice );
+
+	CFbsBitGc* gc = NULL;
+	User::LeaveIfError( bitmapDevice->CreateContext( gc ) );
+	CleanupStack::PushL( gc );
+
+    gc->UseFont( aTextFont );
+
+    // get data
+    TGrid grid;
+    GetGrid( grid );
+
+    TBool isBackground = EFalse;
+    // background
+    if ( !isBackground )
+        {
+        // no map background, clear map area
+        gc->Clear( aTargetRect );
+        }
+
+    gc->SetClippingRect( aTargetRect );
+    gc->SetOrigin( aTargetRect.iTl );
+
+    DrawGrid( *gc, aTargetRect.Size(), grid );
+
+    gc->DiscardFont(); // text font
+    gc->UseFont( aItemFont );
+
+    // draw items
+    DrawLandmarks( *gc, *aItemFont, aTargetRect.Size(), isBackground ); // invert shadow and text color
+    DrawCurrentLocation( *gc, aTargetRect.Size() );
+
+    // cleanup
+
+    gc->DiscardFont(); // item font
+
+	CleanupStack::PopAndDestroy( gc );
+	CleanupStack::PopAndDestroy( bitmapDevice );
+	}
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TInt CMnrpMapModel::NumIgnoredLandmarks()
+	{
+	return iNumIgnoredLandmarks;
+	}
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CMnrpMapModel::DrawGrid(
+    CFbsBitGc& aGc,
+    const TSize& aBoxSize,
+    CMnrpMapModel::TGrid& aGrid ) const
+    {
+    const TRgb KGridLineColor( 128, 128, 128 );
+
+    aGc.SetPenSize( TSize( KGridPenSize, KGridPenSize ) );
+    aGc.SetPenColor( KGridLineColor );
+
+    if ( aGrid.iGridStep > 0 )
+        {
+        // 1. Vertical lines
+        TInt x = aGrid.iReference.iX;
+        // find leftmost vertical line
+        while ( x > 0 )
+        	{
+        	x -= aGrid.iGridStep;
+        	}
+        x += aGrid.iGridStep;
+        // draw lines selecting different line colors for major and minor lines
+        while ( x < aBoxSize.iWidth )
+            {
+            DrawVerticalLine( aGc, x, aBoxSize );
+            x += aGrid.iGridStep;
+            }
+
+        // 2. Horizontal lines
+        TInt y = aGrid.iReference.iY;
+        // find topmost vertical line
+        while ( y > 0 )
+        	{
+        	y -= aGrid.iGridStep;
+        	}
+        y += aGrid.iGridStep;
+        // draw lines selecting different line colors for major and minor lines
+        while ( y < aBoxSize.iHeight )
+            {
+            DrawHorizontalLine( aGc, y, aBoxSize );
+            y += aGrid.iGridStep;
+            }
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CMnrpMapModel::DrawVerticalLine( CFbsBitGc& aGc, TInt aX, TSize aBoxSize ) const
+    {
+    aGc.DrawLine( TPoint( aX, 0 ), TPoint( aX, aBoxSize.iHeight ) );
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CMnrpMapModel::DrawHorizontalLine( CFbsBitGc& aGc, TInt aY, TSize aBoxSize ) const
+    {
+    aGc.DrawLine( TPoint( 0, aY ), TPoint( aBoxSize.iWidth, aY ) );
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CMnrpMapModel::DrawLandmarks(
+    CFbsBitGc& aGc,
+    CFont& aFont,
+    const TSize& aBoxSize,
+    TBool aSwitchColorAndShadow ) const
+    {
+    const TSize KItemMarkSize( 3, 3 ); // pixels
+    const TSize KItemIconSize( 20, 20 ); // pixels
+
+    const TRgb KPoiColor( 0, 0, 192 );
+    const TRgb KPoiTextColor( 0, 0, 0 );
+    const TRgb KPoiTextShadowColor( 224, 224, 224 );
+    const TRgb KLmColor( 255, 0, 0 );
+    const TRgb KLmTextColor( 255, 0, 0 );
+    const TRgb KLmTextShadowColor( 224, 224, 224 );
+
+    TArray<CMnrpMapModel::CDrawItem*> items = Items();
+
+    RArray<TRect> textBoxes;
+
+    for ( TInt i = 0; i < items.Count(); i++ )
+        {
+        const TPoint& pos = items[i]->Position();
+        if ( pos.iX >= 0 && pos.iX < aBoxSize.iWidth &&
+             pos.iY >= 0 && pos.iY < aBoxSize.iHeight )
+            {
+            CFbsBitmap* icon = items[i]->Bitmap();
+            CFbsBitmap* mask = items[i]->Mask();
+
+            if ( icon && mask )
+                {
+                AknIconUtils::SetSize( icon, KItemIconSize );
+
+                TRect iconBox( pos, KItemIconSize );
+                iconBox.Move( -iconBox.Width() / 2, -iconBox.Height() / 2 );
+
+                aGc.DrawBitmapMasked(
+                    iconBox,
+                    icon,
+                    KItemIconSize,
+                    mask,
+                    EFalse );
+                }
+            else
+                {
+                if ( items[i]->IsPoi() )
+                    {
+                    aGc.SetPenColor( KPoiColor );
+                    }
+                else
+                    {
+                    aGc.SetPenColor( KLmColor );
+                    }
+
+                TRect markBox( pos, KItemMarkSize );
+                markBox.Move( -markBox.Width() / 2, -markBox.Height() / 2 );
+                aGc.SetPenSize( KItemMarkSize );
+                aGc.Plot( pos );
+                }
+
+            if ( items[i]->Text().Length() )
+                {
+                TPoint textPos( pos );
+                textPos.iX += KLmTextOffset;
+
+                TSize textSize( aFont.TextWidthInPixels( items[i]->Text() ), aFont.HeightInPixels() );
+                TRect textBox( textPos, textSize );
+
+                // verify this textbox does not intersect any previous ones
+                TBool overlaps = EFalse;
+                for ( TInt b = 0; b < textBoxes.Count(); b++ )
+                    {
+                    if ( textBox.Intersects( textBoxes[b] ) )
+                        {
+                        overlaps = ETrue;
+                        break;
+                        }
+                    }
+
+                if ( !overlaps )
+                    {
+                    textBoxes.Append( textBox );
+
+                    aGc.SetPenSize( TSize( 1, 1 ) );
+
+                    TRgb textColor, textShadowColor;
+
+	                if ( items[i]->IsPoi() )
+	                    {
+	                    textColor = KPoiTextColor;
+						textShadowColor = KPoiTextShadowColor;
+	                    }
+	                else
+	                    {
+	                    textColor = KLmTextColor;
+						textShadowColor = KLmTextShadowColor;
+	                    }
+
+                    // text shadow
+                    TPoint shadowPos( textPos + TPoint( KLmTextShadowOffset, KLmTextShadowOffset ) );
+                    aGc.SetPenColor( aSwitchColorAndShadow ? textColor : textShadowColor );
+                    aGc.DrawText( items[i]->Text(), shadowPos );
+
+                    // text itself
+                    aGc.SetPenColor( aSwitchColorAndShadow ? textShadowColor : textColor );
+                    aGc.DrawText( items[i]->Text(), textPos );
+                    }
+                }
+            }
+        }
+    textBoxes.Close();
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CMnrpMapModel::DrawCurrentLocation(
+    CFbsBitGc& aGc,
+    const TSize& aBoxSize ) const
+    {
+    const TSize KPositionPenSize( 20, 20 );
+    const TSize KPositionErrorPenSize( 1, 1 );
+    const TRgb KPositionColor( 255, 255, 0 );
+
+    // draw current location
+    CMnrpMapModel::TCurrentLocation location = CurrentLocation();
+
+    if ( location.iIsValid )
+        {
+        TPoint& pos = location.iLocation;
+
+        if ( pos.iX >= 0 && pos.iX < aBoxSize.iWidth &&
+             pos.iY >= 0 && pos.iY < aBoxSize.iHeight )
+            {
+            if ( location.iErrorRadius )
+                {
+                TRect circleBox( pos.iX, pos.iY, pos.iX, pos.iY );
+                circleBox.Grow( location.iErrorRadius, location.iErrorRadius );
+
+                aGc.SetPenSize( KPositionErrorPenSize );
+                aGc.SetBrushStyle( CGraphicsContext::EVerticalHatchBrush );
+                aGc.SetBrushColor( KPositionColor );
+                aGc.DrawEllipse( circleBox );
+                }
+
+            aGc.SetPenColor( KPositionColor );
+            aGc.SetPenSize( KPositionPenSize );
+            aGc.Plot( pos );
+            }
+        }
+    }
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mapnavproviderrefapp/src/mnrpmapview.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,249 @@
+/*
+* 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:  CMnrpMapView class implementation
+*
+*/
+
+
+#include <e32base.h>
+#include <lbsposition.h>
+
+#include <eikmenup.h>
+#include <eikbtgpc.h>
+#include <avkon.rsg>
+
+#include <mnrefprovider.rsg>
+#include "mnrp.hrh"
+
+#include "debug.h"
+
+#include "mnrputils.h"
+#include "mnrpengine.h"
+
+#include "mnrpappui.h"
+#include "mnrpmapview.h"
+#include "mnrpmapcontrol.h"
+#include "mnrpmapviewservice.h"
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+CMnrpMapView::CMnrpMapView( CMnrpEngine& aEngine ) 
+: iEngine( aEngine )
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+CMnrpMapView::~CMnrpMapView()
+    {
+    TRAP_IGNORE( HandleUserSelectionL( KErrCancel ) );
+    delete iControl;
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+CMnrpMapView* CMnrpMapView::NewL( TBool aChained, CMnrpEngine& aEngine )
+    {
+    CMnrpMapView* self = new (ELeave) CMnrpMapView( aEngine );
+    CleanupStack::PushL( self );
+    self->ConstructL( aChained );
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CMnrpMapView::ConstructL( TBool aChained )
+    {
+    iChained = aChained;
+    if ( aChained )
+        {
+        BaseConstructL( R_MNREFPROVIDER_MAP_VIEW_CHAINED );
+        }
+    else
+        {
+        BaseConstructL( R_MNREFPROVIDER_MAP_VIEW );
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CMnrpMapView::SetMapModeL( CMnrpMapViewService& aService )
+    {
+    iSelectionCallback = NULL;
+    iMapViewService = &aService;
+/*
+    if ( iChained )
+        {
+        Cba()->SetCommandSetL( R_AVKON_SOFTKEYS_OPTIONS_BACK );
+        }
+    else
+        {
+        Cba()->SetCommandSetL( R_AVKON_SOFTKEYS_OPTIONS_EXIT );
+        }
+*/        
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CMnrpMapView::SetSelectionModeL( 
+    CMnrpMapViewService& aService,  
+    MMapSelectionCallback& aCallback )
+    {
+    iMapViewService = &aService;
+    iSelectionCallback = &aCallback;
+    Cba()->SetCommandSetL( R_AVKON_SOFTKEYS_OPTIONS_CANCEL );
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CMnrpMapView::StopSelection()
+    {
+    iSelectionCallback = NULL;
+    iMapViewService = NULL;
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CMnrpMapView::HandleUserSelectionL( TInt aError )
+    {
+    if ( iSelectionCallback && iControl )
+        {
+        if ( !aError )
+            {
+            iSelectionCallback->HandleSelectionL( iControl->CurrentLocation() );
+            }
+        else
+            {
+            iSelectionCallback->HandleSelectionErrorL( aError );
+            }
+        iSelectionCallback = NULL;            
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+TUid CMnrpMapView::Id() const
+    {
+    return TUid::Uid( EMnrpMapViewId );
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CMnrpMapView::HandleCommandL( TInt aCommand )
+    {
+    switch ( aCommand )
+        {
+        case EMnrpCommandFullScreen:
+            if ( iControl ) 
+                {
+                iControl->ToggleFullScreen();
+                }
+            break;
+
+        case EMnrpCommandSelect:
+            HandleUserSelectionL( KErrNone );
+            break;
+
+        case EEikCmdExit:
+        case EAknSoftkeyBack:
+        case EAknSoftkeyExit:
+            HandleUserSelectionL( KErrCancel );
+            AppUi()->HandleCommandL( aCommand );
+            break;
+
+        default:
+            AppUi()->HandleCommandL( aCommand );
+            break;
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CMnrpMapView::DynInitMenuPaneL( TInt aResourceId, CEikMenuPane *aMenuPane )
+    {
+    if ( aResourceId == R_MNREFPROVIDER_MAP_VIEW_MENU )
+        {
+        TBool isSelectionMode = iSelectionCallback != NULL;
+        aMenuPane->SetItemDimmed( EMnrpCommandSelect, !isSelectionMode );
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CMnrpMapView::DoActivateL(
+    const TVwsViewId& /*aPrevViewId*/,
+    TUid /* aCustomMessageId */,
+    const TDesC8& /* aCustomMessage */)
+    {
+    if ( !iControl )
+        {
+        iControl = CMnrpMapControl::NewL( *this, ClientRect(), iEngine );
+        iControl->SetMopParent( this );
+        }
+
+    iControl->SetRect( ClientRect() );
+    if ( iMapViewService )
+        {
+        iControl->UpdateModelL( *iMapViewService );
+        }
+    iControl->SetSelectionModeL( ( iSelectionCallback == NULL ) ? EFalse : ETrue );
+
+    // Enable receiving of keyboard events.
+    CMnrpAppUi* ui = ( CMnrpAppUi* ) AppUi();
+    ui->AddToStackL( *this, iControl );
+
+    if ( iSelectionCallback )
+        {
+        ui->SetNaviPaneTitleL( iMapViewService->SelectionRequestText() );
+        }
+    else
+        {
+        _LIT( KMapView, "MapView" );
+	    ui->SetNaviPaneTitleL( KMapView );
+        }
+
+    // Make view visible.
+    iControl->MakeVisible( ETrue );
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CMnrpMapView::DoDeactivate()
+    {
+    if ( iControl )
+        {
+        // Hide view.
+        iControl->MakeVisible( EFalse );
+
+        // Disable receiving keyboard events.
+        AppUi()->RemoveFromStack( iControl );
+        }
+    }
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mapnavproviderrefapp/src/mnrpmapviewservice.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,245 @@
+/*
+* 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:  CMnrpMapViewService class implementation
+*
+*/
+
+
+#include <e32base.h>
+#include <eikenv.h>
+
+#include <lbsposition.h>
+
+#include <EPos_CPosLandmark.h>
+#include <EPos_CPosLandmarkDatabase.h>
+
+#include "debug.h"
+#include <mnmapviewservicebase.h>
+
+#include "mnrpappui.h"
+#include "mnrpmapview.h"
+#include "mnrpengine.h"
+#include "mnrpdocument.h"
+#include "mnrpappserver.h"
+
+#include "mnrpmapviewservice.h"
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// ---------------------------------------------------------------------------
+// ---------------------------------------------------------------------------
+//
+CMnrpMapViewService* CMnrpMapViewService::NewL()
+    {
+    CMnrpMapViewService* self = new (ELeave) CMnrpMapViewService();
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+// ---------------------------------------------------------------------------
+// ---------------------------------------------------------------------------
+//
+CMnrpMapViewService::CMnrpMapViewService()
+    {
+    }
+
+// ---------------------------------------------------------------------------
+// ---------------------------------------------------------------------------
+//
+CMnrpMapViewService::~CMnrpMapViewService()
+    {
+    if ( iSelecting )
+        {
+        DoCancel();
+        CompleteRequest( KErrCancel );
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// ---------------------------------------------------------------------------
+//
+void CMnrpMapViewService::ConstructL()
+    {
+    BaseConstructL();
+    }
+
+// ---------------------------------------------------------------------------
+// ---------------------------------------------------------------------------
+//
+CMnrpAppUi* CMnrpMapViewService::AppUi()
+    {
+    CMnrpAppServer* server = ( CMnrpAppServer* ) Server();
+    if ( server )
+        {
+        return server->AppUi();
+        }
+    return NULL;
+    }
+
+// ---------------------------------------------------------------------------
+// From class CMnMapViewServiceBase
+// ---------------------------------------------------------------------------
+//
+void CMnrpMapViewService::HandleShowMapL()
+    {
+    LOG("MnRefProvider::HandleShowMapL in");
+
+    /** This implementation cannot show map if selection is active */
+    if ( iSelecting )
+        {
+        User::Leave( KErrInUse );
+        }
+
+    if ( AppUi() )
+        {
+        AppUi()->ShowMapL( *this );
+        }
+
+    LOG("MnRefProvider::HandleShowMapL out");
+    }
+
+// ---------------------------------------------------------------------------
+//  From class CMnMapViewServiceBase
+//
+//  This callback differs from HandleShowMapL in a way that central point
+//  setting is ignored and current location is used instead as central point.
+//
+//  The implementation is the example of how to reject unsupported requests 
+// ---------------------------------------------------------------------------
+//
+void CMnrpMapViewService::HandleShowCurrentLocationL()
+    {
+    User::Leave( KErrNotSupported );
+    }
+
+// ---------------------------------------------------------------------------
+//  From class CMnMapViewServiceBase
+// ---------------------------------------------------------------------------
+//
+void CMnrpMapViewService::HandleSelectFromMapL()
+    {
+    LOG("MnRefProvider::HandleSelectFromMapL in");
+
+    /** Only one selection must be active */
+    if ( iSelecting )
+        {
+        User::Leave( KErrInUse );
+        }
+
+    if ( AppUi() )
+        {
+        iSelecting = ETrue;
+        AppUi()->StartSelectionL( *this, *this );
+        }
+
+    LOG("MnRefProvider::HandleSelectFromMapL out");
+    }
+
+// ---------------------------------------------------------------------------
+//  From class CMnServiceBase
+// ---------------------------------------------------------------------------
+//
+void CMnrpMapViewService::DoCancel()
+    {
+    if ( iSelecting )
+        {
+        iSelecting = EFalse;
+        StopSelection();
+        }
+    }
+
+// ---------------------------------------------------------------------------
+//  From class MMapSelectionCallback
+// ---------------------------------------------------------------------------
+//
+void CMnrpMapViewService::HandleSelectionErrorL( TInt aError )
+    {
+    __ASSERT_DEBUG( iSelecting, Panic( KErrGeneral ) );
+
+    iSelecting = EFalse;
+    // selection view dismissed
+    CompleteRequest( aError );
+    }
+
+// ---------------------------------------------------------------------------
+//  From class MMapSelectionCallback
+// ---------------------------------------------------------------------------
+//
+void CMnrpMapViewService::HandleSelectionL( const TCoordinate& aSelection )
+    {
+    __ASSERT_DEBUG( iSelecting, Panic( KErrGeneral ) );
+
+    iSelecting = EFalse;
+    TInt err = KErrNone;
+    TRAP( err, CompleteSelectionL( aSelection ) );
+    if ( err )
+        {
+        CompleteRequest( err );
+        }
+    StopSelection();
+    }
+
+// ---------------------------------------------------------------------------
+// ---------------------------------------------------------------------------
+//
+void CMnrpMapViewService::CompleteSelectionL( const TCoordinate& aSelection )
+    {
+    TLocality loc( aSelection, 0 );
+    CPosLandmark* lm = CPosLandmark::NewLC();
+    lm->SetPositionL( loc );
+
+    // send landmark to client
+    CompleteSelectionRequestL( *lm );
+
+    CleanupStack::PopAndDestroy( lm );
+    }
+
+// ---------------------------------------------------------------------------
+// ---------------------------------------------------------------------------
+//
+void CMnrpMapViewService::StopSelection()
+    {
+    if ( AppUi() )
+        {
+        AppUi()->StopSelection();
+        }
+    }
+    
+// ---------------------------------------------------------------------------
+//  From class MMapSelectionCallback
+// ---------------------------------------------------------------------------
+//
+void CMnrpMapViewService::HandleSelectionL( TInt aLandmarkIndex )
+    {
+    __ASSERT_DEBUG( iSelecting, Panic( KErrGeneral ) );
+
+    iSelecting = EFalse;
+    CompleteSelectionRequest( aLandmarkIndex );
+    StopSelection();
+    }
+    
+// ---------------------------------------------------------------------------
+//  From class MMapSelectionCallback
+// ---------------------------------------------------------------------------
+//
+void CMnrpMapViewService::HandleSelectionL( TPosLmItemId aLandmarkId, TInt aDbIndex )
+    {
+    __ASSERT_DEBUG( iSelecting, Panic( KErrGeneral ) );
+
+    iSelecting = EFalse;
+    CompleteSelectionRequest( aLandmarkId, aDbIndex );
+    StopSelection();
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mapnavproviderrefapp/src/mnrpnavicontrol.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,209 @@
+/*
+* 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:  CMnrpNaviControl class implementation
+*
+*/
+
+
+#include <e32base.h>
+#include <coemain.h>
+#include <aknlists.h>
+#include <barsread.h>
+
+#include <aknlists.h>
+
+#include "mnrpnavimodel.h"
+#include "mnrpnaviview.h"
+#include "mnrpnavicontrol.h"
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+CMnrpNaviControl::CMnrpNaviControl( CMnrpNaviView& aView )
+ :  iView( aView )
+    { 
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+CMnrpNaviControl::~CMnrpNaviControl()
+    {
+    delete iListBox;
+    delete iModel;
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+CMnrpNaviControl* CMnrpNaviControl::NewL( 
+    CMnrpNaviView& aView, 
+    const TRect& aRect,
+    CMnrpEngine& aEngine )
+    {
+    CMnrpNaviControl* self = new (ELeave) CMnrpNaviControl( aView );
+    CleanupStack::PushL( self );
+    self->ConstructL( aRect, aEngine );
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CMnrpNaviControl::ConstructL( const TRect& aRect, CMnrpEngine& aEngine )
+    {
+    // Create a window for this application view
+    CreateWindowL();
+    CreateListBoxL();
+    
+    // Set the windows size
+    SetRect( aRect );
+    
+    iModel = CMnrpNaviModel::NewL( *this, aEngine );
+
+    // Activate the window, which makes it ready to be drawn
+    ActivateL();
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CMnrpNaviControl::UpdateModelL( CPosLandmark& aDestination )
+    {
+    iModel->SetDestinationL( aDestination );
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CMnrpNaviControl::HandleModelUpdateL()
+    {
+    TArray< CMnrpNaviModel::CListItem* > items = iModel->ListItemsL();
+    
+    const TInt KGranularity = 8;
+    CDesCArraySeg* array = new (ELeave) CDesCArraySeg( KGranularity );
+    CleanupStack::PushL( array );
+    
+    _LIT( KItemFormat, "%S\t%S\t\t" );
+    for ( TInt i = 0; i < items.Count(); i++ )
+        {
+        CMnrpNaviModel::CListItem* item = items[i];
+
+        const TInt KNumTabsAndOther = 10;
+        HBufC* text = HBufC::NewLC(
+            item->Header().Length() + item->Value().Length() + KNumTabsAndOther);
+
+        text->Des().Format( KItemFormat, &(item->Header()), &(item->Value()) );
+        
+        array->AppendL( *text );
+        CleanupStack::PopAndDestroy( text );
+        }
+        
+    CleanupStack::Pop( array );
+
+    CTextListBoxModel* model = iListBox->Model();
+    model->SetItemTextArray( array );
+    model->SetOwnershipType( ELbmOwnsItemArray );
+    iListBox->HandleItemAdditionL();
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+TInt CMnrpNaviControl::CountComponentControls() const 
+    { 
+    return 1; 
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+CCoeControl* CMnrpNaviControl::ComponentControl(TInt aIndex) const
+    {
+    return (aIndex == 0) ? iListBox : NULL;
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+TKeyResponse CMnrpNaviControl::OfferKeyEventL(
+    const TKeyEvent& aKeyEvent, TEventCode aType)
+    {
+    TKeyResponse response = EKeyWasNotConsumed;
+
+    switch (aKeyEvent.iCode)
+        {
+        case EKeyUpArrow:
+        case EKeyDownArrow:
+            // Scrolling the listbox. Forward to iListBox.
+            response = iListBox->OfferKeyEventL(aKeyEvent, aType);
+            break;
+
+        case EKeyLeftArrow:
+        case EKeyRightArrow:
+            // Eat these to disable switching views
+            response = EKeyWasConsumed;
+            break;
+
+        case EKeyDevice3:
+            response = EKeyWasConsumed;
+            break;
+
+        default:
+            // menu keys should be handled
+            break;
+        }
+
+    return response;
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CMnrpNaviControl::CreateListBoxL()
+    {
+    // Create a control to display a list of descriptors
+    iListBox = new (ELeave) CAknSingleHeadingStyleListBox();
+    iListBox->SetContainerWindowL( *this );
+    iListBox->ConstructL(this, CEikListBox::EViewerFlag );
+
+    // Create scrollbars
+    CEikScrollBarFrame* scrollBar = iListBox->CreateScrollBarFrameL();
+    scrollBar->SetScrollBarVisibilityL(
+                CEikScrollBarFrame::EOff, CEikScrollBarFrame::EAuto);
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CMnrpNaviControl::SizeChanged()
+    {
+    iListBox->SetRect( Rect() );
+    iListBox->DrawDeferred();
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CMnrpNaviControl::HandleResourceChange( TInt aType )
+    {
+    CCoeControl::HandleResourceChange( aType );
+    if ( aType == KEikDynamicLayoutVariantSwitch )
+        {
+        SetRect( iView.ClientRect() );
+        }
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mapnavproviderrefapp/src/mnrpnavigationservice.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,90 @@
+/*
+* 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:  CMnrpNavigationService class implementation
+*
+*/
+
+
+#include <e32base.h>
+#include <eikenv.h>
+
+#include <lbsposition.h>
+
+#include <EPos_CPosLandmark.h>
+
+#include "debug.h"
+#include <mnnavigationservicebase.h>
+
+#include "mnrpappui.h"
+#include "mnrpnavimodel.h"
+#include "mnrpnaviview.h"
+#include "mnrpappserver.h"
+#include "mnrpnavigationservice.h"
+
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// ---------------------------------------------------------------------------
+// ---------------------------------------------------------------------------
+//
+CMnrpNavigationService* CMnrpNavigationService::NewL()
+    {
+    CMnrpNavigationService* self = new (ELeave) CMnrpNavigationService();
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop( self );
+    return self;
+    }
+    
+// ---------------------------------------------------------------------------
+// ---------------------------------------------------------------------------
+//
+CMnrpNavigationService::CMnrpNavigationService()
+    {
+    }
+    
+// ---------------------------------------------------------------------------
+// ---------------------------------------------------------------------------
+//
+CMnrpNavigationService::~CMnrpNavigationService()
+    {
+    }
+
+// ---------------------------------------------------------------------------
+// ---------------------------------------------------------------------------
+//
+void CMnrpNavigationService::ConstructL()
+    {
+    BaseConstructL();
+    }
+
+// ---------------------------------------------------------------------------
+// From class CMnNavigationServiceBase
+// ---------------------------------------------------------------------------
+//
+void CMnrpNavigationService::HandleNavigateToL(
+    const CPosLandmark& aLandmark)
+    {
+    CMnrpAppServer* server = ( CMnrpAppServer* ) Server();
+    CMnrpAppUi* ui = server->AppUi();
+    ui->ShowNavigationL( aLandmark );
+    }
+        
+// ---------------------------------------------------------------------------
+// From class CMnServiceBase
+// ---------------------------------------------------------------------------
+//
+void CMnrpNavigationService::DoCancel()
+    {
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mapnavproviderrefapp/src/mnrpnavimodel.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,241 @@
+/*
+* 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:  CMnrpNaviModel class implementation
+*
+*/
+
+
+#include <coemain.h>
+#include <aknlists.h>
+#include <barsread.h>
+
+#include <lbs.h>
+#include <lbsposition.h>
+#include <lbspositioninfo.h>
+
+#include <EPos_CPosLandmark.h>
+
+#include "mnrputils.h"
+#include "mnrpengine.h"
+#include "mnrpnavimodel.h"
+
+const TInt KUpdateInterval = 1 * 1000 * 1000; // 1 sec
+const TInt KUpdateTimeout = 10 * 1000 * 1000; // 10 sec
+
+_LIT( KNotDefined, "<n/a>" );
+_LIT( KDestination, "destination" );
+_LIT( KPosition, "position" );
+_LIT( KDistance, "distance" );
+_LIT( KBearing, "bearing" );
+_LIT( KDestinationLat, "dest.lat." );
+_LIT( KDestinationLon, "dest.lon." );
+_LIT( KPositionLat, "pos.lat." );
+_LIT( KPositionLon, "pos.lon." );
+_LIT( KSpeed, "speed" );
+_LIT( KHeading, "heading" );
+_LIT( KMagHeading, "m.heading" );
+_LIT( KCourse, "course" );
+_LIT( KMagCourse, "m.course" );
+
+// ========================== MEMBER CLASS' FUNCTIONS ==========================
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+CMnrpNaviModel::CListItem* CMnrpNaviModel::CListItem::NewL( 
+    const TDesC& aItemHeader, 
+    const TDesC& aItemValue )
+    {
+    CListItem* self = new (ELeave) CListItem;
+    CleanupStack::PushL( self );
+    self->iHeader = aItemHeader.AllocL();
+    self->iValue = aItemValue.AllocL();
+    CleanupStack::Pop( self );
+    return self;
+    }
+    
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+CMnrpNaviModel::CListItem::~CListItem()
+    {
+    delete iHeader;
+    delete iValue;
+    }
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+CMnrpNaviModel::CMnrpNaviModel( MNaviModelObserver& aObserver, CMnrpEngine& aEngine )
+    : iEngine( aEngine ), iObserver( aObserver )
+    { 
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+CMnrpNaviModel::~CMnrpNaviModel()
+    {
+    delete iPositionRequest;
+    delete iDestination;
+    iListItems.ResetAndDestroy();
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+CMnrpNaviModel* CMnrpNaviModel::NewL( MNaviModelObserver& aObserver, CMnrpEngine& aEngine  )
+    {
+    CMnrpNaviModel* self = new (ELeave) CMnrpNaviModel( aObserver, aEngine );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CMnrpNaviModel::ConstructL()
+    {
+    _LIT( KRequestorName, "MnRefProvider" );
+    iPositionRequest = CMnrpPositionRequest::NewL( KRequestorName, *this );
+    
+    TPositionUpdateOptions options;
+    options.SetUpdateInterval( TTimeIntervalMicroSeconds( KUpdateInterval ) );
+    options.SetUpdateTimeOut( TTimeIntervalMicroSeconds( KUpdateTimeout ) );
+    iPositionRequest->SetOptionsL( options );
+    
+    iPositionRequest->FetchNewPosition();
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CMnrpNaviModel::SetDestinationL( const CPosLandmark& aNewDestination )
+    {
+    delete iDestination;
+    iDestination = NULL;
+    iDestination = CPosLandmark::NewL( aNewDestination );
+    
+    iObserver.HandleModelUpdateL();
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+TArray<CMnrpNaviModel::CListItem*> CMnrpNaviModel::ListItemsL()
+    {
+    iListItems.ResetAndDestroy();
+    
+    TBuf<64> buf;
+    TPosition position;
+    TLocality destination;
+
+    iPosInfo.GetPosition( position );
+
+    if ( !iDestination || iDestination->GetPosition( destination ) )
+        {
+        iListItems.AppendL( CListItem::NewL( KDestination, KNotDefined ) );
+        }
+    else
+        {
+        TPtrC name;
+        iDestination->GetLandmarkName( name );
+        HBufC* printableName = MnrpUtils::PrintableStringLC( name );
+        iListItems.AppendL( CListItem::NewL( KDestination, *printableName ) );
+        CleanupStack::PopAndDestroy( printableName );
+
+        TBool validPosition = ( !Math::IsNaN( position.Latitude() ) && 
+                                !Math::IsNaN( position.Longitude() ) );
+
+        if ( validPosition )
+            {
+            TReal32 distance, bearing;
+            if ( position.Distance( destination, distance ) == KErrNone )
+                {
+                MnrpUtils::DistanceToString( distance, buf );
+                iListItems.AppendL( CListItem::NewL( KDistance, buf ) );
+                }
+            else
+                {
+                iListItems.AppendL( CListItem::NewL( KDistance, KNotDefined ) );
+                }
+                
+            if ( position.BearingTo( destination, bearing ) == KErrNone )
+                {
+                MnrpUtils::AngleToString( bearing, buf );
+                iListItems.AppendL( CListItem::NewL( KBearing, buf ) );
+                }
+            else
+                {
+                iListItems.AppendL( CListItem::NewL( KBearing, KNotDefined ) );
+                }
+
+            MnrpUtils::SpeedToString( iPositionRequest->Speed(), buf );
+            iListItems.AppendL( CListItem::NewL( KSpeed, buf ) );
+
+            MnrpUtils::AngleToString( iPositionRequest->Course(), buf );
+            iListItems.AppendL( CListItem::NewL( KCourse, buf ) );
+
+            MnrpUtils::AngleToString( iPositionRequest->Heading(), buf );
+            iListItems.AppendL( CListItem::NewL( KHeading, buf ) );
+
+            MnrpUtils::CoordinateToString( position.Latitude(), buf, ETrue, ETrue );
+            iListItems.AppendL( CListItem::NewL( KPositionLat, buf ) );
+
+            MnrpUtils::CoordinateToString( position.Longitude(), buf, ETrue, ETrue );
+            iListItems.AppendL( CListItem::NewL( KPositionLon, buf ) );
+            }
+        else
+            {
+            iListItems.AppendL( CListItem::NewL( KPosition, KNotDefined ) );
+            }
+
+        MnrpUtils::CoordinateToString( destination.Latitude(), buf, ETrue, ETrue );
+        iListItems.AppendL( CListItem::NewL( KDestinationLat, buf ) );
+
+        MnrpUtils::CoordinateToString( destination.Longitude(), buf, ETrue, ETrue );
+        iListItems.AppendL( CListItem::NewL( KDestinationLon, buf ) );
+
+        if ( validPosition )
+            {
+            MnrpUtils::AngleToString( iPositionRequest->MagneticCourse(), buf );
+            iListItems.AppendL( CListItem::NewL( KMagCourse, buf ) );
+
+            MnrpUtils::AngleToString( iPositionRequest->MagneticHeading(), buf );
+            iListItems.AppendL( CListItem::NewL( KMagHeading, buf ) );
+            }
+        }
+   
+    return iListItems.Array();
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CMnrpNaviModel::HandlePositionRequestCompletedL( TInt aError )
+    {
+    if ( !aError )
+        {
+        iPositionRequest->GetPosition( iPosInfo );
+        TPosition position;
+        iPosInfo.GetPosition( position );
+
+        iObserver.HandleModelUpdateL();
+        }
+    iPositionRequest->FetchNewPosition();
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mapnavproviderrefapp/src/mnrpnaviview.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,160 @@
+/*
+* 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:  CMnrpNaviView class implementation
+*
+*/
+
+
+#include <e32base.h>
+#include <lbsposition.h>
+#include <EPos_CPosLandmark.h>
+
+#include <mnrefprovider.rsg>
+#include "mnrp.hrh"
+
+#include "debug.h"
+#include "mnrputils.h"
+#include "mnrpengine.h"
+
+#include "mnrpappui.h"
+#include "mnrpnavicontrol.h"
+
+#include "mnrpnaviview.h"
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+CMnrpNaviView::CMnrpNaviView( CMnrpEngine& aEngine )
+ : iEngine( aEngine )
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+CMnrpNaviView::~CMnrpNaviView()
+    {
+    delete iDestination;
+    delete iControl;
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+CMnrpNaviView* CMnrpNaviView::NewL( TBool aChained, CMnrpEngine& aEngine )
+    {
+    CMnrpNaviView* self = new (ELeave) CMnrpNaviView( aEngine );
+    CleanupStack::PushL( self );
+    self->ConstructL( aChained );
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CMnrpNaviView::ConstructL( TBool aChained )
+    {
+    if ( aChained )
+        {
+        BaseConstructL( R_MNREFPROVIDER_NAVI_VIEW_CHAINED );
+        }
+    else
+        {
+        BaseConstructL( R_MNREFPROVIDER_NAVI_VIEW );
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CMnrpNaviView::SetDestinationL( const CPosLandmark& aNewDestination )
+    {
+    delete iDestination;
+    iDestination = NULL;
+    iDestination = CPosLandmark::NewL( aNewDestination );
+    if ( iControl )
+        {
+        iControl->UpdateModelL( *iDestination );
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+TUid CMnrpNaviView::Id() const
+    {
+    return TUid::Uid( EMnrpNavigationViewId );
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CMnrpNaviView::HandleCommandL( TInt aCommand )
+    {
+    switch ( aCommand )
+        {
+        default:
+            AppUi()->HandleCommandL( aCommand );
+            break;
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CMnrpNaviView::DoActivateL(
+    const TVwsViewId& /*aPrevViewId*/,
+    TUid /* aCustomMessageId */,
+    const TDesC8& /* aCustomMessage */)
+    {
+    if ( !iControl )
+        {
+        iControl = CMnrpNaviControl::NewL( *this, ClientRect(), iEngine );
+        iControl->SetMopParent( this );
+        }
+
+    if ( iDestination )
+        {
+        iControl->UpdateModelL( *iDestination );
+        }
+
+    // Enable receiving of keyboard events.
+    CMnrpAppUi* ui = ( CMnrpAppUi* ) AppUi();
+    ui->AddToStackL( *this, iControl );
+
+    _LIT( KNavigation, "Navigation" );
+    ui->SetNaviPaneTitleL( KNavigation );
+
+    // Make view visible.
+    iControl->MakeVisible( ETrue );
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CMnrpNaviView::DoDeactivate()
+    {
+    if ( iControl )
+        {
+        // Hide view.
+        iControl->MakeVisible( EFalse );
+
+        // Disable receiving keyboard events.
+        AppUi()->RemoveFromStack( iControl );
+        }
+    }
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mapnavproviderrefapp/src/mnrppositionrequest.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,272 @@
+/*
+* 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:  CMnrpPositionRequest class implementation
+*
+*/
+
+
+#include <AknWaitDialog.h>
+#include <coemain.h>
+#include <aknnotewrappers.h>
+
+#include <lbspositioninfo.h>
+
+#include "mnrppositionrequest.h"
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+CMnrpPositionRequest::CMnrpPositionRequest(
+    MMnrpPositionObserver& aObserver )
+    : 
+    CActive( CActive::EPriorityStandard ), 
+    iObserver( aObserver ),
+    iState( EIdle )
+    {
+    TRealX nan;
+    nan.SetNaN();
+    iSpeed = iHeading = iCourse = iMagneticHeading = iMagneticCourse = nan;
+    
+    CActiveScheduler::Add( this );
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CMnrpPositionRequest::ConstructL( const TDesC& aRequestorName )
+    {
+    const TInt KBufSize = 8192;
+    iGenericPosition = HPositionGenericInfo::NewL( KBufSize );
+    
+    // Connect to the location server
+    User::LeaveIfError( iLocationServer.Connect() );
+
+    // Open the default positioner
+    User::LeaveIfError( iPositioner.Open( iLocationServer ) );
+
+    // Set this application as location requestor
+    User::LeaveIfError( iPositioner.SetRequestor(
+        CRequestor::ERequestorService,
+        CRequestor::EFormatApplication,
+        aRequestorName ) );
+
+    // Set default options
+    TPositionUpdateOptions updateOptions;
+
+    const TInt K30Seconds = 30000000;
+    TTimeIntervalMicroSeconds timeOut( K30Seconds );
+
+    updateOptions.SetUpdateTimeOut( timeOut );
+    SetOptionsL( updateOptions );
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CMnrpPositionRequest* CMnrpPositionRequest::NewL(
+    const TDesC& aAppName, 
+    MMnrpPositionObserver& aObserver )
+    {
+    CMnrpPositionRequest* self =
+        new (ELeave) CMnrpPositionRequest( aObserver );
+    CleanupStack::PushL( self );
+    self->ConstructL( aAppName );
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CMnrpPositionRequest::~CMnrpPositionRequest()
+    {
+    Cancel();
+    iPositioner.Close();
+    iLocationServer.Close();
+    delete iGenericPosition;
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CMnrpPositionRequest::FetchNewPosition( TBool aLastKnownLocationAllowed )
+    {
+    Cancel();
+    // Request location
+    iState = EAcquiringDefaultLocation;
+    iLastKnownLocationAllowed = aLastKnownLocationAllowed;
+    ExecuteNextStep();
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CMnrpPositionRequest::GetPosition( TPositionInfo& aPositionInfo )
+    {
+    aPositionInfo = iPositionInfo;
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TReal32 CMnrpPositionRequest::Speed() 
+    { 
+    return iSpeed;
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TReal32 CMnrpPositionRequest::Heading() 
+    { 
+    return iHeading; 
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TReal32 CMnrpPositionRequest::MagneticHeading() 
+    { 
+    return iMagneticHeading; 
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TReal32 CMnrpPositionRequest::Course() 
+    {
+    return iCourse;
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TReal32 CMnrpPositionRequest::MagneticCourse()
+    { 
+    return iMagneticCourse;
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CMnrpPositionRequest::DoCancel()
+    {
+    // Cancel location request
+    if (iState == EAcquiringDefaultLocation)
+        {
+        iPositioner.CancelRequest( EPositionerNotifyPositionUpdate );
+        }
+    else if (iState == EAcquiringLastKnownLocation)
+        {
+        iPositioner.CancelRequest( EPositionerGetLastKnownPosition );
+        }
+    iState = EIdle;
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CMnrpPositionRequest::RunL()
+    {
+    if ( iStatus != KErrNone &&
+         iState == EAcquiringDefaultLocation && 
+         iLastKnownLocationAllowed )
+        {
+        // Fetching current location failed. Try last known location.
+        iState = EAcquiringLastKnownLocation;
+        ExecuteNextStep();
+        }
+    else
+        {
+        // Operation finished, notify observer
+        iState = EIdle;
+        SaveContainer( *iGenericPosition );
+        iObserver.HandlePositionRequestCompletedL( iStatus.Int() );
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+TInt CMnrpPositionRequest::RunError(TInt /*aError*/)
+    {
+    // Ignore possible errors.
+    return KErrNone;
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CMnrpPositionRequest::ExecuteNextStep()
+    {
+    iStatus = KRequestPending;
+
+    switch (iState)
+        {
+        case EAcquiringDefaultLocation:
+            InitContainer( *iGenericPosition );
+            iPositioner.NotifyPositionUpdate( *iGenericPosition, iStatus);
+            break;
+        case EAcquiringLastKnownLocation:
+            iPositioner.GetLastKnownPosition( iPositionInfo, iStatus );
+            break;
+        default:    
+            // this case should never happen, see RunL
+            return;
+        }
+
+    SetActive();
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CMnrpPositionRequest::SetOptionsL( const TPositionUpdateOptionsBase& aOptions )
+    {
+    User::LeaveIfError( iPositioner.SetUpdateOptions( aOptions ) );
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CMnrpPositionRequest::InitContainer( HPositionGenericInfo& aGenericInfo )
+    {
+    aGenericInfo.ClearPositionData();
+    
+    aGenericInfo.SetRequestedField( EPositionFieldHorizontalSpeed );
+    aGenericInfo.SetRequestedField( EPositionFieldTrueCourse );
+    aGenericInfo.SetRequestedField( EPositionFieldMagneticCourse );
+    aGenericInfo.SetRequestedField( EPositionFieldHeading );
+    aGenericInfo.SetRequestedField( EPositionFieldMagneticHeading );
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CMnrpPositionRequest::SaveContainer( const HPositionGenericInfo& aGenericInfo )
+    {
+    TRealX nan;
+    nan.SetNaN();
+    iSpeed = iHeading = iCourse = iMagneticHeading = iMagneticCourse = nan;
+    
+    aGenericInfo.GetValue( EPositionFieldHorizontalSpeed, iSpeed );
+    aGenericInfo.GetValue( EPositionFieldTrueCourse, iCourse );
+    aGenericInfo.GetValue( EPositionFieldMagneticCourse, iMagneticCourse );
+    aGenericInfo.GetValue( EPositionFieldHeading, iHeading );
+    aGenericInfo.GetValue( EPositionFieldMagneticHeading, iMagneticHeading );
+    
+    iPositionInfo = *iGenericPosition;
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mapnavproviderrefapp/src/mnrputils.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,256 @@
+/*
+* 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:  MnrpUtils class implementation
+*
+*/
+
+
+#include <e32base.h>
+#include <e32math.h>
+#include <lbsposition.h>
+
+#include "mnrputils.h"
+
+_LIT( KNan, "<n/a>" );
+_LIT( KNeg, "<neg>" );
+_LIT( KOutOfBounds, "<inv>" );
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void MnrpUtils::CoordinateToString(
+    TReal aCoord,
+    TDes& aStr,
+    TBool aFull,
+    TBool aMillis )
+    {
+    const TChar KDegreeMark = 0xB0;
+    const TChar KMinuteMark = 0x27;
+    const TChar KSecondMark = 0x22;
+    const TChar KMilliSecondMark = 0x2E;
+    const TChar KMinus = '-';
+    const TChar KPlus = '+';
+
+    _LIT( KCoordFormatFull, "%c%d%c%02d%c%02d%c" );
+    _LIT( KCoordFormatPartMseconds, "%c%03d" );
+
+    if ( Math::IsNaN( aCoord ) )
+        {
+        aStr.Copy( KNan );
+        }
+    else if ( Abs( aCoord ) > 360 )
+        {
+        aStr.Copy( KOutOfBounds );
+        }
+    else
+        {
+        TBool negative = aCoord < 0;
+        aCoord = Abs( aCoord );
+
+        TInt degrees = TInt( aCoord );
+        aCoord = ( aCoord - degrees ) * 60;
+        TInt minutes = TInt( aCoord );
+        aCoord = ( aCoord - minutes ) * 60;
+        TInt seconds = TInt( aCoord );
+        aCoord = ( aCoord - seconds ) * 100;
+        TInt mseconds = TInt( aCoord );
+
+        TChar sign = negative ? KMinus : KPlus;
+
+        if ( aFull )
+            {
+            aStr.Format( KCoordFormatFull,
+                            TUint( sign ), degrees, TUint( KDegreeMark ),
+                            minutes, TUint( KMinuteMark ),
+                            seconds, TUint( KSecondMark ) );
+            if ( aMillis )
+                {
+                aStr.AppendFormat( KCoordFormatPartMseconds, TUint( KMilliSecondMark ), mseconds );
+                }
+            }
+        else
+            {
+            aStr.Zero();
+            if ( degrees )
+                {
+                aStr.AppendNum( degrees );
+                aStr.Append( KDegreeMark );
+                }
+            if ( minutes )
+                {
+                aStr.AppendNum( minutes );
+                aStr.Append( KMinuteMark );
+                }
+            if ( seconds )
+                {
+                aStr.AppendNum( seconds );
+                aStr.Append( KSecondMark );
+                }
+            if ( mseconds && aMillis )
+                {
+                if ( !seconds )
+                    {
+                    aStr.AppendNum( 0 );
+                    aStr.Append( KSecondMark );
+                    }
+                aStr.AppendFormat( KCoordFormatPartMseconds, TUint( KMilliSecondMark ), mseconds );
+                }
+
+            if ( !aStr.Length() )
+                {
+                aStr.AppendNum( degrees );
+                aStr.Append( KDegreeMark );
+                }
+            }
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void MnrpUtils::DistanceToString( TReal aDistance, TDes& aStr )
+    {
+    _LIT( KSmall, "< 1 m" );
+    _LIT( KMeters, "%d m" );
+    _LIT( KKiloMeters, "%.1f Km" );
+    _LIT( KThousandsKiloMeters, "%.1f tKm" );
+
+    const TInt KMeter = 1;
+    const TInt KKilometer = KMeter * 1000;
+    const TInt KThousandKilometer = KKilometer * 1000;
+
+    if ( Math::IsNaN( aDistance ) )
+        {
+        aStr.Copy( KNan );
+        }
+    else if ( aDistance < 0 )
+        {
+        aStr.Copy( KNeg );
+        }
+    else if ( aDistance < KMeter )
+        {
+        aStr.Copy( KSmall );
+        }
+    else if ( aDistance < KKilometer )
+        {
+        aStr.Format( KMeters, TInt( aDistance ) );
+        }
+    else if ( aDistance < KThousandKilometer )
+        {
+        aStr.Format( KKiloMeters, aDistance / KKilometer );
+        }
+    else
+        {
+        aStr.Format( KThousandsKiloMeters, aDistance / KThousandKilometer );
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void MnrpUtils::SpeedToString( TReal aSpeed, TDes& aStr )
+    {
+    _LIT( KPerSecond, "/s" );
+
+    if ( Math::IsNaN( aSpeed ) )
+        {
+        aStr.Copy( KNan );
+        }
+    else if ( aSpeed < 0 )
+        {
+        aStr.Copy( KNeg );
+        }
+    else
+        {
+        DistanceToString( aSpeed, aStr );
+        aStr.Append( KPerSecond );
+        }
+    }
+    
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void MnrpUtils::AngleToString( TReal aAngle, TDes& aStr )
+    {
+    const TChar KMinus = '-';
+    const TChar KPlus = '+';
+    _LIT( KAngleFormat, "%S%c%.1f\xB0 /  %.1f\xB0" );
+    
+    _LIT( KNorth, "N" );
+    _LIT( KSouth, "S" );
+    _LIT( KWest, "W" );
+    _LIT( KEast, "E" );
+
+    TPtrC side;
+    TReal angle;
+
+    if ( Math::IsNaN( aAngle ) )
+        {
+        aStr.Copy( KNan );
+        }
+    else if ( aAngle > 360 )
+        {
+        aStr.Copy( KOutOfBounds );
+        }
+    else
+        {
+        if ( aAngle > 315 )
+            {
+            side.Set( KNorth );
+            angle = aAngle - 360;
+            }
+        else if ( aAngle > 225 )
+            {
+            side.Set( KWest );
+            angle = aAngle - 270;
+            }
+        else if ( aAngle > 135 )
+            {
+            side.Set( KSouth );
+            angle = aAngle - 180;
+            }
+        else if ( aAngle > 45 )
+            {
+            side.Set( KEast );
+            angle = aAngle - 90;
+            }
+        else // aAngle <= 45
+            {
+            side.Set( KNorth );
+            angle = aAngle;
+            }
+
+        TChar sign = ( angle >= 0 ) ? KPlus : KMinus;
+        aStr.Format( KAngleFormat, &side, TUint( sign ), Abs( angle ), aAngle );
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+EXPORT_C HBufC* MnrpUtils::PrintableStringLC( const TDesC& aStr )
+    {
+    HBufC* buf = aStr.AllocLC();
+    TPtr string( buf->Des() );
+    for ( TInt i = 0; i < string.Length(); i++ )
+        {
+        if ( !TChar( string[i] ).IsPrint() )
+            {
+            string[i] = ' ';
+            }
+        }
+    return buf;
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/simpsyconfigurator/data/simpsyui.rss	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,211 @@
+/*
+* 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: Resource file for simpsyconfigurator
+*
+*/
+
+NAME SIMP
+
+#include <eikon.rh>
+#include <uikon.rh>
+#include <avkon.rh>
+#include <appinfo.rh>
+#include <avkon.rsg>
+#include <avkon.hrh>
+#include <LocPsyConfigUi.rh>
+
+#include "simpsyui.hrh"
+#include "simpsyuiloc.h"
+
+RESOURCE RSS_SIGNATURE { }
+
+RESOURCE TBUF { buf=qtn_simpsyui_grid; }
+
+RESOURCE EIK_APP_INFO
+    {
+    menubar = r_simpsyui_menubar;
+    cba = R_AVKON_SOFTKEYS_OPTIONS_BACK__SELECT;
+    }
+
+RESOURCE LOCALISABLE_APP_INFO r_simpsyui_app_info
+	{
+	short_caption = qtn_simpsyui_grid;
+	caption_and_icon =
+		{
+		CAPTION_AND_ICON_INFO
+			{
+			caption = qtn_simpsyui_grid;
+			}
+		};			
+	}
+
+RESOURCE MENU_BAR r_simpsyui_menubar
+    {
+    titles=
+        {
+        MENU_TITLE 
+            { 
+            menu_pane = r_simpsyui_cfg_menu; 
+            txt=""; 
+            }
+        };
+    }
+
+RESOURCE MENU_PANE r_simpsyui_cfg_menu
+    {
+    items=
+        {
+        MENU_ITEM 
+            { 
+            command = ESimCmdConfigFile; 
+            txt = qtn_simpsyui_opt_config_file; 
+            } ,
+	    MENU_ITEM 
+	        { 
+	        command = ESimCmdGetCurrentLocation; 
+	        txt = qtn_simpsyui_opt_current_location; 
+	        }
+        };
+    }
+
+RESOURCE PSYCONFIG_REGISTRATION r_simpsyui_reg_info
+	{
+	psy_uid = 0x101F7A81; // Use Simulation PSY modules UID
+	}
+
+RESOURCE DIALOG r_simpsyui_error_note
+    {
+	flags = EGeneralQueryFlags;
+    buttons = R_AVKON_SOFTKEYS_OK_EMPTY__OK;
+    items =
+        {
+        DLG_LINE
+            {
+            type = EAknCtNote;
+		    id = EGeneralNote;
+            control = AVKON_NOTE 
+                { 
+                layout = EGeneralLayout;
+                singular_label = qtn_simpsyui_location_dlg_label;
+                animation = R_QGN_NOTE_INFO_ANIM;
+                };
+            }
+        };
+    }
+
+RESOURCE DIALOG r_simpsyui_location_dialog
+    {
+    flags = EGeneralQueryFlags;
+    buttons = R_AVKON_SOFTKEYS_OK_EMPTY__OK;
+    items =
+        {
+        DLG_LINE
+            {
+            type = EAknCtListQueryControl;
+            id = EListQueryControl;
+            control = AVKON_LIST_QUERY_CONTROL
+                {
+				listtype = EAknCtSingleHeadingPopupMenuListBox;
+                listbox = LISTBOX
+                    {
+                    flags = EAknListBoxViewerFlags;
+                    array_id = r_simpsyui_listbox_dummy_array;
+                    };
+                heading = qtn_simpsyui_location_dlg_heading;
+                };
+            }
+        };
+    }
+
+RESOURCE ARRAY r_simpsyui_listbox_dummy_array
+	{
+	items =
+		{
+		LBUF
+			{
+			txt = "";
+			}
+		};
+	}
+
+RESOURCE DIALOG r_simpsyui_request_location
+	{	
+	flags = EAknWaitNoteFlags | EEikDialogFlagWait;
+    buttons = R_AVKON_SOFTKEYS_CANCEL;
+    items =
+        {
+        DLG_LINE
+            {
+            type = EAknCtNote;
+            id = EGeneralNote;
+            control= AVKON_NOTE 
+                { 
+                layout = EWaitLayout;
+                singular_label = qtn_simpsyui_wait_requesting_location;
+                animation = R_QGN_GRAF_WAIT_BAR_ANIM;
+                };
+            }
+        };
+	}
+	
+RESOURCE TBUF r_simpsyui_serv_connect_err
+    {
+    buf = qtn_simpsyui_serv_connect_err;
+    }
+
+RESOURCE TBUF r_simpsyui_psy_open_err
+    {
+    buf = qtn_simpsyui_psy_open_err;
+    }
+
+RESOURCE TBUF r_simpsyui_setting_requestor_err
+    {
+    buf = qtn_simpsyui_setting_requestor_err;
+    }
+
+RESOURCE TBUF r_simpsyui_get_location_err
+    {
+    buf = qtn_simpsyui_get_location_err;
+    }
+
+RESOURCE TBUF r_simpsyui_location_info_latitude
+    {
+    buf = qtn_simpsyui_location_info_latitude;
+    }
+
+RESOURCE TBUF r_simpsyui_location_info_longitude
+    {
+    buf = qtn_simpsyui_location_info_longitude;
+    }
+
+RESOURCE TBUF r_simpsyui_location_info_altitude
+    {
+    buf = qtn_simpsyui_location_info_altitude;
+    }
+
+RESOURCE TBUF r_simpsyui_location_info_horz_accuracy
+    {
+    buf = qtn_simpsyui_location_info_horz_accuracy;
+    }
+
+RESOURCE TBUF r_simpsyui_location_info_vert_accuracy
+    {
+    buf = qtn_simpsyui_location_info_vert_accuracy;
+    }
+   
+RESOURCE TBUF r_simpsyui_filename_text
+	{
+	buf = qtn_simpsyui_filename_text;
+	} 
+//End Of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/simpsyconfigurator/data/simpsyui_reg.rss	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,41 @@
+/*
+* 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: App Registration file for simpsyconfigurator
+*
+*/
+
+#include <appinfo.rh>
+#include <simpsyui.rsg>
+#include <data_caging_paths_strings.hrh>
+#include <LocPsyConfigUiUID.hrh>
+
+#include "simpsyuiconsts.h"
+
+#define KAPPFILENAME "simpsyui"
+UID2 KUidAppRegistrationResourceFile
+UID3 KSimPsyUiAppUid  // Application's UID
+
+
+RESOURCE APP_REGISTRATION_INFO
+    {
+    app_file = KAPPFILENAME;
+    hidden = KAppIsHidden;
+    embeddability = KAppEmbeddable;
+	localisable_resource_file=APP_RESOURCE_DIR"\\simpsyui";
+	localisable_resource_id=R_SIMPSYUI_APP_INFO;
+	service_list = 
+		{
+		SERVICE_INFO { uid = KLocPsyConfigServiceUid; opaque_data = R_SIMPSYUI_REG_INFO;}
+		};
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/simpsyconfigurator/group/bld.inf	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,33 @@
+/*
+* 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
+*				         SimPsyconfigurator sub-system
+*                  
+*
+*/
+
+
+PRJ_MMPFILES
+// Simulation PSY Configurator mmp file
+simpsyuiapp.mmp
+
+PRJ_EXPORTS
+
+// Files to be exported
+nmea.nme							/epoc32/release/winscw/udeb/z/system/data/nmea.nme
+nmea.nme							/epoc32/release/winscw/urel/z/system/data/nmea.nme
+simu_move_const.sps   /epoc32/release/winscw/udeb/z/system/data/simu_move_const.sps
+simu_move_const.sps   /epoc32/release/winscw/urel/z/system/data/simu_move_const.sps
+simu_move_speed.sps   /epoc32/release/winscw/udeb/z/system/data/simu_move_speed.sps
+simu_move_speed.sps   /epoc32/release/winscw/urel/z/system/data/simu_move_speed.sps
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/simpsyconfigurator/group/nmea.nme	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,5253 @@
+$GPGGA,125737,6128.450,N,02350.350,E,1,04,2.2,174.2,M,20.7,M,,*48
+$GPGSA,A,3,,,,,,18,19,,26,28,29,,2.2,2.2,1.0*37
+$GPGSV,3,1,11,03,04,013,00,07,01,153,00,08,53,094,38,10,16,209,36*7F
+$GPGSV,3,2,11,15,13,332,42,18,17,328,36,19,21,036,44,21,05,299,36*76
+$GPGSV,3,3,11,26,59,278,46,28,61,145,39,29,68,251,48,,,,*46
+$PGRME,8.3,M,17.6,M,9.8,M*14
+$GPGLL,6128.454,N,02350.341,E,125737,A*25
+$PGRMZ,564,f,3*1C
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6016.083,S,02452.500,E,T019*34
+$GPRMC,125738,A,6128.459,N,02350.335,E,038.5,335.8,110805,006.0,E*70
+$GPRMB,A,0.24,R,T013,T012,6129.236,N,02346.327,E,002.1,292.0,027.7,V*29
+$GPGGA,125738,6128.461,N,02350.333,E,1,05,2.3,171.9,M,20.7,M,,*4E
+$GPGSA,A,3,,,,,,18,19,,26,28,29,,2.3,2.3,1.0*37
+$GPGSV,3,1,11,03,04,013,00,07,01,153,00,08,53,094,37,10,16,209,36*70
+$GPGSV,3,2,11,15,13,332,42,18,17,328,37,19,21,036,43,21,05,299,36*70
+$GPGSV,3,3,11,26,59,278,46,28,61,145,39,29,68,251,48,,,,*46
+$PGRME,8.6,M,16.6,M,10.0,M*20
+$GPGLL,6128.467,N,02350.328,E,125739,A*24
+$PGRMZ,564,f,3*1C
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6016.083,N,02452.500,E,T018*28
+$GPRMC,125739,A,6128.472,N,02350.322,E,038.6,335.6,110805,006.0,E*73
+$GPRMB,A,0.23,R,T013,T012,6129.236,N,02346.327,E,002.1,291.8,027.9,V*2B
+$GPGGA,125739,6128.474,N,02350.321,E,1,05,2.3,171.9,M,20.7,M,,*48
+$GPGSA,A,3,,,,,,18,19,,26,28,29,,2.3,2.3,1.0*37
+$GPGSV,3,1,11,03,04,013,00,07,01,153,00,08,53,094,38,10,16,209,36*7F
+$GPGSV,3,2,11,15,13,332,42,18,17,328,38,19,21,036,42,21,05,299,35*7D
+$GPGSV,3,3,11,26,59,278,46,28,61,145,39,29,68,251,48,,,,*46
+$PGRME,8.6,M,16.6,M,10.0,M*20
+$GPGLL,6128.480,N,02350.315,E,125740,A*2D
+$PGRMZ,564,f,3*1C
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6013.283,N,02456.650,E,T017*22
+$GPRMC,125740,A,6128.484,N,02350.308,E,038.6,335.1,110805,006.0,E*7B
+$GPRMB,A,0.22,R,T013,T012,6129.236,N,02346.327,E,002.1,291.5,028.0,V*21
+$GPGGA,125741,6128.486,N,02350.306,E,1,05,2.5,168.5,M,20.7,M,,*4D
+$GPGSA,A,3,,,,,,18,19,,26,28,29,,2.9,2.5,1.6*3D
+$GPGSV,3,1,11,03,04,013,00,07,01,153,00,08,53,094,38,10,16,209,34*7D
+$GPGSV,3,2,11,15,13,332,41,18,17,328,39,19,21,036,40,21,05,299,34*7C
+$GPGSV,3,3,11,26,59,278,46,28,61,145,39,29,68,251,48,,,,*46
+$PGRME,9.5,M,16.6,M,11.1,M*22
+$GPGLL,6128.492,N,02350.298,E,125741,A*2B
+$PGRMZ,552,f,3*19
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6123.283,N,02430.650,E,T016*21
+$GPRMC,125742,A,6128.497,N,02350.292,E,039.4,332.4,110805,006.0,E*78
+$GPRMB,A,0.21,R,T013,T012,6129.236,N,02346.327,E,002.0,291.3,029.7,V*23
+$GPGGA,125742,6128.498,N,02350.289,E,1,05,2.5,168.4,M,20.7,M,,*46
+$GPGSA,A,3,,,,,,18,19,,26,28,29,,2.8,2.5,1.0*3A
+$GPGSV,3,1,11,03,04,013,00,07,01,153,00,08,53,094,38,10,16,209,32*7B
+$GPGSV,3,2,11,15,13,332,40,18,17,328,39,19,21,036,39,21,05,299,33*74
+$GPGSV,3,3,11,26,59,278,46,28,61,145,39,29,68,251,48,,,,*46
+$PGRME,9.5,M,16.6,M,11.1,M*22
+$GPGLL,6128.505,N,02350.283,E,125743,A*2C
+$PGRMZ,552,f,3*19
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,0000.000,N,00000.000,W,T015*39
+$GPRMC,125743,A,6128.509,N,02350.277,E,039.4,332.2,110805,006.0,E*72
+$GPRMB,A,0.20,R,T013,T012,6129.236,N,02346.327,E,002.0,291.0,029.7,V*21
+$GPGGA,125743,6128.511,N,02350.275,E,1,05,2.5,168.3,M,20.7,M,,*43
+$GPGSA,A,3,,,,,,18,19,,26,28,29,,2.8,2.5,1.0*3A
+$GPGSV,3,1,11,03,04,013,00,07,01,153,00,08,53,094,37,10,16,209,32*74
+$GPGSV,3,2,11,15,13,332,41,18,17,328,40,19,21,036,38,21,05,299,33*7A
+$GPGSV,3,3,11,26,59,278,46,28,61,145,39,29,68,251,48,,,,*46
+$PGRME,9.5,M,16.6,M,11.1,M*22
+$GPGLL,6128.517,N,02350.268,E,125744,A*2D
+$PGRMZ,552,f,3*19
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,0009.000,N,02430.650,E,T014*25
+$GPRMC,125744,A,6128.522,N,02350.262,E,039.5,332.1,110805,006.0,E*7A
+$GPRMB,A,0.19,R,T013,T012,6129.236,N,02346.327,E,002.0,290.8,029.7,V*22
+$GPGGA,125745,6128.524,N,02350.260,E,1,05,2.6,168.3,M,20.7,M,,*44
+$GPGSA,A,3,,,,,,18,19,,26,28,29,,2.8,2.6,1.0*39
+$GPGSV,3,1,11,03,04,013,00,07,01,153,00,08,53,094,36,10,16,209,32*75
+$GPGSV,3,2,11,15,13,332,39,18,17,328,40,19,21,036,37,21,05,299,32*7B
+$GPGSV,3,3,11,26,59,278,46,28,61,145,40,29,68,251,48,,,,*48
+$PGRME,9.5,M,16.6,M,11.1,M*22
+$GPGLL,6128.530,N,02350.253,E,125745,A*21
+$PGRMZ,552,f,3*19
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6123.285,N,02430.651,E,T013*23
+$GPRMC,125746,A,6128.535,N,02350.247,E,039.5,331.8,110805,006.0,E*73
+$GPRMB,A,0.18,R,T013,T012,6129.236,N,02346.327,E,002.0,290.5,029.8,V*21
+$GPGGA,125746,6128.537,N,02350.245,E,1,05,2.6,168.2,M,20.7,M,,*43
+$GPGSA,A,3,,,,,,18,19,,26,28,29,,2.8,2.6,1.0*39
+$GPGSV,3,1,11,03,04,013,00,07,01,153,00,08,53,094,36,10,16,209,32*75
+$GPGSV,3,2,11,15,13,332,39,18,18,327,40,19,21,036,37,21,05,299,32*7B
+$GPGSV,3,3,11,26,59,278,45,28,61,145,40,29,68,251,47,,,,*44
+$PGRME,9.5,M,16.6,M,11.1,M*22
+$GPGLL,6128.542,N,02350.237,E,125746,A*25
+$PGRMZ,552,f,3*19
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6129.236,N,02346.327,E,T012*22
+$GPRMC,125747,A,6128.547,N,02350.230,E,040.1,329.4,110805,006.0,E*78
+$GPRMB,A,0.17,R,T013,T012,6129.236,N,02346.327,E,002.0,290.2,031.1,V*29
+$GPGGA,125747,6128.549,N,02350.227,E,1,05,2.6,168.2,M,20.7,M,,*4F
+$GPGSA,A,3,,,,,,18,19,,26,28,29,,2.8,2.6,1.0*39
+$GPGSV,3,1,11,03,04,013,00,07,01,153,00,08,53,094,36,10,16,209,32*75
+$GPGSV,3,2,11,15,13,332,39,18,18,327,39,19,21,036,36,21,05,299,32*74
+$GPGSV,3,3,11,26,59,278,46,28,61,145,40,29,68,251,47,,,,*47
+$PGRME,9.5,M,16.6,M,11.1,M*22
+$GPGLL,6128.555,N,02350.220,E,125748,A*2B
+$PGRMZ,552,f,3*19
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6114.236,N,02346.327,E,T011*2F
+$GPRMC,125748,A,6128.560,N,02350.214,E,040.0,329.3,110805,006.0,E*72
+$GPRMB,A,0.16,R,T013,T012,6129.236,N,02346.327,E,002.0,290.0,031.0,V*2B
+$GPGGA,125748,6128.562,N,02350.211,E,1,05,2.6,168.2,M,20.7,M,,*4C
+$GPGSA,A,3,,,,,,18,19,,26,28,29,,2.8,2.6,1.0*39
+$GPGSV,3,1,11,03,04,013,00,07,01,153,00,08,53,094,35,10,16,209,33*77
+$GPGSV,3,2,11,15,13,332,38,18,18,327,40,19,21,036,35,21,05,299,31*7B
+$GPGSV,3,3,11,26,59,278,47,28,61,145,40,29,68,251,47,,,,*46
+$PGRME,9.5,M,16.6,M,11.1,M*22
+$GPGLL,6128.568,N,02350.203,E,125749,A*25
+$PGRMZ,552,f,3*19
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6220.236,N,02346.327,E,T010*2A
+$GPRMC,125750,A,6128.572,N,02350.197,E,039.8,329.1,110805,006.0,E*74
+$GPRMB,A,0.15,R,T013,T012,6129.236,N,02346.327,E,002.0,289.7,030.9,V*2F
+$GPGGA,125750,6128.574,N,02350.195,E,1,05,2.6,168.2,M,20.7,M,,*4D
+$GPGSA,A,3,,,,,,18,,,26,28,29,,2.8,2.6,1.0*31
+$GPGSV,3,1,11,03,04,013,00,07,01,153,00,08,53,094,34,10,16,209,33*76
+$GPGSV,3,2,11,15,13,332,38,18,18,327,39,19,21,035,34,21,05,299,31*77
+$GPGSV,3,3,11,26,59,278,47,28,61,145,40,29,68,251,47,,,,*46
+$PGRME,9.5,M,16.6,M,11.1,M*22
+$GPGLL,6128.580,N,02350.187,E,125750,A*24
+$PGRMZ,552,f,3*19
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6120.236,N,02346.327,E,T009*21
+$GPRMC,125751,A,6128.585,N,02350.181,E,039.4,329.0,110805,006.0,E*77
+$GPRMB,A,0.14,R,T013,T012,6129.236,N,02346.327,E,002.0,289.4,030.3,V*27
+$GPGGA,125751,6128.587,N,02350.179,E,1,04,2.7,168.2,M,20.7,M,,*42
+$GPGSA,A,3,,,,,,18,,,26,28,29,,2.8,2.7,1.0*30
+$GPGSV,3,1,11,03,04,013,00,07,01,153,00,08,53,094,34,10,16,209,35*70
+$GPGSV,3,2,11,15,13,332,37,18,18,327,39,19,21,035,34,21,05,299,31*78
+$GPGSV,3,3,11,26,59,278,48,28,61,145,40,29,68,251,47,,,,*49
+$PGRME,9.5,M,16.6,M,11.1,M*22
+$GPGLL,6128.592,N,02350.172,E,125752,A*2F
+$PGRMZ,552,f,3*19
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6129.234,N,02346.317,E,T008*28
+$GPRMC,125752,A,6128.597,N,02350.165,E,039.2,328.9,110805,006.0,E*73
+$GPRMB,A,0.13,R,T013,T012,6129.236,N,02346.327,E,001.9,289.2,030.2,V*2D
+$GPGGA,125752,6128.599,N,02350.163,E,1,04,2.7,168.2,M,20.7,M,,*45
+$GPGSA,A,3,,,,,,18,,,26,28,29,,2.8,2.7,1.0*30
+$GPGSV,3,1,11,03,04,013,00,07,01,153,00,08,53,094,33,10,16,209,34*76
+$GPGSV,3,2,11,15,13,332,36,18,18,327,39,19,21,035,34,21,05,299,31*79
+$GPGSV,3,3,11,26,59,278,48,28,61,145,40,29,68,251,47,,,,*49
+$PGRME,9.7,M,16.6,M,11.1,M*20
+$GPGLL,6128.605,N,02350.155,E,125753,A*26
+$PGRMZ,552,f,3*19
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6157.564,N,02406.158,E,T007*26
+$GPRMC,125753,A,6128.609,N,02350.149,E,039.0,328.7,110805,006.0,E*74
+$GPRMB,A,0.12,R,T013,T012,6129.236,N,02346.327,E,001.9,288.9,030.0,V*24
+$GPGGA,125753,6128.611,N,02350.147,E,1,04,2.7,168.2,M,20.7,M,,*41
+$GPGSA,A,3,,,,,,18,,,26,28,29,,2.8,2.7,1.0*30
+$GPGSV,3,1,11,03,04,013,00,07,01,153,00,08,53,094,34,10,16,209,33*76
+$GPGSV,3,2,11,15,13,332,36,18,18,327,40,19,21,035,33,21,05,299,31*70
+$GPGSV,3,3,11,26,59,278,48,28,61,145,39,29,68,251,48,,,,*48
+$PGRME,9.7,M,16.6,M,11.1,M*20
+$GPGLL,6128.617,N,02350.139,E,125754,A*28
+$PGRMZ,552,f,3*19
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6145.919,N,02345.544,E,T006*2B
+$GPRMC,125755,A,6128.621,N,02350.132,E,038.8,328.3,110805,006.0,E*79
+$GPRMB,A,0.11,R,T013,T012,6129.236,N,02346.327,E,001.9,288.7,029.9,V*28
+$GPGGA,125755,6128.622,N,02350.130,E,1,04,2.8,165.6,M,20.7,M,,*41
+$GPGSA,A,3,,,,,,18,19,,26,28,29,,3.3,2.8,1.6*3B
+$GPGSV,3,1,11,03,04,013,00,07,01,153,00,08,53,094,34,10,16,209,33*76
+$GPGSV,3,2,11,15,13,332,36,18,18,327,39,19,21,035,35,21,05,299,31*78
+$GPGSV,3,3,11,26,59,278,48,28,61,145,40,29,68,251,47,,,,*49
+$PGRME,10.3,M,17.7,M,13.2,M*1D
+$GPGLL,6128.628,N,02350.122,E,125755,A*2F
+$PGRMZ,543,f,3*19
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6130.198,N,02342.702,E,T005*2C
+$GPRMC,125756,A,6128.632,N,02350.116,E,038.7,328.3,110805,006.0,E*71
+$GPRMB,A,0.10,R,T013,T012,6129.236,N,02346.327,E,001.9,288.4,029.9,V*2A
+$GPGGA,125756,6128.634,N,02350.114,E,1,05,2.8,165.5,M,20.7,M,,*41
+$GPGSA,A,3,,,,,,18,19,,26,28,29,,2.8,2.8,1.0*37
+$GPGSV,3,1,11,03,04,013,00,07,01,153,00,08,53,094,33,10,16,209,33*71
+$GPGSV,3,2,11,15,13,332,37,18,18,327,39,19,21,035,35,21,05,299,31*79
+$GPGSV,3,3,11,26,59,278,48,28,61,145,39,29,68,251,47,,,,*47
+$PGRME,10.4,M,16.6,M,11.1,M*1B
+$GPGLL,6128.640,N,02350.107,E,125757,A*24
+$PGRMZ,534,f,3*19
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6216.183,N,02619.685,E,T004*25
+$GPRMC,125757,A,6128.643,N,02350.099,E,038.6,328.6,110805,006.0,E*74
+$GPRMB,A,0.09,R,T013,T012,6129.236,N,02346.327,E,001.9,288.2,029.4,V*29
+$GPGGA,125758,6128.645,N,02350.097,E,1,05,2.9,162.8,M,20.7,M,,*48
+$GPGSA,A,3,,,,,,18,19,,26,28,29,,3.3,2.9,1.6*3A
+$GPGSV,3,1,11,03,04,013,00,07,01,153,00,08,53,094,34,10,16,209,33*76
+$GPGSV,3,2,11,15,13,332,39,18,18,327,39,19,21,035,41,21,05,299,31*74
+$GPGSV,3,3,11,26,59,278,48,28,61,145,38,29,68,251,47,,,,*46
+$PGRME,10.9,M,17.7,M,13.2,M*17
+$GPGLL,6128.649,N,02350.088,E,125758,A*24
+$PGRMZ,526,f,3*1A
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6215.064,N,02603.837,E,T003*25
+$GPRMC,125759,A,6128.654,N,02350.082,E,038.4,328.5,110805,006.0,E*77
+$GPRMB,A,0.08,R,T013,T012,6129.236,N,02346.327,E,001.9,287.9,029.2,V*2A
+$GPGGA,125759,6128.656,N,02350.080,E,1,05,2.8,160.2,M,20.7,M,,*44
+$GPGSA,A,3,,,,,,18,19,,26,28,29,,2.8,2.8,1.0*37
+$GPGSV,3,1,11,03,04,013,00,07,01,153,00,08,53,094,37,10,16,209,32*74
+$GPGSV,3,2,11,15,13,332,40,18,18,327,40,19,21,035,40,21,05,299,31*75
+$GPGSV,3,3,11,26,59,278,48,28,61,145,38,29,68,251,47,,,,*46
+$PGRME,11.0,M,16.6,M,11.1,M*1E
+$GPGLL,6128.661,N,02350.073,E,125759,A*2B
+$PGRMZ,526,f,3*1A
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6151.098,N,02510.924,E,T002*26
+$GPRMC,125800,A,6128.665,N,02350.065,E,038.1,328.2,110805,006.0,E*7D
+$GPRMB,A,0.08,R,T013,T012,6129.236,N,02346.327,E,001.9,287.7,029.0,V*26
+$GPGGA,125800,6128.667,N,02350.063,E,1,05,2.9,157.7,M,20.7,M,,*48
+$GPGSA,A,3,,,,,,18,19,,26,28,29,,3.3,2.9,1.6*3A
+$GPGSV,3,1,11,03,04,013,00,07,01,153,00,08,53,094,36,10,16,209,32*75
+$GPGSV,3,2,11,15,13,332,40,18,18,327,40,19,21,035,41,21,05,299,31*74
+$GPGSV,3,3,11,26,59,278,48,28,61,145,38,29,68,251,47,,,,*46
+$PGRME,11.5,M,17.7,M,13.2,M*1A
+$GPGLL,6128.672,N,02350.056,E,125801,A*2C
+$PGRMZ,510,f,3*1F
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6129.271,N,02346.376,E,T001*27
+$GPRMC,125801,A,6128.676,N,02350.049,E,038.0,328.2,110805,006.0,E*71
+$GPRMB,A,0.07,R,T013,T012,6129.236,N,02346.327,E,001.9,287.5,028.9,V*23
+$GPGGA,125801,6128.677,N,02350.047,E,1,05,3.0,155.5,M,20.7,M,,*46
+$GPGSA,A,3,,,,,,18,19,,26,28,29,,3.7,3.0,2.1*32
+$GPGSV,3,1,11,03,04,013,00,07,01,153,00,08,53,094,39,10,16,209,32*7A
+$GPGSV,3,2,11,15,13,332,40,18,18,327,39,19,21,035,45,21,05,299,31*7E
+$GPGSV,3,3,11,26,59,278,48,28,61,145,38,29,68,251,47,,,,*46
+$PGRME,11.5,M,17.7,M,13.2,M*1A
+$GPGLL,6128.682,N,02350.038,E,125802,A*28
+$PGRMZ,503,f,3*1D
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPRTE,4,1,c,0,T030,T029,T028,T027,T026,T025,T024,T023,T022*49
+$GPRTE,4,2,c,0,T021,T020,T019,T018,T017,T016,T015,T014,T013*4B
+$GPRTE,4,3,c,0,T012,T011,T010,T009,T008,T007,T006,T005,T004*4B
+$GPRTE,4,4,c,0,T003,T002,T001*4F
+$GPWPL,6016.083,N,02452.500,E,T030*22
+$GPRMC,125803,A,6128.689,N,02350.027,E,037.7,328.8,110805,006.0,E*79
+$GPRMB,A,0.06,R,T013,T012,6129.236,N,02346.327,E,001.9,287.2,028.2,V*2E
+$GPGGA,125803,6128.691,N,02350.025,E,1,05,1.9,151.3,M,20.7,M,,*41
+$GPGSA,A,3,,,,,,18,19,,26,28,29,,1.9,1.9,1.0*37
+$GPGSV,3,1,11,03,04,013,00,07,01,153,00,08,53,094,40,10,16,209,31*77
+$GPGSV,3,2,11,15,13,332,40,18,18,327,39,19,21,035,45,21,05,299,31*7E
+$GPGSV,3,3,11,26,59,278,47,28,61,145,37,29,68,251,47,,,,*46
+$PGRME,11.5,M,17.7,M,13.2,M*1A
+$GPGLL,6128.696,N,02350.018,E,125804,A*29
+$PGRMZ,496,f,3*10
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6123.283,N,02430.650,E,T029*2D
+$GPRMC,125804,A,6128.700,N,02350.012,E,037.3,329.5,110805,006.0,E*70
+$GPRMB,A,0.05,R,T013,T012,6129.236,N,02346.327,E,001.8,286.9,027.5,V*2E
+$GPGGA,125804,6128.703,N,02350.008,E,1,05,1.8,149.3,M,20.7,M,,*4B
+$GPGSA,A,3,,,,,,18,19,,26,28,29,,1.8,1.8,1.0*37
+$GPGSV,3,1,11,03,04,013,00,07,01,153,00,08,53,094,40,10,16,209,31*77
+$GPGSV,3,2,11,15,13,332,41,18,18,327,40,19,21,035,45,21,05,299,30*70
+$GPGSV,3,3,11,26,59,278,46,28,61,145,36,29,68,251,47,,,,*46
+$PGRME,11.5,M,17.7,M,13.2,M*1A
+$GPGLL,6128.708,N,02350.002,E,125804,A*24
+$PGRMZ,490,f,3*16
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6023.283,N,02430.650,E,T028*2D
+$GPRMC,125804,A,6128.712,N,02349.996,E,037.3,329.5,110805,006.0,E*7E
+$GPRMB,A,0.04,R,T013,T012,6129.236,N,02346.327,E,001.8,286.6,027.5,V*20
+$GPGGA,125804,6128.714,N,02349.994,E,1,05,1.8,149.3,M,20.7,M,,*49
+$GPGSA,A,3,,,,,,18,19,,26,28,29,,1.8,1.8,1.0*37
+$GPGSV,3,1,11,03,04,013,00,07,01,153,00,08,53,094,40,10,16,209,31*77
+$GPGSV,3,2,11,15,13,332,41,18,18,327,39,19,21,035,44,21,05,299,30*7F
+$GPGSV,3,3,11,26,59,278,46,28,61,145,38,29,68,251,47,,,,*48
+$PGRME,11.1,M,16.6,M,11.1,M*1F
+$GPGLL,6128.720,N,02349.987,E,125806,A*20
+$PGRMZ,490,f,3*16
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6123.283,N,02430.650,E,T027*23
+$GPRMC,125806,A,6128.724,N,02349.982,E,037.4,329.9,110805,006.0,E*77
+$GPRMB,A,0.03,R,T013,T012,6129.236,N,02346.327,E,001.8,286.3,027.1,V*26
+$GPGGA,125807,6128.726,N,02349.980,E,1,05,1.9,149.3,M,20.7,M,,*4F
+$GPGSA,A,3,,,,,,18,19,,26,28,29,,1.9,1.9,1.0*37
+$GPGSV,3,1,11,03,04,013,00,07,01,153,00,08,53,094,40,10,16,209,31*77
+$GPGSV,3,2,11,15,13,332,41,18,18,327,39,19,21,035,43,21,05,299,00*7B
+$GPGSV,3,3,11,26,59,278,45,28,61,145,38,29,68,251,47,,,,*4B
+$PGRME,11.1,M,16.6,M,11.1,M*1F
+$GPGLL,6128.731,N,02349.973,E,125808,A*25
+$PGRMZ,490,f,3*16
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6017.083,N,02452.500,E,T026*24
+$GPRMC,125808,A,6128.736,N,02349.967,E,037.6,330.7,110805,006.0,E*75
+$GPRMB,A,0.02,R,T013,T012,6129.236,N,02346.327,E,001.8,286.0,026.8,V*2C
+$GPGGA,125808,6128.738,N,02349.965,E,1,05,2.1,149.2,M,20.7,M,,*4E
+$GPGSA,A,3,,,,,,18,19,,26,28,29,,2.1,2.1,1.0*37
+$GPGSV,3,1,11,03,04,013,00,07,01,153,00,08,53,094,41,10,16,209,31*76
+$GPGSV,3,2,11,15,13,332,41,18,18,327,40,19,21,035,42,21,05,299,00*74
+$GPGSV,3,3,11,26,59,278,45,28,61,145,38,29,68,251,48,,,,*44
+$PGRME,11.6,M,17.7,M,13.2,M*19
+$GPGLL,6128.743,N,02349.958,E,125809,A*28
+$PGRMZ,485,f,3*12
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6017.083,S,02453.500,E,T025*3B
+$GPRMC,125810,A,6128.747,N,02349.952,E,037.8,330.8,110805,006.0,E*7D
+$GPRMB,A,0.01,R,T013,T012,6129.236,N,02346.327,E,001.8,285.7,026.7,V*24
+$GPGGA,125810,6128.748,N,02349.949,E,1,05,2.5,146.4,M,20.7,M,,*43
+$GPGSA,A,3,,,,,,18,19,,26,28,29,,3.2,2.5,2.1*33
+$GPGSV,3,1,11,03,04,013,00,07,01,153,00,08,53,094,41,10,16,209,31*76
+$GPGSV,3,2,11,15,13,332,39,18,18,327,39,19,21,035,42,21,05,299,00*75
+$GPGSV,3,3,11,26,59,278,45,28,61,145,37,29,68,251,48,,,,*4B
+$PGRME,11.6,M,17.7,M,13.2,M*19
+$GPGLL,6128.754,N,02349.942,E,125810,A*2D
+$PGRMZ,480,f,3*17
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6018.083,N,02453.500,E,T024*28
+$GPRMC,125811,A,6128.759,N,02349.937,E,037.8,331.1,110805,006.0,E*78
+$GPRMB,A,0.00,R,T013,T012,6129.236,N,02346.327,E,001.8,285.5,026.6,V*26
+$GPGGA,125811,6128.760,N,02349.935,E,1,05,2.5,146.3,M,20.7,M,,*44
+$GPGSA,A,3,,,,,,18,19,,26,28,29,,4.3,3.7,1.0*34
+$GPGSV,3,1,11,03,04,013,00,07,01,153,00,08,53,094,41,10,16,209,31*76
+$GPGSV,3,2,11,15,13,332,38,18,18,327,38,19,21,035,41,21,05,299,00*76
+$GPGSV,3,3,11,26,59,278,45,28,61,145,38,29,68,251,48,,,,*44
+$PGRME,16.2,M,16.6,M,17.6,M*1A
+$GPGLL,6128.766,N,02349.928,E,125811,A*21
+$PGRMZ,480,f,3*17
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6017.083,N,02452.500,W,T023*33
+$GPRMC,125812,A,6128.771,N,02349.923,E,037.9,331.5,110805,006.0,E*71
+$GPRMB,A,0.01,L,T013,T012,6129.236,N,02346.327,E,001.8,285.1,026.2,V*39
+$GPGGA,125812,6128.772,N,02349.921,E,1,05,3.7,146.2,M,20.7,M,,*43
+$GPGSA,A,3,,,,,,18,19,,26,28,29,,4.3,3.7,1.0*34
+$GPGSV,3,1,11,03,04,013,00,07,01,153,00,08,53,094,40,10,16,209,31*77
+$GPGSV,3,2,11,15,13,332,39,18,18,327,38,19,21,035,40,21,05,299,00*76
+$GPGSV,3,3,11,26,59,278,44,28,61,145,37,29,68,251,30,,,,*45
+$PGRME,16.2,M,16.6,M,17.6,M*1A
+$GPGLL,6128.778,N,02349.915,E,125813,A*22
+$PGRMZ,480,f,3*17
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6017.083,N,02555.500,E,T022*26
+$GPRMC,125813,A,6128.781,N,02349.908,E,038.0,331.7,110805,006.0,E*72
+$GPRMB,A,0.02,L,T013,T012,6129.236,N,02346.327,E,001.8,284.8,026.1,V*31
+$GPGGA,125814,6128.783,N,02349.906,E,1,05,4.9,142.8,M,20.7,M,,*49
+$GPGSA,A,3,,,,,,18,19,,26,28,29,,5.7,4.9,1.0*38
+$GPGSV,3,1,11,03,04,013,00,07,01,153,00,08,53,094,40,10,16,209,31*77
+$GPGSV,3,2,11,15,13,332,40,18,18,327,36,19,21,035,43,21,05,299,31*77
+$GPGSV,3,3,11,26,59,278,44,28,61,145,37,29,68,251,42,,,,*40
+$PGRME,7.5,M,16.6,M,7.5,M*1F
+$GPGLL,6128.789,N,02349.901,E,125814,A*2E
+$PGRMZ,469,f,3*10
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6017.083,N,02452.500,E,T021*23
+$GPRMC,125815,A,6128.794,N,02349.897,E,037.8,334.5,110805,006.0,E*77
+$GPRMB,A,0.03,L,T013,T012,6129.236,N,02346.327,E,001.8,284.5,024.5,V*3B
+$GPGGA,125815,6128.795,N,02349.895,E,1,05,1.8,142.4,M,20.7,M,,*4C
+$GPGSA,A,3,,,,,,18,19,,26,28,29,,1.8,1.8,1.0*37
+$GPGSV,3,1,11,03,04,013,00,07,01,153,00,08,53,094,39,10,16,209,30*78
+$GPGSV,3,2,11,15,13,332,41,18,18,327,35,19,21,035,44,21,05,299,33*70
+$GPGSV,3,3,11,26,59,278,44,28,61,145,37,29,68,251,43,,,,*41
+$PGRME,8.4,M,17.7,M,9.9,M*13
+$GPGLL,6128.801,N,02349.889,E,125815,A*21
+$PGRMZ,467,f,3*1E
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6116.083,N,02452.500,E,T020*22
+$GPRMC,125816,A,6128.805,N,02349.884,E,036.9,335.7,110805,006.0,E*72
+$GPRMB,A,0.04,L,T013,T012,6129.236,N,02346.327,E,001.8,284.2,023.0,V*39
+$GPGGA,125816,6128.807,N,02349.883,E,1,05,1.8,141.7,M,20.7,M,,*4C
+$GPGSA,A,3,,,,,,18,19,,26,28,29,,1.8,1.8,1.0*37
+$GPGSV,3,1,11,03,04,013,00,07,01,153,00,08,53,094,38,10,16,209,30*79
+$GPGSV,3,2,11,15,13,332,41,18,18,327,33,19,21,035,44,21,05,299,34*71
+$GPGSV,3,3,11,26,59,278,44,28,61,145,38,29,68,251,45,,,,*48
+$PGRME,8.4,M,17.7,M,9.9,M*13
+$GPGLL,6128.812,N,02349.877,E,125817,A*20
+$PGRMZ,465,f,3*1C
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6016.083,S,02452.500,E,T019*34
+$GPRMC,125817,A,6128.817,N,02349.873,E,036.5,335.5,110805,006.0,E*76
+$GPRMB,A,0.05,L,T013,T012,6129.236,N,02346.327,E,001.8,283.9,022.7,V*32
+$GPGGA,125818,6128.819,N,02349.871,E,1,05,1.8,141.7,M,20.7,M,,*40
+$GPGSA,A,3,,,,,,18,19,,26,28,29,,1.8,1.8,1.0*37
+$GPGSV,3,1,11,03,04,013,00,07,01,153,00,08,53,094,38,10,16,209,35*7C
+$GPGSV,3,2,11,15,13,332,42,18,18,327,32,19,21,035,44,21,05,299,34*73
+$GPGSV,3,3,11,26,59,278,44,28,61,145,39,29,68,251,46,,,,*4A
+$PGRME,7.5,M,16.6,M,7.5,M*1F
+$GPGLL,6128.824,N,02349.866,E,125818,A*2A
+$PGRMZ,465,f,3*1C
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6016.083,N,02452.500,E,T018*28
+$GPRMC,125819,A,6128.828,N,02349.861,E,035.9,336.0,110805,006.0,E*7E
+$GPRMB,A,0.06,L,T013,T012,6129.236,N,02346.327,E,001.7,283.5,022.0,V*35
+$GPGGA,125819,6128.830,N,02349.860,E,1,05,1.8,141.7,M,20.7,M,,*4A
+$GPGSA,A,3,,,,,,18,19,,26,28,29,,1.8,1.8,1.0*37
+$GPGSV,3,1,11,03,04,013,00,07,01,153,00,08,53,094,37,10,16,209,37*71
+$GPGSV,3,2,11,15,13,332,42,18,18,327,31,19,21,035,45,21,05,299,34*71
+$GPGSV,3,3,11,26,59,277,44,28,61,145,39,29,68,251,46,,,,*45
+$PGRME,7.5,M,16.6,M,7.5,M*1F
+$GPGLL,6128.835,N,02349.854,E,125819,A*2A
+$PGRMZ,465,f,3*1C
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6013.283,N,02456.650,E,T017*22
+$GPRMC,125820,A,6128.840,N,02349.850,E,035.6,336.0,110805,006.0,E*77
+$GPRMB,A,0.07,L,T013,T012,6129.236,N,02346.327,E,001.7,283.2,021.6,V*36
+$GPGGA,125820,6128.841,N,02349.848,E,1,05,1.8,141.7,M,20.7,M,,*4C
+$GPGSA,A,3,,,,,,18,19,,26,28,29,,1.8,1.8,1.0*37
+$GPGSV,3,1,11,03,04,013,00,07,01,153,00,08,53,094,37,10,16,209,38*7E
+$GPGSV,3,2,11,15,13,332,42,18,18,327,31,19,21,035,45,21,05,299,33*76
+$GPGSV,3,3,11,26,59,277,44,28,61,145,39,29,68,251,46,,,,*45
+$PGRME,7.5,M,16.6,M,7.5,M*1F
+$GPGLL,6128.847,N,02349.842,E,125821,A*23
+$PGRMZ,465,f,3*1C
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6123.283,N,02430.650,E,T016*21
+$GPRMC,125821,A,6128.851,N,02349.838,E,035.8,335.8,110805,006.0,E*7D
+$GPRMB,A,0.07,L,T013,T012,6129.236,N,02346.327,E,001.7,282.9,021.7,V*3D
+$GPGGA,125821,6128.853,N,02349.836,E,1,05,2.2,141.7,M,20.7,M,,*4E
+$GPGSA,A,3,,,,,,18,19,,26,28,29,,2.2,2.2,1.0*37
+$GPGSV,3,1,11,03,04,013,30,07,01,153,00,08,53,094,37,10,16,209,39*7C
+$GPGSV,3,2,11,15,13,332,42,18,18,327,32,19,21,035,45,21,05,299,33*75
+$GPGSV,3,3,11,26,59,277,45,28,61,145,40,29,68,251,46,,,,*4A
+$PGRME,8.4,M,17.7,M,9.9,M*13
+$GPGLL,6128.858,N,02349.831,E,125822,A*2A
+$PGRMZ,463,f,3*1A
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,0000.000,N,00000.000,W,T015*39
+$GPRMC,125823,A,6128.863,N,02349.827,E,035.3,336.5,110805,006.0,E*75
+$GPRMB,A,0.08,L,T013,T012,6129.236,N,02346.327,E,001.7,282.6,020.8,V*33
+$GPGGA,125823,6128.864,N,02349.825,E,1,05,2.2,141.0,M,20.7,M,,*4D
+$GPGSA,A,3,,,,,,18,19,,26,28,29,,1.8,1.8,1.0*37
+$GPGSV,3,1,11,03,04,013,30,07,01,153,00,08,53,094,36,10,16,209,39*7D
+$GPGSV,3,2,11,15,13,332,42,18,18,327,32,19,21,035,45,21,05,299,32*74
+$GPGSV,3,3,11,26,59,277,44,28,61,145,40,29,68,251,46,,,,*4B
+$PGRME,7.5,M,16.6,M,7.5,M*1F
+$GPGLL,6128.870,N,02349.820,E,125823,A*21
+$PGRMZ,463,f,3*1A
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,0009.000,N,02430.650,E,T014*25
+$GPRMC,125824,A,6128.874,N,02349.816,E,035.4,336.9,110805,006.0,E*7D
+$GPRMB,A,0.09,L,T013,T012,6129.236,N,02346.327,E,001.7,282.2,020.6,V*38
+$GPGGA,125824,6128.876,N,02349.814,E,1,05,1.8,141.0,M,20.7,M,,*42
+$GPGSA,A,3,,,,,,18,19,,26,28,29,,1.8,1.8,1.0*37
+$GPGSV,3,1,11,03,04,013,30,07,01,153,00,08,53,094,38,10,16,209,40*7D
+$GPGSV,3,2,11,15,13,332,42,18,18,327,34,19,21,035,45,21,05,299,31*71
+$GPGSV,3,3,11,26,59,277,44,28,61,145,40,29,68,251,46,,,,*4B
+$PGRME,8.4,M,17.7,M,10.0,M*22
+$GPGLL,6128.881,N,02349.810,E,125824,A*2B
+$PGRMZ,459,f,3*13
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6123.285,N,02430.651,E,T013*23
+$GPRMC,125825,A,6128.885,N,02349.807,E,034.2,338.9,110805,006.0,E*7B
+$GPRMB,A,0.10,L,T013,T012,6129.236,N,02346.327,E,001.7,281.9,018.6,V*33
+$GPGGA,125825,6128.887,N,02349.805,E,1,05,1.8,140.0,M,20.7,M,,*4C
+$GPGSA,A,3,,,,,,18,19,,26,28,29,,1.8,1.8,1.0*37
+$GPGSV,3,1,11,03,04,013,30,07,01,153,00,08,53,094,37,10,16,209,40*72
+$GPGSV,3,2,11,15,13,332,42,18,18,327,33,19,21,035,45,21,05,299,31*76
+$GPGSV,3,3,11,26,59,277,44,28,61,145,40,29,68,251,46,,,,*4B
+$PGRME,7.5,M,16.6,M,7.5,M*1F
+$GPGLL,6128.891,N,02349.800,E,125826,A*29
+$PGRMZ,454,f,3*1E
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6129.236,N,02346.327,E,T012*22
+$GPRMC,125826,A,6128.896,N,02349.797,E,034.1,339.1,110805,006.0,E*76
+$GPRMB,A,0.11,L,T013,T012,6129.236,N,02346.327,E,001.7,281.6,018.4,V*3F
+$GPGGA,125827,6128.898,N,02349.795,E,1,05,2.1,138.5,M,20.7,M,,*46
+$GPGSA,A,3,,,,,,18,19,,26,28,29,,2.5,2.1,1.6*35
+$GPGSV,3,1,11,03,04,013,00,07,01,153,00,08,53,094,38,10,16,209,40*7E
+$GPGSV,3,2,11,15,13,332,42,18,18,327,37,19,21,035,44,21,05,299,31*73
+$GPGSV,3,3,11,26,59,277,44,28,62,144,40,29,68,251,46,,,,*49
+$PGRME,8.4,M,17.7,M,10.0,M*22
+$GPGLL,6128.902,N,02349.791,E,125827,A*24
+$PGRMZ,450,f,3*1A
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6114.236,N,02346.327,E,T011*2F
+$GPRMC,125828,A,6128.907,N,02349.787,E,033.9,339.2,110805,006.0,E*7C
+$GPRMB,A,0.12,L,T013,T012,6129.236,N,02346.327,E,001.7,281.3,018.1,V*3C
+$GPGGA,125828,6128.909,N,02349.786,E,1,05,2.3,137.1,M,20.7,M,,*4B
+$GPGSA,A,3,,,,,,18,19,,26,28,29,,2.8,2.3,1.0*3C
+$GPGSV,3,1,11,03,04,013,00,07,01,153,00,08,53,094,37,10,16,209,39*7F
+$GPGSV,3,2,11,15,13,332,42,18,18,327,38,19,21,035,43,21,05,299,31*7B
+$GPGSV,3,3,11,26,59,277,45,28,62,144,39,29,68,251,46,,,,*46
+$PGRME,8.7,M,16.6,M,10.1,M*20
+$GPGLL,6128.914,N,02349.782,E,125829,A*2F
+$PGRMZ,450,f,3*1A
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6220.236,N,02346.327,E,T010*2A
+$GPRMC,125829,A,6128.918,N,02349.778,E,033.5,339.5,110805,006.0,E*78
+$GPRMB,A,0.13,L,T013,T012,6129.236,N,02346.327,E,001.7,280.9,017.5,V*3D
+$GPGGA,125829,6128.919,N,02349.776,E,1,05,2.5,135.1,M,20.7,M,,*40
+$GPGSA,A,3,,,,,,18,19,,26,28,29,,3.3,2.5,1.6*36
+$GPGSV,3,1,11,03,04,013,00,07,01,153,00,08,53,094,36,10,16,209,39*7E
+$GPGSV,3,2,11,15,13,332,41,18,18,327,39,19,21,035,43,21,05,299,31*79
+$GPGSV,3,3,11,26,59,277,45,28,62,144,39,29,68,251,46,,,,*46
+$PGRME,9.4,M,17.7,M,12.3,M*22
+$GPGLL,6128.925,N,02349.772,E,125830,A*2A
+$PGRMZ,437,f,3*1B
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6120.236,N,02346.327,E,T009*21
+$GPRMC,125830,A,6128.928,N,02349.768,E,033.4,339.8,110805,006.0,E*7E
+$GPRMB,A,0.14,L,T013,T012,6129.236,N,02346.327,E,001.7,280.6,017.1,V*31
+$GPGGA,125831,6128.930,N,02349.767,E,1,05,2.6,133.2,M,20.7,M,,*44
+$GPGSA,A,3,,,,,,18,19,,26,28,29,,3.8,2.6,2.1*3A
+$GPGSV,3,1,11,03,04,013,00,07,01,153,00,08,53,094,35,10,16,209,37*73
+$GPGSV,3,2,11,15,13,332,41,18,18,327,41,19,21,035,44,21,05,299,30*70
+$GPGSV,3,3,11,26,59,277,45,28,62,144,37,29,68,249,45,,,,*42
+$PGRME,14.3,M,24.4,M,21.3,M*1A
+$GPGLL,6128.935,N,02349.762,E,125831,A*2B
+$PGRMZ,432,f,3*1E
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6129.234,N,02346.317,E,T008*28
+$GPRMC,125832,A,6128.939,N,02349.759,E,033.4,340.1,110805,006.0,E*79
+$GPRMB,A,0.15,L,T013,T012,6129.236,N,02346.327,E,001.7,280.2,016.9,V*3D
+$GPGGA,125832,6128.940,N,02349.757,E,1,05,3.9,129.7,M,20.7,M,,*43
+$GPGSA,A,3,,,,,,18,19,,26,28,29,,6.2,3.9,4.3*3F
+$GPGSV,3,1,11,03,04,013,00,07,01,153,00,08,53,094,33,10,16,209,36*74
+$GPGSV,3,2,11,15,13,332,41,18,18,327,41,19,21,035,44,21,05,299,30*70
+$GPGSV,3,3,11,26,59,277,45,28,62,144,36,29,68,249,46,,,,*40
+$PGRME,14.5,M,24.7,M,22.3,M*1C
+$GPGLL,6128.945,N,02349.753,E,125833,A*2C
+$PGRMZ,426,f,3*1B
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6157.564,N,02406.158,E,T007*26
+$GPRMC,125833,A,6128.951,N,02349.748,E,033.4,340.4,110805,006.0,E*73
+$GPRMB,A,0.16,L,T013,T012,6129.236,N,02346.327,E,001.7,279.9,016.5,V*3F
+$GPGGA,125833,6128.952,N,02349.747,E,1,05,3.9,127.9,M,20.7,M,,*40
+$GPGSA,A,3,,,,,,18,19,,26,28,29,,6.4,3.9,4.6*3C
+$GPGSV,3,1,11,03,04,013,00,07,01,153,00,08,53,094,31,10,16,209,35*75
+$GPGSV,3,2,11,15,13,332,40,18,18,327,41,19,21,035,43,21,05,299,30*76
+$GPGSV,3,3,11,26,59,277,45,28,62,144,35,29,68,249,46,,,,*43
+$PGRME,17.1,M,16.6,M,24.2,M*1C
+$GPGLL,6128.958,N,02349.743,E,125834,A*26
+$PGRMZ,420,f,3*1D
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6145.919,N,02345.544,E,T006*2B
+$GPRMC,125834,A,6128.962,N,02349.740,E,033.3,340.2,110805,006.0,E*7D
+$GPRMB,A,0.17,L,T013,T012,6129.236,N,02346.327,E,001.7,279.5,016.4,V*33
+$GPGGA,125835,6128.964,N,02349.738,E,1,05,4.5,127.9,M,20.7,M,,*40
+$GPGSA,A,3,,,,,,18,19,,26,28,29,,6.8,4.5,1.0*38
+$GPGSV,3,1,11,03,04,013,00,07,01,153,00,08,53,094,30,10,16,209,35*74
+$GPGSV,3,2,11,15,13,332,41,18,18,327,41,19,21,035,42,21,05,299,30*76
+$GPGSV,3,3,11,26,59,277,45,28,62,144,35,29,68,249,46,,,,*43
+$PGRME,21.1,M,23.4,M,31.9,M*12
+$GPGLL,6128.969,N,02349.734,E,125835,A*25
+$PGRMZ,416,f,3*18
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6130.198,N,02342.702,E,T005*2C
+$GPRMC,125835,A,6128.973,N,02349.731,E,033.3,340.5,110805,006.0,E*7D
+$GPRMB,A,0.18,L,T013,T012,6129.236,N,02346.327,E,001.7,279.2,016.0,V*3F
+$GPGGA,125835,6128.975,N,02349.730,E,1,05,5.6,127.0,M,20.7,M,,*43
+$GPGSA,A,3,,,,,,18,19,,26,28,29,,8.7,5.6,3.1*38
+$GPGSV,3,1,11,03,04,013,00,07,01,153,00,08,53,094,30,10,16,209,34*75
+$GPGSV,3,2,11,15,13,332,41,18,18,327,41,19,21,035,41,21,05,299,30*75
+$GPGSV,3,3,11,26,59,277,45,28,62,144,35,29,68,249,46,,,,*43
+$PGRME,21.1,M,23.4,M,31.9,M*12
+$GPGLL,6128.980,N,02349.726,E,125835,A*21
+$PGRMZ,417,f,3*19
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6216.183,N,02619.685,E,T004*25
+$GPRMC,125837,A,6128.984,N,02349.723,E,033.3,340.5,110805,006.0,E*74
+$GPRMB,A,0.19,L,T013,T012,6129.236,N,02346.327,E,001.6,278.8,016.0,V*34
+$GPGGA,125837,6128.986,N,02349.721,E,1,05,5.6,127.1,M,20.7,M,,*4C
+$GPGSA,A,3,,,,,,18,19,,26,28,29,,2.8,2.8,1.0*37
+$GPGSV,3,1,11,03,04,013,00,07,01,153,00,08,53,094,35,10,16,209,34*70
+$GPGSV,3,2,11,15,13,332,41,18,18,327,40,19,21,035,41,21,05,299,30*74
+$GPGSV,3,3,11,26,59,277,46,28,62,144,37,29,68,249,46,,,,*42
+$PGRME,11.1,M,16.6,M,11.1,M*1F
+$GPGLL,6128.991,N,02349.718,E,125837,A*2E
+$PGRMZ,417,f,3*19
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6215.064,N,02603.837,E,T003*25
+$GPRMC,125838,A,6128.995,N,02349.715,E,032.1,341.4,110805,006.0,E*7D
+$GPRMB,A,0.20,L,T013,T012,6129.236,N,02346.327,E,001.6,278.4,015.2,V*33
+$GPGGA,125838,6128.996,N,02349.714,E,1,05,2.9,126.0,M,20.7,M,,*4C
+$GPGSA,A,3,,,,,,18,19,,26,28,29,,3.3,2.9,1.6*3A
+$GPGSV,3,1,11,03,04,013,00,07,01,153,00,08,53,094,36,10,16,209,33*74
+$GPGSV,3,2,11,15,13,332,40,18,18,327,40,19,21,035,39,21,05,299,30*7A
+$GPGSV,3,3,11,26,59,277,46,28,62,144,40,29,68,249,46,,,,*42
+$PGRME,11.7,M,17.7,M,13.2,M*18
+$GPGLL,6129.001,N,02349.710,E,125839,A*29
+$PGRMZ,409,f,3*16
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6151.098,N,02510.924,E,T002*26
+$GPRMC,125840,A,6129.005,N,02349.707,E,031.2,341.9,110805,006.0,E*7D
+$GPRMB,A,0.21,L,T013,T012,6129.236,N,02346.327,E,001.6,278.1,013.2,V*31
+$GPGGA,125840,6129.006,N,02349.706,E,1,05,3.1,124.1,M,20.7,M,,*4B
+$GPGSA,A,3,,,,,,18,19,,26,28,29,,4.2,3.1,2.6*36
+$GPGSV,3,1,11,03,04,013,00,07,01,153,00,08,53,094,35,10,16,209,33*77
+$GPGSV,3,2,11,15,13,332,40,18,18,327,39,19,21,035,39,21,05,299,30*74
+$GPGSV,3,3,11,26,59,277,46,28,62,144,40,29,68,249,46,,,,*42
+$PGRME,11.7,M,17.7,M,13.2,M*18
+$GPGLL,6129.011,N,02349.703,E,125841,A*25
+$PGRMZ,407,f,3*18
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6129.271,N,02346.376,E,T001*27
+$GPRMC,125841,A,6129.015,N,02349.701,E,030.3,342.4,110805,006.0,E*75
+$GPRMB,A,0.21,L,T013,T012,6129.236,N,02346.327,E,001.6,277.8,013.2,V*37
+$GPGGA,125841,6129.014,N,02349.701,E,1,05,1.9,124.3,M,20.7,M,,*46
+$GPGSA,A,3,,,,,,18,19,,26,28,29,,1.9,1.9,1.0*37
+$GPGSV,3,1,11,03,04,013,00,07,01,153,00,08,53,094,37,10,16,209,32*74
+$GPGSV,3,2,11,15,13,332,41,18,18,327,39,19,21,035,39,21,05,299,30*75
+$GPGSV,3,3,11,26,59,277,46,28,62,144,40,29,68,249,46,,,,*42
+$PGRME,8.4,M,17.8,M,10.0,M*2D
+$GPGLL,6129.016,N,02349.699,E,125842,A*23
+$PGRMZ,402,f,3*1D
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPRTE,4,1,c,0,T030,T029,T028,T027,T026,T025,T024,T023,T022*49
+$GPRTE,4,2,c,0,T021,T020,T019,T018,T017,T016,T015,T014,T013*4B
+$GPRTE,4,3,c,0,T012,T011,T010,T009,T008,T007,T006,T005,T004*4B
+$GPRTE,4,4,c,0,T003,T002,T001*4F
+$GPWPL,6016.083,N,02452.500,E,T030*22
+$GPRMC,125843,A,6129.021,N,02349.697,E,018.3,344.6,110805,006.0,E*70
+$GPRMB,A,0.22,L,T013,T012,6129.236,N,02346.327,E,001.6,277.6,007.2,V*3F
+$GPGGA,125843,6129.021,N,02349.696,E,1,05,2.3,122.5,M,20.7,M,,*44
+$GPGSA,A,3,,,,,,18,19,,26,28,29,,3.0,2.3,2.1*37
+$GPGSV,3,1,11,03,04,013,00,07,01,153,00,08,53,094,40,10,16,209,31*77
+$GPGSV,3,2,11,15,13,332,41,18,18,327,39,19,21,035,39,21,05,299,30*75
+$GPGSV,3,3,11,26,59,277,46,28,62,144,41,29,68,249,47,,,,*42
+$PGRME,8.4,M,17.8,M,10.0,M*2D
+$GPGLL,6129.023,N,02349.694,E,125844,A*2E
+$PGRMZ,396,f,3*17
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6123.283,N,02430.650,E,T029*2D
+$GPRMC,125844,A,6129.024,N,02349.692,E,014.1,341.0,110805,006.0,E*7A
+$GPRMB,A,0.22,L,T013,T012,6129.236,N,02346.327,E,001.6,277.5,006.3,V*3C
+$GPGGA,125844,6129.025,N,02349.692,E,1,05,2.5,119.1,M,20.7,M,,*49
+$GPGSA,A,3,,,,,,18,19,,26,28,29,,3.5,2.5,2.6*33
+$GPGSV,3,1,11,03,04,013,00,07,01,153,00,08,53,094,41,10,16,209,31*76
+$GPGSV,3,2,11,15,13,332,41,18,18,327,39,19,21,035,39,21,05,299,30*75
+$GPGSV,3,3,11,26,59,277,45,28,62,144,41,29,68,249,46,,,,*40
+$PGRME,8.4,M,17.8,M,10.0,M*2D
+$GPGLL,6129.027,N,02349.690,E,125845,A*2F
+$PGRMZ,390,f,3*11
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6023.283,N,02430.650,E,T028*2D
+$GPRMC,125845,A,6129.029,N,02349.689,E,014.1,341.0,110805,006.0,E*7C
+$GPRMB,A,0.23,L,T013,T012,6129.236,N,02346.327,E,001.6,277.4,006.3,V*3C
+$GPGGA,125845,6129.029,N,02349.689,E,1,05,2.7,118.0,M,20.7,M,,*4C
+$GPGSA,A,3,,,,,,18,19,,26,28,29,,4.1,2.7,3.2*37
+$GPGSV,3,1,11,03,04,013,00,07,01,153,00,08,53,094,44,10,16,209,31*73
+$GPGSV,3,2,11,15,13,332,41,18,18,327,41,19,21,035,37,21,05,299,30*74
+$GPGSV,3,3,11,26,59,277,42,28,62,144,40,29,68,249,45,,,,*45
+$PGRME,14.3,M,25.8,M,21.7,M*13
+$GPGLL,6129.024,N,02349.688,E,125846,A*26
+$PGRMZ,377,f,3*18
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6123.283,N,02430.650,E,T027*23
+$GPRMC,125847,A,6129.022,N,02349.687,E,018.8,187.4,110805,006.0,E*72
+$GPRMB,A,0.22,L,T013,T012,6129.236,N,02346.327,E,001.6,277.6,-000.0,V*17
+$GPGGA,125847,6129.023,N,02349.687,E,1,05,3.9,113.6,M,20.7,M,,*48
+$GPGSA,A,3,,,,,,18,19,,26,28,29,,6.5,3.9,5.2*38
+$GPGSV,3,1,11,03,04,013,00,07,01,153,00,08,53,094,44,10,16,209,30*72
+$GPGSV,3,2,11,15,13,332,41,18,18,327,41,19,21,035,36,21,05,299,30*75
+$GPGSV,3,3,11,26,59,277,42,28,62,144,38,29,68,249,44,,,,*4B
+$PGRME,14.5,M,26.0,M,22.8,M*12
+$GPGLL,6129.025,N,02349.686,E,125847,A*28
+$PGRMZ,370,f,3*1F
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6017.083,N,02452.500,E,T026*24
+$GPRMC,125848,A,6129.026,N,02349.686,E,007.4,346.0,110805,006.0,E*71
+$GPRMB,A,0.22,L,T013,T012,6129.236,N,02346.327,E,001.6,277.5,003.8,V*32
+$GPGGA,125848,6129.026,N,02349.685,E,1,05,3.9,112.2,M,20.7,M,,*45
+$GPGSA,A,3,,,,,,18,19,,26,28,29,,6.7,3.9,5.4*3C
+$GPGSV,3,1,11,03,04,013,00,07,01,153,00,08,53,094,43,10,16,209,30*75
+$GPGSV,3,2,11,15,13,332,41,18,18,327,41,19,21,035,36,21,05,299,30*75
+$GPGSV,3,3,11,26,59,277,41,28,62,144,38,29,68,249,44,,,,*48
+$PGRME,14.5,M,26.0,M,22.8,M*12
+$GPGLL,6129.027,N,02349.685,E,125849,A*27
+$PGRMZ,363,f,3*1D
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6017.083,S,02453.500,E,T025*3B
+$GPRMC,125849,A,6129.027,N,02349.685,E,006.2,346.9,110805,006.0,E*7C
+$GPRMB,A,0.22,L,T013,T012,6129.236,N,02346.327,E,001.6,277.4,002.2,V*38
+$GPGGA,125849,6129.028,N,02349.684,E,1,05,3.9,110.0,M,20.7,M,,*4B
+$GPGSA,A,3,,,,,,18,19,,26,28,29,,6.8,3.9,5.5*32
+$GPGSV,3,1,11,03,04,013,00,07,01,153,00,08,53,094,43,10,16,209,31*74
+$GPGSV,3,2,11,15,13,332,40,18,18,327,39,19,21,035,36,21,05,299,30*7B
+$GPGSV,3,3,11,26,59,277,42,28,62,144,37,29,68,249,44,,,,*44
+$PGRME,14.5,M,26.0,M,22.8,M*12
+$GPGLL,6129.028,N,02349.684,E,125850,A*21
+$PGRMZ,357,f,3*1A
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6018.083,N,02453.500,E,T024*28
+$GPRMC,125851,A,6129.029,N,02349.683,E,004.2,339.9,110805,006.0,E*77
+$GPRMB,A,0.23,L,T013,T012,6129.236,N,02346.327,E,001.6,277.4,001.9,V*31
+$GPGGA,125851,6129.028,N,02349.684,E,1,05,4.1,107.8,M,20.7,M,,*43
+$GPGSA,A,3,,,,,,18,19,,26,28,29,,5.7,4.1,1.0*30
+$GPGSV,3,1,11,03,04,013,00,07,01,153,00,08,53,094,44,10,16,209,31*73
+$GPGSV,3,2,11,15,13,332,40,18,18,327,39,19,21,035,37,21,05,299,31*7B
+$GPGSV,3,3,11,26,59,277,40,28,62,144,36,29,68,249,44,,,,*47
+$PGRME,14.5,M,26.0,M,22.8,M*12
+$GPGLL,6129.028,N,02349.683,E,125851,A*27
+$PGRMZ,353,f,3*1E
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6017.083,N,02452.500,W,T023*33
+$GPRMC,125852,A,6129.028,N,02349.683,E,002.2,326.6,110805,006.0,E*72
+$GPRMB,A,0.23,L,T013,T012,6129.236,N,02346.327,E,001.6,277.4,001.3,V*3B
+$GPGGA,125852,6129.028,N,02349.683,E,1,05,4.1,105.9,M,20.7,M,,*44
+$GPGSA,A,3,,,,,,18,19,,26,28,29,,5.9,4.1,1.6*38
+$GPGSV,3,1,11,03,04,013,00,07,01,153,00,08,53,094,44,10,16,209,31*73
+$GPGSV,3,2,11,15,13,332,40,18,18,327,39,19,21,035,37,21,05,299,31*7B
+$GPGSV,3,3,11,26,59,277,40,28,62,144,35,29,68,249,44,,,,*44
+$PGRME,14.5,M,26.0,M,22.8,M*12
+$GPGLL,6129.028,N,02349.682,E,125853,A*24
+$PGRMZ,344,f,3*18
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6017.083,N,02555.500,E,T022*26
+$GPRMC,125853,A,6129.027,N,02349.682,E,000.0,326.6,110805,006.0,E*7D
+$GPRMB,A,0.22,L,T013,T012,6129.236,N,02346.327,E,001.6,277.4,,V*16
+$GPGGA,125853,6129.028,N,02349.682,E,1,05,4.2,104.5,M,20.7,M,,*4A
+$GPGSA,A,3,,,,,,18,19,,26,28,29,,5.7,4.2,1.0*33
+$GPGSV,3,1,11,03,04,013,00,07,01,153,00,08,53,094,43,10,16,209,31*74
+$GPGSV,3,2,11,15,13,332,40,18,18,327,39,19,21,035,37,21,05,299,30*7A
+$GPGSV,3,3,11,26,59,277,41,28,62,144,36,29,68,249,44,,,,*46
+$PGRME,14.5,M,26.0,M,22.8,M*12
+$GPGLL,6129.028,N,02349.682,E,125854,A*23
+$PGRMZ,342,f,3*1E
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6017.083,N,02452.500,E,T021*23
+$GPRMC,125854,A,6129.028,N,02349.682,E,000.0,326.6,110805,006.0,E*75
+$GPRMB,A,0.22,L,T013,T012,6129.236,N,02346.327,E,001.6,277.4,,V*16
+$GPGGA,125854,6129.028,N,02349.682,E,1,05,2.8,104.2,M,20.7,M,,*46
+$GPGSA,A,3,,,,,,18,19,,26,28,29,,2.8,2.8,1.0*37
+$GPGSV,3,1,11,03,03,012,00,07,01,153,00,08,53,094,41,10,16,209,31*70
+$GPGSV,3,2,11,15,13,332,41,18,18,327,38,19,21,035,35,21,05,299,31*79
+$GPGSV,3,3,11,26,59,277,44,28,62,144,42,29,68,249,45,,,,*41
+$PGRME,11.1,M,16.6,M,11.1,M*1F
+$GPGLL,6129.027,N,02349.683,E,125855,A*2C
+$PGRMZ,342,f,3*1E
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6116.083,N,02452.500,E,T020*22
+$GPRMC,125856,A,6129.027,N,02349.682,E,000.0,326.6,110805,006.0,E*78
+$GPRMB,A,0.22,L,T013,T012,6129.236,N,02346.327,E,001.6,277.4,,V*16
+$GPGGA,125856,6129.027,N,02349.683,E,1,05,2.8,104.1,M,20.7,M,,*49
+$GPGSA,A,3,,,,,,18,19,,26,28,29,,2.8,2.8,1.0*37
+$GPGSV,3,1,11,03,03,012,00,07,01,153,00,08,53,094,40,10,16,209,31*71
+$GPGSV,3,2,11,15,13,332,41,18,18,327,38,19,21,035,34,21,05,299,31*78
+$GPGSV,3,3,11,26,59,277,45,28,62,144,43,29,68,249,45,,,,*41
+$PGRME,11.1,M,16.6,M,11.1,M*1F
+$GPGLL,6129.027,N,02349.683,E,125857,A*2E
+$PGRMZ,341,f,3*1D
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6016.083,S,02452.500,E,T019*34
+$GPRMC,125857,A,6129.027,N,02349.683,E,000.0,326.6,110805,006.0,E*78
+$GPRMB,A,0.22,L,T013,T012,6129.236,N,02346.327,E,001.6,277.4,,V*16
+$GPGGA,125857,6129.026,N,02349.682,E,1,05,2.9,103.1,M,20.7,M,,*4E
+$GPGSA,A,3,,,,,,18,19,,26,28,29,,3.3,2.9,1.6*3A
+$GPGSV,3,1,11,03,03,012,00,07,01,153,00,08,53,094,39,10,16,209,31*7F
+$GPGSV,3,2,11,15,13,332,41,18,18,327,37,19,21,035,34,21,05,299,31*77
+$GPGSV,3,3,11,26,59,277,45,28,62,144,43,29,68,249,46,,,,*42
+$PGRME,11.7,M,17.8,M,13.3,M*16
+$GPGLL,6129.026,N,02349.682,E,125858,A*21
+$PGRMZ,335,f,3*1E
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6016.083,N,02452.500,E,T018*28
+$GPRMC,125858,A,6129.026,N,02349.682,E,000.0,326.6,110805,006.0,E*77
+$GPRMB,A,0.22,L,T013,T012,6129.236,N,02346.327,E,001.6,277.5,,V*17
+$GPGGA,125858,6129.026,N,02349.682,E,1,05,3.0,102.1,M,20.7,M,,*48
+$GPGSA,A,3,,,,,,18,19,,26,28,29,,3.8,3.0,2.1*3D
+$GPGSV,3,1,11,03,03,012,00,07,01,153,00,08,53,094,38,10,16,209,31*7E
+$GPGSV,3,2,11,15,13,332,41,18,18,327,37,19,21,035,33,21,05,299,31*70
+$GPGSV,3,3,11,26,59,277,46,28,62,144,44,29,68,249,46,,,,*46
+$PGRME,11.7,M,17.8,M,13.3,M*16
+$GPGLL,6129.025,N,02349.681,E,125859,A*20
+$PGRMZ,332,f,3*19
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6013.283,N,02456.650,E,T017*22
+$GPRMC,125900,A,6129.025,N,02349.681,E,000.0,326.6,110805,006.0,E*7B
+$GPRMB,A,0.22,L,T013,T012,6129.236,N,02346.327,E,001.6,277.5,,V*17
+$GPGGA,125900,6129.025,N,02349.681,E,1,05,3.1,101.2,M,20.7,M,,*45
+$GPGSA,A,3,,,,,,18,19,,26,28,29,,4.2,3.1,2.6*36
+$GPGSV,3,1,11,03,03,012,00,07,01,153,00,08,53,094,38,10,16,209,30*7F
+$GPGSV,3,2,11,15,13,332,41,18,18,327,37,19,21,035,33,21,05,299,31*70
+$GPGSV,3,3,11,26,59,277,46,28,62,144,44,29,68,249,46,,,,*46
+$PGRME,11.1,M,16.6,M,11.1,M*1F
+$GPGLL,6129.025,N,02349.681,E,125900,A*2D
+$PGRMZ,332,f,3*19
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6123.283,N,02430.650,E,T016*21
+$GPRMC,125901,A,6129.025,N,02349.681,E,000.0,326.6,110805,006.0,E*7A
+$GPRMB,A,0.22,L,T013,T012,6129.236,N,02346.327,E,001.6,277.5,,V*17
+$GPGGA,125901,6129.025,N,02349.681,E,1,05,2.9,101.1,M,20.7,M,,*4E
+$GPGSA,A,3,,,,,,18,19,,26,28,29,,3.3,2.9,1.6*3A
+$GPGSV,3,1,11,03,03,012,00,07,01,153,00,08,53,094,39,10,16,209,30*7E
+$GPGSV,3,2,11,15,13,332,41,18,18,327,37,19,21,035,33,21,05,299,30*71
+$GPGSV,3,3,11,26,59,277,46,28,62,144,45,29,68,249,46,,,,*47
+$PGRME,11.7,M,17.8,M,13.3,M*16
+$GPGLL,6129.025,N,02349.681,E,125902,A*2F
+$PGRMZ,331,f,3*1A
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,0000.000,N,00000.000,W,T015*39
+$GPRMC,125902,A,6129.025,N,02349.681,E,000.0,326.6,110805,006.0,E*79
+$GPRMB,A,0.22,L,T013,T012,6129.236,N,02346.327,E,001.6,277.5,,V*17
+$GPGGA,125902,6129.025,N,02349.681,E,1,05,3.0,101.0,M,20.7,M,,*44
+$GPGSA,A,3,,,,,,18,19,,26,28,29,,3.8,3.0,2.1*3D
+$GPGSV,3,1,11,03,03,012,00,07,01,153,00,08,53,094,38,10,16,209,31*7E
+$GPGSV,3,2,11,15,13,332,42,18,18,327,37,19,21,035,32,21,05,299,31*72
+$GPGSV,3,3,11,26,59,277,46,28,62,144,44,29,68,249,46,,,,*46
+$PGRME,11.1,M,16.6,M,11.1,M*1F
+$GPGLL,6129.025,N,02349.681,E,125903,A*2E
+$PGRMZ,332,f,3*19
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,0009.000,N,02430.650,E,T014*25
+$GPRMC,125903,A,6129.025,N,02349.681,E,000.0,326.6,110805,006.0,E*78
+$GPRMB,A,0.22,L,T013,T012,6129.236,N,02346.327,E,001.6,277.5,,V*17
+$GPGGA,125904,6129.025,N,02349.681,E,1,05,2.8,101.1,M,20.7,M,,*4A
+$GPGSA,A,3,,,,,,18,19,,26,28,29,,2.8,2.8,1.0*37
+$GPGSV,3,1,11,03,03,012,00,07,01,153,00,08,53,094,38,10,16,209,31*7E
+$GPGSV,3,2,11,15,13,332,41,18,18,327,36,19,21,035,31,21,05,299,31*73
+$GPGSV,3,3,11,26,59,277,46,28,62,144,44,29,68,249,46,,,,*46
+$PGRME,11.1,M,16.6,M,11.1,M*1F
+$GPGLL,6129.025,N,02349.681,E,125904,A*29
+$PGRMZ,332,f,3*19
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6123.285,N,02430.651,E,T013*23
+$GPRMC,125905,A,6129.025,N,02349.682,E,000.0,326.6,110805,006.0,E*7D
+$GPRMB,A,0.22,L,T013,T012,6129.236,N,02346.327,E,001.6,277.5,,V*17
+$GPGGA,125905,6129.025,N,02349.682,E,1,05,2.8,101.2,M,20.7,M,,*4B
+$GPGSA,A,3,,,,,,18,19,,26,28,29,,2.8,2.8,1.0*37
+$GPGSV,3,1,11,03,03,012,00,07,01,153,00,08,53,094,38,10,16,209,31*7E
+$GPGSV,3,2,11,15,13,332,41,18,18,327,36,19,21,035,31,21,05,299,31*73
+$GPGSV,3,3,11,26,59,277,46,28,62,144,44,29,68,249,46,,,,*46
+$PGRME,11.1,M,16.6,M,11.1,M*1F
+$GPGLL,6129.025,N,02349.682,E,125906,A*28
+$PGRMZ,332,f,3*19
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6129.236,N,02346.327,E,T012*22
+$GPRMC,125906,A,6129.024,N,02349.681,E,000.0,326.6,110805,006.0,E*7C
+$GPRMB,A,0.22,L,T013,T012,6129.236,N,02346.327,E,001.6,277.5,,V*17
+$GPGGA,125906,6129.024,N,02349.681,E,1,05,3.9,101.2,M,20.7,M,,*4A
+$GPGSA,A,3,,,,,,18,19,,26,28,29,,3.9,3.9,1.0*37
+$GPGSV,3,1,11,03,03,012,00,07,01,153,00,08,53,094,38,10,16,209,31*7E
+$GPGSV,3,2,11,15,13,332,41,18,18,327,36,19,21,035,31,21,05,299,31*73
+$GPGSV,3,3,11,26,59,277,47,28,62,144,45,29,68,249,46,,,,*46
+$PGRME,15.6,M,16.6,M,15.6,M*1F
+$GPGLL,6129.024,N,02349.681,E,125906,A*2A
+$PGRMZ,332,f,3*19
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6114.236,N,02346.327,E,T011*2F
+$GPRMC,125907,A,6129.024,N,02349.681,E,000.0,326.6,110805,006.0,E*7D
+$GPRMB,A,0.22,L,T013,T012,6129.236,N,02346.327,E,001.6,277.5,,V*17
+$GPGGA,125907,6129.024,N,02349.681,E,1,05,4.9,101.3,M,20.7,M,,*4D
+$GPGSA,A,3,,,,,,18,19,,26,28,29,,4.9,4.9,1.0*37
+$GPGSV,3,1,11,03,03,012,00,07,01,153,00,08,53,094,38,10,16,209,30*7F
+$GPGSV,3,2,11,15,13,332,41,18,18,327,35,19,21,035,30,21,05,299,31*71
+$GPGSV,3,3,11,26,59,277,46,28,62,144,44,29,68,249,46,,,,*46
+$PGRME,15.6,M,16.6,M,15.6,M*1F
+$GPGLL,6129.024,N,02349.681,E,125908,A*24
+$PGRMZ,332,f,3*19
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6220.236,N,02346.327,E,T010*2A
+$GPRMC,125909,A,6129.024,N,02349.681,E,000.0,326.6,110805,006.0,E*73
+$GPRMB,A,0.22,L,T013,T012,6129.236,N,02346.327,E,001.6,277.6,,V*14
+$GPGGA,125909,6129.023,N,02349.681,E,1,05,6.7,101.3,M,20.7,M,,*48
+$GPGSA,A,3,,,,,,18,19,,26,28,29,,6.7,6.7,1.0*37
+$GPGSV,3,1,11,03,03,012,00,07,01,153,00,08,53,094,37,10,16,209,31*71
+$GPGSV,3,2,11,15,13,332,41,18,18,327,34,19,21,035,30,21,05,299,31*70
+$GPGSV,3,3,11,26,59,277,46,28,62,144,44,29,68,249,46,,,,*46
+$PGRME,15.6,M,16.6,M,15.6,M*1F
+$GPGLL,6129.023,N,02349.681,E,125909,A*22
+$PGRMZ,332,f,3*19
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6120.236,N,02346.327,E,T009*21
+$GPRMC,125910,A,6129.023,N,02349.681,E,000.0,326.6,110805,006.0,E*7C
+$GPRMB,A,0.22,L,T013,T012,6129.236,N,02346.327,E,001.6,277.6,,V*14
+$GPGGA,125910,6129.023,N,02349.681,E,1,05,2.8,101.4,M,20.7,M,,*4C
+$GPGSA,A,3,,,,,,18,19,,26,28,29,,2.8,2.8,1.0*37
+$GPGSV,3,1,11,03,03,012,00,07,02,153,00,08,53,094,37,10,16,209,31*72
+$GPGSV,3,2,11,15,13,332,41,18,18,327,35,19,21,035,30,21,05,299,31*71
+$GPGSV,3,3,11,26,59,277,46,28,62,144,45,29,68,249,46,,,,*47
+$PGRME,11.1,M,16.6,M,11.1,M*1F
+$GPGLL,6129.023,N,02349.681,E,125910,A*2A
+$PGRMZ,333,f,3*18
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6129.234,N,02346.317,E,T008*28
+$GPRMC,125911,A,6129.023,N,02349.681,E,000.0,326.6,110805,006.0,E*7D
+$GPRMB,A,0.22,L,T013,T012,6129.236,N,02346.327,E,001.6,277.6,,V*14
+$GPGGA,125912,6129.023,N,02349.681,E,1,05,2.8,101.4,M,20.7,M,,*4E
+$GPGSA,A,3,,,,,,18,19,,26,,28,29,2.8,2.8,1.0*37
+$GPGSV,3,1,12,03,03,012,00,07,02,153,00,08,53,094,37,10,16,209,31*71
+$GPGSV,3,2,12,15,13,332,41,18,18,327,35,19,21,035,30,21,05,299,32*71
+$GPGSV,3,3,12,26,59,277,47,27,20,092,00,28,62,144,44,29,68,249,46*78
+$PGRME,11.1,M,16.6,M,11.1,M*1F
+$GPGLL,6129.023,N,02349.681,E,125912,A*28
+$PGRMZ,333,f,3*18
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6157.564,N,02406.158,E,T007*26
+$GPRMC,125913,A,6129.023,N,02349.681,E,000.0,326.6,110805,006.0,E*7F
+$GPRMB,A,0.22,L,T013,T012,6129.236,N,02346.327,E,001.6,277.6,,V*14
+$GPGGA,125913,6129.023,N,02349.682,E,1,05,2.8,101.4,M,20.7,M,,*4C
+$GPGSA,A,3,,,,,,18,,,26,,28,29,2.8,2.8,1.0*3F
+$GPGSV,3,1,12,03,03,012,00,07,02,153,00,08,53,094,36,10,16,209,33*72
+$GPGSV,3,2,12,15,13,332,41,18,18,327,35,19,21,035,30,21,05,299,32*71
+$GPGSV,3,3,12,26,59,277,47,27,20,092,43,28,62,144,45,29,68,249,46*7E
+$PGRME,11.1,M,16.6,M,11.1,M*1F
+$GPGLL,6129.023,N,02349.682,E,125913,A*2A
+$PGRMZ,333,f,3*18
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6145.919,N,02345.544,E,T006*2B
+$GPRMC,125914,A,6129.024,N,02349.682,E,000.0,326.6,110805,006.0,E*7C
+$GPRMB,A,0.22,L,T013,T012,6129.236,N,02346.327,E,001.6,277.6,,V*14
+$GPGGA,125914,6129.024,N,02349.682,E,1,04,2.8,101.4,M,20.7,M,,*4D
+$GPGSA,A,3,,,,,,18,,,26,,28,29,2.8,2.8,1.0*3F
+$GPGSV,3,1,12,03,03,012,00,07,02,153,00,08,52,094,35,10,16,209,33*70
+$GPGSV,3,2,12,15,13,332,41,18,18,327,36,19,21,035,30,21,05,299,33*73
+$GPGSV,3,3,12,26,59,277,47,27,20,092,43,28,62,144,44,29,68,249,46*7F
+$PGRME,11.1,M,16.6,M,11.1,M*1F
+$GPGLL,6129.024,N,02349.682,E,125915,A*2B
+$PGRMZ,333,f,3*18
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6130.198,N,02342.702,E,T005*2C
+$GPRMC,125915,A,6129.024,N,02349.682,E,000.0,326.6,110805,006.0,E*7D
+$GPRMB,A,0.22,L,T013,T012,6129.236,N,02346.327,E,001.6,277.5,,V*17
+$GPGGA,125915,6129.024,N,02349.682,E,1,04,2.8,101.4,M,20.7,M,,*4C
+$GPGSA,A,3,,,,,,18,,,26,,28,29,2.8,2.8,1.0*3F
+$GPGSV,3,1,12,03,03,012,00,07,02,153,00,08,52,094,36,10,16,209,35*75
+$GPGSV,3,2,12,15,13,332,41,18,18,327,36,19,21,035,30,21,05,299,34*74
+$GPGSV,3,3,12,26,59,277,47,27,20,092,43,28,62,144,44,29,68,249,46*7F
+$PGRME,11.1,M,16.6,M,11.1,M*1F
+$GPGLL,6129.024,N,02349.683,E,125916,A*29
+$PGRMZ,333,f,3*18
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6216.183,N,02619.685,E,T004*25
+$GPRMC,125917,A,6129.024,N,02349.683,E,000.0,326.6,110805,006.0,E*7E
+$GPRMB,A,0.22,L,T013,T012,6129.236,N,02346.327,E,001.6,277.5,,V*17
+$GPGGA,125917,6129.024,N,02349.683,E,1,04,2.8,101.4,M,20.7,M,,*4F
+$GPGSA,A,3,,,,,,18,,,26,,28,29,2.8,2.8,1.0*3F
+$GPGSV,3,1,12,03,03,012,00,07,02,153,00,08,52,094,37,10,16,209,35*74
+$GPGSV,3,2,12,15,13,332,42,18,18,327,36,19,21,035,30,21,05,299,34*77
+$GPGSV,3,3,12,26,59,277,47,27,20,092,42,28,62,144,44,29,68,249,46*7E
+$PGRME,11.1,M,16.6,M,11.1,M*1F
+$GPGLL,6129.024,N,02349.683,E,125917,A*28
+$PGRMZ,333,f,3*18
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6215.064,N,02603.837,E,T003*25
+$GPRMC,125918,A,6129.024,N,02349.683,E,000.0,326.6,110805,006.0,E*71
+$GPRMB,A,0.22,L,T013,T012,6129.236,N,02346.327,E,001.6,277.5,,V*17
+$GPGGA,125918,6129.024,N,02349.683,E,1,04,2.8,101.4,M,20.7,M,,*40
+$GPGSA,A,3,,,,,,18,,,26,,28,29,2.8,2.8,1.0*3F
+$GPGSV,3,1,12,03,03,012,00,07,02,153,00,08,52,094,36,10,16,209,36*76
+$GPGSV,3,2,12,15,13,332,42,18,18,327,37,19,21,035,30,21,05,299,34*76
+$GPGSV,3,3,12,26,59,277,47,27,20,092,42,28,62,144,44,29,68,249,46*7E
+$PGRME,11.1,M,16.6,M,11.1,M*1F
+$GPGLL,6129.024,N,02349.683,E,125919,A*26
+$PGRMZ,333,f,3*18
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6151.098,N,02510.924,E,T002*26
+$GPRMC,125919,A,6129.023,N,02349.683,E,000.0,326.6,110805,006.0,E*77
+$GPRMB,A,0.22,L,T013,T012,6129.236,N,02346.327,E,001.6,277.6,,V*14
+$GPGGA,125919,6129.023,N,02349.683,E,1,04,2.9,100.2,M,20.7,M,,*40
+$GPGSA,A,3,,,,,,18,19,,26,,28,29,3.3,2.9,1.6*3A
+$GPGSV,3,1,12,03,03,012,00,07,02,153,00,08,52,094,36,10,16,209,36*76
+$GPGSV,3,2,12,15,13,332,43,18,18,327,38,19,21,035,30,21,05,299,34*78
+$GPGSV,3,3,12,26,59,277,47,27,20,092,42,28,62,144,44,29,68,249,46*7E
+$PGRME,11.1,M,16.6,M,11.1,M*1F
+$GPGLL,6129.023,N,02349.683,E,125920,A*2B
+$PGRMZ,329,f,3*13
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6129.271,N,02346.376,E,T001*27
+$GPRMC,125920,A,6129.023,N,02349.684,E,000.0,326.6,110805,006.0,E*7A
+$GPRMB,A,0.22,L,T013,T012,6129.236,N,02346.327,E,001.6,277.5,,V*17
+$GPGGA,125920,6129.023,N,02349.684,E,1,05,2.8,100.1,M,20.7,M,,*4E
+$GPGSA,A,3,,,,,,18,19,,26,,28,29,2.8,2.8,1.0*37
+$GPGSV,3,1,12,03,03,012,00,07,02,153,00,08,52,094,35,10,16,209,36*75
+$GPGSV,3,2,12,15,13,332,43,18,18,327,39,19,21,035,30,21,05,299,32*7F
+$GPGSV,3,3,12,26,59,277,46,27,20,092,41,28,62,144,44,29,68,249,46*7C
+$PGRME,11.1,M,16.6,M,11.1,M*1F
+$GPGLL,6129.023,N,02349.684,E,125921,A*2D
+$PGRMZ,328,f,3*12
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPRTE,4,1,c,0,T030,T029,T028,T027,T026,T025,T024,T023,T022*49
+$GPRTE,4,2,c,0,T021,T020,T019,T018,T017,T016,T015,T014,T013*4B
+$GPRTE,4,3,c,0,T012,T011,T010,T009,T008,T007,T006,T005,T004*4B
+$GPRTE,4,4,c,0,T003,T002,T001*4F
+$GPWPL,6016.083,N,02452.500,E,T030*22
+$GPRMC,125922,A,6129.023,N,02349.684,E,000.0,326.6,110805,006.0,E*78
+$GPRMB,A,0.22,L,T013,T012,6129.236,N,02346.327,E,001.6,277.5,,V*17
+$GPGGA,125922,6129.023,N,02349.684,E,1,05,2.8,100.0,M,20.7,M,,*4D
+$GPGSA,A,3,,,,,,18,19,,26,,28,29,2.8,2.8,1.0*37
+$GPGSV,3,1,12,03,03,012,00,07,02,153,00,08,52,094,35,10,15,209,35*75
+$GPGSV,3,2,12,15,13,332,42,18,18,327,40,19,21,035,30,21,05,299,32*70
+$GPGSV,3,3,12,26,59,277,46,27,20,092,41,28,62,144,45,29,68,249,46*7D
+$PGRME,11.1,M,16.6,M,11.1,M*1F
+$GPGLL,6129.023,N,02349.684,E,125923,A*2F
+$PGRMZ,328,f,3*12
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6123.283,N,02430.650,E,T029*2D
+$GPRMC,125923,A,6129.023,N,02349.684,E,000.0,326.6,110805,006.0,E*79
+$GPRMB,A,0.22,L,T013,T012,6129.236,N,02346.327,E,001.6,277.5,,V*17
+$GPGGA,125924,6129.023,N,02349.684,E,1,05,2.8,100.0,M,20.7,M,,*4B
+$GPGSA,A,3,,,,,,18,19,,26,,28,29,2.8,2.8,1.0*37
+$GPGSV,3,1,12,03,03,012,00,07,02,153,00,08,52,094,36,10,15,209,36*75
+$GPGSV,3,2,12,15,13,332,42,18,18,327,39,19,21,035,31,21,05,299,32*7F
+$GPGSV,3,3,12,26,59,277,47,27,20,092,41,28,62,144,44,29,68,249,46*7D
+$PGRME,11.5,M,17.3,M,12.8,M*15
+$GPGLL,6129.023,N,02349.684,E,125924,A*28
+$PGRMZ,329,f,3*13
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6023.283,N,02430.650,E,T028*2D
+$GPRMC,125925,A,6129.023,N,02349.685,E,000.0,326.6,110805,006.0,E*7E
+$GPRMB,A,0.22,L,T013,T012,6129.236,N,02346.327,E,001.6,277.5,,V*17
+$GPGGA,125925,6129.023,N,02349.685,E,1,05,2.6,100.3,M,20.7,M,,*46
+$GPGSA,A,3,,,,,15,18,19,,26,,28,29,2.6,2.6,1.0*33
+$GPGSV,3,1,12,03,03,012,00,07,02,153,00,08,52,094,35,10,15,209,37*77
+$GPGSV,3,2,12,15,13,332,43,18,18,327,39,19,21,035,31,21,05,299,31*7D
+$GPGSV,3,3,12,26,59,277,47,27,20,092,42,28,62,144,44,29,68,249,46*7E
+$PGRME,11.5,M,17.3,M,12.8,M*15
+$GPGLL,6129.023,N,02349.685,E,125925,A*28
+$PGRMZ,329,f,3*13
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6123.283,N,02430.650,E,T027*23
+$GPRMC,125926,A,6129.023,N,02349.685,E,000.0,326.6,110805,006.0,E*7D
+$GPRMB,A,0.22,L,T013,T012,6129.236,N,02346.327,E,001.6,277.5,,V*17
+$GPGGA,125926,6129.023,N,02349.685,E,1,06,2.6,100.4,M,20.7,M,,*41
+$GPGSA,A,3,,,,,15,18,19,,26,,28,29,2.6,2.6,1.0*33
+$GPGSV,3,1,12,03,03,012,00,07,02,153,00,08,52,094,35,10,15,209,37*77
+$GPGSV,3,2,12,15,13,332,42,18,18,327,38,19,21,035,32,21,05,299,31*7E
+$GPGSV,3,3,12,26,59,277,47,27,20,092,41,28,62,144,45,29,68,249,46*7C
+$PGRME,11.9,M,18.0,M,14.3,M*18
+$GPGLL,6129.023,N,02349.685,E,125927,A*2A
+$PGRMZ,329,f,3*13
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6017.083,N,02452.500,E,T026*24
+$GPRMC,125927,A,6129.023,N,02349.685,E,000.0,326.6,110805,006.0,E*7C
+$GPRMB,A,0.22,L,T013,T012,6129.236,N,02346.327,E,001.6,277.5,,V*17
+$GPGGA,125927,6129.023,N,02349.685,E,1,06,2.6,100.4,M,20.7,M,,*40
+$GPGSA,A,3,,,,,15,18,19,,26,,28,29,2.6,2.6,1.0*33
+$GPGSV,3,1,12,03,03,012,00,07,02,153,00,08,52,094,36,10,15,209,36*75
+$GPGSV,3,2,12,15,13,332,41,18,18,327,38,19,21,035,31,21,05,299,31*7E
+$GPGSV,3,3,12,26,59,277,47,27,20,092,42,28,62,144,44,29,68,249,46*7E
+$PGRME,9.9,M,16.6,M,9.9,M*1F
+$GPGLL,6129.023,N,02349.685,E,125928,A*25
+$PGRMZ,330,f,3*1B
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6017.083,S,02453.500,E,T025*3B
+$GPRMC,125929,A,6129.023,N,02349.685,E,000.0,326.6,110805,006.0,E*72
+$GPRMB,A,0.22,L,T013,T012,6129.236,N,02346.327,E,001.6,277.5,,V*17
+$GPGGA,125929,6129.023,N,02349.685,E,1,06,2.6,100.5,M,20.7,M,,*4F
+$GPGSA,A,3,,,,,15,18,19,,26,,28,29,2.6,2.6,1.0*33
+$GPGSV,3,1,12,03,03,012,00,07,02,153,00,08,52,094,36,10,15,209,35*76
+$GPGSV,3,2,12,15,13,332,41,18,18,327,38,19,21,035,32,21,05,299,31*7D
+$GPGSV,3,3,12,26,59,277,47,27,20,092,42,28,62,144,44,29,68,249,46*7E
+$PGRME,9.9,M,16.6,M,9.9,M*1F
+$GPGLL,6129.023,N,02349.685,E,125929,A*24
+$PGRMZ,331,f,3*1A
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6018.083,N,02453.500,E,T024*28
+$GPRMC,125930,A,6129.023,N,02349.685,E,000.0,326.6,110805,006.0,E*7A
+$GPRMB,A,0.22,L,T013,T012,6129.236,N,02346.327,E,001.6,277.5,,V*17
+$GPGGA,125930,6129.023,N,02349.685,E,1,06,2.6,100.8,M,20.7,M,,*4A
+$GPGSA,A,3,,,,,15,18,19,,26,,28,29,2.6,2.6,1.0*33
+$GPGSV,3,1,12,03,03,012,00,07,02,153,00,08,52,094,36,10,15,209,35*76
+$GPGSV,3,2,12,15,13,332,41,18,18,327,38,19,21,035,31,21,05,299,31*7E
+$GPGSV,3,3,12,26,59,277,47,27,20,092,42,28,62,144,44,29,68,249,46*7E
+$PGRME,9.9,M,16.6,M,9.9,M*1F
+$GPGLL,6129.023,N,02349.686,E,125931,A*2E
+$PGRMZ,331,f,3*1A
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6017.083,N,02452.500,W,T023*33
+$GPRMC,125931,A,6129.023,N,02349.686,E,000.0,326.6,110805,006.0,E*78
+$GPRMB,A,0.22,L,T013,T012,6129.236,N,02346.327,E,001.6,277.5,,V*17
+$GPGGA,125931,6129.023,N,02349.686,E,1,06,2.6,100.8,M,20.7,M,,*48
+$GPGSA,A,3,,,,,15,18,19,,26,,28,29,2.6,2.6,1.0*33
+$GPGSV,3,1,12,03,03,012,00,07,02,153,00,08,52,094,35,10,15,209,35*75
+$GPGSV,3,2,12,15,13,332,40,18,18,327,38,19,21,035,31,21,05,299,30*7E
+$GPGSV,3,3,12,26,59,277,47,27,20,092,43,28,62,144,44,29,68,249,46*7F
+$PGRME,9.9,M,16.6,M,9.9,M*1F
+$GPGLL,6129.023,N,02349.686,E,125932,A*2D
+$PGRMZ,331,f,3*1A
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6017.083,N,02555.500,E,T022*26
+$GPRMC,125932,A,6129.023,N,02349.685,E,000.0,326.6,110805,006.0,E*78
+$GPRMB,A,0.22,L,T013,T012,6129.236,N,02346.327,E,001.6,277.6,,V*14
+$GPGGA,125932,6129.023,N,02349.685,E,1,06,2.6,99.9,M,20.7,M,,*78
+$GPGSA,A,3,,,,,15,18,19,,26,,28,29,2.6,2.6,1.0*33
+$GPGSV,3,1,12,03,03,012,00,07,02,153,00,08,52,094,35,10,15,209,34*74
+$GPGSV,3,2,12,15,13,332,40,18,18,327,38,19,21,035,31,21,05,299,30*7E
+$GPGSV,3,3,12,26,59,277,47,27,20,092,43,28,62,144,44,29,68,249,46*7F
+$PGRME,9.9,M,16.6,M,9.9,M*1F
+$GPGLL,6129.023,N,02349.685,E,125933,A*2F
+$PGRMZ,328,f,3*12
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6017.083,N,02452.500,E,T021*23
+$GPRMC,125934,A,6129.023,N,02349.685,E,000.0,326.6,110805,006.0,E*7E
+$GPRMB,A,0.22,L,T013,T012,6129.236,N,02346.327,E,001.6,277.6,,V*14
+$GPGGA,125934,6129.023,N,02349.685,E,1,06,2.5,99.9,M,20.7,M,,*7D
+$GPGSA,A,3,,,,,15,18,19,,26,,28,29,2.5,2.5,1.0*33
+$GPGSV,3,1,12,03,03,012,00,07,02,153,00,08,52,094,36,10,15,209,34*77
+$GPGSV,3,2,12,15,13,332,40,18,18,327,39,19,21,035,31,21,05,299,30*7F
+$GPGSV,3,3,12,26,59,277,47,27,20,092,43,28,62,144,44,29,68,249,46*7F
+$PGRME,9.9,M,16.6,M,9.9,M*1F
+$GPGLL,6129.023,N,02349.685,E,125935,A*29
+$PGRMZ,328,f,3*12
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6116.083,N,02452.500,E,T020*22
+$GPRMC,125935,A,6129.023,N,02349.686,E,000.0,326.6,110805,006.0,E*7C
+$GPRMB,A,0.22,L,T013,T012,6129.236,N,02346.327,E,001.6,277.6,,V*14
+$GPGGA,125935,6129.023,N,02349.686,E,1,06,2.5,99.9,M,20.7,M,,*7F
+$GPGSA,A,3,,,,,15,18,19,,26,,28,29,2.5,2.5,1.0*33
+$GPGSV,3,1,12,03,03,012,00,07,02,153,00,08,52,094,37,10,15,209,33*71
+$GPGSV,3,2,12,15,13,332,40,18,18,327,39,19,21,035,31,21,05,299,30*7F
+$GPGSV,3,3,12,26,59,277,47,27,20,092,43,28,62,144,44,29,68,249,46*7F
+$PGRME,9.9,M,16.6,M,9.9,M*1F
+$GPGLL,6129.023,N,02349.686,E,125936,A*29
+$PGRMZ,328,f,3*12
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6016.083,S,02452.500,E,T019*34
+$GPRMC,125936,A,6129.023,N,02349.685,E,000.0,326.6,110805,006.0,E*7C
+$GPRMB,A,0.22,L,T013,T012,6129.236,N,02346.327,E,001.6,277.6,,V*14
+$GPGGA,125936,6129.023,N,02349.685,E,1,06,2.5,99.5,M,20.7,M,,*73
+$GPGSA,A,3,,,,,15,18,19,,26,27,28,29,2.5,2.5,1.0*36
+$GPGSV,3,1,12,03,03,012,00,07,02,153,00,08,52,094,37,10,15,209,33*71
+$GPGSV,3,2,12,15,13,332,41,18,18,327,39,19,21,035,31,21,05,299,30*7E
+$GPGSV,3,3,12,26,59,277,47,27,20,092,43,28,62,144,45,29,68,249,46*7E
+$PGRME,8.9,M,12.7,M,10.5,M*2F
+$GPGLL,6129.023,N,02349.685,E,125936,A*2A
+$PGRMZ,326,f,3*1C
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6016.083,N,02452.500,E,T018*28
+$GPRMC,125938,A,6129.023,N,02349.685,E,000.0,326.6,110805,006.0,E*72
+$GPRMB,A,0.22,L,T013,T012,6129.236,N,02346.327,E,001.6,277.6,,V*14
+$GPGGA,125938,6129.023,N,02349.685,E,1,07,2.5,99.5,M,20.7,M,,*7C
+$GPGSA,A,3,,,,,15,18,19,,26,27,28,29,2.5,2.5,1.0*36
+$GPGSV,3,1,12,03,03,012,00,07,02,153,00,08,52,094,37,10,15,209,32*70
+$GPGSV,3,2,12,15,13,332,41,18,18,327,39,19,21,035,31,21,05,299,30*7E
+$GPGSV,3,3,12,26,59,277,47,27,20,092,43,28,62,144,45,29,68,249,46*7E
+$PGRME,8.9,M,12.7,M,10.5,M*2F
+$GPGLL,6129.023,N,02349.685,E,125938,A*24
+$PGRMZ,326,f,3*1C
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6013.283,N,02456.650,E,T017*22
+$GPRMC,125938,A,6129.023,N,02349.685,E,000.0,326.6,110805,006.0,E*72
+$GPRMB,A,0.22,L,T013,T012,6129.236,N,02346.327,E,001.6,277.6,,V*14
+$GPGGA,125938,6129.023,N,02349.685,E,1,07,1.5,99.5,M,20.7,M,,*7F
+$GPGSA,A,3,,,,,15,18,19,,26,27,28,29,1.5,1.5,1.0*36
+$GPGSV,3,1,12,03,03,012,00,07,02,153,00,08,52,094,37,10,15,209,33*71
+$GPGSV,3,2,12,15,13,332,41,18,18,327,39,19,21,035,31,21,05,299,30*7E
+$GPGSV,3,3,12,26,59,277,47,27,20,092,43,28,62,144,45,29,68,249,46*7E
+$PGRME,5.4,M,13.1,M,5.4,M*1D
+$GPGLL,6129.023,N,02349.686,E,125939,A*26
+$PGRMZ,326,f,3*1C
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6123.283,N,02430.650,E,T016*21
+$GPRMC,125940,A,6129.023,N,02349.686,E,000.0,326.6,110805,006.0,E*7E
+$GPRMB,A,0.22,L,T013,T012,6129.236,N,02346.327,E,001.6,277.6,,V*14
+$GPGGA,125940,6129.023,N,02349.686,E,1,07,1.4,99.5,M,20.7,M,,*72
+$GPGSA,A,3,,,,,15,18,19,,26,27,28,29,1.4,1.4,1.0*36
+$GPGSV,3,1,12,03,03,012,00,07,02,153,00,08,52,094,38,10,15,209,33*7E
+$GPGSV,3,2,12,15,13,332,41,18,18,327,39,19,21,035,30,21,05,299,30*7F
+$GPGSV,3,3,12,26,59,277,47,27,20,092,43,28,62,143,45,29,68,249,46*79
+$PGRME,5.4,M,13.1,M,5.4,M*1D
+$GPGLL,6129.023,N,02349.686,E,125941,A*29
+$PGRMZ,326,f,3*1C
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,0000.000,N,00000.000,W,T015*39
+$GPRMC,125942,A,6129.023,N,02349.686,E,000.0,326.6,110805,006.0,E*7C
+$GPRMB,A,0.22,L,T013,T012,6129.236,N,02346.327,E,001.6,277.6,,V*14
+$GPGGA,125942,6129.023,N,02349.686,E,1,07,1.4,99.5,M,20.7,M,,*70
+$GPGSA,A,3,,,,,15,18,19,,26,27,28,29,1.4,1.4,1.0*36
+$GPGSV,3,1,12,03,03,012,00,07,02,153,00,08,52,094,37,10,15,209,33*71
+$GPGSV,3,2,12,15,13,332,41,18,18,327,40,19,21,035,30,21,05,299,30*71
+$GPGSV,3,3,12,26,59,277,47,27,20,092,43,28,62,143,44,29,68,249,46*78
+$PGRME,5.4,M,13.1,M,5.4,M*1D
+$GPGLL,6129.023,N,02349.686,E,125942,A*2A
+$PGRMZ,326,f,3*1C
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,0009.000,N,02430.650,E,T014*25
+$GPRMC,125943,A,6129.023,N,02349.686,E,000.0,326.6,110805,006.0,E*7D
+$GPRMB,A,0.22,L,T013,T012,6129.236,N,02346.327,E,001.6,277.6,,V*14
+$GPGGA,125943,6129.023,N,02349.686,E,1,07,1.4,99.5,M,20.7,M,,*71
+$GPGSA,A,3,,,,,15,18,19,,26,27,28,29,1.4,1.4,1.0*36
+$GPGSV,3,1,12,03,03,012,00,07,02,153,00,08,52,094,43,10,15,209,31*70
+$GPGSV,3,2,12,15,13,332,40,18,18,327,40,19,21,035,35,21,05,299,30*75
+$GPGSV,3,3,12,26,59,277,46,27,20,092,42,28,62,143,45,29,68,249,46*79
+$PGRME,5.8,M,12.6,M,6.4,M*14
+$GPGLL,6129.022,N,02349.685,E,125943,A*29
+$PGRMZ,324,f,3*1E
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6123.285,N,02430.651,E,T013*23
+$GPRMC,125944,A,6129.022,N,02349.685,E,000.0,326.6,110805,006.0,E*78
+$GPRMB,A,0.22,L,T013,T012,6129.236,N,02346.327,E,001.6,277.6,,V*14
+$GPGGA,125945,6129.022,N,02349.685,E,1,07,1.8,98.3,M,20.7,M,,*7E
+$GPGSA,A,3,,,,,15,18,19,,26,27,28,29,1.8,1.8,1.0*36
+$GPGSV,3,1,12,03,03,012,00,07,02,153,00,08,52,094,42,10,15,209,32*72
+$GPGSV,3,2,12,15,13,332,39,18,18,327,37,19,21,035,36,21,05,299,30*78
+$GPGSV,3,3,12,26,59,277,45,27,20,092,40,28,62,143,43,29,68,249,46*7E
+$PGRME,6.9,M,14.1,M,9.7,M*1B
+$GPGLL,6129.022,N,02349.685,E,125945,A*2F
+$PGRMZ,324,f,3*1E
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6129.236,N,02346.327,E,T012*22
+$GPRMC,125945,A,6129.022,N,02349.685,E,000.0,326.6,110805,006.0,E*79
+$GPRMB,A,0.22,L,T013,T012,6129.236,N,02346.327,E,001.6,277.6,,V*14
+$GPGGA,125946,6129.022,N,02349.685,E,1,07,2.0,98.8,M,20.7,M,,*7D
+$GPGSA,A,3,,,,,15,18,19,,26,27,28,29,2.4,2.0,1.5*37
+$GPGSV,3,1,12,03,03,012,00,07,02,153,00,08,52,094,42,10,15,209,32*72
+$GPGSV,3,2,12,15,13,332,38,18,18,327,36,19,21,035,37,21,05,299,30*79
+$GPGSV,3,3,12,26,59,277,44,27,20,092,40,28,62,143,42,29,68,249,46*7E
+$PGRME,6.9,M,14.1,M,9.7,M*1B
+$GPGLL,6129.022,N,02349.686,E,125946,A*2F
+$PGRMZ,325,f,3*1F
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6114.236,N,02346.327,E,T011*2F
+$GPRMC,125947,A,6129.022,N,02349.686,E,000.0,326.6,110805,006.0,E*78
+$GPRMB,A,0.22,L,T013,T012,6129.236,N,02346.327,E,001.6,277.6,,V*14
+$GPGGA,125947,6129.022,N,02349.686,E,1,07,1.7,99.2,M,20.7,M,,*70
+$GPGSA,A,3,,,,,15,18,19,,26,27,28,29,1.7,1.7,1.0*36
+$GPGSV,3,1,12,03,03,012,00,07,02,153,00,08,52,094,41,10,15,209,31*72
+$GPGSV,3,2,12,15,13,332,38,18,18,327,38,19,21,035,37,21,05,299,30*77
+$GPGSV,3,3,12,26,59,277,44,27,20,092,40,28,62,143,40,29,68,249,45*7F
+$PGRME,7.2,M,14.2,M,10.5,M*28
+$GPGLL,6129.021,N,02349.686,E,125948,A*22
+$PGRMZ,325,f,3*1F
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6220.236,N,02346.327,E,T010*2A
+$GPRMC,125948,A,6129.021,N,02349.686,E,000.0,326.6,110805,006.0,E*74
+$GPRMB,A,0.22,L,T013,T012,6129.236,N,02346.327,E,001.6,277.6,,V*14
+$GPGGA,125948,6129.021,N,02349.686,E,1,07,2.1,98.8,M,20.7,M,,*72
+$GPGSA,A,3,,,,,15,18,19,,26,27,28,29,2.1,2.1,1.0*36
+$GPGSV,3,1,12,03,03,012,00,07,02,153,00,08,52,094,42,10,15,209,33*73
+$GPGSV,3,2,12,15,13,332,36,18,18,327,37,19,21,035,37,21,05,299,30*76
+$GPGSV,3,3,12,26,59,277,44,27,20,092,40,28,62,143,41,29,68,249,45*7E
+$PGRME,7.4,M,12.6,M,11.0,M*28
+$GPGLL,6129.021,N,02349.686,E,125949,A*23
+$PGRMZ,324,f,3*1E
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6120.236,N,02346.327,E,T009*21
+$GPRMC,125949,A,6129.021,N,02349.685,E,000.0,326.6,110805,006.0,E*76
+$GPRMB,A,0.22,L,T013,T012,6129.236,N,02346.327,E,001.6,277.6,,V*14
+$GPGGA,125949,6129.021,N,02349.685,E,1,07,2.7,98.3,M,20.7,M,,*7D
+$GPGSA,A,3,,,,,15,18,19,,26,27,28,29,2.7,2.7,1.0*36
+$GPGSV,3,1,12,03,03,012,00,07,02,153,00,08,52,094,42,10,15,209,33*73
+$GPGSV,3,2,12,15,13,332,36,18,18,327,36,19,21,035,36,21,05,299,30*76
+$GPGSV,3,3,12,26,59,277,44,27,20,092,41,28,62,143,40,29,68,249,45*7E
+$PGRME,7.5,M,12.7,M,11.5,M*2D
+$GPGLL,6129.021,N,02349.685,E,125949,A*20
+$PGRMZ,323,f,3*19
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6129.234,N,02346.317,E,T008*28
+$GPRMC,125951,A,6129.021,N,02349.685,E,000.0,326.6,110805,006.0,E*7F
+$GPRMB,A,0.22,L,T013,T012,6129.236,N,02346.327,E,001.6,277.6,,V*14
+$GPGGA,125951,6129.021,N,02349.685,E,1,07,2.7,98.3,M,20.7,M,,*74
+$GPGSA,A,3,,,,,15,18,19,,26,27,28,29,2.7,2.7,1.0*36
+$GPGSV,3,1,12,03,03,012,00,07,02,153,00,08,52,094,43,10,15,209,32*73
+$GPGSV,3,2,12,15,13,332,35,18,18,327,35,19,21,035,36,21,05,299,30*76
+$GPGSV,3,3,12,26,59,277,45,27,20,092,41,28,62,143,40,29,68,249,45*7F
+$PGRME,8.2,M,14.0,M,13.3,M*20
+$GPGLL,6129.021,N,02349.685,E,125951,A*29
+$PGRMZ,318,f,3*11
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6157.564,N,02406.158,E,T007*26
+$GPRMC,125952,A,6129.020,N,02349.684,E,000.0,326.6,110805,006.0,E*7C
+$GPRMB,A,0.22,L,T013,T012,6129.236,N,02346.327,E,001.6,277.7,,V*15
+$GPGGA,125952,6129.020,N,02349.684,E,1,07,2.7,95.6,M,20.7,M,,*7F
+$GPGSA,A,3,,,,,15,18,19,,26,27,28,29,2.7,2.7,1.0*36
+$GPGSV,3,1,12,03,03,012,00,07,02,153,00,08,52,094,44,10,15,209,32*74
+$GPGSV,3,2,12,15,13,332,35,18,18,327,35,19,21,035,37,21,05,299,30*77
+$GPGSV,3,3,12,26,59,277,45,27,20,092,42,28,62,143,42,29,68,249,45*7E
+$PGRME,8.2,M,14.0,M,13.3,M*20
+$GPGLL,6129.020,N,02349.684,E,125953,A*2B
+$PGRMZ,314,f,3*1D
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6145.919,N,02345.544,E,T006*2B
+$GPRMC,125953,A,6129.020,N,02349.684,E,000.0,326.6,110805,006.0,E*7D
+$GPRMB,A,0.22,L,T013,T012,6129.236,N,02346.327,E,001.6,277.7,,V*15
+$GPGGA,125953,6129.020,N,02349.684,E,1,07,2.7,95.6,M,20.7,M,,*7E
+$GPGSA,A,3,,,,,15,18,19,,26,27,28,29,2.7,2.7,1.0*36
+$GPGSV,3,1,12,03,03,012,00,07,02,153,00,08,52,094,42,10,15,209,30*70
+$GPGSV,3,2,12,15,13,332,37,18,18,327,35,19,21,035,35,21,05,299,30*77
+$GPGSV,3,3,12,26,59,277,45,27,20,092,41,28,62,143,43,29,68,249,45*7C
+$PGRME,8.2,M,12.6,M,13.5,M*26
+$GPGLL,6129.020,N,02349.684,E,125953,A*2B
+$PGRMZ,314,f,3*1D
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6130.198,N,02342.702,E,T005*2C
+$GPRMC,125954,A,6129.020,N,02349.684,E,000.0,326.6,110805,006.0,E*7A
+$GPRMB,A,0.22,L,T013,T012,6129.236,N,02346.327,E,001.6,277.6,,V*14
+$GPGGA,125954,6129.020,N,02349.684,E,1,07,1.5,95.8,M,20.7,M,,*76
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,1.5,1.5,1.0*3E
+$GPGSV,3,1,12,03,03,012,00,07,02,153,00,08,52,094,42,10,15,209,30*70
+$GPGSV,3,2,12,15,13,332,38,18,19,327,35,19,21,035,40,21,05,299,30*7B
+$GPGSV,3,3,12,26,59,277,45,27,20,092,41,28,62,143,44,29,68,249,44*7A
+$PGRME,8.8,M,12.9,M,14.3,M*22
+$GPGLL,6129.020,N,02349.684,E,125954,A*2C
+$PGRMZ,314,f,3*1D
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6216.183,N,02619.685,E,T004*25
+$GPRMC,125956,A,6129.022,N,02349.683,E,000.0,326.6,110805,006.0,E*7D
+$GPRMB,A,0.22,L,T013,T012,6129.236,N,02346.327,E,001.6,277.6,,V*14
+$GPGGA,125956,6129.022,N,02349.683,E,1,08,2.1,95.5,M,20.7,M,,*74
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,2.1,2.1,1.0*3E
+$GPGSV,3,1,12,03,03,012,00,07,02,153,00,08,52,094,42,10,15,209,30*70
+$GPGSV,3,2,12,15,13,332,39,18,19,327,34,19,21,035,40,21,05,299,30*7B
+$GPGSV,3,3,12,26,59,277,45,27,20,092,41,28,62,143,44,29,68,249,43*7D
+$PGRME,8.2,M,11.4,M,14.1,M*24
+$GPGLL,6129.022,N,02349.683,E,125957,A*2A
+$PGRMZ,313,f,3*1A
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6215.064,N,02603.837,E,T003*25
+$GPRMC,125957,A,6129.024,N,02349.682,E,001.0,326.6,110805,006.0,E*7A
+$GPRMB,A,0.22,L,T013,T012,6129.236,N,02346.327,E,001.6,277.6,000.0,V*3A
+$GPGGA,125957,6129.024,N,02349.682,E,1,08,2.2,95.2,M,20.7,M,,*76
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,2.6,2.2,1.5*3F
+$GPGSV,3,1,12,03,03,012,00,07,02,153,00,08,52,094,41,10,15,209,30*73
+$GPGSV,3,2,12,15,13,332,39,18,19,327,34,19,21,035,41,21,05,299,31*7B
+$GPGSV,3,3,12,26,59,277,46,27,20,092,40,28,62,143,45,29,68,249,44*79
+$PGRME,8.2,M,11.4,M,14.1,M*24
+$GPGLL,6129.024,N,02349.682,E,125958,A*22
+$PGRMZ,312,f,3*1B
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6151.098,N,02510.924,E,T002*26
+$GPRMC,125958,A,6129.024,N,02349.682,E,001.0,326.6,110805,006.0,E*75
+$GPRMB,A,0.22,L,T013,T012,6129.236,N,02346.327,E,001.6,277.5,000.3,V*3A
+$GPGGA,125958,6129.024,N,02349.682,E,1,08,1.9,95.2,M,20.7,M,,*71
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,1.9,1.9,1.0*3E
+$GPGSV,3,1,12,03,03,012,00,07,02,153,00,08,52,094,40,10,15,209,30*72
+$GPGSV,3,2,12,15,13,332,39,18,19,327,34,19,21,034,41,21,05,299,31*7A
+$GPGSV,3,3,12,26,59,277,46,27,20,092,39,28,62,143,45,29,68,249,44*77
+$PGRME,8.1,M,11.1,M,13.7,M*23
+$GPGLL,6129.032,N,02349.677,E,125959,A*2E
+$PGRMZ,311,f,3*18
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6129.271,N,02346.376,E,T001*27
+$GPRMC,125959,A,6129.035,N,02349.675,E,013.3,345.5,110805,006.0,E*7A
+$GPRMB,A,0.23,L,T013,T012,6129.236,N,02346.327,E,001.6,277.1,004.9,V*31
+$GPGGA,130000,6129.036,N,02349.675,E,1,08,2.1,94.6,M,20.7,M,,*74
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,2.4,2.1,1.5*3E
+$GPGSV,3,1,12,03,03,012,00,07,02,153,00,08,52,094,40,10,15,209,30*72
+$GPGSV,3,2,12,15,13,332,38,18,19,327,35,19,21,034,41,21,05,299,31*7A
+$GPGSV,3,3,12,26,59,277,46,27,20,092,38,28,62,143,45,29,68,249,44*76
+$PGRME,8.1,M,11.2,M,13.8,M*2F
+$GPGLL,6129.038,N,02349.674,E,130000,A*26
+$PGRMZ,310,f,3*19
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPRTE,4,1,c,0,T030,T029,T028,T027,T026,T025,T024,T023,T022*49
+$GPRTE,4,2,c,0,T021,T020,T019,T018,T017,T016,T015,T014,T013*4B
+$GPRTE,4,3,c,0,T012,T011,T010,T009,T008,T007,T006,T005,T004*4B
+$GPRTE,4,4,c,0,T003,T002,T001*4F
+$GPWPL,6016.083,N,02452.500,E,T030*22
+$GPRMC,130002,A,6129.045,N,02349.670,E,017.4,345.0,110805,006.0,E*7D
+$GPRMB,A,0.24,L,T013,T012,6129.236,N,02346.327,E,001.6,276.8,006.5,V*30
+$GPGGA,130002,6129.046,N,02349.669,E,1,08,2.0,94.5,M,20.7,M,,*7E
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,2.4,2.0,1.6*3C
+$GPGSV,3,1,12,03,03,012,00,07,02,153,00,08,52,094,40,10,15,209,30*72
+$GPGSV,3,2,12,15,13,332,38,18,19,327,37,19,21,034,41,21,05,299,33*7A
+$GPGSV,3,3,12,26,59,277,47,27,20,092,38,28,62,143,45,29,68,249,44*77
+$PGRME,8.1,M,11.1,M,13.7,M*23
+$GPGLL,6129.052,N,02349.666,E,130002,A*2B
+$PGRMZ,309,f,3*11
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6123.283,N,02430.650,E,T029*2D
+$GPRMC,130003,A,6129.054,N,02349.664,E,020.7,345.1,110805,006.0,E*7F
+$GPRMB,A,0.25,L,T013,T012,6129.236,N,02346.327,E,001.6,276.5,007.6,V*3E
+$GPGGA,130003,6129.057,N,02349.663,E,1,08,1.9,93.9,M,20.7,M,,*74
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,1.9,1.9,1.0*3E
+$GPGSV,3,1,12,03,03,012,00,07,02,153,00,08,52,094,40,10,15,209,30*72
+$GPGSV,3,2,12,15,13,332,39,18,19,327,36,19,21,034,41,21,05,299,34*7D
+$GPGSV,3,3,12,26,59,277,47,27,20,092,37,28,62,143,45,29,68,249,44*78
+$PGRME,8.1,M,11.1,M,13.8,M*2C
+$GPGLL,6129.061,N,02349.660,E,130004,A*2B
+$PGRMZ,308,f,3*10
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6023.283,N,02430.650,E,T028*2D
+$GPRMC,130004,A,6129.064,N,02349.659,E,024.6,345.1,110805,006.0,E*70
+$GPRMB,A,0.26,L,T013,T012,6129.236,N,02346.327,E,001.6,276.1,008.9,V*39
+$GPGGA,130004,6129.066,N,02349.657,E,1,08,1.9,93.8,M,20.7,M,,*77
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,2.0,1.9,1.2*36
+$GPGSV,3,1,12,03,03,012,00,07,02,153,00,08,52,094,40,10,15,209,30*72
+$GPGSV,3,2,12,15,13,332,39,18,19,327,36,19,21,034,41,21,05,299,34*7D
+$GPGSV,3,3,12,26,59,277,47,27,20,092,37,28,62,143,45,29,68,249,44*78
+$PGRME,8.1,M,11.1,M,13.8,M*2C
+$GPGLL,6129.071,N,02349.655,E,130005,A*2D
+$PGRMZ,308,f,3*10
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6123.283,N,02430.650,E,T027*23
+$GPRMC,130005,A,6129.075,N,02349.652,E,028.8,345.4,110805,006.0,E*7D
+$GPRMB,A,0.27,L,T013,T012,6129.236,N,02346.327,E,001.6,275.7,010.0,V*3D
+$GPGGA,130006,6129.077,N,02349.651,E,1,08,1.9,93.6,M,20.7,M,,*7D
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,2.2,1.9,1.4*32
+$GPGSV,3,1,12,03,03,012,00,07,02,153,00,08,52,094,41,10,15,209,30*73
+$GPGSV,3,2,12,15,13,332,39,18,19,327,37,19,21,034,41,21,05,299,33*7B
+$GPGSV,3,3,12,26,59,277,47,27,20,092,37,28,62,143,45,29,68,249,44*78
+$PGRME,8.1,M,11.1,M,13.7,M*23
+$GPGLL,6129.082,N,02349.649,E,130006,A*2F
+$PGRMZ,306,f,3*1E
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6017.083,N,02452.500,E,T026*24
+$GPRMC,130007,A,6129.086,N,02349.646,E,029.6,345.5,110805,006.0,E*78
+$GPRMB,A,0.28,L,T013,T012,6129.236,N,02346.327,E,001.6,275.4,010.2,V*33
+$GPGGA,130007,6129.088,N,02349.646,E,1,08,1.6,93.3,M,20.7,M,,*70
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,2.1,1.8,1.5*31
+$GPGSV,3,1,12,03,03,012,00,07,02,153,00,08,52,094,40,10,15,209,30*72
+$GPGSV,3,2,12,15,13,332,39,18,19,327,37,19,21,034,41,21,04,298,33*7B
+$GPGSV,3,3,12,26,59,277,47,27,20,092,36,28,62,143,45,29,68,249,44*79
+$PGRME,8.7,M,12.4,M,15.1,M*23
+$GPGLL,6129.093,N,02349.643,E,130007,A*24
+$PGRMZ,306,f,3*1E
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6017.083,S,02453.500,E,T025*3B
+$GPRMC,130007,A,6129.097,N,02349.640,E,030.6,345.6,110805,006.0,E*75
+$GPRMB,A,0.29,L,T013,T012,6129.236,N,02346.327,E,001.6,275.0,010.2,V*36
+$GPGGA,130007,6129.099,N,02349.639,E,1,08,1.8,93.3,M,20.7,M,,*76
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,2.1,1.8,1.5*31
+$GPGSV,3,1,12,03,03,012,00,07,02,153,00,08,52,094,40,10,15,209,30*72
+$GPGSV,3,2,12,15,13,332,39,18,19,327,38,19,21,034,40,21,04,298,32*74
+$GPGSV,3,3,12,26,59,277,47,27,20,092,35,28,62,143,45,29,68,249,44*7A
+$PGRME,8.7,M,12.4,M,15.1,M*23
+$GPGLL,6129.104,N,02349.637,E,130009,A*26
+$PGRMZ,306,f,3*1E
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6018.083,N,02453.500,E,T024*28
+$GPRMC,130009,A,6129.108,N,02349.634,E,032.5,345.3,110805,006.0,E*7B
+$GPRMB,A,0.30,L,T013,T012,6129.236,N,02346.327,E,001.6,274.6,010.8,V*33
+$GPGGA,130009,6129.110,N,02349.633,E,1,08,2.0,93.3,M,20.7,M,,*79
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,2.6,2.0,1.9*31
+$GPGSV,3,1,12,03,03,012,00,07,02,153,00,08,52,094,40,10,15,209,30*72
+$GPGSV,3,2,12,15,13,332,39,18,19,327,36,19,21,034,38,21,04,298,32*75
+$GPGSV,3,3,12,26,59,277,47,27,20,092,34,28,62,143,45,29,68,249,45*7A
+$PGRME,8.7,M,12.4,M,15.1,M*23
+$GPGLL,6129.117,N,02349.630,E,130010,A*2B
+$PGRMZ,306,f,3*1E
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6017.083,N,02452.500,W,T023*33
+$GPRMC,130011,A,6129.121,N,02349.627,E,033.7,345.2,110805,006.0,E*79
+$GPRMB,A,0.31,L,T013,T012,6129.236,N,02346.327,E,001.6,274.1,011.1,V*3D
+$GPGGA,130011,6129.124,N,02349.625,E,1,08,2.1,93.2,M,20.7,M,,*70
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,2.5,2.1,1.0*3A
+$GPGSV,3,1,12,03,03,012,00,07,02,153,00,08,52,094,40,10,15,209,30*72
+$GPGSV,3,2,12,15,13,332,39,18,19,327,37,19,21,034,38,21,04,298,00*75
+$GPGSV,3,3,12,26,59,277,47,27,20,092,34,28,62,143,45,29,68,249,45*7A
+$PGRME,8.7,M,12.4,M,15.1,M*23
+$GPGLL,6129.129,N,02349.622,E,130011,A*24
+$PGRMZ,306,f,3*1E
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6017.083,N,02555.500,E,T022*26
+$GPRMC,130012,A,6129.134,N,02349.620,E,034.7,345.2,110805,006.0,E*7E
+$GPRMB,A,0.32,L,T013,T012,6129.236,N,02346.327,E,001.6,273.7,011.2,V*3C
+$GPGGA,130012,6129.136,N,02349.619,E,1,08,2.1,93.3,M,20.7,M,,*7E
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,2.9,2.3,1.5*31
+$GPGSV,3,1,12,03,03,012,00,07,02,153,00,08,52,094,40,10,15,209,30*72
+$GPGSV,3,2,12,15,13,332,39,18,19,327,37,19,21,034,40,21,04,298,00*7A
+$GPGSV,3,3,12,26,59,277,47,27,20,092,34,28,62,143,45,29,68,249,45*7A
+$PGRME,8.7,M,12.4,M,15.1,M*23
+$GPGLL,6129.142,N,02349.615,E,130013,A*2F
+$PGRMZ,307,f,3*1F
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6017.083,N,02452.500,E,T021*23
+$GPRMC,130013,A,6129.148,N,02349.613,E,035.8,345.5,110805,006.0,E*7D
+$GPRMB,A,0.33,L,T013,T012,6129.236,N,02346.327,E,001.6,273.2,010.9,V*32
+$GPGGA,130014,6129.150,N,02349.612,E,1,08,2.4,93.6,M,20.7,M,,*73
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,3.3,2.4,1.9*31
+$GPGSV,3,1,12,03,03,012,00,07,02,153,00,08,52,094,40,10,15,209,30*72
+$GPGSV,3,2,12,15,13,332,39,18,19,327,38,19,21,034,41,21,04,298,00*74
+$GPGSV,3,3,12,26,59,277,47,27,20,092,34,28,62,143,45,29,68,249,45*7A
+$PGRME,8.1,M,11.1,M,13.7,M*23
+$GPGLL,6129.156,N,02349.608,E,130014,A*21
+$PGRMZ,307,f,3*1F
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6116.083,N,02452.500,E,T020*22
+$GPRMC,130015,A,6129.161,N,02349.606,E,036.9,345.7,110805,006.0,E*74
+$GPRMB,A,0.34,L,T013,T012,6129.236,N,02346.327,E,001.6,272.7,011.0,V*39
+$GPGGA,130015,6129.163,N,02349.604,E,1,08,2.4,93.8,M,20.7,M,,*7B
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,3.3,2.4,1.9*31
+$GPGSV,3,1,12,03,03,012,00,07,02,153,00,08,52,094,40,10,15,209,30*72
+$GPGSV,3,2,12,15,13,332,40,18,19,327,38,19,21,034,40,21,04,298,00*7B
+$GPGSV,3,3,12,26,59,277,47,27,20,092,35,28,62,143,45,29,68,249,44*7A
+$PGRME,8.6,M,11.6,M,14.4,M*27
+$GPGLL,6129.171,N,02349.600,E,130015,A*2D
+$PGRMZ,308,f,3*10
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6016.083,S,02452.500,E,T019*34
+$GPRMC,130015,A,6129.176,N,02349.597,E,037.1,345.7,110805,006.0,E*70
+$GPRMB,A,0.36,L,T013,T012,6129.236,N,02346.327,E,001.6,272.2,010.6,V*39
+$GPGGA,130015,6129.178,N,02349.596,E,1,08,2.7,94.1,M,20.7,M,,*74
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,3.9,2.7,2.5*37
+$GPGSV,3,1,12,03,03,012,00,07,02,153,00,08,52,094,40,10,15,209,30*72
+$GPGSV,3,2,12,15,13,332,38,18,19,327,37,19,21,034,39,21,04,298,00*75
+$GPGSV,3,3,12,26,59,277,47,27,20,092,34,28,62,143,45,29,68,249,45*7A
+$PGRME,8.6,M,11.6,M,14.4,M*27
+$GPGLL,6129.184,N,02349.593,E,130016,A*2D
+$PGRMZ,309,f,3*11
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6016.083,N,02452.500,E,T018*28
+$GPRMC,130016,A,6129.190,N,02349.590,E,037.3,345.9,110805,006.0,E*70
+$GPRMB,A,0.37,L,T013,T012,6129.236,N,02346.327,E,001.6,271.8,010.2,V*35
+$GPGGA,130016,6129.192,N,02349.589,E,1,08,3.5,94.5,M,20.7,M,,*7A
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,7.3,3.5,5.9*31
+$GPGSV,3,1,12,03,03,012,00,07,02,153,00,08,52,094,39,10,15,209,30*7C
+$GPGSV,3,2,12,15,13,332,39,18,19,327,36,19,21,034,38,21,04,298,00*74
+$GPGSV,3,3,12,26,59,277,30,27,20,092,34,28,62,143,44,29,68,249,44*7A
+$PGRME,12.2,M,24.9,M,28.1,M*1B
+$GPGLL,6129.201,N,02349.584,E,130018,A*2B
+$PGRMZ,310,f,3*19
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6013.283,N,02456.650,E,T017*22
+$GPRMC,130019,A,6129.206,N,02349.582,E,037.3,345.9,110805,006.0,E*70
+$GPRMB,A,0.38,L,T013,T012,6129.236,N,02346.327,E,001.6,271.1,009.9,V*30
+$GPGGA,130019,6129.208,N,02349.580,E,1,08,3.5,94.6,M,20.7,M,,*7F
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,7.3,3.5,5.9*31
+$GPGSV,3,1,12,03,03,012,00,07,02,153,00,08,52,094,39,10,15,209,30*7C
+$GPGSV,3,2,12,15,13,332,38,18,19,327,36,19,21,034,37,21,04,298,00*7A
+$GPGSV,3,3,12,26,59,277,36,27,20,092,33,28,62,143,43,29,68,249,44*7C
+$PGRME,12.2,M,24.9,M,28.1,M*1B
+$GPGLL,6129.214,N,02349.577,E,130020,A*28
+$PGRMZ,311,f,3*18
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6123.283,N,02430.650,E,T016*21
+$GPRMC,130020,A,6129.219,N,02349.574,E,036.7,345.1,110805,006.0,E*70
+$GPRMB,A,0.40,L,T013,T012,6129.236,N,02346.327,E,001.6,270.6,009.9,V*39
+$GPGGA,130020,6129.221,N,02349.573,E,1,08,3.5,94.8,M,20.7,M,,*7C
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,6.9,3.5,5.9*3A
+$GPGSV,3,1,12,03,03,012,00,07,02,153,00,08,52,094,39,10,15,209,30*7C
+$GPGSV,3,2,12,15,13,332,39,18,19,327,36,19,21,034,36,21,04,298,00*7A
+$GPGSV,3,3,12,26,59,277,41,27,20,092,33,28,62,143,44,29,68,249,44*7B
+$PGRME,12.4,M,23.7,M,28.0,M*15
+$GPGLL,6129.227,N,02349.570,E,130021,A*2E
+$PGRMZ,311,f,3*18
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,0000.000,N,00000.000,W,T015*39
+$GPRMC,130021,A,6129.233,N,02349.567,E,038.3,345.4,110805,006.0,E*74
+$GPRMB,A,0.41,L,T013,T012,6129.236,N,02346.327,E,001.6,270.1,009.8,V*3E
+$GPGGA,130022,6129.235,N,02349.566,E,1,08,3.7,94.8,M,20.7,M,,*7D
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,7.2,3.7,6.0*38
+$GPGSV,3,1,12,03,03,012,00,07,02,153,00,08,52,094,39,10,15,209,30*7C
+$GPGSV,3,2,12,15,13,332,39,18,19,327,35,19,21,034,35,21,04,298,00*7A
+$GPGSV,3,3,12,26,59,277,43,27,20,092,32,28,62,143,44,29,68,249,44*78
+$PGRME,13.4,M,24.4,M,29.0,M*11
+$GPGLL,6129.241,N,02349.562,E,130022,A*2E
+$PGRMZ,310,f,3*19
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,0009.000,N,02430.650,E,T014*25
+$GPRMC,130023,A,6129.246,N,02349.560,E,038.2,345.8,110805,006.0,E*7E
+$GPRMB,A,0.42,L,T013,T012,6129.236,N,02346.327,E,001.5,269.6,009.3,V*3A
+$GPGGA,130023,6129.248,N,02349.559,E,1,08,2.8,94.6,M,20.7,M,,*7A
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,3.2,2.8,1.7*32
+$GPGSV,3,1,12,03,03,012,00,07,02,153,00,08,52,094,39,10,15,209,30*7C
+$GPGSV,3,2,12,15,13,332,40,18,19,327,36,19,21,034,35,21,04,298,00*77
+$GPGSV,3,3,12,26,59,277,45,27,20,092,32,28,62,143,44,29,68,249,45*7F
+$PGRME,13.4,M,24.4,M,29.0,M*11
+$GPGLL,6129.254,N,02349.555,E,130023,A*2F
+$PGRMZ,310,f,3*19
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6123.285,N,02430.651,E,T013*23
+$GPRMC,130024,A,6129.259,N,02349.552,E,037.7,345.6,110805,006.0,E*72
+$GPRMB,A,0.43,L,T013,T012,6129.236,N,02346.327,E,001.5,269.1,009.0,V*3F
+$GPGGA,130024,6129.261,N,02349.551,E,1,08,3.1,94.4,M,20.7,M,,*74
+$GPGSA,A,3,,,08,,15,18,19,,26,,28,29,3.8,3.1,2.2*33
+$GPGSV,3,1,12,03,03,012,00,07,02,153,00,08,52,094,40,10,15,209,30*72
+$GPGSV,3,2,12,15,13,332,40,18,19,327,37,19,21,034,34,21,04,298,00*77
+$GPGSV,3,3,12,26,59,277,46,27,20,092,31,28,62,143,44,29,68,249,45*7F
+$PGRME,13.4,M,24.4,M,29.0,M*11
+$GPGLL,6129.267,N,02349.548,E,130025,A*25
+$PGRMZ,310,f,3*19
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6129.236,N,02346.327,E,T012*22
+$GPRMC,130026,A,6129.272,N,02349.545,E,037.5,345.6,110805,006.0,E*7D
+$GPRMB,A,0.44,L,T013,T012,6129.236,N,02346.327,E,001.5,268.6,008.6,V*39
+$GPGGA,130026,6129.275,N,02349.544,E,1,07,2.6,94.4,M,20.7,M,,*7E
+$GPGSA,A,3,,,08,,15,18,19,,26,,28,29,2.6,2.6,1.0*3B
+$GPGSV,3,1,12,03,03,012,00,07,02,153,00,08,52,094,39,10,15,209,30*7C
+$GPGSV,3,2,12,15,13,332,41,18,19,327,37,19,21,034,35,21,04,298,00*77
+$GPGSV,3,3,12,26,60,276,47,27,20,092,31,28,62,143,44,29,68,249,45*75
+$PGRME,13.6,M,23.7,M,28.1,M*17
+$GPGLL,6129.280,N,02349.541,E,130026,A*26
+$PGRMZ,309,f,3*11
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6114.236,N,02346.327,E,T011*2F
+$GPRMC,130027,A,6129.285,N,02349.538,E,037.2,345.4,110805,006.0,E*7B
+$GPRMB,A,0.45,L,T013,T012,6129.236,N,02346.327,E,001.5,268.2,008.4,V*3E
+$GPGGA,130027,6129.287,N,02349.537,E,1,07,2.6,94.1,M,20.7,M,,*73
+$GPGSA,A,3,,,08,,15,18,19,,26,,28,29,2.6,2.6,1.0*3B
+$GPGSV,3,1,12,03,03,012,00,07,02,153,00,08,52,094,39,10,15,209,30*7C
+$GPGSV,3,2,12,15,13,332,41,18,19,327,37,19,21,034,35,21,04,298,00*77
+$GPGSV,3,3,12,26,60,276,47,27,20,092,31,28,62,143,44,29,68,249,45*75
+$PGRME,13.6,M,23.7,M,28.1,M*17
+$GPGLL,6129.293,N,02349.534,E,130027,A*27
+$PGRMZ,308,f,3*10
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6220.236,N,02346.327,E,T010*2A
+$GPRMC,130028,A,6129.298,N,02349.531,E,036.8,345.5,110805,006.0,E*7B
+$GPRMB,A,0.47,L,T013,T012,6129.236,N,02346.327,E,001.5,267.7,007.8,V*35
+$GPGGA,130028,6129.300,N,02349.530,E,1,07,2.8,94.0,M,20.7,M,,*7A
+$GPGSA,A,3,,,08,,15,18,19,,26,,28,29,3.2,2.8,1.7*37
+$GPGSV,3,1,12,03,03,012,00,07,02,153,00,08,52,094,39,10,15,209,30*7C
+$GPGSV,3,2,12,15,13,332,40,18,19,327,37,19,21,034,34,21,04,298,00*77
+$GPGSV,3,3,12,26,60,276,47,27,20,092,31,28,62,143,44,29,68,249,46*76
+$PGRME,9.9,M,16.6,M,9.9,M*1F
+$GPGLL,6129.306,N,02349.527,E,130028,A*27
+$PGRMZ,309,f,3*11
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6120.236,N,02346.327,E,T009*21
+$GPRMC,130029,A,6129.311,N,02349.524,E,036.9,345.7,110805,006.0,E*7D
+$GPRMB,A,0.48,L,T013,T012,6129.236,N,02346.327,E,001.5,267.2,007.5,V*32
+$GPGGA,130029,6129.313,N,02349.523,E,1,07,2.8,94.1,M,20.7,M,,*7A
+$GPGSA,A,3,,,08,,15,18,19,,26,,28,29,3.1,2.8,1.7*34
+$GPGSV,3,1,12,03,03,012,00,07,02,153,00,08,52,094,40,10,15,209,30*72
+$GPGSV,3,2,12,15,13,332,39,18,19,327,38,19,21,034,36,21,04,298,00*74
+$GPGSV,3,3,12,26,60,276,48,27,20,092,31,28,62,143,44,29,68,249,46*79
+$PGRME,11.2,M,18.1,M,12.7,M*10
+$GPGLL,6129.319,N,02349.520,E,130029,A*2F
+$PGRMZ,307,f,3*1F
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6129.234,N,02346.317,E,T008*28
+$GPRMC,130029,A,6129.328,N,02349.515,E,036.7,345.7,110805,006.0,E*7B
+$GPRMB,A,0.49,L,T013,T012,6129.236,N,02346.327,E,001.5,266.5,007.1,V*31
+$GPGGA,130029,6129.330,N,02349.514,E,1,07,2.8,93.5,M,20.7,M,,*7C
+$GPGSA,A,3,,,08,,15,18,19,,26,,28,29,3.1,2.8,1.7*34
+$GPGSV,3,1,12,03,03,012,00,07,02,153,00,08,52,094,40,10,15,209,30*72
+$GPGSV,3,2,12,15,13,332,38,18,19,327,37,19,21,034,35,21,04,298,00*79
+$GPGSV,3,3,12,26,60,276,45,27,19,092,31,28,62,143,43,29,68,249,45*7A
+$PGRME,11.2,M,18.1,M,12.7,M*10
+$GPGLL,6129.336,N,02349.510,E,130032,A*2B
+$PGRMZ,307,f,3*1F
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6157.564,N,02406.158,E,T007*26
+$GPRMC,130033,A,6129.341,N,02349.508,E,036.7,345.7,110805,006.0,E*73
+$GPRMB,A,0.51,L,T013,T012,6129.236,N,02346.327,E,001.5,266.0,006.8,V*35
+$GPGGA,130033,6129.343,N,02349.507,E,1,07,2.9,93.7,M,20.7,M,,*72
+$GPGSA,A,3,,,08,,15,18,19,,26,,28,29,3.5,2.9,2.1*34
+$GPGSV,3,1,12,03,03,012,00,07,02,153,00,08,52,094,39,10,15,209,30*7C
+$GPGSV,3,2,12,15,13,332,38,18,19,327,37,19,21,034,37,21,04,298,00*7B
+$GPGSV,3,3,12,26,60,276,46,27,19,092,31,28,62,143,43,29,68,249,45*79
+$PGRME,11.5,M,18.6,M,14.3,M*12
+$GPGLL,6129.349,N,02349.504,E,130033,A*27
+$PGRMZ,307,f,3*1F
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6145.919,N,02345.544,E,T006*2B
+$GPRMC,130034,A,6129.354,N,02349.501,E,036.7,345.6,110805,006.0,E*78
+$GPRMB,A,0.52,L,T013,T012,6129.236,N,02346.327,E,001.5,265.5,006.6,V*3E
+$GPGGA,130034,6129.356,N,02349.500,E,1,07,2.9,93.7,M,20.7,M,,*76
+$GPGSA,A,3,,,08,,15,18,19,,26,,28,29,2.6,2.6,1.0*3B
+$GPGSV,3,1,12,03,03,012,00,07,02,153,00,08,52,094,40,10,15,209,30*72
+$GPGSV,3,2,12,15,13,332,38,18,19,327,37,19,21,034,39,21,04,298,00*75
+$GPGSV,3,3,12,26,60,276,46,27,19,092,31,28,62,142,44,29,68,249,45*7F
+$PGRME,8.0,M,11.1,M,13.7,M*22
+$GPGLL,6129.362,N,02349.497,E,130034,A*22
+$PGRMZ,308,f,3*10
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6130.198,N,02342.702,E,T005*2C
+$GPRMC,130035,A,6129.367,N,02349.494,E,036.6,346.0,110805,006.0,E*70
+$GPRMB,A,0.53,L,T013,T012,6129.236,N,02346.327,E,001.5,265.0,005.8,V*37
+$GPGGA,130035,6129.369,N,02349.493,E,1,07,1.9,94.0,M,20.7,M,,*73
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,1.9,1.9,1.0*3E
+$GPGSV,3,1,12,03,03,012,00,07,02,153,00,08,52,094,40,10,15,209,30*72
+$GPGSV,3,2,12,15,13,332,38,18,19,327,38,19,21,034,39,21,04,298,00*7A
+$GPGSV,3,3,12,26,60,276,47,27,19,092,35,28,62,142,44,29,68,249,46*79
+$PGRME,8.0,M,11.1,M,13.7,M*22
+$GPGLL,6129.375,N,02349.490,E,130036,A*21
+$PGRMZ,308,f,3*10
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6216.183,N,02619.685,E,T004*25
+$GPRMC,130037,A,6129.380,N,02349.488,E,036.4,345.9,110805,006.0,E*7E
+$GPRMB,A,0.54,L,T013,T012,6129.236,N,02346.327,E,001.5,264.5,005.6,V*3A
+$GPGGA,130037,6129.382,N,02349.487,E,1,08,2.1,94.0,M,20.7,M,,*75
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,2.1,2.1,1.0*3E
+$GPGSV,3,1,12,03,03,012,00,07,02,153,00,08,52,094,40,10,15,209,30*72
+$GPGSV,3,2,12,15,13,332,38,18,19,327,38,19,21,034,40,21,04,298,00*74
+$GPGSV,3,3,12,26,60,276,48,27,19,092,34,28,62,142,44,29,68,249,46*77
+$PGRME,9.3,M,12.8,M,15.8,M*23
+$GPGLL,6129.388,N,02349.483,E,130037,A*20
+$PGRMZ,308,f,3*10
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6215.064,N,02603.837,E,T003*25
+$GPRMC,130037,A,6129.393,N,02349.481,E,036.4,345.8,110805,006.0,E*74
+$GPRMB,A,0.55,L,T013,T012,6129.236,N,02346.327,E,001.5,264.0,005.3,V*3B
+$GPGGA,130038,6129.395,N,02349.480,E,1,08,2.2,93.8,M,20.7,M,,*77
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,2.5,2.2,1.5*3C
+$GPGSV,3,1,12,03,03,012,00,07,02,153,00,08,52,094,39,10,15,209,30*7C
+$GPGSV,3,2,12,15,13,332,38,18,19,327,38,19,21,034,40,21,04,298,00*74
+$GPGSV,3,3,12,26,60,276,48,27,19,092,35,28,62,142,44,29,68,246,46*79
+$PGRME,8.0,M,11.1,M,13.7,M*22
+$GPGLL,6129.401,N,02349.476,E,130038,A*23
+$PGRMZ,308,f,3*10
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6151.098,N,02510.924,E,T002*26
+$GPRMC,130039,A,6129.405,N,02349.474,E,036.4,345.6,110805,006.0,E*76
+$GPRMB,A,0.56,L,T013,T012,6129.236,N,02346.327,E,001.5,263.5,005.2,V*3B
+$GPGGA,130039,6129.407,N,02349.473,E,1,08,2.5,93.9,M,20.7,M,,*70
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,3.2,2.5,2.1*3A
+$GPGSV,3,1,12,03,03,012,00,07,02,153,00,08,52,094,40,10,15,209,30*72
+$GPGSV,3,2,12,15,13,332,39,18,19,327,37,19,21,034,40,21,04,298,00*7A
+$GPGSV,3,3,12,26,60,276,48,27,19,092,37,28,62,142,44,29,68,246,46*7B
+$PGRME,8.0,M,11.1,M,13.7,M*22
+$GPGLL,6129.413,N,02349.469,E,130039,A*2F
+$PGRMZ,308,f,3*10
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6129.271,N,02346.376,E,T001*27
+$GPRMC,130039,A,6129.420,N,02349.466,E,036.3,345.3,110805,006.0,E*70
+$GPRMB,A,0.58,L,T013,T012,6129.236,N,02346.327,E,001.5,263.0,005.0,V*32
+$GPGGA,130041,6129.422,N,02349.465,E,1,08,2.7,93.8,M,20.7,M,,*7C
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,3.6,2.7,2.5*38
+$GPGSV,3,1,12,03,03,012,00,07,02,153,00,08,52,094,40,10,15,209,30*72
+$GPGSV,3,2,12,15,13,332,39,18,19,327,37,19,21,034,40,21,04,298,00*7A
+$GPGSV,3,3,12,26,60,276,48,27,19,092,37,28,62,142,44,29,68,247,46*7A
+$PGRME,8.0,M,11.1,M,13.7,M*22
+$GPGLL,6129.428,N,02349.461,E,130041,A*20
+$PGRMZ,307,f,3*1F
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPRTE,4,1,c,0,T030,T029,T028,T027,T026,T025,T024,T023,T022*49
+$GPRTE,4,2,c,0,T021,T020,T019,T018,T017,T016,T015,T014,T013*4B
+$GPRTE,4,3,c,0,T012,T011,T010,T009,T008,T007,T006,T005,T004*4B
+$GPRTE,4,4,c,0,T003,T002,T001*4F
+$GPWPL,6016.083,N,02452.500,E,T030*22
+$GPRMC,130042,A,6129.437,N,02349.455,E,036.8,344.3,110805,006.0,E*70
+$GPRMB,A,0.59,L,T013,T012,6129.236,N,02346.327,E,001.5,262.3,005.3,V*32
+$GPGGA,130042,6129.439,N,02349.454,E,1,08,2.1,93.6,M,20.7,M,,*7F
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,3.6,2.1,2.9*32
+$GPGSV,3,1,12,03,03,012,00,07,02,153,00,08,52,094,40,10,15,209,30*72
+$GPGSV,3,2,12,15,13,332,39,18,19,327,37,19,21,034,39,21,04,298,00*74
+$GPGSV,3,3,12,26,60,276,48,27,19,092,38,28,62,142,44,29,68,247,46*75
+$PGRME,8.0,M,11.1,M,13.7,M*22
+$GPGLL,6129.444,N,02349.451,E,130043,A*2B
+$PGRMZ,307,f,3*1F
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6123.283,N,02430.650,E,T029*2D
+$GPRMC,130044,A,6129.450,N,02349.448,E,037.2,344.3,110805,006.0,E*70
+$GPRMB,A,0.60,L,T013,T012,6129.236,N,02346.327,E,001.5,261.8,005.0,V*33
+$GPGGA,130044,6129.452,N,02349.446,E,1,08,2.2,93.8,M,20.7,M,,*7A
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,3.6,2.1,2.9*32
+$GPGSV,3,1,12,03,03,012,00,07,02,153,00,08,52,094,40,10,15,209,30*72
+$GPGSV,3,2,12,15,13,332,39,18,19,327,36,19,21,034,39,21,04,298,00*75
+$GPGSV,3,3,12,26,60,276,48,27,19,092,38,28,62,142,44,29,68,247,46*75
+$PGRME,8.0,M,11.1,M,13.7,M*22
+$GPGLL,6129.458,N,02349.443,E,130045,A*23
+$PGRMZ,307,f,3*1F
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6023.283,N,02430.650,E,T028*2D
+$GPRMC,130045,A,6129.463,N,02349.440,E,037.1,344.3,110805,006.0,E*7A
+$GPRMB,A,0.61,L,T013,T012,6129.236,N,02346.327,E,001.5,261.3,004.6,V*3E
+$GPGGA,130045,6129.465,N,02349.439,E,1,08,2.1,93.6,M,20.7,M,,*7A
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,3.6,2.1,2.9*32
+$GPGSV,3,1,12,03,03,012,00,07,02,153,00,08,52,094,40,10,15,209,30*72
+$GPGSV,3,2,12,15,13,332,39,18,19,327,36,19,21,034,39,21,04,298,00*75
+$GPGSV,3,3,12,26,60,276,48,27,19,092,38,28,62,142,44,29,68,247,45*76
+$PGRME,8.0,M,11.1,M,13.7,M*22
+$GPGLL,6129.471,N,02349.435,E,130046,A*2A
+$PGRMZ,308,f,3*10
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6123.283,N,02430.650,E,T027*23
+$GPRMC,130046,A,6129.475,N,02349.432,E,037.1,344.3,110805,006.0,E*7B
+$GPRMB,A,0.63,L,T013,T012,6129.236,N,02346.327,E,001.5,260.8,004.6,V*36
+$GPGGA,130046,6129.477,N,02349.431,E,1,08,2.1,93.8,M,20.7,M,,*7C
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,2.5,2.1,1.0*3A
+$GPGSV,3,1,12,03,03,012,00,07,02,153,00,08,52,094,40,10,15,209,30*72
+$GPGSV,3,2,12,15,13,332,39,18,19,327,36,19,21,034,37,21,04,298,00*7B
+$GPGSV,3,3,12,26,60,276,48,27,19,092,37,28,62,142,44,29,68,247,46*7A
+$PGRME,8.6,M,11.5,M,14.4,M*24
+$GPGLL,6129.483,N,02349.427,E,130046,A*24
+$PGRMZ,307,f,3*1F
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6017.083,N,02452.500,E,T026*24
+$GPRMC,130047,A,6129.488,N,02349.424,E,036.8,343.8,110805,006.0,E*7B
+$GPRMB,A,0.64,L,T013,T012,6129.236,N,02346.327,E,001.5,260.3,004.4,V*38
+$GPGGA,130047,6129.490,N,02349.423,E,1,08,2.3,93.5,M,20.7,M,,*78
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,2.8,2.3,1.3*36
+$GPGSV,3,1,12,03,03,012,00,07,02,153,00,08,52,094,40,10,15,209,30*72
+$GPGSV,3,2,12,15,13,332,40,18,19,327,35,19,21,034,37,21,04,298,00*76
+$GPGSV,3,3,12,26,60,276,48,27,19,092,37,28,62,142,43,29,68,247,46*7D
+$PGRME,9.2,M,12.0,M,15.1,M*23
+$GPGLL,6129.496,N,02349.419,E,130048,A*23
+$PGRMZ,307,f,3*1F
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6017.083,S,02453.500,E,T025*3B
+$GPRMC,130048,A,6129.500,N,02349.416,E,036.3,343.3,110805,006.0,E*74
+$GPRMB,A,0.65,L,T013,T012,6129.236,N,02346.327,E,001.5,259.8,004.2,V*3E
+$GPGGA,130049,6129.502,N,02349.415,E,1,08,2.3,93.6,M,20.7,M,,*7A
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,2.6,2.3,1.0*3B
+$GPGSV,3,1,12,03,03,012,00,07,02,153,00,08,52,094,38,10,15,209,30*7D
+$GPGSV,3,2,12,15,13,332,40,18,19,327,36,19,21,034,38,21,04,298,00*7A
+$GPGSV,3,3,12,26,60,276,48,27,19,092,37,28,62,142,43,29,68,247,45*7E
+$PGRME,8.1,M,11.3,M,13.9,M*2F
+$GPGLL,6129.508,N,02349.411,E,130049,A*2C
+$PGRMZ,307,f,3*1F
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6018.083,N,02453.500,E,T024*28
+$GPRMC,130049,A,6129.513,N,02349.408,E,036.3,342.6,110805,006.0,E*7C
+$GPRMB,A,0.66,L,T013,T012,6129.236,N,02346.327,E,001.5,259.4,004.3,V*30
+$GPGGA,130049,6129.515,N,02349.406,E,1,08,2.3,93.4,M,20.7,M,,*7C
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,2.7,2.3,1.2*38
+$GPGSV,3,1,12,03,03,012,00,07,02,153,00,08,52,094,37,10,15,209,30*72
+$GPGSV,3,2,12,15,13,332,40,18,19,327,36,19,21,034,38,21,04,298,00*7A
+$GPGSV,3,3,12,26,60,276,48,27,19,092,37,28,62,142,42,29,68,247,45*7F
+$PGRME,8.0,M,11.0,M,13.6,M*22
+$GPGLL,6129.521,N,02349.403,E,130051,A*2D
+$PGRMZ,307,f,3*1F
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6017.083,N,02452.500,W,T023*33
+$GPRMC,130051,A,6129.525,N,02349.400,E,036.1,342.6,110805,006.0,E*7A
+$GPRMB,A,0.67,L,T013,T012,6129.236,N,02346.327,E,001.5,258.9,004.3,V*3D
+$GPGGA,130051,6129.527,N,02349.398,E,1,08,2.4,93.6,M,20.7,M,,*71
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,3.1,2.4,1.7*3D
+$GPGSV,3,1,12,03,03,012,00,07,02,153,00,08,52,094,36,10,15,209,30*73
+$GPGSV,3,2,12,15,13,332,40,18,19,327,37,19,21,034,39,21,04,298,00*7A
+$GPGSV,3,3,12,26,60,276,47,27,19,092,36,28,62,142,43,29,68,247,45*70
+$PGRME,8.1,M,11.2,M,13.8,M*2F
+$GPGLL,6129.532,N,02349.395,E,130052,A*24
+$PGRMZ,307,f,3*1F
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6017.083,N,02555.500,E,T022*26
+$GPRMC,130053,A,6129.537,N,02349.392,E,035.1,342.5,110805,006.0,E*77
+$GPRMB,A,0.68,L,T013,T012,6129.236,N,02346.327,E,001.5,258.4,003.8,V*33
+$GPGGA,130053,6129.539,N,02349.390,E,1,08,2.5,93.6,M,20.7,M,,*75
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,1.9,1.9,1.0*3E
+$GPGSV,3,1,12,03,03,012,00,07,02,153,00,08,52,094,35,10,15,209,30*70
+$GPGSV,3,2,12,15,13,332,40,18,19,327,36,19,21,034,39,21,04,298,30*78
+$GPGSV,3,3,12,26,60,276,47,27,19,092,36,28,62,142,42,29,68,247,45*71
+$PGRME,8.8,M,12.4,M,15.3,M*2E
+$GPGLL,6129.544,N,02349.387,E,130053,A*27
+$PGRMZ,306,f,3*1E
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6017.083,N,02452.500,E,T021*23
+$GPRMC,130054,A,6129.549,N,02349.384,E,034.7,342.7,110805,006.0,E*7B
+$GPRMB,A,0.69,L,T013,T012,6129.236,N,02346.327,E,001.5,257.9,003.3,V*3B
+$GPGGA,130054,6129.551,N,02349.383,E,1,08,1.9,93.4,M,20.7,M,,*73
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,1.9,1.9,1.0*3E
+$GPGSV,3,1,12,03,03,012,00,07,02,153,00,08,52,094,34,10,15,209,30*71
+$GPGSV,3,2,12,15,13,332,40,18,19,327,36,19,21,034,40,21,04,298,30*76
+$GPGSV,3,3,12,26,60,276,47,27,19,092,35,28,62,142,42,29,68,247,45*72
+$PGRME,8.0,M,11.0,M,13.6,M*22
+$GPGLL,6129.556,N,02349.379,E,130054,A*22
+$PGRMZ,307,f,3*1F
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6116.083,N,02452.500,E,T020*22
+$GPRMC,130055,A,6129.561,N,02349.376,E,034.5,342.4,110805,006.0,E*7C
+$GPRMB,A,0.70,L,T013,T012,6129.236,N,02346.327,E,001.5,257.4,003.1,V*3C
+$GPGGA,130055,6129.562,N,02349.375,E,1,08,2.1,93.7,M,20.7,M,,*73
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,2.4,2.1,1.0*3B
+$GPGSV,3,1,12,03,03,012,00,07,02,153,00,08,52,094,33,10,15,209,32*74
+$GPGSV,3,2,12,15,13,332,40,18,19,327,37,19,21,034,41,21,04,298,30*76
+$GPGSV,3,3,12,26,60,276,46,27,19,092,34,28,62,142,42,29,68,247,44*73
+$PGRME,8.8,M,12.3,M,15.1,M*2B
+$GPGLL,6129.568,N,02349.370,E,130055,A*27
+$PGRMZ,307,f,3*1F
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6016.083,S,02452.500,E,T019*34
+$GPRMC,130056,A,6129.572,N,02349.367,E,034.4,341.5,110805,006.0,E*7E
+$GPRMB,A,0.71,L,T013,T012,6129.236,N,02346.327,E,001.5,256.9,003.4,V*34
+$GPGGA,130056,6129.575,N,02349.365,E,1,08,2.3,93.8,M,20.7,M,,*7A
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,2.9,2.3,1.5*31
+$GPGSV,3,1,12,03,03,012,00,07,02,153,00,08,52,094,33,10,15,209,34*72
+$GPGSV,3,2,12,15,13,332,41,18,19,327,37,19,21,034,42,21,04,298,30*74
+$GPGSV,3,3,12,26,60,276,46,27,19,092,34,28,62,142,42,29,68,247,44*73
+$PGRME,8.8,M,12.3,M,15.1,M*2B
+$GPGLL,6129.579,N,02349.361,E,130058,A*2A
+$PGRMZ,308,f,3*10
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6016.083,N,02452.500,E,T018*28
+$GPRMC,130058,A,6129.584,N,02349.358,E,034.3,340.7,110805,006.0,E*71
+$GPRMB,A,0.72,L,T013,T012,6129.236,N,02346.327,E,001.5,256.5,003.5,V*3A
+$GPGGA,130058,6129.586,N,02349.357,E,1,08,2.4,94.0,M,20.7,M,,*71
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,3.3,2.4,1.9*31
+$GPGSV,3,1,12,03,03,012,00,07,02,153,00,08,52,094,32,10,15,209,35*72
+$GPGSV,3,2,12,15,13,332,42,18,19,327,38,19,21,034,42,21,04,298,33*7B
+$GPGSV,3,3,12,26,60,276,45,27,19,092,33,28,62,142,42,29,68,247,44*77
+$PGRME,8.8,M,12.3,M,15.1,M*2B
+$GPGLL,6129.591,N,02349.353,E,130059,A*2C
+$PGRMZ,309,f,3*11
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6013.283,N,02456.650,E,T017*22
+$GPRMC,130059,A,6129.595,N,02349.349,E,034.0,339.2,110805,006.0,E*78
+$GPRMB,A,0.73,L,T013,T012,6129.236,N,02346.327,E,001.5,256.0,004.1,V*3D
+$GPGGA,130059,6129.597,N,02349.347,E,1,08,2.6,94.7,M,20.7,M,,*74
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,3.7,2.6,2.3*3E
+$GPGSV,3,1,12,03,03,012,00,07,02,153,00,08,52,094,34,10,15,209,38*79
+$GPGSV,3,2,12,15,13,332,43,18,19,327,38,19,21,034,44,21,04,298,32*7D
+$GPGSV,3,3,12,26,60,276,45,27,19,092,33,28,62,142,41,29,68,247,45*75
+$PGRME,8.8,M,12.3,M,15.1,M*2B
+$GPGLL,6129.602,N,02349.343,E,130100,A*29
+$PGRMZ,311,f,3*18
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6123.283,N,02430.650,E,T016*21
+$GPRMC,130100,A,6129.608,N,02349.338,E,033.7,338.7,110805,006.0,E*70
+$GPRMB,A,0.74,L,T013,T012,6129.236,N,02346.327,E,001.5,255.5,004.1,V*3C
+$GPGGA,130101,6129.610,N,02349.336,E,1,08,2.7,95.2,M,20.7,M,,*77
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,4.0,2.7,2.7*3B
+$GPGSV,3,1,12,03,03,012,00,07,02,153,00,08,52,094,35,10,15,209,37*77
+$GPGSV,3,2,12,15,13,332,43,18,19,327,38,19,21,034,44,21,04,298,32*7D
+$GPGSV,3,3,12,26,60,276,45,27,19,092,32,28,62,142,42,29,68,247,45*77
+$PGRME,9.4,M,13.5,M,16.4,M*27
+$GPGLL,6129.615,N,02349.332,E,130101,A*28
+$PGRMZ,314,f,3*1D
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,0000.000,N,00000.000,W,T015*39
+$GPRMC,130102,A,6129.620,N,02349.328,E,034.0,338.1,110805,006.0,E*7F
+$GPRMB,A,0.75,L,T013,T012,6129.236,N,02346.327,E,001.5,255.0,004.1,V*38
+$GPGGA,130102,6129.622,N,02349.326,E,1,08,2.8,95.9,M,20.7,M,,*70
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,4.3,2.8,3.0*31
+$GPGSV,3,1,12,03,02,012,00,07,02,153,00,08,52,094,37,10,15,209,37*74
+$GPGSV,3,2,12,15,13,332,43,18,19,327,38,19,21,034,44,21,04,298,32*7D
+$GPGSV,3,3,12,26,60,276,44,27,19,092,32,28,62,142,41,29,68,247,45*75
+$PGRME,9.4,M,13.5,M,16.4,M*27
+$GPGLL,6129.627,N,02349.322,E,130103,A*2A
+$PGRMZ,315,f,3*1C
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,0009.000,N,02430.650,E,T014*25
+$GPRMC,130103,A,6129.631,N,02349.318,E,034.4,337.9,110805,006.0,E*7E
+$GPRMB,A,0.76,L,T013,T012,6129.236,N,02346.327,E,001.5,254.5,004.1,V*3F
+$GPGGA,130104,6129.633,N,02349.316,E,1,08,2.9,95.9,M,20.7,M,,*74
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,4.6,2.9,3.3*36
+$GPGSV,3,1,12,03,02,012,00,07,02,153,00,08,52,094,38,10,15,209,38*74
+$GPGSV,3,2,12,15,13,332,43,18,19,327,38,19,21,034,45,21,04,298,31*7F
+$GPGSV,3,3,12,26,60,276,44,27,19,092,31,28,62,142,41,29,68,247,46*75
+$PGRME,9.4,M,13.5,M,16.4,M*27
+$GPGLL,6129.639,N,02349.311,E,130104,A*22
+$PGRMZ,316,f,3*1F
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6123.285,N,02430.651,E,T013*23
+$GPRMC,130105,A,6129.643,N,02349.307,E,034.9,337.2,110805,006.0,E*75
+$GPRMB,A,0.77,L,T013,T012,6129.236,N,02346.327,E,001.5,254.0,004.3,V*39
+$GPGGA,130105,6129.645,N,02349.306,E,1,08,3.0,96.5,M,20.7,M,,*72
+$GPGSA,A,3,,,08,,15,18,19,,26,,28,29,4.8,3.0,3.6*30
+$GPGSV,3,1,12,03,02,012,00,07,02,153,00,08,52,094,37,10,15,209,38*7B
+$GPGSV,3,2,12,15,13,332,43,18,19,327,38,19,21,034,45,21,04,298,31*7F
+$GPGSV,3,3,12,26,60,276,45,27,19,092,31,28,62,142,42,29,68,247,46*77
+$PGRME,9.4,M,13.5,M,16.4,M*27
+$GPGLL,6129.650,N,02349.301,E,130105,A*2D
+$PGRMZ,319,f,3*10
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6129.236,N,02346.327,E,T012*22
+$GPRMC,130106,A,6129.655,N,02349.297,E,035.2,337.1,110805,006.0,E*70
+$GPRMB,A,0.78,L,T013,T012,6129.236,N,02346.327,E,001.5,253.5,004.1,V*36
+$GPGGA,130106,6129.657,N,02349.295,E,1,07,2.6,97.6,M,20.7,M,,*73
+$GPGSA,A,3,,,08,,15,18,19,,26,,28,29,2.6,2.6,1.0*3B
+$GPGSV,3,1,12,03,02,012,00,07,02,153,00,08,52,094,37,10,15,209,38*7B
+$GPGSV,3,2,12,15,13,332,43,18,19,327,38,19,21,034,44,21,04,298,31*7E
+$GPGSV,3,3,12,26,60,276,45,27,19,092,30,28,62,142,42,29,68,247,47*77
+$PGRME,10.0,M,14.5,M,17.6,M*1F
+$GPGLL,6129.662,N,02349.290,E,130107,A*27
+$PGRMZ,321,f,3*1B
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6114.236,N,02346.327,E,T011*2F
+$GPRMC,130107,A,6129.667,N,02349.285,E,035.7,335.6,110805,006.0,E*73
+$GPRMB,A,0.79,L,T013,T012,6129.236,N,02346.327,E,001.5,253.0,004.7,V*34
+$GPGGA,130108,6129.668,N,02349.283,E,1,07,2.5,98.1,M,20.7,M,,*7D
+$GPGSA,A,3,,,08,,15,18,19,,26,,28,29,2.5,2.5,1.0*3B
+$GPGSV,3,1,12,03,02,012,00,07,02,153,34,08,52,094,39,10,15,209,36*7C
+$GPGSV,3,2,12,15,13,332,42,18,19,327,38,19,21,034,43,21,04,298,00*7A
+$GPGSV,3,3,12,26,60,276,44,27,19,092,30,28,62,142,43,29,68,247,47*77
+$PGRME,11.3,M,16.2,M,19.8,M*18
+$GPGLL,6129.674,N,02349.278,E,130108,A*29
+$PGRMZ,324,f,3*1E
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6220.236,N,02346.327,E,T010*2A
+$GPRMC,130108,A,6129.680,N,02349.272,E,036.4,335.2,110805,006.0,E*79
+$GPRMB,A,0.80,L,T013,T012,6129.236,N,02346.327,E,001.5,252.5,004.6,V*37
+$GPGGA,130109,6129.681,N,02349.271,E,1,07,2.8,99.2,M,20.7,M,,*79
+$GPGSA,A,3,,,08,,15,18,19,,26,,28,29,3.2,2.8,1.7*37
+$GPGSV,3,1,12,03,02,012,00,07,02,153,33,08,52,094,39,10,15,209,35*78
+$GPGSV,3,2,12,15,13,332,42,18,19,327,38,19,21,034,43,21,04,298,00*7A
+$GPGSV,3,3,12,26,60,276,44,27,19,092,30,28,62,142,43,29,68,247,47*77
+$PGRME,11.7,M,17.0,M,20.6,M*1B
+$GPGLL,6129.687,N,02349.264,E,130109,A*29
+$PGRMZ,325,f,3*1F
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6120.236,N,02346.327,E,T009*21
+$GPRMC,130110,A,6129.691,N,02349.260,E,036.7,334.1,110805,006.0,E*72
+$GPRMB,A,0.81,L,T013,T012,6129.236,N,02346.327,E,001.5,252.0,005.2,V*36
+$GPGGA,130110,6129.693,N,02349.258,E,1,07,2.9,99.5,M,20.7,M,,*7F
+$GPGSA,A,3,,,08,,15,18,19,,26,,28,29,3.6,2.9,2.1*37
+$GPGSV,3,1,12,03,02,012,00,07,02,153,33,08,52,094,40,10,15,209,35*76
+$GPGSV,3,2,12,15,13,332,42,18,19,327,38,19,21,034,43,21,04,298,00*7A
+$GPGSV,3,3,12,26,60,276,44,27,19,092,31,28,62,142,43,29,68,247,46*77
+$PGRME,11.7,M,17.0,M,20.6,M*1B
+$GPGLL,6129.699,N,02349.251,E,130110,A*28
+$PGRMZ,330,f,3*1B
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6129.234,N,02346.317,E,T008*28
+$GPRMC,130111,A,6129.703,N,02349.247,E,036.9,333.6,110805,006.0,E*72
+$GPRMB,A,0.82,L,T013,T012,6129.236,N,02346.327,E,001.5,251.4,005.2,V*32
+$GPGGA,130111,6129.705,N,02349.245,E,1,07,3.0,100.9,M,20.7,M,,*49
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,3.9,3.0,2.5*31
+$GPGSV,3,1,12,03,02,012,00,07,02,153,34,08,52,094,39,10,15,209,34*7E
+$GPGSV,3,2,12,15,13,332,41,18,19,327,39,19,21,034,41,21,04,298,00*7A
+$GPGSV,3,3,12,26,60,276,44,27,19,092,35,28,62,142,43,29,68,247,46*73
+$PGRME,8.0,M,11.0,M,13.6,M*22
+$GPGLL,6129.711,N,02349.239,E,130112,A*25
+$PGRMZ,332,f,3*19
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6157.564,N,02406.158,E,T007*26
+$GPRMC,130113,A,6129.715,N,02349.234,E,036.9,333.0,110805,006.0,E*75
+$GPRMB,A,0.83,L,T013,T012,6129.236,N,02346.327,E,001.5,250.9,005.2,V*3F
+$GPGGA,130113,6129.717,N,02349.232,E,1,08,1.4,101.5,M,20.7,M,,*4C
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,1.5,1.5,1.0*3E
+$GPGSV,3,1,12,03,02,012,00,07,02,153,34,08,52,094,39,10,15,209,32*78
+$GPGSV,3,2,12,15,13,332,41,18,19,327,39,19,21,034,41,21,04,298,00*7A
+$GPGSV,3,3,12,26,60,276,44,27,19,092,35,28,62,142,42,29,68,247,46*72
+$PGRME,8.8,M,12.4,M,15.2,M*2F
+$GPGLL,6129.723,N,02349.225,E,130113,A*28
+$PGRMZ,333,f,3*18
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6145.919,N,02345.544,E,T006*2B
+$GPRMC,130114,A,6129.727,N,02349.220,E,037.0,332.1,110805,006.0,E*7E
+$GPRMB,A,0.84,L,T013,T012,6129.236,N,02346.327,E,001.5,250.4,005.5,V*32
+$GPGGA,130114,6129.729,N,02349.218,E,1,08,1.6,102.6,M,20.7,M,,*4C
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,1.6,1.6,1.0*3E
+$GPGSV,3,1,12,03,02,012,00,07,02,153,35,08,52,094,38,10,15,209,31*7B
+$GPGSV,3,2,12,15,13,332,41,18,19,327,39,19,21,034,40,21,04,298,00*7B
+$GPGSV,3,3,12,26,60,276,44,27,19,092,35,28,62,142,42,29,68,247,46*72
+$PGRME,16.6,M,21.0,M,26.8,M*10
+$GPGLL,6129.735,N,02349.212,E,130115,A*2D
+$PGRMZ,337,f,3*1C
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6130.198,N,02342.702,E,T005*2C
+$GPRMC,130115,A,6129.739,N,02349.206,E,037.0,330.7,110805,006.0,E*70
+$GPRMB,A,0.85,L,T013,T012,6129.236,N,02346.327,E,001.5,249.9,006.0,V*30
+$GPGGA,130115,6129.741,N,02349.204,E,1,08,1.6,102.9,M,20.7,M,,*41
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,1.6,1.6,1.0*3E
+$GPGSV,3,1,12,03,02,012,00,07,02,153,34,08,52,094,37,10,15,209,32*76
+$GPGSV,3,2,12,15,13,332,40,18,19,327,39,19,21,034,39,21,04,298,00*74
+$GPGSV,3,3,12,26,60,276,43,27,19,092,34,28,62,142,41,29,68,247,45*74
+$PGRME,17.2,M,22.1,M,28.0,M*11
+$GPGLL,6129.746,N,02349.198,E,130116,A*2B
+$PGRMZ,338,f,3*13
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6216.183,N,02619.685,E,T004*25
+$GPRMC,130116,A,6129.750,N,02349.192,E,036.6,330.0,110805,006.0,E*72
+$GPRMB,A,0.86,L,T013,T012,6129.236,N,02346.327,E,001.5,249.4,006.0,V*3E
+$GPGGA,130116,6129.752,N,02349.190,E,1,08,1.8,102.9,M,20.7,M,,*40
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,1.8,1.8,1.0*3E
+$GPGSV,3,1,12,03,02,012,00,07,02,153,34,08,50,094,37,10,15,209,32*74
+$GPGSV,3,2,12,15,13,332,40,18,19,327,39,19,21,034,39,21,04,298,00*74
+$GPGSV,3,3,12,26,60,276,43,27,19,092,33,28,62,142,40,29,68,247,45*72
+$PGRME,8.0,M,11.0,M,13.6,M*22
+$GPGLL,6129.757,N,02349.184,E,130117,A*27
+$PGRMZ,338,f,3*13
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6215.064,N,02603.837,E,T003*25
+$GPRMC,130118,A,6129.761,N,02349.178,E,036.2,328.8,110805,006.0,E*7F
+$GPRMB,A,0.87,L,T013,T012,6129.236,N,02346.327,E,001.5,248.9,006.3,V*30
+$GPGGA,130118,6129.763,N,02349.176,E,1,08,2.0,103.3,M,20.7,M,,*44
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,2.4,2.0,1.5*3F
+$GPGSV,3,1,12,03,02,012,00,07,02,153,34,08,50,094,38,10,15,209,34*7D
+$GPGSV,3,2,12,15,13,332,40,18,19,327,40,19,21,034,38,21,04,298,00*7B
+$GPGSV,3,3,12,26,60,276,43,27,19,092,33,28,62,142,39,29,68,247,46*7F
+$PGRME,8.7,M,12.3,M,15.1,M*24
+$GPGLL,6129.768,N,02349.170,E,130119,A*2E
+$PGRMZ,339,f,3*12
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6151.098,N,02510.924,E,T002*26
+$GPRMC,130119,A,6129.772,N,02349.163,E,036.2,327.2,110805,006.0,E*73
+$GPRMB,A,0.88,L,T013,T012,6129.236,N,02346.327,E,001.5,248.4,007.1,V*31
+$GPGGA,130119,6129.774,N,02349.161,E,1,08,2.8,103.4,M,20.7,M,,*4A
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,3.1,2.8,1.0*36
+$GPGSV,3,1,12,03,02,012,00,07,02,153,35,08,50,094,39,10,15,209,36*7F
+$GPGSV,3,2,12,15,13,332,40,18,19,327,39,19,21,034,40,21,04,298,00*7A
+$GPGSV,3,3,12,26,60,276,44,27,19,092,33,28,62,142,39,29,68,247,46*78
+$PGRME,8.7,M,12.3,M,15.1,M*24
+$GPGLL,6129.779,N,02349.154,E,130120,A*22
+$PGRMZ,340,f,3*1C
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6129.271,N,02346.376,E,T001*27
+$GPRMC,130120,A,6129.783,N,02349.148,E,036.0,326.4,110805,006.0,E*7B
+$GPRMB,A,0.89,L,T013,T012,6129.236,N,02346.327,E,001.5,247.9,007.3,V*30
+$GPGGA,130121,6129.785,N,02349.146,E,1,08,1.3,103.6,M,20.7,M,,*40
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,1.3,1.3,1.0*3E
+$GPGSV,3,1,12,03,02,012,00,07,02,153,34,08,50,094,41,10,15,209,38*7F
+$GPGSV,3,2,12,15,13,332,40,18,19,327,38,19,21,034,41,21,04,298,00*7A
+$GPGSV,3,3,12,26,60,276,45,27,19,092,33,28,62,142,37,29,68,247,46*77
+$PGRME,8.0,M,11.0,M,13.6,M*22
+$GPGLL,6129.790,N,02349.139,E,130121,A*2F
+$PGRMZ,340,f,3*1C
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPRTE,4,1,c,0,T030,T029,T028,T027,T026,T025,T024,T023,T022*49
+$GPRTE,4,2,c,0,T021,T020,T019,T018,T017,T016,T015,T014,T013*4B
+$GPRTE,4,3,c,0,T012,T011,T010,T009,T008,T007,T006,T005,T004*4B
+$GPRTE,4,4,c,0,T003,T002,T001*4F
+$GPWPL,6016.083,N,02452.500,E,T030*22
+$GPRMC,130122,A,6129.797,N,02349.127,E,036.0,325.0,110805,006.0,E*72
+$GPRMB,A,0.90,L,T013,T012,6129.236,N,02346.327,E,001.5,247.2,007.8,V*38
+$GPGGA,130122,6129.799,N,02349.125,E,1,08,1.4,103.7,M,20.7,M,,*4D
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,1.4,1.4,1.0*3E
+$GPGSV,3,1,12,03,02,012,00,07,02,153,34,08,50,094,41,10,15,209,37*70
+$GPGSV,3,2,12,15,13,332,39,18,19,327,38,19,21,034,40,21,04,298,00*75
+$GPGSV,3,3,12,26,60,276,45,27,19,092,33,28,62,142,37,29,68,247,47*76
+$PGRME,10.0,M,13.5,M,16.8,M*17
+$GPGLL,6129.803,N,02349.117,E,130122,A*25
+$PGRMZ,339,f,3*12
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6123.283,N,02430.650,E,T029*2D
+$GPRMC,130123,A,6129.807,N,02349.110,E,036.3,323.7,110805,006.0,E*73
+$GPRMB,A,0.91,L,T013,T012,6129.236,N,02346.327,E,001.5,246.7,008.3,V*39
+$GPGGA,130123,6129.809,N,02349.108,E,1,08,1.5,103.4,M,20.7,M,,*47
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,1.5,1.5,1.0*3E
+$GPGSV,3,1,12,03,02,012,00,07,02,153,33,08,50,094,42,10,15,209,36*75
+$GPGSV,3,2,12,15,13,332,38,18,19,327,39,19,21,034,38,21,04,298,00*7A
+$GPGSV,3,3,12,26,60,276,44,27,19,092,32,28,62,142,37,29,68,247,47*76
+$PGRME,11.5,M,15.8,M,19.6,M*19
+$GPGLL,6129.813,N,02349.098,E,130124,A*24
+$PGRMZ,337,f,3*1C
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6023.283,N,02430.650,E,T028*2D
+$GPRMC,130124,A,6129.817,N,02349.091,E,036.7,320.9,110805,006.0,E*74
+$GPRMB,A,0.91,L,T013,T012,6129.236,N,02346.327,E,001.4,246.2,009.7,V*38
+$GPGGA,130124,6129.819,N,02349.088,E,1,08,2.0,102.2,M,20.7,M,,*49
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,2.5,2.0,1.8*33
+$GPGSV,3,1,12,03,02,012,00,07,02,153,32,08,50,094,42,10,15,209,35*77
+$GPGSV,3,2,12,15,13,332,37,18,19,327,40,19,21,034,38,21,04,298,00*7B
+$GPGSV,3,3,12,26,60,276,44,27,19,092,32,28,62,142,38,29,68,247,47*79
+$PGRME,11.5,M,15.8,M,19.6,M*19
+$GPGLL,6129.823,N,02349.080,E,130124,A*2E
+$PGRMZ,335,f,3*1E
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6123.283,N,02430.650,E,T027*23
+$GPRMC,130126,A,6129.827,N,02349.073,E,036.8,320.2,110805,006.0,E*7D
+$GPRMB,A,0.92,L,T013,T012,6129.236,N,02346.327,E,001.4,245.7,009.7,V*3D
+$GPGGA,130126,6129.829,N,02349.071,E,1,08,2.4,102.1,M,20.7,M,,*49
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,3.3,2.4,2.5*3E
+$GPGSV,3,1,12,03,02,012,00,07,02,153,32,08,50,094,41,10,15,209,35*74
+$GPGSV,3,2,12,15,13,332,37,18,19,327,39,19,21,034,37,21,04,298,00*7A
+$GPGSV,3,3,12,26,60,276,45,27,19,092,32,28,62,142,39,29,68,247,47*79
+$PGRME,11.5,M,15.8,M,19.6,M*19
+$GPGLL,6129.833,N,02349.062,E,130127,A*20
+$PGRMZ,335,f,3*1E
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6017.083,N,02452.500,E,T026*24
+$GPRMC,130127,A,6129.837,N,02349.056,E,036.8,320.2,110805,006.0,E*7A
+$GPRMB,A,0.93,L,T013,T012,6129.236,N,02346.327,E,001.4,245.3,009.8,V*37
+$GPGGA,130127,6129.839,N,02349.053,E,1,08,2.4,102.1,M,20.7,M,,*49
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,2.8,2.4,1.0*32
+$GPGSV,3,1,12,03,02,012,00,07,02,153,00,08,50,094,39,10,15,209,33*7C
+$GPGSV,3,2,12,15,13,332,36,18,19,327,39,19,21,034,36,21,04,298,00*7A
+$GPGSV,3,3,12,26,60,276,46,27,19,092,31,28,62,142,40,29,68,247,48*78
+$PGRME,11.1,M,15.9,M,11.1,M*13
+$GPGLL,6129.842,N,02349.040,E,130128,A*29
+$PGRMZ,335,f,3*1E
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6017.083,S,02453.500,E,T025*3B
+$GPRMC,130129,A,6129.845,N,02349.032,E,036.9,313.3,110805,006.0,E*73
+$GPRMB,A,0.93,L,T013,T012,6129.236,N,02346.327,E,001.4,244.7,013.6,V*37
+$GPGGA,130129,6129.846,N,02349.029,E,1,08,2.8,102.1,M,20.7,M,,*4E
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,3.6,2.8,1.8*39
+$GPGSV,3,1,12,03,02,012,00,07,02,153,00,08,50,094,39,10,15,209,33*7C
+$GPGSV,3,2,12,15,13,332,35,18,19,327,40,19,21,034,35,21,04,298,35*72
+$GPGSV,3,3,12,26,60,276,47,27,19,092,31,28,62,142,41,29,68,247,48*78
+$PGRME,12.5,M,18.0,M,14.5,M*11
+$GPGLL,6129.851,N,02349.019,E,130129,A*26
+$PGRMZ,336,f,3*1D
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6018.083,N,02453.500,E,T024*28
+$GPRMC,130130,A,6129.854,N,02349.011,E,036.9,312.9,110805,006.0,E*71
+$GPRMB,A,0.94,L,T013,T012,6129.236,N,02346.327,E,001.4,244.2,013.5,V*36
+$GPGGA,130130,6129.856,N,02349.008,E,1,08,3.1,102.3,M,20.7,M,,*4E
+$GPGSA,A,3,,,08,,15,18,,,26,27,28,29,5.0,3.4,3.2*34
+$GPGSV,3,1,12,03,02,012,00,07,02,153,00,08,50,094,38,10,14,208,32*7C
+$GPGSV,3,2,12,15,13,332,35,18,19,327,40,19,21,034,35,21,04,298,36*71
+$GPGSV,3,3,12,26,60,276,47,27,19,092,31,28,62,142,42,29,68,247,48*7B
+$PGRME,12.5,M,18.0,M,14.5,M*11
+$GPGLL,6129.860,N,02348.999,E,130130,A*2C
+$PGRMZ,336,f,3*1D
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6017.083,N,02452.500,W,T023*33
+$GPRMC,130131,A,6129.863,N,02348.990,E,036.8,311.7,110805,006.0,E*79
+$GPRMB,A,0.94,L,T013,T012,6129.236,N,02346.327,E,001.4,243.7,013.7,V*36
+$GPGGA,130131,6129.864,N,02348.987,E,1,07,3.7,102.4,M,20.7,M,,*4F
+$GPGSA,A,3,,,08,,15,18,,,26,,28,29,5.6,3.7,3.8*3E
+$GPGSV,3,1,12,03,02,012,00,07,02,153,00,08,50,094,37,10,14,208,32*73
+$GPGSV,3,2,12,15,13,332,33,18,19,327,39,19,21,034,34,21,04,298,39*77
+$GPGSV,3,3,12,26,60,276,48,27,19,092,31,28,62,142,42,29,68,247,48*74
+$PGRME,11.1,M,16.6,M,11.1,M*1F
+$GPGLL,6129.868,N,02348.977,E,130132,A*26
+$PGRMZ,336,f,3*1D
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6017.083,N,02555.500,E,T022*26
+$GPRMC,130132,A,6129.871,N,02348.969,E,036.8,310.7,110805,006.0,E*7E
+$GPRMB,A,0.95,L,T013,T012,6129.236,N,02346.327,E,001.4,243.2,014.2,V*30
+$GPGGA,130133,6129.873,N,02348.966,E,1,06,2.8,102.4,M,20.7,M,,*4B
+$GPGSA,A,3,,,08,,,18,,,26,,28,29,2.8,2.8,1.0*37
+$GPGSV,3,1,12,03,02,012,00,07,02,153,00,08,50,094,36,10,14,208,32*72
+$GPGSV,3,2,12,15,13,332,32,18,19,327,38,19,21,034,36,21,04,298,39*75
+$GPGSV,3,3,12,26,60,276,48,27,19,092,30,28,62,142,42,29,68,247,48*75
+$PGRME,7.7,M,16.6,M,7.7,M*1F
+$GPGLL,6129.876,N,02348.955,E,130133,A*28
+$PGRMZ,336,f,3*1D
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6017.083,N,02452.500,E,T021*23
+$GPRMC,130134,A,6129.879,N,02348.946,E,037.0,303.4,110805,006.0,E*75
+$GPRMB,A,0.95,L,T013,T012,6129.236,N,02346.327,E,001.4,242.8,018.3,V*36
+$GPGGA,130134,6129.879,N,02348.941,E,1,05,2.3,101.6,M,20.7,M,,*4A
+$GPGSA,A,3,,,08,,,18,19,,26,,28,29,2.8,2.3,1.8*3C
+$GPGSV,3,1,12,03,02,012,00,07,02,153,00,08,50,094,37,10,14,208,36*77
+$GPGSV,3,2,12,15,13,332,32,18,19,327,39,19,21,034,36,21,04,298,40*7A
+$GPGSV,3,3,12,26,60,276,48,27,19,092,30,28,62,142,42,29,68,247,47*7A
+$PGRME,9.4,M,18.7,M,11.4,M*29
+$GPGLL,6129.883,N,02348.930,E,130134,A*26
+$PGRMZ,333,f,3*18
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6116.083,N,02452.500,E,T020*22
+$GPRMC,130135,A,6129.885,N,02348.921,E,037.4,303.1,110805,006.0,E*77
+$GPRMB,A,0.96,L,T013,T012,6129.236,N,02346.327,E,001.4,242.3,018.5,V*38
+$GPGGA,130135,6129.886,N,02348.916,E,1,06,2.4,101.1,M,20.7,M,,*4A
+$GPGSA,A,3,,,08,,,18,19,,26,,28,29,2.8,2.4,1.0*33
+$GPGSV,3,1,12,03,02,012,00,07,02,153,00,08,50,094,38,10,14,208,35*7B
+$GPGSV,3,2,12,15,13,332,31,18,19,327,39,19,21,034,39,21,04,298,39*78
+$GPGSV,3,3,12,26,60,276,49,27,19,092,30,28,62,142,42,29,68,247,47*7B
+$PGRME,10.3,M,19.9,M,13.9,M*16
+$GPGLL,6129.889,N,02348.905,E,130136,A*28
+$PGRMZ,332,f,3*19
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6016.083,S,02452.500,E,T019*34
+$GPRMC,130136,A,6129.891,N,02348.895,E,037.5,300.1,110805,006.0,E*7D
+$GPRMB,A,0.96,L,T013,T012,6129.236,N,02346.327,E,001.4,241.9,019.8,V*3D
+$GPGGA,130136,6129.892,N,02348.892,E,1,06,2.6,101.9,M,20.7,M,,*4B
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,3.4,2.6,1.7*3A
+$GPGSV,3,1,12,03,02,012,00,07,02,153,00,08,50,094,38,10,14,208,34*7A
+$GPGSV,3,2,12,15,13,332,31,18,19,327,39,19,21,034,39,21,04,298,37*76
+$GPGSV,3,3,12,26,60,276,49,27,19,092,33,28,62,142,42,29,68,247,47*78
+$PGRME,8.6,M,11.4,M,14.3,M*22
+$GPGLL,6129.895,N,02348.880,E,130137,A*28
+$PGRMZ,336,f,3*1D
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6016.083,N,02452.500,E,T018*28
+$GPRMC,130138,A,6129.897,N,02348.870,E,037.5,298.9,110805,006.0,E*76
+$GPRMB,A,0.96,L,T013,T012,6129.236,N,02346.327,E,001.4,241.4,020.3,V*31
+$GPGGA,130138,6129.898,N,02348.866,E,1,08,2.7,102.4,M,20.7,M,,*45
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,3.5,2.4,1.3*3D
+$GPGSV,3,1,12,03,02,012,00,07,02,153,00,08,50,094,37,10,14,208,34*75
+$GPGSV,3,2,12,15,13,332,31,18,19,327,38,19,21,034,40,21,04,298,37*79
+$GPGSV,3,3,12,26,60,276,49,27,19,092,34,28,62,142,41,29,68,247,47*7C
+$PGRME,8.7,M,11.8,M,14.7,M*2B
+$GPGLL,6129.901,N,02348.855,E,130138,A*23
+$PGRMZ,338,f,3*13
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6013.283,N,02456.650,E,T017*22
+$GPRMC,130139,A,6129.904,N,02348.845,E,037.6,298.8,110805,006.0,E*78
+$GPRMB,A,0.96,L,T013,T012,6129.236,N,02346.327,E,001.4,241.0,020.1,V*37
+$GPGGA,130139,6129.905,N,02348.841,E,1,08,2.4,102.9,M,20.7,M,,*4A
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,3.5,2.4,1.3*3D
+$GPGSV,3,1,12,03,02,012,00,07,02,153,00,08,50,094,36,10,14,208,34*74
+$GPGSV,3,2,12,15,13,332,31,18,19,327,37,19,21,034,39,21,04,298,35*7A
+$GPGSV,3,3,12,26,60,276,49,27,19,092,35,28,62,142,41,29,68,247,46*7C
+$PGRME,9.6,M,12.2,M,15.6,M*22
+$GPGLL,6129.908,N,02348.827,E,130139,A*2E
+$PGRMZ,340,f,3*1C
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6123.283,N,02430.650,E,T016*21
+$GPRMC,130139,A,6129.911,N,02348.817,E,037.9,297.9,110805,006.0,E*7A
+$GPRMB,A,0.97,L,T013,T012,6129.236,N,02346.327,E,001.4,240.4,020.5,V*37
+$GPGGA,130139,6129.912,N,02348.813,E,1,08,2.5,103.8,M,20.7,M,,*4A
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,3.5,2.5,1.0*3F
+$GPGSV,3,1,12,03,02,012,00,07,02,153,00,08,50,094,34,10,14,208,35*77
+$GPGSV,3,2,12,15,13,332,31,18,19,327,36,19,21,034,38,21,04,298,33*7C
+$GPGSV,3,3,12,26,60,276,49,27,19,092,34,28,62,142,41,29,68,247,46*7D
+$PGRME,9.6,M,12.2,M,15.6,M*22
+$GPGLL,6129.915,N,02348.802,E,130139,A*25
+$PGRMZ,341,f,3*1D
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,0000.000,N,00000.000,W,T015*39
+$GPRMC,130139,A,6129.918,N,02348.790,E,037.9,297.9,110805,006.0,E*73
+$GPRMB,A,0.97,L,T013,T012,6129.236,N,02346.327,E,001.4,239.9,020.5,V*34
+$GPGGA,130139,6129.918,N,02348.786,E,1,08,2.5,104.1,M,20.7,M,,*4D
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,3.5,2.5,1.0*3F
+$GPGSV,3,1,12,03,02,012,00,07,02,153,00,08,50,094,33,10,14,208,37*72
+$GPGSV,3,2,12,15,13,332,31,18,19,327,35,19,21,034,37,21,04,298,33*70
+$GPGSV,3,3,12,26,60,276,49,27,19,092,34,28,62,142,41,29,68,247,46*7D
+$PGRME,9.6,M,12.2,M,15.6,M*22
+$GPGLL,6129.922,N,02348.773,E,130142,A*24
+$PGRMZ,342,f,3*1E
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,0009.000,N,02430.650,E,T014*25
+$GPRMC,130142,A,6129.924,N,02348.763,E,037.8,298.2,110805,006.0,E*79
+$GPRMB,A,0.97,L,T013,T012,6129.236,N,02346.327,E,001.4,239.4,020.5,V*39
+$GPGGA,130142,6129.925,N,02348.759,E,1,08,3.5,104.2,M,20.7,M,,*4F
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,4.4,3.5,1.0*38
+$GPGSV,3,1,12,03,02,012,00,07,02,153,00,08,50,094,32,10,14,208,40*73
+$GPGSV,3,2,12,15,13,332,31,18,19,327,34,19,21,034,36,21,04,298,32*71
+$GPGSV,3,3,12,26,60,276,49,27,19,092,33,28,62,142,41,29,68,247,45*79
+$PGRME,13.7,M,12.7,M,19.1,M*16
+$GPGLL,6129.928,N,02348.747,E,130142,A*29
+$PGRMZ,342,f,3*1E
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6123.285,N,02430.651,E,T013*23
+$GPRMC,130144,A,6129.931,N,02348.738,E,037.8,299.9,110805,006.0,E*7F
+$GPRMB,A,0.98,L,T013,T012,6129.236,N,02346.327,E,001.3,238.9,018.3,V*30
+$GPGGA,130144,6129.932,N,02348.734,E,1,08,4.5,104.3,M,20.7,M,,*42
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,5.3,4.5,1.0*39
+$GPGSV,3,1,12,03,02,012,00,07,02,153,00,08,50,094,31,10,14,208,39*7E
+$GPGSV,3,2,12,15,13,332,31,18,19,327,34,19,21,034,35,21,04,298,32*72
+$GPGSV,3,3,12,26,60,276,48,27,19,092,33,28,62,142,41,29,68,247,45*78
+$PGRME,13.7,M,12.7,M,19.1,M*16
+$GPGLL,6129.934,N,02348.722,E,130145,A*20
+$PGRMZ,342,f,3*1E
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6129.236,N,02346.327,E,T012*22
+$GPRMC,130145,A,6129.937,N,02348.712,E,037.8,298.5,110805,006.0,E*7D
+$GPRMB,A,0.98,L,T013,T012,6129.236,N,02346.327,E,001.3,238.4,019.0,V*3F
+$GPGGA,130146,6129.938,N,02348.708,E,1,08,5.3,104.4,M,20.7,M,,*45
+$GPGSA,A,3,,,08,,,18,19,,26,27,28,29,6.7,6.1,1.0*3C
+$GPGSV,3,1,12,03,02,012,00,07,02,153,00,08,50,094,31,10,14,208,39*7E
+$GPGSV,3,2,12,15,13,332,31,18,19,327,34,19,21,034,35,21,04,298,32*72
+$GPGSV,3,3,12,26,60,276,48,27,19,092,32,28,62,142,41,29,68,247,45*79
+$PGRME,13.7,M,12.7,M,19.1,M*16
+$GPGLL,6129.941,N,02348.697,E,130146,A*2E
+$PGRMZ,343,f,3*1F
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6114.236,N,02346.327,E,T011*2F
+$GPRMC,130146,A,6129.943,N,02348.687,E,037.8,298.6,110805,006.0,E*73
+$GPRMB,A,0.98,L,T013,T012,6129.236,N,02346.327,E,001.3,237.9,018.6,V*3A
+$GPGGA,130147,6129.944,N,02348.683,E,1,07,6.1,104.5,M,20.7,M,,*42
+$GPGSA,A,3,,,08,,,,19,,26,27,28,29,6.7,6.1,1.0*35
+$GPGSV,3,1,12,03,02,012,00,07,02,153,00,08,50,094,31,10,14,208,38*7F
+$GPGSV,3,2,12,15,13,332,31,18,19,327,34,19,21,034,34,21,04,298,32*73
+$GPGSV,3,3,12,26,60,276,48,27,19,092,32,28,62,142,41,29,68,247,45*79
+$PGRME,13.7,M,12.7,M,19.1,M*16
+$GPGLL,6129.947,N,02348.672,E,130147,A*22
+$PGRMZ,343,f,3*1F
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6220.236,N,02346.327,E,T010*2A
+$GPRMC,130147,A,6129.950,N,02348.662,E,037.8,298.8,110805,006.0,E*75
+$GPRMB,A,0.99,L,T013,T012,6129.236,N,02346.327,E,001.3,237.3,018.1,V*36
+$GPGGA,130147,6129.951,N,02348.658,E,1,06,2.8,104.6,M,20.7,M,,*4F
+$GPGSA,A,3,,,08,,,18,,,26,27,28,29,2.8,2.8,1.0*32
+$GPGSV,3,1,12,03,02,012,00,07,02,153,00,08,50,094,36,10,14,208,37*77
+$GPGSV,3,2,12,15,13,332,31,18,19,327,35,19,21,034,34,21,04,298,31*71
+$GPGSV,3,3,12,26,60,276,48,27,19,092,32,28,62,142,40,29,68,247,46*7B
+$PGRME,11.5,M,13.4,M,11.5,M*18
+$GPGLL,6129.954,N,02348.647,E,130149,A*28
+$PGRMZ,343,f,3*1F
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6120.236,N,02346.327,E,T009*21
+$GPRMC,130150,A,6129.957,N,02348.637,E,037.8,299.5,110805,006.0,E*78
+$GPRMB,A,0.99,L,T013,T012,6129.236,N,02346.327,E,001.3,236.8,017.5,V*37
+$GPGGA,130150,6129.958,N,02348.633,E,1,06,2.9,104.6,M,20.7,M,,*4C
+$GPGSA,A,3,,,08,,,18,,,26,,28,29,3.7,3.2,1.8*3A
+$GPGSV,3,1,12,03,02,012,00,07,02,153,00,08,50,094,36,10,14,208,38*78
+$GPGSV,3,2,12,15,13,332,31,18,19,327,36,19,21,034,33,21,04,298,31*75
+$GPGSV,3,3,12,26,60,276,48,27,19,092,31,28,62,142,40,29,68,247,47*79
+$PGRME,12.9,M,15.9,M,14.9,M*15
+$GPGLL,6129.961,N,02348.622,E,130150,A*25
+$PGRMZ,345,f,3*19
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6129.234,N,02346.317,E,T008*28
+$GPRMC,130150,A,6129.964,N,02348.613,E,037.8,300.1,110805,006.0,E*7B
+$GPRMB,A,0.99,L,T013,T012,6129.236,N,02346.327,E,001.3,236.3,016.8,V*30
+$GPGGA,130150,6129.965,N,02348.609,E,1,05,3.2,105.1,M,20.7,M,,*44
+$GPGSA,A,3,,,08,,,18,,,26,,28,29,3.7,3.2,1.8*3A
+$GPGSV,3,1,12,03,02,012,00,07,02,153,00,08,50,094,36,10,14,208,37*77
+$GPGSV,3,2,12,15,13,331,31,18,19,327,37,19,21,034,33,21,04,298,31*77
+$GPGSV,3,3,12,26,60,276,48,27,19,092,31,28,62,142,41,29,68,247,47*78
+$PGRME,12.9,M,15.9,M,14.9,M*15
+$GPGLL,6129.968,N,02348.597,E,130152,A*23
+$PGRMZ,345,f,3*19
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6157.564,N,02406.158,E,T007*26
+$GPRMC,130152,A,6129.972,N,02348.591,E,036.9,311.2,110805,006.0,E*74
+$GPRMB,A,1.00,L,T013,T012,6129.236,N,02346.327,E,001.3,235.7,009.3,V*33
+$GPGGA,130152,6129.974,N,02348.587,E,1,05,2.8,105.0,M,20.7,M,,*49
+$GPGSA,A,3,,,08,,,18,,,26,,28,29,2.8,2.8,1.0*37
+$GPGSV,3,1,12,03,02,012,00,07,02,153,00,08,50,094,35,10,14,208,35*76
+$GPGSV,3,2,12,15,13,331,31,18,19,327,40,19,21,034,31,21,04,298,31*75
+$GPGSV,3,3,12,26,60,276,46,27,19,092,31,28,62,142,40,29,68,247,46*76
+$PGRME,11.1,M,16.0,M,11.1,M*19
+$GPGLL,6129.978,N,02348.579,E,130153,A*23
+$PGRMZ,344,f,3*18
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6145.919,N,02345.544,E,T006*2B
+$GPRMC,130154,A,6129.981,N,02348.571,E,036.8,312.7,110805,006.0,E*77
+$GPRMB,A,1.00,L,T013,T012,6129.236,N,02346.327,E,001.3,235.2,008.1,V*35
+$GPGGA,130154,6129.983,N,02348.568,E,1,05,2.8,105.0,M,20.7,M,,*46
+$GPGSA,A,3,,,08,,,18,,,26,,28,29,2.8,2.8,1.0*37
+$GPGSV,3,1,12,03,02,012,00,07,02,153,00,08,50,094,36,10,14,208,34*74
+$GPGSV,3,2,12,15,13,331,31,18,19,327,41,19,21,034,31,21,04,298,31*74
+$GPGSV,3,3,12,26,60,276,45,27,19,092,31,28,62,142,40,29,68,247,46*75
+$PGRME,12.6,M,18.2,M,14.6,M*13
+$GPGLL,6129.988,N,02348.560,E,130154,A*23
+$PGRMZ,347,f,3*1B
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6130.198,N,02342.702,E,T005*2C
+$GPRMC,130154,A,6129.992,N,02348.550,E,036.8,314.5,110805,006.0,E*72
+$GPRMB,A,1.01,L,T013,T012,6129.236,N,02346.327,E,001.3,234.5,006.6,V*3B
+$GPGGA,130155,6129.994,N,02348.547,E,1,05,2.8,105.9,M,20.7,M,,*45
+$GPGSA,A,3,,,08,,,18,,,26,,28,29,2.8,2.8,1.0*37
+$GPGSV,3,1,12,03,02,012,00,07,02,153,00,08,50,094,36,10,14,208,33*73
+$GPGSV,3,2,12,15,13,331,31,18,19,327,41,19,21,034,31,21,04,298,31*74
+$GPGSV,3,3,12,26,60,276,45,27,19,092,31,28,62,142,39,29,68,247,46*7B
+$PGRME,12.6,M,18.2,M,14.6,M*13
+$GPGLL,6129.998,N,02348.539,E,130155,A*2F
+$PGRMZ,349,f,3*15
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6216.183,N,02619.685,E,T004*25
+$GPRMC,130156,A,6130.002,N,02348.532,E,036.6,316.2,110805,006.0,E*77
+$GPRMB,A,1.02,L,T013,T012,6129.236,N,02346.327,E,001.3,233.9,005.0,V*36
+$GPGGA,130157,6130.004,N,02348.529,E,1,05,2.8,106.5,M,20.7,M,,*48
+$GPGSA,A,3,,,08,,,18,,,26,,28,29,2.8,2.8,1.0*37
+$GPGSV,3,1,12,03,02,012,00,07,02,153,00,08,50,094,35,10,14,208,33*70
+$GPGSV,3,2,12,15,13,331,30,18,19,327,40,19,21,034,31,21,04,298,00*76
+$GPGSV,3,3,12,26,60,276,43,27,19,092,31,28,62,142,39,29,68,247,47*7C
+$PGRME,19.2,M,25.9,M,24.3,M*1F
+$GPGLL,6130.005,N,02348.517,E,130157,A*24
+$PGRMZ,337,f,3*1C
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6215.064,N,02603.837,E,T003*25
+$GPRMC,130157,A,6130.007,N,02348.509,E,033.2,298.6,110805,006.0,E*79
+$GPRMB,A,1.02,L,T013,T012,6129.236,N,02346.327,E,001.3,233.6,014.0,V*39
+$GPGGA,130157,6130.008,N,02348.505,E,1,05,4.8,102.0,M,20.7,M,,*4D
+$GPGSA,A,3,,,08,,15,18,,,26,,28,29,6.1,4.8,3.7*3D
+$GPGSV,3,1,12,03,02,012,00,07,02,153,00,08,50,094,37,10,14,208,32*73
+$GPGSV,3,2,12,15,13,331,33,18,19,327,39,19,21,034,31,21,04,298,00*7B
+$GPGSV,3,3,12,26,60,276,44,27,19,092,31,28,62,142,38,29,68,247,46*7B
+$PGRME,22.3,M,30.1,M,30.3,M*1F
+$GPGLL,6130.010,N,02348.495,E,130158,A*24
+$PGRMZ,331,f,3*1A
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6151.098,N,02510.924,E,T002*26
+$GPRMC,130158,A,6130.014,N,02348.490,E,032.7,307.0,110805,006.0,E*70
+$GPRMB,A,1.03,L,T013,T012,6129.236,N,02346.327,E,001.3,233.0,009.1,V*33
+$GPGGA,130159,6130.016,N,02348.486,E,1,06,5.6,100.8,M,20.7,M,,*40
+$GPGSA,A,3,,,08,,15,18,,,26,,28,29,7.6,5.6,5.0*35
+$GPGSV,3,1,12,03,02,012,00,07,02,153,00,08,50,094,37,10,14,208,32*73
+$GPGSV,3,2,12,15,13,331,34,18,19,327,38,19,21,034,34,21,04,298,00*78
+$GPGSV,3,3,12,26,60,276,43,27,19,092,00,28,62,142,38,29,68,247,46*7E
+$PGRME,22.3,M,30.1,M,30.3,M*1F
+$GPGLL,6130.019,N,02348.478,E,130159,A*2F
+$PGRMZ,329,f,3*13
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6129.271,N,02346.376,E,T001*27
+$GPRMC,130159,A,6130.027,N,02348.480,E,035.1,330.5,110805,006.0,E*70
+$GPRMB,A,1.04,L,T013,T012,6129.236,N,02346.327,E,001.3,232.4,-004.9,V*19
+$GPGGA,130201,6130.029,N,02348.478,E,1,06,3.8,99.5,M,20.7,M,,*77
+$GPGSA,A,3,,,08,,15,18,19,,26,,28,29,7.2,3.8,5.1*30
+$GPGSV,3,1,12,03,02,012,00,07,02,153,00,08,50,094,35,10,14,208,32*71
+$GPGSV,3,2,12,15,13,331,34,18,19,327,37,19,21,034,33,21,04,298,00*70
+$GPGSV,3,3,12,26,60,276,41,27,19,092,00,28,62,142,37,29,68,247,44*71
+$PGRME,15.4,M,24.5,M,28.9,M*1E
+$GPGLL,6130.034,N,02348.472,E,130201,A*24
+$PGRMZ,325,f,3*1F
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPRTE,4,1,c,0,T030,T029,T028,T027,T026,T025,T024,T023,T022*49
+$GPRTE,4,2,c,0,T021,T020,T019,T018,T017,T016,T015,T014,T013*4B
+$GPRTE,4,3,c,0,T012,T011,T010,T009,T008,T007,T006,T005,T004*4B
+$GPRTE,4,4,c,0,T003,T002,T001*4F
+$GPWPL,6016.083,N,02452.500,E,T030*22
+$GPRMC,130201,A,6130.041,N,02348.466,E,032.3,333.8,110805,006.0,E*7D
+$GPRMB,A,1.05,L,T013,T012,6129.236,N,02346.327,E,001.3,231.8,-006.7,V*1B
+$GPGGA,130201,6130.042,N,02348.464,E,1,07,3.7,98.7,M,20.7,M,,*7A
+$GPGSA,A,3,,,08,,15,18,19,,26,,28,29,3.7,3.7,1.0*3B
+$GPGSV,3,1,12,03,02,012,00,07,02,153,00,08,50,094,35,10,14,208,32*71
+$GPGSV,3,2,12,15,13,331,34,18,19,326,36,19,21,034,33,21,04,298,00*70
+$GPGSV,3,3,12,26,60,276,41,27,19,092,00,28,62,142,38,29,68,247,44*7E
+$PGRME,15.2,M,16.6,M,15.2,M*1F
+$GPGLL,6130.047,N,02348.459,E,130201,A*29
+$PGRMZ,323,f,3*19
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6123.283,N,02430.650,E,T029*2D
+$GPRMC,130203,A,6130.051,N,02348.455,E,032.3,333.8,110805,006.0,E*7E
+$GPRMB,A,1.06,L,T013,T012,6129.236,N,02346.327,E,001.3,231.3,-006.7,V*13
+$GPGGA,130203,6130.053,N,02348.453,E,1,07,3.7,98.4,M,20.7,M,,*7F
+$GPGSA,A,3,,,08,,15,18,19,,26,,28,29,3.7,3.7,1.0*3B
+$GPGSV,3,1,12,03,02,012,00,07,02,153,00,08,50,094,34,10,14,208,31*73
+$GPGSV,3,2,12,15,13,331,33,18,19,326,35,19,21,034,32,21,04,298,00*75
+$GPGSV,3,3,12,26,60,276,40,27,19,092,00,28,62,142,38,29,68,247,42*79
+$PGRME,18.6,M,16.6,M,18.6,M*1F
+$GPGLL,6130.057,N,02348.451,E,130203,A*22
+$PGRMZ,322,f,3*18
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6023.283,N,02430.650,E,T028*2D
+$GPRMC,130203,A,6130.061,N,02348.447,E,031.2,336.6,110805,006.0,E*77
+$GPRMB,A,1.07,L,T013,T012,6129.236,N,02346.327,E,001.3,230.8,-008.4,V*15
+$GPGGA,130203,6130.063,N,02348.446,E,1,07,4.6,97.9,M,20.7,M,,*7C
+$GPGSA,A,3,,,08,,15,18,19,,26,,28,29,4.6,4.6,1.0*3B
+$GPGSV,3,1,12,03,02,012,00,07,02,153,00,08,50,094,34,10,14,208,31*73
+$GPGSV,3,2,12,15,13,331,32,18,19,326,35,19,21,034,32,21,04,298,00*74
+$GPGSV,3,3,12,26,60,276,39,27,19,092,00,28,62,142,39,29,68,247,41*75
+$PGRME,18.6,M,16.6,M,18.6,M*1F
+$GPGLL,6130.068,N,02348.443,E,130205,A*2B
+$PGRMZ,321,f,3*1B
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6123.283,N,02430.650,E,T027*23
+$GPRMC,130206,A,6130.071,N,02348.440,E,029.4,338.2,110805,006.0,E*71
+$GPRMB,A,1.08,L,T013,T012,6129.236,N,02346.327,E,001.3,230.4,-008.9,V*1B
+$GPGGA,130206,6130.073,N,02348.439,E,1,07,5.4,97.8,M,20.7,M,,*72
+$GPGSA,A,3,,,08,,15,18,19,,26,,28,29,5.4,5.4,1.0*3B
+$GPGSV,3,1,12,03,02,012,00,07,02,153,00,08,50,094,33,10,14,208,31*74
+$GPGSV,3,2,12,15,13,331,34,18,19,326,34,19,21,034,32,21,04,298,00*73
+$GPGSV,3,3,12,26,60,276,40,27,19,092,00,28,62,142,39,29,68,247,41*7B
+$PGRME,10.3,M,16.6,M,10.3,M*1F
+$GPGLL,6130.077,N,02348.436,E,130206,A*24
+$PGRMZ,320,f,3*1A
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6017.083,N,02452.500,E,T026*24
+$GPRMC,130206,A,6130.081,N,02348.433,E,028.1,338.7,110805,006.0,E*7B
+$GPRMB,A,1.08,L,T013,T012,6129.236,N,02346.327,E,001.3,229.9,-009.0,V*16
+$GPGGA,130207,6130.082,N,02348.432,E,1,07,2.6,97.6,M,20.7,M,,*7D
+$GPGSA,A,3,,,08,,15,18,19,,26,,28,29,2.6,2.6,1.0*3B
+$GPGSV,3,1,12,03,02,012,00,07,02,153,00,08,50,094,33,10,14,208,31*74
+$GPGSV,3,2,12,15,13,331,35,18,19,326,33,19,21,034,31,21,04,298,00*76
+$GPGSV,3,3,12,26,60,276,39,27,19,092,00,28,62,142,40,29,68,247,43*79
+$PGRME,10.3,M,16.6,M,10.3,M*1F
+$GPGLL,6130.086,N,02348.429,E,130207,A*25
+$PGRMZ,320,f,3*1A
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6017.083,S,02453.500,E,T025*3B
+$GPRMC,130208,A,6130.090,N,02348.426,E,026.7,337.6,110805,006.0,E*77
+$GPRMB,A,1.09,L,T013,T012,6129.236,N,02346.327,E,001.3,229.6,-008.2,V*1B
+$GPGGA,130208,6130.091,N,02348.425,E,1,07,2.6,97.4,M,20.7,M,,*74
+$GPGSA,A,3,,,08,,15,,19,,26,,28,29,2.6,2.6,1.0*32
+$GPGSV,3,1,12,03,02,012,00,07,02,153,00,08,50,094,33,10,14,208,31*74
+$GPGSV,3,2,12,15,13,331,35,18,19,326,33,19,21,034,31,21,04,298,00*76
+$GPGSV,3,3,12,26,60,276,38,27,19,092,00,28,62,142,40,29,68,247,42*79
+$PGRME,12.2,M,19.3,M,14.5,M*14
+$GPGLL,6130.093,N,02348.424,E,130209,A*22
+$PGRMZ,321,f,3*1B
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6018.083,N,02453.500,E,T024*28
+$GPRMC,130210,A,6130.096,N,02348.422,E,023.4,338.0,110805,006.0,E*73
+$GPRMB,A,1.10,L,T013,T012,6129.236,N,02346.327,E,001.3,229.3,-007.4,V*1F
+$GPGGA,130210,6130.098,N,02348.421,E,1,06,2.6,97.8,M,20.7,M,,*7D
+$GPGSA,A,3,,,08,,15,,,,26,,28,29,2.6,2.6,1.0*3A
+$GPGSV,3,1,12,03,02,012,00,07,02,153,00,08,50,094,33,10,14,208,31*74
+$GPGSV,3,2,12,15,13,331,35,18,19,326,32,19,21,034,31,21,04,298,00*77
+$GPGSV,3,3,12,26,60,276,38,27,19,092,00,28,62,142,39,29,68,247,41*74
+$PGRME,10.3,M,16.6,M,10.3,M*1F
+$GPGLL,6130.100,N,02348.419,E,130210,A*2F
+$PGRMZ,321,f,3*1B
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6017.083,N,02452.500,W,T023*33
+$GPRMC,130210,A,6130.105,N,02348.416,E,021.5,338.5,110805,006.0,E*79
+$GPRMB,A,1.10,L,T013,T012,6129.236,N,02346.327,E,001.3,228.9,-007.1,V*11
+$GPGGA,130210,6130.106,N,02348.415,E,1,05,2.6,97.6,M,20.7,M,,*71
+$GPGSA,A,3,,,08,,15,,,,26,,28,29,2.6,2.6,1.0*3A
+$GPGSV,3,1,12,03,02,012,00,07,02,153,00,08,50,094,31,10,14,208,31*76
+$GPGSV,3,2,12,15,13,331,35,18,19,326,31,19,21,034,31,21,04,298,00*74
+$GPGSV,3,3,12,26,60,276,37,27,19,092,00,28,62,142,40,29,68,247,41*75
+$PGRME,10.3,M,16.6,M,10.3,M*1F
+$GPGLL,6130.109,N,02348.412,E,130210,A*2D
+$PGRMZ,320,f,3*1A
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6017.083,N,02555.500,E,T022*26
+$GPRMC,130210,A,6130.112,N,02348.410,E,021.5,338.5,110805,006.0,E*79
+$GPRMB,A,1.11,L,T013,T012,6129.236,N,02346.327,E,001.3,228.6,-007.1,V*1F
+$GPGGA,130210,6130.113,N,02348.409,E,1,05,2.6,97.5,M,20.7,M,,*7B
+$GPGSA,A,3,,,08,,15,,,,26,,28,29,2.6,2.6,1.0*3A
+$GPGSV,3,1,12,03,02,012,00,07,02,153,00,08,50,094,31,10,14,208,31*76
+$GPGSV,3,2,12,15,13,331,36,18,19,326,31,19,21,034,33,21,04,298,00*75
+$GPGSV,3,3,12,26,60,276,36,27,19,092,00,28,62,142,40,29,68,247,40*75
+$PGRME,10.3,M,16.6,M,10.3,M*1F
+$GPGLL,6130.116,N,02348.406,E,130213,A*25
+$PGRMZ,320,f,3*1A
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6017.083,N,02452.500,E,T021*23
+$GPRMC,130213,A,6130.119,N,02348.405,E,020.3,338.4,110805,006.0,E*73
+$GPRMB,A,1.12,L,T013,T012,6129.236,N,02346.327,E,001.3,228.3,-007.1,V*19
+$GPGGA,130213,6130.120,N,02348.404,E,1,05,2.8,98.3,M,20.7,M,,*72
+$GPGSA,A,3,,,08,,15,,19,,26,,28,29,3.3,2.8,1.7*3F
+$GPGSV,3,1,12,03,02,012,00,07,02,153,00,08,50,094,31,10,14,208,31*76
+$GPGSV,3,2,12,15,13,331,37,18,19,326,31,19,21,034,36,21,04,297,00*7E
+$GPGSV,3,3,12,26,60,276,36,27,19,092,00,28,62,142,41,29,68,247,40*74
+$PGRME,11.2,M,18.1,M,13.0,M*16
+$GPGLL,6130.123,N,02348.401,E,130213,A*24
+$PGRMZ,323,f,3*19
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6116.083,N,02452.500,E,T020*22
+$GPRMC,130215,A,6130.124,N,02348.402,E,011.8,348.0,110805,006.0,E*76
+$GPRMB,A,1.12,L,T013,T012,6129.236,N,02346.327,E,001.3,228.2,-005.8,V*13
+$GPGGA,130215,6130.124,N,02348.402,E,1,06,2.6,98.3,M,20.7,M,,*7B
+$GPGSA,A,3,,,08,,15,,19,,26,,28,29,2.6,2.6,1.0*32
+$GPGSV,3,1,12,03,02,012,00,07,02,153,00,08,50,094,31,10,14,208,31*76
+$GPGSV,3,2,12,15,13,331,36,18,19,326,32,19,21,034,36,21,04,297,00*7C
+$GPGSV,3,3,12,26,60,276,38,27,19,092,00,28,62,142,39,29,68,247,40*75
+$PGRME,10.3,M,16.6,M,10.3,M*1F
+$GPGLL,6130.126,N,02348.401,E,130216,A*24
+$PGRMZ,322,f,3*18
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6016.083,S,02452.500,E,T019*34
+$GPRMC,130216,A,6130.127,N,02348.402,E,008.2,347.1,110805,006.0,E*7A
+$GPRMB,A,1.12,L,T013,T012,6129.236,N,02346.327,E,001.3,228.0,-004.0,V*18
+$GPGGA,130216,6130.127,N,02348.401,E,1,06,2.8,98.9,M,20.7,M,,*7C
+$GPGSA,A,3,,,08,,15,18,19,,26,,28,29,3.2,2.8,1.7*37
+$GPGSV,3,1,12,03,02,012,00,07,02,153,00,08,50,094,31,10,14,208,31*76
+$GPGSV,3,2,12,15,13,331,35,18,19,326,31,19,21,034,36,21,04,297,00*7C
+$GPGSV,3,3,12,26,60,276,39,27,19,092,00,28,62,142,38,29,68,247,40*75
+$PGRME,11.2,M,18.2,M,13.0,M*15
+$GPGLL,6130.129,N,02348.401,E,130217,A*2A
+$PGRMZ,324,f,3*1E
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6016.083,N,02452.500,E,T018*28
+$GPRMC,130217,A,6130.128,N,02348.403,E,005.2,354.8,110805,006.0,E*73
+$GPRMB,A,1.13,L,T013,T012,6129.236,N,02346.327,E,001.3,227.9,-004.0,V*1F
+$GPGGA,130217,6130.128,N,02348.403,E,1,07,3.1,98.8,M,20.7,M,,*78
+$GPGSA,A,3,,,08,,15,18,19,,26,,28,29,3.5,3.1,1.0*3F
+$GPGSV,3,1,12,03,02,012,00,07,02,153,00,08,50,094,31,10,14,208,31*76
+$GPGSV,3,2,12,15,13,331,35,18,19,326,36,19,21,034,36,21,04,297,00*7B
+$GPGSV,3,3,12,26,60,276,40,27,19,092,00,28,62,142,38,29,68,247,41*7A
+$PGRME,12.3,M,16.6,M,13.9,M*14
+$GPGLL,6130.128,N,02348.404,E,130218,A*21
+$PGRMZ,326,f,3*1C
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6013.283,N,02456.650,E,T017*22
+$GPRMC,130219,A,6130.128,N,02348.404,E,002.6,357.7,110805,006.0,E*75
+$GPRMB,A,1.13,L,T013,T012,6129.236,N,02346.327,E,001.3,228.0,-001.6,V*1A
+$GPGGA,130219,6130.128,N,02348.404,E,1,07,2.8,99.3,M,20.7,M,,*73
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,2.8,2.8,1.0*3E
+$GPGSV,3,1,12,03,02,012,00,07,02,153,00,08,50,094,34,10,14,208,31*73
+$GPGSV,3,2,12,15,13,331,33,18,19,326,39,19,21,034,35,21,04,297,00*71
+$GPGSV,3,3,12,26,60,276,41,27,19,092,37,28,62,142,38,29,68,247,42*7C
+$PGRME,13.0,M,15.8,M,16.7,M*10
+$GPGLL,6130.128,N,02348.405,E,130220,A*2B
+$PGRMZ,327,f,3*1D
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6123.283,N,02430.650,E,T016*21
+$GPRMC,130221,A,6130.127,N,02348.405,E,000.0,348.0,110805,006.0,E*7D
+$GPRMB,A,1.12,L,T013,T012,6129.236,N,02346.327,E,001.3,228.1,,V*1E
+$GPGGA,130221,6130.127,N,02348.405,E,1,08,1.8,100.4,M,20.7,M,,*4C
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,1.8,1.8,1.0*3E
+$GPGSV,3,1,12,03,02,012,00,07,02,153,00,08,50,094,36,10,14,208,31*71
+$GPGSV,3,2,12,15,13,331,33,18,19,326,40,19,21,034,35,21,04,297,00*7F
+$GPGSV,3,3,12,26,60,276,41,27,19,092,38,28,62,142,39,29,68,247,42*72
+$PGRME,8.2,M,11.9,M,14.5,M*2D
+$GPGLL,6130.128,N,02348.406,E,130221,A*29
+$PGRMZ,332,f,3*19
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,0000.000,N,00000.000,W,T015*39
+$GPRMC,130221,A,6130.128,N,02348.406,E,000.0,348.0,110805,006.0,E*71
+$GPRMB,A,1.12,L,T013,T012,6129.236,N,02346.327,E,001.3,228.1,,V*1E
+$GPGGA,130221,6130.128,N,02348.406,E,1,08,1.6,101.2,M,20.7,M,,*49
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,1.6,1.6,1.0*3E
+$GPGSV,3,1,12,03,02,012,00,07,02,153,00,08,50,094,37,10,14,208,31*70
+$GPGSV,3,2,12,15,13,331,32,18,19,326,40,19,21,034,35,21,04,297,00*7E
+$GPGSV,3,3,12,26,60,276,41,27,19,092,38,28,62,142,39,29,68,247,42*72
+$PGRME,8.2,M,11.9,M,14.5,M*2D
+$GPGLL,6130.128,N,02348.406,E,130222,A*2A
+$PGRMZ,332,f,3*19
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,0009.000,N,02430.650,E,T014*25
+$GPRMC,130223,A,6130.128,N,02348.407,E,000.0,348.0,110805,006.0,E*72
+$GPRMB,A,1.13,L,T013,T012,6129.236,N,02346.327,E,001.3,228.1,,V*1F
+$GPGGA,130223,6130.128,N,02348.408,E,1,08,1.8,103.0,M,20.7,M,,*4B
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,2.0,1.8,1.3*36
+$GPGSV,3,1,12,03,02,012,00,07,02,153,00,08,50,094,38,10,14,208,31*7F
+$GPGSV,3,2,12,15,13,331,32,18,19,326,41,19,21,034,34,21,04,297,00*7E
+$GPGSV,3,3,12,26,60,276,41,27,19,092,38,28,62,142,39,29,68,247,42*72
+$PGRME,8.2,M,11.9,M,14.5,M*2D
+$GPGLL,6130.128,N,02348.408,E,130224,A*22
+$PGRMZ,338,f,3*13
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6123.285,N,02430.651,E,T013*23
+$GPRMC,130224,A,6130.128,N,02348.409,E,000.0,348.0,110805,006.0,E*7B
+$GPRMB,A,1.13,L,T013,T012,6129.236,N,02346.327,E,001.3,228.1,,V*1F
+$GPGGA,130224,6130.128,N,02348.409,E,1,08,1.8,103.8,M,20.7,M,,*45
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,2.2,1.8,1.5*32
+$GPGSV,3,1,12,03,02,012,00,07,02,153,00,08,50,094,38,10,14,208,30*7E
+$GPGSV,3,2,12,15,13,331,31,18,19,326,41,19,21,034,35,21,04,297,00*7C
+$GPGSV,3,3,12,26,60,276,42,27,19,092,38,28,62,142,39,29,68,247,42*71
+$PGRME,8.2,M,11.9,M,14.5,M*2D
+$GPGLL,6130.128,N,02348.409,E,130225,A*22
+$PGRMZ,342,f,3*1E
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6129.236,N,02346.327,E,T012*22
+$GPRMC,130226,A,6130.129,N,02348.409,E,000.0,348.0,110805,006.0,E*78
+$GPRMB,A,1.13,L,T013,T012,6129.236,N,02346.327,E,001.3,228.1,,V*1F
+$GPGGA,130226,6130.129,N,02348.409,E,1,08,2.0,104.3,M,20.7,M,,*41
+$GPGSA,A,3,,,08,,,18,19,,26,27,28,29,2.5,2.0,1.7*38
+$GPGSV,3,1,12,03,02,012,00,07,02,153,00,08,50,094,38,10,14,208,30*7E
+$GPGSV,3,2,12,15,13,331,30,18,19,326,41,19,21,034,35,21,04,297,00*7D
+$GPGSV,3,3,12,26,60,276,42,27,19,092,38,28,62,142,39,29,68,247,42*71
+$PGRME,8.2,M,11.9,M,14.5,M*2D
+$GPGLL,6130.129,N,02348.410,E,130227,A*29
+$PGRMZ,344,f,3*18
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6114.236,N,02346.327,E,T011*2F
+$GPRMC,130227,A,6130.129,N,02348.411,E,000.0,348.0,110805,006.0,E*70
+$GPRMB,A,1.13,L,T013,T012,6129.236,N,02346.327,E,001.3,228.1,,V*1F
+$GPGGA,130227,6130.129,N,02348.411,E,1,07,2.0,105.2,M,20.7,M,,*46
+$GPGSA,A,3,,,08,,,18,19,,26,27,28,29,2.8,2.0,2.0*31
+$GPGSV,3,1,12,03,02,012,00,07,02,153,00,08,50,094,39,10,14,208,30*7F
+$GPGSV,3,2,12,15,13,331,30,18,19,326,41,19,21,034,35,21,04,297,00*7D
+$GPGSV,3,3,12,26,60,276,42,27,19,092,38,28,62,142,40,29,68,247,42*7F
+$PGRME,8.2,M,11.9,M,14.5,M*2D
+$GPGLL,6130.129,N,02348.411,E,130228,A*27
+$PGRMZ,345,f,3*19
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6220.236,N,02346.327,E,T010*2A
+$GPRMC,130228,A,6130.129,N,02348.411,E,000.0,348.0,110805,006.0,E*7F
+$GPRMB,A,1.13,L,T013,T012,6129.236,N,02346.327,E,001.3,228.1,,V*1F
+$GPGGA,130228,6130.129,N,02348.411,E,1,07,1.6,105.7,M,20.7,M,,*49
+$GPGSA,A,3,,,08,,,18,19,,26,27,28,29,1.6,1.6,1.0*3A
+$GPGSV,3,1,12,03,02,012,00,07,02,153,00,08,50,094,38,10,14,208,30*7E
+$GPGSV,3,2,12,15,13,331,30,18,19,326,42,19,21,034,34,21,04,297,31*7D
+$GPGSV,3,3,12,26,60,276,42,27,19,092,38,28,62,142,39,29,68,247,42*71
+$PGRME,14.5,M,18.8,M,23.8,M*16
+$GPGLL,6130.129,N,02348.412,E,130229,A*25
+$PGRMZ,347,f,3*1B
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6120.236,N,02346.327,E,T009*21
+$GPRMC,130230,A,6130.129,N,02348.412,E,000.0,348.0,110805,006.0,E*75
+$GPRMB,A,1.13,L,T013,T012,6129.236,N,02346.327,E,001.3,228.1,,V*1F
+$GPGGA,130230,6130.129,N,02348.412,E,1,07,1.6,106.0,M,20.7,M,,*47
+$GPGSA,A,3,,,08,,,18,19,,26,27,28,29,1.6,1.6,1.0*3A
+$GPGSV,3,1,12,03,02,012,00,07,02,153,00,08,50,094,38,10,14,208,30*7E
+$GPGSV,3,2,12,15,13,331,30,18,19,326,42,19,21,034,34,21,04,297,31*7D
+$GPGSV,3,3,12,26,60,276,41,27,19,092,38,28,62,142,40,29,68,247,42*7C
+$PGRME,14.0,M,15.8,M,21.1,M*15
+$GPGLL,6130.129,N,02348.412,E,130230,A*2D
+$PGRMZ,348,f,3*14
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6129.234,N,02346.317,E,T008*28
+$GPRMC,130231,A,6130.129,N,02348.413,E,000.0,348.0,110805,006.0,E*75
+$GPRMB,A,1.13,L,T013,T012,6129.236,N,02346.327,E,001.3,228.1,,V*1F
+$GPGGA,130231,6130.129,N,02348.413,E,1,07,1.8,106.4,M,20.7,M,,*4D
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,2.0,1.8,1.3*36
+$GPGSV,3,1,12,03,02,012,00,07,02,153,00,08,50,094,38,10,14,208,30*7E
+$GPGSV,3,2,12,15,13,331,32,18,19,326,42,19,21,034,35,21,04,297,31*7E
+$GPGSV,3,3,12,26,60,276,42,27,19,092,39,28,62,142,41,29,68,247,43*7E
+$PGRME,8.0,M,10.8,M,13.4,M*29
+$GPGLL,6130.129,N,02348.413,E,130232,A*2E
+$PGRMZ,351,f,3*1C
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6157.564,N,02406.158,E,T007*26
+$GPRMC,130232,A,6130.129,N,02348.414,E,000.0,348.0,110805,006.0,E*71
+$GPRMB,A,1.13,L,T013,T012,6129.236,N,02346.327,E,001.3,228.1,,V*1F
+$GPGGA,130233,6130.129,N,02348.414,E,1,08,1.8,106.8,M,20.7,M,,*4B
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,2.2,1.8,1.5*32
+$GPGSV,3,1,12,03,02,012,00,07,02,153,00,08,50,094,39,10,14,208,31*7E
+$GPGSV,3,2,12,15,13,331,35,18,19,326,43,19,21,034,36,21,04,297,31*7B
+$GPGSV,3,3,12,26,60,276,44,27,19,092,39,28,62,142,42,29,68,247,44*7C
+$PGRME,8.0,M,10.8,M,13.4,M*29
+$GPGLL,6130.129,N,02348.414,E,130233,A*28
+$PGRMZ,352,f,3*1F
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6145.919,N,02345.544,E,T006*2B
+$GPRMC,130234,A,6130.129,N,02348.414,E,000.0,348.0,110805,006.0,E*77
+$GPRMB,A,1.13,L,T013,T012,6129.236,N,02346.327,E,001.3,228.1,,V*1F
+$GPGGA,130234,6130.129,N,02348.414,E,1,08,1.9,107.4,M,20.7,M,,*40
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,2.3,1.9,1.6*31
+$GPGSV,3,1,12,03,02,012,00,07,02,153,00,08,50,094,40,10,14,208,31*70
+$GPGSV,3,2,12,15,13,331,35,18,19,326,43,19,21,034,37,21,04,297,32*79
+$GPGSV,3,3,12,26,60,276,44,27,19,092,39,28,62,142,43,29,68,247,44*7D
+$PGRME,8.0,M,10.8,M,13.4,M*29
+$GPGLL,6130.130,N,02348.415,E,130234,A*26
+$PGRMZ,354,f,3*19
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6130.198,N,02342.702,E,T005*2C
+$GPRMC,130235,A,6130.130,N,02348.415,E,000.0,348.0,110805,006.0,E*7F
+$GPRMB,A,1.13,L,T013,T012,6129.236,N,02346.327,E,001.3,228.1,,V*1F
+$GPGGA,130235,6130.130,N,02348.415,E,1,08,1.9,108.1,M,20.7,M,,*42
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,2.3,1.9,1.6*31
+$GPGSV,3,1,12,03,02,012,00,07,02,153,00,08,50,094,41,10,14,208,31*71
+$GPGSV,3,2,12,15,13,331,35,18,19,326,43,19,21,034,37,21,04,297,33*78
+$GPGSV,3,3,12,26,60,275,44,27,19,092,39,28,62,142,43,29,68,247,45*7F
+$PGRME,8.0,M,10.8,M,13.4,M*29
+$GPGLL,6130.130,N,02348.416,E,130236,A*27
+$PGRMZ,356,f,3*1B
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6216.183,N,02619.685,E,T004*25
+$GPRMC,130236,A,6130.130,N,02348.416,E,000.0,348.0,110805,006.0,E*7F
+$GPRMB,A,1.13,L,T013,T012,6129.236,N,02346.327,E,001.3,228.2,,V*1C
+$GPGGA,130236,6130.130,N,02348.416,E,1,08,1.9,108.4,M,20.7,M,,*47
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,2.3,1.9,1.6*31
+$GPGSV,3,1,12,03,02,012,00,07,02,153,00,08,50,094,41,10,14,208,32*72
+$GPGSV,3,2,12,15,13,331,35,18,19,326,43,19,21,034,37,21,04,297,34*7F
+$GPGSV,3,3,12,26,60,275,44,27,19,092,39,28,62,142,43,29,68,247,45*7F
+$PGRME,8.0,M,10.8,M,13.4,M*29
+$GPGLL,6130.130,N,02348.416,E,130237,A*26
+$PGRMZ,356,f,3*1B
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6215.064,N,02603.837,E,T003*25
+$GPRMC,130237,A,6130.130,N,02348.416,E,000.0,348.0,110805,006.0,E*7E
+$GPRMB,A,1.13,L,T013,T012,6129.236,N,02346.327,E,001.3,228.2,,V*1C
+$GPGGA,130238,6130.130,N,02348.416,E,1,08,1.9,108.5,M,20.7,M,,*48
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,2.3,1.9,1.6*31
+$GPGSV,3,1,12,03,02,012,00,07,02,153,00,08,50,094,42,10,14,208,32*71
+$GPGSV,3,2,12,15,13,331,36,18,19,326,44,19,21,034,37,21,04,297,35*7A
+$GPGSV,3,3,12,26,60,275,44,27,19,092,40,28,62,142,43,29,68,247,45*71
+$PGRME,8.0,M,10.8,M,13.4,M*29
+$GPGLL,6130.130,N,02348.416,E,130238,A*29
+$PGRMZ,356,f,3*1B
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6151.098,N,02510.924,E,T002*26
+$GPRMC,130239,A,6130.130,N,02348.416,E,000.0,348.0,110805,006.0,E*70
+$GPRMB,A,1.13,L,T013,T012,6129.236,N,02346.327,E,001.3,228.2,,V*1C
+$GPGGA,130239,6130.130,N,02348.417,E,1,08,1.9,108.6,M,20.7,M,,*4B
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,2.3,1.9,1.6*31
+$GPGSV,3,1,12,03,02,012,00,07,02,153,00,08,50,094,41,10,14,208,31*71
+$GPGSV,3,2,12,15,13,331,36,18,19,326,44,19,21,034,37,21,04,297,35*7A
+$GPGSV,3,3,12,26,60,275,44,27,18,092,40,28,62,142,43,29,68,247,46*73
+$PGRME,8.0,M,10.8,M,13.4,M*29
+$GPGLL,6130.130,N,02348.417,E,130240,A*27
+$PGRMZ,357,f,3*1A
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6129.271,N,02346.376,E,T001*27
+$GPRMC,130240,A,6130.130,N,02348.417,E,000.0,348.0,110805,006.0,E*7F
+$GPRMB,A,1.13,L,T013,T012,6129.236,N,02346.327,E,001.3,228.2,,V*1C
+$GPGGA,130240,6130.130,N,02348.417,E,1,08,1.9,108.7,M,20.7,M,,*44
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,2.3,1.9,1.6*31
+$GPGSV,3,1,12,03,02,012,00,07,02,153,00,08,50,094,42,10,14,208,31*72
+$GPGSV,3,2,12,15,13,331,36,18,19,326,44,19,21,034,37,21,04,297,36*79
+$GPGSV,3,3,12,26,60,275,44,27,18,092,40,28,62,142,43,29,68,247,46*73
+$PGRME,8.0,M,10.8,M,13.4,M*29
+$GPGLL,6130.130,N,02348.417,E,130241,A*26
+$PGRMZ,357,f,3*1A
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPRTE,4,1,c,0,T030,T029,T028,T027,T026,T025,T024,T023,T022*49
+$GPRTE,4,2,c,0,T021,T020,T019,T018,T017,T016,T015,T014,T013*4B
+$GPRTE,4,3,c,0,T012,T011,T010,T009,T008,T007,T006,T005,T004*4B
+$GPRTE,4,4,c,0,T003,T002,T001*4F
+$GPWPL,6016.083,N,02452.500,E,T030*22
+$GPRMC,130242,A,6130.130,N,02348.417,E,000.0,348.0,110805,006.0,E*7D
+$GPRMB,A,1.13,L,T013,T012,6129.236,N,02346.327,E,001.3,228.2,,V*1C
+$GPGGA,130242,6130.130,N,02348.417,E,1,08,1.9,109.0,M,20.7,M,,*40
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,2.3,1.9,1.6*31
+$GPGSV,3,1,12,03,02,012,00,07,02,153,00,08,50,094,42,10,14,208,32*71
+$GPGSV,3,2,12,15,13,331,37,18,19,326,43,19,21,034,38,21,04,297,36*70
+$GPGSV,3,3,12,26,60,275,44,27,18,092,40,28,62,142,43,29,68,247,46*73
+$PGRME,7.9,M,10.8,M,13.4,M*2F
+$GPGLL,6130.130,N,02348.417,E,130243,A*24
+$PGRMZ,358,f,3*15
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6123.283,N,02430.650,E,T029*2D
+$GPRMC,130243,A,6130.130,N,02348.418,E,000.0,348.0,110805,006.0,E*73
+$GPRMB,A,1.13,L,T013,T012,6129.236,N,02346.327,E,001.3,228.2,,V*1C
+$GPGGA,130243,6130.130,N,02348.418,E,1,08,1.9,109.1,M,20.7,M,,*4F
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,2.3,1.9,1.6*31
+$GPGSV,3,1,12,03,02,012,00,07,02,153,00,08,50,094,42,10,14,208,32*71
+$GPGSV,3,2,12,15,13,331,37,18,19,326,43,19,21,034,38,21,04,297,36*70
+$GPGSV,3,3,12,26,60,275,44,27,18,092,40,28,63,140,43,29,68,247,46*70
+$PGRME,7.9,M,10.8,M,13.4,M*2F
+$GPGLL,6130.130,N,02348.418,E,130244,A*2C
+$PGRMZ,358,f,3*15
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6023.283,N,02430.650,E,T028*2D
+$GPRMC,130244,A,6130.130,N,02348.418,E,000.0,348.0,110805,006.0,E*74
+$GPRMB,A,1.13,L,T013,T012,6129.236,N,02346.327,E,001.3,228.2,,V*1C
+$GPGGA,130245,6130.130,N,02348.418,E,1,08,1.9,109.2,M,20.7,M,,*4A
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,2.4,1.9,1.8*38
+$GPGSV,3,1,12,03,02,012,00,07,02,153,00,08,50,094,41,10,14,208,31*71
+$GPGSV,3,2,12,15,13,331,36,18,19,326,41,19,21,034,38,21,04,297,35*70
+$GPGSV,3,3,12,26,60,275,44,27,18,092,39,28,63,140,43,29,68,247,45*7D
+$PGRME,8.0,M,10.9,M,13.5,M*29
+$GPGLL,6130.131,N,02348.418,E,130245,A*2C
+$PGRMZ,358,f,3*15
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6123.283,N,02430.650,E,T027*23
+$GPRMC,130246,A,6130.131,N,02348.418,E,004.4,007.9,110805,006.0,E*76
+$GPRMB,A,1.13,L,T013,T012,6129.236,N,02346.327,E,001.3,228.1,-003.3,V*1C
+$GPGGA,130246,6130.132,N,02348.419,E,1,08,2.3,109.2,M,20.7,M,,*43
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,2.9,2.3,1.0*34
+$GPGSV,3,1,12,03,02,012,00,07,02,153,00,08,50,094,40,10,14,208,31*70
+$GPGSV,3,2,12,15,13,331,35,18,19,326,41,19,21,034,38,21,04,297,37*71
+$GPGSV,3,3,12,26,60,275,43,27,18,092,39,28,63,140,43,29,68,247,44*7B
+$PGRME,8.5,M,12.2,M,14.9,M*2E
+$GPGLL,6130.133,N,02348.420,E,130246,A*26
+$PGRMZ,359,f,3*14
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6017.083,N,02452.500,E,T026*24
+$GPRMC,130247,A,6130.134,N,02348.421,E,006.0,013.7,110805,006.0,E*75
+$GPRMB,A,1.13,L,T013,T012,6129.236,N,02346.327,E,001.3,228.1,-005.0,V*19
+$GPGGA,130247,6130.135,N,02348.422,E,1,08,2.4,109.7,M,20.7,M,,*4F
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,3.1,2.4,1.3*39
+$GPGSV,3,1,12,03,02,012,00,07,02,153,00,08,50,094,40,10,14,208,30*71
+$GPGSV,3,2,12,15,13,331,34,18,19,326,42,19,21,034,37,21,04,297,38*73
+$GPGSV,3,3,12,26,60,275,44,27,18,092,39,28,63,140,43,29,69,244,43*79
+$PGRME,9.0,M,12.5,M,15.5,M*20
+$GPGLL,6130.136,N,02348.424,E,130248,A*29
+$PGRMZ,360,f,3*1E
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6017.083,S,02453.500,E,T025*3B
+$GPRMC,130248,A,6130.136,N,02348.430,E,009.7,055.5,110805,006.0,E*70
+$GPRMB,A,1.14,L,T013,T012,6129.236,N,02346.327,E,001.4,228.1,-009.6,V*13
+$GPGGA,130249,6130.136,N,02348.431,E,1,08,1.6,109.6,M,20.7,M,,*40
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,1.6,1.6,1.0*3E
+$GPGSV,3,1,12,03,02,012,00,07,02,153,00,08,50,094,41,10,14,208,30*70
+$GPGSV,3,2,12,15,13,331,38,18,19,326,42,19,21,034,36,21,04,297,36*70
+$GPGSV,3,3,12,26,60,275,42,27,18,092,37,28,63,140,42,29,69,244,43*70
+$PGRME,7.9,M,10.8,M,13.4,M*2F
+$GPGLL,6130.137,N,02348.433,E,130249,A*2F
+$PGRMZ,360,f,3*1E
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6018.083,N,02453.500,E,T024*28
+$GPRMC,130249,A,6130.138,N,02348.441,E,013.1,068.7,110805,006.0,E*78
+$GPRMB,A,1.14,L,T013,T012,6129.236,N,02346.327,E,001.4,228.3,-012.3,V*1E
+$GPGGA,130250,6130.138,N,02348.443,E,1,08,1.6,109.6,M,20.7,M,,*43
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,1.6,1.6,1.0*3E
+$GPGSV,3,1,12,03,02,012,00,07,02,153,00,08,50,094,41,10,14,208,31*71
+$GPGSV,3,2,12,15,13,331,37,18,19,326,41,19,21,034,39,21,04,297,36*73
+$GPGSV,3,3,12,26,60,275,41,27,18,092,38,28,63,140,41,29,69,244,41*7D
+$PGRME,8.0,M,10.9,M,13.5,M*29
+$GPGLL,6130.138,N,02348.452,E,130250,A*2F
+$PGRMZ,359,f,3*14
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6017.083,N,02452.500,W,T023*33
+$GPRMC,130251,A,6130.138,N,02348.456,E,016.1,078.2,110805,006.0,E*76
+$GPRMB,A,1.14,L,T013,T012,6129.236,N,02346.327,E,001.4,228.5,-014.0,V*1D
+$GPGGA,130251,6130.138,N,02348.458,E,1,08,2.0,109.5,M,20.7,M,,*4E
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,2.2,2.0,1.2*3E
+$GPGSV,3,1,12,03,02,012,00,07,02,153,00,08,50,094,42,10,14,208,31*72
+$GPGSV,3,2,12,15,13,331,36,18,19,326,40,19,21,034,40,21,04,297,36*7D
+$GPGSV,3,3,12,26,60,275,40,27,18,092,38,28,63,140,41,29,69,244,40*7D
+$PGRME,8.0,M,11.0,M,13.6,M*22
+$GPGLL,6130.139,N,02348.466,E,130251,A*28
+$PGRMZ,359,f,3*14
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6017.083,N,02555.500,E,T022*26
+$GPRMC,130252,A,6130.139,N,02348.472,E,019.7,082.7,110805,006.0,E*7B
+$GPRMB,A,1.14,L,T013,T012,6129.236,N,02346.327,E,001.4,228.6,-015.9,V*16
+$GPGGA,130252,6130.139,N,02348.475,E,1,08,2.0,109.5,M,20.7,M,,*43
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,2.4,2.0,1.5*3F
+$GPGSV,3,1,12,03,02,012,00,07,02,153,00,08,50,094,42,10,14,208,31*72
+$GPGSV,3,2,12,15,13,331,35,18,19,326,39,19,21,034,40,21,04,297,35*73
+$GPGSV,3,3,12,26,60,275,37,27,18,092,36,28,63,140,40,29,69,244,38*7D
+$PGRME,8.1,M,11.4,M,14.0,M*26
+$GPGLL,6130.139,N,02348.481,E,130252,A*22
+$PGRMZ,359,f,3*14
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6017.083,N,02452.500,E,T021*23
+$GPRMC,130253,A,6130.140,N,02348.487,E,019.7,082.7,110805,006.0,E*7E
+$GPRMB,A,1.15,L,T013,T012,6129.236,N,02346.327,E,001.4,228.8,-016.4,V*17
+$GPGGA,130253,6130.140,N,02348.489,E,1,08,2.0,109.5,M,20.7,M,,*4F
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,2.7,2.3,1.0*3A
+$GPGSV,3,1,12,03,02,012,00,07,02,153,00,08,50,094,42,10,14,208,31*72
+$GPGSV,3,2,12,15,13,331,35,18,19,326,38,19,21,034,41,21,04,297,34*72
+$GPGSV,3,3,12,26,60,275,37,27,18,092,36,28,63,140,40,29,69,244,38*7D
+$PGRME,8.1,M,11.4,M,14.0,M*26
+$GPGLL,6130.140,N,02348.500,E,130253,A*25
+$PGRMZ,360,f,3*1E
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6116.083,N,02452.500,E,T020*22
+$GPRMC,130254,A,6130.141,N,02348.511,E,024.7,082.6,110805,006.0,E*79
+$GPRMB,A,1.15,L,T013,T012,6129.236,N,02346.327,E,001.4,229.1,-020.6,V*18
+$GPGGA,130254,6130.141,N,02348.514,E,1,08,2.0,109.7,M,20.7,M,,*4E
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,2.0,2.0,1.0*3E
+$GPGSV,3,1,12,03,02,012,00,07,02,153,00,08,50,094,42,10,14,208,31*72
+$GPGSV,3,2,12,15,13,331,34,18,19,326,37,19,21,034,42,21,04,297,34*7F
+$GPGSV,3,3,12,26,60,275,36,27,18,092,38,28,63,140,39,29,69,244,39*7D
+$PGRME,8.1,M,11.4,M,14.0,M*26
+$GPGLL,6130.142,N,02348.522,E,130255,A*21
+$PGRMZ,360,f,3*1E
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6016.083,S,02452.500,E,T019*34
+$GPRMC,130255,A,6130.143,N,02348.532,E,026.0,081.4,110805,006.0,E*7F
+$GPRMB,A,1.15,L,T013,T012,6129.236,N,02346.327,E,001.4,229.3,-020.6,V*1A
+$GPGGA,130255,6130.143,N,02348.535,E,1,08,2.0,109.5,M,20.7,M,,*4C
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,2.2,2.0,1.3*3F
+$GPGSV,3,1,12,03,02,012,00,07,02,153,00,08,50,094,43,10,14,208,31*73
+$GPGSV,3,2,12,15,13,331,34,18,19,326,36,19,21,034,44,21,04,297,34*78
+$GPGSV,3,3,12,26,60,275,36,27,18,092,39,28,63,140,39,29,69,244,39*7C
+$PGRME,8.1,M,11.4,M,14.0,M*26
+$GPGLL,6130.144,N,02348.544,E,130257,A*25
+$PGRMZ,360,f,3*1E
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6016.083,N,02452.500,E,T018*28
+$GPRMC,130257,A,6130.145,N,02348.553,E,028.2,079.2,110805,006.0,E*71
+$GPRMB,A,1.16,L,T013,T012,6129.236,N,02346.327,E,001.4,229.5,-024.5,V*18
+$GPGGA,130258,6130.145,N,02348.556,E,1,08,2.0,109.8,M,20.7,M,,*4F
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,2.2,2.1,1.0*3D
+$GPGSV,3,1,12,03,02,012,00,07,02,153,00,08,50,094,44,10,14,208,31*74
+$GPGSV,3,2,12,15,13,331,33,18,19,326,38,19,21,034,44,21,04,297,33*76
+$GPGSV,3,3,12,26,60,275,36,27,18,092,40,28,63,140,37,29,69,244,42*70
+$PGRME,8.2,M,11.5,M,14.1,M*25
+$GPGLL,6130.147,N,02348.567,E,130258,A*28
+$PGRMZ,361,f,3*1F
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6013.283,N,02456.650,E,T017*22
+$GPRMC,130259,A,6130.148,N,02348.575,E,028.8,077.2,110805,006.0,E*72
+$GPRMB,A,1.17,L,T013,T012,6129.236,N,02346.327,E,001.4,229.7,-025.5,V*1A
+$GPGGA,130259,6130.148,N,02348.578,E,1,08,2.1,110.0,M,20.7,M,,*4E
+$GPGSA,A,3,,,08,,,18,19,,26,27,28,29,2.2,2.1,1.0*39
+$GPGSV,3,1,12,03,02,012,00,07,02,153,00,08,50,094,45,10,14,208,32*76
+$GPGSV,3,2,12,15,13,331,33,18,19,326,37,19,21,034,44,21,04,297,33*79
+$GPGSV,3,3,12,26,60,275,36,27,18,092,39,28,63,140,37,29,69,244,43*7F
+$PGRME,8.3,M,11.9,M,14.5,M*2C
+$GPGLL,6130.149,N,02348.588,E,130259,A*26
+$PGRMZ,361,f,3*1F
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6123.283,N,02430.650,E,T016*21
+$GPRMC,130300,A,6130.150,N,02348.596,E,028.7,076.0,110805,006.0,E*77
+$GPRMB,A,1.17,L,T013,T012,6129.236,N,02346.327,E,001.4,229.9,-025.8,V*19
+$GPGGA,130300,6130.151,N,02348.599,E,1,07,1.9,109.9,M,20.7,M,,*41
+$GPGSA,A,3,,,08,,,18,19,,26,27,28,29,1.9,1.9,1.0*3A
+$GPGSV,3,1,12,03,02,012,00,07,02,153,00,08,50,094,45,10,14,208,32*76
+$GPGSV,3,2,12,15,13,331,33,18,19,326,37,19,21,034,43,21,04,297,32*7F
+$GPGSV,3,3,12,26,60,275,36,27,18,092,38,28,63,140,37,29,69,244,43*7E
+$PGRME,8.4,M,12.2,M,14.8,M*2E
+$GPGLL,6130.152,N,02348.609,E,130301,A*2A
+$PGRMZ,361,f,3*1F
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,0000.000,N,00000.000,W,T015*39
+$GPRMC,130301,A,6130.153,N,02348.616,E,028.1,075.0,110805,006.0,E*7B
+$GPRMB,A,1.18,L,T013,T012,6129.236,N,02346.327,E,001.4,230.0,-025.5,V*1A
+$GPGGA,130302,6130.154,N,02348.619,E,1,07,1.9,110.0,M,20.7,M,,*4C
+$GPGSA,A,3,,,08,,,18,19,,26,27,28,29,1.9,1.9,1.0*3A
+$GPGSV,3,1,12,03,02,012,00,07,02,153,00,08,50,094,45,10,14,208,32*76
+$GPGSV,3,2,12,15,13,331,31,18,19,326,38,19,21,034,43,21,04,297,00*73
+$GPGSV,3,3,12,26,60,275,36,27,18,092,39,28,63,140,37,29,69,244,44*78
+$PGRME,8.2,M,11.8,M,14.4,M*2D
+$GPGLL,6130.155,N,02348.629,E,130302,A*2C
+$PGRMZ,360,f,3*1E
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,0009.000,N,02430.650,E,T014*25
+$GPRMC,130303,A,6130.156,N,02348.636,E,027.8,074.8,110805,006.0,E*71
+$GPRMB,A,1.18,L,T013,T012,6129.236,N,02346.327,E,001.4,230.2,-025.2,V*1F
+$GPGGA,130303,6130.157,N,02348.640,E,1,07,2.0,109.8,M,20.7,M,,*48
+$GPGSA,A,3,,,08,,,18,19,,26,27,28,29,2.1,2.0,1.0*3B
+$GPGSV,3,1,12,03,02,012,00,07,02,153,00,08,50,094,45,10,14,208,31*75
+$GPGSV,3,2,12,15,13,331,31,18,19,326,38,19,21,034,43,21,04,297,00*73
+$GPGSV,3,3,12,26,60,275,36,27,18,092,39,28,63,140,37,29,69,244,44*78
+$PGRME,8.3,M,12.1,M,14.7,M*25
+$GPGLL,6130.158,N,02348.648,E,130303,A*27
+$PGRMZ,360,f,3*1E
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6123.285,N,02430.651,E,T013*23
+$GPRMC,130304,A,6130.159,N,02348.656,E,027.4,074.6,110805,006.0,E*7D
+$GPRMB,A,1.19,L,T013,T012,6129.236,N,02346.327,E,001.5,230.3,-025.0,V*1C
+$GPGGA,130304,6130.159,N,02348.658,E,1,07,2.0,110.2,M,20.7,M,,*4A
+$GPGSA,A,3,,,08,,,18,19,,26,27,28,29,2.1,2.0,1.0*3B
+$GPGSV,3,1,12,03,02,012,00,07,02,153,00,08,50,094,45,10,14,208,31*75
+$GPGSV,3,2,12,15,13,331,30,18,19,326,38,19,21,034,43,21,04,297,00*72
+$GPGSV,3,3,12,26,60,275,35,27,18,092,38,28,63,140,36,29,69,244,44*7B
+$PGRME,11.3,M,17.3,M,20.7,M*1D
+$GPGLL,6130.160,N,02348.667,E,130304,A*26
+$PGRMZ,361,f,3*1F
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6129.236,N,02346.327,E,T012*22
+$GPRMC,130305,A,6130.161,N,02348.675,E,027.1,074.6,110805,006.0,E*73
+$GPRMB,A,1.19,L,T013,T012,6129.236,N,02346.327,E,001.5,230.5,-024.7,V*1C
+$GPGGA,130305,6130.162,N,02348.678,E,1,07,2.0,110.4,M,20.7,M,,*47
+$GPGSA,A,3,,,08,,,18,19,,26,27,28,29,2.3,2.0,1.2*3B
+$GPGSV,3,1,12,03,02,012,00,07,02,153,00,08,50,094,45,10,14,208,31*75
+$GPGSV,3,2,12,15,13,331,30,18,19,326,35,19,21,034,44,21,04,297,00*78
+$GPGSV,3,3,12,26,60,275,36,27,18,092,39,28,63,140,37,29,69,244,44*78
+$PGRME,8.2,M,11.8,M,14.4,M*2D
+$GPGLL,6130.163,N,02348.687,E,130306,A*29
+$PGRMZ,361,f,3*1F
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6114.236,N,02346.327,E,T011*2F
+$GPRMC,130307,A,6130.163,N,02348.688,E,021.0,074.2,110805,006.0,E*72
+$GPRMB,A,1.20,L,T013,T012,6129.236,N,02346.327,E,001.5,230.6,-019.2,V*1E
+$GPGGA,130307,6130.163,N,02348.690,E,1,07,2.3,110.2,M,20.7,M,,*47
+$GPGSA,A,3,,,08,,,18,19,,26,27,28,29,2.8,2.3,1.3*32
+$GPGSV,3,1,12,03,02,012,00,07,02,153,00,08,50,094,45,10,14,208,31*75
+$GPGSV,3,2,12,15,13,331,30,18,19,326,35,19,21,034,44,21,04,297,00*78
+$GPGSV,3,3,12,26,60,275,37,27,18,092,39,28,63,140,38,29,69,244,44*76
+$PGRME,8.3,M,12.1,M,14.7,M*25
+$GPGLL,6130.163,N,02348.690,E,130307,A*2E
+$PGRMZ,359,f,3*14
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6220.236,N,02346.327,E,T010*2A
+$GPRMC,130308,A,6130.164,N,02348.695,E,014.9,075.0,110805,006.0,E*7A
+$GPRMB,A,1.20,L,T013,T012,6129.236,N,02346.327,E,001.5,230.7,-013.5,V*12
+$GPGGA,130308,6130.164,N,02348.696,E,1,07,2.3,109.5,M,20.7,M,,*46
+$GPGSA,A,3,,,08,,,18,19,,26,27,28,29,3.0,2.3,1.6*3E
+$GPGSV,3,1,12,03,02,012,00,07,02,153,00,08,50,094,46,10,14,208,31*76
+$GPGSV,3,2,12,15,13,331,30,18,19,326,37,19,21,034,44,21,04,297,00*7A
+$GPGSV,3,3,12,26,60,275,37,27,18,092,40,28,63,140,38,29,69,244,44*78
+$PGRME,8.2,M,11.8,M,14.4,M*2D
+$GPGLL,6130.164,N,02348.695,E,130308,A*23
+$PGRMZ,359,f,3*14
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6120.236,N,02346.327,E,T009*21
+$GPRMC,130309,A,6130.164,N,02348.694,E,005.3,074.5,110805,006.0,E*74
+$GPRMB,A,1.20,L,T013,T012,6129.236,N,02346.327,E,001.5,230.6,-004.9,V*19
+$GPGGA,130309,6130.164,N,02348.694,E,1,07,2.2,109.4,M,20.7,M,,*45
+$GPGSA,A,3,,,08,,,18,19,,26,27,28,29,3.1,2.2,1.7*3F
+$GPGSV,3,1,12,03,02,012,00,07,02,153,00,08,50,094,46,10,14,208,31*76
+$GPGSV,3,2,12,15,13,331,30,18,19,326,38,19,21,034,44,21,04,297,00*75
+$GPGSV,3,3,12,26,60,275,37,27,18,092,39,28,63,140,38,29,69,244,44*76
+$PGRME,8.2,M,11.8,M,14.4,M*2D
+$GPGLL,6130.164,N,02348.696,E,130310,A*29
+$PGRMZ,359,f,3*14
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6129.234,N,02346.317,E,T008*28
+$GPRMC,130310,A,6130.164,N,02348.694,E,002.1,075.9,110805,006.0,E*74
+$GPRMB,A,1.20,L,T013,T012,6129.236,N,02346.327,E,001.5,230.6,-001.9,V*1C
+$GPGGA,130310,6130.164,N,02348.694,E,1,07,1.5,109.3,M,20.7,M,,*4E
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,1.5,1.5,1.0*3E
+$GPGSV,3,1,12,03,02,011,00,07,02,153,00,08,50,094,46,10,14,208,31*75
+$GPGSV,3,2,12,15,13,331,33,18,19,326,39,19,21,034,43,21,04,297,00*70
+$GPGSV,3,3,12,26,60,275,36,27,18,092,39,28,63,140,37,29,69,244,44*78
+$PGRME,8.0,M,10.9,M,13.5,M*29
+$GPGLL,6130.164,N,02348.694,E,130311,A*2A
+$PGRMZ,358,f,3*15
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6157.564,N,02406.158,E,T007*26
+$GPRMC,130312,A,6130.164,N,02348.694,E,001.3,075.0,110805,006.0,E*7E
+$GPRMB,A,1.20,L,T013,T012,6129.236,N,02346.327,E,001.5,230.7,-001.2,V*16
+$GPGGA,130312,6130.164,N,02348.695,E,1,08,1.5,109.2,M,20.7,M,,*43
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,1.5,1.5,1.0*3E
+$GPGSV,3,1,12,03,02,011,00,07,02,153,00,08,50,094,46,10,14,208,31*75
+$GPGSV,3,2,12,15,13,331,34,18,19,326,39,19,21,034,44,21,04,297,00*70
+$GPGSV,3,3,12,26,60,275,35,27,18,092,40,28,63,140,37,29,69,244,44*75
+$PGRME,8.0,M,10.9,M,13.5,M*29
+$GPGLL,6130.164,N,02348.694,E,130312,A*29
+$PGRMZ,359,f,3*14
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6145.919,N,02345.544,E,T006*2B
+$GPRMC,130313,A,6130.164,N,02348.694,E,000.0,075.0,110805,006.0,E*7D
+$GPRMB,A,1.20,L,T013,T012,6129.236,N,02346.327,E,001.5,230.6,,V*17
+$GPGGA,130313,6130.164,N,02348.694,E,1,08,1.6,109.2,M,20.7,M,,*40
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,1.7,1.6,1.2*3D
+$GPGSV,3,1,12,03,02,011,00,07,02,153,00,08,50,094,46,10,14,208,31*75
+$GPGSV,3,2,12,15,13,331,34,18,19,326,40,19,21,034,44,21,04,297,00*7E
+$GPGSV,3,3,12,26,60,275,35,27,18,092,41,28,63,140,38,29,69,244,44*7B
+$PGRME,8.0,M,10.9,M,13.5,M*29
+$GPGLL,6130.164,N,02348.694,E,130314,A*2F
+$PGRMZ,358,f,3*15
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6130.198,N,02342.702,E,T005*2C
+$GPRMC,130314,A,6130.164,N,02348.694,E,000.0,075.0,110805,006.0,E*7A
+$GPRMB,A,1.20,L,T013,T012,6129.236,N,02346.327,E,001.5,230.7,,V*16
+$GPGGA,130315,6130.164,N,02348.694,E,1,08,1.6,109.2,M,20.7,M,,*46
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,1.7,1.6,1.2*3D
+$GPGSV,3,1,12,03,02,011,00,07,02,153,00,08,50,094,45,10,14,208,31*76
+$GPGSV,3,2,12,15,13,331,35,18,19,326,40,19,21,034,44,21,04,297,00*7F
+$GPGSV,3,3,12,26,60,275,34,27,18,092,41,28,63,140,39,29,69,244,43*7C
+$PGRME,8.1,M,11.2,M,13.8,M*2F
+$GPGLL,6130.163,N,02348.694,E,130315,A*29
+$PGRMZ,357,f,3*1A
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6216.183,N,02619.685,E,T004*25
+$GPRMC,130316,A,6130.163,N,02348.694,E,000.0,075.0,110805,006.0,E*7F
+$GPRMB,A,1.20,L,T013,T012,6129.236,N,02346.327,E,001.5,230.7,,V*16
+$GPGGA,130316,6130.163,N,02348.694,E,1,08,1.6,108.9,M,20.7,M,,*48
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,2.0,1.6,1.4*3F
+$GPGSV,3,1,12,03,02,011,00,07,02,153,00,08,50,094,45,10,14,208,30*77
+$GPGSV,3,2,12,15,13,331,34,18,19,326,40,19,21,034,43,21,04,297,00*79
+$GPGSV,3,3,12,26,60,275,33,27,18,092,41,28,63,140,40,29,69,244,43*75
+$PGRME,8.7,M,11.7,M,14.5,M*26
+$GPGLL,6130.164,N,02348.695,E,130316,A*2C
+$PGRMZ,358,f,3*15
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6215.064,N,02603.837,E,T003*25
+$GPRMC,130317,A,6130.164,N,02348.695,E,000.0,075.0,110805,006.0,E*78
+$GPRMB,A,1.20,L,T013,T012,6129.236,N,02346.327,E,001.5,230.6,,V*17
+$GPGGA,130317,6130.164,N,02348.695,E,1,08,1.9,109.1,M,20.7,M,,*49
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,2.1,1.9,1.0*35
+$GPGSV,3,1,12,03,02,011,00,07,02,153,00,08,50,094,45,10,14,208,30*77
+$GPGSV,3,2,12,15,13,331,35,18,19,326,41,19,21,034,43,21,04,297,00*79
+$GPGSV,3,3,12,26,60,275,32,27,18,092,41,28,63,140,40,29,69,244,43*74
+$PGRME,8.0,M,10.9,M,13.5,M*29
+$GPGLL,6130.164,N,02348.695,E,130318,A*22
+$PGRMZ,357,f,3*1A
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6151.098,N,02510.924,E,T002*26
+$GPRMC,130318,A,6130.164,N,02348.695,E,000.0,075.0,110805,006.0,E*77
+$GPRMB,A,1.20,L,T013,T012,6129.236,N,02346.327,E,001.5,230.7,,V*16
+$GPGGA,130318,6130.164,N,02348.695,E,1,08,1.9,108.6,M,20.7,M,,*40
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,2.3,1.9,1.2*35
+$GPGSV,3,1,12,03,02,011,00,07,02,153,00,08,50,094,46,10,14,208,31*75
+$GPGSV,3,2,12,15,13,331,35,18,19,326,42,19,21,034,43,21,04,297,00*7A
+$GPGSV,3,3,12,26,60,275,35,27,18,092,40,28,63,140,40,29,69,244,43*72
+$PGRME,7.9,M,10.7,M,13.3,M*27
+$GPGLL,6130.164,N,02348.695,E,130319,A*23
+$PGRMZ,357,f,3*1A
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6129.271,N,02346.376,E,T001*27
+$GPRMC,130319,A,6130.164,N,02348.695,E,000.0,075.0,110805,006.0,E*76
+$GPRMB,A,1.20,L,T013,T012,6129.236,N,02346.327,E,001.5,230.7,,V*16
+$GPGGA,130320,6130.164,N,02348.695,E,1,08,1.9,108.8,M,20.7,M,,*45
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,2.4,1.9,1.4*34
+$GPGSV,3,1,12,03,02,011,00,07,02,153,00,08,50,094,46,10,14,208,31*75
+$GPGSV,3,2,12,15,13,331,35,18,19,326,42,19,21,034,43,21,04,297,00*7A
+$GPGSV,3,3,12,26,60,275,36,27,18,092,40,28,63,140,40,29,69,244,43*71
+$PGRME,8.7,M,12.2,M,15.0,M*24
+$GPGLL,6130.164,N,02348.695,E,130320,A*29
+$PGRMZ,361,f,3*1F
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPRTE,4,1,c,0,T030,T029,T028,T027,T026,T025,T024,T023,T022*49
+$GPRTE,4,2,c,0,T021,T020,T019,T018,T017,T016,T015,T014,T013*4B
+$GPRTE,4,3,c,0,T012,T011,T010,T009,T008,T007,T006,T005,T004*4B
+$GPRTE,4,4,c,0,T003,T002,T001*4F
+$GPWPL,6016.083,N,02452.500,E,T030*22
+$GPRMC,130321,A,6130.164,N,02348.695,E,000.0,075.0,110805,006.0,E*7D
+$GPRMB,A,1.20,L,T013,T012,6129.236,N,02346.327,E,001.5,230.7,,V*16
+$GPGGA,130321,6130.164,N,02348.695,E,1,08,2.4,109.5,M,20.7,M,,*46
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,3.7,2.4,2.7*38
+$GPGSV,3,1,12,03,02,011,00,07,02,153,00,08,50,094,46,10,14,208,31*75
+$GPGSV,3,2,12,15,13,331,35,18,19,326,42,19,21,034,43,21,04,297,00*7A
+$GPGSV,3,3,12,26,60,275,36,27,18,092,39,28,63,140,40,29,69,244,43*7F
+$PGRME,7.9,M,10.7,M,13.3,M*27
+$GPGLL,6130.164,N,02348.695,E,130322,A*2B
+$PGRMZ,357,f,3*1A
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6123.283,N,02430.650,E,T029*2D
+$GPRMC,130322,A,6130.163,N,02348.695,E,000.0,075.0,110805,006.0,E*79
+$GPRMB,A,1.20,L,T013,T012,6129.236,N,02346.327,E,001.5,230.7,,V*16
+$GPGGA,130323,6130.163,N,02348.695,E,1,08,1.5,108.8,M,20.7,M,,*4D
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,1.5,1.5,1.0*3E
+$GPGSV,3,1,12,03,02,011,00,07,02,153,00,08,50,094,46,10,14,208,31*75
+$GPGSV,3,2,12,15,13,331,36,18,19,326,42,19,21,034,43,21,04,297,00*79
+$GPGSV,3,3,12,26,60,275,36,27,18,092,39,28,63,140,41,29,69,244,43*7E
+$PGRME,7.9,M,10.7,M,13.3,M*27
+$GPGLL,6130.163,N,02348.695,E,130323,A*2D
+$PGRMZ,355,f,3*18
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6023.283,N,02430.650,E,T028*2D
+$GPRMC,130324,A,6130.163,N,02348.695,E,000.0,075.0,110805,006.0,E*7F
+$GPRMB,A,1.20,L,T013,T012,6129.236,N,02346.327,E,001.5,230.7,,V*16
+$GPGGA,130324,6130.163,N,02348.695,E,1,08,1.6,108.1,M,20.7,M,,*40
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,1.7,1.6,1.2*3D
+$GPGSV,3,1,12,03,02,011,00,07,02,153,00,08,50,094,46,10,14,208,31*75
+$GPGSV,3,2,12,15,13,331,36,18,19,326,42,19,21,034,43,21,04,297,00*79
+$GPGSV,3,3,12,26,60,275,36,27,18,092,40,28,63,140,41,29,69,244,43*70
+$PGRME,7.9,M,10.7,M,13.3,M*27
+$GPGLL,6130.163,N,02348.696,E,130324,A*29
+$PGRMZ,353,f,3*1E
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6123.283,N,02430.650,E,T027*23
+$GPRMC,130325,A,6130.163,N,02348.696,E,000.0,075.0,110805,006.0,E*7D
+$GPRMB,A,1.20,L,T013,T012,6129.236,N,02346.327,E,001.5,230.7,,V*16
+$GPGGA,130325,6130.164,N,02348.700,E,1,08,1.4,108.0,M,20.7,M,,*48
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,1.4,1.4,1.0*3E
+$GPGSV,3,1,12,03,02,011,00,07,02,153,00,08,50,094,46,10,14,208,31*75
+$GPGSV,3,2,12,15,13,331,35,18,19,326,42,19,21,034,43,21,04,297,00*7A
+$GPGSV,3,3,12,26,60,275,37,27,18,092,39,28,63,140,41,29,69,244,43*7F
+$PGRME,9.1,M,13.0,M,15.8,M*28
+$GPGLL,6130.164,N,02348.701,E,130326,A*23
+$PGRMZ,354,f,3*19
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6017.083,N,02452.500,E,T026*24
+$GPRMC,130326,A,6130.165,N,02348.708,E,008.3,074.5,110805,006.0,E*71
+$GPRMB,A,1.20,L,T013,T012,6129.236,N,02346.327,E,001.5,230.8,-007.6,V*1B
+$GPGGA,130327,6130.165,N,02348.708,E,1,08,1.4,108.2,M,20.7,M,,*41
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,1.4,1.4,1.0*3E
+$GPGSV,3,1,12,03,02,011,00,07,03,153,00,08,50,094,46,10,14,208,31*74
+$GPGSV,3,2,12,15,13,331,34,18,19,326,42,19,21,034,43,21,04,297,00*7B
+$GPGSV,3,3,12,26,60,275,36,27,18,092,40,28,63,140,42,29,69,244,42*72
+$PGRME,8.2,M,11.8,M,14.3,M*2A
+$GPGLL,6130.165,N,02348.711,E,130327,A*22
+$PGRMZ,355,f,3*18
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6017.083,S,02453.500,E,T025*3B
+$GPRMC,130327,A,6130.166,N,02348.718,E,011.3,075.0,110805,006.0,E*7E
+$GPRMB,A,1.20,L,T013,T012,6129.236,N,02346.327,E,001.5,230.9,-010.3,V*19
+$GPGGA,130327,6130.166,N,02348.720,E,1,08,1.5,108.1,M,20.7,M,,*4A
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,1.7,1.5,1.2*3E
+$GPGSV,3,1,12,03,02,011,00,07,03,153,00,08,50,094,46,10,14,208,31*74
+$GPGSV,3,2,12,15,13,331,34,18,19,326,41,19,21,034,43,21,04,297,00*78
+$GPGSV,3,3,12,26,60,275,36,27,18,092,40,28,63,140,42,29,69,244,43*73
+$PGRME,7.9,M,10.7,M,13.3,M*27
+$GPGLL,6130.167,N,02348.724,E,130328,A*29
+$PGRMZ,355,f,3*18
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6018.083,N,02453.500,E,T024*28
+$GPRMC,130328,A,6130.167,N,02348.730,E,013.0,074.8,110805,006.0,E*72
+$GPRMB,A,1.20,L,T013,T012,6129.236,N,02346.327,E,001.5,230.9,-010.3,V*19
+$GPGGA,130328,6130.168,N,02348.732,E,1,08,1.5,108.2,M,20.7,M,,*4B
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,1.5,1.5,1.0*3E
+$GPGSV,3,1,12,03,02,011,00,07,03,153,00,08,50,094,46,10,14,208,31*74
+$GPGSV,3,2,12,15,13,331,33,18,19,326,42,19,21,034,43,21,04,297,00*7C
+$GPGSV,3,3,12,26,60,275,36,27,18,092,40,28,63,140,42,29,69,244,43*73
+$PGRME,7.9,M,10.7,M,13.3,M*27
+$GPGLL,6130.168,N,02348.736,E,130330,A*2C
+$PGRMZ,355,f,3*18
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6017.083,N,02452.500,W,T023*33
+$GPRMC,130330,A,6130.169,N,02348.745,E,020.5,075.3,110805,006.0,E*78
+$GPRMB,A,1.21,L,T013,T012,6129.236,N,02346.327,E,001.5,231.1,-018.7,V*1D
+$GPGGA,130330,6130.170,N,02348.747,E,1,08,1.5,108.1,M,20.7,M,,*4A
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,1.7,1.5,1.2*3E
+$GPGSV,3,1,12,03,02,011,00,07,03,153,00,08,49,094,47,10,14,208,31*7D
+$GPGSV,3,2,12,15,13,331,33,18,19,326,41,19,21,034,43,21,04,297,00*7F
+$GPGSV,3,3,12,26,60,275,36,27,18,092,40,28,63,140,41,29,69,244,42*71
+$PGRME,7.9,M,10.7,M,13.3,M*27
+$GPGLL,6130.170,N,02348.754,E,130331,A*20
+$PGRMZ,354,f,3*19
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6017.083,N,02555.500,E,T022*26
+$GPRMC,130331,A,6130.171,N,02348.762,E,021.2,075.1,110805,006.0,E*71
+$GPRMB,A,1.21,L,T013,T012,6129.236,N,02346.327,E,001.5,231.2,-018.7,V*1E
+$GPGGA,130331,6130.172,N,02348.764,E,1,08,1.7,108.0,M,20.7,M,,*4B
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,2.0,1.7,1.5*3F
+$GPGSV,3,1,12,03,02,011,00,07,03,153,00,08,49,094,47,10,14,208,31*7D
+$GPGSV,3,2,12,15,13,331,33,18,19,326,40,19,21,034,43,21,04,297,00*7E
+$GPGSV,3,3,12,26,60,275,37,27,18,092,40,28,63,140,41,29,69,244,41*73
+$PGRME,7.9,M,10.8,M,13.4,M*2F
+$GPGLL,6130.173,N,02348.771,E,130333,A*26
+$PGRMZ,354,f,3*19
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6017.083,N,02452.500,E,T021*23
+$GPRMC,130333,A,6130.173,N,02348.777,E,021.2,075.1,110805,006.0,E*75
+$GPRMB,A,1.22,L,T013,T012,6129.236,N,02346.327,E,001.5,231.3,-019.4,V*1E
+$GPGGA,130333,6130.174,N,02348.779,E,1,08,2.0,107.9,M,20.7,M,,*41
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,2.3,2.0,1.0*3D
+$GPGSV,3,1,12,03,02,011,00,07,03,153,00,08,49,094,47,10,14,208,31*7D
+$GPGSV,3,2,12,15,13,331,32,18,19,326,39,19,21,034,42,21,04,297,00*70
+$GPGSV,3,3,12,26,60,275,38,27,18,092,40,28,63,140,41,29,69,244,41*7C
+$PGRME,8.0,M,10.9,M,13.5,M*29
+$GPGLL,6130.176,N,02348.792,E,130333,A*2E
+$PGRMZ,354,f,3*19
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6116.083,N,02452.500,E,T020*22
+$GPRMC,130334,A,6130.176,N,02348.798,E,023.5,074.8,110805,006.0,E*7B
+$GPRMB,A,1.22,L,T013,T012,6129.236,N,02346.327,E,001.5,231.5,-021.6,V*11
+$GPGGA,130334,6130.177,N,02348.804,E,1,08,2.1,108.0,M,20.7,M,,*47
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,2.6,2.1,1.3*3A
+$GPGSV,3,1,12,03,02,011,00,07,03,153,00,08,49,094,47,10,14,208,31*7D
+$GPGSV,3,2,12,15,13,331,32,18,19,326,40,19,21,034,42,21,04,297,00*7E
+$GPGSV,3,3,12,26,60,275,38,27,18,092,39,28,63,140,40,29,69,244,41*73
+$PGRME,8.0,M,11.5,M,8.6,M*1D
+$GPGLL,6130.178,N,02348.813,E,130335,A*20
+$PGRMZ,354,f,3*19
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6016.083,S,02452.500,E,T019*34
+$GPRMC,130335,A,6130.180,N,02348.820,E,025.9,073.8,110805,006.0,E*72
+$GPRMB,A,1.23,L,T013,T012,6129.236,N,02346.327,E,001.5,231.6,-024.0,V*10
+$GPGGA,130336,6130.180,N,02348.823,E,1,08,2.1,107.9,M,20.7,M,,*4E
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,2.2,2.1,1.0*3D
+$GPGSV,3,1,12,03,02,011,00,07,03,153,00,08,49,094,47,10,14,208,31*7D
+$GPGSV,3,2,12,15,13,331,32,18,19,326,41,19,21,034,42,21,04,297,00*7F
+$GPGSV,3,3,12,26,60,275,39,27,18,092,39,28,63,140,40,29,69,244,41*72
+$PGRME,8.0,M,11.5,M,9.2,M*18
+$GPGLL,6130.181,N,02348.832,E,130336,A*26
+$PGRMZ,355,f,3*18
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6016.083,N,02452.500,E,T018*28
+$GPRMC,130337,A,6130.182,N,02348.840,E,026.1,073.5,110805,006.0,E*72
+$GPRMB,A,1.23,L,T013,T012,6129.236,N,02346.327,E,001.5,231.8,-024.3,V*1D
+$GPGGA,130337,6130.183,N,02348.843,E,1,08,2.1,108.1,M,20.7,M,,*4D
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,2.4,2.1,1.2*39
+$GPGSV,3,1,12,03,02,011,00,07,03,153,00,08,49,094,47,10,14,208,31*7D
+$GPGSV,3,2,12,15,13,331,33,18,19,326,41,19,21,034,42,21,04,297,00*7E
+$GPGSV,3,3,12,26,60,275,38,27,18,092,39,28,63,140,40,29,69,244,42*70
+$PGRME,7.9,M,10.7,M,9.6,M*19
+$GPGLL,6130.184,N,02348.852,E,130338,A*2B
+$PGRMZ,355,f,3*18
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6013.283,N,02456.650,E,T017*22
+$GPRMC,130338,A,6130.186,N,02348.861,E,026.8,073.0,110805,006.0,E*76
+$GPRMB,A,1.24,L,T013,T012,6129.236,N,02346.327,E,001.5,231.9,-024.6,V*1E
+$GPGGA,130338,6130.186,N,02348.864,E,1,08,2.0,108.4,M,20.7,M,,*46
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,2.0,2.0,1.0*3E
+$GPGSV,3,1,12,03,02,011,00,07,03,153,00,08,49,094,47,10,13,208,31*7A
+$GPGSV,3,2,12,15,13,331,32,18,19,326,42,19,21,034,41,21,04,297,00*7F
+$GPGSV,3,3,12,26,60,275,38,27,18,092,37,28,63,140,40,29,69,244,42*7E
+$PGRME,7.9,M,10.7,M,9.6,M*19
+$GPGLL,6130.187,N,02348.872,E,130339,A*2B
+$PGRMZ,356,f,3*1B
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6123.283,N,02430.650,E,T016*21
+$GPRMC,130339,A,6130.188,N,02348.880,E,026.8,073.0,110805,006.0,E*76
+$GPRMB,A,1.24,L,T013,T012,6129.236,N,02346.327,E,001.6,232.0,-025.0,V*10
+$GPGGA,130339,6130.189,N,02348.883,E,1,08,2.1,108.3,M,20.7,M,,*47
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,2.1,2.1,1.0*3E
+$GPGSV,3,1,12,03,02,011,00,07,03,153,00,08,49,094,47,10,13,208,31*7A
+$GPGSV,3,2,12,15,13,331,32,18,19,326,40,19,21,034,42,21,04,297,00*7E
+$GPGSV,3,3,12,26,60,275,38,27,18,092,36,28,63,140,40,29,69,244,42*7F
+$PGRME,10.0,M,14.0,M,13.9,M*11
+$GPGLL,6130.191,N,02348.893,E,130339,A*23
+$PGRMZ,357,f,3*1A
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,0000.000,N,00000.000,W,T015*39
+$GPRMC,130341,A,6130.192,N,02348.900,E,027.1,072.8,110805,006.0,E*7A
+$GPRMB,A,1.25,L,T013,T012,6129.236,N,02346.327,E,001.6,232.2,-025.3,V*10
+$GPGGA,130341,6130.192,N,02348.903,E,1,08,2.1,108.8,M,20.7,M,,*40
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,3.2,2.6,2.0*38
+$GPGSV,3,1,12,03,02,011,00,07,03,153,00,08,49,094,47,10,13,208,30*7B
+$GPGSV,3,2,12,15,13,331,31,18,19,326,41,19,21,034,42,21,04,297,00*7C
+$GPGSV,3,3,12,26,60,275,37,27,18,092,36,28,63,140,40,29,69,244,42*70
+$PGRME,11.6,M,17.1,M,17.7,M*1E
+$GPGLL,6130.194,N,02348.913,E,130341,A*20
+$PGRMZ,357,f,3*1A
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,0009.000,N,02430.650,E,T014*25
+$GPRMC,130342,A,6130.195,N,02348.921,E,027.5,072.5,110805,006.0,E*74
+$GPRMB,A,1.26,L,T013,T012,6129.236,N,02346.327,E,001.6,232.3,-025.8,V*19
+$GPGGA,130342,6130.195,N,02348.924,E,1,08,2.6,108.7,M,20.7,M,,*49
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,5.4,3.4,4.1*3C
+$GPGSV,3,1,12,03,02,011,00,07,03,153,00,08,49,094,47,10,13,208,30*7B
+$GPGSV,3,2,12,15,13,331,31,18,19,326,39,19,21,034,41,21,04,297,00*70
+$GPGSV,3,3,12,26,60,275,38,27,18,092,33,28,63,140,41,29,69,244,43*7A
+$PGRME,14.9,M,24.4,M,26.0,M*14
+$GPGLL,6130.198,N,02348.934,E,130342,A*2A
+$PGRMZ,368,f,3*16
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6123.285,N,02430.651,E,T013*23
+$GPRMC,130342,A,6130.199,N,02348.941,E,027.8,072.0,110805,006.0,E*76
+$GPRMB,A,1.26,L,T013,T012,6129.236,N,02346.327,E,001.6,232.4,-026.1,V*14
+$GPGGA,130342,6130.199,N,02348.944,E,1,08,3.4,112.3,M,20.7,M,,*4F
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,5.4,3.4,4.1*3C
+$GPGSV,3,1,12,03,02,011,00,07,03,153,00,08,49,094,47,10,13,208,30*7B
+$GPGSV,3,2,12,15,13,331,31,18,19,326,38,19,21,034,42,21,04,297,00*72
+$GPGSV,3,3,12,26,60,275,38,27,18,092,35,28,63,140,41,29,69,244,43*7C
+$PGRME,14.9,M,24.4,M,26.0,M*14
+$GPGLL,6130.201,N,02348.953,E,130342,A*28
+$PGRMZ,369,f,3*17
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6129.236,N,02346.327,E,T012*22
+$GPRMC,130342,A,6130.202,N,02348.961,E,027.8,072.0,110805,006.0,E*75
+$GPRMB,A,1.27,L,T013,T012,6129.236,N,02346.327,E,001.6,232.5,-026.1,V*14
+$GPGGA,130342,6130.203,N,02348.964,E,1,08,3.4,112.4,M,20.7,M,,*4A
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,5.4,3.4,4.1*3C
+$GPGSV,3,1,12,03,02,011,00,07,03,153,00,08,49,094,47,10,13,208,31*7A
+$GPGSV,3,2,12,15,13,331,31,18,19,326,38,19,21,034,40,21,04,297,00*70
+$GPGSV,3,3,12,26,60,275,38,27,18,092,34,28,63,140,41,29,69,244,43*7D
+$PGRME,14.9,M,24.4,M,26.0,M*14
+$GPGLL,6130.204,N,02348.973,E,130345,A*28
+$PGRMZ,369,f,3*17
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6114.236,N,02346.327,E,T011*2F
+$GPRMC,130345,A,6130.206,N,02348.986,E,032.3,071.9,110805,006.0,E*7A
+$GPRMB,A,1.28,L,T013,T012,6129.236,N,02346.327,E,001.6,232.7,-030.5,V*1A
+$GPGGA,130345,6130.207,N,02348.991,E,1,08,2.4,112.3,M,20.7,M,,*45
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,4.5,2.4,3.8*33
+$GPGSV,3,1,12,03,02,011,00,07,03,153,00,08,49,094,47,10,13,208,32*79
+$GPGSV,3,2,12,15,13,331,31,18,19,326,39,19,21,034,40,21,04,297,00*71
+$GPGSV,3,3,12,26,60,275,36,27,18,092,35,28,63,140,41,29,69,244,44*75
+$PGRME,9.3,M,14.9,M,17.6,M*28
+$GPGLL,6130.209,N,02349.002,E,130347,A*29
+$PGRMZ,369,f,3*17
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6220.236,N,02346.327,E,T010*2A
+$GPRMC,130347,A,6130.210,N,02349.011,E,032.3,071.9,110805,006.0,E*79
+$GPRMB,A,1.28,L,T013,T012,6129.236,N,02346.327,E,001.6,232.8,-030.5,V*15
+$GPGGA,130347,6130.210,N,02349.014,E,1,08,2.4,112.4,M,20.7,M,,*43
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,4.5,2.4,3.8*33
+$GPGSV,3,1,12,03,02,011,00,07,03,153,00,08,49,094,47,10,13,208,31*7A
+$GPGSV,3,2,12,15,13,331,31,18,19,326,39,19,21,034,39,21,04,297,00*7F
+$GPGSV,3,3,12,26,60,275,35,27,18,092,35,28,63,140,41,29,69,244,44*76
+$PGRME,8.2,M,11.8,M,14.3,M*2A
+$GPGLL,6130.211,N,02349.025,E,130347,A*25
+$PGRMZ,366,f,3*18
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6120.236,N,02346.327,E,T009*21
+$GPRMC,130349,A,6130.212,N,02349.033,E,031.3,074.1,110805,006.0,E*7B
+$GPRMB,A,1.29,L,T013,T012,6129.236,N,02346.327,E,001.6,232.9,-029.1,V*19
+$GPGGA,130349,6130.213,N,02349.037,E,1,08,2.1,111.6,M,20.7,M,,*4B
+$GPGSA,A,3,,,08,,,18,19,,26,27,28,29,3.7,2.1,3.0*3F
+$GPGSV,3,1,12,03,02,011,00,07,03,153,00,08,49,094,47,10,13,208,31*7A
+$GPGSV,3,2,12,15,13,331,31,18,19,326,38,19,21,034,39,21,04,297,00*7E
+$GPGSV,3,3,12,26,60,275,35,27,18,092,34,28,63,140,41,29,69,244,44*77
+$PGRME,8.3,M,12.1,M,14.6,M*24
+$GPGLL,6130.215,N,02349.049,E,130349,A*25
+$PGRMZ,365,f,3*1B
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6129.234,N,02346.317,E,T008*28
+$GPRMC,130350,A,6130.216,N,02349.057,E,032.4,073.2,110805,006.0,E*75
+$GPRMB,A,1.29,L,T013,T012,6129.236,N,02346.327,E,001.6,233.1,-030.4,V*1D
+$GPGGA,130350,6130.217,N,02349.061,E,1,07,2.4,111.5,M,20.7,M,,*4D
+$GPGSA,A,3,,,08,,,18,19,,26,27,28,29,3.9,2.4,1.0*36
+$GPGSV,3,1,12,03,02,011,00,07,03,153,00,08,49,094,47,10,13,208,32*79
+$GPGSV,3,2,12,15,13,331,31,18,19,326,37,19,21,034,38,21,04,297,00*70
+$GPGSV,3,3,12,26,60,275,37,27,18,092,33,28,63,140,41,29,69,244,44*72
+$PGRME,12.0,M,20.0,M,23.4,M*1A
+$GPGLL,6130.219,N,02349.072,E,130350,A*29
+$PGRMZ,366,f,3*18
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6157.564,N,02406.158,E,T007*26
+$GPRMC,130351,A,6130.220,N,02349.081,E,032.7,072.5,110805,006.0,E*7F
+$GPRMB,A,1.30,L,T013,T012,6129.236,N,02346.327,E,001.6,233.2,-030.8,V*1A
+$GPGGA,130351,6130.221,N,02349.085,E,1,07,2.6,111.4,M,20.7,M,,*40
+$GPGSA,A,3,,,08,,,18,19,,26,27,28,29,3.9,2.6,1.0*34
+$GPGSV,3,1,12,03,02,011,00,07,03,153,00,08,49,094,47,10,13,208,32*79
+$GPGSV,3,2,12,15,13,331,30,18,19,326,36,19,21,034,37,21,04,297,00*7F
+$GPGSV,3,3,12,26,60,275,37,27,18,092,35,28,63,140,41,29,69,244,44*74
+$PGRME,12.4,M,16.6,M,15.7,M*1B
+$GPGLL,6130.222,N,02349.096,E,130352,A*29
+$PGRMZ,366,f,3*18
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6145.919,N,02345.544,E,T006*2B
+$GPRMC,130352,A,6130.223,N,02349.105,E,032.0,072.3,110805,006.0,E*73
+$GPRMB,A,1.31,L,T013,T012,6129.236,N,02346.327,E,001.7,233.3,-030.9,V*1A
+$GPGGA,130352,6130.224,N,02349.108,E,1,07,2.8,110.9,M,20.7,M,,*40
+$GPGSA,A,3,,,08,,,18,19,,26,27,28,29,4.0,2.8,1.0*34
+$GPGSV,3,1,12,03,02,011,00,07,03,153,00,08,49,094,47,10,13,208,31*7A
+$GPGSV,3,2,12,15,13,331,30,18,19,326,35,19,21,034,39,21,04,297,00*72
+$GPGSV,3,3,12,26,60,275,37,27,18,092,35,28,63,140,41,29,69,244,44*74
+$PGRME,12.6,M,15.6,M,16.3,M*1D
+$GPGLL,6130.225,N,02349.119,E,130352,A*28
+$PGRMZ,364,f,3*1A
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6130.198,N,02342.702,E,T005*2C
+$GPRMC,130354,A,6130.227,N,02349.128,E,032.0,072.3,110805,006.0,E*7E
+$GPRMB,A,1.31,L,T013,T012,6129.236,N,02346.327,E,001.7,233.5,-030.3,V*16
+$GPGGA,130354,6130.227,N,02349.131,E,1,07,2.8,110.9,M,20.7,M,,*4F
+$GPGSA,A,3,,,08,,,18,19,,26,27,28,29,4.0,2.8,1.0*34
+$GPGSV,3,1,12,03,02,011,00,07,03,153,00,08,49,094,47,10,13,208,31*7A
+$GPGSV,3,2,12,15,13,331,30,18,19,326,35,19,21,034,40,21,04,297,00*7C
+$GPGSV,3,3,12,26,60,275,36,27,18,092,34,28,63,140,41,29,69,244,44*74
+$PGRME,16.4,M,24.2,M,26.0,M*1D
+$GPGLL,6130.229,N,02349.142,E,130354,A*2C
+$PGRMZ,360,f,3*1E
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6216.183,N,02619.685,E,T004*25
+$GPRMC,130355,A,6130.230,N,02349.152,E,032.2,072.5,110805,006.0,E*70
+$GPRMB,A,1.32,L,T013,T012,6129.236,N,02346.327,E,001.7,233.6,-030.1,V*14
+$GPGGA,130355,6130.231,N,02349.155,E,1,07,2.1,109.6,M,20.7,M,,*45
+$GPGSA,A,3,,,08,,,18,19,,26,27,28,29,3.7,2.1,3.0*3F
+$GPGSV,3,1,12,03,02,011,00,07,03,153,00,08,49,094,47,10,13,208,30*7B
+$GPGSV,3,2,12,15,13,331,30,18,19,326,38,19,21,034,41,21,04,297,00*70
+$GPGSV,3,3,12,26,60,275,37,27,18,092,35,28,63,140,40,29,69,244,44*75
+$PGRME,8.3,M,11.8,M,14.4,M*2C
+$GPGLL,6130.232,N,02349.166,E,130356,A*22
+$PGRMZ,360,f,3*1E
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6215.064,N,02603.837,E,T003*25
+$GPRMC,130356,A,6130.234,N,02349.175,E,032.5,072.5,110805,006.0,E*75
+$GPRMB,A,1.33,L,T013,T012,6129.236,N,02346.327,E,001.7,233.8,-030.4,V*1E
+$GPGGA,130356,6130.234,N,02349.179,E,1,07,2.1,109.5,M,20.7,M,,*4E
+$GPGSA,A,3,,,08,,,18,19,,26,27,28,29,2.2,2.1,1.0*39
+$GPGSV,3,1,12,03,02,011,00,07,03,153,00,08,49,094,47,10,13,208,30*7B
+$GPGSV,3,2,12,15,13,331,30,18,19,326,37,19,21,034,42,21,04,297,00*7C
+$GPGSV,3,3,12,26,60,275,38,27,18,092,36,28,63,140,40,29,69,244,44*79
+$PGRME,8.2,M,11.7,M,14.3,M*25
+$GPGLL,6130.236,N,02349.190,E,130357,A*2E
+$PGRMZ,359,f,3*14
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6151.098,N,02510.924,E,T002*26
+$GPRMC,130357,A,6130.237,N,02349.199,E,032.8,072.5,110805,006.0,E*78
+$GPRMB,A,1.33,L,T013,T012,6129.236,N,02346.327,E,001.7,233.9,-031.1,V*1B
+$GPGGA,130358,6130.238,N,02349.203,E,1,07,2.0,109.2,M,20.7,M,,*44
+$GPGSA,A,3,,,08,,,18,19,,26,27,28,29,2.0,2.0,1.0*3A
+$GPGSV,3,1,12,03,02,011,00,07,03,153,00,08,49,094,47,10,13,208,30*7B
+$GPGSV,3,2,12,15,12,330,30,18,19,326,39,19,21,034,43,21,04,297,00*73
+$GPGSV,3,3,12,26,60,275,38,27,18,092,35,28,63,140,40,29,69,244,44*7A
+$PGRME,9.4,M,14.3,M,17.1,M*22
+$GPGLL,6130.239,N,02349.215,E,130358,A*20
+$PGRMZ,361,f,3*1F
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6129.271,N,02346.376,E,T001*27
+$GPRMC,130358,A,6130.241,N,02349.224,E,032.9,073.2,110805,006.0,E*74
+$GPRMB,A,1.34,L,T013,T012,6129.236,N,02346.327,E,001.7,234.0,-031.1,V*12
+$GPGGA,130359,6130.241,N,02349.227,E,1,07,1.6,110.0,M,20.7,M,,*42
+$GPGSA,A,3,,,08,,,18,19,,26,27,28,29,1.6,1.6,1.0*3A
+$GPGSV,3,1,12,03,02,011,00,07,03,153,00,08,49,094,47,10,13,208,30*7B
+$GPGSV,3,2,12,15,12,330,30,18,19,326,41,19,21,034,41,21,04,297,00*7E
+$GPGSV,3,3,12,26,60,275,38,27,18,092,35,28,63,140,41,29,69,244,44*7B
+$PGRME,9.4,M,14.3,M,17.1,M*22
+$GPGLL,6130.243,N,02349.238,E,130359,A*23
+$PGRMZ,361,f,3*1F
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPRTE,4,1,c,0,T030,T029,T028,T027,T026,T025,T024,T023,T022*49
+$GPRTE,4,2,c,0,T021,T020,T019,T018,T017,T016,T015,T014,T013*4B
+$GPRTE,4,3,c,0,T012,T011,T010,T009,T008,T007,T006,T005,T004*4B
+$GPRTE,4,4,c,0,T003,T002,T001*4F
+$GPWPL,6016.083,N,02452.500,E,T030*22
+$GPRMC,130401,A,6130.245,N,02349.256,E,033.0,073.4,110805,006.0,E*70
+$GPRMB,A,1.35,L,T013,T012,6129.236,N,02346.327,E,001.7,234.2,-031.1,V*11
+$GPGGA,130401,6130.246,N,02349.259,E,1,07,1.9,110.1,M,20.7,M,,*48
+$GPGSA,A,3,,,08,,,18,19,,26,27,28,29,2.1,1.9,1.3*32
+$GPGSV,3,1,12,03,02,011,00,07,03,153,00,08,49,094,47,10,13,208,30*7B
+$GPGSV,3,2,12,15,12,330,30,18,19,326,40,19,21,034,40,21,04,297,00*7E
+$GPGSV,3,3,12,26,60,275,38,27,18,092,36,28,63,140,41,29,69,244,43*7F
+$PGRME,9.2,M,12.1,M,15.3,M*20
+$GPGLL,6130.247,N,02349.270,E,130402,A*22
+$PGRMZ,361,f,3*1F
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6123.283,N,02430.650,E,T029*2D
+$GPRMC,130402,A,6130.249,N,02349.280,E,033.0,073.4,110805,006.0,E*74
+$GPRMB,A,1.35,L,T013,T012,6129.236,N,02346.327,E,001.7,234.3,-031.1,V*10
+$GPGGA,130402,6130.249,N,02349.283,E,1,07,1.9,110.2,M,20.7,M,,*40
+$GPGSA,A,3,,,08,,,18,19,,26,27,28,29,2.6,2.3,1.6*39
+$GPGSV,3,1,12,03,02,011,00,07,03,153,00,08,49,094,47,10,13,208,31*7A
+$GPGSV,3,2,12,15,12,330,32,18,19,326,40,19,21,034,39,21,04,297,00*72
+$GPGSV,3,3,12,26,60,275,39,27,18,092,38,28,63,140,42,29,69,244,44*74
+$PGRME,9.7,M,12.5,M,15.8,M*2A
+$GPGLL,6130.251,N,02349.294,E,130402,A*2F
+$PGRMZ,361,f,3*1F
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6023.283,N,02430.650,E,T028*2D
+$GPRMC,130402,A,6130.252,N,02349.304,E,032.8,073.2,110805,006.0,E*7C
+$GPRMB,A,1.36,L,T013,T012,6129.236,N,02346.327,E,001.8,234.5,-031.1,V*1A
+$GPGGA,130404,6130.253,N,02349.307,E,1,07,2.3,110.2,M,20.7,M,,*49
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,2.6,2.3,1.6*3D
+$GPGSV,3,1,12,03,02,011,00,07,03,153,00,08,49,094,47,10,13,208,30*7B
+$GPGSV,3,2,12,15,12,330,31,18,19,326,39,19,21,034,38,21,04,297,00*7E
+$GPGSV,3,3,12,26,60,275,39,27,18,092,38,28,63,140,42,29,69,244,44*74
+$PGRME,10.6,M,12.8,M,16.7,M*12
+$GPGLL,6130.254,N,02349.319,E,130404,A*28
+$PGRMZ,362,f,3*1C
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6123.283,N,02430.650,E,T027*23
+$GPRMC,130405,A,6130.255,N,02349.328,E,033.2,073.8,110805,006.0,E*73
+$GPRMB,A,1.37,L,T013,T012,6129.236,N,02346.327,E,001.8,234.6,-031.3,V*1A
+$GPGGA,130405,6130.256,N,02349.332,E,1,08,2.3,110.5,M,20.7,M,,*43
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,2.6,2.3,1.6*3D
+$GPGSV,3,1,12,03,02,011,00,07,03,153,00,08,49,094,47,10,13,208,30*7B
+$GPGSV,3,2,12,15,12,330,32,18,19,326,38,19,21,034,39,21,04,297,00*7D
+$GPGSV,3,3,12,26,60,275,39,27,18,092,39,28,63,140,42,29,69,244,43*72
+$PGRME,8.0,M,10.8,M,13.4,M*29
+$GPGLL,6130.257,N,02349.343,E,130405,A*25
+$PGRMZ,363,f,3*1D
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6017.083,N,02452.500,E,T026*24
+$GPRMC,130405,A,6130.259,N,02349.352,E,032.9,073.7,110805,006.0,E*77
+$GPRMB,A,1.37,L,T013,T012,6129.236,N,02346.327,E,001.8,234.7,-031.1,V*19
+$GPGGA,130406,6130.259,N,02349.356,E,1,08,2.3,110.7,M,20.7,M,,*4F
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,2.6,2.3,1.6*3D
+$GPGSV,3,1,12,03,02,011,00,07,03,153,00,08,49,094,47,10,13,208,30*7B
+$GPGSV,3,2,12,15,12,330,31,18,19,326,37,19,21,034,38,21,04,297,00*70
+$GPGSV,3,3,12,26,60,275,38,27,18,092,39,28,63,140,42,29,69,244,43*73
+$PGRME,9.0,M,11.3,M,14.5,M*24
+$GPGLL,6130.261,N,02349.367,E,130406,A*25
+$PGRMZ,364,f,3*1A
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6017.083,S,02453.500,E,T025*3B
+$GPRMC,130406,A,6130.262,N,02349.376,E,032.9,073.6,110805,006.0,E*7B
+$GPRMB,A,1.38,L,T013,T012,6129.236,N,02346.327,E,001.8,234.8,-031.1,V*19
+$GPGGA,130408,6130.263,N,02349.380,E,1,08,2.6,110.9,M,20.7,M,,*48
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,2.9,2.6,1.8*39
+$GPGSV,3,1,12,03,02,011,00,07,03,153,00,08,49,094,47,10,13,208,33*78
+$GPGSV,3,2,12,15,12,330,31,18,19,326,37,19,21,034,39,21,04,297,00*71
+$GPGSV,3,3,12,26,60,275,38,27,18,092,39,28,63,140,42,29,69,244,43*73
+$PGRME,9.1,M,11.6,M,14.8,M*2D
+$GPGLL,6130.264,N,02349.391,E,130408,A*27
+$PGRMZ,364,f,3*1A
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6018.083,N,02453.500,E,T024*28
+$GPRMC,130409,A,6130.265,N,02349.400,E,032.6,073.5,110805,006.0,E*79
+$GPRMB,A,1.38,L,T013,T012,6129.236,N,02346.327,E,001.8,235.0,-030.9,V*19
+$GPGGA,130409,6130.266,N,02349.404,E,1,08,2.4,111.0,M,20.7,M,,*4D
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,3.2,2.4,2.2*38
+$GPGSV,3,1,12,03,02,011,00,07,03,153,00,08,49,094,47,10,13,208,33*78
+$GPGSV,3,2,12,15,12,330,31,18,19,326,36,19,21,034,38,21,04,297,00*71
+$GPGSV,3,3,12,26,60,275,39,27,18,092,39,28,63,140,42,29,69,244,43*72
+$PGRME,9.1,M,11.6,M,14.8,M*2D
+$GPGLL,6130.267,N,02349.414,E,130409,A*2F
+$PGRMZ,364,f,3*1A
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6017.083,N,02452.500,W,T023*33
+$GPRMC,130410,A,6130.269,N,02349.423,E,032.0,073.3,110805,006.0,E*7C
+$GPRMB,A,1.39,L,T013,T012,6129.236,N,02346.327,E,001.8,235.1,-030.4,V*14
+$GPGGA,130410,6130.269,N,02349.427,E,1,08,2.7,111.2,M,20.7,M,,*4A
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,3.6,2.7,2.4*39
+$GPGSV,3,1,12,03,02,011,00,07,03,153,00,08,49,094,47,10,13,208,34*7F
+$GPGSV,3,2,12,15,12,330,31,18,20,325,37,19,21,034,38,21,04,297,00*79
+$GPGSV,3,3,12,26,60,275,38,27,18,092,39,28,63,140,42,29,69,244,43*73
+$PGRME,9.6,M,12.0,M,15.4,M*22
+$GPGLL,6130.270,N,02349.434,E,130410,A*23
+$PGRMZ,365,f,3*1B
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6017.083,N,02555.500,E,T022*26
+$GPRMC,130411,A,6130.271,N,02349.441,E,027.1,075.5,110805,006.0,E*75
+$GPRMB,A,1.39,L,T013,T012,6129.236,N,02346.327,E,001.8,235.2,-025.4,V*13
+$GPGGA,130412,6130.271,N,02349.444,E,1,08,2.9,111.1,M,20.7,M,,*49
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,3.9,2.9,2.5*39
+$GPGSV,3,1,12,03,02,011,00,07,03,153,00,08,49,094,46,10,13,208,33*79
+$GPGSV,3,2,12,15,12,330,31,18,20,325,35,19,21,034,38,21,04,297,00*7B
+$GPGSV,3,3,12,26,60,275,38,27,18,092,40,28,63,140,43,29,69,244,43*7C
+$PGRME,9.3,M,12.6,M,16.4,M*22
+$GPGLL,6130.272,N,02349.453,E,130412,A*22
+$PGRMZ,364,f,3*1A
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6017.083,N,02452.500,E,T021*23
+$GPRMC,130412,A,6130.273,N,02349.460,E,026.9,076.1,110805,006.0,E*79
+$GPRMB,A,1.40,L,T013,T012,6129.236,N,02346.327,E,001.8,235.3,-025.1,V*19
+$GPGGA,130412,6130.273,N,02349.463,E,1,08,2.4,111.0,M,20.7,M,,*42
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,3.9,2.4,2.7*36
+$GPGSV,3,1,12,03,02,011,00,07,03,153,00,08,49,094,46,10,13,208,33*79
+$GPGSV,3,2,12,15,12,330,31,18,20,325,35,19,21,034,42,21,04,297,00*76
+$GPGSV,3,3,12,26,60,275,37,27,18,092,40,28,63,140,44,29,69,244,43*74
+$PGRME,9.3,M,12.6,M,16.4,M*22
+$GPGLL,6130.274,N,02349.473,E,130413,A*27
+$PGRMZ,364,f,3*1A
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6116.083,N,02452.500,E,T020*22
+$GPRMC,130413,A,6130.274,N,02349.477,E,024.5,077.0,110805,006.0,E*77
+$GPRMB,A,1.40,L,T013,T012,6129.236,N,02346.327,E,001.8,235.4,-022.8,V*10
+$GPGGA,130413,6130.275,N,02349.480,E,1,08,2.2,111.1,M,20.7,M,,*4F
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,2.2,2.2,1.0*3E
+$GPGSV,3,1,12,03,02,011,00,07,03,153,00,08,49,094,45,10,13,208,33*7A
+$GPGSV,3,2,12,15,12,330,31,18,20,325,33,19,20,033,43,21,04,297,00*77
+$GPGSV,3,3,12,26,60,275,37,27,18,092,40,28,63,140,44,29,69,244,42*75
+$PGRME,9.4,M,12.9,M,16.7,M*29
+$GPGLL,6130.276,N,02349.488,E,130413,A*21
+$PGRMZ,365,f,3*1B
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6016.083,S,02452.500,E,T019*34
+$GPRMC,130415,A,6130.276,N,02349.495,E,024.5,077.0,110805,006.0,E*7F
+$GPRMB,A,1.41,L,T013,T012,6129.236,N,02346.327,E,001.8,235.5,-022.8,V*10
+$GPGGA,130415,6130.277,N,02349.498,E,1,08,2.2,111.1,M,20.7,M,,*42
+$GPGSA,A,3,,,08,,,18,19,,26,27,28,29,2.2,2.2,1.0*3A
+$GPGSV,3,1,12,03,02,011,00,07,03,153,00,08,49,094,45,10,13,208,32*7B
+$GPGSV,3,2,12,15,12,330,34,18,20,325,36,19,20,033,45,21,04,297,00*71
+$GPGSV,3,3,12,26,60,275,39,27,18,092,40,28,63,140,44,29,69,244,42*7B
+$PGRME,9.3,M,13.1,M,16.7,M*27
+$GPGLL,6130.278,N,02349.505,E,130415,A*2D
+$PGRMZ,365,f,3*1B
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6016.083,N,02452.500,E,T018*28
+$GPRMC,130417,A,6130.278,N,02349.512,E,023.9,077.0,110805,006.0,E*76
+$GPRMB,A,1.41,L,T013,T012,6129.236,N,02346.327,E,001.9,235.6,-022.2,V*18
+$GPGGA,130417,6130.279,N,02349.515,E,1,07,2.2,111.2,M,20.7,M,,*46
+$GPGSA,A,3,,,08,,,18,19,,26,27,28,29,2.7,2.3,1.5*3B
+$GPGSV,3,1,12,03,02,011,00,07,03,153,00,08,49,094,45,10,13,208,32*7B
+$GPGSV,3,2,12,15,12,330,36,18,20,325,38,19,20,033,45,21,04,297,00*7D
+$GPGSV,3,3,12,26,60,275,39,27,18,092,40,28,63,140,45,29,69,244,42*7A
+$PGRME,7.9,M,10.6,M,13.2,M*27
+$GPGLL,6130.278,N,02349.512,E,130418,A*26
+$PGRMZ,364,f,3*1A
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6013.283,N,02456.650,E,T017*22
+$GPRMC,130418,A,6130.278,N,02349.512,E,012.6,076.7,110805,006.0,E*72
+$GPRMB,A,1.41,L,T013,T012,6129.236,N,02346.327,E,001.9,235.6,-011.8,V*12
+$GPGGA,130418,6130.278,N,02349.514,E,1,07,2.2,111.0,M,20.7,M,,*4B
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,2.2,2.2,1.0*3E
+$GPGSV,3,1,12,03,02,011,00,07,03,153,00,08,49,094,45,10,13,208,31*78
+$GPGSV,3,2,12,15,12,330,38,18,20,325,40,19,20,033,45,21,04,297,00*7C
+$GPGSV,3,3,12,26,60,275,39,27,18,092,40,28,63,140,44,29,69,244,42*7B
+$PGRME,7.9,M,10.6,M,13.2,M*27
+$GPGLL,6130.279,N,02349.518,E,130419,A*2C
+$PGRMZ,364,f,3*1A
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6123.283,N,02430.650,E,T016*21
+$GPRMC,130419,A,6130.279,N,02349.517,E,008.7,075.7,110805,006.0,E*7E
+$GPRMB,A,1.41,L,T013,T012,6129.236,N,02346.327,E,001.9,235.6,-008.2,V*10
+$GPGGA,130419,6130.279,N,02349.518,E,1,08,2.2,110.9,M,20.7,M,,*40
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,2.2,2.2,1.0*3E
+$GPGSV,3,1,12,03,02,011,00,07,03,153,00,08,49,094,45,10,13,208,31*78
+$GPGSV,3,2,12,15,12,330,39,18,20,325,41,19,20,033,45,21,04,297,00*7C
+$GPGSV,3,3,12,26,60,275,39,27,18,092,41,28,63,140,44,29,69,244,42*7A
+$PGRME,7.9,M,10.6,M,13.2,M*27
+$GPGLL,6130.279,N,02349.518,E,130420,A*26
+$PGRMZ,364,f,3*1A
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,0000.000,N,00000.000,W,T015*39
+$GPRMC,130421,A,6130.279,N,02349.519,E,005.4,075.3,110805,006.0,E*71
+$GPRMB,A,1.41,L,T013,T012,6129.236,N,02346.327,E,001.9,235.6,-005.1,V*1E
+$GPGGA,130421,6130.279,N,02349.520,E,1,08,2.0,111.0,M,20.7,M,,*4A
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,2.4,2.0,1.3*39
+$GPGSV,3,1,12,03,02,011,00,07,03,153,00,08,49,094,45,10,13,208,31*78
+$GPGSV,3,2,12,15,12,330,39,18,20,325,41,19,20,033,45,21,04,297,00*7C
+$GPGSV,3,3,12,26,60,275,39,27,18,092,41,28,63,140,44,29,69,244,42*7A
+$PGRME,7.9,M,10.6,M,13.2,M*27
+$GPGLL,6130.279,N,02349.519,E,130421,A*26
+$PGRMZ,364,f,3*1A
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,0009.000,N,02430.650,E,T014*25
+$GPRMC,130422,A,6130.279,N,02349.519,E,001.4,075.9,110805,006.0,E*7C
+$GPRMB,A,1.41,L,T013,T012,6129.236,N,02346.327,E,001.9,235.6,-002.4,V*1C
+$GPGGA,130422,6130.279,N,02349.519,E,1,08,2.0,110.8,M,20.7,M,,*4A
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,2.4,2.0,1.3*39
+$GPGSV,3,1,12,03,02,011,00,07,03,153,00,08,49,094,46,10,13,208,31*7B
+$GPGSV,3,2,12,15,12,330,40,18,20,325,41,19,20,033,44,21,04,297,00*73
+$GPGSV,3,3,12,26,60,275,39,27,18,092,40,28,63,140,44,29,69,244,42*7B
+$PGRME,7.9,M,10.6,M,13.2,M*27
+$GPGLL,6130.279,N,02349.519,E,130423,A*24
+$PGRMZ,363,f,3*1D
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6123.285,N,02430.651,E,T013*23
+$GPRMC,130423,A,6130.279,N,02349.518,E,000.0,076.7,110805,006.0,E*74
+$GPRMB,A,1.41,L,T013,T012,6129.236,N,02346.327,E,001.9,235.6,,V*19
+$GPGGA,130423,6130.279,N,02349.518,E,1,08,2.0,110.6,M,20.7,M,,*44
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,2.4,2.0,1.3*39
+$GPGSV,3,1,12,03,02,011,00,07,03,153,00,08,49,094,47,10,13,208,30*7B
+$GPGSV,3,2,12,15,12,330,41,18,20,325,42,19,20,033,43,21,03,297,00*71
+$GPGSV,3,3,12,26,60,275,40,27,18,092,41,28,63,140,43,29,69,244,41*70
+$PGRME,7.9,M,10.6,M,13.2,M*27
+$GPGLL,6130.279,N,02349.518,E,130424,A*22
+$PGRMZ,362,f,3*1C
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6129.236,N,02346.327,E,T012*22
+$GPRMC,130425,A,6130.279,N,02349.518,E,000.0,076.7,110805,006.0,E*72
+$GPRMB,A,1.41,L,T013,T012,6129.236,N,02346.327,E,001.9,235.6,,V*19
+$GPGGA,130425,6130.279,N,02349.518,E,1,08,2.0,110.4,M,20.7,M,,*40
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,2.4,2.0,1.3*39
+$GPGSV,3,1,12,03,02,011,00,07,03,153,00,08,49,094,47,10,13,208,30*7B
+$GPGSV,3,2,12,15,12,330,41,18,20,325,43,19,20,033,42,21,03,297,00*71
+$GPGSV,3,3,12,26,60,275,40,27,18,092,41,28,63,140,43,29,69,244,41*70
+$PGRME,7.9,M,10.6,M,13.2,M*27
+$GPGLL,6130.279,N,02349.518,E,130425,A*23
+$PGRMZ,362,f,3*1C
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6114.236,N,02346.327,E,T011*2F
+$GPRMC,130426,A,6130.279,N,02349.518,E,000.0,076.7,110805,006.0,E*71
+$GPRMB,A,1.41,L,T013,T012,6129.236,N,02346.327,E,001.9,235.6,,V*19
+$GPGGA,130426,6130.279,N,02349.518,E,1,08,2.0,110.4,M,20.7,M,,*43
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,3.1,2.0,2.0*3D
+$GPGSV,3,1,12,03,02,011,00,07,03,153,00,08,49,094,47,10,13,208,30*7B
+$GPGSV,3,2,12,15,12,330,41,18,20,325,43,19,20,033,42,21,03,297,00*71
+$GPGSV,3,3,12,26,60,275,40,27,18,092,41,28,63,140,43,29,69,244,41*70
+$PGRME,7.9,M,10.6,M,13.2,M*27
+$GPGLL,6130.279,N,02349.518,E,130427,A*21
+$PGRMZ,362,f,3*1C
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6220.236,N,02346.327,E,T010*2A
+$GPRMC,130427,A,6130.279,N,02349.518,E,000.0,076.7,110805,006.0,E*70
+$GPRMB,A,1.41,L,T013,T012,6129.236,N,02346.327,E,001.9,235.6,,V*19
+$GPGGA,130427,6130.279,N,02349.518,E,1,08,2.0,110.4,M,20.7,M,,*42
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,3.1,2.0,2.0*3D
+$GPGSV,3,1,12,03,02,011,00,07,03,153,00,08,49,094,47,10,13,208,30*7B
+$GPGSV,3,2,12,15,12,330,41,18,20,325,43,19,20,033,42,21,03,297,00*71
+$GPGSV,3,3,12,26,60,275,41,27,18,092,42,28,63,140,43,29,69,244,41*72
+$PGRME,7.9,M,10.6,M,13.2,M*27
+$GPGLL,6130.279,N,02349.518,E,130428,A*2E
+$PGRMZ,363,f,3*1D
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6120.236,N,02346.327,E,T009*21
+$GPRMC,130428,A,6130.279,N,02349.518,E,000.0,076.7,110805,006.0,E*7F
+$GPRMB,A,1.41,L,T013,T012,6129.236,N,02346.327,E,001.9,235.6,,V*19
+$GPGGA,130429,6130.279,N,02349.518,E,1,08,2.0,110.5,M,20.7,M,,*4D
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,3.1,2.0,2.0*3D
+$GPGSV,3,1,12,03,02,011,00,07,03,153,00,08,49,094,47,10,13,208,30*7B
+$GPGSV,3,2,12,15,12,330,42,18,20,325,43,19,20,033,42,21,03,297,00*72
+$GPGSV,3,3,12,26,60,275,41,27,18,092,41,28,63,140,44,29,69,244,41*76
+$PGRME,7.9,M,10.6,M,13.2,M*27
+$GPGLL,6130.279,N,02349.518,E,130429,A*2F
+$PGRMZ,363,f,3*1D
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6129.234,N,02346.317,E,T008*28
+$GPRMC,130430,A,6130.279,N,02349.518,E,000.0,076.7,110805,006.0,E*76
+$GPRMB,A,1.41,L,T013,T012,6129.236,N,02346.327,E,001.9,235.6,,V*19
+$GPGGA,130430,6130.279,N,02349.518,E,1,08,2.0,110.5,M,20.7,M,,*45
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,3.1,2.0,2.0*3D
+$GPGSV,3,1,12,03,02,011,00,07,03,153,00,08,49,094,47,10,13,208,30*7B
+$GPGSV,3,2,12,15,12,330,42,18,20,325,43,19,20,033,42,21,03,297,00*72
+$GPGSV,3,3,12,26,60,275,41,27,18,092,41,28,63,140,44,29,69,244,41*76
+$PGRME,7.9,M,10.6,M,13.2,M*27
+$GPGLL,6130.279,N,02349.518,E,130431,A*26
+$PGRMZ,363,f,3*1D
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6157.564,N,02406.158,E,T007*26
+$GPRMC,130431,A,6130.279,N,02349.518,E,000.0,076.7,110805,006.0,E*77
+$GPRMB,A,1.41,L,T013,T012,6129.236,N,02346.327,E,001.9,235.6,,V*19
+$GPGGA,130431,6130.279,N,02349.518,E,1,08,2.0,110.3,M,20.7,M,,*42
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,3.2,2.0,2.1*3F
+$GPGSV,3,1,12,03,02,011,00,07,03,153,00,08,49,094,48,10,13,208,30*74
+$GPGSV,3,2,12,15,12,330,41,18,20,325,43,19,20,033,42,21,03,297,00*71
+$GPGSV,3,3,12,26,60,275,40,27,18,092,41,28,63,140,43,29,69,244,41*70
+$PGRME,7.9,M,10.6,M,13.2,M*27
+$GPGLL,6130.279,N,02349.518,E,130432,A*25
+$PGRMZ,362,f,3*1C
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6145.919,N,02345.544,E,T006*2B
+$GPRMC,130432,A,6130.279,N,02349.518,E,000.0,076.7,110805,006.0,E*74
+$GPRMB,A,1.41,L,T013,T012,6129.236,N,02346.327,E,001.9,235.6,,V*19
+$GPGGA,130433,6130.279,N,02349.518,E,1,08,2.3,110.2,M,20.7,M,,*42
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,3.8,2.3,2.7*30
+$GPGSV,3,1,12,03,02,011,00,07,03,153,00,08,49,094,47,10,13,208,30*7B
+$GPGSV,3,2,12,15,12,330,42,18,20,325,44,19,20,033,42,21,03,297,00*75
+$GPGSV,3,3,12,26,60,275,39,27,18,092,42,28,63,140,43,29,69,244,41*7D
+$PGRME,7.9,M,10.6,M,13.2,M*27
+$GPGLL,6130.279,N,02349.518,E,130433,A*24
+$PGRMZ,361,f,3*1F
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6130.198,N,02342.702,E,T005*2C
+$GPRMC,130434,A,6130.279,N,02349.518,E,000.0,076.7,110805,006.0,E*72
+$GPRMB,A,1.41,L,T013,T012,6129.236,N,02346.327,E,001.9,235.6,,V*19
+$GPGGA,130434,6130.279,N,02349.518,E,1,08,2.0,110.0,M,20.7,M,,*44
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,3.4,2.0,2.7*3F
+$GPGSV,3,1,12,03,02,011,00,07,03,153,00,08,49,094,47,10,13,208,30*7B
+$GPGSV,3,2,12,15,12,330,42,18,20,325,44,19,20,033,42,21,03,297,00*75
+$GPGSV,3,3,12,26,60,275,40,27,18,092,42,28,63,140,43,29,69,244,41*73
+$PGRME,7.8,M,10.6,M,13.2,M*26
+$GPGLL,6130.279,N,02349.518,E,130434,A*23
+$PGRMZ,361,f,3*1F
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6216.183,N,02619.685,E,T004*25
+$GPRMC,130435,A,6130.279,N,02349.518,E,000.0,076.7,110805,006.0,E*73
+$GPRMB,A,1.41,L,T013,T012,6129.236,N,02346.327,E,001.9,235.6,,V*19
+$GPGGA,130435,6130.279,N,02349.518,E,1,08,2.0,109.9,M,20.7,M,,*44
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,3.4,2.0,2.7*3F
+$GPGSV,3,1,12,03,02,011,00,07,03,153,00,08,49,094,47,10,13,208,30*7B
+$GPGSV,3,2,12,15,12,330,42,18,20,325,44,19,20,033,42,21,03,297,00*75
+$GPGSV,3,3,12,26,60,275,40,27,18,092,42,28,63,140,43,29,69,244,41*73
+$PGRME,7.8,M,10.6,M,13.2,M*26
+$GPGLL,6130.279,N,02349.518,E,130436,A*21
+$PGRMZ,361,f,3*1F
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6215.064,N,02603.837,E,T003*25
+$GPRMC,130436,A,6130.279,N,02349.518,E,000.0,076.7,110805,006.0,E*70
+$GPRMB,A,1.41,L,T013,T012,6129.236,N,02346.327,E,001.9,235.6,,V*19
+$GPGGA,130436,6130.279,N,02349.518,E,1,08,2.0,109.9,M,20.7,M,,*47
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,3.4,2.0,2.7*3F
+$GPGSV,3,1,12,03,02,011,00,07,03,153,00,08,49,094,47,10,13,208,30*7B
+$GPGSV,3,2,12,15,12,330,42,18,20,325,44,19,20,033,42,21,03,297,00*75
+$GPGSV,3,3,12,26,60,275,40,27,18,092,42,28,63,140,43,29,69,244,42*70
+$PGRME,7.8,M,10.6,M,13.2,M*26
+$GPGLL,6130.279,N,02349.518,E,130437,A*20
+$PGRMZ,361,f,3*1F
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6151.098,N,02510.924,E,T002*26
+$GPRMC,130437,A,6130.279,N,02349.518,E,000.0,076.7,110805,006.0,E*71
+$GPRMB,A,1.41,L,T013,T012,6129.236,N,02346.327,E,001.9,235.6,,V*19
+$GPGGA,130438,6130.279,N,02349.518,E,1,08,2.0,109.9,M,20.7,M,,*49
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,3.4,2.0,2.7*3F
+$GPGSV,3,1,12,03,02,011,00,07,03,153,00,08,49,094,47,10,13,208,30*7B
+$GPGSV,3,2,12,15,12,330,42,18,20,325,44,19,20,033,43,21,03,297,00*74
+$GPGSV,3,3,12,26,60,275,40,27,18,092,42,28,63,140,44,29,69,244,42*77
+$PGRME,7.8,M,10.6,M,13.2,M*26
+$GPGLL,6130.279,N,02349.518,E,130438,A*2F
+$PGRMZ,360,f,3*1E
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6129.271,N,02346.376,E,T001*27
+$GPRMC,130439,A,6130.279,N,02349.520,E,000.0,076.7,110805,006.0,E*74
+$GPRMB,A,1.41,L,T013,T012,6129.236,N,02346.327,E,001.9,235.6,,V*19
+$GPGGA,130439,6130.279,N,02349.520,E,1,08,2.0,109.8,M,20.7,M,,*42
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,3.4,2.0,2.7*3F
+$GPGSV,3,1,12,03,02,011,00,07,03,153,00,08,49,094,47,10,13,208,30*7B
+$GPGSV,3,2,12,15,12,330,41,18,20,325,43,19,20,033,43,21,03,297,00*70
+$GPGSV,3,3,12,26,60,275,41,27,18,092,42,28,63,140,44,29,69,244,42*76
+$PGRME,7.8,M,10.6,M,13.2,M*26
+$GPGLL,6130.279,N,02349.520,E,130439,A*25
+$PGRMZ,360,f,3*1E
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPRTE,4,1,c,0,T030,T029,T028,T027,T026,T025,T024,T023,T022*49
+$GPRTE,4,2,c,0,T021,T020,T019,T018,T017,T016,T015,T014,T013*4B
+$GPRTE,4,3,c,0,T012,T011,T010,T009,T008,T007,T006,T005,T004*4B
+$GPRTE,4,4,c,0,T003,T002,T001*4F
+$GPWPL,6016.083,N,02452.500,E,T030*22
+$GPRMC,130441,A,6130.280,N,02349.524,E,000.0,076.7,110805,006.0,E*79
+$GPRMB,A,1.41,L,T013,T012,6129.236,N,02346.327,E,001.9,235.7,,V*18
+$GPGGA,130441,6130.280,N,02349.524,E,1,08,2.2,109.8,M,20.7,M,,*4D
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,3.8,2.2,3.1*36
+$GPGSV,3,1,12,03,02,011,00,07,03,153,00,08,49,094,46,10,13,208,30*7A
+$GPGSV,3,2,12,15,12,330,41,18,20,325,44,19,20,033,41,21,03,297,00*75
+$GPGSV,3,3,12,26,60,275,42,27,18,092,42,28,63,140,44,29,69,244,43*74
+$PGRME,7.8,M,10.6,M,13.2,M*26
+$GPGLL,6130.283,N,02349.531,E,130441,A*2F
+$PGRMZ,361,f,3*1F
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6123.283,N,02430.650,E,T029*2D
+$GPRMC,130442,A,6130.284,N,02349.533,E,009.3,046.0,110805,006.0,E*76
+$GPRMB,A,1.42,L,T013,T012,6129.236,N,02346.327,E,001.9,235.6,-009.2,V*12
+$GPGGA,130442,6130.285,N,02349.531,E,1,08,2.3,110.0,M,20.7,M,,*4E
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,3.9,2.3,3.2*35
+$GPGSV,3,1,12,03,02,011,00,07,03,153,00,08,49,094,45,10,13,208,30*79
+$GPGSV,3,2,12,15,12,330,41,18,20,325,45,19,20,033,40,21,03,297,00*75
+$GPGSV,3,3,12,26,60,275,43,27,18,092,42,28,63,140,44,29,69,244,43*75
+$PGRME,7.8,M,10.6,M,13.2,M*26
+$GPGLL,6130.286,N,02349.533,E,130443,A*2A
+$PGRMZ,361,f,3*1F
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6023.283,N,02430.650,E,T028*2D
+$GPRMC,130443,A,6130.289,N,02349.532,E,009.9,013.3,110805,006.0,E*72
+$GPRMB,A,1.42,L,T013,T012,6129.236,N,02346.327,E,001.9,235.5,-008.3,V*11
+$GPGGA,130443,6130.289,N,02349.532,E,1,08,2.4,110.1,M,20.7,M,,*46
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,2.9,2.4,1.0*33
+$GPGSV,3,1,12,03,02,011,00,07,03,153,00,08,49,094,44,10,13,208,30*78
+$GPGSV,3,2,12,15,12,330,41,18,20,325,44,19,20,033,40,21,03,297,00*74
+$GPGSV,3,3,12,26,61,273,44,27,18,092,41,28,63,140,45,29,69,244,43*77
+$PGRME,7.8,M,10.5,M,13.1,M*26
+$GPGLL,6130.291,N,02349.533,E,130444,A*2B
+$PGRMZ,361,f,3*1F
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6123.283,N,02430.650,E,T027*23
+$GPRMC,130444,A,6130.292,N,02349.532,E,009.4,359.8,110805,006.0,E*74
+$GPRMB,A,1.43,L,T013,T012,6129.236,N,02346.327,E,001.9,235.4,-007.3,V*1E
+$GPGGA,130444,6130.293,N,02349.532,E,1,08,2.1,110.1,M,20.7,M,,*4F
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,3.0,2.1,1.2*3C
+$GPGSV,3,1,12,03,02,011,00,07,03,153,00,08,49,094,42,10,13,208,30*7E
+$GPGSV,3,2,12,15,12,330,39,18,20,325,42,19,20,033,40,21,03,297,00*7D
+$GPGSV,3,3,12,26,61,273,46,27,18,092,40,28,63,140,43,29,69,244,44*75
+$PGRME,7.9,M,10.6,M,13.2,M*27
+$GPGLL,6130.294,N,02349.532,E,130445,A*2E
+$PGRMZ,361,f,3*1F
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6017.083,N,02452.500,E,T026*24
+$GPRMC,130445,A,6130.296,N,02349.532,E,009.4,359.8,110805,006.0,E*71
+$GPRMB,A,1.43,L,T013,T012,6129.236,N,02346.327,E,001.9,235.3,-005.3,V*1B
+$GPGGA,130445,6130.297,N,02349.531,E,1,08,2.1,110.0,M,20.7,M,,*48
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,3.1,2.1,1.4*3B
+$GPGSV,3,1,12,03,02,011,00,07,03,153,00,08,49,094,42,10,13,208,30*7E
+$GPGSV,3,2,12,15,12,330,38,18,20,325,41,19,20,033,41,21,03,297,00*7E
+$GPGSV,3,3,12,26,61,273,46,27,18,092,41,28,63,140,43,29,69,244,45*75
+$PGRME,8.0,M,10.9,M,13.5,M*29
+$GPGLL,6130.298,N,02349.530,E,130445,A*20
+$PGRMZ,360,f,3*1E
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6017.083,S,02453.500,E,T025*3B
+$GPRMC,130447,A,6130.300,N,02349.530,E,010.7,353.3,110805,006.0,E*75
+$GPRMB,A,1.43,L,T013,T012,6129.236,N,02346.327,E,001.9,235.2,-005.0,V*19
+$GPGGA,130447,6130.300,N,02349.530,E,1,08,2.1,109.8,M,20.7,M,,*44
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,3.5,2.3,1.9*30
+$GPGSV,3,1,12,03,02,011,00,07,03,153,00,08,49,094,41,10,13,208,30*7D
+$GPGSV,3,2,12,15,12,330,38,18,20,325,41,19,20,033,42,21,03,297,00*7D
+$GPGSV,3,3,12,26,61,273,47,27,18,093,40,28,63,140,42,29,69,244,46*76
+$PGRME,8.8,M,12.3,M,15.1,M*2B
+$GPGLL,6130.303,N,02349.529,E,130447,A*29
+$PGRMZ,359,f,3*14
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6018.083,N,02453.500,E,T024*28
+$GPRMC,130448,A,6130.307,N,02349.526,E,016.7,346.5,110805,006.0,E*7E
+$GPRMB,A,1.44,L,T013,T012,6129.236,N,02346.327,E,001.9,235.0,-006.1,V*1E
+$GPGGA,130448,6130.307,N,02349.525,E,1,08,1.4,109.2,M,20.7,M,,*44
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,1.4,1.4,1.0*3E
+$GPGSV,3,1,12,03,02,011,00,07,03,153,00,08,49,094,40,10,13,208,30*7C
+$GPGSV,3,2,12,15,12,330,36,18,20,325,40,19,20,033,43,21,03,297,00*73
+$GPGSV,3,3,12,26,61,273,47,27,18,093,38,28,63,140,43,29,69,244,46*78
+$PGRME,10.0,M,14.6,M,17.7,M*1D
+$GPGLL,6130.310,N,02349.524,E,130449,A*28
+$PGRMZ,358,f,3*15
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6017.083,N,02452.500,W,T023*33
+$GPRMC,130449,A,6130.313,N,02349.523,E,017.7,346.3,110805,006.0,E*78
+$GPRMB,A,1.45,L,T013,T012,6129.236,N,02346.327,E,001.9,234.8,-006.5,V*12
+$GPGGA,130449,6130.314,N,02349.522,E,1,08,1.8,109.0,M,20.7,M,,*4E
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,2.3,1.8,1.8*3E
+$GPGSV,3,1,12,03,02,011,00,07,03,153,00,08,49,094,41,10,13,208,30*7D
+$GPGSV,3,2,12,15,12,330,35,18,20,325,40,19,20,033,42,21,03,297,00*71
+$GPGSV,3,3,12,26,61,273,48,27,18,093,38,28,63,140,43,29,69,244,46*77
+$PGRME,10.0,M,14.6,M,17.7,M*1D
+$GPGLL,6130.317,N,02349.521,E,130450,A*22
+$PGRMZ,358,f,3*15
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6017.083,N,02555.500,E,T022*26
+$GPRMC,130450,A,6130.318,N,02349.519,E,016.5,344.3,110805,006.0,E*73
+$GPRMB,A,1.45,L,T013,T012,6129.236,N,02346.327,E,001.9,234.6,-006.5,V*1C
+$GPGGA,130450,6130.319,N,02349.518,E,1,08,2.9,107.8,M,20.7,M,,*46
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,5.0,2.9,4.2*37
+$GPGSV,3,1,12,03,02,011,00,07,03,153,00,08,49,094,41,10,13,208,30*7D
+$GPGSV,3,2,12,15,12,330,34,18,20,325,39,19,20,033,41,21,03,297,00*7D
+$GPGSV,3,3,12,26,61,273,48,27,18,093,37,28,63,138,43,29,69,244,46*77
+$PGRME,14.3,M,23.8,M,27.9,M*1D
+$GPGLL,6130.322,N,02349.517,E,130451,A*20
+$PGRMZ,350,f,3*1D
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6017.083,N,02452.500,E,T021*23
+$GPRMC,130452,A,6130.325,N,02349.516,E,017.4,346.9,110805,006.0,E*78
+$GPRMB,A,1.46,L,T013,T012,6129.236,N,02346.327,E,001.9,234.4,-006.3,V*1B
+$GPGGA,130452,6130.326,N,02349.516,E,1,08,1.6,108.0,M,20.7,M,,*4D
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,1.6,1.6,1.0*3E
+$GPGSV,3,1,12,03,02,011,00,07,03,153,00,08,49,094,41,10,13,208,30*7D
+$GPGSV,3,2,12,15,12,330,33,18,20,325,37,19,20,033,43,21,03,297,00*76
+$GPGSV,3,3,12,26,61,273,48,27,18,093,36,28,63,138,41,29,69,244,46*74
+$PGRME,14.9,M,25.0,M,29.2,M*1C
+$GPGLL,6130.329,N,02349.515,E,130453,A*2B
+$PGRMZ,354,f,3*19
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6116.083,N,02452.500,E,T020*22
+$GPRMC,130453,A,6130.331,N,02349.513,E,017.4,346.9,110805,006.0,E*79
+$GPRMB,A,1.46,L,T013,T012,6129.236,N,02346.327,E,001.9,234.3,-006.7,V*18
+$GPGGA,130453,6130.332,N,02349.513,E,1,08,1.6,107.9,M,20.7,M,,*4A
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,1.6,1.6,1.0*3E
+$GPGSV,3,1,12,03,02,011,00,07,03,153,00,08,49,094,41,10,13,208,30*7D
+$GPGSV,3,2,12,15,12,330,33,18,20,325,36,19,20,033,44,21,03,297,00*70
+$GPGSV,3,3,12,26,61,273,48,27,18,093,35,28,63,138,41,29,69,244,47*76
+$PGRME,18.8,M,33.2,M,38.3,M*15
+$GPGLL,6130.335,N,02349.512,E,130453,A*21
+$PGRMZ,349,f,3*15
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6016.083,S,02452.500,E,T019*34
+$GPRMC,130455,A,6130.337,N,02349.511,E,017.3,347.8,110805,006.0,E*7C
+$GPRMB,A,1.47,L,T013,T012,6129.236,N,02346.327,E,001.9,234.1,-007.0,V*1D
+$GPGGA,130455,6130.338,N,02349.510,E,1,08,2.8,106.3,M,20.7,M,,*43
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,4.5,2.8,3.6*31
+$GPGSV,3,1,12,03,02,011,00,07,03,153,00,08,49,094,41,10,13,208,31*7C
+$GPGSV,3,2,12,15,12,330,33,18,20,325,36,19,20,033,44,21,03,297,00*70
+$GPGSV,3,3,12,26,61,273,47,27,18,093,35,28,63,138,40,29,69,241,47*7D
+$PGRME,18.8,M,33.2,M,38.3,M*15
+$GPGLL,6130.340,N,02349.508,E,130455,A*2E
+$PGRMZ,340,f,3*1C
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6016.083,N,02452.500,E,T018*28
+$GPRMC,130456,A,6130.343,N,02349.507,E,017.7,346.0,110805,006.0,E*76
+$GPRMB,A,1.47,L,T013,T012,6129.236,N,02346.327,E,001.9,233.9,-006.6,V*15
+$GPGGA,130456,6130.343,N,02349.507,E,1,08,2.9,103.3,M,20.7,M,,*4E
+$GPGSA,A,3,,,08,,15,18,19,,26,,28,29,4.8,2.9,3.8*36
+$GPGSV,3,1,12,03,02,011,00,07,03,153,00,08,49,094,40,10,13,208,31*7D
+$GPGSV,3,2,12,15,12,330,33,18,20,325,35,19,20,033,44,21,03,297,00*73
+$GPGSV,3,3,12,26,61,273,47,27,18,093,34,28,63,138,39,29,69,241,47*72
+$PGRME,16.6,M,25.5,M,30.4,M*1A
+$GPGLL,6130.346,N,02349.505,E,130457,A*27
+$PGRMZ,339,f,3*12
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6013.283,N,02456.650,E,T017*22
+$GPRMC,130457,A,6130.349,N,02349.504,E,017.7,346.0,110805,006.0,E*7E
+$GPRMB,A,1.48,L,T013,T012,6129.236,N,02346.327,E,001.9,233.7,-006.6,V*14
+$GPGGA,130457,6130.350,N,02349.503,E,1,07,2.9,103.2,M,20.7,M,,*47
+$GPGSA,A,3,,,08,,15,18,19,,26,,28,29,5.0,3.0,4.1*39
+$GPGSV,3,1,12,03,02,011,00,07,03,153,00,08,49,094,39,10,13,208,31*73
+$GPGSV,3,2,12,15,12,330,35,18,20,325,37,19,20,033,43,21,03,297,00*70
+$GPGSV,3,3,12,26,61,273,47,27,18,093,32,28,63,138,39,29,69,241,47*74
+$PGRME,15.9,M,25.0,M,29.6,M*19
+$GPGLL,6130.352,N,02349.502,E,130457,A*25
+$PGRMZ,337,f,3*1C
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6123.283,N,02430.650,E,T016*21
+$GPRMC,130458,A,6130.354,N,02349.500,E,017.3,345.0,110805,006.0,E*7E
+$GPRMB,A,1.48,L,T013,T012,6129.236,N,02346.327,E,001.9,233.6,-006.6,V*15
+$GPGGA,130458,6130.355,N,02349.500,E,1,07,3.3,102.5,M,20.7,M,,*43
+$GPGSA,A,3,,,08,,15,18,19,,26,,28,29,5.1,3.3,1.0*3F
+$GPGSV,3,1,12,03,02,011,00,07,03,153,00,08,49,094,38,10,13,208,30*73
+$GPGSV,3,2,12,15,12,330,37,18,20,325,36,19,20,033,43,21,03,297,00*73
+$GPGSV,3,3,12,26,61,273,47,27,18,093,35,28,63,138,40,29,69,241,47*7D
+$PGRME,8.6,M,11.8,M,14.6,M*2B
+$GPGLL,6130.357,N,02349.495,E,130459,A*21
+$PGRMZ,337,f,3*1C
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,0000.000,N,00000.000,W,T015*39
+$GPRMC,130500,A,6130.359,N,02349.493,E,015.0,328.3,110805,006.0,E*7D
+$GPRMB,A,1.49,L,T013,T012,6129.236,N,02346.327,E,001.9,233.4,-001.3,V*14
+$GPGGA,130500,6130.360,N,02349.492,E,1,07,2.5,102.6,M,20.7,M,,*47
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,3.9,2.5,1.0*33
+$GPGSV,3,1,12,03,02,011,00,07,03,153,00,08,49,094,38,10,13,208,30*73
+$GPGSV,3,2,12,15,12,330,37,18,20,325,38,19,20,033,43,21,03,297,00*7D
+$GPGSV,3,3,12,26,61,273,47,27,18,093,35,28,63,138,40,29,69,241,47*7D
+$PGRME,9.3,M,13.2,M,16.1,M*22
+$GPGLL,6130.361,N,02349.486,E,130500,A*2B
+$PGRMZ,336,f,3*1D
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,0009.000,N,02430.650,E,T014*25
+$GPRMC,130500,A,6130.363,N,02349.483,E,015.8,318.5,110805,006.0,E*78
+$GPRMB,A,1.49,L,T013,T012,6129.236,N,02346.327,E,001.9,233.2,001.3,V*3F
+$GPGGA,130501,6130.363,N,02349.481,E,1,08,2.5,102.4,M,20.7,M,,*4A
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,3.9,2.5,1.0*33
+$GPGSV,3,1,12,03,02,011,00,07,03,153,00,08,49,094,37,10,13,208,30*7C
+$GPGSV,3,2,12,15,12,330,37,18,20,325,40,19,20,033,43,21,03,297,00*72
+$GPGSV,3,3,12,26,61,273,48,27,18,093,34,28,63,138,41,29,69,241,49*7C
+$PGRME,10.0,M,14.4,M,17.6,M*1E
+$GPGLL,6130.363,N,02349.472,E,130501,A*23
+$PGRMZ,335,f,3*1E
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6123.285,N,02430.651,E,T013*23
+$GPRMC,130502,A,6130.365,N,02349.468,E,016.5,305.6,110805,006.0,E*78
+$GPRMB,A,1.49,L,T013,T012,6129.236,N,02346.327,E,001.9,233.0,005.0,V*3A
+$GPGGA,130502,6130.365,N,02349.467,E,1,08,2.5,102.2,M,20.7,M,,*41
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,3.9,2.5,1.0*33
+$GPGSV,3,1,12,03,02,011,00,07,03,153,00,08,49,094,37,10,13,208,30*7C
+$GPGSV,3,2,12,15,12,330,36,18,20,325,40,19,20,033,43,21,03,297,00*73
+$GPGSV,3,3,12,26,61,273,48,27,18,093,33,28,63,138,41,29,69,241,49*7B
+$PGRME,8.4,M,11.5,M,14.3,M*21
+$GPGLL,6130.365,N,02349.458,E,130502,A*2E
+$PGRMZ,336,f,3*1D
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6129.236,N,02346.327,E,T012*22
+$GPRMC,130504,A,6130.366,N,02349.453,E,017.7,290.6,110805,006.0,E*7B
+$GPRMB,A,1.49,L,T013,T012,6129.236,N,02346.327,E,001.9,232.9,009.5,V*3B
+$GPGGA,130504,6130.367,N,02349.452,E,1,08,2.3,102.2,M,20.7,M,,*45
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,4.0,2.3,1.7*3C
+$GPGSV,3,1,12,03,02,011,00,07,03,153,00,08,49,094,36,10,13,208,30*7D
+$GPGSV,3,2,12,15,12,330,35,18,20,325,41,19,20,033,43,21,03,297,00*71
+$GPGSV,3,3,12,26,61,273,49,27,18,093,33,28,63,138,42,29,69,241,49*79
+$PGRME,9.2,M,12.9,M,15.9,M*22
+$GPGLL,6130.368,N,02349.447,E,130505,A*2A
+$PGRMZ,335,f,3*1E
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6114.236,N,02346.327,E,T011*2F
+$GPRMC,130505,A,6130.369,N,02349.444,E,015.2,299.1,110805,006.0,E*7A
+$GPRMB,A,1.49,L,T013,T012,6129.236,N,02346.327,E,001.9,232.7,006.1,V*3E
+$GPGGA,130505,6130.370,N,02349.444,E,1,08,2.5,102.2,M,20.7,M,,*43
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,4.4,2.5,2.2*38
+$GPGSV,3,1,12,03,02,011,00,07,03,153,00,08,49,094,37,10,13,208,31*7D
+$GPGSV,3,2,12,15,12,330,39,18,20,325,39,19,20,033,42,21,03,297,00*73
+$GPGSV,3,3,12,26,61,273,48,27,18,093,32,28,63,138,42,29,69,241,48*78
+$PGRME,9.9,M,14.2,M,17.3,M*2C
+$GPGLL,6130.372,N,02349.441,E,130505,A*27
+$PGRMZ,335,f,3*1E
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6220.236,N,02346.327,E,T010*2A
+$GPRMC,130506,A,6130.376,N,02349.443,E,015.8,336.9,110805,006.0,E*76
+$GPRMB,A,1.50,L,T013,T012,6129.236,N,02346.327,E,001.9,232.5,-003.9,V*14
+$GPGGA,130507,6130.377,N,02349.442,E,1,08,2.5,102.2,M,20.7,M,,*40
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,2.5,2.5,1.0*3E
+$GPGSV,3,1,12,03,02,011,00,07,03,153,00,08,49,094,37,10,13,208,31*7D
+$GPGSV,3,2,12,15,12,330,39,18,20,325,39,19,20,033,42,21,03,297,00*73
+$GPGSV,3,3,12,26,61,273,48,27,18,093,32,28,63,138,41,29,69,241,48*7B
+$PGRME,8.4,M,11.5,M,14.3,M*21
+$GPGLL,6130.381,N,02349.441,E,130507,A*29
+$PGRMZ,335,f,3*1E
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6120.236,N,02346.327,E,T009*21
+$GPRMC,130508,A,6130.383,N,02349.440,E,016.9,342.9,110805,006.0,E*70
+$GPRMB,A,1.50,L,T013,T012,6129.236,N,02346.327,E,001.9,232.3,-005.9,V*14
+$GPGGA,130508,6130.384,N,02349.439,E,1,08,2.5,102.0,M,20.7,M,,*4D
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,2.5,2.5,1.0*3E
+$GPGSV,3,1,12,03,02,011,00,07,03,153,00,08,49,094,37,10,13,208,30*7C
+$GPGSV,3,2,12,15,12,330,38,18,20,325,38,19,20,033,43,21,03,297,00*72
+$GPGSV,3,3,12,26,61,273,48,27,18,093,33,28,63,138,41,29,69,241,48*7A
+$PGRME,8.4,M,11.5,M,14.3,M*21
+$GPGLL,6130.386,N,02349.438,E,130508,A*2F
+$PGRMZ,334,f,3*1F
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6129.234,N,02346.317,E,T008*28
+$GPRMC,130508,A,6130.390,N,02349.437,E,017.9,344.9,110805,006.0,E*75
+$GPRMB,A,1.51,L,T013,T012,6129.236,N,02346.327,E,001.9,232.2,-006.9,V*17
+$GPGGA,130509,6130.391,N,02349.436,E,1,08,1.9,101.9,M,20.7,M,,*42
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,1.9,1.9,1.0*3E
+$GPGSV,3,1,12,03,02,011,00,07,03,153,00,08,49,094,36,10,13,208,31*7C
+$GPGSV,3,2,12,15,12,330,38,18,20,325,37,19,20,033,42,21,03,297,00*7C
+$GPGSV,3,3,12,26,61,273,48,27,18,093,32,28,63,138,41,29,69,241,48*7B
+$PGRME,7.8,M,10.5,M,13.1,M*26
+$GPGLL,6130.394,N,02349.435,E,130509,A*20
+$PGRMZ,335,f,3*1E
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6157.564,N,02406.158,E,T007*26
+$GPRMC,130509,A,6130.397,N,02349.434,E,018.8,348.0,110805,006.0,E*7B
+$GPRMB,A,1.52,L,T013,T012,6129.236,N,02346.327,E,001.9,232.0,-008.2,V*13
+$GPGGA,130511,6130.398,N,02349.434,E,1,08,2.2,102.2,M,20.7,M,,*40
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,2.5,2.2,1.5*3C
+$GPGSV,3,1,12,03,02,011,00,07,03,153,00,08,49,094,36,10,13,208,32*7F
+$GPGSV,3,2,12,15,12,330,37,18,20,325,36,19,20,033,41,21,03,297,00*71
+$GPGSV,3,3,12,26,61,273,48,27,18,093,35,28,63,138,41,29,69,241,48*7C
+$PGRME,9.7,M,12.3,M,15.8,M*2C
+$GPGLL,6130.401,N,02349.433,E,130511,A*24
+$PGRMZ,336,f,3*1D
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6145.919,N,02345.544,E,T006*2B
+$GPRMC,130512,A,6130.404,N,02349.432,E,018.7,349.0,110805,006.0,E*74
+$GPRMB,A,1.52,L,T013,T012,6129.236,N,02346.327,E,001.9,231.8,-008.5,V*1F
+$GPGGA,130512,6130.405,N,02349.431,E,1,08,2.4,102.5,M,20.7,M,,*44
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,2.9,2.4,1.8*3B
+$GPGSV,3,1,12,03,02,011,00,07,03,153,00,08,49,094,36,10,13,208,33*7E
+$GPGSV,3,2,12,15,12,330,36,18,20,325,35,19,20,033,40,21,03,297,00*72
+$GPGSV,3,3,12,26,61,273,48,27,18,093,36,28,63,138,41,29,69,241,48*7F
+$PGRME,10.2,M,12.7,M,16.3,M*1D
+$GPGLL,6130.408,N,02349.430,E,130512,A*2D
+$PGRMZ,338,f,3*13
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6130.198,N,02342.702,E,T005*2C
+$GPRMC,130513,A,6130.410,N,02349.429,E,018.6,349.4,110805,006.0,E*7F
+$GPRMB,A,1.53,L,T013,T012,6129.236,N,02346.327,E,001.9,231.6,-008.6,V*13
+$GPGGA,130513,6130.411,N,02349.429,E,1,08,2.5,103.0,M,20.7,M,,*4C
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,3.1,2.5,2.0*38
+$GPGSV,3,1,12,03,02,011,00,07,03,153,00,08,49,094,37,10,13,208,33*7F
+$GPGSV,3,2,12,15,12,330,36,18,20,325,34,19,20,033,40,21,03,297,00*73
+$GPGSV,3,3,12,26,61,273,48,27,18,093,35,28,63,138,40,29,69,241,47*72
+$PGRME,10.2,M,12.7,M,16.3,M*1D
+$GPGLL,6130.414,N,02349.428,E,130513,A*28
+$PGRMZ,338,f,3*13
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6216.183,N,02619.685,E,T004*25
+$GPRMC,130513,A,6130.417,N,02349.427,E,018.6,349.4,110805,006.0,E*76
+$GPRMB,A,1.53,L,T013,T012,6129.236,N,02346.327,E,001.9,231.4,-008.6,V*11
+$GPGGA,130513,6130.418,N,02349.426,E,1,08,2.5,103.0,M,20.7,M,,*4A
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,3.1,2.5,2.0*38
+$GPGSV,3,1,12,03,02,011,00,07,03,153,00,08,49,094,36,10,13,208,32*7F
+$GPGSV,3,2,12,15,12,330,35,18,20,325,34,19,20,033,38,21,03,297,00*7F
+$GPGSV,3,3,12,26,61,273,47,27,18,093,34,28,63,138,40,29,69,241,47*7C
+$PGRME,11.2,M,15.0,M,18.8,M*19
+$GPGLL,6130.420,N,02349.425,E,130513,A*22
+$PGRMZ,332,f,3*19
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6215.064,N,02603.837,E,T003*25
+$GPRMC,130513,A,6130.422,N,02349.424,E,017.9,349.6,110805,006.0,E*71
+$GPRMB,A,1.54,L,T013,T012,6129.236,N,02346.327,E,001.9,231.3,-008.5,V*12
+$GPGGA,130513,6130.423,N,02349.424,E,1,08,2.8,101.1,M,20.7,M,,*4E
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,3.9,2.8,2.7*3A
+$GPGSV,3,1,12,03,02,011,00,07,03,153,00,08,49,094,35,10,13,208,32*7C
+$GPGSV,3,2,12,15,12,330,34,18,20,325,34,19,20,033,38,21,03,297,00*7E
+$GPGSV,3,3,12,26,61,273,48,27,18,093,34,28,63,138,41,29,69,241,47*72
+$PGRME,11.2,M,15.0,M,18.8,M*19
+$GPGLL,6130.427,N,02349.423,E,130513,A*23
+$PGRMZ,332,f,3*19
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6151.098,N,02510.924,E,T002*26
+$GPRMC,130516,A,6130.429,N,02349.422,E,017.9,349.6,110805,006.0,E*79
+$GPRMB,A,1.55,L,T013,T012,6129.236,N,02346.327,E,001.9,231.1,-008.5,V*11
+$GPGGA,130516,6130.430,N,02349.421,E,1,08,2.8,101.2,M,20.7,M,,*4F
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,3.9,2.8,2.7*3A
+$GPGSV,3,1,12,03,02,011,00,07,03,153,00,08,49,094,35,10,13,208,34*7A
+$GPGSV,3,2,12,15,12,330,34,18,20,325,33,19,20,033,37,21,03,297,00*76
+$GPGSV,3,3,12,26,61,273,47,27,18,093,34,28,63,138,41,29,69,241,47*7D
+$PGRME,11.7,M,15.1,M,16.2,M*19
+$GPGLL,6130.433,N,02349.420,E,130516,A*20
+$PGRMZ,332,f,3*19
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6129.271,N,02346.376,E,T001*27
+$GPRMC,130516,A,6130.435,N,02349.420,E,018.2,351.1,110805,006.0,E*7C
+$GPRMB,A,1.55,L,T013,T012,6129.236,N,02346.327,E,001.9,230.9,-009.1,V*1D
+$GPGGA,130516,6130.437,N,02349.419,E,1,08,2.9,101.2,M,20.7,M,,*42
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,3.9,2.9,1.0*3F
+$GPGSV,3,1,12,03,01,011,00,07,03,153,00,08,49,094,34,10,13,208,32*7E
+$GPGSV,3,2,12,15,12,330,33,18,20,325,33,19,20,033,36,21,03,297,00*70
+$GPGSV,3,3,12,26,61,273,48,27,18,093,33,28,63,138,42,29,69,241,48*79
+$PGRME,11.7,M,15.1,M,16.2,M*19
+$GPGLL,6130.440,N,02349.418,E,130518,A*21
+$PGRMZ,332,f,3*19
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPRTE,4,1,c,0,T030,T029,T028,T027,T026,T025,T024,T023,T022*49
+$GPRTE,4,2,c,0,T021,T020,T019,T018,T017,T016,T015,T014,T013*4B
+$GPRTE,4,3,c,0,T012,T011,T010,T009,T008,T007,T006,T005,T004*4B
+$GPRTE,4,4,c,0,T003,T002,T001*4F
+$GPWPL,6016.083,N,02452.500,E,T030*22
+$GPRMC,130520,A,6130.440,N,02349.404,E,016.3,318.7,110805,006.0,E*79
+$GPRMB,A,1.55,L,T013,T012,6129.236,N,02346.327,E,001.9,230.7,000.6,V*30
+$GPGGA,130520,6130.440,N,02349.403,E,1,08,3.0,101.2,M,20.7,M,,*44
+$GPGSA,A,3,,,08,,,18,19,,26,27,28,29,3.9,3.0,1.0*33
+$GPGSV,3,1,12,03,01,011,00,07,03,153,00,08,49,094,34,10,13,208,32*7E
+$GPGSV,3,2,12,15,12,330,33,18,20,325,32,19,20,033,35,21,03,297,00*72
+$GPGSV,3,3,12,26,61,273,48,27,18,093,34,28,63,138,42,29,69,241,48*7E
+$PGRME,11.7,M,15.1,M,16.2,M*19
+$GPGLL,6130.443,N,02349.398,E,130520,A*26
+$PGRMZ,332,f,3*19
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6123.283,N,02430.650,E,T029*2D
+$GPRMC,130520,A,6130.439,N,02349.388,E,017.1,284.5,110805,006.0,E*71
+$GPRMB,A,1.55,L,T013,T012,6129.236,N,02346.327,E,001.9,230.5,010.1,V*34
+$GPGGA,130520,6130.440,N,02349.385,E,1,07,4.6,101.6,M,20.7,M,,*47
+$GPGSA,A,3,,,08,,,18,19,,26,27,28,29,6.0,4.6,2.6*3B
+$GPGSV,3,1,12,03,01,011,00,07,03,153,00,08,49,094,34,10,13,208,31*7D
+$GPGSV,3,2,12,15,12,330,32,18,20,325,38,19,20,033,34,21,03,297,00*78
+$GPGSV,3,3,12,26,61,273,48,27,18,093,33,28,63,138,43,29,69,241,48*78
+$PGRME,13.9,M,15.4,M,20.8,M*1F
+$GPGLL,6130.442,N,02349.381,E,130522,A*2D
+$PGRMZ,341,f,3*1D
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6023.283,N,02430.650,E,T028*2D
+$GPRMC,130522,A,6130.443,N,02349.377,E,015.5,297.9,110805,006.0,E*76
+$GPRMB,A,1.55,L,T013,T012,6129.236,N,02346.327,E,001.9,230.4,005.9,V*39
+$GPGGA,130522,6130.443,N,02349.375,E,1,07,3.6,104.2,M,20.7,M,,*4F
+$GPGSA,A,3,,,08,,,18,,,26,27,28,29,5.3,3.6,2.7*35
+$GPGSV,3,1,12,03,01,011,00,07,03,153,00,08,49,094,32,10,13,208,31*7B
+$GPGSV,3,2,12,15,12,330,34,18,20,325,39,19,20,033,34,21,03,297,00*7F
+$GPGSV,3,3,12,26,61,273,47,27,18,093,32,28,63,138,42,29,69,241,48*77
+$PGRME,13.9,M,15.4,M,20.8,M*1F
+$GPGLL,6130.444,N,02349.370,E,130523,A*24
+$PGRMZ,342,f,3*1E
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6123.283,N,02430.650,E,T027*23
+$GPRMC,130523,A,6130.442,N,02349.364,E,015.3,287.7,110805,006.0,E*7D
+$GPRMB,A,1.55,L,T013,T012,6129.236,N,02346.327,E,001.9,230.2,005.9,V*3F
+$GPGGA,130523,6130.443,N,02349.363,E,1,06,2.7,104.4,M,20.7,M,,*4E
+$GPGSA,A,3,,,08,,15,18,,,26,27,28,29,2.7,2.7,1.0*36
+$GPGSV,3,1,12,03,01,011,00,07,03,153,00,08,49,094,32,10,13,208,31*7B
+$GPGSV,3,2,12,15,12,330,34,18,20,325,42,19,20,033,33,21,03,297,00*74
+$GPGSV,3,3,12,26,61,273,48,27,18,093,33,28,63,138,42,29,69,241,48*79
+$PGRME,18.2,M,20.8,M,27.6,M*1C
+$GPGLL,6130.443,N,02349.358,E,130525,A*2F
+$PGRMZ,343,f,3*1F
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6017.083,N,02452.500,E,T026*24
+$GPRMC,130525,A,6130.443,N,02349.353,E,015.0,277.5,110805,006.0,E*70
+$GPRMB,A,1.55,L,T013,T012,6129.236,N,02346.327,E,001.9,230.1,010.1,V*30
+$GPGGA,130526,6130.443,N,02349.351,E,1,07,3.5,105.3,M,20.7,M,,*4E
+$GPGSA,A,3,,,08,,15,18,,,26,27,28,29,4.0,3.5,2.0*37
+$GPGSV,3,1,12,03,01,011,00,07,03,153,00,08,49,094,32,10,13,208,33*79
+$GPGSV,3,2,12,15,12,330,33,18,20,325,42,19,20,033,33,21,03,297,00*73
+$GPGSV,3,3,12,26,61,273,48,27,18,093,33,28,63,138,42,29,69,241,48*79
+$PGRME,20.7,M,23.3,M,31.2,M*19
+$GPGLL,6130.444,N,02349.347,E,130526,A*25
+$PGRMZ,349,f,3*15
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6017.083,S,02453.500,E,T025*3B
+$GPRMC,130526,A,6130.444,N,02349.343,E,014.6,277.2,110805,006.0,E*75
+$GPRMB,A,1.55,L,T013,T012,6129.236,N,02346.327,E,001.9,230.0,009.9,V*31
+$GPGGA,130526,6130.444,N,02349.341,E,1,07,2.7,106.4,M,20.7,M,,*4F
+$GPGSA,A,3,,,08,,15,18,,,26,27,28,29,2.7,2.7,1.0*36
+$GPGSV,3,1,12,03,01,011,00,07,03,153,00,08,49,094,31,10,13,208,32*7B
+$GPGSV,3,2,12,15,12,330,33,18,20,325,41,19,20,033,32,21,03,297,00*71
+$GPGSV,3,3,12,26,61,273,49,27,18,093,35,28,63,138,42,29,69,241,48*7E
+$PGRME,23.1,M,26.0,M,34.8,M*15
+$GPGLL,6130.444,N,02349.336,E,130527,A*22
+$PGRMZ,349,f,3*15
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6018.083,N,02453.500,E,T024*28
+$GPRMC,130527,A,6130.445,N,02349.332,E,014.4,278.0,110805,006.0,E*7C
+$GPRMB,A,1.55,L,T013,T012,6129.236,N,02346.327,E,001.9,229.9,009.9,V*30
+$GPGGA,130527,6130.445,N,02349.330,E,1,07,3.6,107.6,M,20.7,M,,*4A
+$GPGSA,A,3,,,08,,15,18,,,26,27,28,29,4.1,3.6,2.1*34
+$GPGSV,3,1,12,03,01,011,00,07,03,153,00,08,49,094,31,10,13,208,32*7B
+$GPGSV,3,2,12,15,12,330,35,18,20,325,41,19,20,033,34,21,03,297,00*71
+$GPGSV,3,3,12,26,61,273,49,27,18,093,35,28,63,138,43,29,69,241,48*7F
+$PGRME,23.1,M,26.0,M,34.8,M*15
+$GPGLL,6130.445,N,02349.325,E,130529,A*2F
+$PGRMZ,353,f,3*1E
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6017.083,N,02452.500,W,T023*33
+$GPRMC,130530,A,6130.444,N,02349.322,E,014.2,276.5,110805,006.0,E*77
+$GPRMB,A,1.55,L,T013,T012,6129.236,N,02346.327,E,001.9,229.8,009.7,V*3F
+$GPGGA,130530,6130.444,N,02349.320,E,1,07,2.7,107.4,M,20.7,M,,*4E
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,2.7,2.7,1.0*3E
+$GPGSV,3,1,12,03,01,011,00,07,03,153,00,08,49,094,30,10,13,208,32*7A
+$GPGSV,3,2,12,15,12,330,36,18,20,325,41,19,20,033,35,21,03,297,00*73
+$GPGSV,3,3,12,26,61,273,49,27,18,093,35,28,63,138,43,29,69,241,48*7F
+$PGRME,8.4,M,11.4,M,14.2,M*21
+$GPGLL,6130.444,N,02349.316,E,130530,A*26
+$PGRMZ,352,f,3*1F
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6017.083,N,02555.500,E,T022*26
+$GPRMC,130531,A,6130.444,N,02349.312,E,013.5,275.6,110805,006.0,E*75
+$GPRMB,A,1.55,L,T013,T012,6129.236,N,02346.327,E,001.9,229.7,009.4,V*33
+$GPGGA,130531,6130.444,N,02349.311,E,1,08,2.9,107.2,M,20.7,M,,*4A
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,3.2,2.9,1.5*31
+$GPGSV,3,1,12,03,01,011,00,07,03,153,00,08,49,094,30,10,13,208,31*79
+$GPGSV,3,2,12,15,12,330,36,18,20,325,42,19,20,033,35,21,03,297,00*70
+$GPGSV,3,3,12,26,61,273,49,27,18,093,36,28,63,138,44,29,69,241,48*7B
+$PGRME,11.8,M,14.9,M,19.0,M*12
+$GPGLL,6130.445,N,02349.307,E,130531,A*26
+$PGRMZ,354,f,3*19
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6017.083,N,02452.500,E,T021*23
+$GPRMC,130532,A,6130.445,N,02349.303,E,012.6,279.7,110805,006.0,E*78
+$GPRMB,A,1.55,L,T013,T012,6129.236,N,02346.327,E,001.9,229.6,008.1,V*36
+$GPGGA,130532,6130.445,N,02349.302,E,1,08,3.6,108.0,M,20.7,M,,*49
+$GPGSA,A,3,,,,,15,18,19,,26,27,28,29,4.4,3.6,2.5*35
+$GPGSV,3,1,12,03,01,011,00,07,03,153,00,08,49,094,30,10,13,208,30*78
+$GPGSV,3,2,12,15,12,330,35,18,20,325,41,19,20,033,38,21,03,297,00*7D
+$GPGSV,3,3,12,26,61,273,49,27,18,093,35,28,63,138,44,29,69,241,48*78
+$PGRME,12.8,M,17.1,M,21.4,M*15
+$GPGLL,6130.445,N,02349.297,E,130532,A*2D
+$PGRMZ,352,f,3*1F
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6116.083,N,02452.500,E,T020*22
+$GPRMC,130533,A,6130.446,N,02349.297,E,007.4,308.1,110805,006.0,E*71
+$GPRMB,A,1.55,L,T013,T012,6129.236,N,02346.327,E,001.9,229.5,001.5,V*38
+$GPGGA,130533,6130.446,N,02349.297,E,1,07,2.1,108.1,M,20.7,M,,*4E
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,3.6,2.1,3.0*3A
+$GPGSV,3,1,12,03,01,011,00,07,03,153,37,08,49,094,38,10,13,208,30*74
+$GPGSV,3,2,12,15,12,330,34,18,20,325,40,19,20,033,42,21,03,297,00*70
+$GPGSV,3,3,12,26,61,273,36,27,18,093,35,28,63,138,44,29,69,241,46*7E
+$PGRME,8.2,M,11.6,M,14.2,M*25
+$GPGLL,6130.447,N,02349.295,E,130534,A*2B
+$PGRMZ,355,f,3*18
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6016.083,S,02452.500,E,T019*34
+$GPRMC,130534,A,6130.447,N,02349.291,E,009.5,302.6,110805,006.0,E*73
+$GPRMB,A,1.55,L,T013,T012,6129.236,N,02346.327,E,001.9,229.5,002.8,V*36
+$GPGGA,130534,6130.448,N,02349.290,E,1,08,3.4,107.8,M,20.7,M,,*4D
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,6.6,3.4,5.7*3A
+$GPGSV,3,1,12,03,01,011,00,07,04,152,36,08,49,094,39,10,13,208,30*72
+$GPGSV,3,2,12,15,12,330,33,18,20,325,41,19,20,033,42,21,03,297,00*76
+$GPGSV,3,3,12,26,61,273,41,27,18,093,34,28,63,138,43,29,69,241,47*79
+$PGRME,14.2,M,23.8,M,27.8,M*1D
+$GPGLL,6130.449,N,02349.287,E,130535,A*27
+$PGRMZ,349,f,3*15
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6016.083,N,02452.500,E,T018*28
+$GPRMC,130535,A,6130.449,N,02349.284,E,011.0,302.4,110805,006.0,E*76
+$GPRMB,A,1.55,L,T013,T012,6129.236,N,02346.327,E,001.9,229.3,003.2,V*3B
+$GPGGA,130536,6130.449,N,02349.282,E,1,08,3.6,106.3,M,20.7,M,,*45
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,7.0,3.6,6.0*3B
+$GPGSV,3,1,12,03,01,011,00,07,04,152,00,08,49,094,38,10,13,208,30*76
+$GPGSV,3,2,12,15,12,330,35,18,20,325,41,19,20,033,41,21,03,297,00*73
+$GPGSV,3,3,12,26,61,273,44,27,18,093,36,28,63,138,42,29,69,241,48*70
+$PGRME,8.4,M,11.4,M,14.2,M*21
+$GPGLL,6130.451,N,02349.278,E,130536,A*2D
+$PGRMZ,350,f,3*1D
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6013.283,N,02456.650,E,T017*22
+$GPRMC,130536,A,6130.452,N,02349.275,E,013.0,306.4,110805,006.0,E*77
+$GPRMB,A,1.55,L,T013,T012,6129.236,N,02346.327,E,001.9,229.2,002.9,V*30
+$GPGGA,130536,6130.453,N,02349.274,E,1,08,2.1,106.6,M,20.7,M,,*44
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,3.6,2.1,2.9*32
+$GPGSV,3,1,12,03,01,011,00,07,04,152,00,08,49,094,38,10,13,208,30*76
+$GPGSV,3,2,12,15,12,330,37,18,20,325,40,19,20,033,40,21,03,297,00*71
+$GPGSV,3,3,12,26,61,273,46,27,18,093,37,28,63,138,42,29,69,241,48*73
+$PGRME,8.4,M,11.4,M,14.2,M*21
+$GPGLL,6130.454,N,02349.270,E,130538,A*2E
+$PGRMZ,350,f,3*1D
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6123.283,N,02430.650,E,T016*21
+$GPRMC,130538,A,6130.455,N,02349.267,E,013.0,306.4,110805,006.0,E*7D
+$GPRMB,A,1.55,L,T013,T012,6129.236,N,02346.327,E,001.9,229.0,002.9,V*32
+$GPGGA,130538,6130.455,N,02349.266,E,1,08,2.6,106.6,M,20.7,M,,*48
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,4.4,2.6,3.6*3E
+$GPGSV,3,1,12,03,01,011,00,07,04,152,00,08,48,094,38,10,13,208,30*77
+$GPGSV,3,2,12,15,12,330,36,18,20,325,40,19,20,033,39,21,03,297,00*7E
+$GPGSV,3,3,12,26,61,273,46,27,18,093,36,28,63,138,43,29,69,241,48*73
+$PGRME,10.3,M,14.1,M,17.5,M*1B
+$GPGLL,6130.457,N,02349.264,E,130538,A*28
+$PGRMZ,349,f,3*15
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,0000.000,N,00000.000,W,T015*39
+$GPRMC,130538,A,6130.459,N,02349.261,E,012.6,317.4,110805,006.0,E*70
+$GPRMB,A,1.55,L,T013,T012,6129.236,N,02346.327,E,001.9,228.9,000.3,V*32
+$GPGGA,130540,6130.459,N,02349.260,E,1,08,2.6,106.3,M,20.7,M,,*48
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,4.4,2.6,3.6*3E
+$GPGSV,3,1,12,03,01,011,00,07,04,152,00,08,48,094,37,10,13,208,30*78
+$GPGSV,3,2,12,15,12,330,37,18,20,325,39,19,20,033,38,21,03,297,00*70
+$GPGSV,3,3,12,26,61,273,46,27,18,093,36,28,63,138,43,29,69,241,48*73
+$PGRME,14.8,M,19.3,M,24.4,M*1A
+$GPGLL,6130.462,N,02349.260,E,130540,A*25
+$PGRMZ,357,f,3*1A
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,0009.000,N,02430.650,E,T014*25
+$GPRMC,130541,A,6130.464,N,02349.259,E,012.4,333.3,110805,006.0,E*78
+$GPRMB,A,1.56,L,T013,T012,6129.236,N,02346.327,E,001.9,228.7,-003.1,V*13
+$GPGGA,130541,6130.465,N,02349.258,E,1,08,4.8,110.1,M,20.7,M,,*40
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,7.8,4.8,6.1*3B
+$GPGSV,3,1,12,03,01,011,00,07,04,152,00,08,48,094,35,10,13,208,30*7A
+$GPGSV,3,2,12,15,12,330,37,18,20,325,41,19,20,033,37,21,03,297,00*70
+$GPGSV,3,3,12,26,61,273,47,27,18,093,35,28,63,138,41,29,69,241,47*7C
+$PGRME,14.8,M,19.3,M,24.4,M*1A
+$GPGLL,6130.467,N,02349.256,E,130542,A*27
+$PGRMZ,361,f,3*1F
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6123.285,N,02430.651,E,T013*23
+$GPRMC,130542,A,6130.469,N,02349.254,E,013.1,333.8,110805,006.0,E*74
+$GPRMB,A,1.56,L,T013,T012,6129.236,N,02346.327,E,001.9,228.6,-003.1,V*12
+$GPGGA,130542,6130.469,N,02349.253,E,1,08,5.3,110.2,M,20.7,M,,*4D
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,8.0,5.3,1.0*30
+$GPGSV,3,1,12,03,01,011,00,07,04,152,00,08,48,094,35,10,13,208,30*7A
+$GPGSV,3,2,12,15,12,330,37,18,20,325,41,19,20,033,36,21,03,297,00*71
+$GPGSV,3,3,12,26,61,273,47,27,18,093,34,28,63,138,41,29,69,241,46*7C
+$PGRME,17.3,M,16.6,M,26.0,M*1E
+$GPGLL,6130.471,N,02349.251,E,130542,A*27
+$PGRMZ,362,f,3*1C
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6129.236,N,02346.327,E,T012*22
+$GPRMC,130544,A,6130.473,N,02349.250,E,013.1,333.8,110805,006.0,E*7D
+$GPRMB,A,1.57,L,T013,T012,6129.236,N,02346.327,E,001.9,228.5,-003.4,V*15
+$GPGGA,130544,6130.473,N,02349.249,E,1,08,5.3,110.2,M,20.7,M,,*4B
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,8.0,5.3,1.0*30
+$GPGSV,3,1,12,03,01,011,00,07,04,152,00,08,48,094,35,10,13,208,30*7A
+$GPGSV,3,2,12,15,12,330,36,18,20,325,40,19,20,033,36,21,03,297,00*71
+$GPGSV,3,3,12,26,61,273,46,27,18,093,34,28,63,138,41,29,69,241,47*7C
+$PGRME,16.4,M,16.6,M,16.4,M*1F
+$GPGLL,6130.475,N,02349.247,E,130544,A*22
+$PGRMZ,362,f,3*1C
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6114.236,N,02346.327,E,T011*2F
+$GPRMC,130544,A,6130.477,N,02349.246,E,013.5,337.1,110805,006.0,E*77
+$GPRMB,A,1.57,L,T013,T012,6129.236,N,02346.327,E,001.9,228.3,-004.3,V*13
+$GPGGA,130544,6130.478,N,02349.245,E,1,08,4.0,110.2,M,20.7,M,,*4E
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,4.0,4.0,1.0*3E
+$GPGSV,3,1,12,03,01,011,00,07,04,152,00,08,48,094,34,10,13,208,30*7B
+$GPGSV,3,2,12,15,12,330,35,18,20,325,39,19,20,033,35,21,03,297,00*7F
+$GPGSV,3,3,12,26,61,273,46,27,18,093,33,28,63,138,39,29,69,241,46*75
+$PGRME,16.4,M,16.6,M,16.4,M*1F
+$GPGLL,6130.480,N,02349.244,E,130546,A*29
+$PGRMZ,362,f,3*1C
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6220.236,N,02346.327,E,T010*2A
+$GPRMC,130546,A,6130.482,N,02349.242,E,013.5,337.1,110805,006.0,E*7B
+$GPRMB,A,1.57,L,T013,T012,6129.236,N,02346.327,E,001.9,228.2,-004.3,V*12
+$GPGGA,130546,6130.483,N,02349.242,E,1,08,4.0,110.2,M,20.7,M,,*4F
+$GPGSA,A,3,,,08,,15,18,,,26,,28,29,4.0,4.0,1.0*33
+$GPGSV,3,1,12,03,01,011,00,07,04,152,00,08,48,094,34,10,12,208,30*7A
+$GPGSV,3,2,12,15,12,330,34,18,20,325,39,19,20,033,39,21,03,297,00*72
+$GPGSV,3,3,12,26,61,273,45,27,18,093,33,28,63,138,38,29,69,241,46*77
+$PGRME,16.4,M,16.6,M,16.4,M*1F
+$GPGLL,6130.485,N,02349.240,E,130546,A*28
+$PGRMZ,362,f,3*1C
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6120.236,N,02346.327,E,T009*21
+$GPRMC,130548,A,6130.486,N,02349.238,E,013.5,337.1,110805,006.0,E*7C
+$GPRMB,A,1.58,L,T013,T012,6129.236,N,02346.327,E,001.9,228.0,-004.3,V*1F
+$GPGGA,130548,6130.486,N,02349.238,E,1,06,4.2,109.4,M,20.7,M,,*4B
+$GPGSA,A,3,,,08,,15,18,19,,26,,28,29,4.7,4.2,1.8*36
+$GPGSV,3,1,12,03,01,011,00,07,04,152,00,08,48,094,33,10,12,208,31*7C
+$GPGSV,3,2,12,15,12,330,34,18,20,325,38,19,20,033,40,21,03,297,00*7D
+$GPGSV,3,3,12,26,61,273,46,27,18,093,32,28,63,138,38,29,69,241,46*75
+$PGRME,16.9,M,18.7,M,19.1,M*17
+$GPGLL,6130.488,N,02349.236,E,130548,A*2A
+$PGRMZ,359,f,3*14
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6129.234,N,02346.317,E,T008*28
+$GPRMC,130549,A,6130.490,N,02349.235,E,012.3,337.8,110805,006.0,E*79
+$GPRMB,A,1.58,L,T013,T012,6129.236,N,02346.327,E,001.9,227.9,-004.2,V*18
+$GPGGA,130549,6130.490,N,02349.235,E,1,07,5.3,107.8,M,20.7,M,,*43
+$GPGSA,A,3,,,08,,15,18,19,,26,,28,29,7.7,5.3,4.7*3F
+$GPGSV,3,1,12,03,01,011,00,07,04,152,00,08,48,094,37,10,12,208,31*78
+$GPGSV,3,2,12,15,12,330,33,18,20,325,37,19,20,033,38,21,03,297,00*7A
+$GPGSV,3,3,12,26,61,273,45,27,18,093,35,28,63,138,43,29,69,241,45*7E
+$PGRME,19.3,M,15.4,M,24.7,M*14
+$GPGLL,6130.492,N,02349.234,E,130550,A*2A
+$PGRMZ,355,f,3*18
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6157.564,N,02406.158,E,T007*26
+$GPRMC,130551,A,6130.493,N,02349.233,E,011.4,341.2,110805,006.0,E*7A
+$GPRMB,A,1.58,L,T013,T012,6129.236,N,02346.327,E,001.9,227.8,-004.5,V*1E
+$GPGGA,130551,6130.494,N,02349.233,E,1,07,4.8,108.3,M,20.7,M,,*46
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,6.2,4.8,3.9*3D
+$GPGSV,3,1,12,03,01,011,00,07,04,152,00,08,48,094,38,10,12,208,31*77
+$GPGSV,3,2,12,15,12,330,33,18,20,325,36,19,20,033,37,21,03,297,00*74
+$GPGSV,3,3,12,26,61,273,45,27,18,093,37,28,63,138,43,29,69,241,45*7C
+$PGRME,19.3,M,15.4,M,24.7,M*14
+$GPGLL,6130.493,N,02349.241,E,130551,A*28
+$PGRMZ,357,f,3*1A
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6145.919,N,02345.544,E,T006*2B
+$GPRMC,130552,A,6130.493,N,02349.242,E,007.0,038.3,110805,006.0,E*70
+$GPRMB,A,1.58,L,T013,T012,6129.236,N,02346.327,E,001.9,227.9,-006.9,V*11
+$GPGGA,130552,6130.493,N,02349.243,E,1,08,4.8,109.2,M,20.7,M,,*4A
+$GPGSA,A,3,,,08,,15,18,19,,26,27,28,29,6.2,4.8,3.9*3D
+$GPGSV,3,1,12,03,01,011,00,07,04,152,00,08,48,094,38,10,12,208,31*77
+$GPGSV,3,2,12,15,12,330,33,18,20,325,35,19,20,033,37,21,03,297,00*77
+$GPGSV,3,3,12,26,61,273,44,27,18,093,38,28,63,138,44,29,69,241,45*75
+$PGRME,19.3,M,15.4,M,24.7,M*14
+$GPGLL,6130.494,N,02349.245,E,130553,A*29
+$PGRMZ,358,f,3*15
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6130.198,N,02342.702,E,T005*2C
+$GPRMC,130553,A,6130.493,N,02349.248,E,006.0,074.5,110805,006.0,E*74
+$GPRMB,A,1.59,L,T013,T012,6129.236,N,02346.327,E,001.9,227.9,-006.4,V*1D
+$GPGGA,130553,6130.494,N,02349.249,E,1,08,5.1,109.2,M,20.7,M,,*4E
+$GPGSA,A,3,,,08,,,18,19,,26,27,28,29,6.3,5.1,1.0*3B
+$GPGSV,3,1,12,03,01,011,00,07,04,152,00,08,48,094,42,10,12,208,31*7A
+$GPGSV,3,2,12,15,12,330,32,18,20,325,34,19,20,033,35,21,03,297,00*75
+$GPGSV,3,3,12,26,61,273,43,27,18,093,37,28,63,138,43,29,69,241,43*7C
+$PGRME,16.4,M,15.5,M,16.4,M*1F
+$GPGLL,6130.494,N,02349.251,E,130554,A*2B
+$PGRMZ,358,f,3*15
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6216.183,N,02619.685,E,T004*25
+$GPRMC,130554,A,6130.494,N,02349.252,E,006.0,074.5,110805,006.0,E*7F
+$GPRMB,A,1.59,L,T013,T012,6129.236,N,02346.327,E,001.9,228.0,-005.4,V*18
+$GPGGA,130554,6130.494,N,02349.253,E,1,07,4.1,109.3,M,20.7,M,,*4D
+$GPGSA,A,3,,,08,,,18,19,,26,27,28,29,4.1,4.1,1.0*3A
+$GPGSV,3,1,12,03,01,011,00,07,04,152,00,08,48,094,43,10,12,208,30*7A
+$GPGSV,3,2,12,15,12,330,32,18,20,325,34,19,20,033,35,21,03,297,00*75
+$GPGSV,3,3,12,26,61,273,42,27,18,093,36,28,63,138,45,29,69,241,43*7A
+$PGRME,18.3,M,19.2,M,21.1,M*1C
+$GPGLL,6130.493,N,02349.255,E,130554,A*28
+$PGRMZ,365,f,3*1B
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6215.064,N,02603.837,E,T003*25
+$GPRMC,130554,A,6130.493,N,02349.257,E,005.5,089.1,110805,006.0,E*7D
+$GPRMB,A,1.59,L,T013,T012,6129.236,N,02346.327,E,001.9,228.1,-004.2,V*1E
+$GPGGA,130556,6130.493,N,02349.258,E,1,07,4.1,111.1,M,20.7,M,,*48
+$GPGSA,A,3,,,08,,,18,19,,26,27,28,29,4.1,4.1,1.0*3A
+$GPGSV,3,1,12,03,01,011,00,07,04,152,00,08,48,094,44,10,12,208,30*7D
+$GPGSV,3,2,12,15,12,330,31,18,20,325,33,19,20,033,34,21,03,297,00*70
+$GPGSV,3,3,12,26,61,273,42,27,18,093,35,28,63,138,45,29,69,241,44*7E
+$PGRME,18.3,M,19.2,M,21.1,M*1C
+$GPGLL,6130.491,N,02349.257,E,130556,A*2A
+$PGRMZ,365,f,3*1B
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6151.098,N,02510.924,E,T002*26
+$GPRMC,130556,A,6130.491,N,02349.258,E,004.5,123.5,110805,006.0,E*76
+$GPRMB,A,1.58,L,T013,T012,6129.236,N,02346.327,E,001.9,228.1,-001.1,V*19
+$GPGGA,130556,6130.491,N,02349.258,E,1,07,4.2,111.1,M,20.7,M,,*49
+$GPGSA,A,3,,,08,,,18,19,,26,27,28,29,4.2,4.2,1.0*3A
+$GPGSV,3,1,12,03,01,011,00,07,04,152,00,08,48,094,44,10,12,208,30*7D
+$GPGSV,3,2,12,15,12,330,31,18,20,325,33,19,20,033,34,21,03,297,00*70
+$GPGSV,3,3,12,26,61,273,44,27,18,093,35,28,63,138,45,29,69,241,44*78
+$PGRME,16.5,M,16.6,M,16.5,M*1F
+$GPGLL,6130.490,N,02349.255,E,130558,A*27
+$PGRMZ,365,f,3*1B
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6129.271,N,02346.376,E,T001*27
+$GPRMC,130558,A,6130.490,N,02349.255,E,002.4,167.8,110805,006.0,E*7E
+$GPRMB,A,1.58,L,T013,T012,6129.236,N,02346.327,E,001.9,228.1,001.2,V*37
+$GPGGA,130558,6130.490,N,02349.255,E,1,07,4.2,111.2,M,20.7,M,,*48
+$GPGSA,A,3,,,08,,,18,19,,26,27,28,29,4.2,4.2,1.0*3A
+$GPGSV,3,1,12,03,01,011,00,07,04,152,00,08,48,094,46,10,12,208,30*7F
+$GPGSV,3,2,12,15,12,330,31,18,20,325,33,19,20,033,33,21,03,297,00*77
+$GPGSV,3,3,12,26,61,273,46,27,18,093,33,28,63,138,48,29,69,241,43*76
+$PGRME,16.5,M,16.6,M,16.5,M*1F
+$GPGLL,6130.490,N,02349.255,E,130559,A*26
+$PGRMZ,365,f,3*1B
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPRTE,4,1,c,0,T030,T029,T028,T027,T026,T025,T024,T023,T022*49
+$GPRTE,4,2,c,0,T021,T020,T019,T018,T017,T016,T015,T014,T013*4B
+$GPRTE,4,3,c,0,T012,T011,T010,T009,T008,T007,T006,T005,T004*4B
+$GPRTE,4,4,c,0,T003,T002,T001*4F
+$GPWPL,6016.083,N,02452.500,E,T030*22
+$GPRMC,130600,A,6130.490,N,02349.255,E,000.0,167.8,110805,006.0,E*76
+$GPRMB,A,1.58,L,T013,T012,6129.236,N,02346.327,E,001.9,228.1,,V*1A
+$GPGGA,130600,6130.490,N,02349.255,E,1,07,4.1,111.2,M,20.7,M,,*45
+$GPGSA,A,3,,,08,,,18,,,26,27,28,29,4.1,4.1,1.0*32
+$GPGSV,3,1,12,03,01,011,00,07,04,152,00,08,48,094,46,10,12,208,30*7F
+$GPGSV,3,2,12,15,12,330,31,18,20,325,32,19,20,033,33,21,03,297,00*76
+$GPGSV,3,3,12,26,61,273,47,27,18,093,32,28,63,138,49,29,69,241,43*77
+$PGRME,16.5,M,16.6,M,16.5,M*1F
+$GPGLL,6130.490,N,02349.256,E,130601,A*2B
+$PGRMZ,365,f,3*1B
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6123.283,N,02430.650,E,T029*2D
+$GPRMC,130601,A,6130.490,N,02349.256,E,000.0,167.8,110805,006.0,E*74
+$GPRMB,A,1.58,L,T013,T012,6129.236,N,02346.327,E,001.9,228.1,,V*1A
+$GPGGA,130601,6130.490,N,02349.256,E,1,06,4.1,111.2,M,20.7,M,,*46
+$GPGSA,A,3,,,08,,,18,,,26,,28,29,4.1,4.1,1.0*37
+$GPGSV,3,1,12,03,01,011,00,07,04,152,00,08,48,094,47,10,12,208,30*7E
+$GPGSV,3,2,12,15,12,330,31,18,20,325,32,19,20,033,32,21,03,297,00*77
+$GPGSV,3,3,12,26,61,273,48,27,18,093,30,28,63,138,50,29,69,241,43*72
+$PGRME,16.5,M,16.6,M,16.5,M*1F
+$GPGLL,6130.490,N,02349.256,E,130602,A*28
+$PGRMZ,365,f,3*1B
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6023.283,N,02430.650,E,T028*2D
+$GPRMC,130603,A,6130.490,N,02349.256,E,000.0,167.8,110805,006.0,E*76
+$GPRMB,A,1.58,L,T013,T012,6129.236,N,02346.327,E,001.9,228.1,,V*1A
+$GPGGA,130603,6130.490,N,02349.256,E,1,05,4.1,111.2,M,20.7,M,,*47
+$GPGSA,A,3,,,08,,,18,,,26,,28,29,4.1,4.1,1.0*37
+$GPGSV,3,1,12,03,01,011,00,07,04,152,00,08,48,094,47,10,12,208,30*7E
+$GPGSV,3,2,12,15,12,330,31,18,20,325,32,19,20,033,32,21,03,297,00*77
+$GPGSV,3,3,12,26,61,273,48,27,18,093,30,28,63,138,50,29,69,241,42*73
+$PGRME,18.4,M,20.3,M,21.2,M*13
+$GPGLL,6130.491,N,02349.257,E,130604,A*2E
+$PGRMZ,371,f,3*1E
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6123.283,N,02430.650,E,T027*23
+$GPRMC,130604,A,6130.491,N,02349.258,E,000.0,167.8,110805,006.0,E*7E
+$GPRMB,A,1.58,L,T013,T012,6129.236,N,02346.327,E,001.9,228.1,,V*1A
+$GPGGA,130604,6130.491,N,02349.258,E,1,05,1.8,115.1,M,20.7,M,,*44
+$GPGSA,A,3,,,08,,,18,,,26,,28,29,1.8,1.8,1.0*37
+$GPGSV,3,1,12,03,01,011,00,07,04,152,00,08,48,094,47,10,12,208,30*7E
+$GPGSV,3,2,12,15,12,330,31,18,20,325,33,19,20,033,32,21,03,297,00*76
+$GPGSV,3,3,12,26,61,273,48,27,18,093,30,28,63,138,50,29,69,241,42*73
+$PGRME,18.4,M,20.3,M,21.2,M*13
+$GPGLL,6130.491,N,02349.258,E,130605,A*20
+$PGRMZ,378,f,3*17
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6017.083,N,02452.500,E,T026*24
+$GPRMC,130605,A,6130.492,N,02349.258,E,000.0,167.8,110805,006.0,E*7C
+$GPRMB,A,1.58,L,T013,T012,6129.236,N,02346.327,E,001.9,228.1,,V*1A
+$GPGGA,130605,6130.492,N,02349.258,E,1,05,1.8,117.2,M,20.7,M,,*47
+$GPGSA,A,3,,,08,,,18,,,26,,28,29,1.8,1.8,1.0*37
+$GPGSV,3,1,12,03,01,011,00,07,04,152,00,08,48,094,47,10,12,208,30*7E
+$GPGSV,3,2,12,15,12,330,31,18,20,325,33,19,20,033,31,21,03,297,00*75
+$GPGSV,3,3,12,26,61,273,48,27,18,093,30,28,63,138,50,29,69,241,42*73
+$PGRME,18.4,M,20.3,M,21.2,M*13
+$GPGLL,6130.492,N,02349.259,E,130606,A*21
+$PGRMZ,391,f,3*10
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6017.083,S,02453.500,E,T025*3B
+$GPRMC,130606,A,6130.492,N,02349.259,E,000.0,167.8,110805,006.0,E*7E
+$GPRMB,A,1.59,L,T013,T012,6129.236,N,02346.327,E,001.9,228.1,,V*1B
+$GPGGA,130607,6130.492,N,02349.259,E,1,05,1.8,119.2,M,20.7,M,,*4A
+$GPGSA,A,3,,,08,,,18,,,26,,28,29,1.8,1.8,1.0*37
+$GPGSV,3,1,12,03,01,011,00,07,04,152,00,08,48,094,47,10,12,208,30*7E
+$GPGSV,3,2,12,15,12,329,31,18,20,325,33,19,20,033,31,21,03,297,00*7D
+$GPGSV,3,3,12,26,61,273,48,27,18,093,30,28,63,138,50,29,69,241,42*73
+$PGRME,18.4,M,20.3,M,21.2,M*13
+$GPGLL,6130.492,N,02349.259,E,130607,A*20
+$PGRMZ,397,f,3*16
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6018.083,N,02453.500,E,T024*28
+$GPRMC,130608,A,6130.493,N,02349.260,E,000.0,167.8,110805,006.0,E*7B
+$GPRMB,A,1.59,L,T013,T012,6129.236,N,02346.327,E,001.9,228.1,,V*1B
+$GPGGA,130608,6130.493,N,02349.260,E,1,05,1.8,122.5,M,20.7,M,,*41
+$GPGSA,A,3,,,08,,,18,,,26,,28,29,1.8,1.8,1.0*37
+$GPGSV,3,1,12,03,01,011,00,07,04,152,00,08,48,094,48,10,12,208,30*71
+$GPGSV,3,2,12,15,12,329,31,18,20,325,33,19,20,033,00,21,03,297,00*7F
+$GPGSV,3,3,12,26,61,273,47,27,18,093,30,28,63,138,50,29,69,241,42*7C
+$PGRME,18.4,M,20.3,M,21.2,M*13
+$GPGLL,6130.493,N,02349.260,E,130609,A*25
+$PGRMZ,402,f,3*1D
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6017.083,N,02452.500,W,T023*33
+$GPRMC,130609,A,6130.493,N,02349.261,E,000.0,167.8,110805,006.0,E*7B
+$GPRMB,A,1.59,L,T013,T012,6129.236,N,02346.327,E,001.9,228.1,,V*1B
+$GPGGA,130609,6130.493,N,02349.261,E,1,05,1.8,124.3,M,20.7,M,,*41
+$GPGSA,A,3,,,08,,,18,,,26,,28,29,1.8,1.8,1.0*37
+$GPGSV,3,1,12,03,01,011,00,07,04,152,00,08,48,094,48,10,12,208,30*71
+$GPGSV,3,2,12,15,12,329,31,18,20,325,34,19,20,033,00,21,03,297,00*78
+$GPGSV,3,3,12,26,61,273,47,27,18,093,30,28,63,138,50,29,69,241,42*7C
+$PGRME,18.4,M,20.3,M,21.2,M*13
+$GPGLL,6130.493,N,02349.261,E,130610,A*2C
+$PGRMZ,413,f,3*1D
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6017.083,N,02555.500,E,T022*26
+$GPRMC,130610,A,6130.493,N,02349.261,E,000.0,167.8,110805,006.0,E*73
+$GPRMB,A,1.59,L,T013,T012,6129.236,N,02346.327,E,001.9,228.1,,V*1B
+$GPGGA,130611,6130.493,N,02349.261,E,1,05,2.0,126.0,M,20.7,M,,*42
+$GPGSA,A,3,,,08,,,18,,,26,,28,29,2.0,2.0,1.0*37
+$GPGSV,3,1,12,03,01,011,00,07,04,152,00,08,48,094,47,10,12,208,30*7E
+$GPGSV,3,2,12,15,12,329,31,18,20,325,34,19,20,033,00,21,03,297,00*78
+$GPGSV,3,3,12,26,61,273,46,27,18,093,30,28,63,138,49,29,69,241,42*75
+$PGRME,18.4,M,20.3,M,21.2,M*13
+$GPGLL,6130.494,N,02349.262,E,130611,A*29
+$PGRMZ,418,f,3*16
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6017.083,N,02452.500,E,T021*23
+$GPRMC,130612,A,6130.494,N,02349.262,E,000.0,167.8,110805,006.0,E*75
+$GPRMB,A,1.59,L,T013,T012,6129.236,N,02346.327,E,001.9,228.1,,V*1B
+$GPGGA,130612,6130.494,N,02349.262,E,1,05,2.3,127.4,M,20.7,M,,*43
+$GPGSA,A,3,,,08,,,18,,,26,,28,29,2.3,2.3,1.0*37
+$GPGSV,3,1,12,03,01,011,00,07,04,152,00,08,48,094,48,10,12,208,30*71
+$GPGSV,3,2,12,15,12,329,30,18,20,325,34,19,20,033,00,21,03,297,00*79
+$GPGSV,3,3,12,26,61,273,46,27,18,093,30,28,63,138,49,29,69,241,41*76
+$PGRME,13.9,M,15.3,M,20.7,M*17
+$GPGLL,6130.494,N,02349.262,E,130613,A*2B
+$PGRMZ,425,f,3*18
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6116.083,N,02452.500,E,T020*22
+$GPRMC,130613,A,6130.495,N,02349.263,E,000.0,167.8,110805,006.0,E*74
+$GPRMB,A,1.59,L,T013,T012,6129.236,N,02346.327,E,001.9,228.1,,V*1B
+$GPGGA,130613,6130.495,N,02349.263,E,1,05,1.8,131.3,M,20.7,M,,*4A
+$GPGSA,A,3,,,08,,,18,,,26,27,28,29,1.8,1.8,1.0*32
+$GPGSV,3,1,12,03,01,011,00,07,04,152,00,08,48,094,48,10,12,208,30*71
+$GPGSV,3,2,12,15,12,329,30,18,20,325,34,19,20,033,00,21,03,297,00*79
+$GPGSV,3,3,12,26,61,273,46,27,18,093,30,28,63,138,49,29,69,241,41*76
+$PGRME,13.9,M,15.3,M,20.7,M*17
+$GPGLL,6130.495,N,02349.263,E,130614,A*2C
+$PGRMZ,435,f,3*19
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6016.083,S,02452.500,E,T019*34
+$GPRMC,130614,A,6130.495,N,02349.263,E,000.0,167.8,110805,006.0,E*73
+$GPRMB,A,1.59,L,T013,T012,6129.236,N,02346.327,E,001.9,228.1,,V*1B
+$GPGGA,130615,6130.495,N,02349.263,E,1,06,2.0,132.5,M,20.7,M,,*41
+$GPGSA,A,3,,,08,,,18,,,26,27,28,29,2.0,2.0,1.0*32
+$GPGSV,3,1,12,03,01,011,00,07,04,152,00,08,48,094,48,10,12,208,30*71
+$GPGSV,3,2,12,15,12,329,00,18,20,325,33,19,20,033,00,21,03,297,00*7D
+$GPGSV,3,3,12,26,61,273,47,27,18,093,30,28,63,138,50,29,69,241,42*7C
+$PGRME,16.1,M,19.2,M,25.1,M*14
+$GPGLL,6130.495,N,02349.263,E,130615,A*2D
+$PGRMZ,438,f,3*14
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6016.083,N,02452.500,E,T018*28
+$GPRMC,130616,A,6130.495,N,02349.263,E,000.0,167.8,110805,006.0,E*71
+$GPRMB,A,1.59,L,T013,T012,6129.236,N,02346.327,E,001.9,228.1,,V*1B
+$GPGGA,130616,6130.495,N,02349.263,E,1,06,2.0,133.6,M,20.7,M,,*40
+$GPGSA,A,3,,,08,,,18,,,26,27,28,29,2.0,2.0,1.0*32
+$GPGSV,3,1,12,03,01,011,00,07,04,152,00,08,48,094,48,10,12,208,30*71
+$GPGSV,3,2,12,15,12,329,00,18,20,325,33,19,20,033,00,21,03,297,00*7D
+$GPGSV,3,3,12,26,61,273,47,27,18,093,30,28,63,138,49,29,69,241,42*74
+$PGRME,16.1,M,19.2,M,25.1,M*14
+$GPGLL,6130.495,N,02349.264,E,130616,A*29
+$PGRMZ,442,f,3*19
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6013.283,N,02456.650,E,T017*22
+$GPRMC,130617,A,6130.495,N,02349.264,E,000.0,167.8,110805,006.0,E*77
+$GPRMB,A,1.59,L,T013,T012,6129.236,N,02346.327,E,001.9,228.1,,V*1B
+$GPGGA,130617,6130.495,N,02349.264,E,1,06,2.0,135.5,M,20.7,M,,*43
+$GPGSA,A,3,,,08,,,18,,,26,27,28,29,2.0,2.0,1.0*32
+$GPGSV,3,1,12,03,01,011,00,07,04,152,00,08,48,094,48,10,12,208,30*71
+$GPGSV,3,2,12,15,12,329,00,18,20,325,33,19,20,033,00,21,03,297,00*7D
+$GPGSV,3,3,12,26,61,273,48,27,18,093,30,28,63,138,49,29,69,241,42*7B
+$PGRME,16.1,M,19.2,M,25.1,M*14
+$GPGLL,6130.495,N,02349.264,E,130618,A*27
+$PGRMZ,445,f,3*1E
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6123.283,N,02430.650,E,T016*21
+$GPRMC,130618,A,6130.495,N,02349.264,E,000.0,167.8,110805,006.0,E*78
+$GPRMB,A,1.59,L,T013,T012,6129.236,N,02346.327,E,001.9,228.1,,V*1B
+$GPGGA,130619,6130.495,N,02349.264,E,1,06,2.0,136.4,M,20.7,M,,*4F
+$GPGSA,A,3,,,08,,,18,,,26,27,28,29,2.0,2.0,1.0*32
+$GPGSV,3,1,12,03,01,011,00,07,04,152,00,08,48,094,47,10,12,208,30*7E
+$GPGSV,3,2,12,15,12,329,00,18,20,325,34,19,20,033,00,21,03,297,00*7A
+$GPGSV,3,3,12,26,61,273,48,27,18,093,30,28,63,138,49,29,69,241,43*7A
+$PGRME,16.1,M,19.2,M,25.1,M*14
+$GPGLL,6130.496,N,02349.265,E,130619,A*24
+$PGRMZ,451,f,3*1B
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,0000.000,N,00000.000,W,T015*39
+$GPRMC,130620,A,6130.496,N,02349.265,E,000.0,167.8,110805,006.0,E*71
+$GPRMB,A,1.59,L,T013,T012,6129.236,N,02346.327,E,001.9,228.1,,V*1B
+$GPGGA,130620,6130.496,N,02349.265,E,1,06,2.0,137.3,M,20.7,M,,*41
+$GPGSA,A,3,,,08,,,18,,,26,27,28,29,2.0,2.0,1.0*32
+$GPGSV,3,1,12,03,01,011,00,07,04,152,00,08,48,094,48,10,12,208,30*71
+$GPGSV,3,2,12,15,12,329,00,18,20,325,34,19,20,033,00,21,03,297,00*7A
+$GPGSV,3,3,12,26,61,273,48,27,18,093,30,28,63,138,50,29,69,241,43*72
+$PGRME,16.1,M,19.2,M,25.1,M*14
+$GPGLL,6130.496,N,02349.265,E,130620,A*2E
+$PGRMZ,454,f,3*1E
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,0009.000,N,02430.650,E,T014*25
+$GPRMC,130621,A,6130.496,N,02349.266,E,000.0,167.8,110805,006.0,E*73
+$GPRMB,A,1.59,L,T013,T012,6129.236,N,02346.327,E,001.9,228.1,,V*1B
+$GPGGA,130621,6130.496,N,02349.266,E,1,06,1.8,139.3,M,20.7,M,,*46
+$GPGSA,A,3,,,08,,,18,,,26,27,28,29,1.8,1.8,1.0*32
+$GPGSV,3,1,12,03,01,011,00,07,04,152,00,08,48,094,48,10,12,208,30*71
+$GPGSV,3,2,12,15,12,329,00,18,20,325,34,19,20,033,00,21,03,297,00*7A
+$GPGSV,3,3,12,26,61,273,49,27,18,093,30,28,63,138,50,29,69,241,44*74
+$PGRME,16.1,M,19.2,M,25.1,M*14
+$GPGLL,6130.496,N,02349.266,E,130622,A*2F
+$PGRMZ,457,f,3*1D
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6123.285,N,02430.651,E,T013*23
+$GPRMC,130622,A,6130.496,N,02349.266,E,000.0,167.8,110805,006.0,E*70
+$GPRMB,A,1.59,L,T013,T012,6129.236,N,02346.327,E,001.9,228.1,,V*1B
+$GPGGA,130622,6130.496,N,02349.266,E,1,06,1.8,140.3,M,20.7,M,,*4B
+$GPGSA,A,3,,,08,,,18,,,26,27,28,29,1.8,1.8,1.0*32
+$GPGSV,3,1,12,03,01,011,00,07,04,152,00,08,48,094,48,10,12,208,30*71
+$GPGSV,3,2,12,15,12,329,00,18,20,325,35,19,20,033,00,21,03,297,00*7B
+$GPGSV,3,3,12,26,61,273,49,27,18,093,30,28,63,138,50,29,69,241,44*74
+$PGRME,16.1,M,19.2,M,25.1,M*14
+$GPGLL,6130.496,N,02349.266,E,130623,A*2E
+$PGRMZ,464,f,3*1D
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6129.236,N,02346.327,E,T012*22
+$GPRMC,130623,A,6130.496,N,02349.266,E,000.0,167.8,110805,006.0,E*71
+$GPRMB,A,1.59,L,T013,T012,6129.236,N,02346.327,E,001.9,228.1,,V*1B
+$GPGGA,130624,6130.496,N,02349.266,E,1,06,1.8,141.5,M,20.7,M,,*4A
+$GPGSA,A,3,,,08,,,18,,,26,,28,29,1.8,1.8,1.0*37
+$GPGSV,3,1,12,03,01,011,00,07,04,152,00,08,48,094,48,10,12,208,30*71
+$GPGSV,3,2,12,15,12,329,00,18,20,325,35,19,20,032,00,21,03,297,00*7A
+$GPGSV,3,3,12,26,61,273,49,27,18,093,30,28,63,138,50,29,69,241,44*74
+$PGRME,18.2,M,22.8,M,29.2,M*14
+$GPGLL,6130.497,N,02349.267,E,130624,A*29
+$PGRMZ,468,f,3*11
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6114.236,N,02346.327,E,T011*2F
+$GPRMC,130625,A,6130.497,N,02349.267,E,000.0,167.8,110805,006.0,E*77
+$GPRMB,A,1.59,L,T013,T012,6129.236,N,02346.327,E,001.9,228.1,,V*1B
+$GPGGA,130625,6130.497,N,02349.267,E,1,05,2.0,142.7,M,20.7,M,,*42
+$GPGSA,A,3,,,08,,,18,,,26,,28,29,2.0,2.0,1.0*37
+$GPGSV,3,1,12,03,01,011,00,07,04,152,00,08,48,094,48,10,12,208,30*71
+$GPGSV,3,2,12,15,12,329,00,18,20,325,35,19,20,032,00,21,03,297,00*7A
+$GPGSV,3,3,12,26,61,273,49,27,18,093,30,28,63,138,50,29,69,241,44*74
+$PGRME,18.2,M,22.8,M,29.2,M*14
+$GPGLL,6130.497,N,02349.267,E,130625,A*28
+$PGRMZ,473,f,3*1B
+$PGRMM,WGS 84*06
+$GPBOD,285.4,T,279.4,M,T012,T013*45
+$GPWPL,6220.236,N,02346.327,E,T010*2A
+$GPRMC,130626,A,6130.497,N,02349.267,E,000.0,167.8,110805,006.0,E*74
+$GPRMB,A,1.59,L,T013,T012,6129.236,N,02346.327,E,001.9,228.1,,V*1B
+$GPGGA,130626,6130.497,N,02349.268,E,1,05,1.8,145.8,M,20.7,M,,*4D
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/simpsyconfigurator/group/simpsyuiapp.mmp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,83 @@
+/*
+* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  This is project specification file for appserver for 
+*                 the SimPsyConfigurator.
+*
+*/
+
+#include <platform_paths.hrh>
+#include <data_caging_paths.hrh>
+#include "../inc/simpsyuiconsts.h"
+
+TARGET          simpsyui.exe
+TARGETTYPE      exe
+UID             0x100039CE KSimPsyUiAppUid
+
+EPOCSTACKSIZE   0x5000
+
+ 
+VENDORID    	VID_DEFAULT
+
+CAPABILITY      Location ReadUserData WriteDeviceData SwEvent
+
+USERINCLUDE     ../inc
+USERINCLUDE	    ../../inc
+
+APP_LAYER_SYSTEMINCLUDE
+
+SOURCEPATH      ../src
+SOURCE          simpsyuiapp.cpp
+SOURCE          simpsyuidocument.cpp
+SOURCE          simpsyuiappui.cpp
+SOURCE		simpsyuicontainer.cpp
+SOURCE		simpsyuilbmodel.cpp
+SOURCE          simpsyuiao.cpp
+SOURCE          simpsyfileselectormodel.cpp
+SOURCE          simpsyfileselector.cpp
+
+SOURCEPATH     ../data
+START RESOURCE simpsyui.rss
+HEADER
+TARGETPATH APP_RESOURCE_DIR
+END
+
+START RESOURCE ../data/simpsyui_reg.rss
+DEPENDS simpsyui.rsg
+// Do not change the UID below.
+TARGETPATH /private/10003a3f/apps
+END
+
+LIBRARY         euser.lib 
+LIBRARY         apparc.lib 
+LIBRARY         cone.lib 
+LIBRARY         eikcore.lib
+LIBRARY         avkon.lib 
+LIBRARY 	eikdlg.lib
+LIBRARY 	eikcoctl.lib 
+LIBRARY         apgrfx.lib
+LIBRARY         ws32.lib
+LIBRARY         centralrepository.lib
+LIBRARY         efsrv.lib
+LIBRARY         commondialogs.lib
+LIBRARY         lbs.lib
+LIBRARY		bafl.lib
+LIBRARY         commonengine.lib // StringLoader
+LIBRARY 	eikctl.lib
+LIBRARY         eikcdlg.lib
+LIBRARY         egul.lib // CGulIcon
+LIBRARY         fbscli.lib // CFbsBitmap
+LIBRARY         AknIcon.lib
+LIBRARY		aknskins.lib
+LIBRARY		aknskinsrv.lib
+LIBRARY		aknswallpaperutils.lib 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/simpsyconfigurator/group/simu_move_const.sps	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,10 @@
+Horizontal accuracy=10;
+Vertical accuracy=16;
+TimeToFix min=2;
+TimeToFix max=7;
+Powerup time=5;
+Longitude=23.9385;
+Latitude=61.5285;
+Speed=0;
+Course=113.9;
+Deterministic=0;
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/simpsyconfigurator/group/simu_move_speed.sps	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,10 @@
+Horizontal accuracy=12;
+Vertical accuracy=22;
+TimeToFix min=2;
+TimeToFix max=7;
+Powerup time=5;
+Longitude=56.3385;
+Latitude=78.3385;
+Speed=100;
+Course=113.9;
+Deterministic=0;
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/simpsyconfigurator/inc/simpsyfileselector.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,81 @@
+/*
+* 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:  Simulation PSY file selector dialog.
+*
+*/
+
+
+#ifndef C_SIMPSYFILESELECTOR_H
+#define C_SIMPSYFILESELECTOR_H
+
+// SYSTEM INCLUDES
+#include <e32base.h>
+#include <aknlists.h>
+
+// FORWARD DECLARATIONS
+class CSimPsyFileSelectorModel;
+
+/**
+ *  Simulation PSY configurator file selector dialog.
+ *  
+ *  This class provides the extension of single graphic style list box which is
+ *  used to display all the simulation psy files.
+ * 
+ *  @lib simpsyui.exe
+ *  @since S60 v3.2
+ */
+NONSHARABLE_CLASS( CSimPsyFileSelector ) : public CAknSingleGraphicPopupMenuStyleListBox
+    {
+public:
+    /**
+     * Overloaded constructor
+     */
+    CSimPsyFileSelector();
+
+    /**
+     * Second phase of the two phase constructor
+     */
+    void ConstructL( CCoeControl*              aParent );          
+
+    /**
+     * C++ Destructor.
+     * Frees all the resources associated with this object.
+     */
+    virtual ~CSimPsyFileSelector();
+    
+    /** 
+     * Returns the simulation file name corresponding to the
+     * selected item.
+     */
+    TPtrC SimulationFileNameL();
+    	    
+private: // Inherited from Base classes.
+    /**
+     * Imherited from CCoeControl.
+     */
+    void HandleResourceChange( TInt    aType );
+    
+    /**
+     * Updates the list box icons.
+     */
+    void UpdateIconsL();
+
+private: // data
+    /**
+     * Pop-up List box model.
+     */
+    CSimPsyFileSelectorModel*	    iListBoxModel;
+    };
+
+#endif // C_LCPOPUPLISTBOX_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/simpsyconfigurator/inc/simpsyfileselectormodel.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,112 @@
+/*
+* 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:  List-box model class for Simulation PSY file selector dialog.
+*
+*/
+
+
+#ifndef C_SIMPSYFILESELECTORMODEL_H
+#define C_SIMPSYFILESELECTORMODEL_H
+
+// SYSTEM INCLUDES
+#include <e32base.h>
+#include <bamdesca.h>
+
+/**
+ *  List-box model class for Simulation PSY file selector dialog.
+ *  
+ *  This class provides the implementation of the list-box model for Simulation
+ *  PSY file selector model. The class loads all the available Simulation PSY
+ *  files present in the system and allows the configure one of the Simulation
+ *  files for obtaining simulated Location information.
+ * 
+ *  @lib simpsyui.exe
+ *  @since S60 v3.2
+ */
+NONSHARABLE_CLASS( CSimPsyFileSelectorModel ) : public MDesCArray
+    {
+public:    
+    /**
+     * Constructs a new instance of Simulation PSY file selector list
+     * box model.
+     *
+     * @return The new instance of list-box model object.
+     * @leave System wide error code if the object creation fails.         
+     */
+    static CSimPsyFileSelectorModel* NewL();        
+
+    /**
+     * C++ Destructor.
+     * Frees all the resources associated with this object.
+     */
+    virtual ~CSimPsyFileSelectorModel();
+    
+    /** 
+     * Returns the simulation file name corresponding to the
+     * selected item.
+     *
+     * @param  aIndex Index of the item whose file name is requested
+     * @return TPtrC  File name at the requested index
+     */
+    TPtrC SimulationFileNameL( TInt aIndex );      
+        
+public: // Inherited from Base classes
+    /**
+     * Inherited from MDesCArray
+     */
+    virtual TInt MdcaCount() const;
+
+    /**
+     * Inherited from MDesCArray
+     */
+    virtual TPtrC16 MdcaPoint( TInt aIndex ) const;
+
+private:
+    /**
+     * Overloaded constructor
+     */
+    CSimPsyFileSelectorModel();
+
+    /**
+     * Second phase of the two phase constructor
+     */
+    void ConstructL();
+    
+    /**
+     * Gets the correct file path
+     */
+    void GetCorrectPathL( TFileName& aFilePath );
+    
+    /**
+     * Appends all the sps and nmea files in the specified
+     * path to the Filename array
+     */
+    void AppendFileL( const TDesC&	aDir );
+
+private: // data
+    
+    /**
+     * Buffer for packing the MdcaPoint
+     *
+     * Owns
+     */
+    HBufC16*					iBuffer;
+    
+    /**
+     * Simulation PSY File names
+     */
+	RArray< TFileName >			iFileNameArray;
+    };
+    
+#endif // C_SIMPSYFILESELECTORMODEL_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/simpsyconfigurator/inc/simpsyui.hrh	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,30 @@
+/*
+* 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:  Simulation PSY Configuration UI constant Definitions.
+*
+*/
+
+
+#ifndef SIMPSYUI_HRH_
+#define SIMPSYUI_HRH_
+
+#define ESimPsyCidFileEd 1
+
+enum TSimPsyCommandIds
+	{
+	ESimCmdConfigFile = 0x7600,
+	ESimCmdGetCurrentLocation
+	};
+	
+#endif //__SIMPSYUI_HRH__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/simpsyconfigurator/inc/simpsyuiao.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,141 @@
+/*
+* 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:  Active object interface for obtaining Location updates
+*
+*/
+
+
+#ifndef CSIMPSYUIAO_H_
+#define CSIMPSYUIAO_H_
+
+
+// System Includes
+#include <e32base.h>
+#include <lbs.h>
+#include <lbspositioninfo.h>
+
+// User Includes
+
+// Forward Declarations
+
+// Class Definition
+
+/**
+ * Observer to the SimPsyConfigurator Active Object
+ */
+class MSimPsyAOObserver
+    {
+    public:
+        /**
+         * Notifies that the previously issued Location request is complete
+         * This implies that the TPositionInfo passed to the Location request
+         * call is now populated with the current location information
+         */
+        virtual void NotifyLocationRequestCompletedL() = 0; 
+    };
+ 
+ 
+/**
+ * Interface class thats used to asynchronously obtain Location information.
+ * This class interacts with the Location Acquistion API and asynchronously
+ * obtains the current location
+ */
+class CSimPsyUiAO: public CActive
+    {
+    public:
+        /**
+ 		 * Static Two phase contructor that instantiates the CSimPsyUiAO
+		 * 
+		 * @param  aObserver    Observer to the Active object
+		 * @return CSimPsyUiAO*	Reference to the object created
+		 */
+        static CSimPsyUiAO* NewL( MSimPsyAOObserver&    aObserver );    
+    
+        /**
+         * Destructor
+         */        
+        ~CSimPsyUiAO();
+        
+        /**
+         * Obtains the current Location information using the Location
+         * Acquisition API. The function call is asynchronous and the
+         * notification regarding the completion of the operation is 
+         * provided through the MSimPsyAOObserver object
+         *
+         */
+        void GetCurrentLocationL();
+        
+        /**
+         * Cancels any outstanding Location request
+         */
+        void CancelLocationRequest();
+        
+        /**
+         * Displays the current Location
+         */
+        void DisplayCurrentLocationL();
+    
+	protected:
+	    /** 
+	     * Inherited from CActive
+	     */
+		void RunL();
+		
+		/**
+		 * Inherited from CActive
+		 */
+		void DoCancel();
+            
+    private:
+        /**
+         * Private Constructor
+         */
+        CSimPsyUiAO( MSimPsyAOObserver&    aObserver );
+        
+        /**
+         * Second phase of the two phase constructor
+         */
+        void ConstructL();
+        
+        /**
+         * Displays error note
+         *
+         * @param aErrorText Error text
+         */
+        void ShowErrorL(const TDesC& aErrorText);
+                      	
+    private:           
+        /**
+         * Reference to the Active object observer
+         */
+        MSimPsyAOObserver&          iObserver;
+        
+        /**
+         * Handle to the Location server session
+         * Owns
+         */
+        RPositionServer             iPositionServer;
+        
+        /**
+         * Handle to the Location server sub-session
+         */
+        RPositioner                 iPositioner;  
+        
+		/**
+		 * Position Info structure
+		 */
+		TPositionInfo           iPositionInfo;                         	
+    };
+
+#endif // CSIMPSYUIAO_H_
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/simpsyconfigurator/inc/simpsyuiapp.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,33 @@
+/*
+* 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:  Simulation PSY Configuration UI application class.
+*
+*/
+
+
+#ifndef  CSIMPSYUIAPPLICATION_H_
+#define  CSIMPSYUIAPPLICATION_H_
+
+#include "simpsyuiconsts.h"
+#include <aknapp.h>
+
+class CSimPsyUiApplication: public CAknApplication
+    {
+public:
+    CSimPsyUiApplication();
+    CApaDocument* CreateDocumentL();
+   	TUid AppDllUid() const { return TUid::Uid(KSimPsyUiAppUid);	};
+    };
+
+#endif // CSIMPSYUIAPPLICATION_H_
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/simpsyconfigurator/inc/simpsyuiappui.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,73 @@
+/*
+* 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:  Simulation PSY Configuration UI application AppUi class.
+*
+*/
+
+
+#ifndef CSIMPSYUIAPPUI_H_
+#define CSIMPSYUIAPPUI_H_
+
+#include <aknappui.h>
+#include <AknProgressDialog.h>
+
+#include "simpsyuicontainer.h"
+
+#include "simpsyuiao.h"
+
+class CAknDialog;
+class CAknWaitDialog;
+
+class CSimPsyUiAppUi: public CAknAppUi,
+                      public MSimPsyAOObserver,
+                      public MProgressDialogCallback
+    {
+    public:
+        CSimPsyUiAppUi();
+        ~CSimPsyUiAppUi();
+    public: //from CAknAppUi
+        void ConstructL();
+        void DynInitMenuPaneL(TInt /*aResourceId*/,
+        					  CEikMenuPane* /*aMenuPane*/);
+        TKeyResponse HandleKeyEventL(const TKeyEvent& /*aKeyEvent*/,
+        							 TEventCode /*aType*/);
+        void HandleCommandL(TInt aCommand);
+
+        /**
+         * Inherited from MSimPsyAOObserver
+         */
+        void NotifyLocationRequestCompletedL();
+
+        /**
+         * Inherited from MProgressDialogCallback
+         */
+        void  DialogDismissedL (TInt aButtonId);
+
+    private:
+        CSimPsyUiContainer* 	iAppContainer;
+
+        /**
+         * Active object interface to obtain Location information
+         * Owns
+         */
+        CSimPsyUiAO*            iLocationRequestor;
+
+        /**
+        * Wait Note
+        * Owns
+        */
+        CAknWaitDialog*					iWaitDialog; 	
+    };
+
+#endif // CSIMPSYUIAPPUI_H_
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/simpsyconfigurator/inc/simpsyuiconsts.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,24 @@
+/*
+* 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:  Simulation PSY Configuration UI application Constants.
+*
+*/
+
+
+#ifndef __SIMPSYUI_CONSTS_H__
+#define __SIMPSYUI_CONSTS_H__
+
+#define KSimPsyUiAppUid 0x101FD698
+
+#endif //__SIMPSYUI_CONSTS_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/simpsyconfigurator/inc/simpsyuicontainer.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,69 @@
+/*
+* 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:  Simulation PSY Configuration UI application container class.
+*
+*/
+
+
+#ifndef CSIMPSYUICONTAINER_H_
+#define CSIMPSYUICONTAINER_H_
+
+#include <coecntrl.h>
+#include <eiklbo.h>
+
+// FORWARD DECLARATIONS
+class CAknDoubleStyleListBox;
+class CSimPsyUiAppUi;
+
+class CSimPsyUiContainer : public CCoeControl
+    {
+public:
+    void ConstructL(const TRect& 			aRect,
+    					  CSimPsyUiAppUi*	aAppUi);
+    
+    ~CSimPsyUiContainer();
+    
+	TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType);
+
+	void	UpdateListBox();
+
+protected:
+	void FocusChanged(TDrawNow aDrawNow);
+	void HandleResourceChange(TInt aType);
+	
+private: // From CCoeControl
+    /**
+     * From CoeControl,SizeChanged.
+     */
+    void SizeChanged();
+
+    /**
+     * From CoeControl,CountComponentControls.
+     */
+    TInt CountComponentControls() const;
+
+    /**
+     * From CCoeControl,ComponentControl.
+     */
+    CCoeControl* ComponentControl(TInt aIndex) const;	
+    
+private:
+	void CreateListboxL();
+	
+private: //data
+	CAknDoubleStyleListBox* iListBox;
+	CSimPsyUiAppUi*			iAppUi;
+    };
+
+#endif // CSIMPSYUICONTAINER_H_
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/simpsyconfigurator/inc/simpsyuidocument.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,32 @@
+/*
+* 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:  Simulation PSY Configuration UI application document class.
+*
+*/
+
+
+#ifndef CSIMPSYUIAPPDOCUMENT_H_
+#define CSIMPSYUIAPPDOCUMENT_H_
+
+#include <AknDoc.h>
+
+class CSimPsyUiAppDocument: public CAknDocument
+    {
+ public:
+    CSimPsyUiAppDocument(CEikApplication& aApp):CAknDocument(aApp){};
+ private: // from CAknDocument
+    CEikAppUi* CreateAppUiL();
+    };
+
+#endif // CSIMPSYUIAPPDOCUMENT_H_
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/simpsyconfigurator/inc/simpsyuilbmodel.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,81 @@
+/*
+* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Provides SimPsyUi listbox model that holds the
+*				          currently selected NMEA File.
+*
+*/
+
+
+#ifndef CSIMPSYUILBMODEL_H_
+#define CSIMPSYUILBMODEL_H_
+
+// INCLUDES
+#include <e32base.h>    // CBase
+#include <bamdesca.h>  	// MDesCArray
+
+// CLASS DECLARATION
+/**
+*  CSimPsyUiLBModel    
+*/
+
+class CSimPsyUiLBModel : public CBase, public MDesCArray
+	{
+	public: // Constructors and destructor
+		/**
+        * Two-phased constructor
+        */
+        static CSimPsyUiLBModel* NewLC();
+
+       /**
+        * Two-phased constructor
+        */
+        static CSimPsyUiLBModel* NewL();
+
+        /**
+        * Destructor.
+        */
+        ~CSimPsyUiLBModel();
+        
+	private:
+		/**
+		* Second phase of the two phase constructor
+		*/
+		void ConstructL();
+
+		/**
+		* C++ default constructor.
+		*/
+		CSimPsyUiLBModel();
+		
+	private: // From MDesCArray
+        TInt MdcaCount() const;
+        
+        TPtrC16 MdcaPoint( TInt aIndex ) const;
+      
+   	private:
+   		TPtrC16 MdcaPointL( TInt aIndex ) const;
+   		
+	private: //data
+
+        // Owns: Data Buffer holding the name of the currently
+        //		 selected NMEA file.
+        HBufC* iBuffer;
+        
+        // Owns: Sim PSY FileName
+        HBufC* iFileNameText;
+	};
+
+#endif // CSIMPSYUILBMODEL_H_
+
+// End of File SimPsyUiLBModel.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/simpsyconfigurator/inc/simpsyuiloc.h	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,128 @@
+/*
+* 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:  This is a localisation file for SimPsyConfigurator reference application.
+*
+*/
+
+
+/**
+ *  Default (implementation English) Resource localisation file.
+ */
+
+//  LOCALISATION STRINGS  
+
+//d:SimPsyConfigurator application name
+//d:in the App Shell grid
+//l: cell_app_pane_1
+//
+#define qtn_simpsyui_grid          "SimPsyConfigurator"
+
+//d:SimPsyConfigurator application name
+//d:in the App Shell list
+//l: list_single_large_graphic_pane_1
+//
+#define qtn_simpsyui_list          "SimPsyConfigurator"
+
+//d:File Name List header
+//r:3.0
+//
+#define qtn_simpsyui_filename_text "Sim PSY FileName"
+
+//d:Options menu item for selecting a NMEA file
+//l:list_single_popup_menu_pane_1
+//r:3.0
+//
+#define qtn_simpsyui_opt_config_file "Select config file"
+
+//d:Options menu item for getting current Location
+//l:list_single_popup_menu_pane_1
+//r:3.0
+//
+#define qtn_simpsyui_opt_current_location "Get location"
+
+//d:Settings editor prompt
+//r:3.0
+//
+#define qtn_simpsyui_location_dlg_label "Location info"
+
+//d:Options menu item to popup configuration dialog
+//l:list_single_popup_menu_pane_1
+//r:3.0
+//
+#define qtn_simpsyui_opt_configuration "Configuration"
+
+//d:Heading text for the location dialog
+//l:popup_note_window_1
+//r:3.0
+//
+#define qtn_simpsyui_location_dlg_heading "Position: "
+//d:Note text when connection to server returns error
+//l:popup_note_window_1
+//r:3.0
+//
+#define qtn_simpsyui_serv_connect_err "Error Connecting to server: %0N"
+
+//d:Note text when opening Simulation PSY returns error
+//l:popup_note_window_1
+//r:3.0
+//
+#define qtn_simpsyui_psy_open_err "Error opening Simulation PSY: %0N"
+
+//d:Note text when settings requestor information returns error
+//l:popup_note_window_1
+//r:3.0
+//
+#define qtn_simpsyui_setting_requestor_err "Error Setting requestor: %0N"
+
+//d:Note text when getting location information returns error
+//l:popup_note_window_1
+//r:3.0
+//
+#define qtn_simpsyui_get_location_err "Error Getting Simulated Location: %0N"
+
+//d:Heading text for item in List Dialog
+//l:list_single_heading_pane_1
+//r:3.0
+//
+#define qtn_simpsyui_location_info_latitude "Latitude"
+
+//d:Heading text for item in List Dialog
+//l:list_single_heading_pane_1
+//r:3.0
+//
+#define qtn_simpsyui_location_info_longitude "Longitude"
+
+//d:Heading text for item in List Dialog
+//l:list_single_heading_pane_1
+//r:3.0
+//
+#define qtn_simpsyui_location_info_altitude "Altitude"
+
+//d:Heading text for item in List Dialog
+//l:list_single_heading_pane_1
+//r:3.0
+//
+#define qtn_simpsyui_location_info_horz_accuracy "Hor.Accuracy"
+
+//d:Heading text for item in List Dialog
+//l:list_single_heading_pane_1
+//r:3.0
+//
+#define qtn_simpsyui_location_info_vert_accuracy "Ver.Accuracy"
+
+//d:Wait note text when waiting response for a location request.
+//l:popup_note_wait_window_1
+//r:3.2
+//
+#define qtn_simpsyui_wait_requesting_location	"Requesting Location"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/simpsyconfigurator/install/simpsyconfigurator.pkg	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,53 @@
+;
+; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of "Eclipse Public License v1.0"
+; which accompanies this distribution, and is available
+; at the URL "http://www.eclipse.org/legal/epl-v10.html".
+;
+; Initial Contributors: Package file for simpsyconfigurator
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description: 
+;
+&EN
+;
+; UID is the app's UID
+;
+#{"SimPsyConfigurator"},(0x101FD698),2,0,0,TYPE=SA
+;
+; Localised Vendor name
+%{"Nokia-EN"}
+
+; Unique Vendor name
+:"Nokia"
+
+;Supports Series 60 v 3.0
+;This line indicates that this installation is for the Series 60 platform v3.0
+;This line must appear _exactly_ as shown below in the sis file
+;If this line is missing or incorrect, the sis file will not be able
+;to be installed on Series 60 v3.0 platforms
+;(0x101F7961), 0, 0, 0, {"Series60ProductID"}
+;
+;
+
+; Check if MLFW library is present otherwise don't install SimPsyConfigurator.
+; It is not useful.
+IF EXISTS("z:\sys\bin\EPosServer.exe")
+
+; File to install
+
+; Install Simulation PSY Configurator application files
+"\epoc32\release\armv5\urel\simpsyui.exe"                      -"!:\sys\bin\simpsyui.exe"
+"\epoc32\data\z\private\10003a3f\apps\simpsyui_reg.rsc"        -"!:\private\10003a3f\import\apps\simpsyui_reg.rsc"
+"\epoc32\data\z\resource\apps\simpsyui.rsc"                    -"!:\resource\apps\simpsyui.rsc"
+
+; Initial Set of Data files
+"\epoc32\release\winscw\udeb\z\system\data\nmea.nme"	        -"!:\system\data\nmea.nme"
+"\epoc32\release\winscw\udeb\z\system\data\simu_move_const.sps"	-"!:\system\data\simu_move_const.sps"
+"\epoc32\release\winscw\udeb\z\system\data\simu_move_speed.sps"	-"!:\system\data\simu_move_speed.sps"
+
+ENDIF
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/simpsyconfigurator/src/simpsyfileselector.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,164 @@
+/*
+* 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:  Simulation PSY file selector dialog.
+*
+*/
+
+
+// SYSTEM INCLUDES 
+#include <AknIconArray.h>		// Icon Array
+#include <eikclbd.h>			// Column Listbox
+#include <aknlists.h>           // CAknPopupList
+#include <aknconsts.h>
+#include <AknIconArray.h>
+#include <AknsUtils.h>
+#include <AknsConstants.h>
+#include <avkon.mbg>
+#include <gulicon.h>
+#include <fbs.h>
+
+// USER INCLUDES
+#include "simpsyfileselector.h"
+#include "simpsyfileselectormodel.h"
+
+// ========================= MEMBER FUNCTIONS ================================
+
+// ---------------------------------------------------------------------------
+// CSimPsyFileSelector::CSimPsyFileSelector
+// ---------------------------------------------------------------------------
+//
+CSimPsyFileSelector::CSimPsyFileSelector()
+    {
+    // C++ Default constructor. No allocations or functions which can Leave
+    // should be called from here.
+    }
+
+// ---------------------------------------------------------------------------
+// CSimPsyFileSelector::~CSimPsyFileSelector
+// ---------------------------------------------------------------------------
+//
+CSimPsyFileSelector::~CSimPsyFileSelector()
+    {
+    // C++ Destructor. Free all resources associated with this class.
+    
+    // Delete the List box model.
+    delete iListBoxModel;
+    }
+
+// ---------------------------------------------------------------------------
+// void CSimPsyFileSelector::ConstructL
+// ---------------------------------------------------------------------------
+//
+void CSimPsyFileSelector::ConstructL( CCoeControl*   aParent )
+    {
+    // Create the list box model
+    iListBoxModel = CSimPsyFileSelectorModel::NewL();
+    
+    CAknSingleGraphicPopupMenuStyleListBox::ConstructL( aParent, EAknListBoxMenuList );
+    
+    CreateScrollBarFrameL( ETrue );
+    ScrollBarFrame()->SetScrollBarVisibilityL( CEikScrollBarFrame::EOff,
+                                               CEikScrollBarFrame::EAuto ); 
+     
+    UpdateIconsL();
+
+    Model()->SetItemTextArray( iListBoxModel );  
+    Model()->SetOwnershipType( ELbmDoesNotOwnItemArray );
+    
+    ActivateL();
+    }
+
+// ---------------------------------------------------------------------------
+// void CSimPsyFileSelector::UpdateIconsL
+// ---------------------------------------------------------------------------
+//
+void CSimPsyFileSelector::UpdateIconsL()
+	{
+    // Add icons to listbox
+    CAknIconArray* iconArray = new( ELeave ) CAknIconArray( 1 );
+    CleanupStack::PushL( iconArray );
+
+    CFbsBitmap* bitmap = NULL;
+    CFbsBitmap* mask = NULL;
+    AknsUtils::CreateIconL( AknsUtils::SkinInstance(), 
+                            KAknsIIDQgnPropNrtypNote,
+                            bitmap,
+                            mask,
+                            KAvkonBitmapFile,
+                            EMbmAvkonQgn_prop_nrtyp_note,
+                            EMbmAvkonQgn_prop_nrtyp_note_mask );
+    CleanupStack::PushL( bitmap );
+    CleanupStack::PushL( mask );
+
+    // Ownership is transferred to CGulIcon
+    CGulIcon* icon = CGulIcon::NewL( bitmap, mask );
+    CleanupStack::Pop( 2 ); // mask, bitmap
+    CleanupStack::PushL( icon );
+    iconArray->AppendL( icon ); // Ownership is transferred to CAknIconArray
+    CleanupStack::Pop( icon ); // icon
+	
+    // Get old icons and delete those. This is done because SetIconArray will
+    // not do it.
+    CAknIconArray* oldIcons = 
+    	static_cast<CAknIconArray*>( ItemDrawer()->ColumnData()->IconArray());
+    	
+	delete oldIcons;
+	
+    //Set New Icons to array
+    ItemDrawer()->ColumnData()->SetIconArray( iconArray );  
+    CleanupStack::Pop( iconArray );
+    	 
+	// Enable Marquee scrolling
+	ItemDrawer()->ColumnData()->EnableMarqueeL( ETrue );	    	    	
+    		
+    DrawDeferred();
+	}
+	
+// ---------------------------------------------------------------------------
+//TPtrC CSimPsyFileSelector::SimulationFileNameL
+// ---------------------------------------------------------------------------
+//
+TPtrC CSimPsyFileSelector::SimulationFileNameL()
+	{   	
+	return iListBoxModel->SimulationFileNameL( CurrentItemIndex());
+	}
+
+// ---------------------------------------------------------------------------
+// void CSimPsyFileSelector::HandleResourceChange
+// ---------------------------------------------------------------------------
+//
+void CSimPsyFileSelector::HandleResourceChange( TInt    aType )
+    {
+    // Pass the event to the base class
+    CCoeControl::HandleResourceChange( aType );
+    switch( aType )
+        {
+        // Dynamic Layout switch and Skin Change
+        case KEikDynamicLayoutVariantSwitch:
+            {
+            SetRect( Rect());
+            break;
+            }
+        case KAknsMessageSkinChange:
+            {
+            TRAP_IGNORE( UpdateIconsL());
+            break;
+            }
+        default:
+            {
+            break;
+            }
+        } 
+    DrawDeferred();
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/simpsyconfigurator/src/simpsyfileselectormodel.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,209 @@
+/*
+* 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:  List-box model class for Simulation PSY file selector dialog.
+*
+*/
+
+
+// SYSTEM INCLUDES
+#include <eikappui.h>
+#include <eikenv.h>
+#include <eikapp.h>
+
+// USER INCLUDES
+#include "simpsyfileselectormodel.h"
+
+// CONSTANT DEFINTION
+const TInt KSimPsyBufferSize = 128;
+const TInt KSimPsyFileIconId = 0;
+_LIT( KNmeaFilePath1,"\\system\\data\\" );
+_LIT( KNmeaFilePath2,"\\data\\SimFile\\" );
+_LIT( KSPSFileExtension, ".SPS");
+_LIT( KNMEAFileExtension, ".NME");
+
+// ========================= MEMBER FUNCTIONS ================================
+
+// ---------------------------------------------------------------------------
+// CSimPsyFileSelectorModel::CSimPsyFileSelectorModel
+// ---------------------------------------------------------------------------
+//
+CSimPsyFileSelectorModel::CSimPsyFileSelectorModel()
+    {
+    // C++ Default constructor. No allocations or functions which can Leave
+    // should be called from here.
+    }
+
+// ---------------------------------------------------------------------------
+// CSimPsyFileSelectorModel::~CSimPsyFileSelectorModel
+// ---------------------------------------------------------------------------
+//
+CSimPsyFileSelectorModel::~CSimPsyFileSelectorModel()
+    {
+    // C++ Destructor. Free all resources associated with this class.
+    
+    // Delete the MdcaPoint buffer
+    delete iBuffer;
+    
+    // Reset and close the file name array
+    iFileNameArray.Reset();
+    iFileNameArray.Close();
+    }
+
+// ---------------------------------------------------------------------------
+// void CSimPsyFileSelectorModel::ConstructL
+// ---------------------------------------------------------------------------
+//
+void CSimPsyFileSelectorModel::ConstructL()
+    {
+    // Create the Buffer for packing the MdcaPoint
+    iBuffer = HBufC16::NewL( KSimPsyBufferSize );
+    
+    TRAP_IGNORE( AppendFileL( KNmeaFilePath2 ));    
+	TRAP_IGNORE( AppendFileL( KNmeaFilePath1 ));           
+    }
+
+// ---------------------------------------------------------------------------
+// CSimPsyFileSelectorModel* CSimPsyFileSelectorModel::NewL
+// ---------------------------------------------------------------------------
+//
+CSimPsyFileSelectorModel* CSimPsyFileSelectorModel::NewL()
+    {
+    CSimPsyFileSelectorModel* self = new ( ELeave ) CSimPsyFileSelectorModel();
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+// ---------------------------------------------------------------------------
+// TPtrC CSimPsyFileSelectorModel::SimulationFileNameL
+// ---------------------------------------------------------------------------
+//
+TPtrC CSimPsyFileSelectorModel::SimulationFileNameL( TInt aIndex )
+	{   	
+	if ( aIndex < 0 || aIndex > ( iFileNameArray.Count() - 1 ))
+	    {
+	    User::Leave( KErrArgument );
+	    }
+	return ( iFileNameArray[ aIndex ]);
+	}
+	
+// ---------------------------------------------------------------------------
+// TInt CSimPsyFileSelectorModel::MdcaCount
+// ---------------------------------------------------------------------------
+//
+TInt CSimPsyFileSelectorModel::MdcaCount() const
+    {
+    return iFileNameArray.Count();    	
+    }
+    
+// ---------------------------------------------------------------------------
+// TPtrC16 CSimPsyFileSelectorModel::MdcaPoint
+// ---------------------------------------------------------------------------
+//
+TPtrC16 CSimPsyFileSelectorModel::MdcaPoint( TInt aIndex ) const
+    {            
+    // Pack the contents into the Buffer. We dont have to re-allocate the buffer
+    // everytime because the length of the name field is restricted in the
+    // Location Centre Registration API
+		    
+    // Tabulator Defintion
+    _LIT( KTab, "\t" );
+    
+    // Create formatted item string.
+    // list_single_large_pane:
+    // list item string format: "0\tTextLabel"
+    // where 0 is an index to icon array
+	TPtr16	buf( iBuffer->Des());
+	buf.Zero();
+	
+	// Append the Icon Index
+	buf.AppendNum( KSimPsyFileIconId );
+	
+	// Append the Tab Key
+	buf.Append( KTab );
+	
+	// Append only the file name without the full path.
+    TParsePtrC parsedEntry( iFileNameArray[ aIndex ] );
+    TPtrC fileName( parsedEntry.NameAndExt() );    	        	
+	buf.Append( fileName );
+	
+    return buf;
+    }			
+
+// ---------------------------------------------------------------------------
+// void CSimPsyFileSelectorModel::GetCorrectPathL
+// ---------------------------------------------------------------------------
+//
+void CSimPsyFileSelectorModel::GetCorrectPathL( TFileName& aFilePath )
+	{
+    CEikAppUi* appUi = 
+    		static_cast< CEikAppUi* >( CEikonEnv::Static()->AppUi());
+    TFileName* dllDrive = 
+    	new( ELeave ) TFileName( appUi->Application()->AppFullName());
+    CleanupStack::PushL( dllDrive );
+	
+	TParse parse;
+	User::LeaveIfError( parse.Set( *dllDrive, NULL, NULL ));
+    User::LeaveIfError( parse.Set( parse.Drive(), &aFilePath, NULL ));
+	aFilePath = parse.FullName();
+	CleanupStack::PopAndDestroy( dllDrive );
+	}
+
+// ---------------------------------------------------------------------------
+// void CSimPsyFileSelectorModel::AppendFileL
+// ---------------------------------------------------------------------------
+//	
+void CSimPsyFileSelectorModel::AppendFileL( const TDesC&	aDir )
+	{
+    // Open up a session to the file server
+    RFs	fs;
+    User::LeaveIfError( fs.Connect());
+    CleanupClosePushL( fs );
+        
+    // Obtain a list of entries for the system\data folder
+    TFileName folder( aDir );
+    GetCorrectPathL( folder );        
+    CDir* entryList = NULL;
+    User::LeaveIfError( fs.GetDir( folder, 
+    							   KEntryAttNormal, 
+    							   ESortNone,
+    							   entryList ));
+	// The scan was successful
+	CleanupStack::PushL( entryList );
+	TInt count = entryList->Count();
+	for ( TInt i = 0; i < count; i++ )
+		{
+		TFileName filename ((( *entryList)[i]).iName);
+		filename.UpperCase();
+		
+		// Check for the extension. The extension can be only .sps or
+		// .nme
+		TParsePtrC parsedEntry( filename );
+		TPtrC ext( parsedEntry.Ext());     	
+    	if ( !ext.Compare( KSPSFileExtension ) || 
+    		 !ext.Compare( KNMEAFileExtension ) )
+    		{
+    		// SPS or NMEA file. Append to the File name array.
+    		filename.Zero();
+    		filename.Copy( folder );
+    		filename.Append((( *entryList)[i]).iName );
+    		iFileNameArray.Append( filename );
+    		}
+		}
+	CleanupStack::PopAndDestroy( entryList );
+	
+    // Pop and destroy the file session	
+    CleanupStack::PopAndDestroy();		
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/simpsyconfigurator/src/simpsyuiao.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,308 @@
+/*
+* 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:  Active object interface for obtaining Location updates
+*
+*/
+
+
+// System Includes
+#include <StringLoader.h> // StringLoader
+#include <simpsyui.rsg>
+#include <aknnotedialog.h>
+#include <AknQueryDialog.h>
+    
+// User Includes
+#include "simpsyuiao.h"
+
+// Constant Defintions
+const TInt KFormatStringLength		= 200;
+const TInt KFormatCharacterWidth	= 10;
+const TInt KPositionDataGranularity = 6;
+const TInt KFormatDecimalNumbers	= 4;
+
+_LIT( KTabulator, "\t" );
+_LIT( KSimPsyConfiguratorName, "SimPsyConfigurator");
+
+// ---------------------------------------------------------------------------
+// Private Constructor
+// ---------------------------------------------------------------------------
+//
+CSimPsyUiAO::CSimPsyUiAO( MSimPsyAOObserver&    aObserver )
+	:CActive( EPriorityStandard ),
+	iObserver( aObserver )
+    {
+    }
+ 
+// ---------------------------------------------------------------------------
+// Destructor
+// ---------------------------------------------------------------------------
+//    
+CSimPsyUiAO::~CSimPsyUiAO()
+    {
+    Cancel();
+    } 
+
+// ---------------------------------------------------------------------------
+// CSimPsyUiAO* CSimPsyUiAO::NewL
+// Static Two phase contructor that instantiates the CSimPsyUiAO
+// 
+// @param aObserver				    Observer to the Active object
+// @return CSimPsyUiAO*	Reference to the object created
+// ---------------------------------------------------------------------------
+//    
+CSimPsyUiAO* CSimPsyUiAO::NewL( MSimPsyAOObserver&    aObserver )
+    {
+    CSimPsyUiAO* self = new ( ELeave ) CSimPsyUiAO( aObserver );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop( self );
+
+    return self;
+    }
+
+// ---------------------------------------------------------------------------
+// void CSimPsyUiAO::ConstructL
+// Second phase of the two phase constructor
+// ---------------------------------------------------------------------------
+// 
+void CSimPsyUiAO::ConstructL()
+    {    
+    CActiveScheduler::Add( this );
+    }           
+
+// ---------------------------------------------------------------------------
+// void CSimPsyUiAO::Initialize
+// Obtains the current Location information using the Location
+// Acquisition API. The function call is asynchronous and the
+// notification regarding the completion of the operation is 
+// provided through the MSimPsyAOObserver object
+//
+// ---------------------------------------------------------------------------
+//
+void CSimPsyUiAO::GetCurrentLocationL()
+    {
+    
+    // Leave if there is an outstanding Location request
+    if( IsActive())
+        {
+        User::Leave( KErrInUse );
+        }
+    
+    TPositionModuleId KUidSimulationPsy = { 0x101f7a81 };
+    TBuf<KFormatStringLength> buf;
+            
+    // Initialize the Location Server session
+    TInt error = iPositionServer.Connect();
+	if ( KErrNone != error )
+		{
+		// Show error to the user and break
+    	HBufC* formatString = StringLoader::LoadL( R_SIMPSYUI_SERV_CONNECT_ERR );
+    	StringLoader::Format( buf, *formatString,0, error );
+		delete formatString;
+    	ShowErrorL(buf);
+		User::Leave( KErrCouldNotConnect );
+		}
+
+    // Get current Location using the SimulationPSY module
+    error = iPositioner.Open( iPositionServer, KUidSimulationPsy );
+    
+    // The opening of a subsession failed
+    if ( KErrNone != error )
+        {
+        // Show error to the user and return
+        iPositionServer.Close();
+    	HBufC* formatString = StringLoader::LoadL( R_SIMPSYUI_PSY_OPEN_ERR );
+    	StringLoader::Format( buf, *formatString,0, error );
+		delete formatString;
+    	ShowErrorL(buf);
+    	User::Leave( KErrAbort );
+        }
+
+    // Set Requestor information
+    error = iPositioner.SetRequestor( CRequestor::ERequestorService, 
+    							      CRequestor::EFormatApplication, 
+    							      KSimPsyConfiguratorName );
+    // The requestor could not be set
+    if ( KErrNone != error )
+        {
+        // Show error to the user and return
+        iPositioner.Close();
+        iPositionServer.Close();
+    	HBufC* formatString = StringLoader::LoadL( R_SIMPSYUI_SETTING_REQUESTOR_ERR );
+    	StringLoader::Format( buf, *formatString,0, error );
+		delete formatString;
+    	ShowErrorL(buf);
+        User::Leave( KErrAbort );
+        }
+  
+    iPositioner.NotifyPositionUpdate( iPositionInfo, iStatus );
+    SetActive();                                            
+    }
+
+// ---------------------------------------------------------------------------
+// void CSimPsyUiAO::CancelLocationRequest
+// Cancels any outstanding Location request
+// ---------------------------------------------------------------------------
+//
+void CSimPsyUiAO::CancelLocationRequest()
+    {
+    Cancel();
+    }
+   
+// ---------------------------------------------------------------------------
+// void CSimPsyUiAO::DisplayCurrentLocation
+// Displays the current Location
+// ---------------------------------------------------------------------------
+//
+void CSimPsyUiAO::DisplayCurrentLocationL()
+    {
+    TPosition pos;
+    iPositionInfo.GetPosition( pos );    
+    TInt dummy = 0;
+    HBufC* formatString = NULL;
+    CAknListQueryDialog* dlg = new( ELeave ) CAknListQueryDialog( &dummy );
+    dlg->PrepareLC( R_SIMPSYUI_LOCATION_DIALOG );
+
+    TReal64 latitude = pos.Latitude();
+    TReal64 longitude = pos.Longitude();
+    TReal32 altitude = pos.Altitude();
+    TReal32 hAccuracy = pos.HorizontalAccuracy();
+    TReal32 vAccuracy = pos.VerticalAccuracy();
+
+    TRealFormat formatter( KFormatCharacterWidth,KFormatDecimalNumbers );
+    TBuf<KFormatStringLength> buf;
+    CDesCArrayFlat* locData =
+        new( ELeave ) CDesCArrayFlat( KPositionDataGranularity );
+    CleanupStack::PushL( locData );
+
+    buf.Zero();
+    formatString = StringLoader::LoadL( R_SIMPSYUI_LOCATION_INFO_LATITUDE );
+    buf.Copy(*formatString);
+    delete formatString;
+    buf.Append( KTabulator );
+    buf.AppendNum( latitude, formatter );
+    locData->AppendL( buf );
+
+    buf.Zero();
+    formatString = StringLoader::LoadL( R_SIMPSYUI_LOCATION_INFO_LONGITUDE );
+    buf.Copy(*formatString);
+    delete formatString;
+    buf.Append( KTabulator );
+    buf.AppendNum( longitude, formatter );
+    locData->AppendL( buf );
+
+    buf.Zero();
+    formatString = StringLoader::LoadL( R_SIMPSYUI_LOCATION_INFO_ALTITUDE );
+    buf.Copy(*formatString);
+    delete formatString;
+    buf.Append( KTabulator );
+    buf.AppendNum( altitude, formatter );
+    locData->AppendL( buf );
+
+    buf.Zero();
+    formatString = StringLoader::LoadL( R_SIMPSYUI_LOCATION_INFO_HORZ_ACCURACY );
+    buf.Copy(*formatString);
+    delete formatString;
+    buf.Append( KTabulator );
+    buf.AppendNum( hAccuracy, formatter );
+    locData->AppendL( buf );
+
+    buf.Zero();
+    formatString = StringLoader::LoadL( R_SIMPSYUI_LOCATION_INFO_VERT_ACCURACY );
+    buf.Copy(*formatString);
+    delete formatString;
+    buf.Append( KTabulator );
+    buf.AppendNum( vAccuracy, formatter );
+    locData->AppendL( buf );
+    
+    CleanupStack::Pop( locData );
+    dlg->SetItemTextArray( locData );
+    dlg->SetOwnershipType( ELbmOwnsItemArray );
+
+    dlg->RunLD();
+    }
+    
+        
+// ---------------------------------------------------------------------------
+// void CSimPsyUiAO::RunL
+// Inherited from CActive
+// ---------------------------------------------------------------------------
+// 
+void CSimPsyUiAO::RunL()
+    {   
+    switch( iStatus.Int())
+        {
+        case KErrNone:
+            {
+            // Close the server sessions
+            iPositioner.Close();
+            iPositionServer.Close();            
+            iObserver.NotifyLocationRequestCompletedL();
+            break;
+            }
+        case KErrCancel:
+            {
+            // There is no need of closing the sessions incase of Cancel since
+            // the sessions are closed as a part of DoCancel
+            break;
+            }
+        default:
+            {
+            // Close the server sessions
+            iPositioner.Close();
+            iPositionServer.Close();
+        	TBuf<KFormatStringLength> buf;
+        	// Display Error Code and Break
+        	HBufC* formatString = StringLoader::LoadL( R_SIMPSYUI_GET_LOCATION_ERR );
+        	StringLoader::Format( buf, *formatString,0, iStatus.Int() );
+        	delete formatString;
+        	ShowErrorL(buf);
+        	break;				
+    	    }
+        }        
+                    
+    }
+
+// ---------------------------------------------------------------------------
+// void CSimPsyUiAO::DoCancel
+// Inherited from CActive
+// ---------------------------------------------------------------------------
+//     
+void CSimPsyUiAO::DoCancel()
+    {
+    iPositioner.CancelRequest( EPositionerNotifyPositionUpdate );
+    // Close the server sessions
+    iPositioner.Close();
+    iPositionServer.Close();           
+    }
+    
+// ---------------------------------------------------------------------------
+// void CSimPsyUiAO::ShowErrorL
+// Displays error note
+//
+// @param aErrorText Error text
+// ---------------------------------------------------------------------------
+//
+void CSimPsyUiAO::ShowErrorL(const TDesC& aErrorText)
+    {
+	CAknNoteDialog* note = new( ELeave ) CAknNoteDialog( CAknNoteDialog::EErrorTone,
+                CAknNoteDialog::ENoTimeout );
+	            CleanupStack::PushL( note );
+	note->SetTextWrapping( ETrue );
+	note->PrepareLC( R_SIMPSYUI_ERROR_NOTE );
+	note->SetTextL( aErrorText );
+	CleanupStack::Pop( note );
+	note->RunLD();
+	return;    
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/simpsyconfigurator/src/simpsyuiapp.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,59 @@
+/*
+* 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:  Simulation PSY Configuration UI application class definition.
+*
+*/
+
+
+#include <eikstart.h>
+#include "simpsyuiapp.h"
+#include "simpsyuidocument.h"
+
+// ---------------------------------------------------------
+// CSimPsyUiApplication::CSimPsyUiApplication
+// ---------------------------------------------------------
+//
+CSimPsyUiApplication::CSimPsyUiApplication()
+	{
+	}
+
+// ---------------------------------------------------------
+// CApaDocument* CSimPsyUiApplication::CreateDocumentL
+// ---------------------------------------------------------
+//
+CApaDocument* CSimPsyUiApplication::CreateDocumentL()
+	{
+	return new (ELeave) CSimPsyUiAppDocument(*this);
+	}
+
+// ---------------------------------------------------------
+// LOCAL_C CApaApplication* NewApplication
+// ---------------------------------------------------------
+//	
+LOCAL_C CApaApplication* NewApplication()
+	{
+	return new CSimPsyUiApplication();
+	}	
+
+// ---------------------------------------------------------
+// GLDEF_C TInt E32Main
+// ---------------------------------------------------------
+//	
+GLDEF_C TInt E32Main()
+    {
+    RDebug::Print(_L("SimPsyUiApplication::E32Main\n"));
+    return EikStart::RunApplication(NewApplication);
+    }
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/simpsyconfigurator/src/simpsyuiappui.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,222 @@
+/*
+* 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:  Simulation PSY Configuration UI server application class.
+*
+*/
+
+
+// SYSTEM INCLUDES
+#include <eikenv.h>
+#include <eikapp.h>
+#include <aknenv.h>
+#include <AknForm.h>
+#include <AknWaitDialog.h>
+#include <StringLoader.h> // StringLoader
+#include <CAknFileSelectionDialog.h>
+#include <centralrepository.h>
+#include <lbspositioninfo.h>
+#include <simpsyui.rsg>
+#include <aknPopup.h>
+
+// USER INCLUDES
+#include "simpsyuiappui.h"
+#include "simpsyui.hrh"
+#include "simpsyuicontainer.h"
+#include "simpsyuiao.h"
+#include "simpsyfileselector.h"
+#include "SimulationPSYInternalCRKeys.h"
+
+
+// CONSTANT DEFINTIONS
+_LIT(KSelectDialogTitle, "Select file");
+	
+// ---------------------------------------------------------
+// CSimPsyUiAppUi::CSimPsyUiAppUi
+// ---------------------------------------------------------
+//
+CSimPsyUiAppUi::CSimPsyUiAppUi()
+	{
+	}
+
+// ---------------------------------------------------------
+// CSimPsyUiAppUi::~CSimPsyUiAppUi
+// ---------------------------------------------------------
+//
+CSimPsyUiAppUi::~CSimPsyUiAppUi()
+	{				
+    if (iAppContainer)
+        {
+        RemoveFromStack(iAppContainer);
+        delete iAppContainer;
+        }
+    
+    if ( iWaitDialog )
+        {
+        TRAPD( err, iWaitDialog->ProcessFinishedL() );
+        if (err != KErrNone)
+    		{
+			delete iWaitDialog;
+			iWaitDialog = NULL;
+			}
+	    }
+	    	        
+    delete iLocationRequestor;
+    iLocationRequestor = NULL;        
+	}
+
+// ---------------------------------------------------------
+// void CSimPsyUiAppUi::ConstructL
+// ---------------------------------------------------------
+//
+void CSimPsyUiAppUi::ConstructL()
+    {
+    BaseConstructL( EAknEnableSkin | EAknEnableMSK );
+    iAppContainer = new (ELeave) CSimPsyUiContainer ;
+    iAppContainer->ConstructL( ClientRect() , this) ;
+    AddToStackL( iAppContainer );
+    
+    iLocationRequestor = CSimPsyUiAO::NewL( *this );    
+    }
+
+// ---------------------------------------------------------
+// void CSimPsyUiAppUi::DynInitMenuPaneL
+// ---------------------------------------------------------
+//	
+void CSimPsyUiAppUi::DynInitMenuPaneL(
+    TInt /*aResourceId*/,CEikMenuPane* /*aMenuPane*/)
+    {
+    }
+
+// ---------------------------------------------------------
+// TKeyResponse CSimPsyUiAppUi::HandleKeyEventL
+// ---------------------------------------------------------
+//
+TKeyResponse CSimPsyUiAppUi::HandleKeyEventL(
+    const TKeyEvent& /*aKeyEvent*/,TEventCode /*aType*/)
+    {
+    return EKeyWasNotConsumed;
+    }
+
+// ---------------------------------------------------------
+// void CSimPsyUiAppUi::HandleCommandL
+// ---------------------------------------------------------
+//
+void CSimPsyUiAppUi::HandleCommandL( TInt aCommand )
+    {
+    switch ( aCommand )
+        {
+        case EAknSoftkeyExit:
+        case EAknSoftkeyBack:  
+        case EEikCmdExit:
+            {
+            PrepareToExit();
+            Exit();
+            break;
+            }
+        case EAknSoftkeySelect:
+        case ESimCmdConfigFile:
+        	{                
+			// Code for launching new SimPSY file selector			
+    		CSimPsyFileSelector* fileSelector = new ( ELeave ) CSimPsyFileSelector();
+			CleanupStack::PushL( fileSelector );
+			    		
+    		// Construct the popup with the list
+    		CAknPopupList* popup = CAknPopupList::NewL( fileSelector, 
+                                  						R_AVKON_SOFTKEYS_SELECT_CANCEL__SELECT,
+                                  						AknPopupLayouts::EMenuGraphicWindow );
+			CleanupStack::PushL( popup );                                  						                                  						  
+    		fileSelector->ConstructL( popup );
+    	    popup->SetTitleL( KSelectDialogTitle );
+    	    CleanupStack::Pop( popup );
+    	    
+    		// Display the pop-up and let user selection.                             
+    		TInt popupOk = popup->ExecuteLD();
+            if ( popupOk )
+        		{          
+        		HBufC* fileName = NULL;
+        		TRAPD( error, fileName = fileSelector->SimulationFileNameL().AllocL());
+        		if ( !error )
+        		    {
+            		CleanupStack::PushL( fileName );
+            		
+                    // The full filename with path is stored in the cenrep file.
+    				RDebug::Print(_L("SimPsyConfigurator: Setting Cenrep Key\n"));
+    				CRepository* repository = CRepository::NewLC( KCRUidSimulationPSY );
+    				repository->Set( KCRKeySimPSYSimulationFile, *fileName );
+    				CleanupStack::PopAndDestroy( repository );
+    				
+    				// Update the SimPsyConfigurator listbox
+    				iAppContainer->UpdateListBox();
+    				    				        		
+            		CleanupStack::PopAndDestroy( fileName );        		    
+        		    }
+        		}
+			CleanupStack::PopAndDestroy( fileSelector );      			                
+            break;       	
+        	}
+        case ESimCmdGetCurrentLocation:
+        	{
+			
+	        // Obtain the Location information asynchrnously
+	        TRAPD( err, iLocationRequestor->GetCurrentLocationL()); 	        
+	        if( !err )
+	            {
+	            iWaitDialog = new(ELeave) CAknWaitDialog( NULL, ETrue );
+	            iWaitDialog->SetCallback( this );
+			    if ( !iWaitDialog->ExecuteLD( R_SIMPSYUI_REQUEST_LOCATION ) )
+    				{
+    				//Set iWaitDialog to NULL on pressing Cancel 
+    				iWaitDialog = NULL;
+    				iLocationRequestor->CancelLocationRequest();
+    				} 
+	            }	         
+            break;
+        	}
+        default:
+            break;      
+        }
+    }	
+
+// ---------------------------------------------------------------------------
+// void CSimPsyUiAppUi::NotifyLocationRequestCompletedL
+// ---------------------------------------------------------------------------
+//
+void CSimPsyUiAppUi::NotifyLocationRequestCompletedL()
+    {
+    // Dismiss the wait note.	
+    if ( iWaitDialog )
+        {
+        TRAPD( err, iWaitDialog->ProcessFinishedL() );
+        if (err != KErrNone)
+    		{
+			delete iWaitDialog;
+			iWaitDialog = NULL;
+			}
+	    }
+    }
+
+// ---------------------------------------------------------------------------
+// void CSimPsyUiAppUi::DialogDismissedL
+// ---------------------------------------------------------------------------
+//
+void CSimPsyUiAppUi::DialogDismissedL( TInt aButtonId )
+    {
+    if( EEikBidCancel != aButtonId )
+        {
+        // Display the current Location information to the user
+        iLocationRequestor->DisplayCurrentLocationL();
+        }
+    }
+    
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/simpsyconfigurator/src/simpsyuicontainer.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,177 @@
+/*
+* 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:  Simulation PSY Configuration UI server application class.
+*
+*/
+
+#include <aknlists.h>
+
+#include "simpsyuiappui.h"
+#include "simpsyuicontainer.h"
+#include "simpsyuilbmodel.h"
+
+// ---------------------------------------------------------
+// void CSimPsyUiContainer::ConstructL
+// ---------------------------------------------------------
+//
+void CSimPsyUiContainer::ConstructL( const TRect& 			aRect,
+										   CSimPsyUiAppUi*	aAppUi )
+    {
+    if( !aAppUi )
+    	{
+    	User::Leave( KErrArgument );
+   		}
+   	iAppUi = aAppUi;
+    CreateWindowL();
+    CreateListboxL();
+    SetRect(aRect);
+   	ActivateL();
+    }
+
+// ---------------------------------------------------------
+// CSimPsyUiContainer::~CSimPsyUiContainer
+// ---------------------------------------------------------
+//
+CSimPsyUiContainer::~CSimPsyUiContainer()
+    {
+    delete iListBox;
+    iListBox = NULL;
+    }
+
+// ---------------------------------------------------------
+// TKeyResponse CSimPsyUiContainer::OfferKeyEventL
+// ---------------------------------------------------------
+//
+TKeyResponse CSimPsyUiContainer::OfferKeyEventL
+						( const TKeyEvent& /*aKeyEvent*/,
+				  				TEventCode /*aType*/ )
+    {
+    return TKeyResponse( EKeyWasConsumed ) ;
+    }
+
+// ---------------------------------------------------------
+// void CSimPsyUiContainer::UpdateListBox
+// ---------------------------------------------------------
+//
+void CSimPsyUiContainer::UpdateListBox()
+	{
+	if ( iListBox )
+		{
+		iListBox->DrawDeferred();	
+		}
+	}
+
+// ---------------------------------------------------------
+// void CSimPsyUiContainer::CreateListboxL
+// ---------------------------------------------------------
+//    
+void CSimPsyUiContainer::CreateListboxL()
+	{
+	
+	delete iListBox;
+	iListBox = NULL;
+
+	iListBox = new( ELeave ) CAknDoubleStyleListBox;
+    iListBox->SetContainerWindowL( *this );
+    iListBox->ConstructL( this, EAknGenericListBoxFlags);
+    
+	CSimPsyUiLBModel*	lLBModel = CSimPsyUiLBModel::NewLC();
+	
+	iListBox->Model()->SetItemTextArray( lLBModel ); 
+    iListBox->Model()->SetOwnershipType( ELbmOwnsItemArray );
+    CleanupStack::Pop(lLBModel); // model
+    
+    iListBox->DrawNow();
+	}
+
+// ---------------------------------------------------------
+// CSimPsyUiContainer::SizeChanged()
+// Called by framework when the view size is changed
+// ---------------------------------------------------------
+//
+void CSimPsyUiContainer::SizeChanged()
+    {
+    if ( iListBox )
+    	{
+    	iListBox->SetRect( Rect() );
+   	 	}
+    }
+
+// ---------------------------------------------------------
+// CSimPsyUiContainer::CountComponentControls() const
+// ---------------------------------------------------------
+//
+TInt CSimPsyUiContainer::CountComponentControls() const
+    {
+    if( iListBox )
+    	{
+    	return 1;
+    	}
+    else
+    	{
+    	return 0;		
+    	}
+    }
+
+// ---------------------------------------------------------
+// CSimPsyUiContainer::ComponentControl
+// ---------------------------------------------------------
+//
+CCoeControl* CSimPsyUiContainer::ComponentControl( TInt /*aIndex*/ ) const
+    {
+ 	if( iListBox )
+	 	{
+		return iListBox;	
+	 	}
+	 else
+	 	{
+	 	return NULL;
+	 	}
+    }
+// ---------------------------------------------------------
+// CSimPsyUiContainer::FocusChanged
+// ---------------------------------------------------------
+//
+void CSimPsyUiContainer::FocusChanged(TDrawNow aDrawNow)
+	{
+	if( iListBox )
+		{
+		iListBox->SetFocus( IsFocused(), aDrawNow );
+		}
+	}
+
+// -----------------------------------------------------------------------------
+// CLocMainContainer::HandleResourceChange
+// -----------------------------------------------------------------------------
+//
+void CSimPsyUiContainer::HandleResourceChange(TInt aType)
+    {
+    CCoeControl::HandleResourceChange(aType);
+    switch( aType )
+    	{
+    	case KEikDynamicLayoutVariantSwitch:
+    		{
+    		if( iAppUi )
+	    		{
+	    		SetRect(iAppUi->ClientRect());
+	    		DrawDeferred();	
+	    		}
+			break;
+    		}
+    	default:
+    		{
+    		break;
+    		}
+    	}
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/simpsyconfigurator/src/simpsyuidocument.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,29 @@
+/*
+* 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:  Simulation PSY Configuration UI application document class.
+*
+*/
+
+
+#include "simpsyuidocument.h"
+#include "simpsyuiappui.h"
+
+// ---------------------------------------------------------
+// CEikAppUi* CSimPsyUiAppDocument::CreateAppUiL
+// ---------------------------------------------------------
+//
+CEikAppUi* CSimPsyUiAppDocument::CreateAppUiL()
+	{
+	return new (ELeave) CSimPsyUiAppUi();
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/simpsyconfigurator/src/simpsyuilbmodel.cpp	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,163 @@
+/*
+* 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:  Provides SimPsyUi listbox model that holds the
+*				          currently selected NMEA File.
+*
+*/
+
+
+// INCLUDE FILES
+#include <e32keys.h>
+#include <f32file.h>
+#include <StringLoader.h> // StringLoader
+#include <centralrepository.h>
+#include <simpsyui.rsg>
+#include "SimulationPSYInternalCRKeys.h"
+
+#include "simpsyuilbmodel.h"
+
+const TInt	KTabWidth = 1;
+// ================= MEMBER FUNCTIONS =======================
+
+// ---------------------------------------------------------
+// CSimPsyUiLBModel::NewL()
+// Static Constuctor that completes the Symbian two-phase 
+// construction. 
+// ---------------------------------------------------------
+CSimPsyUiLBModel* CSimPsyUiLBModel::NewL()
+    {
+    CSimPsyUiLBModel* lbmodel = NewLC();
+    CleanupStack::Pop( lbmodel );
+    return lbmodel;
+    }
+
+// ---------------------------------------------------------
+// CSimPsyUiLBModel::NewLC()
+// Static Constuctor that completes the Symbian two-phase 
+// construction. It places the created object on the 
+// Clean-up stack
+// ---------------------------------------------------------
+CSimPsyUiLBModel* CSimPsyUiLBModel::NewLC()
+    {
+    CSimPsyUiLBModel* lbmodel = new (ELeave) CSimPsyUiLBModel();
+    CleanupStack::PushL( lbmodel );
+    lbmodel->ConstructL();
+    return lbmodel;
+    }
+
+// ---------------------------------------------------------
+// CSimPsyUiLBModel::CSimPsyUiLBModel()
+// C++ Default Constructor
+// ---------------------------------------------------------
+CSimPsyUiLBModel::CSimPsyUiLBModel()
+    {
+    }
+
+// ---------------------------------------------------------
+// CSimPsyUiLBModel::ConstructL()
+// Symbian two phased constructor
+// ---------------------------------------------------------
+void CSimPsyUiLBModel::ConstructL()
+    {
+    iFileNameText = StringLoader::LoadL( R_SIMPSYUI_FILENAME_TEXT );
+    TInt lLength = iFileNameText->Length();
+    
+    /* The length of the buffer is the length needed for 
+     * the File name text, tab keys and the maximum file
+     * name length
+     */
+    iBuffer = HBufC::NewL(KMaxFileName + KTabWidth + KTabWidth + lLength ); 
+    
+    }
+
+// ---------------------------------------------------------
+// CSimPsyUiLBModel::~CSimPsyUiLBModel()
+// C++ Destructor
+// ---------------------------------------------------------
+CSimPsyUiLBModel::~CSimPsyUiLBModel()
+    {
+    delete iBuffer;
+    iBuffer = NULL;
+    
+    delete iFileNameText;
+    iFileNameText = NULL;
+    }
+    
+// ---------------------------------------------------------
+// CSimPsyUiLBModel::MdcaCount()
+// Returns the number of descriptor elements in a descriptor array.
+
+// @return The number of descriptor elements in a descriptor array.
+// ---------------------------------------------------------
+TInt CSimPsyUiLBModel::MdcaCount() const
+    {
+    return 1;
+    }
+
+// ---------------------------------------------------------
+// CSimPsyUiLBModel::MdcaPoint()
+// Indexes into a descriptor array.
+//
+// @param aIndex The position of the descriptor element within
+// 				 a descriptor array. The position is relative 
+//				 to zero; i.e. zero implies the first descriptor
+//				 element in a descriptor array. 
+//	@return 	 A 16 bit non-modifiable pointer descriptor 
+//				 representing the descriptor element located at 
+//				 position aIndex within a descriptor array. 
+// ---------------------------------------------------------
+TPtrC16 CSimPsyUiLBModel::MdcaPoint( TInt aIndex ) const
+    {
+    	TRAP_IGNORE(MdcaPointL(aIndex));
+    	return *iBuffer;
+    }
+
+// ---------------------------------------------------------
+// CSimPsyUiLBModel::MdcaPointL()
+// Indexes into a descriptor array.
+//
+// @param aIndex The position of the descriptor element within
+// 				 a descriptor array. The position is relative 
+//				 to zero; i.e. zero implies the first descriptor
+//				 element in a descriptor array. 
+//	@return 	 A 16 bit non-modifiable pointer descriptor 
+//				 representing the descriptor element located at 
+//				 position aIndex within a descriptor array. 
+// ---------------------------------------------------------
+TPtrC16 CSimPsyUiLBModel::MdcaPointL( TInt /*aIndex*/ ) const
+{
+	TPtr ptr( iBuffer->Des() );
+    ptr.Zero();
+    ptr.Append( EKeyTab );
+    
+    ptr.Append( iFileNameText->Des() );
+
+    ptr.Append( EKeyTab );
+    
+    TBuf<KMaxFileName> nmeaFileName;
+	TParse FileParser;
+	/* The cenrep contains the filename with full path.
+	 * Hence only the filename is extracted and displayed in the Edwin
+	 */
+	CRepository* repository = CRepository::NewLC(KCRUidSimulationPSY);
+	repository->Get(KCRKeySimPSYSimulationFile, nmeaFileName);
+	FileParser.Set(nmeaFileName,NULL,NULL);
+	nmeaFileName.Copy(FileParser.NameAndExt());
+	CleanupStack::PopAndDestroy(repository);
+	
+    ptr.Append(nmeaFileName);
+ 
+    return *iBuffer;	
+}
+
--- a/sysdef_1_5_1.dtd	Tue Aug 31 15:09:25 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>  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tsrc/group/bld.inf	Wed Sep 01 12:31:27 2010 +0100
@@ -0,0 +1,20 @@
+//*
+* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  The common build file.
+*
+*/
+
+PRJ_TESTMMPFILES
+#include "../../loc_sdk/landmarks_ui_addedit_api/tsrc/group/bld.inf"
+#include "../../loc_sdk/landmarks_ui_selector_api/tsrc/group/bld.inf"
\ No newline at end of file